idp

package
v0.14.0 Latest Latest
Warning

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

Go to latest
Published: Aug 1, 2025 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// CredentialsSecretName is the standard name for dex-operator credentials
	CredentialsSecretName = "dex-operator-credentials"
	// SelfRenewalAnnotation marks when self-renewal was performed
	SelfRenewalAnnotation = "dex-operator.giantswarm.io/last-self-renewal"
)

Variables

View Source
var (
	AppInfo = prometheus.NewGaugeVec(
		prometheus.GaugeOpts{
			Namespace: metricNamespace,
			Subsystem: metricSubsystem,
			Name:      "secret_expiry_time",
			Help:      "Gives secret expiry time for all dex app registrations.",
		},
		infoLabels,
	)
)

Gauge for secret expiry time

Functions

func GetDefaultDexConfigSecret added in v0.4.0

func GetDefaultDexConfigSecret(name string, namespace string) *corev1.Secret

func GetIssuerAddress added in v0.3.2

func GetIssuerAddress(baseDomain string, managementClusterIssuerAddress string, managementClusterBaseDomain string) string

func GetVintageDexSecretConfig added in v0.4.0

func GetVintageDexSecretConfig(namespace string) v1alpha1.AppExtraConfig

func IsInvalidConfig

func IsInvalidConfig(err error) bool

IsInvalidcConfig asserts invalidConfigError.

Types

type Config

type Config struct {
	Client                         client.Client
	Log                            logr.Logger
	App                            *v1alpha1.App
	Providers                      []provider.Provider
	ManagementClusterBaseDomain    string
	ManagementClusterName          string
	ManagementClusterIssuerAddress string
}

type CredentialsConfig added in v0.14.0

type CredentialsConfig struct {
	Providers []ProviderConfig `yaml:",inline"`
}

CredentialsConfig represents the structure of the credentials YAML

type ProviderConfig added in v0.14.0

type ProviderConfig struct {
	Name        string            `yaml:"name"`
	Owner       string            `yaml:"owner"`
	Credentials map[string]string `yaml:"credentials"`
	Description string            `yaml:"description,omitempty"`
}

ProviderConfig represents a single provider's configuration in the credentials

type ProviderCredentialUpdate added in v0.14.0

type ProviderCredentialUpdate struct {
	ProviderName string
	Credentials  map[string]string
}

type Service

type Service struct {
	client.Client
	// contains filtered or unexported fields
}

func New

func New(c Config) (*Service, error)

func (*Service) CheckAndRotateServiceCredentials added in v0.14.0

func (s *Service) CheckAndRotateServiceCredentials(ctx context.Context) error

CheckAndRotateServiceCredentials checks if any providers need credential rotation and performs it

func (*Service) CreateOrUpdateProviderApps

func (s *Service) CreateOrUpdateProviderApps(appConfig provider.AppConfig, ctx context.Context, oldConnectors map[string]dex.Connector) (dex.DexConfig, error)

func (*Service) DeleteProviderApps

func (s *Service) DeleteProviderApps(appName string, ctx context.Context) error

func (*Service) GetAppConfig

func (s *Service) GetAppConfig(ctx context.Context) (provider.AppConfig, error)

func (*Service) Reconcile

func (s *Service) Reconcile(ctx context.Context) error

func (*Service) ReconcileDelete

func (s *Service) ReconcileDelete(ctx context.Context) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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