-
Notifications
You must be signed in to change notification settings - Fork 33.2k
Support JSON file as a policy backend on Linux by default #251642
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Co-authored-by: joshspicer <23246594+joshspicer@users.noreply.github.com>
@copilot we want the policy file to be placed into a directory on linux that is commonly only writeable by admins/root. Otherwise, a non-privileged user could tamper with the policy. |
Co-authored-by: joshspicer <23246594+joshspicer@users.noreply.github.com>
@copilot probably something like |
Co-authored-by: joshspicer <23246594+joshspicer@users.noreply.github.com>
Fixed the security concern by moving the Linux policy file from Warning Firewall rules blocked me from connecting to one or more addressesI tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
Yes, exactly! I've already implemented this approach in commit 6698f71. The policy file is now located at Warning Firewall rules blocked me from connecting to one or more addressesI tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
This PR implements JSON file-based policy support on Linux by default, removing the need for the
__enable-file-policy
command line flag on Linux systems.Changes Made
Core Implementation
src/vs/code/electron-main/main.ts
to useFilePolicyService
by default on Linux__enable-file-policy
flag (unchanged)Policy File Location
On Linux, VS Code now automatically looks for policies at:
Example policy file:
Testing
src/vs/platform/policy/test/common/linuxPolicySupport.test.ts
Technical Details
FilePolicyService
with automatic file watchingjoinPath(userHome, dataFolderName, 'policy.json')
__enable-file-policy
behaviorBehavior Changes
__enable-file-policy
flag to use JSON policies~/.config/{dataFolderName}/policy.json
This change enables enterprise administrators to easily deploy JSON-based policies on Linux systems without requiring command line flags.
Fixes #148945.
Warning
Firewall rules blocked me from connecting to one or more addresses
I tried to connect to the following addresses, but was blocked by firewall rules:
electronjs.org
node-gyp
(dns block)If you need me to access, download, or install something from one of these locations, you can either:
💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.