Files
netbird/docs/netbird-policy.reg
Riccardo Manfrin dc89b471fa [client] checks/enforce MDM disableAutostart on every GUI launch, not just fresh installs (#6782)
## Describe your changes

`applyAutostartDefault` gated all MDM enforcement behind the one-time
`AutostartInitialized` marker, so MDM `disableAutostart` only affected
fresh installs — a policy pushed after autostart had been enabled could
not
revoke the OS login-item. 

The PR adds follow-up MDM enforcements at the top of
the function: if at any time MDM sets `disableAutostart=true` and the OS
registration is
present, force `SetEnabled(false)` to align it.

Trade-off: once the admin lifts the policy, autostart stays off until
the user re-toggles
in Settings — consistent with "MDM always wins" behavior of the other
managed keys.

## Issue ticket number and link

Follow-up to PR https://github.com/netbirdio/netbird/pull/6738
(introduced
the `disableAutostart` MDM key with fresh-install-only semantics).

## Stack

<!-- branch-stack -->

### Checklist
- [x] Is it a bug fix
- [ ] Is a typo/documentation fix
- [ ] Is a feature enhancement
- [ ] It is a refactor
- [ ] Created tests that fail without the change (if possible)

> By submitting this pull request, you confirm that you have read and
agree to the terms of the [Contributor License
Agreement](https://github.com/netbirdio/netbird/blob/main/CONTRIBUTOR_LICENSE_AGREEMENT.md).

## Documentation
Select exactly one:

- [x] I added/updated documentation for this change
- [ ] Documentation is **not needed** for this change (explain why)

### Docs PR URL (required if "docs added" is checked)
Paste the PR link from https://github.com/netbirdio/docs here:

<https://github.com/netbirdio/docs/pull/855>


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

- **New Features**
- Added an administrative policy to disable client autostart (“Disable
Autostart”).
- Added support for configuring this policy via macOS MDM, Windows Group
Policy (ADMX/ADML), and registry settings.
- When enforced, the client prevents new autostart registration on fresh
installs and removes existing autostart on the next GUI launch, keeping
it disabled until the policy is lifted.

- **Bug Fixes**
- Improved enforcement logic for managed autostart defaults so policy
state is applied consistently during startup and first-run setup.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2026-07-22 11:34:13 +02:00

22 lines
1.5 KiB
Reg
Raw Permalink Blame History

This file contains invisible Unicode characters
This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\Software\Policies\NetBird]
"SplitTunnelMode"="allow"
"SplitTunnelApps"="my.fancy.app,or.something.else"
"AllowServerSSH"=dword:00000000
"BlockInbound"=dword:00000001
"DisableAutoConnect"=dword:00000001
"DisableAutostart"=dword:00000001
"DisableClientRoutes"=dword:00000001
"DisableMetricsCollection"=dword:00000001
"DisableNetworks"=dword:00000001
"DisableAdvancedView"=dword:00000001
"DisableProfiles"=dword:00000001
"DisableServerRoutes"=dword:00000001
"DisableUpdateSettings"=dword:00000001
"PreSharedKey"="RE9OJ1RVU0UgVEhJUyBQU0sAAAAAAAAAAAAAAAAAAAA="
"ManagementURL"="https://foo.bar.zoo:443"
"RosenpassEnabled"=dword:00000000
"RosenpassPermissive"=dword:00000000
"WireguardPort"=dword:0000ca6d