syncer

package
v0.0.28 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 29, 2024 License: Apache-2.0 Imports: 55 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TenantID               = "AZURE_TENANT_ID"
	ClientID               = "AZURE_CLIENT_ID"
	ClientSecret           = "AZURE_CLIENT_SECRET"
	GraphGroupType         = "#microsoft.graph.group"
	GraphUserType          = "#microsoft.graph.user"
	GraphOdataType         = "@odata.type"
	GraphID                = "id"
	GraphDisplayName       = "displayName"
	GraphUserNameAttribute = "userPrincipalName"
)

Variables

This section is empty.

Functions

func ValidateActiveDirectoryConfig

func ValidateActiveDirectoryConfig(config *legacyconfigv1.ActiveDirectoryConfig) []error

func ValidateAugmentedActiveDirectoryConfig

func ValidateAugmentedActiveDirectoryConfig(config *legacyconfigv1.AugmentedActiveDirectoryConfig) []error

func ValidateLDAPQuery

func ValidateLDAPQuery(query legacyconfigv1.LDAPQuery, fldPath *field.Path) []error

func ValidateRFC2307Config

func ValidateRFC2307Config(config *legacyconfigv1.RFC2307Config) []error

Types

type AzureSyncer

type AzureSyncer struct {
	Name              string
	GroupSync         *redhatcopv1alpha1.GroupSync
	Provider          *redhatcopv1alpha1.AzureProvider
	Client            *msgraphsdk.GraphServiceClient
	ReconcilerBase    util.ReconcilerBase
	CredentialsSecret *corev1.Secret
	CachedGroups      map[string]*graph.Group
	CachedGroupUsers  map[string][]*graph.User
	Context           context.Context
	Adapter           *msgraphsdk.GraphRequestAdapter
	CaCertificate     []byte
}

func (*AzureSyncer) Bind

func (a *AzureSyncer) Bind() error

func (*AzureSyncer) GetProviderName

func (a *AzureSyncer) GetProviderName() string

func (*AzureSyncer) GetPrune added in v0.0.16

func (a *AzureSyncer) GetPrune() bool

func (*AzureSyncer) Init

func (a *AzureSyncer) Init() bool

func (*AzureSyncer) Sync

func (a *AzureSyncer) Sync() ([]userv1.Group, error)

func (*AzureSyncer) Validate

func (a *AzureSyncer) Validate() error

type GitHubSyncer

type GitHubSyncer struct {
	Name              string
	GroupSync         *redhatcopv1alpha1.GroupSync
	Provider          *redhatcopv1alpha1.GitHubProvider
	Client            *github.Client
	V4Client          *githubv4.Client
	Context           context.Context
	ReconcilerBase    util.ReconcilerBase
	CredentialsSecret *corev1.Secret
	URL               *url.URL
	CaCertificate     []byte
}

func (*GitHubSyncer) Bind

func (g *GitHubSyncer) Bind() error

func (*GitHubSyncer) GetProviderName

func (g *GitHubSyncer) GetProviderName() string

func (*GitHubSyncer) GetPrune added in v0.0.16

func (g *GitHubSyncer) GetPrune() bool

func (*GitHubSyncer) Init

func (g *GitHubSyncer) Init() bool

func (*GitHubSyncer) Sync

func (g *GitHubSyncer) Sync() ([]userv1.Group, error)

func (*GitHubSyncer) Validate

func (g *GitHubSyncer) Validate() error

type GitLabSyncer

type GitLabSyncer struct {
	Name              string
	GroupSync         *redhatcopv1alpha1.GroupSync
	Provider          *redhatcopv1alpha1.GitLabProvider
	Client            *gitlab.Client
	Context           context.Context
	ReconcilerBase    util.ReconcilerBase
	CredentialsSecret *corev1.Secret
	URL               *url.URL
	CaCertificate     []byte
}

func (*GitLabSyncer) Bind

func (g *GitLabSyncer) Bind() error

func (*GitLabSyncer) GetProviderName

func (g *GitLabSyncer) GetProviderName() string

func (*GitLabSyncer) GetPrune added in v0.0.16

func (g *GitLabSyncer) GetPrune() bool

func (*GitLabSyncer) Init

func (g *GitLabSyncer) Init() bool

func (*GitLabSyncer) Sync

func (g *GitLabSyncer) Sync() ([]userv1.Group, error)

func (*GitLabSyncer) Validate

func (g *GitLabSyncer) Validate() error

type GitLabTokenType added in v0.0.25

type GitLabTokenType string
const (
	JobGitLabTokenType      GitLabTokenType = "job"
	PersonalGitLabTokenType GitLabTokenType = "personal"
	OAuthGitLabTokenType    GitLabTokenType = "oauth"
)

type GroupSyncMgr

type GroupSyncMgr struct {
	GroupSyncers []GroupSyncer
	GroupSync    *redhatcopv1alpha1.GroupSync
}

func GetGroupSyncMgr

func GetGroupSyncMgr(groupSync *redhatcopv1alpha1.GroupSync, reconcilerBase util.ReconcilerBase) (GroupSyncMgr, error)

func (*GroupSyncMgr) SetDefaults

func (m *GroupSyncMgr) SetDefaults() bool

func (*GroupSyncMgr) Validate

func (m *GroupSyncMgr) Validate() error

type GroupSyncer

type GroupSyncer interface {
	GetProviderName() string
	Init() bool
	Bind() error
	Sync() ([]userv1.Group, error)
	Validate() error
	GetPrune() bool
}

type KeycloakSyncer

type KeycloakSyncer struct {
	Name               string
	GroupSync          *redhatcopv1alpha1.GroupSync
	Provider           *redhatcopv1alpha1.KeycloakProvider
	GoCloak            *gocloak.GoCloak
	Context            context.Context
	URL                *url.URL
	Token              *gocloak.JWT
	CachedGroups       map[string]*gocloak.Group
	CachedGroupMembers map[string][]*gocloak.User
	ReconcilerBase     util.ReconcilerBase
	CredentialsSecret  *corev1.Secret
	CaCertificate      []byte
}

func (*KeycloakSyncer) Bind

func (k *KeycloakSyncer) Bind() error

func (*KeycloakSyncer) GetProviderName

func (k *KeycloakSyncer) GetProviderName() string

func (*KeycloakSyncer) GetPrune added in v0.0.16

func (k *KeycloakSyncer) GetPrune() bool

func (*KeycloakSyncer) Init

func (k *KeycloakSyncer) Init() bool

func (*KeycloakSyncer) Sync

func (k *KeycloakSyncer) Sync() ([]userv1.Group, error)

func (*KeycloakSyncer) Validate

func (k *KeycloakSyncer) Validate() error

type LdapSyncer

type LdapSyncer struct {
	Name              string
	GroupSync         *redhatcopv1alpha1.GroupSync
	Provider          *redhatcopv1alpha1.LdapProvider
	ReconcilerBase    util.ReconcilerBase
	Context           context.Context
	CredentialsSecret *corev1.Secret
	URL               *url.URL
	CaCertificate     []byte
	CaCertificateFile string
	Whitelist         []string
	Blacklist         []string
	Syncer            *syncgroups.LDAPGroupSyncer
}

func (*LdapSyncer) Bind

func (l *LdapSyncer) Bind() error

func (*LdapSyncer) CreateErrorHandler

func (l *LdapSyncer) CreateErrorHandler() syncerror.Handler

CreateErrorHandler creates an error handler for the LDAP sync job

func (*LdapSyncer) GetBlacklist

func (l *LdapSyncer) GetBlacklist() []string

func (*LdapSyncer) GetGroupNameMappings

func (l *LdapSyncer) GetGroupNameMappings() map[string]string

func (*LdapSyncer) GetProviderName

func (l *LdapSyncer) GetProviderName() string

func (*LdapSyncer) GetPrune added in v0.0.16

func (l *LdapSyncer) GetPrune() bool

func (*LdapSyncer) GetWhitelist

func (l *LdapSyncer) GetWhitelist() []string

func (*LdapSyncer) Init

func (l *LdapSyncer) Init() bool

func (*LdapSyncer) Sync

func (l *LdapSyncer) Sync() ([]userv1.Group, error)

func (*LdapSyncer) Validate

func (l *LdapSyncer) Validate() error

type OktaSyncer

type OktaSyncer struct {
	GroupSync      *v1alpha1.GroupSync
	Name           string
	Provider       *v1alpha1.OktaProvider
	ReconcilerBase util.ReconcilerBase
	// contains filtered or unexported fields
}

func (*OktaSyncer) Bind

func (o *OktaSyncer) Bind() error

func (*OktaSyncer) GetProviderName

func (o *OktaSyncer) GetProviderName() string

func (*OktaSyncer) GetPrune added in v0.0.16

func (o *OktaSyncer) GetPrune() bool

func (*OktaSyncer) Init

func (o *OktaSyncer) Init() bool

func (*OktaSyncer) Sync

func (o *OktaSyncer) Sync() ([]userv1.Group, error)

func (*OktaSyncer) Validate

func (o *OktaSyncer) Validate() error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL