config

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: Jul 11, 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 ClientData

type ClientData struct {
	// PublicKeyAddress is the address, which provides the public key used to
	// validate the client data signature.
	PublicKeyAddress string
	// SigningKeyRefreshIntervalS is the interval in seconds to refresh the signing key.
	SigningKeyRefreshIntervalS int64
	// WithRegion will include the client certificate region
	WithRegion bool
	// WithType will include the type of user
	WithType bool
}

ClientData defines the information passed as header to consuming backend services. It is based on github.com/openkcm/common-sdk/pkg/auth.

type Config

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

	// gRPC server configuration
	GRPCServer GRPCServer

	// PolicyPath is the path to Cedar policy files
	PolicyPath string

	// Client Certificate handling
	MTLS MTLS

	// JWT Token handling
	JWT JWT

	// Client data handling
	ClientData ClientData
}

type GRPCServer

type GRPCServer struct {
	commoncfg.GRPCServer `mapstructure:",squash"`
	// also embed client attributes for the gRPC health check client
	ClientAttributes commoncfg.GRPCClientAttributes
}

gRPC server configuration

type JWT

type JWT struct {
	// OperationMode configures the JWT validation according to the
	// JWT provider. One of default, sapias
	OperationMode JWTOperationMode

	// Define providers as k8s custom resources
	K8sProviders K8sProviders
}

type JWTOperationMode

type JWTOperationMode string
const (
	JWTOperationModeDefault JWTOperationMode = "default"
	JWTOperationModeSapias  JWTOperationMode = "sapias"
)

type K8sProviders

type K8sProviders struct {
	APIGroup  string
	Name      string
	Namespace string
}

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
}

Jump to

Keyboard shortcuts

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