Documentation
¶
Index ¶
- Constants
- func DestroyAllSharedKeycloakAt(ctx context.Context, runtime KeycloakRuntime, dataDir, namespace string) error
- func EnsureCoreIdentity(ctx context.Context, runtime KeycloakRuntime, issuer serviceaccess.Issuer, ...) (string, error)
- func FetchDiscovery(ctx context.Context, client *http.Client, issuer string) (application.IdentityDiscovery, error)
- func FetchDiscoveryAt(ctx context.Context, client *http.Client, ...) (application.IdentityDiscovery, error)
- func FinalizeManagedOperatorOIDC(ctx context.Context, runtime KeycloakRuntime, issuer serviceaccess.Issuer, ...) error
- func KeycloakManagementSurfaces(app application.Manifest, dataDir, namespace string) ([]application.ManagementUISurface, error)
- func RefreshCoreIdentitySQLTrust(dataDir, namespace string, core bhruntime.Files) error
- func SetKeycloakCanonicalURL(files KeycloakFiles, canonicalURL string) error
- func VerifyCoreIdentity(ctx context.Context, dataDir, namespace, installationID, expectedIssuer string) error
- func VerifyCoreOperatorTokenFlow(ctx context.Context, dataDir, namespace, installationID, issuer string) error
- type ExternalDriver
- func (d *ExternalDriver) Bind(ctx context.Context, _ capability.Resource, _ capability.Binding) error
- func (d *ExternalDriver) Descriptor() capability.Provider
- func (d *ExternalDriver) Preflight(ctx context.Context, resource capability.Resource, binding capability.Binding) error
- func (d *ExternalDriver) Provision(context.Context, capability.Resource, capability.Binding) error
- func (d *ExternalDriver) Verify(ctx context.Context, _ capability.Resource, _ capability.Binding) error
- type KeycloakDriver
- func (d *KeycloakDriver) Bind(ctx context.Context, _ capability.Resource, _ capability.Binding) error
- func (d *KeycloakDriver) Descriptor() capability.Provider
- func (d *KeycloakDriver) DestroyApplication(ctx context.Context) error
- func (d *KeycloakDriver) IntegrationDescriptor() capability.IntegrationDescriptor
- func (d *KeycloakDriver) Preflight(_ context.Context, resource capability.Resource, binding capability.Binding) error
- func (d *KeycloakDriver) Provision(ctx context.Context, resource capability.Resource, binding capability.Binding) error
- func (d *KeycloakDriver) RotateAdminCredential(ctx context.Context) error
- func (d *KeycloakDriver) RotateClientSecret(ctx context.Context) error
- func (d *KeycloakDriver) RotatePKI(ctx context.Context) error
- func (d *KeycloakDriver) RotateSigningKey(ctx context.Context) error
- func (d *KeycloakDriver) SetApplicationOrigins(origins []string) error
- func (d *KeycloakDriver) Verify(ctx context.Context, _ capability.Resource, binding capability.Binding) error
- func (d *KeycloakDriver) VerifyExisting(ctx context.Context, binding capability.Binding, origins []string) error
- type KeycloakFiles
- func EnsureKeycloakFilesAt(ctx context.Context, app application.Manifest, issuer serviceaccess.Issuer, ...) (KeycloakFiles, error)
- func ExistingCoreRuntimeFiles(dataDir, namespace string) (KeycloakFiles, error)
- func ExistingKeycloakFiles(app application.Manifest) (KeycloakFiles, error)
- func ExistingKeycloakFilesAt(app application.Manifest, dataDir, namespace string) (KeycloakFiles, error)
- type KeycloakInstance
- type KeycloakLifecycle
- type KeycloakRealization
- type KeycloakRuntime
- type ManagedOperatorOIDC
Constants ¶
const ( ExternalClientIDEnv = "BASEHARBOR_EXTERNAL_OIDC_CLIENT_ID" ExternalClientSecretFileEnv = "BASEHARBOR_EXTERNAL_OIDC_CLIENT_SECRET_FILE" ExternalCAFileEnv = "BASEHARBOR_EXTERNAL_OIDC_CA_FILE" )
const ( // Match the release catalog's immutable OCI index on both native engines. KeycloakImage = "quay.io/keycloak/keycloak:26.8.0@sha256:b0f60d489d51c5d113390bdf5461d4c06e6051be026c05549f2e1e10ec352bcc" KeycloakService = "keycloak" )
Variables ¶
This section is empty.
Functions ¶
func DestroyAllSharedKeycloakAt ¶
func DestroyAllSharedKeycloakAt(ctx context.Context, runtime KeycloakRuntime, dataDir, namespace string) error
func EnsureCoreIdentity ¶ added in v0.4.23
func EnsureCoreIdentity(ctx context.Context, runtime KeycloakRuntime, issuer serviceaccess.Issuer, dataDir, namespace, installationID string, ha ...bool) (string, error)
EnsureCoreIdentity realizes installation Identity through the existing native provider. No Application, repository, workload binding or login is required. Application placement preferences do not redefine this installation scope.
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 RefreshCoreIdentitySQLTrust ¶ added in v0.4.24
RefreshCoreIdentitySQLTrust updates only the existing installation-owned SQL trust projection. It does not create a realm, database, provider or topology. Write in place: existing bind mounts must see both overlap and retirement.
func SetKeycloakCanonicalURL ¶
func SetKeycloakCanonicalURL(files KeycloakFiles, canonicalURL string) error
func VerifyCoreIdentity ¶ added in v0.4.23
func VerifyCoreOperatorTokenFlow ¶ added in v0.4.24
func VerifyCoreOperatorTokenFlow(ctx context.Context, dataDir, namespace, installationID, issuer string) error
VerifyCoreOperatorTokenFlow performs a real OAuth password grant against the installation-owned Keycloak admin identity and requires an authenticated Admin REST response over provisioned TLS. Built-in admin-cli uses lightweight tokens, which Keycloak 26.7 rejects at UserInfo. The Core realm, ownership and OIDC discovery are verified independently before this token exercise.
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 (d *ExternalDriver) Bind(ctx context.Context, _ capability.Resource, _ capability.Binding) error
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 (d *ExternalDriver) Provision(context.Context, capability.Resource, capability.Binding) error
func (*ExternalDriver) Verify ¶
func (d *ExternalDriver) Verify(ctx context.Context, _ capability.Resource, _ capability.Binding) error
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 (d *KeycloakDriver) Bind(ctx context.Context, _ capability.Resource, _ capability.Binding) error
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) RotateAdminCredential ¶ added in v0.4.21
func (d *KeycloakDriver) RotateAdminCredential(ctx context.Context) error
func (*KeycloakDriver) RotateClientSecret ¶ added in v0.4.21
func (d *KeycloakDriver) RotateClientSecret(ctx context.Context) error
func (*KeycloakDriver) RotatePKI ¶ added in v0.4.21
func (d *KeycloakDriver) RotatePKI(ctx context.Context) error
func (*KeycloakDriver) RotateSigningKey ¶ added in v0.4.21
func (d *KeycloakDriver) RotateSigningKey(ctx context.Context) error
RotateSigningKey performs overlap-safe realm signing-key rotation. The new key is published passively before it becomes active. The old key remains in JWKS and continues to verify old tokens until replacement signing has been observed and cryptographically verified.
func (*KeycloakDriver) SetApplicationOrigins ¶
func (d *KeycloakDriver) SetApplicationOrigins(origins []string) error
func (*KeycloakDriver) Verify ¶
func (d *KeycloakDriver) Verify(ctx context.Context, _ capability.Resource, binding capability.Binding) error
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 ExistingCoreRuntimeFiles ¶ added in v0.4.24
func ExistingCoreRuntimeFiles(dataDir, namespace string) (KeycloakFiles, error)
ExistingCoreRuntimeFiles resolves the installation-owned Keycloak Compose and backing SQL without regenerating secrets or changing provider topology.
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 ¶
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)
Source Files
¶
- core.go
- core_token_verify.go
- discovery.go
- external.go
- keycloak_admin.go
- keycloak_admin_credential_rotation.go
- keycloak_admin_readiness.go
- keycloak_bootstrap.go
- keycloak_client_secret_policy.go
- keycloak_core_sql.go
- keycloak_driver.go
- keycloak_files.go
- keycloak_ha.go
- keycloak_realization.go
- keycloak_realm_convergence.go
- keycloak_secret_rotation.go
- keycloak_secret_rotation_driver.go
- keycloak_signing_keys.go
- keycloak_signing_rotation_driver.go
- keycloak_single.go
- management_ui.go
- operator.go