upstreamwatchers

package
v0.37.2 Latest Latest
Warning

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

Go to latest
Published: Dec 17, 2021 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

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 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 UpstreamGenericLDAPGroupSearch interface {
	Base() string
	Filter() string
	GroupNameAttribute() string
}

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 UpstreamGenericLDAPStatus interface {
	Conditions() []v1alpha1.Condition
}

type UpstreamGenericLDAPUserSearch added in v0.37.0

type UpstreamGenericLDAPUserSearch interface {
	Base() string
	Filter() string
	UsernameAttribute() string
	UIDAttribute() string
}

type ValidatedSettings added in v0.37.0

type ValidatedSettings struct {
	Generation                int64
	BindSecretResourceVersion string
	LDAPConnectionProtocol    upstreamldap.LDAPConnectionProtocol
	UserSearchBase            string
	GroupSearchBase           string
}

Jump to

Keyboard shortcuts

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