Documentation ¶
Index ¶
- Constants
- Variables
- func NewCmdPrune(name, fullName string, f kcmdutil.Factory, streams genericclioptions.IOStreams) *cobra.Command
- func NewCmdSync(name, fullName string, f kcmdutil.Factory, streams genericclioptions.IOStreams) *cobra.Command
- func ValidateSource(source GroupSyncSource) bool
- type ADBuilder
- func (b *ADBuilder) GetGroupDetector() (interfaces.LDAPGroupDetector, error)
- func (b *ADBuilder) GetGroupLister() (interfaces.LDAPGroupLister, error)
- func (b *ADBuilder) GetGroupMemberExtractor() (interfaces.LDAPMemberExtractor, error)
- func (b *ADBuilder) GetGroupNameMapper() (interfaces.LDAPGroupNameMapper, error)
- func (b *ADBuilder) GetUserNameMapper() (interfaces.LDAPUserNameMapper, error)
- type AugmentedADBuilder
- func (b *AugmentedADBuilder) GetGroupDetector() (interfaces.LDAPGroupDetector, error)
- func (b *AugmentedADBuilder) GetGroupLister() (interfaces.LDAPGroupLister, error)
- func (b *AugmentedADBuilder) GetGroupMemberExtractor() (interfaces.LDAPMemberExtractor, error)
- func (b *AugmentedADBuilder) GetGroupNameMapper() (interfaces.LDAPGroupNameMapper, error)
- func (b *AugmentedADBuilder) GetUserNameMapper() (interfaces.LDAPUserNameMapper, error)
- type GroupNameRestrictions
- type GroupSyncSource
- type MappedNameRestrictions
- type OpenShiftGroupNameRestrictions
- type PruneBuilder
- type PruneOptions
- func (o *PruneOptions) Complete(f kcmdutil.Factory, cmd *cobra.Command, args []string) error
- func (o *PruneOptions) GetBlacklist() []string
- func (o *PruneOptions) GetClient() userv1typedclient.GroupInterface
- func (o *PruneOptions) GetGroupNameMappings() map[string]string
- func (o *PruneOptions) GetWhitelist() []string
- func (o *PruneOptions) Run() error
- func (o *PruneOptions) Validate() error
- type RFC2307Builder
- func (b *RFC2307Builder) GetGroupDetector() (interfaces.LDAPGroupDetector, error)
- func (b *RFC2307Builder) GetGroupLister() (interfaces.LDAPGroupLister, error)
- func (b *RFC2307Builder) GetGroupMemberExtractor() (interfaces.LDAPMemberExtractor, error)
- func (b *RFC2307Builder) GetGroupNameMapper() (interfaces.LDAPGroupNameMapper, error)
- func (b *RFC2307Builder) GetUserNameMapper() (interfaces.LDAPUserNameMapper, error)
- type SyncBuilder
- type SyncOptions
- func (o *SyncOptions) Complete(f kcmdutil.Factory, args []string) error
- func (o *SyncOptions) CreateErrorHandler() syncerror.Handler
- func (o *SyncOptions) GetBlacklist() []string
- func (o *SyncOptions) GetClient() userv1typedclient.GroupInterface
- func (o *SyncOptions) GetGroupNameMappings() map[string]string
- func (o *SyncOptions) GetWhitelist() []string
- func (o *SyncOptions) Run() error
- func (o *SyncOptions) Validate() error
Constants ¶
const PruneRecommendedName = "prune"
const SyncRecommendedName = "sync"
Variables ¶
var AllowedSourceTypes = []string{string(GroupSyncSourceLDAP), string(GroupSyncSourceOpenShift)}
Functions ¶
func NewCmdPrune ¶
func NewCmdSync ¶
func ValidateSource ¶
func ValidateSource(source GroupSyncSource) bool
Types ¶
type ADBuilder ¶
type ADBuilder struct { ClientConfig ldapclient.Config Config *config.ActiveDirectoryConfig // contains filtered or unexported fields }
func (*ADBuilder) GetGroupDetector ¶
func (b *ADBuilder) GetGroupDetector() (interfaces.LDAPGroupDetector, error)
func (*ADBuilder) GetGroupLister ¶
func (b *ADBuilder) GetGroupLister() (interfaces.LDAPGroupLister, error)
func (*ADBuilder) GetGroupMemberExtractor ¶
func (b *ADBuilder) GetGroupMemberExtractor() (interfaces.LDAPMemberExtractor, error)
func (*ADBuilder) GetGroupNameMapper ¶
func (b *ADBuilder) GetGroupNameMapper() (interfaces.LDAPGroupNameMapper, error)
func (*ADBuilder) GetUserNameMapper ¶
func (b *ADBuilder) GetUserNameMapper() (interfaces.LDAPUserNameMapper, error)
type AugmentedADBuilder ¶
type AugmentedADBuilder struct { ClientConfig ldapclient.Config Config *config.AugmentedActiveDirectoryConfig // contains filtered or unexported fields }
func (*AugmentedADBuilder) GetGroupDetector ¶
func (b *AugmentedADBuilder) GetGroupDetector() (interfaces.LDAPGroupDetector, error)
func (*AugmentedADBuilder) GetGroupLister ¶
func (b *AugmentedADBuilder) GetGroupLister() (interfaces.LDAPGroupLister, error)
func (*AugmentedADBuilder) GetGroupMemberExtractor ¶
func (b *AugmentedADBuilder) GetGroupMemberExtractor() (interfaces.LDAPMemberExtractor, error)
func (*AugmentedADBuilder) GetGroupNameMapper ¶
func (b *AugmentedADBuilder) GetGroupNameMapper() (interfaces.LDAPGroupNameMapper, error)
func (*AugmentedADBuilder) GetUserNameMapper ¶
func (b *AugmentedADBuilder) GetUserNameMapper() (interfaces.LDAPUserNameMapper, error)
type GroupNameRestrictions ¶
GroupNameRestrictions desribes an object that holds blacklists and whitelists
type GroupSyncSource ¶
type GroupSyncSource string
GroupSyncSource determines the source of the groups to be synced
const ( // GroupSyncSourceLDAP determines that the groups to be synced are determined from an LDAP record GroupSyncSourceLDAP GroupSyncSource = "ldap" // GroupSyncSourceOpenShift determines that the groups to be synced are determined from OpenShift records GroupSyncSourceOpenShift GroupSyncSource = "openshift" )
type MappedNameRestrictions ¶
MappedNameRestrictions describes an object that holds user name mappings for a group sync job
type OpenShiftGroupNameRestrictions ¶
type OpenShiftGroupNameRestrictions interface { GroupNameRestrictions GetClient() userv1client.GroupInterface }
OpenShiftGroupNameRestrictions describes an object that holds blacklists and whitelists as well as a client that can retrieve OpenShift groups to satisfy those lists
type PruneBuilder ¶
type PruneBuilder interface { GetGroupLister() (interfaces.LDAPGroupLister, error) GetGroupNameMapper() (interfaces.LDAPGroupNameMapper, error) GetGroupDetector() (interfaces.LDAPGroupDetector, error) }
PruneBuilder describes an object that can build all the schema-specific parts of an LDAPGroupPruner
type PruneOptions ¶
type PruneOptions struct { // Config is the LDAP sync config read from file Config *config.LDAPSyncConfig ConfigFile string // Whitelist are the names of OpenShift group or LDAP group UIDs to use for syncing Whitelist []string WhitelistFile string // Blacklist are the names of OpenShift group or LDAP group UIDs to exclude Blacklist []string BlacklistFile string // Confirm determines whether or not to write to OpenShift Confirm bool // GroupClient is the interface used to interact with OpenShift Group objects GroupClient userv1typedclient.GroupsGetter genericclioptions.IOStreams }
func NewPruneOptions ¶
func NewPruneOptions(streams genericclioptions.IOStreams) *PruneOptions
func (*PruneOptions) GetBlacklist ¶
func (o *PruneOptions) GetBlacklist() []string
func (*PruneOptions) GetClient ¶
func (o *PruneOptions) GetClient() userv1typedclient.GroupInterface
func (*PruneOptions) GetGroupNameMappings ¶
func (o *PruneOptions) GetGroupNameMappings() map[string]string
func (*PruneOptions) GetWhitelist ¶
func (o *PruneOptions) GetWhitelist() []string
func (*PruneOptions) Run ¶
func (o *PruneOptions) Run() error
Run creates the GroupSyncer specified and runs it to sync groups the arguments are only here because its the only way to get the printer we need
func (*PruneOptions) Validate ¶
func (o *PruneOptions) Validate() error
type RFC2307Builder ¶
type RFC2307Builder struct { ClientConfig ldapclient.Config Config *config.RFC2307Config ErrorHandler syncerror.Handler // contains filtered or unexported fields }
func (*RFC2307Builder) GetGroupDetector ¶
func (b *RFC2307Builder) GetGroupDetector() (interfaces.LDAPGroupDetector, error)
func (*RFC2307Builder) GetGroupLister ¶
func (b *RFC2307Builder) GetGroupLister() (interfaces.LDAPGroupLister, error)
func (*RFC2307Builder) GetGroupMemberExtractor ¶
func (b *RFC2307Builder) GetGroupMemberExtractor() (interfaces.LDAPMemberExtractor, error)
func (*RFC2307Builder) GetGroupNameMapper ¶
func (b *RFC2307Builder) GetGroupNameMapper() (interfaces.LDAPGroupNameMapper, error)
func (*RFC2307Builder) GetUserNameMapper ¶
func (b *RFC2307Builder) GetUserNameMapper() (interfaces.LDAPUserNameMapper, error)
type SyncBuilder ¶
type SyncBuilder interface { GetGroupLister() (interfaces.LDAPGroupLister, error) GetGroupNameMapper() (interfaces.LDAPGroupNameMapper, error) GetUserNameMapper() (interfaces.LDAPUserNameMapper, error) GetGroupMemberExtractor() (interfaces.LDAPMemberExtractor, error) }
SyncBuilder describes an object that can build all the schema-specific parts of an LDAPGroupSyncer
type SyncOptions ¶
type SyncOptions struct { PrintFlags *genericclioptions.PrintFlags Printer printers.ResourcePrinter // Source determines the source of the list of groups to sync Source GroupSyncSource // Config is the LDAP sync config read from file Config *config.LDAPSyncConfig ConfigFile string // Whitelist are the names of OpenShift group or LDAP group UIDs to use for syncing Whitelist []string WhitelistFile string // Blacklist are the names of OpenShift group or LDAP group UIDs to exclude Blacklist []string BlacklistFile string Type string // Confirm determines whether or not to write to OpenShift Confirm bool // GroupClient is the interface used to interact with OpenShift Group objects GroupClient userv1typedclient.GroupsGetter genericclioptions.IOStreams }
func NewSyncOptions ¶
func NewSyncOptions(streams genericclioptions.IOStreams) *SyncOptions
func (*SyncOptions) Complete ¶
func (o *SyncOptions) Complete(f kcmdutil.Factory, args []string) error
func (*SyncOptions) CreateErrorHandler ¶
func (o *SyncOptions) CreateErrorHandler() syncerror.Handler
CreateErrorHandler creates an error handler for the LDAP sync job
func (*SyncOptions) GetBlacklist ¶
func (o *SyncOptions) GetBlacklist() []string
func (*SyncOptions) GetClient ¶
func (o *SyncOptions) GetClient() userv1typedclient.GroupInterface
func (*SyncOptions) GetGroupNameMappings ¶
func (o *SyncOptions) GetGroupNameMappings() map[string]string
func (*SyncOptions) GetWhitelist ¶
func (o *SyncOptions) GetWhitelist() []string
func (*SyncOptions) Run ¶
func (o *SyncOptions) Run() error
Run creates the GroupSyncer specified and runs it to sync groups the arguments are only here because its the only way to get the printer we need
func (*SyncOptions) Validate ¶
func (o *SyncOptions) Validate() error