mirror of
https://github.com/netbirdio/netbird.git
synced 2026-04-29 05:36:39 +00:00
added static connectors to combined config yaml
This commit is contained in:
@@ -14,6 +14,7 @@ import (
|
|||||||
log "github.com/sirupsen/logrus"
|
log "github.com/sirupsen/logrus"
|
||||||
"gopkg.in/yaml.v3"
|
"gopkg.in/yaml.v3"
|
||||||
|
|
||||||
|
"github.com/netbirdio/netbird/idp/dex"
|
||||||
"github.com/netbirdio/netbird/management/server/idp"
|
"github.com/netbirdio/netbird/management/server/idp"
|
||||||
"github.com/netbirdio/netbird/management/server/types"
|
"github.com/netbirdio/netbird/management/server/types"
|
||||||
"github.com/netbirdio/netbird/util"
|
"github.com/netbirdio/netbird/util"
|
||||||
@@ -140,6 +141,7 @@ type AuthConfig struct {
|
|||||||
DashboardRedirectURIs []string `yaml:"dashboardRedirectURIs"`
|
DashboardRedirectURIs []string `yaml:"dashboardRedirectURIs"`
|
||||||
CLIRedirectURIs []string `yaml:"cliRedirectURIs"`
|
CLIRedirectURIs []string `yaml:"cliRedirectURIs"`
|
||||||
Owner *AuthOwnerConfig `yaml:"owner,omitempty"`
|
Owner *AuthOwnerConfig `yaml:"owner,omitempty"`
|
||||||
|
StaticConnectors []dex.Connector `yaml:"staticConnectors,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// AuthStorageConfig contains auth storage settings
|
// AuthStorageConfig contains auth storage settings
|
||||||
@@ -592,6 +594,7 @@ func (c *CombinedConfig) buildEmbeddedIdPConfig(mgmt ManagementConfig) (*idp.Emb
|
|||||||
},
|
},
|
||||||
DashboardRedirectURIs: mgmt.Auth.DashboardRedirectURIs,
|
DashboardRedirectURIs: mgmt.Auth.DashboardRedirectURIs,
|
||||||
CLIRedirectURIs: mgmt.Auth.CLIRedirectURIs,
|
CLIRedirectURIs: mgmt.Auth.CLIRedirectURIs,
|
||||||
|
StaticConnectors: mgmt.Auth.StaticConnectors,
|
||||||
}
|
}
|
||||||
|
|
||||||
if mgmt.Auth.Owner != nil && mgmt.Auth.Owner.Email != "" {
|
if mgmt.Auth.Owner != nil && mgmt.Auth.Owner.Email != "" {
|
||||||
|
|||||||
@@ -163,10 +163,10 @@ func (p *Password) UnmarshalYAML(node *yaml.Node) error {
|
|||||||
|
|
||||||
// Connector is a connector configuration that can unmarshal YAML dynamically.
|
// Connector is a connector configuration that can unmarshal YAML dynamically.
|
||||||
type Connector struct {
|
type Connector struct {
|
||||||
Type string `yaml:"type" json:"type"`
|
Type string `yaml:"type" json:"type"`
|
||||||
Name string `yaml:"name" json:"name"`
|
Name string `yaml:"name" json:"name"`
|
||||||
ID string `yaml:"id" json:"id"`
|
ID string `yaml:"id" json:"id"`
|
||||||
Config map[string]interface{} `yaml:"config" json:"config"`
|
Config map[string]any `yaml:"config" json:"config"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// ToStorageConnector converts a Connector to storage.Connector type.
|
// ToStorageConnector converts a Connector to storage.Connector type.
|
||||||
|
|||||||
Reference in New Issue
Block a user