Documentation
¶
Index ¶
- Constants
- func SafeDNS1123Name(fullOriginalName string) (string, bool, string)
- type Credentials
- type DexAuthenticator
- type DexAuthenticatorSecret
- type DexCA
- type DexClient
- type DexClientSecret
- type DexGroup
- type DexGroupMember
- type DexGroupSpec
- type DexGroupStatus
- type DexProvider
- type DexProviderBitbucketForCheck
- type DexProviderCheck
- type DexProviderCheckPhase
- type DexProviderCheckSpec
- type DexProviderCheckStatus
- type DexProviderCheckStepStatus
- type DexProviderCrowdForCheck
- type DexProviderForCheck
- type DexProviderForCheckSpec
- type DexProviderGithubForCheck
- type DexProviderGitlabForCheck
- type DexProviderLDAPForCheck
- type DexProviderLDAPKerberosForCheck
- type DexProviderOIDCForCheck
- type DexProviderSAMLForCheck
- type DexUser
- type DexUserExpire
- type DexUserInternalValues
- type DexUserLock
- type DexUserLockReason
- type DexUserSpec
- type DexUserStatus
- type KubernetesSecret
- type KubernetesServicePort
- type OfflineSessionSnapshot
- type Password
- type PublishAPICert
- type PublishAPIConfig
- type RefreshTokenSnapshot
- type UserOperation
- type UserOperationLockSpec
- type UserOperationResetPasswordSpec
- type UserOperationSpec
- type UserOperationSpecType
- type UserOperationStatus
- type UserOperationStatusPhase
- type UserOperationTarget
Constants ¶
const ( // DexProviderCheckPhasePending is written the moment the hook picks a check // up, before the (potentially slow) connectivity probes run. It lets the // console distinguish "the operator created a check and the controller has // acknowledged it, work is in progress" from "nothing has touched it yet". DexProviderCheckPhasePending = DexProviderCheckPhase("Pending") DexProviderCheckPhaseSucceeded = DexProviderCheckPhase("Succeeded") DexProviderCheckPhaseFailed = DexProviderCheckPhase("Failed") )
const ( PasswordPolicyLockout = DexUserLockReason("PasswordPolicyLockout") LockedByAdministrator = DexUserLockReason("LockedByAdministrator") )
const ( UserOperationTypeResetPass = UserOperationSpecType("ResetPassword") UserOperationTypeReset2FA = UserOperationSpecType("Reset2FA") UserOperationTypeLock = UserOperationSpecType("Lock") UserOperationTypeUnlock = UserOperationSpecType("Unlock") )
const ( UserOperationStatusPhaseSucceeded = UserOperationStatusPhase("Succeeded") UserOperationStatusPhaseFailed = UserOperationStatusPhase("Failed") )
const (
PasswordAnnotationLockedByAdministrator = "deckhouse.io/locked-by-administrator"
)
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Credentials ¶
type DexAuthenticator ¶
type DexAuthenticator struct {
ID string `json:"uuid"`
EncodedName string `json:"encodedName"`
Name string `json:"name"`
Namespace string `json:"namespace"`
Spec map[string]interface{} `json:"spec"`
AllowAccessToKubernetes bool `json:"allowAccessToKubernetes"`
Credentials Credentials `json:"credentials"`
// AllowAccessToKubernetesAnnotation carries the raw annotation value from the filter,
// which has no logger, to the hook body, which does. It is nil when the annotation is
// absent, and json:"-" keeps it out of the internal values the templates read.
AllowAccessToKubernetesAnnotation *string `json:"-"`
}
type DexAuthenticatorSecret ¶
type DexAuthenticatorSecret struct {
ID string `json:"uuid"`
Name string `json:"name"`
Namespace string `json:"namespace"`
Credentials Credentials `json:"credentials"`
}
type DexClient ¶
type DexClient struct {
ID string `json:"id"`
EncodedID string `json:"encodedID"`
Name string `json:"name"`
Namespace string `json:"namespace"`
Spec map[string]interface{} `json:"spec"`
Secret string `json:"clientSecret"`
// LegacyID and LegacyEncodedID is formatted with a colons delimiter which is impossible to use as a
// basic auth credentials part
LegacyID string `json:"legacyID"`
LegacyEncodedID string `json:"legacyEncodedID"`
Labels map[string]string `json:"labels"`
Annotations map[string]string `json:"annotations"`
AllowAccessToKubernetes bool `json:"allowAccessToKubernetes"`
// AllowAccessToKubernetesAnnotation carries the raw annotation value from the filter,
// which has no logger, to the hook body, which does. It is nil when the annotation is
// absent, and json:"-" keeps it out of the internal values the templates read.
AllowAccessToKubernetesAnnotation *string `json:"-"`
}
type DexClientSecret ¶
type DexGroup ¶ added in v1.48.0
type DexGroup struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
Spec DexGroupSpec `json:"spec"`
Status DexGroupStatus `json:"status,omitempty"`
}
type DexGroupMember ¶ added in v1.48.0
type DexGroupSpec ¶ added in v1.48.0
type DexGroupSpec struct {
Name string `json:"name"`
Members []DexGroupMember `json:"members" yaml:"members"`
}
type DexGroupStatus ¶ added in v1.48.0
type DexProvider ¶
type DexProvider map[string]interface{}
type DexProviderBitbucketForCheck ¶ added in v1.77.0
type DexProviderCheck ¶ added in v1.77.0
type DexProviderCheck struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
Spec DexProviderCheckSpec `json:"spec"`
Status DexProviderCheckStatus `json:"status"`
}
type DexProviderCheckPhase ¶ added in v1.77.0
type DexProviderCheckPhase string
type DexProviderCheckSpec ¶ added in v1.77.0
type DexProviderCheckStatus ¶ added in v1.77.0
type DexProviderCheckStatus struct {
Phase DexProviderCheckPhase `json:"phase"`
Message string `json:"message,omitempty"`
ObservedDexProviderGeneration int64 `json:"observedDexProviderGeneration,omitempty"`
Checks []DexProviderCheckStepStatus `json:"checks,omitempty"`
CompletedAt *metav1.Time `json:"completedAt,omitempty"`
}
type DexProviderCheckStepStatus ¶ added in v1.77.0
type DexProviderCrowdForCheck ¶ added in v1.77.0
type DexProviderForCheck ¶ added in v1.77.0
type DexProviderForCheck struct {
metav1.ObjectMeta `json:"metadata,omitempty"`
Spec DexProviderForCheckSpec `json:"spec"`
}
type DexProviderForCheckSpec ¶ added in v1.77.0
type DexProviderForCheckSpec struct {
Enabled *bool `json:"enabled,omitempty"`
Type string `json:"type"`
Github *DexProviderGithubForCheck `json:"github,omitempty"`
Gitlab *DexProviderGitlabForCheck `json:"gitlab,omitempty"`
BitbucketCloud *DexProviderBitbucketForCheck `json:"bitbucketCloud,omitempty"`
Crowd *DexProviderCrowdForCheck `json:"crowd,omitempty"`
OIDC *DexProviderOIDCForCheck `json:"oidc,omitempty"`
LDAP *DexProviderLDAPForCheck `json:"ldap,omitempty"`
SAML *DexProviderSAMLForCheck `json:"saml,omitempty"`
}
type DexProviderGithubForCheck ¶ added in v1.77.0
type DexProviderGitlabForCheck ¶ added in v1.77.0
type DexProviderLDAPForCheck ¶ added in v1.77.0
type DexProviderLDAPForCheck struct {
Host string `json:"host"`
InsecureNoSSL bool `json:"insecureNoSSL,omitempty"`
StartTLS bool `json:"startTLS,omitempty"`
RootCAData string `json:"rootCAData,omitempty"`
InsecureSkipVerify bool `json:"insecureSkipVerify,omitempty"`
BindDN string `json:"bindDN,omitempty"`
BindPW string `json:"bindPW,omitempty"`
Kerberos *DexProviderLDAPKerberosForCheck `json:"kerberos,omitempty"`
}
type DexProviderLDAPKerberosForCheck ¶ added in v1.77.0
type DexProviderOIDCForCheck ¶ added in v1.77.0
type DexProviderSAMLForCheck ¶ added in v1.77.0
type DexUser ¶
type DexUser struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
Spec DexUserSpec `json:"spec"`
Status DexUserStatus `json:"status,omitempty"`
}
type DexUserExpire ¶
type DexUserInternalValues ¶ added in v1.48.0
type DexUserInternalValues struct {
Name string `json:"name"`
EncodedName string `json:"encodedName"`
Spec DexUserSpec `json:"spec"`
Status DexUserStatus `json:"status,omitempty"`
ExpireAt string `json:"-"`
}
type DexUserLock ¶ added in v1.72.1
type DexUserLock struct {
State bool `json:"state"`
Reason *DexUserLockReason `json:"reason,omitempty"`
Message *string `json:"message,omitempty"`
Until *string `json:"until,omitempty"`
}
type DexUserLockReason ¶ added in v1.72.1
type DexUserLockReason string
type DexUserSpec ¶ added in v1.48.0
type DexUserStatus ¶ added in v1.48.0
type DexUserStatus struct {
ExpireAt string `json:"expireAt,omitempty"`
Lock DexUserLock `json:"lock"`
}
type KubernetesSecret ¶
type KubernetesSecret []byte
type KubernetesServicePort ¶
type KubernetesServicePort intstr.IntOrString
type OfflineSessionSnapshot ¶ added in v1.75.0
type OfflineSessionSnapshot struct {
Name string `json:"name"`
Namespace string `json:"namespace"`
UserID string `json:"userID"`
ConnID string `json:"connID,omitempty"`
Email string `json:"email,omitempty"`
LockedUntil *metav1.Time `json:"lockedUntil,omitempty"`
RefreshTokenIDs []string `json:"refreshTokenIDs,omitempty"`
}
OfflineSessionSnapshot is a minimal representation of Dex OfflineSessions object used by this hook. We intentionally keep it flexible: different Dex versions/storages may store user identity differently, and OfflineSessions may not have userID at all but contain refresh token references.
type Password ¶ added in v1.72.1
type Password struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
Username string `json:"username"`
Email string `json:"email"`
UserID string `json:"userID"`
Hash string `json:"hash"`
HashUpdatedAt string `json:"hashUpdatedAt,omitempty"`
PreviousHashes []string `json:"previousHashes,omitempty"`
IncorrectPasswordLoginAttempts int `json:"incorrectPasswordLoginAttempts,omitempty"`
Groups []string `json:"groups,omitempty"`
RequireResetHashOnNextSuccLogin bool `json:"requireResetHashOnNextSuccLogin"`
LockedUntil *time.Time `json:"lockedUntil"`
}
type PublishAPICert ¶
type PublishAPIConfig ¶ added in v1.77.0
type RefreshTokenSnapshot ¶ added in v1.75.0
type RefreshTokenSnapshot struct {
Name string `json:"name"`
Namespace string `json:"namespace"`
ClaimsUserID string `json:"claimsUserID,omitempty"`
ClaimsUsername string `json:"claimsUsername,omitempty"`
ClaimsPreferred string `json:"claimsPreferredUsername,omitempty"`
}
RefreshTokenSnapshot is a minimal representation of Dex RefreshToken object used by this hook.
type UserOperation ¶ added in v1.75.0
type UserOperation struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
Spec UserOperationSpec `json:"spec"`
Status UserOperationStatus `json:"status"`
// FilterError carries the error produced by applyUserOperationFilter when
// the raw object could not be decoded into this struct. It is NOT part of
// the CRD: it travels only inside the hook snapshot (hence a plain json tag
// so it survives the snapshot round-trip) so getUserOperations can mark this
// specific object Failed with the exact reason instead of silently dropping
// it — all without the FilterFunc ever returning an error and locking the
// queue. It never reaches the API: status patches send only the status field.
FilterError string `json:"filterError,omitempty"`
}
type UserOperationLockSpec ¶ added in v1.75.0
type UserOperationLockSpec struct {
// For is either a Go-style duration string accepted by time.ParseDuration
// (e.g. "30m", "1h", "2h30m"), or the sentinel userOperationLockForever
// ("permanent") for an indefinite lock. We use a plain string rather than
// metav1.Duration so the sentinel can travel through (un)marshalling
// without colliding with time.ParseDuration's grammar.
For string `json:"for"`
}
type UserOperationResetPasswordSpec ¶ added in v1.75.0
type UserOperationResetPasswordSpec struct {
NewPasswordHash string `json:"newPasswordHash"`
}
type UserOperationSpec ¶ added in v1.75.0
type UserOperationSpec struct {
User string `json:"user,omitempty"`
Target *UserOperationTarget `json:"target,omitempty"`
Type UserOperationSpecType `json:"type"`
InitiatorType string `json:"initiatorType"`
ResetPassword *UserOperationResetPasswordSpec `json:"resetPassword,omitempty"`
Lock *UserOperationLockSpec `json:"lock,omitempty"`
}
type UserOperationSpecType ¶ added in v1.75.0
type UserOperationSpecType string
type UserOperationStatus ¶ added in v1.75.0
type UserOperationStatus struct {
Phase UserOperationStatusPhase `json:"phase"`
Message string `json:"message,omitempty"`
CompletedAt *metav1.Time `json:"completedAt"`
}
type UserOperationStatusPhase ¶ added in v1.75.0
type UserOperationStatusPhase string
type UserOperationTarget ¶ added in v1.77.0
type UserOperationTarget struct {
ConnectorID string `json:"connectorID"`
Email string `json:"email"`
}
UserOperationTarget identifies an external (non-local) user managed by an authentication provider such as LDAP or Atlassian Crowd. It is mutually exclusive with UserOperationSpec.User and is used by the Lock / Unlock operations against the OfflineSessions object that holds the failed-attempt counter and the lock state for the corresponding (connectorID, email) pair.
Source Files
¶
- alert_on_deprecated_dex_provider_tls.go
- alert_on_long_id_token_ttl.go
- delete_crowd_basic_auth_proxy.go
- discover_apiserver_endpoints.go
- discover_dex_ca.go
- discover_dex_cluster_ip.go
- discover_enabled_publish_api.go
- discover_publish_api_cert.go
- ensure_external_crds.go
- expire_dex_user_crds.go
- generate_basic_auth_proxy_cert.go
- generate_kubeconfig_encoded_names.go
- generate_kubernetes_dex_client_app_secret.go
- generate_selfsigned_ca.go
- get_dex_authenticator_crds.go
- get_dex_client_crds.go
- get_dex_provider_check_crds.go
- get_dex_providers_crds.go
- get_dex_user_crds.go
- get_dex_user_operation_crds.go
- order_dex_tls_certificate.go