Documentation
¶
Index ¶
- Constants
- func DetermineLDAPFilter(filter string) (string, error)
- func DetermineLDAPHost(hostport string, scheme Scheme) (string, error)
- func GetAttributeValue(entry *ldap.Entry, attributes []string) string
- func IsEntryNotFoundError(err error) bool
- func IsNoSuchObjectError(err error) bool
- func IsQueryOutOfBoundsError(err error) bool
- func NewEntryNotFoundError(baseDN, filter string) error
- func NewLDAPClientConfig(URL, bindDN, bindPassword, CA string, insecure bool) (ldapclient.Config, error)
- func NewNoSuchObjectError(baseDN string) error
- func NewQueryOutOfBoundsError(queryDN, baseDN string) error
- func QueryForEntries(clientConfig ldapclient.Config, query *ldap.SearchRequest) ([]*ldap.Entry, error)
- func QueryForUniqueEntry(clientConfig ldapclient.Config, query *ldap.SearchRequest) (*ldap.Entry, error)
- func SplitLDAPQuery(query string) (attributes, scope, filter, extensions string, err error)
- type DefaultLDAPUserIdentityFactory
- type DerefAliases
- type LDAPQuery
- type LDAPQueryOnAttribute
- type LDAPURL
- type LDAPUserAttributeDefiner
- func (d *LDAPUserAttributeDefiner) AllAttributes() sets.String
- func (d *LDAPUserAttributeDefiner) Email(user *ldap.Entry) string
- func (d *LDAPUserAttributeDefiner) ID(user *ldap.Entry) string
- func (d *LDAPUserAttributeDefiner) Name(user *ldap.Entry) string
- func (d *LDAPUserAttributeDefiner) PreferredUsername(user *ldap.Entry) string
- type LDAPUserIdentityFactory
- type Scheme
- type Scope
Constants ¶
const ( // LDAPHostLabel is the Label value that stores the host of the LDAP server // TODO: we don't store port here because labels don't allow for colons. We might want to add this back // with a different separator LDAPHostLabel string = "openshift.io/ldap.host" // LDAPURLAnnotation is the Annotation value that stores the host:port of the LDAP server LDAPURLAnnotation string = "openshift.io/ldap.url" // LDAPUIDAnnotation is the Annotation value that stores the corresponding LDAP group UID for the Group LDAPUIDAnnotation string = "openshift.io/ldap.uid" // LDAPSyncTime is the Annotation value that stores the last time this Group was synced with LDAP LDAPSyncTimeAnnotation string = "openshift.io/ldap.sync-time" )
These constants contain values for annotations and labels affixed to Groups by the LDAP sync job
const ( DerefAliasesNever = ldap.NeverDerefAliases DerefAliasesSearching = ldap.DerefInSearching DerefAliasesFinding = ldap.DerefFindingBaseObj DerefAliasesAlways = ldap.DerefAlways )
Variables ¶
This section is empty.
Functions ¶
func DetermineLDAPFilter ¶
DetermineLDAPFilter determines the LDAP search filter. Filter is a valid LDAP filter Default to "(objectClass=*)" per RFC
func DetermineLDAPHost ¶
DetermineLDAPHost determines the host and port for the LDAP connection. The default host is localhost; the default port for scheme "ldap" is 389, for "ldaps" is 686
func GetAttributeValue ¶ added in v1.0.7
GetAttributeValue finds the first attribute of those given that the LDAP entry has, and returns it. GetAttributeValue is able to query the DN as well as Attributes of the LDAP entry. If no value is found, the empty string is returned.
func IsNoSuchObjectError ¶ added in v1.1.1
IsNoSuchObjectError determines if the error is a NoSuchObjectError or if it is the upstream version of the error If this returns true, you are *not* safe to cast the error to a NoSuchObjectError
func NewEntryNotFoundError ¶ added in v1.1.1
func NewLDAPClientConfig ¶
func NewLDAPClientConfig(URL, bindDN, bindPassword, CA string, insecure bool) (ldapclient.Config, error)
NewLDAPClientConfig returns a new LDAP client config
func NewQueryOutOfBoundsError ¶ added in v1.1.1
func QueryForEntries ¶ added in v1.0.7
func QueryForEntries(clientConfig ldapclient.Config, query *ldap.SearchRequest) ([]*