Help us shape the future of Go! Take the 2026 Go Developer Survey

identityprovider

package
v0.4.19 Latest Latest
Warning

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

Go to latest
Published: Oct 2, 2026 License: Apache-2.0 Imports: 25 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ExternalClientIDEnv         = "BASEHARBOR_EXTERNAL_OIDC_CLIENT_ID"
	ExternalClientSecretFileEnv = "BASEHARBOR_EXTERNAL_OIDC_CLIENT_SECRET_FILE"
	ExternalCAFileEnv           = "BASEHARBOR_EXTERNAL_OIDC_CA_FILE"
)
View Source
const (
	KeycloakImage   = "quay.io/keycloak/keycloak:26.7.4"
	KeycloakService = "keycloak"
)

Variables

This section is empty.

Functions

func DestroyAllSharedKeycloakAt

func DestroyAllSharedKeycloakAt(ctx context.Context, runtime KeycloakRuntime, dataDir, namespace string) error

func FetchDiscovery

func FetchDiscovery(ctx context.Context, client *http.Client, issuer string) (application.IdentityDiscovery, error)

func FetchDiscoveryAt

func FetchDiscoveryAt(ctx context.Context, client *http.Client, endpointIssuer, expectedIssuer string) (application.IdentityDiscovery, error)

func FinalizeManagedOperatorOIDC

func FinalizeManagedOperatorOIDC(ctx context.Context, runtime KeycloakRuntime, issuer serviceaccess.Issuer, dataDir, namespace, target, environment string) error

func KeycloakManagementSurfaces

func KeycloakManagementSurfaces(app application.Manifest, dataDir, namespace string) ([]application.ManagementUISurface, error)

func SetKeycloakCanonicalURL

func SetKeycloakCanonicalURL(files KeycloakFiles, canonicalURL string) error

Types

type ExternalDriver

type ExternalDriver struct {
	// contains filtered or unexported fields
}

func NewExternalDriver

func NewExternalDriver(app application.Manifest, files application.RuntimeFiles, issuer string) (*ExternalDriver, error)

func (*ExternalDriver) Bind

func (*ExternalDriver) Descriptor

func (d *ExternalDriver) Descriptor() capability.Provider

func (*ExternalDriver) Preflight

func (d *ExternalDriver) Preflight(ctx context.Context, resource capability.Resource, binding capability.Binding) error

func (*ExternalDriver) Provision

func (*ExternalDriver) Verify

type KeycloakDriver

type KeycloakDriver struct {
	// contains filtered or unexported fields
}

func NewKeycloakDriver

func NewKeycloakDriver(runtime KeycloakRuntime, app application.Manifest, appFiles application.RuntimeFiles, issuer serviceaccess.Issuer, dataDir, namespace string) *KeycloakDriver

func NewKeycloakDriverWithRealization added in v0.4.19

func NewKeycloakDriverWithRealization(realization KeycloakRealization, app application.Manifest, appFiles application.RuntimeFiles) *KeycloakDriver

func (*KeycloakDriver) Bind

func (*KeycloakDriver) Descriptor

func (d *KeycloakDriver) Descriptor() capability.Provider

func (*KeycloakDriver) DestroyApplication

func (d *KeycloakDriver) DestroyApplication(ctx context.Context) error

func (*KeycloakDriver) IntegrationDescriptor

func (d *KeycloakDriver) IntegrationDescriptor() capability.IntegrationDescriptor

func (*KeycloakDriver) Preflight

func (d *KeycloakDriver) Preflight(_ context.Context, resource capability.Resource, binding capability.Binding) error

func (*KeycloakDriver) Provision

func (d *KeycloakDriver) Provision(ctx context.Context, resource capability.Resource, binding capability.Binding) error

func (*KeycloakDriver) SetApplicationOrigins

func (d *KeycloakDriver) SetApplicationOrigins(origins []string) error

func (*KeycloakDriver) Verify

func (*KeycloakDriver) VerifyExisting

func (d *KeycloakDriver) VerifyExisting(ctx context.Context, binding capability.Binding, origins []string) error

type KeycloakFiles

type KeycloakFiles struct {
	Dir                string
	Compose            string
	Env                string
	Project            string
	ConsumerNetwork    string
	InternalNetwork    string
	PublicPort         int
	AdminPort          int
	PublicURL          string
	CanonicalPublicURL string
	AdminURL           string
	PublicAccess       serviceaccess.HTTPGatewayFiles
	AdminAccess        serviceaccess.HTTPGatewayFiles
}

func EnsureKeycloakFilesAt

func EnsureKeycloakFilesAt(ctx context.Context, app application.Manifest, issuer serviceaccess.Issuer, dataDir, namespace string) (KeycloakFiles, error)

func ExistingKeycloakFiles

func ExistingKeycloakFiles(app application.Manifest) (KeycloakFiles, error)

func ExistingKeycloakFilesAt

func ExistingKeycloakFilesAt(app application.Manifest, dataDir, namespace string) (KeycloakFiles, error)

type KeycloakInstance added in v0.4.19

type KeycloakInstance struct {
	StateDir         string
	EndpointBaseURL  string
	PublicBaseURL    string
	WorkloadBaseURL  string
	TrustBundle      []byte
	PublicHTTPClient *http.Client
	AdminHTTPClient  *http.Client
	AdminUsername    string
	AdminPassword    string
}

KeycloakInstance is the runtime-neutral control surface consumed by the identity Core. Runtime-native deployment identity remains inside the realization that produced this instance.

type KeycloakLifecycle added in v0.4.19

type KeycloakLifecycle interface {
	Validate(context.Context, KeycloakFiles) error
	Apply(context.Context, KeycloakFiles) error
	Destroy(context.Context, KeycloakFiles) error
}

KeycloakLifecycle is the provider-realization boundary consumed by identity semantics. It deliberately avoids Compose/project lifecycle vocabulary.

func NewKeycloakLifecycle added in v0.4.19

func NewKeycloakLifecycle(runtime KeycloakRuntime) KeycloakLifecycle

type KeycloakRealization added in v0.4.19

type KeycloakRealization interface {
	Apply(context.Context) (KeycloakInstance, error)
	Existing(context.Context) (KeycloakInstance, error)
	Destroy(context.Context) error
}

KeycloakRealization is the deployment/runtime boundary for the managed Keycloak reference provider. Adding Kubernetes/OpenShift/cloud realizations must not require changes to Keycloak identity semantics.

type KeycloakRuntime

type KeycloakRuntime interface {
	ConfigProject(context.Context, string, string, string) error
	UpProject(context.Context, string, string, string) error
	DestroyProject(context.Context, string, string, string) error
}

KeycloakRuntime is the legacy local-runtime realization used by the current Docker/Podman reference implementation.

type ManagedOperatorOIDC

type ManagedOperatorOIDC struct {
	Issuer       string
	ClientID     string
	CallbackPort int
}

func EnsureManagedDevelopmentAccess

func EnsureManagedDevelopmentAccess(ctx context.Context, runtime KeycloakRuntime, issuer serviceaccess.Issuer, dataDir, namespace, target, username, password string) (ManagedOperatorOIDC, error)

func EnsureManagedOperatorOIDC

func EnsureManagedOperatorOIDC(ctx context.Context, runtime KeycloakRuntime, issuer serviceaccess.Issuer, dataDir, namespace, target, environment string) (ManagedOperatorOIDC, error)

Jump to

Keyboard shortcuts

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