-
Notifications
You must be signed in to change notification settings - Fork 5
feat: Add localnetworkaccess policy #67
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
Open
bsmth
wants to merge
6
commits into
mozilla:main
Choose a base branch
from
bsmth:17-localnetworkaccess
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
5e2d1ff
feat: Add localnetworkaccess policy
bsmth 625c720
Apply suggestion from review
bsmth e283a0f
Merge branch 'main' into 17-localnetworkaccess
bsmth de1ff3a
Merge branch 'main' into 17-localnetworkaccess
bsmth 1d8424d
Merge branch 'main' into 17-localnetworkaccess
bsmth 15e2cdb
feat(docs): Add changelog entry
bsmth File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
165 changes: 165 additions & 0 deletions
165
src/content/docs/reference/policies/LocalNetworkAccess.mdx
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,165 @@ | ||
| --- | ||
| title: "LocalNetworkAccess" | ||
| description: "Configure local network access security features." | ||
| category: "Network security" | ||
| --- | ||
|
|
||
| Configure local network access security features. | ||
| The `LocalNetworkAccess` policy controls Firefox's behavior when websites attempt to access local network resources (localhost and local network addresses). | ||
|
|
||
| **Compatibility:** Firefox 149\ | ||
|
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is 150 |
||
| **CCK2 Equivalent:** N/A\ | ||
| **Preferences Affected:** `network.lna.enabled`, `network.lna.block_trackers`, `network.lna.blocking`, `network.lna.skip-domains` | ||
|
|
||
| ## Values | ||
|
|
||
| - `Enabled`: a Boolean that enables or disables the policy. | ||
| - When `true` (default), Firefox enforces local network access security checks. | ||
| This is the base flag without which none of the local network access checks below would be enforced. | ||
| - When `false`, all local network access checks are disabled and websites can freely access local network resources. | ||
| - `BlockTrackers`: a Boolean that controls blocking third-party trackers. When `true`, third-party trackers are directly blocked from accessing localhost and local network resources. | ||
| This is an experimental feature that helps prevent tracking scripts from scanning your local network. | ||
| - `EnablePrompting`: a Boolean to gate user permission prompts. | ||
| When `true`, access to local network resources will be explicitly gated via user permission prompts. | ||
| Users will be asked to grant permission before a website can access local resources. | ||
| - `SkipDomains`: an array of domain names for which local network access checks should be skipped. This allows administrators to create exceptions for trusted domains. | ||
| - `Locked`: if set to true, users cannot change the local network access settings. | ||
|
|
||
| ## Description | ||
|
|
||
| When providing a list of exceptions for trusted domains, the `SkipDomains` array can contain both **source domains** (the website making the request) and **target domains** (the local resource being accessed). | ||
|
|
||
| When a **source domain** is listed, that website is allowed to access local network resources without restrictions. | ||
| For example, if `"trusted-app.example.com"` is listed, that website can freely make requests to any local network resources. | ||
|
|
||
| When a **target domain** is listed, any website can access that specific local network resource without restrictions. | ||
| For example, if `"printer.local"` is listed, all websites can access the printer device. | ||
|
|
||
| Suffix wildcard patterns for are supported using the `*.` prefix to match all subdomains: | ||
|
|
||
| - `"*.company.com"` - Skips checks for all subdomains of company.com (matches `app.company.com`, `portal.company.com`, etc.). | ||
| - `"*.internal"` - Skips checks for all .internal domains (matches `device.internal`, `printer.internal`, etc.). | ||
| - `"web-app.example.com"` - Skips checks for this specific domain only (no subdomain matching). | ||
| - `"*.devices.local"` - Allows access to all local devices with `.devices.local` suffix (`printer.devices.local`, `scanner.devices.local`, etc.). | ||
| - `"*.corp.internal"` - Allows access to all corporate internal domains. | ||
|
|
||
| #### Windows (GPO) | ||
|
|
||
| ``` | ||
| Software\Policies\Mozilla\Firefox\LocalNetworkAccess\Enabled = 0x1 | 0x0 | ||
| Software\Policies\Mozilla\Firefox\LocalNetworkAccess\BlockTrackers = 0x1 | 0x0 | ||
| Software\Policies\Mozilla\Firefox\LocalNetworkAccess\EnablePrompting = 0x1 | 0x0 | ||
| Software\Policies\Mozilla\Firefox\LocalNetworkAccess\SkipDomains\1 = "intranet.company.com" | ||
| Software\Policies\Mozilla\Firefox\LocalNetworkAccess\SkipDomains\2 = "*.devices.local" | ||
| Software\Policies\Mozilla\Firefox\LocalNetworkAccess\SkipDomains\3 = "*.corp.internal" | ||
| Software\Policies\Mozilla\Firefox\LocalNetworkAccess\Locked = 0x1 | 0x0 | ||
| ``` | ||
|
|
||
| #### Windows (Intune) | ||
|
|
||
| OMA-URI: | ||
|
|
||
| ``` | ||
| ./Device/Vendor/MSFT/Policy/Config/Firefox~Policy~firefox/LocalNetworkAccess_Enabled | ||
| ``` | ||
|
|
||
| Value (string): | ||
|
|
||
| ``` | ||
| <enabled/> or <disabled/> | ||
| ``` | ||
|
|
||
| OMA-URI: | ||
|
|
||
| ``` | ||
| ./Device/Vendor/MSFT/Policy/Config/Firefox~Policy~firefox/LocalNetworkAccess_BlockTrackers | ||
| ``` | ||
|
|
||
| Value (string): | ||
|
|
||
| ``` | ||
| <enabled/> or <disabled/> | ||
| ``` | ||
|
|
||
| OMA-URI: | ||
|
|
||
| ``` | ||
| ./Device/Vendor/MSFT/Policy/Config/Firefox~Policy~firefox/LocalNetworkAccess_EnablePrompting | ||
| ``` | ||
|
|
||
| Value (string): | ||
|
|
||
| ``` | ||
| <enabled/> or <disabled/> | ||
| ``` | ||
|
|
||
| OMA-URI: | ||
|
|
||
| ``` | ||
| ./Device/Vendor/MSFT/Policy/Config/Firefox~Policy~firefox/LocalNetworkAccess_SkipDomains | ||
| ``` | ||
|
|
||
| Value (string): | ||
|
|
||
| ``` | ||
| <enabled/> | ||
| <data id="LocalNetworkAccess_SkipDomains" value="1intranet.company.com2*.devices.local3*.corp.internal"/> | ||
| ``` | ||
|
|
||
| OMA-URI: | ||
|
|
||
| ``` | ||
| ./Device/Vendor/MSFT/Policy/Config/Firefox~Policy~firefox/LocalNetworkAccess_Locked | ||
| ``` | ||
|
|
||
| Value (string): | ||
|
|
||
| ``` | ||
| <enabled/> or <disabled/> | ||
| ``` | ||
|
|
||
| #### macOS | ||
|
|
||
| ``` | ||
| <dict> | ||
| <key>LocalNetworkAccess</key> | ||
| <dict> | ||
| <key>Enabled</key> | ||
| <true/> | <false/> | ||
| <key>BlockTrackers</key> | ||
| <true/> | <false/> | ||
| <key>EnablePrompting</key> | ||
| <true/> | <false/> | ||
| <key>SkipDomains</key> | ||
| <array> | ||
| <string>intranet.company.com</string> | ||
| <string>*.devices.local</string> | ||
| <string>admin-portal.enterprise.com</string> | ||
| <string>*.corp.internal</string> | ||
| </array> | ||
| <key>Locked</key> | ||
| <true/> | <false/> | ||
| </dict> | ||
| </dict> | ||
| ``` | ||
|
|
||
| #### policies.json | ||
|
|
||
| ``` | ||
| { | ||
| "policies": { | ||
| "LocalNetworkAccess": { | ||
| "Enabled": true | false, | ||
| "BlockTrackers": true | false, | ||
| "EnablePrompting": true | false, | ||
| "SkipDomains": [ | ||
| "intranet.company.com", | ||
| "*.devices.local", | ||
| "admin-portal.enterprise.com", | ||
| "*.corp.internal" | ||
| ], | ||
| "Locked": true | false | ||
| } | ||
| } | ||
| } | ||
| ``` | ||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is 150