Help us shape the future of Go! Take the 2026 Go Developer Survey

syncer

package
v0.0.13 Latest Latest
Warning

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

Go to latest
Published: Sep 2, 2021 License: Apache-2.0 Imports: 41 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

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            *msgraph.GraphServiceRequestBuilder
	ReconcilerBase    util.ReconcilerBase
	CredentialsSecret *corev1.Secret
	CachedGroups      map[string]*msgraph.Group
	CachedGroupUsers  map[string][]*msgraph.User
	Context           context.Context
}

func (*AzureSyncer) Bind

func (a *AzureSyncer) Bind() error

func (*AzureSyncer) GetProviderName

func (a *AzureSyncer) GetProviderName() string

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
	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) 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
	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) 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 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
}

type KeycloakSyncer

type KeycloakSyncer struct {
	Name               string
	GroupSync          *redhatcopv1alpha1.GroupSync
	Provider           *redhatcopv1alpha1.KeycloakProvider
	GoCloak            gocloak.GoCloak
	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) 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
	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) 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) 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