[PR #5765] [CLOSED] [management] Add static connectors to combined server #23861

Open
opened 2026-08-05 06:07:57 -04:00 by saavagebueno · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/netbirdio/netbird/pull/5765
Author: @jnfrati
Created: 4/1/2026
Status: Closed

Base: mainHead: feat/static-connectors


📝 Commits (10+)

  • 7a10fa6 management support for idp seed info
  • 9769397 implemented support for activity store
  • a1d8c27 reduce cognitive load on modules IdpManager function
  • 51ddd69 Decouple migration interfaces from core store and add standalone migration tool
  • 7ff7690 added developer doc for migration
  • 1775067 added migration instructions
  • dbe83c5 move idp migration related code to separate sql store file
  • 0188034 refactor tools/idp-migrate/main.go (run function) to lower cognitive complexity, fix code smells
  • b716049 Merge branch 'main' into combined-migration-2
  • 90d1a7b move idp migration sql store tests to separate file

📊 Changes

2 files changed (+7 additions, -4 deletions)

View changed files

📝 combined/cmd/config.go (+3 -0)
📝 idp/dex/config.go (+4 -4)

📄 Description

Describe your changes

With the release of #5586 we now allow users to setup static connectors through management.json, which allows them to provision dex IdP entries directly through config, this PR introduces the same capability for the combined server.

Example config.yaml:


server:
  listenAddress: ":80"
  exposedAddress: "https://example.com:443"
  stunPorts:
    - 3478
  metricsPort: 9090
  healthcheckAddress: ":9000"
  logLevel: "info"
  logFile: "console"

  authSecret: "secret"
  dataDir: "/var/lib/netbird"

  auth:
    localAuthDisabled: true
    issuer: "https://example.com/oauth2"
    signKeyRefreshEnabled: true
    dashboardRedirectURIs:
      - "https://example.com/nb-auth"
      - "https://example.com/nb-silent-auth"
    cliRedirectURIs:
      - "http://localhost:53000/"
    staticConnectors:
      - type: keycloak
        name: keycloak
        id: keycloak
        config:
          issuer: "https://keycloak.domain.com/realms/netbird"
          clientID: clientId
          clientSecret: secret
          redirectURI: https://example.com/oauth2/callback


      - type: authentik
        name: authentik
        id: authentik
        config:
          issuer: https://authentik.domain.com/application/o/netbird/
          clientID: clientId
          clientSecret: secret
          redirectURI: https://example.com/oauth2/callback

  reverseProxy:
    trustedHTTPProxies:
      - "172.30.0.10/32"

  store:
    engine: "sqlite"
    encryptionKey: secretKey

Caveats

  • config.yaml parameters will override any "dashboard" change if the management server restarts
  • first user to log-in is the owner, no way to change this programatically

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)

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

Documentation

Select exactly one:

  • 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/__

Summary by CodeRabbit

  • New Features

    • Added support for configuring static identity provider connectors through configuration settings, providing enhanced flexibility in authentication provider setup.
  • Refactor

    • Updated internal type declarations to align with modern standards and improve code consistency.

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/netbirdio/netbird/pull/5765 **Author:** [@jnfrati](https://github.com/jnfrati) **Created:** 4/1/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `feat/static-connectors` --- ### 📝 Commits (10+) - [`7a10fa6`](https://github.com/netbirdio/netbird/commit/7a10fa61c78b29e3cbbd9cab21fe0d1db5de8211) management support for idp seed info - [`9769397`](https://github.com/netbirdio/netbird/commit/97693973477d39f9af7e97a2653035cd1f91d47a) implemented support for activity store - [`a1d8c27`](https://github.com/netbirdio/netbird/commit/a1d8c275ca0eb9983338aaace6dd1285cc481466) reduce cognitive load on modules IdpManager function - [`51ddd69`](https://github.com/netbirdio/netbird/commit/51ddd69a1b312090b9f7a2c044e664b38483e534) Decouple migration interfaces from core store and add standalone migration tool - [`7ff7690`](https://github.com/netbirdio/netbird/commit/7ff7690eb457fee88f7681514676c7065999998d) added developer doc for migration - [`1775067`](https://github.com/netbirdio/netbird/commit/1775067a15551d41af3b53c539c499f89ff3c4ac) added migration instructions - [`dbe83c5`](https://github.com/netbirdio/netbird/commit/dbe83c57c811a147d4210f167f810b3c4704188d) move idp migration related code to separate sql store file - [`0188034`](https://github.com/netbirdio/netbird/commit/0188034d43d01149ca36b1633326c6cc5465cec7) refactor tools/idp-migrate/main.go (run function) to lower cognitive complexity, fix code smells - [`b716049`](https://github.com/netbirdio/netbird/commit/b716049e241944ef3888f5335ad8d464968ae54c) Merge branch 'main' into combined-migration-2 - [`90d1a7b`](https://github.com/netbirdio/netbird/commit/90d1a7bc0b16cbcca7108f3069b59a907d4e5088) move idp migration sql store tests to separate file ### 📊 Changes **2 files changed** (+7 additions, -4 deletions) <details> <summary>View changed files</summary> 📝 `combined/cmd/config.go` (+3 -0) 📝 `idp/dex/config.go` (+4 -4) </details> ### 📄 Description ## Describe your changes With the release of #5586 we now allow users to setup static connectors through management.json, which allows them to provision dex IdP entries directly through config, this PR introduces the same capability for the combined server. Example config.yaml: ```yaml server: listenAddress: ":80" exposedAddress: "https://example.com:443" stunPorts: - 3478 metricsPort: 9090 healthcheckAddress: ":9000" logLevel: "info" logFile: "console" authSecret: "secret" dataDir: "/var/lib/netbird" auth: localAuthDisabled: true issuer: "https://example.com/oauth2" signKeyRefreshEnabled: true dashboardRedirectURIs: - "https://example.com/nb-auth" - "https://example.com/nb-silent-auth" cliRedirectURIs: - "http://localhost:53000/" staticConnectors: - type: keycloak name: keycloak id: keycloak config: issuer: "https://keycloak.domain.com/realms/netbird" clientID: clientId clientSecret: secret redirectURI: https://example.com/oauth2/callback - type: authentik name: authentik id: authentik config: issuer: https://authentik.domain.com/application/o/netbird/ clientID: clientId clientSecret: secret redirectURI: https://example.com/oauth2/callback reverseProxy: trustedHTTPProxies: - "172.30.0.10/32" store: engine: "sqlite" encryptionKey: secretKey ``` ### Caveats - config.yaml parameters will override any "dashboard" change if the management server restarts - first user to log-in is the owner, no way to change this programatically ### Checklist - [ ] Is it a bug fix - [ ] Is a typo/documentation fix - [x] 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/__ <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Added support for configuring static identity provider connectors through configuration settings, providing enhanced flexibility in authentication provider setup. * **Refactor** * Updated internal type declarations to align with modern standards and improve code consistency. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
saavagebueno added the pull-request label 2026-08-05 06:07:57 -04:00
Sign in to join this conversation.
No Label pull-request
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: DYNR/netbird#23861