Documentation
¶
Index ¶
Constants ¶
View Source
const ConsoleModeStandalone = "standalone"
ConsoleModeStandalone is the only deployment mode implemented today; platform (cloud portal) mode is future work tracked in Console ADR 0004.
View Source
const Name = "zitadel/backend/v3/instrumentation/tracing"
Variables ¶
This section is empty.
Functions ¶
func NewCommand ¶
Types ¶
type Config ¶
type Config struct {
Server ServerConfig `mapstructure:"server"`
Database database.Config `mapstructure:"database"`
PasswordHasher crypto.HashConfig `mapstructure:"password_hasher"`
Schema SchemaConfig `mapstructure:"schema"`
Session service.SessionConfig `mapstructure:"session"`
Instrumentation instrumentation.Config `mapstructure:"instrumentation"`
Platform PlatformConfig `mapstructure:"platform"`
}
type MasterKeyConfig ¶
type MasterKeyConfig struct {
// File is the path to a file which contains the RSA private key in either a
// JWK or a PEM file.
//
// Not required when PrivateKey is provided.
// When PrivateKey is provided, File is ignored.
File string `mapstructure:"file"`
// UseForEncryption indicates whether this key should be used for
// encryption. Exactly one key must be marked for encryption, otherwise the
// application won't start.
UseForEncryption bool `mapstructure:"use_for_encryption"`
// PrivateKey is the RSA private key used to decrypt wrapped data.
// It may be provided as PEM (including OpenSSH) or as a private JWK.
PrivateKey string `mapstructure:"private_key"`
}
type PlatformConfig ¶
type PlatformConfig struct {
// ProjectID pins a standalone deployment's default project to an existing
// project (an id of the form "proj_<...>"). When empty (the default), the
// deployment tracks its first-created project — the one the customer's
// `zitadel setup` creates. The server never creates that project itself; a
// configured id that does not exist is a startup error. Leave empty when
// BootstrapProject is set — the platform project's id is server-owned
// (domain.PlatformProjectID), not operator-authored. (#605)
ProjectID string `mapstructure:"project_id"`
// BootstrapProject, when true, ensures the well-known platform project
// (domain.PlatformProjectID) exists at startup (idempotent insert) and
// resolves it as the default. Off by default: no environment gets a
// platform project created silently. Needs no ProjectID. (#605)
BootstrapProject bool `mapstructure:"bootstrap_project"`
}
PlatformConfig configures the deployment's default project resolution (Console ADR 0004). Portal-related keys (billing, support access) are intentionally absent until platform mode is implemented; this deployment always reports mode "standalone" for now.
func (PlatformConfig) ResolvedProjectID ¶
func (c PlatformConfig) ResolvedProjectID() string
ResolvedProjectID is the id the deployment pins its default project to: the built-in platform id when bootstrapping, else the operator's pin.
func (PlatformConfig) Validate ¶
func (c PlatformConfig) Validate() error
type SchemaConfig ¶
type ServerConfig ¶
type ServerConfig struct {
Address string `mapstructure:"address"`
// DataDir is the local runtime root used by zero-config server defaults.
// When unset, it defaults to a nextgen-data directory next to the binary.
DataDir string `mapstructure:"data_dir"`
// MasterKeys is a collection of master keys used by the application to wrap
// the key encryption key (KEK) of every project. The KEKs themselves are
// created by the application and stored encrypted in the database.
//
// This is a collection to enable master key rotation. Multiple keys can be
// provided but only one should be marked to be used for encryption. Once
// multiple keys are provided, all wrapped KEKs will be re-encrypted using
// the master key marked to use for encryption.
//
// If no master keys are provided, a default master key is created in the
// master key directory. If there are no keys specified in the config but
// files exist in the master key directory, the newest file is used for
// encryption.
MasterKeys map[string]*MasterKeyConfig `mapstructure:"master_keys"`
ConsoleEnabled bool `mapstructure:"console_enabled"`
ConsolePath string `mapstructure:"console_path"`
LoginEnabled bool `mapstructure:"login_enabled"`
LoginPath string `mapstructure:"login_path"`
}
type SessionConfig ¶
type ShutdownFunc ¶
type ShutdownFuncs ¶
type ShutdownFuncs struct {
// contains filtered or unexported fields
}
func (*ShutdownFuncs) Add ¶
func (sfs *ShutdownFuncs) Add(sf ShutdownFunc)
Click to show internal directories.
Click to hide internal directories.