[PR #3970] [management] Add option to disable default all-to-all policy #4027

Open
opened 2025-11-20 08:07:35 -05:00 by saavagebueno · 0 comments
Owner

Original Pull Request: https://github.com/netbirdio/netbird/pull/3970

State: closed
Merged: Yes


Describe your changes

This PR introduces a new configuration option DisableDefaultPolicy that prevents the creation of the default all-to-all policy when new accounts are created. This is useful for automation scenarios where explicit policies are preferred.

Key Changes:

  • Added DisableDefaultPolicy flag to the management server config
  • Modified account creation logic to respect this flag
  • Updated all test cases to explicitly pass the flag (defaulting to false to maintain backward compatibility)
  • Propagated the flag through the account manager initialization chain

Testing:

  • Verified default behavior remains unchanged when flag is false
  • Confirmed no default policy is created when flag is true
  • All existing tests pass with the new parameter

Closes #3932

Stack

Checklist

  • 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)
  • Extended the README / documentation, if necessary

By submitting this pull request, you confirm that you have read and agree to the terms of the Contributor License Agreement.

**Original Pull Request:** https://github.com/netbirdio/netbird/pull/3970 **State:** closed **Merged:** Yes --- ## Describe your changes This PR introduces a new configuration option `DisableDefaultPolicy` that prevents the creation of the default all-to-all policy when new accounts are created. This is useful for automation scenarios where explicit policies are preferred. ### Key Changes: - Added DisableDefaultPolicy flag to the management server config - Modified account creation logic to respect this flag - Updated all test cases to explicitly pass the flag (defaulting to false to maintain backward compatibility) - Propagated the flag through the account manager initialization chain ### Testing: - Verified default behavior remains unchanged when flag is false - Confirmed no default policy is created when flag is true - All existing tests pass with the new parameter ## Issue ticket number and link Closes #3932 ## Stack <!-- branch-stack --> ### Checklist - [ ] Is it a bug fix - [ ] Is a typo/documentation fix - [x] Is a feature enhancement - [x] It is a refactor - [ ] Created tests that fail without the change (if possible) - [ ] Extended the README / documentation, if necessary > 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).
saavagebueno added the pull-request label 2025-11-20 08:07:35 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: SVI/netbird#4027