Documentation ¶
Index ¶
- Constants
- func EvaluateConditions(conditions GradatedConditions, config *upstreamldap.ProviderConfig) (provider.UpstreamLDAPIdentityProviderI, bool)
- func TestConnection(ctx context.Context, bindSecretName string, ...) *v1alpha1.Condition
- func ValidateSecret(secretInformer corev1informers.SecretInformer, secretName string, ...) (*v1alpha1.Condition, string)
- func ValidateTLSConfig(tlsSpec *v1alpha1.TLSSpec, config *upstreamldap.ProviderConfig) *v1alpha1.Condition
- type GradatedCondition
- type GradatedConditions
- type SecretVersionCache
- type SecretVersionCacheI
- type UpstreamGenericLDAPGroupSearch
- type UpstreamGenericLDAPIDP
- type UpstreamGenericLDAPSpec
- type UpstreamGenericLDAPStatus
- type UpstreamGenericLDAPUserSearch
- type ValidatedSettings
Constants ¶
View Source
const ( ReasonNotFound = "SecretNotFound" ReasonWrongType = "SecretWrongType" ReasonMissingKeys = "SecretMissingKeys" ReasonSuccess = "Success" ReasonInvalidTLSConfig = "InvalidTLSConfig" ErrNoCertificates = constable.Error("no certificates found") LDAPBindAccountSecretType = corev1.SecretTypeBasicAuth TypeSearchBaseFound = "SearchBaseFound" ReasonUsingConfigurationFromSpec = "UsingConfigurationFromSpec" ReasonErrorFetchingSearchBase = "ErrorFetchingSearchBase" )
Variables ¶
This section is empty.
Functions ¶
func EvaluateConditions ¶ added in v0.37.0
func EvaluateConditions(conditions GradatedConditions, config *upstreamldap.ProviderConfig) (provider.UpstreamLDAPIdentityProviderI, bool)
func TestConnection ¶ added in v0.37.0
func TestConnection( ctx context.Context, bindSecretName string, config *upstreamldap.ProviderConfig, currentSecretVersion string, ) *v1alpha1.Condition
func ValidateSecret ¶ added in v0.37.0
func ValidateSecret(secretInformer corev1informers.SecretInformer, secretName string, secretNamespace string, config *upstreamldap.ProviderConfig) (*v1alpha1.Condition, string)
func ValidateTLSConfig ¶ added in v0.37.0
func ValidateTLSConfig(tlsSpec *v1alpha1.TLSSpec, config *upstreamldap.ProviderConfig) *v1alpha1.Condition
Types ¶
type GradatedCondition ¶ added in v0.37.0
type GradatedCondition struct {
// contains filtered or unexported fields
}
A condition and a boolean that tells you whether it's fatal or just a warning.
type GradatedConditions ¶ added in v0.37.0
type GradatedConditions struct {
// contains filtered or unexported fields
}
func ValidateGenericLDAP ¶ added in v0.37.0
func ValidateGenericLDAP(ctx context.Context, upstream UpstreamGenericLDAPIDP, secretInformer corev1informers.SecretInformer, validatedSecretVersionsCache SecretVersionCacheI, config *upstreamldap.ProviderConfig) GradatedConditions
func (*GradatedConditions) Append ¶ added in v0.37.0
func (g *GradatedConditions) Append(condition *v1alpha1.Condition, isFatal bool)
func (*GradatedConditions) Conditions ¶ added in v0.37.0
func (g *GradatedConditions) Conditions() []*v1alpha1.Condition
type SecretVersionCache ¶ added in v0.37.0
type SecretVersionCache struct {
ValidatedSettingsByName map[string]ValidatedSettings
}
func (*SecretVersionCache) Get ¶ added in v0.37.0
func (s *SecretVersionCache) Get(upstreamName, resourceVersion string, generation int64) (ValidatedSettings, bool)
func (*SecretVersionCache) Set ¶ added in v0.37.0
func (s *SecretVersionCache) Set(upstreamName, resourceVersion string, generation int64, settings ValidatedSettings)
type SecretVersionCacheI ¶ added in v0.37.0
type SecretVersionCacheI interface { Get(upstreamName, resourceVersion string, generation int64) (ValidatedSettings, bool) Set(upstreamName, resourceVersion string, generation int64, settings ValidatedSettings) }
An in-memory cache with an entry for each ActiveDirectoryIdentityProvider, to keep track of which ResourceVersion of the bind Secret, which TLS/StartTLS setting was used and which search base was found during the most recent successful validation.
func NewSecretVersionCache ¶ added in v0.37.0
func NewSecretVersionCache() SecretVersionCacheI
type UpstreamGenericLDAPGroupSearch ¶ added in v0.37.0
type UpstreamGenericLDAPIDP ¶ added in v0.37.0
type UpstreamGenericLDAPIDP interface { Spec() UpstreamGenericLDAPSpec Name() string Namespace() string Generation() int64 Status() UpstreamGenericLDAPStatus }
read only interface for sharing between ldap and active directory.
type UpstreamGenericLDAPSpec ¶ added in v0.37.0
type UpstreamGenericLDAPSpec interface { Host() string TLSSpec() *v1alpha1.TLSSpec BindSecretName() string UserSearch() UpstreamGenericLDAPUserSearch GroupSearch() UpstreamGenericLDAPGroupSearch DetectAndSetSearchBase(ctx context.Context, config *upstreamldap.ProviderConfig) *v1alpha1.Condition }
type UpstreamGenericLDAPStatus ¶ added in v0.37.0
type UpstreamGenericLDAPUserSearch ¶ added in v0.37.0
type ValidatedSettings ¶ added in v0.37.0
type ValidatedSettings struct { Generation int64 BindSecretResourceVersion string LDAPConnectionProtocol upstreamldap.LDAPConnectionProtocol UserSearchBase string GroupSearchBase string }
Click to show internal directories.
Click to hide internal directories.