config

package
v0.9.7 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Cedar added in v0.3.0

type Cedar struct {
	// PolicyPath is the path to Cedar policy files
	PolicyPath string
}

Cedar configuration

type ClientData

type ClientData struct {
	// SigningKeyIDFilePath is the file containing the key ID for the signing key.
	// The key itself is expected in the same directory as <keyID>.pem.
	// The loading is based on the internal/signing package.
	// The signing itself is based on github.com/openkcm/common-sdk/pkg/auth.
	SigningKeyIDFilePath string `yaml:"signingKeyIDFilePath"`
}

ClientData configuration

type Config

type Config struct {
	commoncfg.BaseConfig `mapstructure:",squash"`

	// gRPC server configuration
	GRPCServer GRPCServer `yaml:"grpcServer"`

	// Cedar configuration
	Cedar Cedar `yaml:"cedar"`

	// Client Certificate handling
	MTLS MTLS `yaml:"mtls"`

	// JWT Token handling
	JWT JWT `yaml:"jwt"`

	// ClientData configuration
	ClientData ClientData `yaml:"clientData"`

	// Session cache configuration (optional)
	SessionCache SessionCache `yaml:"sessionCache"`
}

type GRPCServer

type GRPCServer struct {
	commoncfg.GRPCServer `mapstructure:",squash"`

	// also embed client attributes for the gRPC health check client
	Client commoncfg.GRPCClient
}

GRPCServer server configuration

type JWT

type JWT struct {
	// IssuerClaimKeys configures the JWT issuer keys
	IssuerClaimKeys []string `yaml:"issuerClaimKeys" default:"['iss']"`

	// Define providers as k8s custom resources
	// Deprecated: use Providers and ProviderSource instead
	K8sProviders K8sProviders `yaml:"k8sProviders"`

	// A list of static JWT providers
	Providers []Provider `yaml:"providers"`

	// An optional gRPC source to dynamically lookup JWT providers
	ProviderSource commoncfg.GRPCClient `yaml:"providerSource"`

	// HTTP client configuration for interacting with OIDC providers
	HTTPClient commoncfg.HTTPClient `yaml:"httpClient"`
}

type K8sProviders deprecated

type K8sProviders struct {
	Enabled    bool   `yaml:"enabled" default:"true"`
	APIGroup   string `yaml:"apiGroup" default:"gateway.extensions.envoyproxy.io"`
	APIVersion string `yaml:"apoVersion" default:"v1alpha1"`
	Name       string `yaml:"name" default:"jwtproviders"`
	Namespace  string `yaml:"namespace" default:"default"`
}

Deprecated: use Providers and ProviderSource instead

type MTLS

type MTLS struct {
	// TrustedSubjectsYaml is a path to a YAML file holding a list of
	// trusted client certificate subjects and their respective regions.
	TrustedSubjectsYaml string
}

type Provider added in v0.5.0

type Provider struct {
	Issuer    string   `yaml:"issuer"`
	JwksURI   string   `yaml:"jwksURI"`
	Audiences []string `yaml:"audiences"`
}

type SessionCache added in v0.5.0

type SessionCache struct {
	Enabled       bool   `yaml:"enabled"`
	Valkey        Valkey `yaml:"valkey"`
	CMKPathPrefix string `yaml:"cmkPathPrefix"`
}

type Valkey added in v0.5.0

type Valkey struct {
	Address   commoncfg.SourceRef `yaml:"address"`
	User      commoncfg.SourceRef `yaml:"user"`
	Password  commoncfg.SourceRef `yaml:"password"`
	Prefix    string              `yaml:"prefix"`
	SecretRef commoncfg.SecretRef `yaml:"secretRef"`
}

Jump to

Keyboard shortcuts

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