hooks

package
v1.76.16 Latest Latest
Warning

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

Go to latest
Published: Oct 22, 2026 License: Apache-2.0 Imports: 41 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const (
	PasswordPolicyLockout = DexUserLockReason("PasswordPolicyLockout")
	LockedByAdministrator = DexUserLockReason("LockedByAdministrator")
)
View Source
const (
	UserOperationTypeResetPass = UserOperationSpecType("ResetPassword")
	UserOperationTypeReset2FA  = UserOperationSpecType("Reset2FA")
	UserOperationTypeLock      = UserOperationSpecType("Lock")
	UserOperationTypeUnlock    = UserOperationSpecType("Unlock")
)
View Source
const (
	UserOperationStatusPhaseSucceeded = UserOperationStatusPhase("Succeeded")
	UserOperationStatusPhaseFailed    = UserOperationStatusPhase("Failed")
)
View Source
const (
	PasswordAnnotationLockedByAdministrator = "deckhouse.io/locked-by-administrator"
)

Variables

This section is empty.

Functions

func SafeDNS1123Name added in v1.73.0

func SafeDNS1123Name(fullOriginalName string) (string, bool, string)

SafeDNS1123Name normalizes and truncates name to DNS-1123 and length <=63. If truncation happens, "-<hash5>" is appended, where hash5 is first 5 hex of sha256(original).

Types

type Credentials

type Credentials struct {
	CookieSecret string `json:"cookieSecret"`
	AppDexSecret string `json:"appDexSecret"`
}

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"`
}

type DexAuthenticatorSecret

type DexAuthenticatorSecret struct {
	ID          string      `json:"uuid"`
	Name        string      `json:"name"`
	Namespace   string      `json:"namespace"`
	Credentials Credentials `json:"credentials"`
}

type DexCA

type DexCA struct {
	Name string `json:"name"`
	Data []byte `json:"data"`
}

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"`
}

type DexClientSecret

type DexClientSecret struct {
	ID        string `json:"id"`
	Name      string `json:"name"`
	Namespace string `json:"namespace"`
	Secret    []byte `json:"spec"`
}

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 DexGroupMember struct {
	Kind string `json:"kind" yaml:"kind"`
	Name string `json:"name" yaml:"name"`
}

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 DexGroupStatus struct {
	Errors []struct {
		Message   string `json:"message"`
		ObjectRef struct {
			Kind string `json:"kind"`
			Name string `json:"name"`
		} `json:"objectRef"`
	} `json:"errors,omitempty"`
}

type DexProvider

type DexProvider map[string]interface{}

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 DexUserExpire struct {
	Name     string    `json:"name"`
	ExpireAt time.Time `json:"expireAt"`

	CheckExpire bool `json:"-"`
}

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 DexUserSpec struct {
	Email    string   `json:"email"`
	Password string   `json:"password"`
	UserID   string   `json:"userID,omitempty"`
	Groups   []string `json:"groups,omitempty"`
	TTL      string   `json:"ttl,omitempty"`
}

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"`
	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"`
	Hash                            string     `json:"hash"`
	RequireResetHashOnNextSuccLogin bool       `json:"requireResetHashOnNextSuccLogin"`
	LockedUntil                     *time.Time `json:"lockedUntil"`
}

type PublishAPICert

type PublishAPICert struct {
	Name string `json:"name"`
	Data []byte `json:"data"`
}

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"`
}

type UserOperationLockSpec added in v1.75.0

type UserOperationLockSpec struct {
	For metav1.Duration `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"`
	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

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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