Documentation
¶
Index ¶
- Constants
- Variables
- func AllServiceIdStrings() []string
- func AllValidServiceIds(ids []string) bool
- func DataHash(data []byte) string
- func IsValidServiceId(id ServiceId) bool
- func KeyDataMockAddVersion(mockID, providerID, providerVersion string, data []byte)
- func KeyDataMockRemoveVersion(mockID, providerVersion string)
- func KeyDataMockSetVersions(mockID string, versions []KeyVersionInfo)
- func ResetKeyDataMockRegistry()
- type AdminUser
- type AdminUsers
- func (au *AdminUsers) All() []*AdminUser
- func (au *AdminUsers) GetByJwtSubject(subject string) (*AdminUser, bool)
- func (au *AdminUsers) GetByUsername(username string) (*AdminUser, bool)
- func (au *AdminUsers) MarshalJSON() ([]byte, error)
- func (au *AdminUsers) MarshalYAML() (interface{}, error)
- func (au *AdminUsers) UnmarshalJSON(data []byte) error
- func (au *AdminUsers) UnmarshalYAML(value *yaml.Node) error
- type AdminUsersExternalSource
- type AdminUsersList
- type AdminUsersType
- type Auth
- type AuthApiKey
- type AuthNoAuth
- type AuthOAuth2
- type AuthOauth2Authorization
- type AuthOauth2Token
- type AuthType
- type AwsCredentials
- func (c *AwsCredentials) GetAwsConfigLoadOptions(ctx context.Context) ([]func(*awsconfig.LoadOptions) error, error)
- func (c *AwsCredentials) GetCredentialsType() AwsCredentialsType
- func (c *AwsCredentials) MarshalJSON() ([]byte, error)
- func (c *AwsCredentials) MarshalYAML() (interface{}, error)
- func (c *AwsCredentials) UnmarshalJSON(data []byte) error
- func (c *AwsCredentials) UnmarshalYAML(value *yaml.Node) error
- type AwsCredentialsAccessKey
- type AwsCredentialsImpl
- type AwsCredentialsImplicit
- type AwsCredentialsType
- type BlobStorage
- type BlobStorageImpl
- type BlobStorageMemory
- type BlobStorageProvider
- type BlobStorageS3
- type ConfiguredActor
- type ConfiguredActors
- func (ca *ConfiguredActors) All() []*ConfiguredActor
- func (ca *ConfiguredActors) GetByExternalId(externalId string) (*ConfiguredActor, bool)
- func (ca *ConfiguredActors) GetBySubject(subject string) (*ConfiguredActor, bool)
- func (ca *ConfiguredActors) MarshalJSON() ([]byte, error)
- func (ca *ConfiguredActors) MarshalYAML() (interface{}, error)
- func (ca *ConfiguredActors) UnmarshalJSON(data []byte) error
- func (ca *ConfiguredActors) UnmarshalYAML(value *yaml.Node) error
- type ConfiguredActorsExternalSource
- func (s *ConfiguredActorsExternalSource) All() []*ConfiguredActor
- func (s *ConfiguredActorsExternalSource) GetByExternalId(externalId string) (*ConfiguredActor, bool)
- func (s *ConfiguredActorsExternalSource) GetBySubject(subject string) (*ConfiguredActor, bool)
- func (s *ConfiguredActorsExternalSource) GetSyncCronScheduleOrDefault() string
- type ConfiguredActorsList
- type ConfiguredActorsType
- type Connections
- type Connector
- type Connectors
- type CookieConfig
- type CorsConfig
- type Database
- func (d *Database) GetAutoMigrate() bool
- func (d *Database) GetAutoMigrationLockDuration() time.Duration
- func (d *Database) GetDriver() string
- func (d *Database) GetDsn() string
- func (d *Database) GetPlaceholderFormat() sq.PlaceholderFormat
- func (d *Database) GetProvider() DatabaseProvider
- func (d *Database) GetSoftDeleteRetention() *time.Duration
- func (d *Database) GetSoftDeleteRetentionOrDefault() time.Duration
- func (d *Database) GetUri() string
- func (d *Database) MarshalJSON() ([]byte, error)
- func (d *Database) MarshalYAML() (interface{}, error)
- func (d *Database) UnmarshalJSON(data []byte) error
- func (d *Database) UnmarshalYAML(value *yaml.Node) error
- func (d *Database) Validate(vc *common.ValidationContext) error
- type DatabaseClickhouse
- func (d *DatabaseClickhouse) GetAddresses(ctx context.Context) ([]string, error)
- func (d *DatabaseClickhouse) GetAutoMigrate() bool
- func (d *DatabaseClickhouse) GetAutoMigrationLockDuration() time.Duration
- func (d *DatabaseClickhouse) GetDriver() string
- func (d *DatabaseClickhouse) GetDsn() string
- func (d *DatabaseClickhouse) GetPlaceholderFormat() sq.PlaceholderFormat
- func (d *DatabaseClickhouse) GetProtocol() clickhouse.Protocol
- func (d *DatabaseClickhouse) GetProvider() DatabaseProvider
- func (d *DatabaseClickhouse) GetSoftDeleteRetention() *time.Duration
- func (d *DatabaseClickhouse) GetUri() string
- func (d *DatabaseClickhouse) ToClickhouseOptions() (*clickhouse.Options, error)
- func (d *DatabaseClickhouse) Validate(vc *common.ValidationContext) error
- type DatabaseImpl
- type DatabasePostgres
- func (d *DatabasePostgres) GetAutoMigrate() bool
- func (d *DatabasePostgres) GetAutoMigrationLockDuration() time.Duration
- func (d *DatabasePostgres) GetDriver() string
- func (d *DatabasePostgres) GetDsn() string
- func (d *DatabasePostgres) GetPlaceholderFormat() sq.PlaceholderFormat
- func (d *DatabasePostgres) GetProvider() DatabaseProvider
- func (d *DatabasePostgres) GetSoftDeleteRetention() *time.Duration
- func (d *DatabasePostgres) GetUri() string
- func (d *DatabasePostgres) Validate(vc *common.ValidationContext) error
- type DatabaseProvider
- type DatabaseSqlite
- func (d *DatabaseSqlite) GetAutoMigrate() bool
- func (d *DatabaseSqlite) GetAutoMigrationLockDuration() time.Duration
- func (d *DatabaseSqlite) GetDriver() string
- func (d *DatabaseSqlite) GetDsn() string
- func (d *DatabaseSqlite) GetPlaceholderFormat() sq.PlaceholderFormat
- func (d *DatabaseSqlite) GetProvider() DatabaseProvider
- func (d *DatabaseSqlite) GetSoftDeleteRetention() *time.Duration
- func (d *DatabaseSqlite) GetUri() string
- func (d *DatabaseSqlite) Validate(vc *common.ValidationContext) error
- type DevSettings
- type ErrorPage
- type ErrorPages
- type ErrorTemplateValues
- type FullRequestRecording
- type HostApplication
- type HttpLogging
- func (d *HttpLogging) GetAutoMigrate() bool
- func (d *HttpLogging) GetFlushBatchSize() int
- func (d *HttpLogging) GetFlushInterval() time.Duration
- func (d *HttpLogging) GetFullRequestRecording() FullRequestRecording
- func (d *HttpLogging) GetFullRequestRetention() time.Duration
- func (d *HttpLogging) GetMaxRequestSize() uint64
- func (d *HttpLogging) GetMaxResponseSize() uint64
- func (d *HttpLogging) GetMaxResponseWait() time.Duration
- func (d *HttpLogging) GetRetention() time.Duration
- type HttpService
- type HttpServiceLike
- type HttpServiceWithSession
- type HumanByteSize
- type HumanDuration
- type Image
- type ImageBase64
- type ImagePublicUrl
- type IntegerValue
- type IntegerValueDirect
- type IntegerValueEnvVar
- type Key
- type KeyData
- func (kd *KeyData) GetCurrentVersion(ctx context.Context) (KeyVersionInfo, error)
- func (kd *KeyData) GetProviderType() ProviderType
- func (kd *KeyData) GetVersion(ctx context.Context, version string) (KeyVersionInfo, error)
- func (kd *KeyData) ListVersions(ctx context.Context) ([]KeyVersionInfo, error)
- func (kd *KeyData) MarshalJSON() ([]byte, error)
- func (kd *KeyData) MarshalYAML() (interface{}, error)
- func (kd *KeyData) UnmarshalJSON(data []byte) error
- func (kd *KeyData) UnmarshalYAML(value *yaml.Node) error
- type KeyDataAwsSecret
- func (ka *KeyDataAwsSecret) GetCurrentVersion(ctx context.Context) (KeyVersionInfo, error)
- func (ka *KeyDataAwsSecret) GetProviderType() ProviderType
- func (ka *KeyDataAwsSecret) GetVersion(ctx context.Context, version string) (KeyVersionInfo, error)
- func (ka *KeyDataAwsSecret) ListVersions(ctx context.Context) ([]KeyVersionInfo, error)
- type KeyDataBase64Val
- func (kb *KeyDataBase64Val) GetCurrentVersion(ctx context.Context) (KeyVersionInfo, error)
- func (kb *KeyDataBase64Val) GetProviderType() ProviderType
- func (kb *KeyDataBase64Val) GetVersion(ctx context.Context, version string) (KeyVersionInfo, error)
- func (kb *KeyDataBase64Val) ListVersions(ctx context.Context) ([]KeyVersionInfo, error)
- type KeyDataEnvBase64Var
- func (kev *KeyDataEnvBase64Var) GetCurrentVersion(ctx context.Context) (KeyVersionInfo, error)
- func (kev *KeyDataEnvBase64Var) GetProviderType() ProviderType
- func (kev *KeyDataEnvBase64Var) GetVersion(ctx context.Context, version string) (KeyVersionInfo, error)
- func (kev *KeyDataEnvBase64Var) ListVersions(ctx context.Context) ([]KeyVersionInfo, error)
- type KeyDataEnvVar
- func (kev *KeyDataEnvVar) GetCurrentVersion(ctx context.Context) (KeyVersionInfo, error)
- func (kev *KeyDataEnvVar) GetProviderType() ProviderType
- func (kev *KeyDataEnvVar) GetVersion(ctx context.Context, version string) (KeyVersionInfo, error)
- func (kev *KeyDataEnvVar) ListVersions(ctx context.Context) ([]KeyVersionInfo, error)
- type KeyDataFile
- func (kf *KeyDataFile) GetCurrentVersion(ctx context.Context) (KeyVersionInfo, error)
- func (kf *KeyDataFile) GetProviderType() ProviderType
- func (kf *KeyDataFile) GetVersion(ctx context.Context, version string) (KeyVersionInfo, error)
- func (kf *KeyDataFile) ListVersions(ctx context.Context) ([]KeyVersionInfo, error)
- type KeyDataGcpSecret
- func (kg *KeyDataGcpSecret) GetCurrentVersion(ctx context.Context) (KeyVersionInfo, error)
- func (kg *KeyDataGcpSecret) GetProviderType() ProviderType
- func (kg *KeyDataGcpSecret) GetVersion(ctx context.Context, version string) (KeyVersionInfo, error)
- func (kg *KeyDataGcpSecret) ListVersions(ctx context.Context) ([]KeyVersionInfo, error)
- type KeyDataMock
- func (m *KeyDataMock) GetCurrentVersion(_ context.Context) (KeyVersionInfo, error)
- func (m *KeyDataMock) GetProviderType() ProviderType
- func (m *KeyDataMock) GetVersion(_ context.Context, version string) (KeyVersionInfo, error)
- func (m *KeyDataMock) ListVersions(_ context.Context) ([]KeyVersionInfo, error)
- type KeyDataRandomBytes
- func (kf *KeyDataRandomBytes) GetCurrentVersion(ctx context.Context) (KeyVersionInfo, error)
- func (kf *KeyDataRandomBytes) GetProviderType() ProviderType
- func (kf *KeyDataRandomBytes) GetVersion(ctx context.Context, version string) (KeyVersionInfo, error)
- func (kf *KeyDataRandomBytes) ListVersions(ctx context.Context) ([]KeyVersionInfo, error)
- type KeyDataRawVal
- func (kb *KeyDataRawVal) GetCurrentVersion(ctx context.Context) (KeyVersionInfo, error)
- func (kb *KeyDataRawVal) GetProviderType() ProviderType
- func (kb *KeyDataRawVal) GetVersion(ctx context.Context, version string) (KeyVersionInfo, error)
- func (kb *KeyDataRawVal) ListVersions(ctx context.Context) ([]KeyVersionInfo, error)
- type KeyDataType
- type KeyDataValue
- func (kv *KeyDataValue) GetCurrentVersion(ctx context.Context) (KeyVersionInfo, error)
- func (kv *KeyDataValue) GetProviderType() ProviderType
- func (kv *KeyDataValue) GetVersion(ctx context.Context, version string) (KeyVersionInfo, error)
- func (kv *KeyDataValue) ListVersions(ctx context.Context) ([]KeyVersionInfo, error)
- type KeyDataVault
- func (kv *KeyDataVault) GetCurrentVersion(ctx context.Context) (KeyVersionInfo, error)
- func (kv *KeyDataVault) GetProviderType() ProviderType
- func (kv *KeyDataVault) GetVersion(ctx context.Context, version string) (KeyVersionInfo, error)
- func (kv *KeyDataVault) ListVersions(ctx context.Context) ([]KeyVersionInfo, error)
- type KeyPublicPrivate
- type KeyShared
- type KeyType
- type KeyVersionInfo
- type LoggingConfig
- func (l *LoggingConfig) GetRootLogger() *slog.Logger
- func (l *LoggingConfig) GetType() LoggingConfigType
- func (l *LoggingConfig) MarshalJSON() ([]byte, error)
- func (l *LoggingConfig) MarshalYAML() (interface{}, error)
- func (l *LoggingConfig) UnmarshalJSON(data []byte) error
- func (l *LoggingConfig) UnmarshalYAML(value *yaml.Node) error
- type LoggingConfigJson
- type LoggingConfigLevel
- type LoggingConfigNone
- type LoggingConfigOutput
- type LoggingConfigText
- type LoggingConfigTint
- type LoggingConfigType
- type LoggingImpl
- type Marketplace
- type OAuth
- func (o *OAuth) GetInitiateToRedirectTtlOrDefault() time.Duration
- func (o *OAuth) GetRefreshTokensCronScheduleOrDefault() string
- func (o *OAuth) GetRefreshTokensInBackgroundOrDefault() bool
- func (o *OAuth) GetRefreshTokensTimeBeforeExpiryOrDefault() time.Duration
- func (o *OAuth) GetRoundTripTtlOrDefault() time.Duration
- type ProviderType
- type Redis
- type RedisImpl
- type RedisMiniredis
- type RedisProvider
- type RedisReal
- type Root
- type Scope
- type Service
- type ServiceAdminApi
- func (s *ServiceAdminApi) CookieDomain() string
- func (s *ServiceAdminApi) CookieSameSite() http.SameSite
- func (s *ServiceAdminApi) GetId() ServiceId
- func (s *ServiceAdminApi) SessionTimeout() time.Duration
- func (s *ServiceAdminApi) SupportsSession() bool
- func (s *ServiceAdminApi) SupportsUi() bool
- func (s *ServiceAdminApi) UiBaseUrl() string
- func (s *ServiceAdminApi) UnmarshalYAML(value *yaml.Node) error
- func (s *ServiceAdminApi) XsrfRequestQueueDepth() int
- type ServiceAdminUi
- type ServiceApi
- type ServiceCommon
- type ServiceHttp
- func (s *ServiceHttp) Domain() string
- func (s *ServiceHttp) GetBaseUrl() string
- func (s *ServiceHttp) GetServerAndHealthChecker(server http.Handler, healthChecker http.Handler) (httpServer *http.Server, httpHealthChecker *http.Server, err error)
- func (s *ServiceHttp) HealthCheckPort() uint64
- func (s *ServiceHttp) IsHttps() bool
- func (s *ServiceHttp) Port() uint64
- func (s *ServiceHttp) TlsConfig() (*tls.Config, error)
- type ServiceId
- type ServicePublic
- func (s *ServicePublic) CookieDomain() string
- func (s *ServicePublic) CookieSameSite() http.SameSite
- func (s *ServicePublic) EnableMarketplaceApis() bool
- func (s *ServicePublic) EnableProxy() bool
- func (s *ServicePublic) GetId() ServiceId
- func (s *ServicePublic) SessionTimeout() time.Duration
- func (s *ServicePublic) SupportsSession() bool
- func (s *ServicePublic) UnmarshalYAML(value *yaml.Node) error
- func (s *ServicePublic) XsrfRequestQueueDepth() int
- type ServicePublicStaticContentConfig
- type ServiceWorker
- type StringValue
- type StringValueBase64
- type StringValueDirect
- type StringValueEnvVar
- type StringValueEnvVarBase64
- type StringValueFile
- type SystemAuth
- type Tasks
- type TlsConfig
- type TlsConfigLetsEncrypt
- type TlsConfigSelfSignedAutogen
- type TlsConfigVals
Constants ¶
const ( DefaultInitiateToRedirectTtl = 30 * time.Second DefaultOAuthRoundTripTtl = 1 * time.Hour )
const ( AuthTypeOAuth2 = connectors.AuthTypeOAuth2 AuthTypeAPIKey = connectors.AuthTypeAPIKey )
Re-export constants from the connectors sub-package
const DefaultSetupTtl = 24 * time.Hour
const DefaultSoftDeleteRetention = 30 * 24 * time.Hour // 30 days
const SchemaIdConfig = "https://raw.githubusercontent.com/rmorlok/authproxy/refs/heads/main/schema/config/schema.json"
Variables ¶
var ( KindToString = common.KindToString MarshalToYamlString = common.MarshalToYamlString MustMarshalToYamlString = common.MustMarshalToYamlString NewStringValueDirect = common.NewStringValueDirect NewStringValueDirectInline = common.NewStringValueDirectInline ValidateNamespacePath = aschema.ValidateNamespacePath SplitNamespacePathToPrefixes = aschema.SplitNamespacePathToPrefixes NamespacePathFromRoot = aschema.NamespacePathFromRoot )
Re-export functions from the common sub-package
var (
RootNamespace = aschema.RootNamespace
)
Re-export constants from the connectors sub-package
Functions ¶
func AllServiceIdStrings ¶
func AllServiceIdStrings() []string
func AllValidServiceIds ¶
func IsValidServiceId ¶
func KeyDataMockAddVersion ¶
KeyDataMockAddVersion adds a new version to the mock identified by mockID, marking it as current and unmarking any previous current version.
func KeyDataMockRemoveVersion ¶
func KeyDataMockRemoveVersion(mockID, providerVersion string)
KeyDataMockRemoveVersion removes the version with the given providerVersion from the mock.
func KeyDataMockSetVersions ¶
func KeyDataMockSetVersions(mockID string, versions []KeyVersionInfo)
KeyDataMockSetVersions replaces all versions for the mock identified by mockID.
func ResetKeyDataMockRegistry ¶
func ResetKeyDataMockRegistry()
ResetKeyDataMockRegistry clears all entries from the global mock registry. Call this in test cleanup to prevent state leaking between tests.
Types ¶
type AdminUser ¶
type AdminUser struct {
Username string `json:"username" yaml:"username"`
Email string `json:"email" yaml:"email"`
Key *Key `json:"key" yaml:"key"`
Permissions []aschema.Permission `json:"permissions,omitempty" yaml:"permissions,omitempty"`
}
type AdminUsers ¶
type AdminUsers struct {
InnerVal AdminUsersType `json:"-" yaml:"-"`
}
func (*AdminUsers) All ¶
func (au *AdminUsers) All() []*AdminUser
func (*AdminUsers) GetByJwtSubject ¶
func (au *AdminUsers) GetByJwtSubject(subject string) (*AdminUser, bool)
func (*AdminUsers) GetByUsername ¶
func (au *AdminUsers) GetByUsername(username string) (*AdminUser, bool)
func (*AdminUsers) MarshalJSON ¶
func (au *AdminUsers) MarshalJSON() ([]byte, error)
func (*AdminUsers) MarshalYAML ¶
func (au *AdminUsers) MarshalYAML() (interface{}, error)
func (*AdminUsers) UnmarshalJSON ¶
func (au *AdminUsers) UnmarshalJSON(data []byte) error
func (*AdminUsers) UnmarshalYAML ¶
func (au *AdminUsers) UnmarshalYAML(value *yaml.Node) error
UnmarshalYAML handles unmarshalling from YAML while allowing us to make decisions about how the data is unmarshalled based on the concrete type being represented
type AdminUsersExternalSource ¶
type AdminUsersExternalSource struct {
KeysPath string `json:"keys_path" yaml:"keys_path"`
Permissions []aschema.Permission `json:"permissions,omitempty" yaml:"permissions,omitempty"`
SyncCronSchedule string `json:"sync_cron_schedule,omitempty" yaml:"sync_cron_schedule,omitempty"`
}
func (*AdminUsersExternalSource) All ¶
func (s *AdminUsersExternalSource) All() []*AdminUser
func (*AdminUsersExternalSource) GetByJwtSubject ¶
func (s *AdminUsersExternalSource) GetByJwtSubject(subject string) (*AdminUser, bool)
func (*AdminUsersExternalSource) GetByUsername ¶
func (s *AdminUsersExternalSource) GetByUsername(username string) (*AdminUser, bool)
func (*AdminUsersExternalSource) GetSyncCronScheduleOrDefault ¶
func (sa *AdminUsersExternalSource) GetSyncCronScheduleOrDefault() string
GetSyncCronScheduleOrDefault returns the cron schedule for admin users sync, or a default of every 5 minutes if not configured.
type AdminUsersList ¶
type AdminUsersList []*AdminUser
func UnmarshallYamlAdminUsersList ¶
func UnmarshallYamlAdminUsersList(data []byte) (AdminUsersList, error)
func UnmarshallYamlAdminUsersListString ¶
func UnmarshallYamlAdminUsersListString(data string) (AdminUsersList, error)
func (AdminUsersList) All ¶
func (aul AdminUsersList) All() []*AdminUser
func (AdminUsersList) GetByJwtSubject ¶
func (s AdminUsersList) GetByJwtSubject(subject string) (*AdminUser, bool)
func (AdminUsersList) GetByUsername ¶
func (aul AdminUsersList) GetByUsername(username string) (*AdminUser, bool)
type AdminUsersType ¶
type AuthApiKey ¶
type AuthApiKey = connectors.AuthApiKey
Re-export types from the connectors sub-package
type AuthNoAuth ¶
type AuthNoAuth = connectors.AuthNoAuth
Re-export types from the connectors sub-package
type AuthOAuth2 ¶
type AuthOAuth2 = connectors.AuthOAuth2
Re-export types from the connectors sub-package
type AuthOauth2Authorization ¶
type AuthOauth2Authorization = connectors.AuthOauth2Authorization
Re-export types from the connectors sub-package
type AuthOauth2Token ¶
type AuthOauth2Token = connectors.AuthOauth2Token
Re-export types from the connectors sub-package
type AwsCredentials ¶
type AwsCredentials struct {
InnerVal AwsCredentialsImpl `json:"-" yaml:"-"`
}
AwsCredentials is the holder for a AwsCredentialsImpl instance.
func (*AwsCredentials) GetAwsConfigLoadOptions ¶
func (c *AwsCredentials) GetAwsConfigLoadOptions(ctx context.Context) ([]func(*awsconfig.LoadOptions) error, error)
func (*AwsCredentials) GetCredentialsType ¶
func (c *AwsCredentials) GetCredentialsType() AwsCredentialsType
func (*AwsCredentials) MarshalJSON ¶
func (c *AwsCredentials) MarshalJSON() ([]byte, error)
func (*AwsCredentials) MarshalYAML ¶
func (c *AwsCredentials) MarshalYAML() (interface{}, error)
func (*AwsCredentials) UnmarshalJSON ¶
func (c *AwsCredentials) UnmarshalJSON(data []byte) error
UnmarshalJSON handles unmarshalling from JSON while allowing us to make decisions about how the data is unmarshalled based on the concrete type being represented
func (*AwsCredentials) UnmarshalYAML ¶
func (c *AwsCredentials) UnmarshalYAML(value *yaml.Node) error
UnmarshalYAML handles unmarshalling from YAML while allowing us to make decisions about how the data is unmarshalled based on the concrete type being represented
type AwsCredentialsAccessKey ¶
type AwsCredentialsAccessKey struct {
Type AwsCredentialsType `json:"type" yaml:"type"`
AccessKeyID *StringValue `json:"access_key_id" yaml:"access_key_id"`
SecretAccessKey *StringValue `json:"secret_access_key" yaml:"secret_access_key"`
}
AwsCredentialsAccessKey provides explicit access key credentials for S3-compatible storage.
func (*AwsCredentialsAccessKey) GetAwsConfigLoadOptions ¶
func (c *AwsCredentialsAccessKey) GetAwsConfigLoadOptions(ctx context.Context) ([]func(*awsconfig.LoadOptions) error, error)
func (*AwsCredentialsAccessKey) GetCredentialsType ¶
func (c *AwsCredentialsAccessKey) GetCredentialsType() AwsCredentialsType
type AwsCredentialsImpl ¶
type AwsCredentialsImpl interface {
GetCredentialsType() AwsCredentialsType
GetAwsConfigLoadOptions(ctx context.Context) ([]func(*awsconfig.LoadOptions) error, error)
}
AwsCredentialsImpl is the interface implemented by concrete blob storage credential configurations.
type AwsCredentialsImplicit ¶
type AwsCredentialsImplicit struct {
Type AwsCredentialsType `json:"type" yaml:"type"`
}
AwsCredentialsImplicit uses the default AWS credential chain (environment variables, shared credentials file ~/.aws/credentials, IAM roles, etc.).
func (*AwsCredentialsImplicit) GetAwsConfigLoadOptions ¶
func (c *AwsCredentialsImplicit) GetAwsConfigLoadOptions(_ context.Context) ([]func(*awsconfig.LoadOptions) error, error)
func (*AwsCredentialsImplicit) GetCredentialsType ¶
func (c *AwsCredentialsImplicit) GetCredentialsType() AwsCredentialsType
type AwsCredentialsType ¶
type AwsCredentialsType string
const ( AwsCredentialsTypeAccessKey AwsCredentialsType = "access_key" AwsCredentialsTypeImplicit AwsCredentialsType = "implicit" )
type BlobStorage ¶
type BlobStorage struct {
InnerVal BlobStorageImpl `json:"-" yaml:"-"`
}
BlobStorage is the holder for a BlobStorageImpl instance.
func (*BlobStorage) GetProvider ¶
func (b *BlobStorage) GetProvider() BlobStorageProvider
func (*BlobStorage) MarshalJSON ¶
func (b *BlobStorage) MarshalJSON() ([]byte, error)
func (*BlobStorage) MarshalYAML ¶
func (b *BlobStorage) MarshalYAML() (interface{}, error)
func (*BlobStorage) UnmarshalJSON ¶
func (b *BlobStorage) UnmarshalJSON(data []byte) error
UnmarshalJSON handles unmarshalling from JSON while allowing us to make decisions about how the data is unmarshalled based on the concrete type being represented
func (*BlobStorage) UnmarshalYAML ¶
func (b *BlobStorage) UnmarshalYAML(value *yaml.Node) error
UnmarshalYAML handles unmarshalling from YAML while allowing us to make decisions about how the data is unmarshalled based on the concrete type being represented
type BlobStorageImpl ¶
type BlobStorageImpl interface {
GetProvider() BlobStorageProvider
}
BlobStorageImpl is the interface implemented by concrete blob storage configurations.
type BlobStorageMemory ¶
type BlobStorageMemory struct {
Provider BlobStorageProvider `json:"provider" yaml:"provider"`
}
func (*BlobStorageMemory) GetProvider ¶
func (b *BlobStorageMemory) GetProvider() BlobStorageProvider
type BlobStorageProvider ¶
type BlobStorageProvider string
const ( BlobStorageProviderS3 BlobStorageProvider = "s3" BlobStorageProviderMemory BlobStorageProvider = "memory" )
type BlobStorageS3 ¶
type BlobStorageS3 struct {
Provider BlobStorageProvider `json:"provider" yaml:"provider"`
Endpoint string `json:"endpoint,omitempty" yaml:"endpoint,omitempty"`
Region string `json:"region,omitempty" yaml:"region,omitempty"`
Bucket string `json:"bucket" yaml:"bucket"`
Credentials *AwsCredentials `json:"credentials,omitempty" yaml:"credentials,omitempty"`
ForcePathStyle bool `json:"force_path_style,omitempty" yaml:"force_path_style,omitempty"`
Prefix string `json:"prefix,omitempty" yaml:"prefix,omitempty"`
}
func (*BlobStorageS3) GetAwsConfigLoadOptions ¶
func (b *BlobStorageS3) GetAwsConfigLoadOptions(ctx context.Context) ([]func(*awsconfig.LoadOptions) error, error)
func (*BlobStorageS3) GetProvider ¶
func (b *BlobStorageS3) GetProvider() BlobStorageProvider
func (*BlobStorageS3) GetS3Options ¶
func (b *BlobStorageS3) GetS3Options() []func(*s3.Options)
type ConfiguredActor ¶
type ConfiguredActors ¶
type ConfiguredActors struct {
InnerVal ConfiguredActorsType `json:"-" yaml:"-"`
}
func (*ConfiguredActors) All ¶
func (ca *ConfiguredActors) All() []*ConfiguredActor
func (*ConfiguredActors) GetByExternalId ¶
func (ca *ConfiguredActors) GetByExternalId(externalId string) (*ConfiguredActor, bool)
func (*ConfiguredActors) GetBySubject ¶
func (ca *ConfiguredActors) GetBySubject(subject string) (*ConfiguredActor, bool)
func (*ConfiguredActors) MarshalJSON ¶
func (ca *ConfiguredActors) MarshalJSON() ([]byte, error)
func (*ConfiguredActors) MarshalYAML ¶
func (ca *ConfiguredActors) MarshalYAML() (interface{}, error)
func (*ConfiguredActors) UnmarshalJSON ¶
func (ca *ConfiguredActors) UnmarshalJSON(data []byte) error
func (*ConfiguredActors) UnmarshalYAML ¶
func (ca *ConfiguredActors) UnmarshalYAML(value *yaml.Node) error
UnmarshalYAML handles unmarshalling from YAML while allowing us to make decisions about how the data is unmarshalled based on the concrete type being represented
type ConfiguredActorsExternalSource ¶
type ConfiguredActorsExternalSource struct {
KeysPath string `json:"keys_path" yaml:"keys_path"`
Permissions []aschema.Permission `json:"permissions,omitempty" yaml:"permissions,omitempty"`
SyncCronSchedule string `json:"sync_cron_schedule,omitempty" yaml:"sync_cron_schedule,omitempty"`
}
func (*ConfiguredActorsExternalSource) All ¶
func (s *ConfiguredActorsExternalSource) All() []*ConfiguredActor
func (*ConfiguredActorsExternalSource) GetByExternalId ¶
func (s *ConfiguredActorsExternalSource) GetByExternalId(externalId string) (*ConfiguredActor, bool)
func (*ConfiguredActorsExternalSource) GetBySubject ¶
func (s *ConfiguredActorsExternalSource) GetBySubject(subject string) (*ConfiguredActor, bool)
func (*ConfiguredActorsExternalSource) GetSyncCronScheduleOrDefault ¶
func (s *ConfiguredActorsExternalSource) GetSyncCronScheduleOrDefault() string
GetSyncCronScheduleOrDefault returns the cron schedule for actors sync, or a default of every 5 minutes if not configured.
type ConfiguredActorsList ¶
type ConfiguredActorsList []*ConfiguredActor
func UnmarshallYamlConfiguredActorsList ¶
func UnmarshallYamlConfiguredActorsList(data []byte) (ConfiguredActorsList, error)
func UnmarshallYamlConfiguredActorsListString ¶
func UnmarshallYamlConfiguredActorsListString(data string) (ConfiguredActorsList, error)
func (ConfiguredActorsList) All ¶
func (cal ConfiguredActorsList) All() []*ConfiguredActor
func (ConfiguredActorsList) GetByExternalId ¶
func (cal ConfiguredActorsList) GetByExternalId(externalId string) (*ConfiguredActor, bool)
func (ConfiguredActorsList) GetBySubject ¶
func (cal ConfiguredActorsList) GetBySubject(subject string) (*ConfiguredActor, bool)
type ConfiguredActorsType ¶
type ConfiguredActorsType interface {
All() []*ConfiguredActor
GetByExternalId(externalId string) (*ConfiguredActor, bool)
GetBySubject(subject string) (*ConfiguredActor, bool)
}
type Connections ¶
type Connections struct {
// SetupTtl is the maximum time a connection can remain in an incomplete setup state
// before it is automatically cleaned up. Defaults to 24 hours.
SetupTtl *HumanDuration `json:"setup_ttl,omitempty" yaml:"setup_ttl,omitempty"`
}
Connections contains configuration for connection management.
func (*Connections) GetSetupTtlOrDefault ¶
func (c *Connections) GetSetupTtlOrDefault() time.Duration
GetSetupTtlOrDefault returns the configured setup TTL, or 24 hours if not configured.
type Connector ¶
type Connector = connectors.Connector
Re-export types from the connectors sub-package
type Connectors ¶
type Connectors = connectors.Connectors
Re-export types from the connectors sub-package
type CookieConfig ¶
type CorsConfig ¶
type CorsConfig struct {
AllowedOrigins []string `json:"allowed_origins,omitempty" yaml:"allowed_origins,omitempty"`
AllowedMethods []string `json:"allowed_methods,omitempty" yaml:"allowed_methods,omitempty"`
AllowedHeaders []string `json:"allowed_headers,omitempty" yaml:"allowed_headers,omitempty"`
ExposedHeaders []string `json:"exposed_headers,omitempty" yaml:"exposed_headers,omitempty"`
MaxAge *HumanDuration `json:"max_age,omitempty" yaml:"max_age,omitempty"`
AllowCredentials *bool `json:"allow_credentials,omitempty" yaml:"allow_credentials,omitempty"`
}
func (*CorsConfig) ToGinCorsConfig ¶
func (c *CorsConfig) ToGinCorsConfig(defaults *cors.Config) *cors.Config
type Database ¶
type Database struct {
InnerVal DatabaseImpl `json:"-" yaml:"-"`
}
Database is the holder for a DatabaseImpl instance.
func (*Database) GetAutoMigrate ¶
func (*Database) GetAutoMigrationLockDuration ¶
func (*Database) GetPlaceholderFormat ¶
func (d *Database) GetPlaceholderFormat() sq.PlaceholderFormat
func (*Database) GetProvider ¶
func (d *Database) GetProvider() DatabaseProvider
func (*Database) GetSoftDeleteRetention ¶
func (*Database) GetSoftDeleteRetentionOrDefault ¶
GetSoftDeleteRetentionOrDefault returns the configured soft delete retention duration, or 30 days if not configured.
func (*Database) MarshalJSON ¶
func (*Database) MarshalYAML ¶
func (*Database) UnmarshalJSON ¶
UnmarshalJSON handles unmarshalling from JSON while allowing us to make decisions about how the data is unmarshalled based on the concrete type being represented
func (*Database) UnmarshalYAML ¶
UnmarshalYAML handles unmarshalling from YAML while allowing us to make decisions about how the data is unmarshalled based on the concrete type being represented
type DatabaseClickhouse ¶
type DatabaseClickhouse struct {
Provider DatabaseProvider `json:"provider" yaml:"provider"`
Addresses []string `json:"addresses,omitempty" yaml:"addresses,omitempty"`
Address *StringValue `json:"address,omitempty" yaml:"address,omitempty"`
AddressList *StringValue `json:"address_list,omitempty" yaml:"address_list,omitempty"`
Database *StringValue `json:"database" yaml:"database"`
User *StringValue `json:"user,omitempty" yaml:"user,omitempty"`
Password *StringValue `json:"password,omitempty" yaml:"password,omitempty"`
Protocol *string `json:"protocol,omitempty" yaml:"protocol,omitempty"`
AutoMigrate bool `json:"auto_migrate,omitempty" yaml:"auto_migrate,omitempty"`
AutoMigrationLockDuration *HumanDuration `json:"auto_migration_lock_duration,omitempty" yaml:"auto_migration_lock_duration,omitempty"`
}
DatabaseClickhouse holds configuration for using ClickHouse as the HTTP logging database.
func (*DatabaseClickhouse) GetAddresses ¶
func (d *DatabaseClickhouse) GetAddresses(ctx context.Context) ([]string, error)
func (*DatabaseClickhouse) GetAutoMigrate ¶
func (d *DatabaseClickhouse) GetAutoMigrate() bool
func (*DatabaseClickhouse) GetAutoMigrationLockDuration ¶
func (d *DatabaseClickhouse) GetAutoMigrationLockDuration() time.Duration
func (*DatabaseClickhouse) GetDriver ¶
func (d *DatabaseClickhouse) GetDriver() string
func (*DatabaseClickhouse) GetDsn ¶
func (d *DatabaseClickhouse) GetDsn() string
GetDsn gets the Data Source Name
func (*DatabaseClickhouse) GetPlaceholderFormat ¶
func (d *DatabaseClickhouse) GetPlaceholderFormat() sq.PlaceholderFormat
func (*DatabaseClickhouse) GetProtocol ¶
func (d *DatabaseClickhouse) GetProtocol() clickhouse.Protocol
GetProtocol returns the ClickHouse connection protocol. Defaults to HTTP if not set.
func (*DatabaseClickhouse) GetProvider ¶
func (d *DatabaseClickhouse) GetProvider() DatabaseProvider
func (*DatabaseClickhouse) GetSoftDeleteRetention ¶
func (d *DatabaseClickhouse) GetSoftDeleteRetention() *time.Duration
func (*DatabaseClickhouse) GetUri ¶
func (d *DatabaseClickhouse) GetUri() string
func (*DatabaseClickhouse) ToClickhouseOptions ¶
func (d *DatabaseClickhouse) ToClickhouseOptions() (*clickhouse.Options, error)
func (*DatabaseClickhouse) Validate ¶
func (d *DatabaseClickhouse) Validate(vc *common.ValidationContext) error
type DatabaseImpl ¶
type DatabaseImpl interface {
GetProvider() DatabaseProvider
GetAutoMigrate() bool
GetAutoMigrationLockDuration() time.Duration
GetSoftDeleteRetention() *time.Duration
GetUri() string
GetDsn() string
GetDriver() string
GetPlaceholderFormat() sq.PlaceholderFormat
Validate(vc *common.ValidationContext) error
}
DatabaseImpl is the interface implemented by concrete database configurations.
type DatabasePostgres ¶
type DatabasePostgres struct {
Provider DatabaseProvider `json:"provider" yaml:"provider"`
Host *StringValue `json:"host" yaml:"host"`
Port *IntegerValue `json:"port,omitempty" yaml:"port,omitempty"`
User *StringValue `json:"user,omitempty" yaml:"user,omitempty"`
Password *StringValue `json:"password,omitempty" yaml:"password,omitempty"`
Database *StringValue `json:"database" yaml:"database"`
SSLMode *StringValue `json:"sslmode,omitempty" yaml:"sslmode,omitempty"`
Params map[string]string `json:"params,omitempty" yaml:"params,omitempty"`
AutoMigrate bool `json:"auto_migrate,omitempty" yaml:"auto_migrate,omitempty"`
AutoMigrationLockDuration *HumanDuration `json:"auto_migration_lock_duration,omitempty" yaml:"auto_migration_lock_duration,omitempty"`
SoftDeleteRetention *HumanDuration `json:"soft_delete_retention,omitempty" yaml:"soft_delete_retention,omitempty"`
}
func (*DatabasePostgres) GetAutoMigrate ¶
func (d *DatabasePostgres) GetAutoMigrate() bool
func (*DatabasePostgres) GetAutoMigrationLockDuration ¶
func (d *DatabasePostgres) GetAutoMigrationLockDuration() time.Duration
func (*DatabasePostgres) GetDriver ¶
func (d *DatabasePostgres) GetDriver() string
func (*DatabasePostgres) GetDsn ¶
func (d *DatabasePostgres) GetDsn() string
GetDsn gets the Data Source Name
func (*DatabasePostgres) GetPlaceholderFormat ¶
func (d *DatabasePostgres) GetPlaceholderFormat() sq.PlaceholderFormat
func (*DatabasePostgres) GetProvider ¶
func (d *DatabasePostgres) GetProvider() DatabaseProvider
func (*DatabasePostgres) GetSoftDeleteRetention ¶
func (d *DatabasePostgres) GetSoftDeleteRetention() *time.Duration
func (*DatabasePostgres) GetUri ¶
func (d *DatabasePostgres) GetUri() string
func (*DatabasePostgres) Validate ¶
func (d *DatabasePostgres) Validate(vc *common.ValidationContext) error
type DatabaseProvider ¶
type DatabaseProvider string
const ( DatabaseProviderSqlite DatabaseProvider = "sqlite" DatabaseProviderPostgres DatabaseProvider = "postgres" DatabaseProviderClickhouse DatabaseProvider = "clickhouse" )
type DatabaseSqlite ¶
type DatabaseSqlite struct {
Provider DatabaseProvider `json:"provider" yaml:"provider"`
Path string `json:"path" yaml:"path"`
AutoMigrate bool `json:"auto_migrate,omitempty" yaml:"auto_migrate,omitempty"`
AutoMigrationLockDuration *HumanDuration `json:"auto_migration_lock_duration,omitempty" yaml:"auto_migration_lock_duration,omitempty"`
SoftDeleteRetention *HumanDuration `json:"soft_delete_retention,omitempty" yaml:"soft_delete_retention,omitempty"`
}
func (*DatabaseSqlite) GetAutoMigrate ¶
func (d *DatabaseSqlite) GetAutoMigrate() bool
func (*DatabaseSqlite) GetAutoMigrationLockDuration ¶
func (d *DatabaseSqlite) GetAutoMigrationLockDuration() time.Duration
func (*DatabaseSqlite) GetDriver ¶
func (d *DatabaseSqlite) GetDriver() string
func (*DatabaseSqlite) GetDsn ¶
func (d *DatabaseSqlite) GetDsn() string
GetDsn gets the Data Source Name
func (*DatabaseSqlite) GetPlaceholderFormat ¶
func (d *DatabaseSqlite) GetPlaceholderFormat() sq.PlaceholderFormat
func (*DatabaseSqlite) GetProvider ¶
func (d *DatabaseSqlite) GetProvider() DatabaseProvider
func (*DatabaseSqlite) GetSoftDeleteRetention ¶
func (d *DatabaseSqlite) GetSoftDeleteRetention() *time.Duration
func (*DatabaseSqlite) GetUri ¶
func (d *DatabaseSqlite) GetUri() string
func (*DatabaseSqlite) Validate ¶
func (d *DatabaseSqlite) Validate(vc *common.ValidationContext) error
type DevSettings ¶
type DevSettings struct {
Enabled bool `json:"enabled" yaml:"enabled"`
FakeEncryption bool `json:"fake_encryption" yaml:"fake_encryption"`
FakeEncryptionSkipBase64 bool `json:"fake_encryption_skip_base64" yaml:"fake_encryption_skip_base64"`
}
DevSettings are flags that can be set to turn auth proxy into developer mode to make it easer to test and see what is going on in the system. These settings should not be enabled in production.
func (*DevSettings) IsEnabled ¶
func (d *DevSettings) IsEnabled() bool
func (*DevSettings) IsFakeEncryptionEnabled ¶
func (d *DevSettings) IsFakeEncryptionEnabled() bool
func (*DevSettings) IsFakeEncryptionSkipBase64Enabled ¶
func (d *DevSettings) IsFakeEncryptionSkipBase64Enabled() bool
type ErrorPages ¶
type ErrorPages struct {
NotFound string `json:"not_found,omitempty" yaml:"not_found,omitempty"`
InternalError string `json:"internal_error,omitempty" yaml:"internal_error,omitempty"`
Template *StringValue `json:"template,omitempty" yaml:"template,omitempty"`
}
func (*ErrorPages) RenderErrorOrRedirect ¶
func (ep *ErrorPages) RenderErrorOrRedirect(gctx *gin.Context, vals ErrorTemplateValues, err error)
func (*ErrorPages) RenderErrorPage ¶
func (ep *ErrorPages) RenderErrorPage(gctx *gin.Context, vals ErrorTemplateValues)
func (*ErrorPages) UrlForError ¶
func (ep *ErrorPages) UrlForError(error ErrorPage, publicBaseUrl string) string
type ErrorTemplateValues ¶
type FullRequestRecording ¶
type FullRequestRecording string
const ( FullRequestRecordingNever FullRequestRecording = "never" FullRequestRecordingAlways FullRequestRecording = "always" )
type HostApplication ¶
type HostApplication struct {
// InitiateSessionUrl is the URL that will be redirected to in order to establish a session for an actor. This
// happens if the marketplace portal is accessed without coming from a pre-authorized context. This URL should
// take a `redirect_url` query parameter where the actor should be redirected to following successful authentication.
// When redirecting to `redirect_url`, the host application should append an `auth_token` query param with a signed
// JWT for authenticating the user. This JWT should use a nonce and expiration to protect against session
// hijacking
InitiateSessionUrl string `json:"initiate_session_url" yaml:"initiate_session_url"`
}
func (*HostApplication) GetInitiateSessionUrl ¶
func (ha *HostApplication) GetInitiateSessionUrl(returnTo string) string
func (*HostApplication) Validate ¶
func (ha *HostApplication) Validate(vc *common.ValidationContext) error
type HttpLogging ¶
type HttpLogging struct {
// AutoMigrate controls if the migration to build the indexes for http logging happens automatically on startup.
// If this value is not specified in the config, it defaults to true.
AutoMigrate *bool `json:"auto_migrate,omitempty" yaml:"auto_migrate,omitempty"`
// Retention is how long the high-level logs should be retained. If unset, defaults to 30 days.
Retention *HumanDuration `json:"retention" yaml:"retention"`
// MaxRequestSize is the max size of request that will be stored. Values over this will be truncated.
MaxRequestSize *HumanByteSize `json:"max_request_size,omitempty" yaml:"max_request_size,omitempty"`
// MaxResponseSize is the max size of the response that will be stored. Values over this will be truncated.
MaxResponseSize *HumanByteSize `json:"max_response_size,omitempty" yaml:"max_response_size,omitempty"`
// MaxResponseWait is the maximum amount of time to wait for a response before logging it. Defaults to 60 seconds.
MaxResponseWait *HumanDuration `json:"max_response_wait" yaml:"max_response_wait"`
// FullRequestRecording flags if the full body/headers be logged for requests. Defaults to never, or can be enabled
// with API calls to specific resources, or always on.
FullRequestRecording *FullRequestRecording `json:"full_request_recording,omitempty" yaml:"full_request_recording,omitempty"`
// FullRequestRetention is how long the full request logs should be retained. If unset, defaults to 30 days.
FullRequestRetention *HumanDuration `json:"full_request_retention,omitempty" yaml:"full_request_retention,omitempty"`
// FlushInterval is how often buffered records are flushed the database. Defaults to 5s.
FlushInterval *HumanDuration `json:"flush_interval,omitempty" yaml:"flush_interval,omitempty"`
// FlushBatchSize is the number of records that triggers a flush. Defaults to 1000.
FlushBatchSize *int `json:"flush_batch_size,omitempty" yaml:"flush_batch_size,omitempty"`
// Database is the database provider for HTTP logging metadata. This can be the same database as the main
// database but would be a data warehouse in production.
Database *Database `json:"database" yaml:"database"`
// BlobStorage configures the blob storage backend used for storing full request/response logs.
// If not configured, full request logging will use an in-memory store (not suitable for production).
BlobStorage *BlobStorage `json:"blob_storage,omitempty" yaml:"blob_storage,omitempty"`
}
HttpLogging are the settings related to logging HTTP requests.
func (*HttpLogging) GetAutoMigrate ¶
func (d *HttpLogging) GetAutoMigrate() bool
func (*HttpLogging) GetFlushBatchSize ¶
func (d *HttpLogging) GetFlushBatchSize() int
func (*HttpLogging) GetFlushInterval ¶
func (d *HttpLogging) GetFlushInterval() time.Duration
func (*HttpLogging) GetFullRequestRecording ¶
func (d *HttpLogging) GetFullRequestRecording() FullRequestRecording
func (*HttpLogging) GetFullRequestRetention ¶
func (d *HttpLogging) GetFullRequestRetention() time.Duration
func (*HttpLogging) GetMaxRequestSize ¶
func (d *HttpLogging) GetMaxRequestSize() uint64
func (*HttpLogging) GetMaxResponseSize ¶
func (d *HttpLogging) GetMaxResponseSize() uint64
func (*HttpLogging) GetMaxResponseWait ¶
func (d *HttpLogging) GetMaxResponseWait() time.Duration
func (*HttpLogging) GetRetention ¶
func (d *HttpLogging) GetRetention() time.Duration
type HttpService ¶
type HttpService interface {
Service
Port() uint64
IsHttps() bool
TlsConfig() (*tls.Config, error)
Domain() string
GetBaseUrl() string
SupportsSession() bool
GetServerAndHealthChecker(
server http.Handler,
healthChecker http.Handler,
) (httpServer *http.Server, httpHealthChecker *http.Server, err error)
}
type HttpServiceLike ¶
type HttpServiceWithSession ¶
type HumanByteSize ¶
type HumanByteSize = common.HumanByteSize
Re-export types from the common sub-package
type HumanDuration ¶
type HumanDuration = common.HumanDuration
Re-export types from the common sub-package
type ImageBase64 ¶
type ImageBase64 = common.ImageBase64
Re-export types from the common sub-package
type ImagePublicUrl ¶
type ImagePublicUrl = common.ImagePublicUrl
Re-export types from the common sub-package
type IntegerValue ¶
type IntegerValue = common.IntegerValue
Re-export types from the common sub-package
type IntegerValueDirect ¶
type IntegerValueDirect = common.IntegerValueDirect
Re-export types from the common sub-package
type IntegerValueEnvVar ¶
type IntegerValueEnvVar = common.IntegerValueEnvVar
Re-export types from the common sub-package
type Key ¶
type Key struct {
InnerVal KeyType `json:"-" yaml:"-"`
}
func (*Key) CanVerifySignature ¶
func (*Key) MarshalJSON ¶
func (*Key) MarshalYAML ¶
func (*Key) UnmarshalJSON ¶
UnmarshalJSON handles unmarshalling from JSON while allowing us to make decisions about how the data is unmarshalled based on the concrete type being represented
type KeyData ¶
type KeyData struct {
InnerVal KeyDataType `json:"-" yaml:"-"`
}
func NewKeyDataMock ¶
NewKeyDataMock creates a new KeyDataMock with the given ID and registers it in the global registry with an empty version list. Returns a KeyData wrapping the mock.
func NewKeyDataRandomBytes ¶
func NewKeyDataRandomBytes() *KeyData
func (*KeyData) GetCurrentVersion ¶
func (kd *KeyData) GetCurrentVersion(ctx context.Context) (KeyVersionInfo, error)
func (*KeyData) GetProviderType ¶
func (kd *KeyData) GetProviderType() ProviderType
func (*KeyData) GetVersion ¶
func (*KeyData) ListVersions ¶
func (kd *KeyData) ListVersions(ctx context.Context) ([]KeyVersionInfo, error)
func (*KeyData) MarshalJSON ¶
func (*KeyData) MarshalYAML ¶
func (*KeyData) UnmarshalJSON ¶
UnmarshalJSON handles unmarshalling from JSON while allowing us to make decisions about how the data is unmarshalled based on the concrete type being represented
type KeyDataAwsSecret ¶
type KeyDataAwsSecret struct {
AwsSecretID string `json:"aws_secret_id" yaml:"aws_secret_id"`
AwsSecretKey string `json:"aws_secret_key,omitempty" yaml:"aws_secret_key,omitempty"`
AwsRegion string `json:"aws_region,omitempty" yaml:"aws_region,omitempty"`
Credentials *AwsCredentials `json:"aws_credentials,omitempty" yaml:"aws_credentials,omitempty"`
CacheTTL string `json:"cache_ttl,omitempty" yaml:"cache_ttl,omitempty"`
// contains filtered or unexported fields
}
KeyDataAwsSecret retrieves an AES key from AWS Secrets Manager.
func (*KeyDataAwsSecret) GetCurrentVersion ¶
func (ka *KeyDataAwsSecret) GetCurrentVersion(ctx context.Context) (KeyVersionInfo, error)
func (*KeyDataAwsSecret) GetProviderType ¶
func (ka *KeyDataAwsSecret) GetProviderType() ProviderType
func (*KeyDataAwsSecret) GetVersion ¶
func (ka *KeyDataAwsSecret) GetVersion(ctx context.Context, version string) (KeyVersionInfo, error)
func (*KeyDataAwsSecret) ListVersions ¶
func (ka *KeyDataAwsSecret) ListVersions(ctx context.Context) ([]KeyVersionInfo, error)
type KeyDataBase64Val ¶
type KeyDataBase64Val struct {
Base64 string `json:"base64" yaml:"base64"`
}
func (*KeyDataBase64Val) GetCurrentVersion ¶
func (kb *KeyDataBase64Val) GetCurrentVersion(ctx context.Context) (KeyVersionInfo, error)
func (*KeyDataBase64Val) GetProviderType ¶
func (kb *KeyDataBase64Val) GetProviderType() ProviderType
func (*KeyDataBase64Val) GetVersion ¶
func (kb *KeyDataBase64Val) GetVersion(ctx context.Context, version string) (KeyVersionInfo, error)
func (*KeyDataBase64Val) ListVersions ¶
func (kb *KeyDataBase64Val) ListVersions(ctx context.Context) ([]KeyVersionInfo, error)
type KeyDataEnvBase64Var ¶
type KeyDataEnvBase64Var struct {
EnvVar string `json:"env_var_base64" yaml:"env_var_base64"`
}
func (*KeyDataEnvBase64Var) GetCurrentVersion ¶
func (kev *KeyDataEnvBase64Var) GetCurrentVersion(ctx context.Context) (KeyVersionInfo, error)
func (*KeyDataEnvBase64Var) GetProviderType ¶
func (kev *KeyDataEnvBase64Var) GetProviderType() ProviderType
func (*KeyDataEnvBase64Var) GetVersion ¶
func (kev *KeyDataEnvBase64Var) GetVersion(ctx context.Context, version string) (KeyVersionInfo, error)
func (*KeyDataEnvBase64Var) ListVersions ¶
func (kev *KeyDataEnvBase64Var) ListVersions(ctx context.Context) ([]KeyVersionInfo, error)
type KeyDataEnvVar ¶
type KeyDataEnvVar struct {
EnvVar string `json:"env_var" yaml:"env_var"`
}
func (*KeyDataEnvVar) GetCurrentVersion ¶
func (kev *KeyDataEnvVar) GetCurrentVersion(ctx context.Context) (KeyVersionInfo, error)
func (*KeyDataEnvVar) GetProviderType ¶
func (kev *KeyDataEnvVar) GetProviderType() ProviderType
func (*KeyDataEnvVar) GetVersion ¶
func (kev *KeyDataEnvVar) GetVersion(ctx context.Context, version string) (KeyVersionInfo, error)
func (*KeyDataEnvVar) ListVersions ¶
func (kev *KeyDataEnvVar) ListVersions(ctx context.Context) ([]KeyVersionInfo, error)
type KeyDataFile ¶
type KeyDataFile struct {
Path string `json:"path" yaml:"path"`
}
func (*KeyDataFile) GetCurrentVersion ¶
func (kf *KeyDataFile) GetCurrentVersion(ctx context.Context) (KeyVersionInfo, error)
func (*KeyDataFile) GetProviderType ¶
func (kf *KeyDataFile) GetProviderType() ProviderType
func (*KeyDataFile) GetVersion ¶
func (kf *KeyDataFile) GetVersion(ctx context.Context, version string) (KeyVersionInfo, error)
func (*KeyDataFile) ListVersions ¶
func (kf *KeyDataFile) ListVersions(ctx context.Context) ([]KeyVersionInfo, error)
type KeyDataGcpSecret ¶
type KeyDataGcpSecret struct {
GcpSecretName string `json:"gcp_secret_name" yaml:"gcp_secret_name"`
GcpProject string `json:"gcp_project,omitempty" yaml:"gcp_project,omitempty"`
GcpSecretVersion string `json:"gcp_secret_version,omitempty" yaml:"gcp_secret_version,omitempty"`
CacheTTL string `json:"cache_ttl,omitempty" yaml:"cache_ttl,omitempty"`
// contains filtered or unexported fields
}
KeyDataGcpSecret retrieves an AES key from GCP Secret Manager.
func (*KeyDataGcpSecret) GetCurrentVersion ¶
func (kg *KeyDataGcpSecret) GetCurrentVersion(ctx context.Context) (KeyVersionInfo, error)
func (*KeyDataGcpSecret) GetProviderType ¶
func (kg *KeyDataGcpSecret) GetProviderType() ProviderType
func (*KeyDataGcpSecret) GetVersion ¶
func (kg *KeyDataGcpSecret) GetVersion(ctx context.Context, version string) (KeyVersionInfo, error)
func (*KeyDataGcpSecret) ListVersions ¶
func (kg *KeyDataGcpSecret) ListVersions(ctx context.Context) ([]KeyVersionInfo, error)
type KeyDataMock ¶
type KeyDataMock struct {
MockID string `json:"mock_id" yaml:"mock_id"`
}
KeyDataMock is a mock KeyDataType backed by an in-memory registry keyed by MockID. It supports JSON/YAML round-tripping: only the MockID is serialized, and the actual version data lives in the global registry. This lets tests mutate the set of versions between sync calls while child encryption keys can deserialize from encrypted data.
func (*KeyDataMock) GetCurrentVersion ¶
func (m *KeyDataMock) GetCurrentVersion(_ context.Context) (KeyVersionInfo, error)
func (*KeyDataMock) GetProviderType ¶
func (m *KeyDataMock) GetProviderType() ProviderType
func (*KeyDataMock) GetVersion ¶
func (m *KeyDataMock) GetVersion(_ context.Context, version string) (KeyVersionInfo, error)
func (*KeyDataMock) ListVersions ¶
func (m *KeyDataMock) ListVersions(_ context.Context) ([]KeyVersionInfo, error)
type KeyDataRandomBytes ¶
type KeyDataRandomBytes struct {
NumBytes int `json:"num_bytes" yaml:"num_bytes"`
// contains filtered or unexported fields
}
func (*KeyDataRandomBytes) GetCurrentVersion ¶
func (kf *KeyDataRandomBytes) GetCurrentVersion(ctx context.Context) (KeyVersionInfo, error)
func (*KeyDataRandomBytes) GetProviderType ¶
func (kf *KeyDataRandomBytes) GetProviderType() ProviderType
func (*KeyDataRandomBytes) GetVersion ¶
func (kf *KeyDataRandomBytes) GetVersion(ctx context.Context, version string) (KeyVersionInfo, error)
func (*KeyDataRandomBytes) ListVersions ¶
func (kf *KeyDataRandomBytes) ListVersions(ctx context.Context) ([]KeyVersionInfo, error)
type KeyDataRawVal ¶
type KeyDataRawVal struct {
Raw []byte `json:"-" yaml:"-"`
}
KeyDataRawVal is where the key data is specified directly as bytes. This isn't used for config via file but can be used as way to return data in a config interface that has data already loaded.
func (*KeyDataRawVal) GetCurrentVersion ¶
func (kb *KeyDataRawVal) GetCurrentVersion(ctx context.Context) (KeyVersionInfo, error)
func (*KeyDataRawVal) GetProviderType ¶
func (kb *KeyDataRawVal) GetProviderType() ProviderType
func (*KeyDataRawVal) GetVersion ¶
func (kb *KeyDataRawVal) GetVersion(ctx context.Context, version string) (KeyVersionInfo, error)
func (*KeyDataRawVal) ListVersions ¶
func (kb *KeyDataRawVal) ListVersions(ctx context.Context) ([]KeyVersionInfo, error)
type KeyDataType ¶
type KeyDataType interface {
// GetCurrentVersion retrieves the current version info including the key bytes.
GetCurrentVersion(ctx context.Context) (KeyVersionInfo, error)
// GetVersion retrieves a specific version by its provider version identifier.
GetVersion(ctx context.Context, version string) (KeyVersionInfo, error)
// ListVersions returns all known versions from this provider. For most providers
// this is a single-element slice containing the current version.
ListVersions(ctx context.Context) ([]KeyVersionInfo, error)
// GetProviderType returns the provider type identifier for this key data source.
GetProviderType() ProviderType
}
type KeyDataValue ¶
type KeyDataValue struct {
Value string `json:"value" yaml:"value"`
}
func (*KeyDataValue) GetCurrentVersion ¶
func (kv *KeyDataValue) GetCurrentVersion(ctx context.Context) (KeyVersionInfo, error)
func (*KeyDataValue) GetProviderType ¶
func (kv *KeyDataValue) GetProviderType() ProviderType
func (*KeyDataValue) GetVersion ¶
func (kv *KeyDataValue) GetVersion(ctx context.Context, version string) (KeyVersionInfo, error)
func (*KeyDataValue) ListVersions ¶
func (kv *KeyDataValue) ListVersions(ctx context.Context) ([]KeyVersionInfo, error)
type KeyDataVault ¶
type KeyDataVault struct {
VaultAddress string `json:"vault_address" yaml:"vault_address"`
VaultToken string `json:"vault_token" yaml:"vault_token"`
VaultPath string `json:"vault_path" yaml:"vault_path"`
VaultKey string `json:"vault_key" yaml:"vault_key"`
CacheTTL string `json:"cache_ttl,omitempty" yaml:"cache_ttl,omitempty"`
// contains filtered or unexported fields
}
KeyDataVault retrieves an AES key from HashiCorp Vault.
func (*KeyDataVault) GetCurrentVersion ¶
func (kv *KeyDataVault) GetCurrentVersion(ctx context.Context) (KeyVersionInfo, error)
func (*KeyDataVault) GetProviderType ¶
func (kv *KeyDataVault) GetProviderType() ProviderType
func (*KeyDataVault) GetVersion ¶
func (kv *KeyDataVault) GetVersion(ctx context.Context, version string) (KeyVersionInfo, error)
func (*KeyDataVault) ListVersions ¶
func (kv *KeyDataVault) ListVersions(ctx context.Context) ([]KeyVersionInfo, error)
type KeyPublicPrivate ¶
type KeyPublicPrivate struct {
PublicKey *KeyData `json:"public_key" yaml:"public_key"`
PrivateKey *KeyData `json:"private_key" yaml:"private_key"`
}
func (*KeyPublicPrivate) CanSign ¶
func (kpp *KeyPublicPrivate) CanSign() bool
func (*KeyPublicPrivate) CanVerifySignature ¶
func (kpp *KeyPublicPrivate) CanVerifySignature() bool
type KeyVersionInfo ¶
type KeyVersionInfo struct {
Provider ProviderType
ProviderID string
ProviderVersion string
Data []byte
IsCurrent bool
}
KeyVersionInfo contains metadata about a key version from a provider.
type LoggingConfig ¶
type LoggingConfig struct {
InnerVal LoggingImpl `json:"-" yaml:"-"`
}
LoggingConfig is the holder for a LoggingImpl instance.
func (*LoggingConfig) GetRootLogger ¶
func (l *LoggingConfig) GetRootLogger() *slog.Logger
func (*LoggingConfig) GetType ¶
func (l *LoggingConfig) GetType() LoggingConfigType
func (*LoggingConfig) MarshalJSON ¶
func (l *LoggingConfig) MarshalJSON() ([]byte, error)
func (*LoggingConfig) MarshalYAML ¶
func (l *LoggingConfig) MarshalYAML() (interface{}, error)
func (*LoggingConfig) UnmarshalJSON ¶
func (l *LoggingConfig) UnmarshalJSON(data []byte) error
UnmarshalJSON handles unmarshalling from JSON while allowing us to make decisions about how the data is unmarshalled based on the concrete type being represented
func (*LoggingConfig) UnmarshalYAML ¶
func (l *LoggingConfig) UnmarshalYAML(value *yaml.Node) error
UnmarshalYAML handles unmarshalling from YAML while allowing us to make decisions about how the data is unmarshalled based on the concrete type being represented
type LoggingConfigJson ¶
type LoggingConfigJson struct {
Type LoggingConfigType `json:"type" yaml:"type"`
To LoggingConfigOutput `json:"to,omitempty" yaml:"to,omitempty"`
Level LoggingConfigLevel `json:"level,omitempty" yaml:"level,omitempty"`
Source bool `json:"source,omitempty" yaml:"source,omitempty"`
}
func (*LoggingConfigJson) GetRootLogger ¶
func (l *LoggingConfigJson) GetRootLogger() *slog.Logger
func (*LoggingConfigJson) GetType ¶
func (l *LoggingConfigJson) GetType() LoggingConfigType
type LoggingConfigLevel ¶
type LoggingConfigLevel string
const ( LevelDebug LoggingConfigLevel = "debug" LevelInfo LoggingConfigLevel = "info" LevelWarn LoggingConfigLevel = "warn" LevelError LoggingConfigLevel = "error" )
func (LoggingConfigLevel) Level ¶
func (l LoggingConfigLevel) Level() slog.Level
func (LoggingConfigLevel) String ¶
func (l LoggingConfigLevel) String() string
type LoggingConfigNone ¶
type LoggingConfigNone struct {
Type LoggingConfigType `json:"type" yaml:"type"`
}
func (*LoggingConfigNone) GetRootLogger ¶
func (l *LoggingConfigNone) GetRootLogger() *slog.Logger
func (*LoggingConfigNone) GetType ¶
func (l *LoggingConfigNone) GetType() LoggingConfigType
type LoggingConfigOutput ¶
type LoggingConfigOutput string
const ( OutputStdout LoggingConfigOutput = "stdout" OutputStderr LoggingConfigOutput = "stderr" )
func (LoggingConfigOutput) Output ¶
func (l LoggingConfigOutput) Output() *os.File
type LoggingConfigText ¶
type LoggingConfigText struct {
Type LoggingConfigType `json:"type" yaml:"type"`
To LoggingConfigOutput `json:"to,omitempty" yaml:"to,omitempty"`
Level LoggingConfigLevel `json:"level,omitempty" yaml:"level,omitempty"`
Source bool `json:"source,omitempty" yaml:"source,omitempty"`
}
func (*LoggingConfigText) GetRootLogger ¶
func (l *LoggingConfigText) GetRootLogger() *slog.Logger
func (*LoggingConfigText) GetType ¶
func (l *LoggingConfigText) GetType() LoggingConfigType
type LoggingConfigTint ¶
type LoggingConfigTint struct {
Type LoggingConfigType `json:"type" yaml:"type"`
To LoggingConfigOutput `json:"to,omitempty" yaml:"to,omitempty"`
Level LoggingConfigLevel `json:"level,omitempty" yaml:"level,omitempty"`
Source bool `json:"source,omitempty" yaml:"source,omitempty"`
NoColor *bool `json:"no_color,omitempty" yaml:"no_color,omitempty"`
TimeFormat *string `json:"time_format,omitempty" yaml:"time_format,omitempty"`
}
func (*LoggingConfigTint) GetRootLogger ¶
func (l *LoggingConfigTint) GetRootLogger() *slog.Logger
func (*LoggingConfigTint) GetType ¶
func (l *LoggingConfigTint) GetType() LoggingConfigType
type LoggingConfigType ¶
type LoggingConfigType string
const ( LoggingConfigTypeText LoggingConfigType = "text" LoggingConfigTypeJson LoggingConfigType = "json" LoggingConfigTypeTint LoggingConfigType = "tint" LoggingConfigTypeNone LoggingConfigType = "none" )
type LoggingImpl ¶
type LoggingImpl interface {
GetRootLogger() *slog.Logger
GetType() LoggingConfigType
}
LoggingImpl is the interface implemented by concrete logging configurations.
type Marketplace ¶
type Marketplace struct {
BaseUrl *StringValue `json:"base_url,omitempty" yaml:"base_url,omitempty"`
}
type OAuth ¶
type OAuth struct {
// InitiateToRedirectTtl is the time allowed between the oauth initiate API call, and the time when the browser
// completes the redirect from the auth proxy public service. This value must be less than RoundTripTtl. This value
// should be as small as possible as the handoff from the API to the redirect involves a one-time-use auth token
// in the query parameters, which could be used to steal the session.
InitiateToRedirectTtl HumanDuration `json:"initiate_to_redirect_ttl" yaml:"initiate_to_redirect_ttl"`
// RoundTripTtl is the time we allow for the user to go through the oauth flow, from the initiate call, all the
// way back to returning to AuthProxy to exchange the auth token for an access token. The purpose of this timeout
// is to reduce the time that a redirect link from auth proxy would be valid for the purposes of phishing other
// peoples credentials using this link as the basis.
RoundTripTtl HumanDuration `json:"round_trip_ttl" yaml:"round_trip_ttl"`
// RefreshTokensInBackground controls if the system should proactively refresh tokens in the background. Default
// value is `true`. If set to false, tokens will not be refreshed until they are detected to be expired when used.
RefreshTokensInBackground *bool `json:"refresh_tokens_in_background" yaml:"refresh_tokens_in_background"`
// RefreshTokensTimeBeforeExpiry is the default time prior to token expiry to refresh the tokens. This value can be
// overridden on a per-connector basis, but the granularity of this value is limited by the cron for running refresh.
// If not specified the default value is 10 minutes.
RefreshTokensTimeBeforeExpiry *HumanDuration `json:"refresh_tokens_time_before_expiry" yaml:"refresh_tokens_time_before_expiry"`
// RefreshTokensCronSchedule is the schedule at which the background job to refresh oauth tokens will run. If not
// specified, runs every 10 minutes.
RefreshTokensCronSchedule string `json:"refresh_tokens_cron_schedule" yaml:"refresh_tokens_cron_schedule"`
}
func (*OAuth) GetInitiateToRedirectTtlOrDefault ¶
func (*OAuth) GetRefreshTokensCronScheduleOrDefault ¶
func (*OAuth) GetRefreshTokensInBackgroundOrDefault ¶
func (*OAuth) GetRefreshTokensTimeBeforeExpiryOrDefault ¶
func (*OAuth) GetRoundTripTtlOrDefault ¶
type ProviderType ¶
type ProviderType string
ProviderType identifies the type of key data provider.
const ( ProviderTypeValue ProviderType = "value" ProviderTypeBase64 ProviderType = "base64" ProviderTypeEnvVar ProviderType = "env_var" ProviderTypeEnvVarBase64 ProviderType = "env_var_base64" ProviderTypeFile ProviderType = "file" ProviderTypeRandom ProviderType = "random" ProviderTypeAws ProviderType = "aws" ProviderTypeGcp ProviderType = "gcp" ProviderTypeHashicorpVault ProviderType = "hashicorpvault" ProviderTypeRaw ProviderType = "raw" )
const ProviderTypeMock ProviderType = "mock"
type Redis ¶
type Redis struct {
InnerVal RedisImpl `json:"-" yaml:"-"`
}
Redis is the holder for a RedisImpl instance.
func (*Redis) GetProvider ¶
func (r *Redis) GetProvider() RedisProvider
func (*Redis) MarshalJSON ¶
func (*Redis) MarshalYAML ¶
func (*Redis) UnmarshalJSON ¶
UnmarshalJSON handles unmarshalling from JSON while allowing us to make decisions about how the data is unmarshalled based on the concrete type being represented
type RedisImpl ¶
type RedisImpl interface {
GetProvider() RedisProvider
}
RedisImpl is the interface implemented by concrete Redis configurations.
type RedisMiniredis ¶
type RedisMiniredis struct {
Provider RedisProvider `json:"provider" yaml:"provider"`
}
func (*RedisMiniredis) GetProvider ¶
func (d *RedisMiniredis) GetProvider() RedisProvider
type RedisProvider ¶
type RedisProvider string
const ( RedisProviderMiniredis RedisProvider = "miniredis" RedisProviderRedis RedisProvider = "redis" )
type RedisReal ¶
type RedisReal struct {
Provider RedisProvider `json:"provider" yaml:"provider"`
// The network type, either tcp or unix.
// Default is tcp.
Network string `json:"network" yaml:"network"`
// host:port address.
Address string `json:"address" yaml:"address"`
// Protocol 2 or 3. Use the version to negotiate RESP version with redis-server.
// Default is 3.
Protocol int `json:"protocol" yaml:"protocol"`
// Use the specified Username to authenticate the current connection
// with one of the connections defined in the ACL list when connecting
// to a Redis 6.0 instance, or greater, that is using the Redis ACL system.
Username *StringValue `json:"username" yaml:"username"`
// Optional password. Must match the password specified in the
// requirepass server configuration option (if connecting to a Redis 5.0 instance, or lower),
// or the User Password when connecting to a Redis 6.0 instance, or greater,
// that is using the Redis ACL system.
Password *StringValue `json:"password" yaml:"password"`
// Database to be selected after connecting to the server.
DB int `json:"db" yaml:"db"`
}
func (*RedisReal) GetProvider ¶
func (d *RedisReal) GetProvider() RedisProvider
type Root ¶
type Root struct {
AdminApi ServiceAdminApi `json:"admin_api" yaml:"admin_api"`
Api ServiceApi `json:"api" yaml:"api"`
Public ServicePublic `json:"public" yaml:"public"`
Worker ServiceWorker `json:"worker" yaml:"worker"`
Marketplace *Marketplace `json:"marketplace,omitempty" yaml:"marketplace,omitempty"`
HostApplication HostApplication `json:"host_application" yaml:"host_application"`
SystemAuth SystemAuth `json:"system_auth" yaml:"system_auth"`
Database *Database `json:"database" yaml:"database"`
Logging *LoggingConfig `json:"logging,omitempty" yaml:"logging,omitempty"`
Redis *Redis `json:"redis" yaml:"redis"`
Oauth OAuth `json:"oauth" yaml:"oauth"`
ErrorPages ErrorPages `json:"error_pages,omitempty" yaml:"error_pages,omitempty"`
Connectors *Connectors `json:"connectors" yaml:"connectors"`
HttpLogging *HttpLogging `json:"http_logging,omitempty" yaml:"http_logging,omitempty"`
Connections *Connections `json:"connections,omitempty" yaml:"connections,omitempty"`
Tasks *Tasks `json:"tasks,omitempty" yaml:"tasks,omitempty"`
DevSettings *DevSettings `json:"dev_settings,omitempty" yaml:"dev_settings,omitempty"`
}
func (*Root) GetRootLogger ¶
func (*Root) MustGetService ¶
type ServiceAdminApi ¶
type ServiceAdminApi struct {
ServiceHttp
Ui *ServiceAdminUi `json:"ui" yaml:"ui"`
SessionTimeoutVal *HumanDuration `json:"session_timeout" yaml:"session_timeout"`
XsrfRequestQueueDepthVal *int `json:"xsrf_request_queue_depth" yaml:"xsrf_request_queue_depth"`
StaticVal *ServicePublicStaticContentConfig `json:"static,omitempty" yaml:"static,omitempty"`
CookieVal *CookieConfig `json:"cookie,omitempty" yaml:"cookie,omitempty"`
}
func (*ServiceAdminApi) CookieDomain ¶
func (s *ServiceAdminApi) CookieDomain() string
func (*ServiceAdminApi) CookieSameSite ¶
func (s *ServiceAdminApi) CookieSameSite() http.SameSite
func (*ServiceAdminApi) GetId ¶
func (s *ServiceAdminApi) GetId() ServiceId
func (*ServiceAdminApi) SessionTimeout ¶
func (s *ServiceAdminApi) SessionTimeout() time.Duration
func (*ServiceAdminApi) SupportsSession ¶
func (s *ServiceAdminApi) SupportsSession() bool
func (*ServiceAdminApi) SupportsUi ¶
func (s *ServiceAdminApi) SupportsUi() bool
func (*ServiceAdminApi) UiBaseUrl ¶
func (s *ServiceAdminApi) UiBaseUrl() string
func (*ServiceAdminApi) UnmarshalYAML ¶
func (s *ServiceAdminApi) UnmarshalYAML(value *yaml.Node) error
func (*ServiceAdminApi) XsrfRequestQueueDepth ¶
func (s *ServiceAdminApi) XsrfRequestQueueDepth() int
type ServiceAdminUi ¶
type ServiceAdminUi struct {
Enabled bool `json:"enabled" yaml:"enabled"`
BaseUrl *StringValue `json:"base_url" yaml:"base_url"`
// InitiateSessionUrl is the URL that will be redirected to in order to establish a session for an actor. This
// happens if the admin portal is accessed without coming from a pre-authorized context. This URL should
// take a `redirect_url` query parameter where the actor should be redirected to following successful authentication.
// When redirecting to `redirect_url`, the host application should append an `auth_token` query param with a signed
// JWT for authenticating the user. This JWT should use a nonce and expiration to protect against session
// hijacking
InitiateSessionUrl string `json:"initiate_session_url" yaml:"initiate_session_url"`
}
func (*ServiceAdminUi) GetInitiateSessionUrl ¶
func (s *ServiceAdminUi) GetInitiateSessionUrl(returnTo string) string
type ServiceApi ¶
type ServiceApi struct {
ServiceHttp
}
func (*ServiceApi) GetId ¶
func (s *ServiceApi) GetId() ServiceId
func (*ServiceApi) SupportsSession ¶
func (s *ServiceApi) SupportsSession() bool
func (*ServiceApi) UnmarshalYAML ¶
func (s *ServiceApi) UnmarshalYAML(value *yaml.Node) error
type ServiceCommon ¶
type ServiceCommon struct {
HealthCheckPortVal *IntegerValue `json:"health_check_port,omitempty" yaml:"health_check_port,omitempty"`
}
type ServiceHttp ¶
type ServiceHttp struct {
ServiceCommon `json:",inline" yaml:",inline"`
PortVal *IntegerValue `json:"port" yaml:"port"`
DomainVal string `json:"domain" yaml:"domain"`
IsHttpsVal bool `json:"https" yaml:"https"`
CorsVal *CorsConfig `json:"cors,omitempty" yaml:"cors,omitempty"`
TlsVal TlsConfig `json:"tls,omitempty" yaml:"tls,omitempty"`
}
func (*ServiceHttp) Domain ¶
func (s *ServiceHttp) Domain() string
func (*ServiceHttp) GetBaseUrl ¶
func (s *ServiceHttp) GetBaseUrl() string
func (*ServiceHttp) GetServerAndHealthChecker ¶
func (s *ServiceHttp) GetServerAndHealthChecker( server http.Handler, healthChecker http.Handler, ) (httpServer *http.Server, httpHealthChecker *http.Server, err error)
GetServerAndHealthChecker returns a configured HTTP server based on the handler provided along with the configuration specified in this object. Outside logic should combine the health checker into the server if they share the same port.
func (*ServiceHttp) HealthCheckPort ¶
func (s *ServiceHttp) HealthCheckPort() uint64
func (*ServiceHttp) IsHttps ¶
func (s *ServiceHttp) IsHttps() bool
func (*ServiceHttp) Port ¶
func (s *ServiceHttp) Port() uint64
type ServicePublic ¶
type ServicePublic struct {
ServiceHttp
SessionTimeoutVal *HumanDuration `json:"session_timeout" yaml:"session_timeout"`
XsrfRequestQueueDepthVal *int `json:"xsrf_request_queue_depth" yaml:"xsrf_request_queue_depth"`
EnableMarketplaceApisVal *bool `json:"enable_marketplace_apis,omitempty" yaml:"enable_marketplace_apis,omitempty"`
EnableProxyVal *bool `json:"enable_proxy,omitempty" yaml:"enable_proxy,omitempty"`
StaticVal *ServicePublicStaticContentConfig `json:"static,omitempty" yaml:"static,omitempty"`
CookieVal *CookieConfig `json:"cookie,omitempty" yaml:"cookie,omitempty"`
}
func (*ServicePublic) CookieDomain ¶
func (s *ServicePublic) CookieDomain() string
func (*ServicePublic) CookieSameSite ¶
func (s *ServicePublic) CookieSameSite() http.SameSite
func (*ServicePublic) EnableMarketplaceApis ¶
func (s *ServicePublic) EnableMarketplaceApis() bool
EnableMarketplaceApis determines if the APIs to support the marketplace are exposed on the public API to make them available via session. Defaults to true if not set. Disable this feature if the host application is wrapping the API service directly with its own custom marketplace app.
func (*ServicePublic) EnableProxy ¶
func (s *ServicePublic) EnableProxy() bool
EnableProxy determines if proxying to 3rd parties is enabled on the public service. Defaults to false if unspecified. Enabling the 3rd party proxy on public can allow custom logic in the marketplace where the client makes calls directly to the 3rd party. This increases the surface area for security risks, however.
func (*ServicePublic) GetId ¶
func (s *ServicePublic) GetId() ServiceId
func (*ServicePublic) SessionTimeout ¶
func (s *ServicePublic) SessionTimeout() time.Duration
func (*ServicePublic) SupportsSession ¶
func (s *ServicePublic) SupportsSession() bool
func (*ServicePublic) UnmarshalYAML ¶
func (s *ServicePublic) UnmarshalYAML(value *yaml.Node) error
func (*ServicePublic) XsrfRequestQueueDepth ¶
func (s *ServicePublic) XsrfRequestQueueDepth() int
type ServicePublicStaticContentConfig ¶
type ServicePublicStaticContentConfig struct {
MountAtPath string `json:"mount_at" yaml:"mount_at"`
ServeFromPath string `json:"serve_from" yaml:"serve_from"`
}
ServicePublicStaticContentConfig is a configuration to have the public service serve static content in addition to its other functions. This can be used to serve the marketplace SPA directly.
type ServiceWorker ¶
type ServiceWorker struct {
ServiceCommon `json:",inline" yaml:",inline"`
ConcurrencyVal *StringValue `json:"concurrency" yaml:"concurrency"`
CronSyncInterval *HumanDuration `json:"cron_sync_interval,omitempty" yaml:"cron_sync_interval,omitempty"`
}
func (*ServiceWorker) GetConcurrency ¶
func (s *ServiceWorker) GetConcurrency(ctx context.Context) int
func (*ServiceWorker) GetCronSyncInterval ¶
func (s *ServiceWorker) GetCronSyncInterval() time.Duration
func (*ServiceWorker) GetId ¶
func (s *ServiceWorker) GetId() ServiceId
func (*ServiceWorker) HealthCheckPort ¶
func (s *ServiceWorker) HealthCheckPort() uint64
type StringValue ¶
type StringValue = common.StringValue
Re-export types from the common sub-package
type StringValueBase64 ¶
type StringValueBase64 = common.StringValueBase64
Re-export types from the common sub-package
type StringValueDirect ¶
type StringValueDirect = common.StringValueDirect
Re-export types from the common sub-package
type StringValueEnvVar ¶
type StringValueEnvVar = common.StringValueEnvVar
Re-export types from the common sub-package
type StringValueEnvVarBase64 ¶
type StringValueEnvVarBase64 = common.StringValueEnvVarBase64
Re-export types from the common sub-package
type StringValueFile ¶
type StringValueFile = common.StringValueFile
Re-export types from the common sub-package
type SystemAuth ¶
type SystemAuth struct {
JwtSigningKey *Key `json:"jwt_signing_key" yaml:"jwt_signing_key"`
JwtIssuerVal string `json:"jwt_issuer" yaml:"jwt_issuer"`
JwtTokenDurationVal time.Duration `json:"jwt_token_duration" yaml:"jwt_token_duration"`
DisableXSRF bool `json:"disable_xsrf" yaml:"disable_xsrf"`
Actors *ConfiguredActors `json:"actors" yaml:"actors"`
GlobalAESKey *KeyData `json:"global_aes_key" yaml:"global_aes_key"`
}
func (*SystemAuth) JwtIssuer ¶
func (sa *SystemAuth) JwtIssuer() string
func (*SystemAuth) JwtTokenDuration ¶
func (sa *SystemAuth) JwtTokenDuration() time.Duration
type Tasks ¶
type Tasks struct {
// Default retention for tasks unless a value is explicitly set
DefaultRetention *HumanDuration `json:"default_retention,omitempty" yaml:"default_retention,omitempty"`
}
type TlsConfigLetsEncrypt ¶
type TlsConfigLetsEncrypt struct {
AcceptTos bool `json:"accept_tos" yaml:"accept_tos"`
Email string `json:"email" yaml:"email"`
HostWhitelist []string `json:"host_whitelist" yaml:"host_whitelist"`
RenewBefore *HumanDuration `json:"renew_before,omitempty" yaml:"renew_before,omitempty"`
CacheDir string `json:"cache_dir" yaml:"cache_dir"`
}
func (*TlsConfigLetsEncrypt) TlsConfig ¶
func (tle *TlsConfigLetsEncrypt) TlsConfig(ctx context.Context, s HttpServiceLike) (*tls.Config, error)
type TlsConfigSelfSignedAutogen ¶
type TlsConfigSelfSignedAutogen struct {
AutoGenPath string `json:"auto_gen_path" yaml:"auto_gen_path"`
}
func (*TlsConfigSelfSignedAutogen) TlsConfig ¶
func (a *TlsConfigSelfSignedAutogen) TlsConfig(ctx context.Context, s HttpServiceLike) (*tls.Config, error)
type TlsConfigVals ¶
type TlsConfigVals struct {
Cert *KeyData `json:"cert" yaml:"cert"`
Key *KeyData `json:"key" yaml:"key"`
}
func (*TlsConfigVals) TlsConfig ¶
func (tcv *TlsConfigVals) TlsConfig(ctx context.Context, s HttpServiceLike) (*tls.Config, error)
Source Files
¶
- admin_user.go
- admin_users.go
- admin_users_external_source.go
- admin_users_list.go
- aws_credentials.go
- aws_credentials_access_key.go
- aws_credentials_implicit.go
- aws_credentials_serialization_json.go
- aws_credentials_serialization_yaml.go
- blob_storage.go
- blob_storage_memory.go
- blob_storage_s3.go
- blob_storage_serialization_json.go
- blob_storage_serialization_yaml.go
- configured_actor.go
- configured_actors.go
- configured_actors_external_source.go
- configured_actors_list.go
- connections.go
- cors_config.go
- database.go
- database_clickhouse.go
- database_postgres.go
- database_serialization_json.go
- database_serialization_yaml.go
- database_sqlite.go
- dev_settings.go
- error_pages.go
- host_application.go
- http_logging.go
- key.go
- key_data.go
- key_data_aws_secret.go
- key_data_base64_val.go
- key_data_cached.go
- key_data_env_var.go
- key_data_env_var_base64.go
- key_data_file.go
- key_data_gcp_secret.go
- key_data_json_helper.go
- key_data_mock.go
- key_data_random_bytes.go
- key_data_raw_val.go
- key_data_serialization_json.go
- key_data_serialization_yaml.go
- key_data_value.go
- key_data_vault.go
- key_data_vault_retry.go
- key_public_private.go
- key_serialization_json.go
- key_serialization_yaml.go
- key_shared.go
- key_version_info.go
- logging.go
- logging_json.go
- logging_none.go
- logging_serialization_json.go
- logging_serialization_yaml.go
- logging_text.go
- logging_tint.go
- marketplace.go
- oauth.go
- redis.go
- redis_miniredis.go
- redis_real.go
- redis_serialization_json.go
- redis_serialization_yaml.go
- reexport.go
- root.go
- schema.go
- service.go
- service_admin_api.go
- service_api.go
- service_common.go
- service_public.go
- service_worker.go
- system_auth.go
- tasks.go
- tls_config.go
- tls_config_lets_encrypt.go
- tls_config_self_signed_autogen.go
- tls_config_vals.go