config

package
v1.45.3 Latest Latest
Warning

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

Go to latest
Published: Sep 1, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Database_Driver_name = map[int32]string{
		0: "DRIVER_UNSPECIFIED",
		1: "DRIVER_POSTGRES",
		2: "DRIVER_YUGABYTE",
	}
	Database_Driver_value = map[string]int32{
		"DRIVER_UNSPECIFIED": 0,
		"DRIVER_POSTGRES":    1,
		"DRIVER_YUGABYTE":    2,
	}
)

Enum value maps for Database_Driver.

View Source
var (
	Database_SslMode_name = map[int32]string{
		0: "SSL_MODE_UNSPECIFIED",
		1: "SSL_MODE_DISABLE",
		2: "SSL_MODE_REQUIRE",
		3: "SSL_MODE_VERIFY_CA",
		4: "SSL_MODE_VERIFY_FULL",
	}
	Database_SslMode_value = map[string]int32{
		"SSL_MODE_UNSPECIFIED": 0,
		"SSL_MODE_DISABLE":     1,
		"SSL_MODE_REQUIRE":     2,
		"SSL_MODE_VERIFY_CA":   3,
		"SSL_MODE_VERIFY_FULL": 4,
	}
)

Enum value maps for Database_SslMode.

View Source
var (
	// Bounds the port numerically, which `[0-9]{1,5}` alone would not (it accepts
	// :99999). The host part is optional, so ":5005" means all interfaces; port 0
	// is allowed deliberately, for tests that want a free port.
	//
	// optional bool listen_address = 60001;
	E_ListenAddress = &file_proto_config_rules_proto_extTypes[0]
	// Applied to both AuthConfig.oauth_client.providers and
	// AuthSecrets.oauth_providers, whose keys must agree: one names a provider,
	// the other carries its credentials.
	//
	// optional bool oauth_provider_name = 60002;
	E_OauthProviderName = &file_proto_config_rules_proto_extTypes[1]
)

Extension fields to validate.StringRules.

View Source
var File_proto_config_auth_proto protoreflect.FileDescriptor
View Source
var File_proto_config_common_proto protoreflect.FileDescriptor
View Source
var File_proto_config_dataaccess_proto protoreflect.FileDescriptor
View Source
var File_proto_config_rules_proto protoreflect.FileDescriptor
View Source
var File_proto_config_secrets_proto protoreflect.FileDescriptor

Functions

This section is empty.

Types

type AuthConfig

type AuthConfig struct {

	// Asserted, not just recorded: LabKit ignores a version mismatch when no
	// migration is registered. To roll a version, widen to `in: [1, 2]`, ship the
	// migration, narrow again.
	Version int32 `protobuf:"varint,1,opt,name=version,proto3" json:"version,omitempty"`
	// Relative to this file's directory, so CONFIG_DIR alone reaches every input.
	// Deployed environments use an absolute path because `appConfig` renders only
	// one file into CONFIG_DIR and secrets arrive on a separate mount.
	SecretsFile string    `protobuf:"bytes,2,opt,name=secrets_file,json=secretsFile,proto3" json:"secrets_file,omitempty"`
	Platform    *Platform `protobuf:"bytes,3,opt,name=platform,proto3" json:"platform,omitempty"`
	// Default to ":5004" and ":8084" respectively when omitted.
	GrpcAddress *string `protobuf:"bytes,4,opt,name=grpc_address,json=grpcAddress,proto3,oneof" json:"grpc_address,omitempty"`
	HttpAddress *string `protobuf:"bytes,5,opt,name=http_address,json=httpAddress,proto3,oneof" json:"http_address,omitempty"`
	// Externally reachable base URL, used to build OAuth redirect URIs.
	BaseUrl string       `protobuf:"bytes,6,opt,name=base_url,json=baseUrl,proto3" json:"base_url,omitempty"`
	Oauth   *OauthServer `protobuf:"bytes,7,opt,name=oauth,proto3" json:"oauth,omitempty"`
	// Omitting this block, or leaving `providers` empty, disables third-party
	// sign-in.
	OauthClient *OauthClient `protobuf:"bytes,8,opt,name=oauth_client,json=oauthClient,proto3,oneof" json:"oauth_client,omitempty"`
	// Required, not optional: the legacy loader validated allowed_origins for every
	// service, so leaving this optional would let an auth deployment come up with no
	// origins at all. `required` also propagates the nested min_items rule.
	Cors *Cors `protobuf:"bytes,9,opt,name=cors,proto3" json:"cors,omitempty"`
	// contains filtered or unexported fields
}

AuthConfig is the whole configuration of iam-auth: an OAuth 2.0 / OIDC authorization server (gRPC + HTTP) and an OAuth client for third-party providers. One complete file per environment; there is no layering. The path comes from $CONFIG_DIR/config.yaml, else $CONFIG_PATH, else a committed local profile. Secret material lives in a separate file (see AuthSecrets).

func (*AuthConfig) Descriptor deprecated

func (*AuthConfig) Descriptor() ([]byte, []int)

Deprecated: Use AuthConfig.ProtoReflect.Descriptor instead.

func (*AuthConfig) GetBaseUrl

func (x *AuthConfig) GetBaseUrl() string

func (*AuthConfig) GetCors

func (x *AuthConfig) GetCors() *Cors

func (*AuthConfig) GetGrpcAddress

func (x *AuthConfig) GetGrpcAddress() string

func (*AuthConfig) GetHttpAddress

func (x *AuthConfig) GetHttpAddress() string

func (*AuthConfig) GetOauth

func (x *AuthConfig) GetOauth() *OauthServer

func (*AuthConfig) GetOauthClient

func (x *AuthConfig) GetOauthClient() *OauthClient

func (*AuthConfig) GetPlatform

func (x *AuthConfig) GetPlatform() *Platform

func (*AuthConfig) GetSecretsFile

func (x *AuthConfig) GetSecretsFile() string

func (*AuthConfig) GetVersion

func (x *AuthConfig) GetVersion() int32

func (*AuthConfig) ProtoMessage

func (*AuthConfig) ProtoMessage()

func (*AuthConfig) ProtoReflect

func (x *AuthConfig) ProtoReflect() protoreflect.Message

func (*AuthConfig) Reset

func (x *AuthConfig) Reset()

func (*AuthConfig) String

func (x *AuthConfig) String() string

type AuthSecrets

type AuthSecrets struct {
	Version  int32            `protobuf:"varint,1,opt,name=version,proto3" json:"version,omitempty"`
	Database *DatabaseSecrets `protobuf:"bytes,2,opt,name=database,proto3,oneof" json:"database,omitempty"`
	// The token iam-auth requires of its own callers. Required so the nested
	// min_len rule applies; an absent block would otherwise pass validation and
	// fail later at request time.
	ServiceTokens *ServiceTokens `protobuf:"bytes,3,opt,name=service_tokens,json=serviceTokens,proto3" json:"service_tokens,omitempty"`
	Oauth         *OauthSecrets  `protobuf:"bytes,4,opt,name=oauth,proto3" json:"oauth,omitempty"`
	// Keyed as in AuthConfig.oauth_client.providers.
	OauthProviders map[string]*OauthClientCredentials `` /* 177-byte string literal not displayed */
	// contains filtered or unexported fields
}

func (*AuthSecrets) Descriptor deprecated

func (*AuthSecrets) Descriptor() ([]byte, []int)

Deprecated: Use AuthSecrets.ProtoReflect.Descriptor instead.

func (*AuthSecrets) GetDatabase

func (x *AuthSecrets) GetDatabase() *DatabaseSecrets

func (*AuthSecrets) GetOauth

func (x *AuthSecrets) GetOauth() *OauthSecrets

func (*AuthSecrets) GetOauthProviders

func (x *AuthSecrets) GetOauthProviders() map[string]*OauthClientCredentials

func (*AuthSecrets) GetServiceTokens

func (x *AuthSecrets) GetServiceTokens() *ServiceTokens

func (*AuthSecrets) GetVersion

func (x *AuthSecrets) GetVersion() int32

func (*AuthSecrets) ProtoMessage

func (*AuthSecrets) ProtoMessage()

func (*AuthSecrets) ProtoReflect

func (x *AuthSecrets) ProtoReflect() protoreflect.Message

func (*AuthSecrets) Reset

func (x *AuthSecrets) Reset()

func (*AuthSecrets) String

func (x *AuthSecrets) String() string

type Cors

type Cors struct {
	AllowedOrigins []string `protobuf:"bytes,1,rep,name=allowed_origins,json=allowedOrigins,proto3" json:"allowed_origins,omitempty"`
	// Omitting these defaults them to the methods and headers the handler sends
	// today.
	AllowedMethods   []string `protobuf:"bytes,2,rep,name=allowed_methods,json=allowedMethods,proto3" json:"allowed_methods,omitempty"`
	AllowedHeaders   []string `protobuf:"bytes,3,rep,name=allowed_headers,json=allowedHeaders,proto3" json:"allowed_headers,omitempty"`
	AllowCredentials *bool    `protobuf:"varint,4,opt,name=allow_credentials,json=allowCredentials,proto3,oneof" json:"allow_credentials,omitempty"`
	MaxAge           *int32   `protobuf:"varint,5,opt,name=max_age,json=maxAge,proto3,oneof" json:"max_age,omitempty"` // omitted: 300
	// contains filtered or unexported fields
}

Cors applies to the auth HTTP server. iam-auth is the only service serving browser traffic, so this is not in common.proto.

func (*Cors) Descriptor deprecated

func (*Cors) Descriptor() ([]byte, []int)

Deprecated: Use Cors.ProtoReflect.Descriptor instead.

func (*Cors) GetAllowCredentials

func (x *Cors) GetAllowCredentials() bool

func (*Cors) GetAllowedHeaders

func (x *Cors) GetAllowedHeaders() []string

func (*Cors) GetAllowedMethods

func (x *Cors) GetAllowedMethods() []string

func (*Cors) GetAllowedOrigins

func (x *Cors) GetAllowedOrigins() []string

func (*Cors) GetMaxAge

func (x *Cors) GetMaxAge() int32

func (*Cors) ProtoMessage

func (*Cors) ProtoMessage()

func (*Cors) ProtoReflect

func (x *Cors) ProtoReflect() protoreflect.Message

func (*Cors) Reset

func (x *Cors) Reset()

func (*Cors) String

func (x *Cors) String() string

type DataAccessConfig

type DataAccessConfig struct {

	// See AuthConfig.version.
	Version int32 `protobuf:"varint,1,opt,name=version,proto3" json:"version,omitempty"`
	// See AuthConfig.secrets_file.
	SecretsFile string    `protobuf:"bytes,2,opt,name=secrets_file,json=secretsFile,proto3" json:"secrets_file,omitempty"`
	Platform    *Platform `protobuf:"bytes,3,opt,name=platform,proto3" json:"platform,omitempty"`
	// Defaults to ":5005" when omitted. Must match `containerPort` in
	// .runway/fairway.yaml.
	GrpcAddress *string `protobuf:"bytes,4,opt,name=grpc_address,json=grpcAddress,proto3,oneof" json:"grpc_address,omitempty"`
	// Prometheus scrape endpoint, separate from the gRPC port. Defaults to ":9090"
	// when omitted.
	// Must match `metricPorts` in .runway/fairway.yaml.
	MetricsAddress *string   `protobuf:"bytes,5,opt,name=metrics_address,json=metricsAddress,proto3,oneof" json:"metrics_address,omitempty"`
	Auth           *UserAuth `protobuf:"bytes,6,opt,name=auth,proto3" json:"auth,omitempty"`
	// contains filtered or unexported fields
}

DataAccessConfig is the whole configuration of iam-data-access, which composes the Lookup and Update gRPC APIs behind a single port and two layers of authentication: a shared service token, then a user JWT. Nothing about OAuth is reachable from here — that is iam-auth's schema.

One complete file per environment, resolved as described on AuthConfig. Secret material lives in a separate file (see DataAccessSecrets).

func (*DataAccessConfig) Descriptor deprecated

func (*DataAccessConfig) Descriptor() ([]byte, []int)

Deprecated: Use DataAccessConfig.ProtoReflect.Descriptor instead.

func (*DataAccessConfig) GetAuth

func (x *DataAccessConfig) GetAuth() *UserAuth

func (*DataAccessConfig) GetGrpcAddress

func (x *DataAccessConfig) GetGrpcAddress() string

func (*DataAccessConfig) GetMetricsAddress

func (x *DataAccessConfig) GetMetricsAddress() string

func (*DataAccessConfig) GetPlatform

func (x *DataAccessConfig) GetPlatform() *Platform

func (*DataAccessConfig) GetSecretsFile

func (x *DataAccessConfig) GetSecretsFile() string

func (*DataAccessConfig) GetVersion

func (x *DataAccessConfig) GetVersion() int32

func (*DataAccessConfig) ProtoMessage

func (*DataAccessConfig) ProtoMessage()

func (*DataAccessConfig) ProtoReflect

func (x *DataAccessConfig) ProtoReflect() protoreflect.Message

func (*DataAccessConfig) Reset

func (x *DataAccessConfig) Reset()

func (*DataAccessConfig) String

func (x *DataAccessConfig) String() string

type DataAccessSecrets

type DataAccessSecrets struct {
	Version  int32            `protobuf:"varint,1,opt,name=version,proto3" json:"version,omitempty"`
	Database *DatabaseSecrets `protobuf:"bytes,2,opt,name=database,proto3,oneof" json:"database,omitempty"`
	// The token iam-data-access requires of its own callers. When iam-auth becomes
	// one of those callers it gains a separate client credential; it does not
	// borrow this one. Required — see AuthSecrets.service_tokens.
	ServiceTokens *ServiceTokens `protobuf:"bytes,3,opt,name=service_tokens,json=serviceTokens,proto3" json:"service_tokens,omitempty"`
	// contains filtered or unexported fields
}

func (*DataAccessSecrets) Descriptor deprecated

func (*DataAccessSecrets) Descriptor() ([]byte, []int)

Deprecated: Use DataAccessSecrets.ProtoReflect.Descriptor instead.

func (*DataAccessSecrets) GetDatabase

func (x *DataAccessSecrets) GetDatabase() *DatabaseSecrets

func (*DataAccessSecrets) GetServiceTokens

func (x *DataAccessSecrets) GetServiceTokens() *ServiceTokens

func (*DataAccessSecrets) GetVersion

func (x *DataAccessSecrets) GetVersion() int32

func (*DataAccessSecrets) ProtoMessage

func (*DataAccessSecrets) ProtoMessage()

func (*DataAccessSecrets) ProtoReflect

func (x *DataAccessSecrets) ProtoReflect() protoreflect.Message

func (*DataAccessSecrets) Reset

func (x *DataAccessSecrets) Reset()

func (*DataAccessSecrets) String

func (x *DataAccessSecrets) String() string

type Database

type Database struct {

	// driver and ssl_mode sit here rather than in a source arm because Fairway can
	// express neither (no yugabyte backend type, no ssl field), so both must be
	// stated whichever source is used. driver also picks the goose migration dir.
	Driver Database_Driver `protobuf:"varint,1,opt,name=driver,proto3,enum=gitlab.iam.config.v1.Database_Driver" json:"driver,omitempty"`
	// Mandatory: `defined_only` alone would let an omitted key take
	// SSL_MODE_UNSPECIFIED. The legacy platformconfig/database.go refused to boot
	// without it, and Fairway cannot supply it either (fairway#36).
	SslMode Database_SslMode `` /* 126-byte string literal not displayed */
	// Declared, not discovered: infrastructure.DefaultConfig() is fatal and caches
	// its failure process-wide when /etc/labkit/infrastructure.yaml is absent, so
	// environments without a Fairway chart must never reach it.
	//
	// Types that are valid to be assigned to Source:
	//
	//	*Database_Infrastructure
	//	*Database_Endpoint
	Source isDatabase_Source `protobuf_oneof:"source"`
	// Pgx pool property, not endpoint. Omit for default max(4, NumCPU) per node.
	MaxConnections *int32 `protobuf:"varint,5,opt,name=max_connections,json=maxConnections,proto3,oneof" json:"max_connections,omitempty"`
	// An idle floor above the ceiling is accepted silently by pgx and never
	// reached, hence the two CEL rules above.
	MinIdleConnections *int32 `protobuf:"varint,6,opt,name=min_idle_connections,json=minIdleConnections,proto3,oneof" json:"min_idle_connections,omitempty"`
	// contains filtered or unexported fields
}

func (*Database) Descriptor deprecated

func (*Database) Descriptor() ([]byte, []int)

Deprecated: Use Database.ProtoReflect.Descriptor instead.

func (*Database) GetDriver

func (x *Database) GetDriver() Database_Driver

func (*Database) GetEndpoint

func (x *Database) GetEndpoint() *Endpoint

func (*Database) GetInfrastructure

func (x *Database) GetInfrastructure() *Infrastructure

func (*Database) GetMaxConnections added in v1.43.0

func (x *Database) GetMaxConnections() int32

func (*Database) GetMinIdleConnections added in v1.43.0

func (x *Database) GetMinIdleConnections() int32

func (*Database) GetSource

func (x *Database) GetSource() isDatabase_Source

func (*Database) GetSslMode

func (x *Database) GetSslMode() Database_SslMode

func (*Database) ProtoMessage

func (*Database) ProtoMessage()

func (*Database) ProtoReflect

func (x *Database) ProtoReflect() protoreflect.Message

func (*Database) Reset

func (x *Database) Reset()

func (*Database) String

func (x *Database) String() string

type DatabaseSecrets

type DatabaseSecrets struct {

	// Service role (DML only). Omitted when platform.database.source is
	// `infrastructure`, which supplies these from the Fairway secret mount.
	Username *string `protobuf:"bytes,1,opt,name=username,proto3,oneof" json:"username,omitempty"`
	// sensitive: must never appear in logs or error messages.
	Password *string `protobuf:"bytes,2,opt,name=password,proto3,oneof" json:"password,omitempty"`
	// Migration role (DDL). Always from this file: Fairway's PostgreSQL message has
	// one username and one secret_ref, so it cannot express a second role. Used
	// only by cmd/migrate, which errors clearly if it is missing.
	MigrationUsername *string `protobuf:"bytes,3,opt,name=migration_username,json=migrationUsername,proto3,oneof" json:"migration_username,omitempty"`
	// sensitive: must never appear in logs or error messages.
	MigrationPassword *string `protobuf:"bytes,4,opt,name=migration_password,json=migrationPassword,proto3,oneof" json:"migration_password,omitempty"`
	// contains filtered or unexported fields
}

func (*DatabaseSecrets) Descriptor deprecated

func (*DatabaseSecrets) Descriptor() ([]byte, []int)

Deprecated: Use DatabaseSecrets.ProtoReflect.Descriptor instead.

func (*DatabaseSecrets) GetMigrationPassword

func (x *DatabaseSecrets) GetMigrationPassword() string

func (*DatabaseSecrets) GetMigrationUsername

func (x *DatabaseSecrets) GetMigrationUsername() string

func (*DatabaseSecrets) GetPassword

func (x *DatabaseSecrets) GetPassword() string

func (*DatabaseSecrets) GetUsername

func (x *DatabaseSecrets) GetUsername() string

func (*DatabaseSecrets) ProtoMessage

func (*DatabaseSecrets) ProtoMessage()

func (*DatabaseSecrets) ProtoReflect

func (x *DatabaseSecrets) ProtoReflect() protoreflect.Message

func (*DatabaseSecrets) Reset

func (x *DatabaseSecrets) Reset()

func (*DatabaseSecrets) String

func (x *DatabaseSecrets) String() string

type Database_Driver

type Database_Driver int32
const (
	Database_DRIVER_UNSPECIFIED Database_Driver = 0
	Database_DRIVER_POSTGRES    Database_Driver = 1
	Database_DRIVER_YUGABYTE    Database_Driver = 2
)

func (Database_Driver) Descriptor

func (Database_Driver) Enum

func (x Database_Driver) Enum() *Database_Driver

func (Database_Driver) EnumDescriptor deprecated

func (Database_Driver) EnumDescriptor() ([]byte, []int)

Deprecated: Use Database_Driver.Descriptor instead.

func (Database_Driver) Number

func (Database_Driver) String

func (x Database_Driver) String() string

func (Database_Driver) Type

type Database_Endpoint

type Database_Endpoint struct {
	Endpoint *Endpoint `protobuf:"bytes,4,opt,name=endpoint,proto3,oneof"`
}

type Database_Infrastructure

type Database_Infrastructure struct {
	Infrastructure *Infrastructure `protobuf:"bytes,3,opt,name=infrastructure,proto3,oneof"`
}

type Database_SslMode

type Database_SslMode int32
const (
	Database_SSL_MODE_UNSPECIFIED Database_SslMode = 0
	Database_SSL_MODE_DISABLE     Database_SslMode = 1
	Database_SSL_MODE_REQUIRE     Database_SslMode = 2
	Database_SSL_MODE_VERIFY_CA   Database_SslMode = 3
	Database_SSL_MODE_VERIFY_FULL Database_SslMode = 4
)

func (Database_SslMode) Descriptor

func (Database_SslMode) Enum

func (Database_SslMode) EnumDescriptor deprecated

func (Database_SslMode) EnumDescriptor() ([]byte, []int)

Deprecated: Use Database_SslMode.Descriptor instead.

func (Database_SslMode) Number

func (Database_SslMode) String

func (x Database_SslMode) String() string

func (Database_SslMode) Type

type Endpoint

type Endpoint struct {
	Host         string `protobuf:"bytes,1,opt,name=host,proto3" json:"host,omitempty"`
	Port         int32  `protobuf:"varint,2,opt,name=port,proto3" json:"port,omitempty"`
	DatabaseName string `protobuf:"bytes,3,opt,name=database_name,json=databaseName,proto3" json:"database_name,omitempty"`
	// contains filtered or unexported fields
}

Endpoint carries the fields Fairway itself could supply, stated by hand for Omnibus, local dev and CI, which have no infrastructure file. Under `infrastructure` they come from postgresql.*, with database_name falling back to the mounted secret's format-specific key (CNPG: dbname). Credentials always come from the secrets file.

func (*Endpoint) Descriptor deprecated

func (*Endpoint) Descriptor() ([]byte, []int)

Deprecated: Use Endpoint.ProtoReflect.Descriptor instead.

func (*Endpoint) GetDatabaseName

func (x *Endpoint) GetDatabaseName() string

func (*Endpoint) GetHost

func (x *Endpoint) GetHost() string

func (*Endpoint) GetPort

func (x *Endpoint) GetPort() int32

func (*Endpoint) ProtoMessage

func (*Endpoint) ProtoMessage()

func (*Endpoint) ProtoReflect

func (x *Endpoint) ProtoReflect() protoreflect.Message

func (*Endpoint) Reset

func (x *Endpoint) Reset()

func (*Endpoint) String

func (x *Endpoint) String() string

type Grpc

type Grpc struct {

	// Reflection is a stream RPC, so the unary service-token interceptors do not
	// cover it: it is unauthenticated wherever it is on. Omitting the block turns
	// reflection off.
	EnableReflection *bool `protobuf:"varint,1,opt,name=enable_reflection,json=enableReflection,proto3,oneof" json:"enable_reflection,omitempty"`
	// contains filtered or unexported fields
}

func (*Grpc) Descriptor deprecated

func (*Grpc) Descriptor() ([]byte, []int)

Deprecated: Use Grpc.ProtoReflect.Descriptor instead.

func (*Grpc) GetEnableReflection

func (x *Grpc) GetEnableReflection() bool

func (*Grpc) ProtoMessage

func (*Grpc) ProtoMessage()

func (*Grpc) ProtoReflect

func (x *Grpc) ProtoReflect() protoreflect.Message

func (*Grpc) Reset

func (x *Grpc) Reset()

func (*Grpc) String

func (x *Grpc) String() string

type Http

type Http struct {

	// Omitting these defaults them to 30s read, 30s write, 60s idle.
	ReadTimeout  *durationpb.Duration `protobuf:"bytes,1,opt,name=read_timeout,json=readTimeout,proto3,oneof" json:"read_timeout,omitempty"`
	WriteTimeout *durationpb.Duration `protobuf:"bytes,2,opt,name=write_timeout,json=writeTimeout,proto3,oneof" json:"write_timeout,omitempty"`
	IdleTimeout  *durationpb.Duration `protobuf:"bytes,3,opt,name=idle_timeout,json=idleTimeout,proto3,oneof" json:"idle_timeout,omitempty"`
	// contains filtered or unexported fields
}

func (*Http) Descriptor deprecated

func (*Http) Descriptor() ([]byte, []int)

Deprecated: Use Http.ProtoReflect.Descriptor instead.

func (*Http) GetIdleTimeout

func (x *Http) GetIdleTimeout() *durationpb.Duration

func (*Http) GetReadTimeout

func (x *Http) GetReadTimeout() *durationpb.Duration

func (*Http) GetWriteTimeout

func (x *Http) GetWriteTimeout() *durationpb.Duration

func (*Http) ProtoMessage

func (*Http) ProtoMessage()

func (*Http) ProtoReflect

func (x *Http) ProtoReflect() protoreflect.Message

func (*Http) Reset

func (x *Http) Reset()

func (*Http) String

func (x *Http) String() string

type Infrastructure

type Infrastructure struct {

	// Both unset: LabKit's default locations. Both set: build the infrastructure
	// config by hand from these paths.
	Path       *string `protobuf:"bytes,1,opt,name=path,proto3,oneof" json:"path,omitempty"`
	SecretsDir *string `protobuf:"bytes,2,opt,name=secrets_dir,json=secretsDir,proto3,oneof" json:"secrets_dir,omitempty"`
	// contains filtered or unexported fields
}

func (*Infrastructure) Descriptor deprecated

func (*Infrastructure) Descriptor() ([]byte, []int)

Deprecated: Use Infrastructure.ProtoReflect.Descriptor instead.

func (*Infrastructure) GetPath

func (x *Infrastructure) GetPath() string

func (*Infrastructure) GetSecretsDir

func (x *Infrastructure) GetSecretsDir() string

func (*Infrastructure) ProtoMessage

func (*Infrastructure) ProtoMessage()

func (*Infrastructure) ProtoReflect

func (x *Infrastructure) ProtoReflect() protoreflect.Message

func (*Infrastructure) Reset

func (x *Infrastructure) Reset()

func (*Infrastructure) String

func (x *Infrastructure) String() string

type Issuer

type Issuer struct {
	Url     string `protobuf:"bytes,1,opt,name=url,proto3" json:"url,omitempty"`
	KeysUrl string `protobuf:"bytes,2,opt,name=keys_url,json=keysUrl,proto3" json:"keys_url,omitempty"`
	// contains filtered or unexported fields
}

Issuer is one trusted token issuer and the JWKS endpoint its keys are fetched from. keys_url is not derived from url: GitLab serves Cloud Connector keys from a path that is not the issuer's well-known location.

func (*Issuer) Descriptor deprecated

func (*Issuer) Descriptor() ([]byte, []int)

Deprecated: Use Issuer.ProtoReflect.Descriptor instead.

func (*Issuer) GetKeysUrl

func (x *Issuer) GetKeysUrl() string

func (*Issuer) GetUrl

func (x *Issuer) GetUrl() string

func (*Issuer) ProtoMessage

func (*Issuer) ProtoMessage()

func (*Issuer) ProtoReflect

func (x *Issuer) ProtoReflect() protoreflect.Message

func (*Issuer) Reset

func (x *Issuer) Reset()

func (*Issuer) String

func (x *Issuer) String() string

type OauthClient

type OauthClient struct {

	// The GitLab instance third-party identities are linked into.
	GitlabUrl *string `protobuf:"bytes,1,opt,name=gitlab_url,json=gitlabUrl,proto3,oneof" json:"gitlab_url,omitempty"`
	// Closed key set: each name selects a distinct construction path in
	// auth/oauth/client, so an unknown key would be silently ignored.
	Providers map[string]*OauthProvider `` /* 145-byte string literal not displayed */
	// contains filtered or unexported fields
}

OauthClient configures IAM as an OAuth client, for "sign in with ..." flows.

func (*OauthClient) Descriptor deprecated

func (*OauthClient) Descriptor() ([]byte, []int)

Deprecated: Use OauthClient.ProtoReflect.Descriptor instead.

func (*OauthClient) GetGitlabUrl

func (x *OauthClient) GetGitlabUrl() string

func (*OauthClient) GetProviders

func (x *OauthClient) GetProviders() map[string]*OauthProvider

func (*OauthClient) ProtoMessage

func (*OauthClient) ProtoMessage()

func (*OauthClient) ProtoReflect

func (x *OauthClient) ProtoReflect() protoreflect.Message

func (*OauthClient) Reset

func (x *OauthClient) Reset()

func (*OauthClient) String

func (x *OauthClient) String() string

type OauthClientCredentials

type OauthClientCredentials struct {
	ClientId string `protobuf:"bytes,1,opt,name=client_id,json=clientId,proto3" json:"client_id,omitempty"`
	// sensitive: must never appear in logs or error messages.
	ClientSecret string `protobuf:"bytes,2,opt,name=client_secret,json=clientSecret,proto3" json:"client_secret,omitempty"`
	// contains filtered or unexported fields
}

func (*OauthClientCredentials) Descriptor deprecated

func (*OauthClientCredentials) Descriptor() ([]byte, []int)

Deprecated: Use OauthClientCredentials.ProtoReflect.Descriptor instead.

func (*OauthClientCredentials) GetClientId

func (x *OauthClientCredentials) GetClientId() string

func (*OauthClientCredentials) GetClientSecret

func (x *OauthClientCredentials) GetClientSecret() string

func (*OauthClientCredentials) ProtoMessage

func (*OauthClientCredentials) ProtoMessage()

func (*OauthClientCredentials) ProtoReflect

func (x *OauthClientCredentials) ProtoReflect() protoreflect.Message

func (*OauthClientCredentials) Reset

func (x *OauthClientCredentials) Reset()

func (*OauthClientCredentials) String

func (x *OauthClientCredentials) String() string

type OauthProvider

type OauthProvider struct {
	Issuer      *string `protobuf:"bytes,1,opt,name=issuer,proto3,oneof" json:"issuer,omitempty"`
	AuthUrl     *string `protobuf:"bytes,2,opt,name=auth_url,json=authUrl,proto3,oneof" json:"auth_url,omitempty"`
	TokenUrl    *string `protobuf:"bytes,3,opt,name=token_url,json=tokenUrl,proto3,oneof" json:"token_url,omitempty"`
	UserInfoUrl *string `protobuf:"bytes,4,opt,name=user_info_url,json=userInfoUrl,proto3,oneof" json:"user_info_url,omitempty"`
	// Omitting this uses the provider's conventional scopes, from pkg/config.
	// No min_items: repeated fields have no presence, so that would make the
	// default unreachable (see common.proto).
	Scopes []string `protobuf:"bytes,5,rep,name=scopes,proto3" json:"scopes,omitempty"`
	// contains filtered or unexported fields
}

OauthProvider is one third-party provider. Setting `issuer` selects OIDC discovery; otherwise the explicit endpoints are used, and overriding them is what makes GitHub Enterprise / Bitbucket Data Center reachable.

"issuer, or a complete endpoint set" is enforced in Go, not here: pkg/config supplies the golang.org/x/oauth2 defaults and protovalidate runs first, so a rule here would reject a valid github block that omits them.

func (*OauthProvider) Descriptor deprecated

func (*OauthProvider) Descriptor() ([]byte, []int)

Deprecated: Use OauthProvider.ProtoReflect.Descriptor instead.

func (*OauthProvider) GetAuthUrl

func (x *OauthProvider) GetAuthUrl() string

func (*OauthProvider) GetIssuer

func (x *OauthProvider) GetIssuer() string

func (*OauthProvider) GetScopes

func (x *OauthProvider) GetScopes() []string

func (*OauthProvider) GetTokenUrl

func (x *OauthProvider) GetTokenUrl() string

func (*OauthProvider) GetUserInfoUrl

func (x *OauthProvider) GetUserInfoUrl() string

func (*OauthProvider) ProtoMessage

func (*OauthProvider) ProtoMessage()

func (*OauthProvider) ProtoReflect

func (x *OauthProvider) ProtoReflect() protoreflect.Message

func (*OauthProvider) Reset

func (x *OauthProvider) Reset()

func (*OauthProvider) String

func (x *OauthProvider) String() string

type OauthSecrets

type OauthSecrets struct {

	// sensitive. Signs opaque authorization codes and refresh tokens.
	HmacSecret string `protobuf:"bytes,1,opt,name=hmac_secret,json=hmacSecret,proto3" json:"hmac_secret,omitempty"`
	// A base64-encoded PKCS#8 PEM RSA private key
	// staging/production inject it as SERVICES_AUTH_OAUTH_SIGNING_KEY, and
	// dev/CI use the fixed key in configs/environments/secrets.toml
	// sensitive. required.
	SigningKey string `protobuf:"bytes,2,opt,name=signing_key,json=signingKey,proto3" json:"signing_key,omitempty"`
	// contains filtered or unexported fields
}

func (*OauthSecrets) Descriptor deprecated

func (*OauthSecrets) Descriptor() ([]byte, []int)

Deprecated: Use OauthSecrets.ProtoReflect.Descriptor instead.

func (*OauthSecrets) GetHmacSecret

func (x *OauthSecrets) GetHmacSecret() string

func (*OauthSecrets) GetSigningKey added in v1.45.3

func (x *OauthSecrets) GetSigningKey() string

func (*OauthSecrets) ProtoMessage

func (*OauthSecrets) ProtoMessage()

func (*OauthSecrets) ProtoReflect

func (x *OauthSecrets) ProtoReflect() protoreflect.Message

func (*OauthSecrets) Reset

func (x *OauthSecrets) Reset()

func (*OauthSecrets) String

func (x *OauthSecrets) String() string

type OauthServer

type OauthServer struct {

	// The `iss` claim, and the base for the OIDC discovery document.
	Issuer string `protobuf:"bytes,1,opt,name=issuer,proto3" json:"issuer,omitempty"`
	// Rails routes: where to send an unauthenticated user, and where to approve
	// a client's scopes.
	LoginUrl   string `protobuf:"bytes,2,opt,name=login_url,json=loginUrl,proto3" json:"login_url,omitempty"`
	ConsentUrl string `protobuf:"bytes,3,opt,name=consent_url,json=consentUrl,proto3" json:"consent_url,omitempty"`
	// The `aud` claim on issued access tokens (RFC 9068). Defaults to
	// "gitlab-rails" when omitted.
	AccessTokenAudience *string `` /* 126-byte string literal not displayed */
	// How long a fetched JWKS is cached. Omitting it leaves 0, which is what the
	// service resolves today; changing that is deliberately out of scope here.
	JwksCacheDuration *durationpb.Duration `protobuf:"bytes,5,opt,name=jwks_cache_duration,json=jwksCacheDuration,proto3,oneof" json:"jwks_cache_duration,omitempty"`
	// GitLab Rails' `/api/v4/iam/userinfo` endpoint. Called at token-exchange
	// time to fetch ID token claims, authenticated with the access token
	// minted for the same exchange as a bearer credential (see
	// core.ClaimsEnrichedIDTokenHandler). Unlike the OIDC `/oauth/userinfo`
	// endpoint, this one accepts only an IAM-issued OAuth JWT.
	//
	// SECURITY-SENSITIVE: every openid-scoped token exchange sends a bearer
	// access token to this URL. Must resolve to a trusted, TLS-protected
	// GitLab Rails instance; never an attacker-controlled address.
	UserInfoUrl string `protobuf:"bytes,6,opt,name=user_info_url,json=userInfoUrl,proto3" json:"user_info_url,omitempty"`
	// contains filtered or unexported fields
}

OauthServer configures IAM acting as an authorization server.

func (*OauthServer) Descriptor deprecated

func (*OauthServer) Descriptor() ([]byte, []int)

Deprecated: Use OauthServer.ProtoReflect.Descriptor instead.

func (*OauthServer) GetAccessTokenAudience

func (x *OauthServer) GetAccessTokenAudience() string

func (*OauthServer) GetConsentUrl

func (x *OauthServer) GetConsentUrl() string

func (*OauthServer) GetIssuer

func (x *OauthServer) GetIssuer() string

func (*OauthServer) GetJwksCacheDuration

func (x *OauthServer) GetJwksCacheDuration() *durationpb.Duration

func (*OauthServer) GetLoginUrl

func (x *OauthServer) GetLoginUrl() string

func (*OauthServer) GetUserInfoUrl added in v1.45.2

func (x *OauthServer) GetUserInfoUrl() string

func (*OauthServer) ProtoMessage

func (*OauthServer) ProtoMessage()

func (*OauthServer) ProtoReflect

func (x *OauthServer) ProtoReflect() protoreflect.Message

func (*OauthServer) Reset

func (x *OauthServer) Reset()

func (*OauthServer) String

func (x *OauthServer) String() string

type Platform

type Platform struct {
	Database *Database `protobuf:"bytes,1,opt,name=database,proto3" json:"database,omitempty"`
	// Omitting a block leaves its fields at their Go defaults — see the note above.
	Grpc *Grpc `protobuf:"bytes,2,opt,name=grpc,proto3,oneof" json:"grpc,omitempty"`
	Http *Http `protobuf:"bytes,3,opt,name=http,proto3,oneof" json:"http,omitempty"`
	// contains filtered or unexported fields
}

func (*Platform) Descriptor deprecated

func (*Platform) Descriptor() ([]byte, []int)

Deprecated: Use Platform.ProtoReflect.Descriptor instead.

func (*Platform) GetDatabase

func (x *Platform) GetDatabase() *Database

func (*Platform) GetGrpc

func (x *Platform) GetGrpc() *Grpc

func (*Platform) GetHttp

func (x *Platform) GetHttp() *Http

func (*Platform) ProtoMessage

func (*Platform) ProtoMessage()

func (*Platform) ProtoReflect

func (x *Platform) ProtoReflect() protoreflect.Message

func (*Platform) Reset

func (x *Platform) Reset()

func (*Platform) String

func (x *Platform) String() string

type ServiceTokens

type ServiceTokens struct {

	// sensitive: must never appear in logs or error messages.
	ServiceToken string `protobuf:"bytes,1,opt,name=service_token,json=serviceToken,proto3" json:"service_token,omitempty"`
	// sensitive. Accepted alongside service_token during rotation; empty otherwise.
	NextServiceToken *string `protobuf:"bytes,2,opt,name=next_service_token,json=nextServiceToken,proto3,oneof" json:"next_service_token,omitempty"`
	// contains filtered or unexported fields
}

func (*ServiceTokens) Descriptor deprecated

func (*ServiceTokens) Descriptor() ([]byte, []int)

Deprecated: Use ServiceTokens.ProtoReflect.Descriptor instead.

func (*ServiceTokens) GetNextServiceToken

func (x *ServiceTokens) GetNextServiceToken() string

func (*ServiceTokens) GetServiceToken

func (x *ServiceTokens) GetServiceToken() string

func (*ServiceTokens) ProtoMessage

func (*ServiceTokens) ProtoMessage()

func (*ServiceTokens) ProtoReflect

func (x *ServiceTokens) ProtoReflect() protoreflect.Message

func (*ServiceTokens) Reset

func (x *ServiceTokens) Reset()

func (*ServiceTokens) String

func (x *ServiceTokens) String() string

type UserAuth

type UserAuth struct {

	// Issuers whose tokens are accepted. At least one is required: with none, the
	// service would reject every request.
	Issuers []*Issuer `protobuf:"bytes,1,rep,name=issuers,proto3" json:"issuers,omitempty"`
	// Audiences accepted in the `aud` claim. Checked twice on purpose:
	// pkg/userauth/config.go validates it separately and cannot import these
	// protos, so repeating the set here catches a typo at config load.
	ExpectedAudiences []string `protobuf:"bytes,2,rep,name=expected_audiences,json=expectedAudiences,proto3" json:"expected_audiences,omitempty"`
	// contains filtered or unexported fields
}

UserAuth configures verification of end-user JWTs presented to data-access.

func (*UserAuth) Descriptor deprecated

func (*UserAuth) Descriptor() ([]byte, []int)

Deprecated: Use UserAuth.ProtoReflect.Descriptor instead.

func (*UserAuth) GetExpectedAudiences

func (x *UserAuth) GetExpectedAudiences() []string

func (*UserAuth) GetIssuers

func (x *UserAuth) GetIssuers() []*Issuer

func (*UserAuth) ProtoMessage

func (*UserAuth) ProtoMessage()

func (*UserAuth) ProtoReflect

func (x *UserAuth) ProtoReflect() protoreflect.Message

func (*UserAuth) Reset

func (x *UserAuth) Reset()

func (*UserAuth) String

func (x *UserAuth) String() string

Jump to

Keyboard shortcuts

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