Merge pull request #3412 from owncloud/fix-yaml-config
use yaml tag instead of ocisConfig
This commit is contained in:
@@ -8,78 +8,78 @@ import (
|
|||||||
|
|
||||||
// Config combines all available configuration parts.
|
// Config combines all available configuration parts.
|
||||||
type Config struct {
|
type Config struct {
|
||||||
*shared.Commons `ocisConfig:"-" yaml:"-"`
|
*shared.Commons `yaml:"-"`
|
||||||
|
|
||||||
Service Service `ocisConfig:"-" yaml:"-"`
|
Service Service `yaml:"-"`
|
||||||
|
|
||||||
Tracing *Tracing `ocisConfig:"tracing"`
|
Tracing *Tracing `yaml:"tracing"`
|
||||||
Log *Log `ocisConfig:"log"`
|
Log *Log `yaml:"log"`
|
||||||
Debug Debug `ocisConfig:"debug"`
|
Debug Debug `yaml:"debug"`
|
||||||
|
|
||||||
HTTP HTTP `ocisConfig:"http"`
|
HTTP HTTP `yaml:"http"`
|
||||||
GRPC GRPC `ocisConfig:"grpc"`
|
GRPC GRPC `yaml:"grpc"`
|
||||||
|
|
||||||
TokenManager TokenManager `ocisConfig:"token_manager"`
|
TokenManager TokenManager `yaml:"token_manager"`
|
||||||
|
|
||||||
Asset Asset `ocisConfig:"asset"`
|
Asset Asset `yaml:"asset"`
|
||||||
Repo Repo `ocisConfig:"repo"`
|
Repo Repo `yaml:"repo"`
|
||||||
Index Index `ocisConfig:"index"`
|
Index Index `yaml:"index"`
|
||||||
ServiceUser ServiceUser `ocisConfig:"service_user"`
|
ServiceUser ServiceUser `yaml:"service_user"`
|
||||||
HashDifficulty int `ocisConfig:"hash_difficulty" env:"ACCOUNTS_HASH_DIFFICULTY" desc:"The hash difficulty makes sure that validating a password takes at least a certain amount of time."`
|
HashDifficulty int `yaml:"hash_difficulty" env:"ACCOUNTS_HASH_DIFFICULTY" desc:"The hash difficulty makes sure that validating a password takes at least a certain amount of time."`
|
||||||
DemoUsersAndGroups bool `ocisConfig:"demo_users_and_groups" env:"ACCOUNTS_DEMO_USERS_AND_GROUPS" desc:"If this flag is set the service will setup the demo users and groups."`
|
DemoUsersAndGroups bool `yaml:"demo_users_and_groups" env:"ACCOUNTS_DEMO_USERS_AND_GROUPS" desc:"If this flag is set the service will setup the demo users and groups."`
|
||||||
|
|
||||||
Context context.Context `ocisConfig:"-" yaml:"-"`
|
Context context.Context `yaml:"-"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// Asset defines the available asset configuration.
|
// Asset defines the available asset configuration.
|
||||||
type Asset struct {
|
type Asset struct {
|
||||||
Path string `ocisConfig:"path" env:"ACCOUNTS_ASSET_PATH" desc:"The path to the ui assets."`
|
Path string `yaml:"path" env:"ACCOUNTS_ASSET_PATH" desc:"The path to the ui assets."`
|
||||||
}
|
}
|
||||||
|
|
||||||
// TokenManager is the config for using the reva token manager
|
// TokenManager is the config for using the reva token manager
|
||||||
type TokenManager struct {
|
type TokenManager struct {
|
||||||
JWTSecret string `ocisConfig:"jwt_secret" env:"OCIS_JWT_SECRET;ACCOUNTS_JWT_SECRET" desc:"The secret to mint jwt tokens."`
|
JWTSecret string `yaml:"jwt_secret" env:"OCIS_JWT_SECRET;ACCOUNTS_JWT_SECRET" desc:"The secret to mint jwt tokens."`
|
||||||
}
|
}
|
||||||
|
|
||||||
// Repo defines which storage implementation is to be used.
|
// Repo defines which storage implementation is to be used.
|
||||||
type Repo struct {
|
type Repo struct {
|
||||||
Backend string `ocisConfig:"backend" env:"ACCOUNTS_STORAGE_BACKEND" desc:"Defines which storage implementation is to be used"`
|
Backend string `yaml:"backend" env:"ACCOUNTS_STORAGE_BACKEND" desc:"Defines which storage implementation is to be used"`
|
||||||
Disk Disk `ocisConfig:"disk"`
|
Disk Disk `yaml:"disk"`
|
||||||
CS3 CS3 `ocisConfig:"cs3"`
|
CS3 CS3 `yaml:"cs3"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// Disk is the local disk implementation of the storage.
|
// Disk is the local disk implementation of the storage.
|
||||||
type Disk struct {
|
type Disk struct {
|
||||||
Path string `ocisConfig:"path" env:"ACCOUNTS_STORAGE_DISK_PATH" desc:"The path where the accounts data is stored."`
|
Path string `yaml:"path" env:"ACCOUNTS_STORAGE_DISK_PATH" desc:"The path where the accounts data is stored."`
|
||||||
}
|
}
|
||||||
|
|
||||||
// CS3 is the cs3 implementation of the storage.
|
// CS3 is the cs3 implementation of the storage.
|
||||||
type CS3 struct {
|
type CS3 struct {
|
||||||
ProviderAddr string `ocisConfig:"provider_addr" env:"ACCOUNTS_STORAGE_CS3_PROVIDER_ADDR" desc:"The address to the storage provider."`
|
ProviderAddr string `yaml:"provider_addr" env:"ACCOUNTS_STORAGE_CS3_PROVIDER_ADDR" desc:"The address to the storage provider."`
|
||||||
}
|
}
|
||||||
|
|
||||||
// ServiceUser defines the user required for EOS.
|
// ServiceUser defines the user required for EOS.
|
||||||
type ServiceUser struct {
|
type ServiceUser struct {
|
||||||
UUID string `ocisConfig:"uuid" env:"ACCOUNTS_SERVICE_USER_UUID" desc:"The id of the accounts service user."`
|
UUID string `yaml:"uuid" env:"ACCOUNTS_SERVICE_USER_UUID" desc:"The id of the accounts service user."`
|
||||||
Username string `ocisConfig:"username" env:"ACCOUNTS_SERVICE_USER_USERNAME" desc:"The username of the accounts service user."`
|
Username string `yaml:"username" env:"ACCOUNTS_SERVICE_USER_USERNAME" desc:"The username of the accounts service user."`
|
||||||
UID int64 `ocisConfig:"uid" env:"ACCOUNTS_SERVICE_USER_UID" desc:"The uid of the accounts service user."`
|
UID int64 `yaml:"uid" env:"ACCOUNTS_SERVICE_USER_UID" desc:"The uid of the accounts service user."`
|
||||||
GID int64 `ocisConfig:"gid" env:"ACCOUNTS_SERVICE_USER_GID" desc:"The gid of the accounts service user."`
|
GID int64 `yaml:"gid" env:"ACCOUNTS_SERVICE_USER_GID" desc:"The gid of the accounts service user."`
|
||||||
}
|
}
|
||||||
|
|
||||||
// Index defines config for indexes.
|
// Index defines config for indexes.
|
||||||
type Index struct {
|
type Index struct {
|
||||||
UID UIDBound `ocisConfig:"uid"`
|
UID UIDBound `yaml:"uid"`
|
||||||
GID GIDBound `ocisConfig:"gid"`
|
GID GIDBound `yaml:"gid"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// GIDBound defines a lower and upper bound.
|
// GIDBound defines a lower and upper bound.
|
||||||
type GIDBound struct {
|
type GIDBound struct {
|
||||||
Lower int64 `ocisConfig:"lower" env:"ACCOUNTS_GID_INDEX_LOWER_BOUND" desc:"The lowest possible gid value for the indexer."`
|
Lower int64 `yaml:"lower" env:"ACCOUNTS_GID_INDEX_LOWER_BOUND" desc:"The lowest possible gid value for the indexer."`
|
||||||
Upper int64 `ocisConfig:"upper" env:"ACCOUNTS_GID_INDEX_UPPER_BOUND" desc:"The highest possible gid value for the indexer."`
|
Upper int64 `yaml:"upper" env:"ACCOUNTS_GID_INDEX_UPPER_BOUND" desc:"The highest possible gid value for the indexer."`
|
||||||
}
|
}
|
||||||
|
|
||||||
// UIDBound defines a lower and upper bound.
|
// UIDBound defines a lower and upper bound.
|
||||||
type UIDBound struct {
|
type UIDBound struct {
|
||||||
Lower int64 `ocisConfig:"lower" env:"ACCOUNTS_UID_INDEX_LOWER_BOUND" desc:"The lowest possible uid value for the indexer."`
|
Lower int64 `yaml:"lower" env:"ACCOUNTS_UID_INDEX_LOWER_BOUND" desc:"The lowest possible uid value for the indexer."`
|
||||||
Upper int64 `ocisConfig:"upper" env:"ACCOUNTS_UID_INDEX_UPPER_BOUND" desc:"The highest possible uid value for the indexer."`
|
Upper int64 `yaml:"upper" env:"ACCOUNTS_UID_INDEX_UPPER_BOUND" desc:"The highest possible uid value for the indexer."`
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,8 +2,8 @@ package config
|
|||||||
|
|
||||||
// Debug defines the available debug configuration.
|
// Debug defines the available debug configuration.
|
||||||
type Debug struct {
|
type Debug struct {
|
||||||
Addr string `ocisConfig:"addr" env:"ACCOUNTS_DEBUG_ADDR"`
|
Addr string `yaml:"addr" env:"ACCOUNTS_DEBUG_ADDR"`
|
||||||
Token string `ocisConfig:"token" env:"ACCOUNTS_DEBUG_TOKEN"`
|
Token string `yaml:"token" env:"ACCOUNTS_DEBUG_TOKEN"`
|
||||||
Pprof bool `ocisConfig:"pprof" env:"ACCOUNTS_DEBUG_PPROF"`
|
Pprof bool `yaml:"pprof" env:"ACCOUNTS_DEBUG_PPROF"`
|
||||||
Zpages bool `ocisConfig:"zpages" env:"ACCOUNTS_DEBUG_ZPAGES"`
|
Zpages bool `yaml:"zpages" env:"ACCOUNTS_DEBUG_ZPAGES"`
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,6 +2,6 @@ package config
|
|||||||
|
|
||||||
// GRPC defines the available grpc configuration.
|
// GRPC defines the available grpc configuration.
|
||||||
type GRPC struct {
|
type GRPC struct {
|
||||||
Addr string `ocisConfig:"addr" env:"ACCOUNTS_GRPC_ADDR" desc:"The address of the grpc service."`
|
Addr string `yaml:"addr" env:"ACCOUNTS_GRPC_ADDR" desc:"The address of the grpc service."`
|
||||||
Namespace string `ocisConfig:"-" yaml:"-"`
|
Namespace string `yaml:"-"`
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,17 +2,17 @@ package config
|
|||||||
|
|
||||||
// HTTP defines the available http configuration.
|
// HTTP defines the available http configuration.
|
||||||
type HTTP struct {
|
type HTTP struct {
|
||||||
Addr string `ocisConfig:"addr" env:"ACCOUNTS_HTTP_ADDR" desc:"The address of the http service."`
|
Addr string `yaml:"addr" env:"ACCOUNTS_HTTP_ADDR" desc:"The address of the http service."`
|
||||||
Namespace string `ocisConfig:"-" yaml:"-"`
|
Namespace string `yaml:"-"`
|
||||||
Root string `ocisConfig:"root" env:"ACCOUNTS_HTTP_ROOT" desc:"The root path of the http service."`
|
Root string `yaml:"root" env:"ACCOUNTS_HTTP_ROOT" desc:"The root path of the http service."`
|
||||||
CacheTTL int `ocisConfig:"cache_ttl" env:"ACCOUNTS_CACHE_TTL" desc:"The cache time for the static assets."`
|
CacheTTL int `yaml:"cache_ttl" env:"ACCOUNTS_CACHE_TTL" desc:"The cache time for the static assets."`
|
||||||
CORS CORS `ocisConfig:"cors"`
|
CORS CORS `yaml:"cors"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// CORS defines the available cors configuration.
|
// CORS defines the available cors configuration.
|
||||||
type CORS struct {
|
type CORS struct {
|
||||||
AllowedOrigins []string `ocisConfig:"allowed_origins"`
|
AllowedOrigins []string `yaml:"allowed_origins"`
|
||||||
AllowedMethods []string `ocisConfig:"allowed_methods"`
|
AllowedMethods []string `yaml:"allowed_methods"`
|
||||||
AllowedHeaders []string `ocisConfig:"allowed_headers"`
|
AllowedHeaders []string `yaml:"allowed_headers"`
|
||||||
AllowCredentials bool `ocisConfig:"allowed_credentials"`
|
AllowCredentials bool `yaml:"allowed_credentials"`
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,8 +2,8 @@ package config
|
|||||||
|
|
||||||
// Log defines the available log configuration.
|
// Log defines the available log configuration.
|
||||||
type Log struct {
|
type Log struct {
|
||||||
Level string `ocisConfig:"level" env:"OCIS_LOG_LEVEL;ACCOUNTS_LOG_LEVEL" desc:"The log level."`
|
Level string `yaml:"level" env:"OCIS_LOG_LEVEL;ACCOUNTS_LOG_LEVEL" desc:"The log level."`
|
||||||
Pretty bool `ocisConfig:"pretty" env:"OCIS_LOG_PRETTY;ACCOUNTS_LOG_PRETTY" desc:"Activates pretty log output."`
|
Pretty bool `yaml:"pretty" env:"OCIS_LOG_PRETTY;ACCOUNTS_LOG_PRETTY" desc:"Activates pretty log output."`
|
||||||
Color bool `ocisConfig:"color" env:"OCIS_LOG_COLOR;ACCOUNTS_LOG_COLOR" desc:"Activates colorized log output."`
|
Color bool `yaml:"color" env:"OCIS_LOG_COLOR;ACCOUNTS_LOG_COLOR" desc:"Activates colorized log output."`
|
||||||
File string `ocisConfig:"file" env:"OCIS_LOG_FILE;ACCOUNTS_LOG_FILE" desc:"The target log file."`
|
File string `yaml:"file" env:"OCIS_LOG_FILE;ACCOUNTS_LOG_FILE" desc:"The target log file."`
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,5 +2,5 @@ package config
|
|||||||
|
|
||||||
// Service defines the available service configuration.
|
// Service defines the available service configuration.
|
||||||
type Service struct {
|
type Service struct {
|
||||||
Name string `ocisConfig:"-" yaml:"-"`
|
Name string `yaml:"-"`
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,8 +2,8 @@ package config
|
|||||||
|
|
||||||
// Tracing defines the available tracing configuration.
|
// Tracing defines the available tracing configuration.
|
||||||
type Tracing struct {
|
type Tracing struct {
|
||||||
Enabled bool `ocisConfig:"enabled" env:"OCIS_TRACING_ENABLED;ACCOUNTS_TRACING_ENABLED" desc:"Activates tracing."`
|
Enabled bool `yaml:"enabled" env:"OCIS_TRACING_ENABLED;ACCOUNTS_TRACING_ENABLED" desc:"Activates tracing."`
|
||||||
Type string `ocisConfig:"type" env:"OCIS_TRACING_TYPE;ACCOUNTS_TRACING_TYPE"`
|
Type string `yaml:"type" env:"OCIS_TRACING_TYPE;ACCOUNTS_TRACING_TYPE"`
|
||||||
Endpoint string `ocisConfig:"endpoint" env:"OCIS_TRACING_ENDPOINT;ACCOUNTS_TRACING_ENDPOINT" desc:"The endpoint to the tracing collector."`
|
Endpoint string `yaml:"endpoint" env:"OCIS_TRACING_ENDPOINT;ACCOUNTS_TRACING_ENDPOINT" desc:"The endpoint to the tracing collector."`
|
||||||
Collector string `ocisConfig:"collector" env:"OCIS_TRACING_COLLECTOR;ACCOUNTS_TRACING_COLLECTOR"`
|
Collector string `yaml:"collector" env:"OCIS_TRACING_COLLECTOR;ACCOUNTS_TRACING_COLLECTOR"`
|
||||||
}
|
}
|
||||||
|
|||||||
+14
-14
@@ -8,30 +8,30 @@ import (
|
|||||||
|
|
||||||
// Config combines all available configuration parts.
|
// Config combines all available configuration parts.
|
||||||
type Config struct {
|
type Config struct {
|
||||||
*shared.Commons `ocisConfig:"-" yaml:"-"`
|
*shared.Commons `yaml:"-"`
|
||||||
|
|
||||||
Service Service `ocisConfig:"-" yaml:"-"`
|
Service Service `yaml:"-"`
|
||||||
|
|
||||||
Log *Log `ocisConfig:"log"`
|
Log *Log `yaml:"log"`
|
||||||
Debug Debug `ocisConfig:"debug"`
|
Debug Debug `yaml:"debug"`
|
||||||
|
|
||||||
Events Events `ocisConfig:"events"`
|
Events Events `yaml:"events"`
|
||||||
Auditlog Auditlog `ocisConfig:"auditlog"`
|
Auditlog Auditlog `yaml:"auditlog"`
|
||||||
|
|
||||||
Context context.Context `ocisConfig:"-" yaml:"-"`
|
Context context.Context `yaml:"-"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// Events combines the configuration options for the event bus.
|
// Events combines the configuration options for the event bus.
|
||||||
type Events struct {
|
type Events struct {
|
||||||
Endpoint string `ocisConfig:"events_endpoint" env:"AUDIT_EVENTS_ENDPOINT" desc:"the address of the streaming service"`
|
Endpoint string `yaml:"events_endpoint" env:"AUDIT_EVENTS_ENDPOINT" desc:"the address of the streaming service"`
|
||||||
Cluster string `ocisConfig:"events_cluster" env:"AUDIT_EVENTS_CLUSTER" desc:"the clusterID of the streaming service. Mandatory when using nats"`
|
Cluster string `yaml:"events_cluster" env:"AUDIT_EVENTS_CLUSTER" desc:"the clusterID of the streaming service. Mandatory when using nats"`
|
||||||
ConsumerGroup string `ocisConfig:"events_group" env:"AUDIT_EVENTS_GROUP" desc:"the customergroup of the service. One group will only get one vopy of an event"`
|
ConsumerGroup string `yaml:"events_group" env:"AUDIT_EVENTS_GROUP" desc:"the customergroup of the service. One group will only get one vopy of an event"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// Auditlog holds audit log information
|
// Auditlog holds audit log information
|
||||||
type Auditlog struct {
|
type Auditlog struct {
|
||||||
LogToConsole bool `ocisConfig:"log_to_console" env:"AUDIT_LOG_TO_CONSOLE" desc:"logs to Stdout if true"`
|
LogToConsole bool `yaml:"log_to_console" env:"AUDIT_LOG_TO_CONSOLE" desc:"logs to Stdout if true"`
|
||||||
LogToFile bool `ocisConfig:"log_to_file" env:"AUDIT_LOG_TO_FILE" desc:"logs to file if true"`
|
LogToFile bool `yaml:"log_to_file" env:"AUDIT_LOG_TO_FILE" desc:"logs to file if true"`
|
||||||
FilePath string `ocisConfig:"filepath" env:"AUDIT_FILEPATH" desc:"filepath to the logfile. Mandatory if LogToFile is true"`
|
FilePath string `yaml:"filepath" env:"AUDIT_FILEPATH" desc:"filepath to the logfile. Mandatory if LogToFile is true"`
|
||||||
Format string `ocisConfig:"format" env:"AUDIT_FORMAT" desc:"log format. using json is advised"`
|
Format string `yaml:"format" env:"AUDIT_FORMAT" desc:"log format. using json is advised"`
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,8 +2,8 @@ package config
|
|||||||
|
|
||||||
// Debug defines the available debug configuration.
|
// Debug defines the available debug configuration.
|
||||||
type Debug struct {
|
type Debug struct {
|
||||||
Addr string `ocisConfig:"addr" env:"AUDIT_DEBUG_ADDR"`
|
Addr string `yaml:"addr" env:"AUDIT_DEBUG_ADDR"`
|
||||||
Token string `ocisConfig:"token" env:"AUDIT_DEBUG_TOKEN"`
|
Token string `yaml:"token" env:"AUDIT_DEBUG_TOKEN"`
|
||||||
Pprof bool `ocisConfig:"pprof" env:"AUDIT_DEBUG_PPROF"`
|
Pprof bool `yaml:"pprof" env:"AUDIT_DEBUG_PPROF"`
|
||||||
Zpages bool `ocisConfig:"zpages" env:"AUDIT_DEBUG_ZPAGES"`
|
Zpages bool `yaml:"zpages" env:"AUDIT_DEBUG_ZPAGES"`
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,5 +2,5 @@ package config
|
|||||||
|
|
||||||
// Service defines the available service configuration.
|
// Service defines the available service configuration.
|
||||||
type Service struct {
|
type Service struct {
|
||||||
Name string `ocisConfig:"-" yaml:"-"`
|
Name string `yaml:"-"`
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,8 @@
|
|||||||
|
Change: Fix keys with underscores in the config files
|
||||||
|
|
||||||
|
We've fixed some config keys in configuration files that previously didn't contain
|
||||||
|
underscores but should.
|
||||||
|
|
||||||
|
Please check the documentation on https://owncloud.dev for latest configuration documentation.
|
||||||
|
|
||||||
|
https://github.com/owncloud/ocis/pull/3412
|
||||||
+27
-27
@@ -8,45 +8,45 @@ import (
|
|||||||
|
|
||||||
// Config combines all available configuration parts.
|
// Config combines all available configuration parts.
|
||||||
type Config struct {
|
type Config struct {
|
||||||
*shared.Commons `ocisConfig:"-" yaml:"-"`
|
*shared.Commons `yaml:"-"`
|
||||||
|
|
||||||
Service Service `ocisConfig:"-" yaml:"-"`
|
Service Service `yaml:"-"`
|
||||||
|
|
||||||
Tracing *Tracing `ocisConfig:"tracing"`
|
Tracing *Tracing `yaml:"tracing"`
|
||||||
Log *Log `ocisConfig:"log"`
|
Log *Log `yaml:"log"`
|
||||||
Debug Debug `ocisConfig:"debug"`
|
Debug Debug `yaml:"debug"`
|
||||||
|
|
||||||
Ldap Ldap `ocisConfig:"ldap"`
|
Ldap Ldap `yaml:"ldap"`
|
||||||
Ldaps Ldaps `ocisConfig:"ldaps"`
|
Ldaps Ldaps `yaml:"ldaps"`
|
||||||
|
|
||||||
Backend Backend `ocisConfig:"backend"`
|
Backend Backend `yaml:"backend"`
|
||||||
Fallback FallbackBackend `ocisConfig:"fallback"`
|
Fallback FallbackBackend `yaml:"fallback"`
|
||||||
|
|
||||||
RoleBundleUUID string `ocisConfig:"role_bundle_uuid" env:"GLAUTH_ROLE_BUNDLE_ID"`
|
RoleBundleUUID string `yaml:"role_bundle_uuid" env:"GLAUTH_ROLE_BUNDLE_ID"`
|
||||||
|
|
||||||
Context context.Context `ocisConfig:"-" yaml:"-"`
|
Context context.Context `yaml:"-"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// Backend defined the available backend configuration.
|
// Backend defined the available backend configuration.
|
||||||
type Backend struct {
|
type Backend struct {
|
||||||
Datastore string `ocisConfig:"datastore"`
|
Datastore string `yaml:"datastore"`
|
||||||
BaseDN string `ocisConfig:"base_dn"`
|
BaseDN string `yaml:"base_dn"`
|
||||||
Insecure bool `ocisConfig:"insecure"`
|
Insecure bool `yaml:"insecure"`
|
||||||
NameFormat string `ocisConfig:"name_format"`
|
NameFormat string `yaml:"name_format"`
|
||||||
GroupFormat string `ocisConfig:"group_format"`
|
GroupFormat string `yaml:"group_format"`
|
||||||
Servers []string `ocisConfig:"servers"`
|
Servers []string `yaml:"servers"`
|
||||||
SSHKeyAttr string `ocisConfig:"ssh_key_attr"`
|
SSHKeyAttr string `yaml:"ssh_key_attr"`
|
||||||
UseGraphAPI bool `ocisConfig:"use_graph_api"`
|
UseGraphAPI bool `yaml:"use_graph_api"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// FallbackBackend defined the available fallback backend configuration.
|
// FallbackBackend defined the available fallback backend configuration.
|
||||||
type FallbackBackend struct {
|
type FallbackBackend struct {
|
||||||
Datastore string `ocisConfig:"datastore"`
|
Datastore string `yaml:"datastore"`
|
||||||
BaseDN string `ocisConfig:"base_dn"`
|
BaseDN string `yaml:"base_dn"`
|
||||||
Insecure bool `ocisConfig:"insecure"`
|
Insecure bool `yaml:"insecure"`
|
||||||
NameFormat string `ocisConfig:"name_format"`
|
NameFormat string `yaml:"name_format"`
|
||||||
GroupFormat string `ocisConfig:"group_format"`
|
GroupFormat string `yaml:"group_format"`
|
||||||
Servers []string `ocisConfig:"servers"`
|
Servers []string `yaml:"servers"`
|
||||||
SSHKeyAttr string `ocisConfig:"ssh_key_attr"`
|
SSHKeyAttr string `yaml:"ssh_key_attr"`
|
||||||
UseGraphAPI bool `ocisConfig:"use_graph_api"`
|
UseGraphAPI bool `yaml:"use_graph_api"`
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,8 +2,8 @@ package config
|
|||||||
|
|
||||||
// Debug defines the available debug configuration.
|
// Debug defines the available debug configuration.
|
||||||
type Debug struct {
|
type Debug struct {
|
||||||
Addr string `ocisConfig:"addr" env:"GLAUTH_DEBUG_ADDR"`
|
Addr string `yaml:"addr" env:"GLAUTH_DEBUG_ADDR"`
|
||||||
Token string `ocisConfig:"token" env:"GLAUTH_DEBUG_TOKEN"`
|
Token string `yaml:"token" env:"GLAUTH_DEBUG_TOKEN"`
|
||||||
Pprof bool `ocisConfig:"pprof" env:"GLAUTH_DEBUG_PPROF"`
|
Pprof bool `yaml:"pprof" env:"GLAUTH_DEBUG_PPROF"`
|
||||||
Zpages bool `ocisConfig:"zpages" env:"GLAUTH_DEBUG_ZPAGES"`
|
Zpages bool `yaml:"zpages" env:"GLAUTH_DEBUG_ZPAGES"`
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ package config
|
|||||||
|
|
||||||
// Ldap defines the available LDAP configuration.
|
// Ldap defines the available LDAP configuration.
|
||||||
type Ldap struct {
|
type Ldap struct {
|
||||||
Enabled bool `ocisConfig:"enabled" env:"GLAUTH_LDAP_ENABLED"`
|
Enabled bool `yaml:"enabled" env:"GLAUTH_LDAP_ENABLED"`
|
||||||
Addr string `ocisConfig:"addr" env:"GLAUTH_LDAP_ADDR"`
|
Addr string `yaml:"addr" env:"GLAUTH_LDAP_ADDR"`
|
||||||
Namespace string `ocisConfig:"-" yaml:"-"`
|
Namespace string `yaml:"-"`
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,9 +2,9 @@ package config
|
|||||||
|
|
||||||
// Ldaps defined the available LDAPS configuration.
|
// Ldaps defined the available LDAPS configuration.
|
||||||
type Ldaps struct {
|
type Ldaps struct {
|
||||||
Enabled bool `ocisConfig:"enabled" env:"GLAUTH_LDAPS_ENABLED"`
|
Enabled bool `yaml:"enabled" env:"GLAUTH_LDAPS_ENABLED"`
|
||||||
Addr string `ocisConfig:"addr" env:"GLAUTH_LDAPS_ADDR"`
|
Addr string `yaml:"addr" env:"GLAUTH_LDAPS_ADDR"`
|
||||||
Namespace string `ocisConfig:"-" yaml:"-"`
|
Namespace string `yaml:"-"`
|
||||||
Cert string `ocisConfig:"cert" env:"GLAUTH_LDAPS_CERT"`
|
Cert string `yaml:"cert" env:"GLAUTH_LDAPS_CERT"`
|
||||||
Key string `ocisConfig:"key" env:"GLAUTH_LDAPS_KEY"`
|
Key string `yaml:"key" env:"GLAUTH_LDAPS_KEY"`
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,5 +2,5 @@ package config
|
|||||||
|
|
||||||
// Service defines the available service configuration.
|
// Service defines the available service configuration.
|
||||||
type Service struct {
|
type Service struct {
|
||||||
Name string `ocisConfig:"-" yaml:"-"`
|
Name string `yaml:"-"`
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,8 +2,8 @@ package config
|
|||||||
|
|
||||||
// Tracing defines the available tracing configuration.
|
// Tracing defines the available tracing configuration.
|
||||||
type Tracing struct {
|
type Tracing struct {
|
||||||
Enabled bool `ocisConfig:"enabled" env:"OCIS_TRACING_ENABLED;GLAUTH_TRACING_ENABLED"`
|
Enabled bool `yaml:"enabled" env:"OCIS_TRACING_ENABLED;GLAUTH_TRACING_ENABLED"`
|
||||||
Type string `ocisConfig:"type" env:"OCIS_TRACING_TYPE;GLAUTH_TRACING_TYPE"`
|
Type string `yaml:"type" env:"OCIS_TRACING_TYPE;GLAUTH_TRACING_TYPE"`
|
||||||
Endpoint string `ocisConfig:"endpoint" env:"OCIS_TRACING_ENDPOINT;GLAUTH_TRACING_ENDPOINT"`
|
Endpoint string `yaml:"endpoint" env:"OCIS_TRACING_ENDPOINT;GLAUTH_TRACING_ENDPOINT"`
|
||||||
Collector string `ocisConfig:"collector" env:"OCIS_TRACING_COLLECTOR;GLAUTH_TRACING_COLLECTOR"`
|
Collector string `yaml:"collector" env:"OCIS_TRACING_COLLECTOR;GLAUTH_TRACING_COLLECTOR"`
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -8,25 +8,25 @@ import (
|
|||||||
|
|
||||||
// Config combines all available configuration parts.
|
// Config combines all available configuration parts.
|
||||||
type Config struct {
|
type Config struct {
|
||||||
*shared.Commons `ocisConfig:"-" yaml:"-"`
|
*shared.Commons `yaml:"-"`
|
||||||
|
|
||||||
Service Service `ocisConfig:"-" yaml:"-"`
|
Service Service `yaml:"-"`
|
||||||
|
|
||||||
Tracing *Tracing `ocisConfig:"tracing"`
|
Tracing *Tracing `yaml:"tracing"`
|
||||||
Log *Log `ocisConfig:"log"`
|
Log *Log `yaml:"log"`
|
||||||
Debug Debug `ocisConfig:"debug"`
|
Debug Debug `yaml:"debug"`
|
||||||
|
|
||||||
HTTP HTTP `ocisConfig:"http"`
|
HTTP HTTP `yaml:"http"`
|
||||||
|
|
||||||
GraphExplorer GraphExplorer `ocisConfig:"graph_explorer"`
|
GraphExplorer GraphExplorer `yaml:"graph_explorer"`
|
||||||
|
|
||||||
Context context.Context `ocisConfig:"-" yaml:"-"`
|
Context context.Context `yaml:"-"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// GraphExplorer defines the available graph-explorer configuration.
|
// GraphExplorer defines the available graph-explorer configuration.
|
||||||
type GraphExplorer struct {
|
type GraphExplorer struct {
|
||||||
ClientID string `ocisConfig:"client_id" env:"GRAPH_EXPLORER_CLIENT_ID"`
|
ClientID string `yaml:"client_id" env:"GRAPH_EXPLORER_CLIENT_ID"`
|
||||||
Issuer string `ocisConfig:"issuer" env:"OCIS_URL;GRAPH_EXPLORER_ISSUER"`
|
Issuer string `yaml:"issuer" env:"OCIS_URL;GRAPH_EXPLORER_ISSUER"`
|
||||||
GraphURLBase string `ocisConfig:"graph_url_base" env:"OCIS_URL;GRAPH_EXPLORER_GRAPH_URL_BASE"`
|
GraphURLBase string `yaml:"graph_url_base" env:"OCIS_URL;GRAPH_EXPLORER_GRAPH_URL_BASE"`
|
||||||
GraphURLPath string `ocisConfig:"graph_url_path" env:"GRAPH_EXPLORER_GRAPH_URL_PATH"`
|
GraphURLPath string `yaml:"graph_url_path" env:"GRAPH_EXPLORER_GRAPH_URL_PATH"`
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,8 +2,8 @@ package config
|
|||||||
|
|
||||||
// Debug defines the available debug configuration.
|
// Debug defines the available debug configuration.
|
||||||
type Debug struct {
|
type Debug struct {
|
||||||
Addr string `ocisConfig:"addr" env:"GRAPH_EXPLORER_DEBUG_ADDR"`
|
Addr string `yaml:"addr" env:"GRAPH_EXPLORER_DEBUG_ADDR"`
|
||||||
Token string `ocisConfig:"token" env:"GRAPH_EXPLORER_DEBUG_TOKEN"`
|
Token string `yaml:"token" env:"GRAPH_EXPLORER_DEBUG_TOKEN"`
|
||||||
Pprof bool `ocisConfig:"pprof" env:"GRAPH_EXPLORER_DEBUG_PPROF"`
|
Pprof bool `yaml:"pprof" env:"GRAPH_EXPLORER_DEBUG_PPROF"`
|
||||||
Zpages bool `ocisConfig:"zpages" env:"GRAPH_EXPLORER_DEBUG_ZPAGES"`
|
Zpages bool `yaml:"zpages" env:"GRAPH_EXPLORER_DEBUG_ZPAGES"`
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,15 +2,15 @@ package config
|
|||||||
|
|
||||||
// HTTP defines the available http configuration.
|
// HTTP defines the available http configuration.
|
||||||
type HTTP struct {
|
type HTTP struct {
|
||||||
Addr string `ocisConfig:"addr" env:"GRAPH_EXPLORER_HTTP_ADDR"`
|
Addr string `yaml:"addr" env:"GRAPH_EXPLORER_HTTP_ADDR"`
|
||||||
Root string `ocisConfig:"root" env:"GRAPH_EXPLORER_HTTP_ROOT"`
|
Root string `yaml:"root" env:"GRAPH_EXPLORER_HTTP_ROOT"`
|
||||||
Namespace string `ocisConfig:"-" yaml:"-"`
|
Namespace string `yaml:"-"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// CORS defines the available cors configuration.
|
// CORS defines the available cors configuration.
|
||||||
type CORS struct {
|
type CORS struct {
|
||||||
AllowedOrigins []string `ocisConfig:"allowed_origins"`
|
AllowedOrigins []string `yaml:"allowed_origins"`
|
||||||
AllowedMethods []string `ocisConfig:"allowed_methods"`
|
AllowedMethods []string `yaml:"allowed_methods"`
|
||||||
AllowedHeaders []string `ocisConfig:"allowed_headers"`
|
AllowedHeaders []string `yaml:"allowed_headers"`
|
||||||
AllowCredentials bool `ocisConfig:"allowed_credentials"`
|
AllowCredentials bool `yaml:"allowed_credentials"`
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,5 +2,5 @@ package config
|
|||||||
|
|
||||||
// Service defines the available service configuration.
|
// Service defines the available service configuration.
|
||||||
type Service struct {
|
type Service struct {
|
||||||
Name string `ocisConfig:"-" yaml:"-"`
|
Name string `yaml:"-"`
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,8 +2,8 @@ package config
|
|||||||
|
|
||||||
// Tracing defines the available tracing configuration.
|
// Tracing defines the available tracing configuration.
|
||||||
type Tracing struct {
|
type Tracing struct {
|
||||||
Enabled bool `ocisConfig:"enabled" env:"OCIS_TRACING_ENABLED;GRAPH_EXPLORER_TRACING_ENABLED"`
|
Enabled bool `yaml:"enabled" env:"OCIS_TRACING_ENABLED;GRAPH_EXPLORER_TRACING_ENABLED"`
|
||||||
Type string `ocisConfig:"type" env:"OCIS_TRACING_TYPE;GRAPH_EXPLORER_TRACING_TYPE"`
|
Type string `yaml:"type" env:"OCIS_TRACING_TYPE;GRAPH_EXPLORER_TRACING_TYPE"`
|
||||||
Endpoint string `ocisConfig:"endpoint" env:"OCIS_TRACING_ENDPOINT;GRAPH_EXPLORER_TRACING_ENDPOINT"`
|
Endpoint string `yaml:"endpoint" env:"OCIS_TRACING_ENDPOINT;GRAPH_EXPLORER_TRACING_ENDPOINT"`
|
||||||
Collector string `ocisConfig:"collector" env:"OCIS_TRACING_COLLECTOR;GRAPH_EXPLORER_TRACING_COLLECTOR"`
|
Collector string `yaml:"collector" env:"OCIS_TRACING_COLLECTOR;GRAPH_EXPLORER_TRACING_COLLECTOR"`
|
||||||
}
|
}
|
||||||
|
|||||||
+36
-36
@@ -8,57 +8,57 @@ import (
|
|||||||
|
|
||||||
// Config combines all available configuration parts.
|
// Config combines all available configuration parts.
|
||||||
type Config struct {
|
type Config struct {
|
||||||
*shared.Commons `ocisConfig:"-" yaml:"-"`
|
*shared.Commons `yaml:"-"`
|
||||||
|
|
||||||
Service Service `ocisConfig:"-" yaml:"-"`
|
Service Service `yaml:"-"`
|
||||||
|
|
||||||
Tracing *Tracing `ocisConfig:"tracing"`
|
Tracing *Tracing `yaml:"tracing"`
|
||||||
Log *Log `ocisConfig:"log"`
|
Log *Log `yaml:"log"`
|
||||||
Debug Debug `ocisConfig:"debug"`
|
Debug Debug `yaml:"debug"`
|
||||||
|
|
||||||
HTTP HTTP `ocisConfig:"http"`
|
HTTP HTTP `yaml:"http"`
|
||||||
|
|
||||||
Reva Reva `ocisConfig:"reva"`
|
Reva Reva `yaml:"reva"`
|
||||||
TokenManager TokenManager `ocisConfig:"token_manager"`
|
TokenManager TokenManager `yaml:"token_manager"`
|
||||||
|
|
||||||
Spaces Spaces `ocisConfig:"spaces"`
|
Spaces Spaces `yaml:"spaces"`
|
||||||
Identity Identity `ocisConfig:"identity"`
|
Identity Identity `yaml:"identity"`
|
||||||
|
|
||||||
Context context.Context `ocisConfig:"-" yaml:"-"`
|
Context context.Context `yaml:"-"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type Spaces struct {
|
type Spaces struct {
|
||||||
WebDavBase string `ocisConfig:"webdav_base" env:"OCIS_URL;GRAPH_SPACES_WEBDAV_BASE"`
|
WebDavBase string `yaml:"webdav_base" env:"OCIS_URL;GRAPH_SPACES_WEBDAV_BASE"`
|
||||||
WebDavPath string `ocisConfig:"webdav_path" env:"GRAPH_SPACES_WEBDAV_PATH"`
|
WebDavPath string `yaml:"webdav_path" env:"GRAPH_SPACES_WEBDAV_PATH"`
|
||||||
DefaultQuota string `ocisConfig:"default_quota" env:"GRAPH_SPACES_DEFAULT_QUOTA"`
|
DefaultQuota string `yaml:"default_quota" env:"GRAPH_SPACES_DEFAULT_QUOTA"`
|
||||||
Insecure bool `ocisConfig:"insecure" env:"OCIS_INSECURE;GRAPH_SPACES_INSECURE"`
|
Insecure bool `yaml:"insecure" env:"OCIS_INSECURE;GRAPH_SPACES_INSECURE"`
|
||||||
ExtendedSpacePropertiesCacheTTL int `ocisConfig:"extended_space_properties_cache_ttl" env:"GRAPH_SPACES_EXTENDED_SPACE_PROPERTIES_CACHE_TTL"`
|
ExtendedSpacePropertiesCacheTTL int `yaml:"extended_space_properties_cache_ttl" env:"GRAPH_SPACES_EXTENDED_SPACE_PROPERTIES_CACHE_TTL"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type LDAP struct {
|
type LDAP struct {
|
||||||
URI string `ocisConfig:"uri" env:"GRAPH_LDAP_URI"`
|
URI string `yaml:"uri" env:"GRAPH_LDAP_URI"`
|
||||||
Insecure bool `ocisConfig:"insecure" env:"OCIS_INSECURE;GRAPH_LDAP_INSECURE"`
|
Insecure bool `yaml:"insecure" env:"OCIS_INSECURE;GRAPH_LDAP_INSECURE"`
|
||||||
BindDN string `ocisConfig:"bind_dn" env:"GRAPH_LDAP_BIND_DN"`
|
BindDN string `yaml:"bind_dn" env:"GRAPH_LDAP_BIND_DN"`
|
||||||
BindPassword string `ocisConfig:"bind_password" env:"GRAPH_LDAP_BIND_PASSWORD"`
|
BindPassword string `yaml:"bind_password" env:"GRAPH_LDAP_BIND_PASSWORD"`
|
||||||
UseServerUUID bool `ocisConfig:"use_server_uuid" env:"GRAPH_LDAP_SERVER_UUID"`
|
UseServerUUID bool `yaml:"use_server_uuid" env:"GRAPH_LDAP_SERVER_UUID"`
|
||||||
WriteEnabled bool `ocisConfig:"write_enabled" env:"GRAPH_LDAP_SERVER_WRITE_ENABLED"`
|
WriteEnabled bool `yaml:"write_enabled" env:"GRAPH_LDAP_SERVER_WRITE_ENABLED"`
|
||||||
|
|
||||||
UserBaseDN string `ocisConfig:"user_base_dn" env:"GRAPH_LDAP_USER_BASE_DN"`
|
UserBaseDN string `yaml:"user_base_dn" env:"GRAPH_LDAP_USER_BASE_DN"`
|
||||||
UserSearchScope string `ocisConfig:"user_search_scope" env:"GRAPH_LDAP_USER_SCOPE"`
|
UserSearchScope string `yaml:"user_search_scope" env:"GRAPH_LDAP_USER_SCOPE"`
|
||||||
UserFilter string `ocisConfig:"user_filter" env:"GRAPH_LDAP_USER_FILTER"`
|
UserFilter string `yaml:"user_filter" env:"GRAPH_LDAP_USER_FILTER"`
|
||||||
UserEmailAttribute string `ocisConfig:"user_mail_attribute" env:"GRAPH_LDAP_USER_EMAIL_ATTRIBUTE"`
|
UserEmailAttribute string `yaml:"user_mail_attribute" env:"GRAPH_LDAP_USER_EMAIL_ATTRIBUTE"`
|
||||||
UserDisplayNameAttribute string `ocisConfig:"user_displayname_attribute" env:"GRAPH_LDAP_USER_DISPLAYNAME_ATTRIBUTE"`
|
UserDisplayNameAttribute string `yaml:"user_displayname_attribute" env:"GRAPH_LDAP_USER_DISPLAYNAME_ATTRIBUTE"`
|
||||||
UserNameAttribute string `ocisConfig:"user_name_attribute" env:"GRAPH_LDAP_USER_NAME_ATTRIBUTE"`
|
UserNameAttribute string `yaml:"user_name_attribute" env:"GRAPH_LDAP_USER_NAME_ATTRIBUTE"`
|
||||||
UserIDAttribute string `ocisConfig:"user_id_attribute" env:"GRAPH_LDAP_USER_UID_ATTRIBUTE"`
|
UserIDAttribute string `yaml:"user_id_attribute" env:"GRAPH_LDAP_USER_UID_ATTRIBUTE"`
|
||||||
|
|
||||||
GroupBaseDN string `ocisConfig:"group_base_dn" env:"GRAPH_LDAP_GROUP_BASE_DN"`
|
GroupBaseDN string `yaml:"group_base_dn" env:"GRAPH_LDAP_GROUP_BASE_DN"`
|
||||||
GroupSearchScope string `ocisConfig:"group_search_scope" env:"GRAPH_LDAP_GROUP_SEARCH_SCOPE"`
|
GroupSearchScope string `yaml:"group_search_scope" env:"GRAPH_LDAP_GROUP_SEARCH_SCOPE"`
|
||||||
GroupFilter string `ocisConfig:"group_filter" env:"GRAPH_LDAP_GROUP_FILTER"`
|
GroupFilter string `yaml:"group_filter" env:"GRAPH_LDAP_GROUP_FILTER"`
|
||||||
GroupNameAttribute string `ocisConfig:"group_name_attribute" env:"GRAPH_LDAP_GROUP_NAME_ATTRIBUTE"`
|
GroupNameAttribute string `yaml:"group_name_attribute" env:"GRAPH_LDAP_GROUP_NAME_ATTRIBUTE"`
|
||||||
GroupIDAttribute string `ocisConfig:"group_id_attribute" env:"GRAPH_LDAP_GROUP_ID_ATTRIBUTE"`
|
GroupIDAttribute string `yaml:"group_id_attribute" env:"GRAPH_LDAP_GROUP_ID_ATTRIBUTE"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type Identity struct {
|
type Identity struct {
|
||||||
Backend string `ocisConfig:"backend" env:"GRAPH_IDENTITY_BACKEND"`
|
Backend string `yaml:"backend" env:"GRAPH_IDENTITY_BACKEND"`
|
||||||
LDAP LDAP `ocisConfig:"ldap"`
|
LDAP LDAP `yaml:"ldap"`
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,8 +2,8 @@ package config
|
|||||||
|
|
||||||
// Debug defines the available debug configuration.
|
// Debug defines the available debug configuration.
|
||||||
type Debug struct {
|
type Debug struct {
|
||||||
Addr string `ocisConfig:"addr" env:"GRAPH_DEBUG_ADDR"`
|
Addr string `yaml:"addr" env:"GRAPH_DEBUG_ADDR"`
|
||||||
Token string `ocisConfig:"token" env:"GRAPH_DEBUG_TOKEN"`
|
Token string `yaml:"token" env:"GRAPH_DEBUG_TOKEN"`
|
||||||
Pprof bool `ocisConfig:"pprof" env:"GRAPH_DEBUG_PPROF"`
|
Pprof bool `yaml:"pprof" env:"GRAPH_DEBUG_PPROF"`
|
||||||
Zpages bool `ocisConfig:"zpages" env:"GRAPH_DEBUG_ZPAGES"`
|
Zpages bool `yaml:"zpages" env:"GRAPH_DEBUG_ZPAGES"`
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ package config
|
|||||||
|
|
||||||
// HTTP defines the available http configuration.
|
// HTTP defines the available http configuration.
|
||||||
type HTTP struct {
|
type HTTP struct {
|
||||||
Addr string `ocisConfig:"addr" env:"GRAPH_HTTP_ADDR"`
|
Addr string `yaml:"addr" env:"GRAPH_HTTP_ADDR"`
|
||||||
Namespace string `ocisConfig:"-" yaml:"-"`
|
Namespace string `yaml:"-"`
|
||||||
Root string `ocisConfig:"root" env:"GRAPH_HTTP_ROOT"`
|
Root string `yaml:"root" env:"GRAPH_HTTP_ROOT"`
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,10 +2,10 @@ package config
|
|||||||
|
|
||||||
// Reva defines all available REVA configuration.
|
// Reva defines all available REVA configuration.
|
||||||
type Reva struct {
|
type Reva struct {
|
||||||
Address string `ocisConfig:"address" env:"REVA_GATEWAY"`
|
Address string `yaml:"address" env:"REVA_GATEWAY"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// TokenManager is the config for using the reva token manager
|
// TokenManager is the config for using the reva token manager
|
||||||
type TokenManager struct {
|
type TokenManager struct {
|
||||||
JWTSecret string `ocisConfig:"jwt_secret" env:"OCIS_JWT_SECRET;GRAPH_JWT_SECRET"`
|
JWTSecret string `yaml:"jwt_secret" env:"OCIS_JWT_SECRET;GRAPH_JWT_SECRET"`
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,5 +2,5 @@ package config
|
|||||||
|
|
||||||
// Service defines the available service configuration.
|
// Service defines the available service configuration.
|
||||||
type Service struct {
|
type Service struct {
|
||||||
Name string `ocisConfig:"-" yaml:"-"`
|
Name string `yaml:"-"`
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,8 +2,8 @@ package config
|
|||||||
|
|
||||||
// Tracing defines the available tracing configuration.
|
// Tracing defines the available tracing configuration.
|
||||||
type Tracing struct {
|
type Tracing struct {
|
||||||
Enabled bool `ocisConfig:"enabled" env:"OCIS_TRACING_ENABLED;GRAPH_TRACING_ENABLED"`
|
Enabled bool `yaml:"enabled" env:"OCIS_TRACING_ENABLED;GRAPH_TRACING_ENABLED"`
|
||||||
Type string `ocisConfig:"type" env:"OCIS_TRACING_TYPE;GRAPH_TRACING_TYPE"`
|
Type string `yaml:"type" env:"OCIS_TRACING_TYPE;GRAPH_TRACING_TYPE"`
|
||||||
Endpoint string `ocisConfig:"endpoint" env:"OCIS_TRACING_ENDPOINT;GRAPH_TRACING_ENDPOINT"`
|
Endpoint string `yaml:"endpoint" env:"OCIS_TRACING_ENDPOINT;GRAPH_TRACING_ENDPOINT"`
|
||||||
Collector string `ocisConfig:"collector" env:"OCIS_TRACING_COLLECTOR;GRAPH_TRACING_COLLECTOR"`
|
Collector string `yaml:"collector" env:"OCIS_TRACING_COLLECTOR;GRAPH_TRACING_COLLECTOR"`
|
||||||
}
|
}
|
||||||
|
|||||||
+16
-16
@@ -8,31 +8,31 @@ import (
|
|||||||
|
|
||||||
// Config combines all available configuration parts.
|
// Config combines all available configuration parts.
|
||||||
type Config struct {
|
type Config struct {
|
||||||
*shared.Commons `ocisConfig:"-" yaml:"-"`
|
*shared.Commons `yaml:"-"`
|
||||||
|
|
||||||
Service Service `ocisConfig:"-" yaml:"-"`
|
Service Service `yaml:"-"`
|
||||||
|
|
||||||
Tracing *Tracing `ocisConfig:"tracing"`
|
Tracing *Tracing `yaml:"tracing"`
|
||||||
Log *Log `ocisConfig:"log"`
|
Log *Log `yaml:"log"`
|
||||||
Debug Debug `ocisConfig:"debug"`
|
Debug Debug `yaml:"debug"`
|
||||||
|
|
||||||
IDM Settings `ocisConfig:"idm"`
|
IDM Settings `yaml:"idm"`
|
||||||
CreateDemoUsers bool `ocisConfig:"create_demo_users" env:"IDM_CREATE_DEMO_USERS;ACCOUNTS_DEMO_USERS_AND_GROUPS" desc:"Flag to enabe/disable the creation of the demo users"`
|
CreateDemoUsers bool `yaml:"create_demo_users" env:"IDM_CREATE_DEMO_USERS;ACCOUNTS_DEMO_USERS_AND_GROUPS" desc:"Flag to enabe/disable the creation of the demo users"`
|
||||||
|
|
||||||
ServiceUserPasswords ServiceUserPasswords `ocisConfig:"service_user_passwords"`
|
ServiceUserPasswords ServiceUserPasswords `yaml:"service_user_passwords"`
|
||||||
|
|
||||||
Context context.Context `ocisConfig:"-" yaml:"-"`
|
Context context.Context `yaml:"-"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type Settings struct {
|
type Settings struct {
|
||||||
LDAPSAddr string `ocisConfig:"ldaps_addr" env:"IDM_LDAPS_ADDR" desc:"Listen address for the ldaps listener (ip-addr:port)"`
|
LDAPSAddr string `yaml:"ldaps_addr" env:"IDM_LDAPS_ADDR" desc:"Listen address for the ldaps listener (ip-addr:port)"`
|
||||||
Cert string `ocisConfig:"cert" env:"IDM_LDAPS_CERT" desc:"File name of the TLS server certificate for the ldaps listener"`
|
Cert string `yaml:"cert" env:"IDM_LDAPS_CERT" desc:"File name of the TLS server certificate for the ldaps listener"`
|
||||||
Key string `ocisConfig:"cert" env:"IDM_LDAPS_KEY" desc:"File name for the TLS certificate key for the server certificate"`
|
Key string `yaml:"key" env:"IDM_LDAPS_KEY" desc:"File name for the TLS certificate key for the server certificate"`
|
||||||
DatabasePath string `ocisConfig:"database" env:"IDM_DATABASE_PATH" desc:"Full path to the idm backend database"`
|
DatabasePath string `yaml:"database" env:"IDM_DATABASE_PATH" desc:"Full path to the idm backend database"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type ServiceUserPasswords struct {
|
type ServiceUserPasswords struct {
|
||||||
IdmAdmin string `ocisConfig:"admin_password" env:"IDM_ADMIN_PASSWORD" desc:"Password to set for the \"idm\" service users. Either cleartext or an argon2id hash"`
|
IdmAdmin string `yaml:"admin_password" env:"IDM_ADMIN_PASSWORD" desc:"Password to set for the \"idm\" service users. Either cleartext or an argon2id hash"`
|
||||||
Reva string `ocisConfig:"reva_password" env:"IDM_REVASVC_PASSWORD" desc:"Password to set for the \"reva\" service users. Either cleartext or an argon2id hash"`
|
Reva string `yaml:"reva_password" env:"IDM_REVASVC_PASSWORD" desc:"Password to set for the \"reva\" service users. Either cleartext or an argon2id hash"`
|
||||||
Idp string `ocisConfig:"idp_password" env:"IDM_IDPSVC_PASSWORD" desc:"Password to set for the \"idp\" service users. Either cleartext or an argon2id hash"`
|
Idp string `yaml:"idp_password" env:"IDM_IDPSVC_PASSWORD" desc:"Password to set for the \"idp\" service users. Either cleartext or an argon2id hash"`
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,8 +2,8 @@ package config
|
|||||||
|
|
||||||
// Debug defines the available debug configuration.
|
// Debug defines the available debug configuration.
|
||||||
type Debug struct {
|
type Debug struct {
|
||||||
Addr string `ocisConfig:"addr" env:"IDM_DEBUG_ADDR"`
|
Addr string `yaml:"addr" env:"IDM_DEBUG_ADDR"`
|
||||||
Token string `ocisConfig:"token" env:"IDM_DEBUG_TOKEN"`
|
Token string `yaml:"token" env:"IDM_DEBUG_TOKEN"`
|
||||||
Pprof bool `ocisConfig:"pprof" env:"IDM_DEBUG_PPROF"`
|
Pprof bool `yaml:"pprof" env:"IDM_DEBUG_PPROF"`
|
||||||
Zpages bool `ocisConfig:"zpages" env:"IDM_DEBUG_ZPAGES"`
|
Zpages bool `yaml:"zpages" env:"IDM_DEBUG_ZPAGES"`
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,5 +2,5 @@ package config
|
|||||||
|
|
||||||
// Service defines the available service configuration.
|
// Service defines the available service configuration.
|
||||||
type Service struct {
|
type Service struct {
|
||||||
Name string `ocisConfig:"-" yaml:"-"`
|
Name string `yaml:"-"`
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,8 +2,8 @@ package config
|
|||||||
|
|
||||||
// Tracing defines the available tracing configuration.
|
// Tracing defines the available tracing configuration.
|
||||||
type Tracing struct {
|
type Tracing struct {
|
||||||
Enabled bool `ocisConfig:"enabled" env:"OCIS_TRACING_ENABLED;IDM_TRACING_ENABLED"`
|
Enabled bool `yaml:"enabled" env:"OCIS_TRACING_ENABLED;IDM_TRACING_ENABLED"`
|
||||||
Type string `ocisConfig:"type" env:"OCIS_TRACING_TYPE;IDM_TRACING_TYPE"`
|
Type string `yaml:"type" env:"OCIS_TRACING_TYPE;IDM_TRACING_TYPE"`
|
||||||
Endpoint string `ocisConfig:"endpoint" env:"OCIS_TRACING_ENDPOINT;IDM_TRACING_ENDPOINT"`
|
Endpoint string `yaml:"endpoint" env:"OCIS_TRACING_ENDPOINT;IDM_TRACING_ENDPOINT"`
|
||||||
Collector string `ocisConfig:"collector" env:"OCIS_TRACING_COLLECTOR;IDM_TRACING_COLLECTOR"`
|
Collector string `yaml:"collector" env:"OCIS_TRACING_COLLECTOR;IDM_TRACING_COLLECTOR"`
|
||||||
}
|
}
|
||||||
|
|||||||
+47
-47
@@ -8,94 +8,94 @@ import (
|
|||||||
|
|
||||||
// Config combines all available configuration parts.
|
// Config combines all available configuration parts.
|
||||||
type Config struct {
|
type Config struct {
|
||||||
*shared.Commons `ocisConfig:"-" yaml:"-"`
|
*shared.Commons `yaml:"-"`
|
||||||
|
|
||||||
Service Service `ocisConfig:"-" yaml:"-"`
|
Service Service `yaml:"-"`
|
||||||
|
|
||||||
Tracing *Tracing `ocisConfig:"tracing"`
|
Tracing *Tracing `yaml:"tracing"`
|
||||||
Log *Log `ocisConfig:"log"`
|
Log *Log `yaml:"log"`
|
||||||
Debug Debug `ocisConfig:"debug"`
|
Debug Debug `yaml:"debug"`
|
||||||
|
|
||||||
HTTP HTTP `ocisConfig:"http"`
|
HTTP HTTP `yaml:"http"`
|
||||||
|
|
||||||
Asset Asset `ocisConfig:"asset"`
|
Asset Asset `yaml:"asset"`
|
||||||
IDP Settings `ocisConfig:"idp"`
|
IDP Settings `yaml:"idp"`
|
||||||
Ldap Ldap `ocisConfig:"ldap"`
|
Ldap Ldap `yaml:"ldap"`
|
||||||
|
|
||||||
Context context.Context `ocisConfig:"-" yaml:"-"`
|
Context context.Context `yaml:"-"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// Ldap defines the available LDAP configuration.
|
// Ldap defines the available LDAP configuration.
|
||||||
type Ldap struct {
|
type Ldap struct {
|
||||||
URI string `ocisConfig:"uri" env:"IDP_LDAP_URI"`
|
URI string `yaml:"uri" env:"IDP_LDAP_URI"`
|
||||||
|
|
||||||
BindDN string `ocisConfig:"bind_dn" env:"IDP_LDAP_BIND_DN"`
|
BindDN string `yaml:"bind_dn" env:"IDP_LDAP_BIND_DN"`
|
||||||
BindPassword string `ocisConfig:"bind_password" env:"IDP_LDAP_BIND_PASSWORD"`
|
BindPassword string `yaml:"bind_password" env:"IDP_LDAP_BIND_PASSWORD"`
|
||||||
|
|
||||||
BaseDN string `ocisConfig:"base_dn" env:"IDP_LDAP_BASE_DN"`
|
BaseDN string `yaml:"base_dn" env:"IDP_LDAP_BASE_DN"`
|
||||||
Scope string `ocisConfig:"scope" env:"IDP_LDAP_SCOPE"`
|
Scope string `yaml:"scope" env:"IDP_LDAP_SCOPE"`
|
||||||
|
|
||||||
LoginAttribute string `ocisConfig:"login_attribute" env:"IDP_LDAP_LOGIN_ATTRIBUTE"`
|
LoginAttribute string `yaml:"login_attribute" env:"IDP_LDAP_LOGIN_ATTRIBUTE"`
|
||||||
EmailAttribute string `ocisConfig:"email_attribute" env:"IDP_LDAP_EMAIL_ATTRIBUTE"`
|
EmailAttribute string `yaml:"email_attribute" env:"IDP_LDAP_EMAIL_ATTRIBUTE"`
|
||||||
NameAttribute string `ocisConfig:"name_attribute" env:"IDP_LDAP_NAME_ATTRIBUTE"`
|
NameAttribute string `yaml:"name_attribute" env:"IDP_LDAP_NAME_ATTRIBUTE"`
|
||||||
UUIDAttribute string `ocisConfig:"uuid_attribute" env:"IDP_LDAP_UUID_ATTRIBUTE"`
|
UUIDAttribute string `yaml:"uuid_attribute" env:"IDP_LDAP_UUID_ATTRIBUTE"`
|
||||||
UUIDAttributeType string `ocisConfig:"uuid_attribute_type" env:"IDP_LDAP_UUID_ATTRIBUTE_TYPE"`
|
UUIDAttributeType string `yaml:"uuid_attribute_type" env:"IDP_LDAP_UUID_ATTRIBUTE_TYPE"`
|
||||||
|
|
||||||
Filter string `ocisConfig:"filter" env:"IDP_LDAP_FILTER"`
|
Filter string `yaml:"filter" env:"IDP_LDAP_FILTER"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// Asset defines the available asset configuration.
|
// Asset defines the available asset configuration.
|
||||||
type Asset struct {
|
type Asset struct {
|
||||||
Path string `ocisConfig:"asset" env:"IDP_ASSET_PATH"`
|
Path string `yaml:"asset" env:"IDP_ASSET_PATH"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type Settings struct {
|
type Settings struct {
|
||||||
// don't change the order of elements in this struct
|
// don't change the order of elements in this struct
|
||||||
// it needs to match github.com/libregraph/lico/bootstrap.Settings
|
// it needs to match github.com/libregraph/lico/bootstrap.Settings
|
||||||
|
|
||||||
Iss string `ocisConfig:"iss" env:"OCIS_URL;IDP_ISS"`
|
Iss string `yaml:"iss" env:"OCIS_URL;IDP_ISS"`
|
||||||
|
|
||||||
IdentityManager string `ocisConfig:"identity_manager" env:"IDP_IDENTITY_MANAGER"`
|
IdentityManager string `yaml:"identity_manager" env:"IDP_IDENTITY_MANAGER"`
|
||||||
|
|
||||||
URIBasePath string `ocisConfig:"uri_base_path" env:"IDP_URI_BASE_PATH"`
|
URIBasePath string `yaml:"uri_base_path" env:"IDP_URI_BASE_PATH"`
|
||||||
|
|
||||||
SignInURI string `ocisConfig:"sign_in_uri" env:"IDP_SIGN_IN_URI"`
|
SignInURI string `yaml:"sign_in_uri" env:"IDP_SIGN_IN_URI"`
|
||||||
SignedOutURI string `ocisConfig:"signed_out_uri" env:"IDP_SIGN_OUT_URI"`
|
SignedOutURI string `yaml:"signed_out_uri" env:"IDP_SIGN_OUT_URI"`
|
||||||
|
|
||||||
AuthorizationEndpointURI string `ocisConfig:"authorization_endpoint_uri" env:"IDP_ENDPOINT_URI"`
|
AuthorizationEndpointURI string `yaml:"authorization_endpoint_uri" env:"IDP_ENDPOINT_URI"`
|
||||||
EndsessionEndpointURI string `ocisConfig:"end_session_endpoint_uri" env:"IDP_ENDSESSION_ENDPOINT_URI"`
|
EndsessionEndpointURI string `yaml:"end_session_endpoint_uri" env:"IDP_ENDSESSION_ENDPOINT_URI"`
|
||||||
|
|
||||||
Insecure bool `ocisConfig:"insecure" env:"IDP_INSECURE"`
|
Insecure bool `yaml:"insecure" env:"IDP_INSECURE"`
|
||||||
|
|
||||||
TrustedProxy []string `ocisConfig:"trusted_proxy"` //TODO: how to configure this via env?
|
TrustedProxy []string `yaml:"trusted_proxy"` //TODO: how to configure this via env?
|
||||||
|
|
||||||
AllowScope []string `ocisConfig:"allow_scope"` // TODO: is this even needed?
|
AllowScope []string `yaml:"allow_scope"` // TODO: is this even needed?
|
||||||
AllowClientGuests bool `ocisConfig:"allow_client_guests" env:"IDP_ALLOW_CLIENT_GUESTS"`
|
AllowClientGuests bool `yaml:"allow_client_guests" env:"IDP_ALLOW_CLIENT_GUESTS"`
|
||||||
AllowDynamicClientRegistration bool `ocisConfig:"allow_dynamic_client_registration" env:"IDP_ALLOW_DYNAMIC_CLIENT_REGISTRATION"`
|
AllowDynamicClientRegistration bool `yaml:"allow_dynamic_client_registration" env:"IDP_ALLOW_DYNAMIC_CLIENT_REGISTRATION"`
|
||||||
|
|
||||||
EncryptionSecretFile string `ocisConfig:"encrypt_secret_file" env:"IDP_ENCRYPTION_SECRET"`
|
EncryptionSecretFile string `yaml:"encrypt_secret_file" env:"IDP_ENCRYPTION_SECRET"`
|
||||||
|
|
||||||
Listen string
|
Listen string
|
||||||
|
|
||||||
IdentifierClientDisabled bool `ocisConfig:"identifier_client_disabled" env:"IDP_DISABLE_IDENTIFIER_WEBAPP"`
|
IdentifierClientDisabled bool `yaml:"identifier_client_disabled" env:"IDP_DISABLE_IDENTIFIER_WEBAPP"`
|
||||||
IdentifierClientPath string `ocisConfig:"identifier_client_path" env:"IDP_IDENTIFIER_CLIENT_PATH"`
|
IdentifierClientPath string `yaml:"identifier_client_path" env:"IDP_IDENTIFIER_CLIENT_PATH"`
|
||||||
IdentifierRegistrationConf string `ocisConfig:"identifier_registration_conf" env:"IDP_IDENTIFIER_REGISTRATION_CONF"`
|
IdentifierRegistrationConf string `yaml:"identifier_registration_conf" env:"IDP_IDENTIFIER_REGISTRATION_CONF"`
|
||||||
IdentifierScopesConf string `ocisConfig:"identifier_scopes_conf" env:"IDP_IDENTIFIER_SCOPES_CONF"`
|
IdentifierScopesConf string `yaml:"identifier_scopes_conf" env:"IDP_IDENTIFIER_SCOPES_CONF"`
|
||||||
IdentifierDefaultBannerLogo string
|
IdentifierDefaultBannerLogo string
|
||||||
IdentifierDefaultSignInPageText string
|
IdentifierDefaultSignInPageText string
|
||||||
IdentifierDefaultUsernameHintText string
|
IdentifierDefaultUsernameHintText string
|
||||||
IdentifierUILocales []string
|
IdentifierUILocales []string
|
||||||
|
|
||||||
SigningKid string `ocisConfig:"signing_kid" env:"IDP_SIGNING_KID"`
|
SigningKid string `yaml:"signing_kid" env:"IDP_SIGNING_KID"`
|
||||||
SigningMethod string `ocisConfig:"signing_method" env:"IDP_SIGNING_METHOD"`
|
SigningMethod string `yaml:"signing_method" env:"IDP_SIGNING_METHOD"`
|
||||||
SigningPrivateKeyFiles []string `ocisConfig:"signing_private_key_files"` // TODO: is this even needed?
|
SigningPrivateKeyFiles []string `yaml:"signing_private_key_files"` // TODO: is this even needed?
|
||||||
ValidationKeysPath string `ocisConfig:"validation_keys_path" env:"IDP_VALIDATION_KEYS_PATH"`
|
ValidationKeysPath string `yaml:"validation_keys_path" env:"IDP_VALIDATION_KEYS_PATH"`
|
||||||
|
|
||||||
CookieBackendURI string
|
CookieBackendURI string
|
||||||
CookieNames []string
|
CookieNames []string
|
||||||
|
|
||||||
AccessTokenDurationSeconds uint64 `ocisConfig:"access_token_duration_seconds" env:"IDP_ACCESS_TOKEN_EXPIRATION"`
|
AccessTokenDurationSeconds uint64 `yaml:"access_token_duration_seconds" env:"IDP_ACCESS_TOKEN_EXPIRATION"`
|
||||||
IDTokenDurationSeconds uint64 `ocisConfig:"id_token_duration_seconds" env:"IDP_ID_TOKEN_EXPIRATION"`
|
IDTokenDurationSeconds uint64 `yaml:"id_token_duration_seconds" env:"IDP_ID_TOKEN_EXPIRATION"`
|
||||||
RefreshTokenDurationSeconds uint64 `ocisConfig:"refresh_token_duration_seconds" env:"IDP_REFRESH_TOKEN_EXPIRATION"`
|
RefreshTokenDurationSeconds uint64 `yaml:"refresh_token_duration_seconds" env:"IDP_REFRESH_TOKEN_EXPIRATION"`
|
||||||
DyamicClientSecretDurationSeconds uint64 `ocisConfig:"dynamic_client_secret_duration_seconds" env:""`
|
DyamicClientSecretDurationSeconds uint64 `yaml:"dynamic_client_secret_duration_seconds" env:""`
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,8 +2,8 @@ package config
|
|||||||
|
|
||||||
// Debug defines the available debug configuration.
|
// Debug defines the available debug configuration.
|
||||||
type Debug struct {
|
type Debug struct {
|
||||||
Addr string `ocisConfig:"addr" env:"IDP_DEBUG_ADDR"`
|
Addr string `yaml:"addr" env:"IDP_DEBUG_ADDR"`
|
||||||
Token string `ocisConfig:"token" env:"IDP_DEBUG_TOKEN"`
|
Token string `yaml:"token" env:"IDP_DEBUG_TOKEN"`
|
||||||
Pprof bool `ocisConfig:"pprof" env:"IDP_DEBUG_PPROF"`
|
Pprof bool `yaml:"pprof" env:"IDP_DEBUG_PPROF"`
|
||||||
Zpages bool `ocisConfig:"zpages" env:"IDP_DEBUG_ZPAGES"`
|
Zpages bool `yaml:"zpages" env:"IDP_DEBUG_ZPAGES"`
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,10 +2,10 @@ package config
|
|||||||
|
|
||||||
// HTTP defines the available http configuration.
|
// HTTP defines the available http configuration.
|
||||||
type HTTP struct {
|
type HTTP struct {
|
||||||
Addr string `ocisConfig:"addr" env:"IDP_HTTP_ADDR"`
|
Addr string `yaml:"addr" env:"IDP_HTTP_ADDR"`
|
||||||
Root string `ocisConfig:"root" env:"IDP_HTTP_ROOT"`
|
Root string `yaml:"root" env:"IDP_HTTP_ROOT"`
|
||||||
Namespace string `ocisConfig:"-" yaml:"-"`
|
Namespace string `yaml:"-"`
|
||||||
TLSCert string `ocisConfig:"tls_cert" env:"IDP_TRANSPORT_TLS_CERT"`
|
TLSCert string `yaml:"tls_cert" env:"IDP_TRANSPORT_TLS_CERT"`
|
||||||
TLSKey string `ocisConfig:"tls_key" env:"IDP_TRANSPORT_TLS_KEY"`
|
TLSKey string `yaml:"tls_key" env:"IDP_TRANSPORT_TLS_KEY"`
|
||||||
TLS bool `ocisConfig:"tls" env:"IDP_TLS"`
|
TLS bool `yaml:"tls" env:"IDP_TLS"`
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,8 +2,8 @@ package config
|
|||||||
|
|
||||||
// Log defines the available log configuration.
|
// Log defines the available log configuration.
|
||||||
type Log struct {
|
type Log struct {
|
||||||
Level string `ocisConfig:"level" env:"OCIS_LOG_LEVEL;IDP_LOG_LEVEL"`
|
Level string `yaml:"level" env:"OCIS_LOG_LEVEL;IDP_LOG_LEVEL"`
|
||||||
Pretty bool `ocisConfig:"pretty" env:"OCIS_LOG_PRETTY;IDP_LOG_PRETTY"`
|
Pretty bool `yaml:"pretty" env:"OCIS_LOG_PRETTY;IDP_LOG_PRETTY"`
|
||||||
Color bool `ocisConfig:"color" env:"OCIS_LOG_COLOR;IDP_LOG_COLOR"`
|
Color bool `yaml:"color" env:"OCIS_LOG_COLOR;IDP_LOG_COLOR"`
|
||||||
File string `ocisConfig:"file" env:"OCIS_LOG_FILE;IDP_LOG_FILE"`
|
File string `yaml:"file" env:"OCIS_LOG_FILE;IDP_LOG_FILE"`
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,6 +2,6 @@ package config
|
|||||||
|
|
||||||
// Service defines the available service configuration.
|
// Service defines the available service configuration.
|
||||||
type Service struct {
|
type Service struct {
|
||||||
Name string `ocisConfig:"-" yaml:"-"`
|
Name string `yaml:"-"`
|
||||||
PasswordResetURI string `ocisConfig:"password_reset_uri" env:"IDP_PASSWORD_RESET_URI" desc:"The URI where a user can reset their password."`
|
PasswordResetURI string `yaml:"password_reset_uri" env:"IDP_PASSWORD_RESET_URI" desc:"The URI where a user can reset their password."`
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,8 +2,8 @@ package config
|
|||||||
|
|
||||||
// Tracing defines the available tracing configuration.
|
// Tracing defines the available tracing configuration.
|
||||||
type Tracing struct {
|
type Tracing struct {
|
||||||
Enabled bool `ocisConfig:"enabled" env:"OCIS_TRACING_ENABLED;IDP_TRACING_ENABLED"`
|
Enabled bool `yaml:"enabled" env:"OCIS_TRACING_ENABLED;IDP_TRACING_ENABLED"`
|
||||||
Type string `ocisConfig:"type" env:"OCIS_TRACING_TYPE;IDP_TRACING_TYPE"`
|
Type string `yaml:"type" env:"OCIS_TRACING_TYPE;IDP_TRACING_TYPE"`
|
||||||
Endpoint string `ocisConfig:"endpoint" env:"OCIS_TRACING_ENDPOINT;IDP_TRACING_ENDPOINT"`
|
Endpoint string `yaml:"endpoint" env:"OCIS_TRACING_ENDPOINT;IDP_TRACING_ENDPOINT"`
|
||||||
Collector string `ocisConfig:"collector" env:"OCIS_TRACING_COLLECTOR;IDP_TRACING_COLLECTOR"`
|
Collector string `yaml:"collector" env:"OCIS_TRACING_COLLECTOR;IDP_TRACING_COLLECTOR"`
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -8,22 +8,22 @@ import (
|
|||||||
|
|
||||||
// Config combines all available configuration parts.
|
// Config combines all available configuration parts.
|
||||||
type Config struct {
|
type Config struct {
|
||||||
*shared.Commons `ocisConfig:"-" yaml:"-"`
|
*shared.Commons `yaml:"-"`
|
||||||
|
|
||||||
Service Service `ocisConfig:"-" yaml:"-"`
|
Service Service `yaml:"-"`
|
||||||
|
|
||||||
Log *Log `ocisConfig:"log"`
|
Log *Log `yaml:"log"`
|
||||||
Debug Debug `ocisConfig:"debug"`
|
Debug Debug `yaml:"debug"`
|
||||||
|
|
||||||
Nats Nats `ociConfig:"nats"`
|
Nats Nats `ociConfig:"nats"`
|
||||||
|
|
||||||
Context context.Context `ocisConfig:"-" yaml:"-"`
|
Context context.Context `yaml:"-"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// Nats is the nats config
|
// Nats is the nats config
|
||||||
type Nats struct {
|
type Nats struct {
|
||||||
Host string `ocisConfig:"host" env:"NATS_NATS_HOST"`
|
Host string `yaml:"host" env:"NATS_NATS_HOST"`
|
||||||
Port int `ocisConfig:"port" env:"NATS_NATS_PORT"`
|
Port int `yaml:"port" env:"NATS_NATS_PORT"`
|
||||||
ClusterID string `ocisConfig:"clusterid" env:"NATS_NATS_CLUSTER_ID"`
|
ClusterID string `yaml:"clusterid" env:"NATS_NATS_CLUSTER_ID"`
|
||||||
StoreDir string `ocisConfig:"store_dir" env:"NATS_NATS_STORE_DIR"`
|
StoreDir string `yaml:"store_dir" env:"NATS_NATS_STORE_DIR"`
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,8 +2,8 @@ package config
|
|||||||
|
|
||||||
// Debug defines the available debug configuration.
|
// Debug defines the available debug configuration.
|
||||||
type Debug struct {
|
type Debug struct {
|
||||||
Addr string `ocisConfig:"addr" env:"NATS_DEBUG_ADDR"`
|
Addr string `yaml:"addr" env:"NATS_DEBUG_ADDR"`
|
||||||
Token string `ocisConfig:"token" env:"NATS_DEBUG_TOKEN"`
|
Token string `yaml:"token" env:"NATS_DEBUG_TOKEN"`
|
||||||
Pprof bool `ocisConfig:"pprof" env:"NATS_DEBUG_PPROF"`
|
Pprof bool `yaml:"pprof" env:"NATS_DEBUG_PPROF"`
|
||||||
Zpages bool `ocisConfig:"zpages" env:"NATS_DEBUG_ZPAGES"`
|
Zpages bool `yaml:"zpages" env:"NATS_DEBUG_ZPAGES"`
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,5 +2,5 @@ package config
|
|||||||
|
|
||||||
// Service defines the available service configuration.
|
// Service defines the available service configuration.
|
||||||
type Service struct {
|
type Service struct {
|
||||||
Name string `ocisConfig:"-" yaml:"-"`
|
Name string `yaml:"-"`
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -8,37 +8,37 @@ import (
|
|||||||
|
|
||||||
// Config combines all available configuration parts.
|
// Config combines all available configuration parts.
|
||||||
type Config struct {
|
type Config struct {
|
||||||
*shared.Commons `ocisConfig:"-" yaml:"-"`
|
*shared.Commons `yaml:"-"`
|
||||||
|
|
||||||
Service Service `ocisConfig:"-" yaml:"-"`
|
Service Service `yaml:"-"`
|
||||||
|
|
||||||
Log *Log `ocisConfig:"log"`
|
Log *Log `yaml:"log"`
|
||||||
Debug Debug `ocisConfig:"debug"`
|
Debug Debug `yaml:"debug"`
|
||||||
|
|
||||||
Notifications Notifications `ocisConfig:"notifications"`
|
Notifications Notifications `yaml:"notifications"`
|
||||||
|
|
||||||
Context context.Context `ocisConfig:"-" yaml:"-"`
|
Context context.Context `yaml:"-"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// Notifications definces the config options for the notifications service.
|
// Notifications definces the config options for the notifications service.
|
||||||
type Notifications struct {
|
type Notifications struct {
|
||||||
SMTP SMTP `ocisConfig:"SMTP"`
|
SMTP SMTP `yaml:"SMTP"`
|
||||||
Events Events `ocisConfig:"events"`
|
Events Events `yaml:"events"`
|
||||||
RevaGateway string `ocisConfig:"reva_gateway" env:"REVA_GATEWAY;NOTIFICATIONS_REVA_GATEWAY"`
|
RevaGateway string `yaml:"reva_gateway" env:"REVA_GATEWAY;NOTIFICATIONS_REVA_GATEWAY"`
|
||||||
MachineAuthSecret string `ocisConfig:"machine_auth_api_key" env:"OCIS_MACHINE_AUTH_API_KEY;NOTIFICATIONS_MACHINE_AUTH_API_KEY"`
|
MachineAuthSecret string `yaml:"machine_auth_api_key" env:"OCIS_MACHINE_AUTH_API_KEY;NOTIFICATIONS_MACHINE_AUTH_API_KEY"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// SMTP combines the smtp configuration options.
|
// SMTP combines the smtp configuration options.
|
||||||
type SMTP struct {
|
type SMTP struct {
|
||||||
Host string `ocisConfig:"smtp_host" env:"NOTIFICATIONS_SMTP_HOST"`
|
Host string `yaml:"smtp_host" env:"NOTIFICATIONS_SMTP_HOST"`
|
||||||
Port string `ocisConfig:"smtp_port" env:"NOTIFICATIONS_SMTP_PORT"`
|
Port string `yaml:"smtp_port" env:"NOTIFICATIONS_SMTP_PORT"`
|
||||||
Sender string `ocisConfig:"smtp_sender" env:"NOTIFICATIONS_SMTP_SENDER"`
|
Sender string `yaml:"smtp_sender" env:"NOTIFICATIONS_SMTP_SENDER"`
|
||||||
Password string `ocisConfig:"smtp_password" env:"NOTIFICATIONS_SMTP_PASSWORD"`
|
Password string `yaml:"smtp_password" env:"NOTIFICATIONS_SMTP_PASSWORD"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// Events combines the configuration options for the event bus.
|
// Events combines the configuration options for the event bus.
|
||||||
type Events struct {
|
type Events struct {
|
||||||
Endpoint string `ocisConfig:"events_endpoint" env:"NOTIFICATIONS_EVENTS_ENDPOINT"`
|
Endpoint string `yaml:"events_endpoint" env:"NOTIFICATIONS_EVENTS_ENDPOINT"`
|
||||||
Cluster string `ocisConfig:"events_cluster" env:"NOTIFICATIONS_EVENTS_CLUSTER"`
|
Cluster string `yaml:"events_cluster" env:"NOTIFICATIONS_EVENTS_CLUSTER"`
|
||||||
ConsumerGroup string `ocisConfig:"events_group" env:"NOTIFICATIONS_EVENTS_GROUP"`
|
ConsumerGroup string `yaml:"events_group" env:"NOTIFICATIONS_EVENTS_GROUP"`
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,8 +2,8 @@ package config
|
|||||||
|
|
||||||
// Debug defines the available debug configuration.
|
// Debug defines the available debug configuration.
|
||||||
type Debug struct {
|
type Debug struct {
|
||||||
Addr string `ocisConfig:"addr" env:"NOTIFICATIONS_DEBUG_ADDR"`
|
Addr string `yaml:"addr" env:"NOTIFICATIONS_DEBUG_ADDR"`
|
||||||
Token string `ocisConfig:"token" env:"NOTIFICATIONS_DEBUG_TOKEN"`
|
Token string `yaml:"token" env:"NOTIFICATIONS_DEBUG_TOKEN"`
|
||||||
Pprof bool `ocisConfig:"pprof" env:"NOTIFICATIONS_DEBUG_PPROF"`
|
Pprof bool `yaml:"pprof" env:"NOTIFICATIONS_DEBUG_PPROF"`
|
||||||
Zpages bool `ocisConfig:"zpages" env:"NOTIFICATIONS_DEBUG_ZPAGES"`
|
Zpages bool `yaml:"zpages" env:"NOTIFICATIONS_DEBUG_ZPAGES"`
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,5 +2,5 @@ package config
|
|||||||
|
|
||||||
// Service defines the available service configuration.
|
// Service defines the available service configuration.
|
||||||
type Service struct {
|
type Service struct {
|
||||||
Name string `ocisConfig:"-" yaml:"-"`
|
Name string `yaml:"-"`
|
||||||
}
|
}
|
||||||
|
|||||||
+28
-28
@@ -24,7 +24,7 @@ import (
|
|||||||
|
|
||||||
// TokenManager is the config for using the reva token manager
|
// TokenManager is the config for using the reva token manager
|
||||||
type TokenManager struct {
|
type TokenManager struct {
|
||||||
JWTSecret string `ocisConfig:"jwt_secret" env:"OCIS_JWT_SECRET"`
|
JWTSecret string `yaml:"jwt_secret" env:"OCIS_JWT_SECRET"`
|
||||||
}
|
}
|
||||||
|
|
||||||
const (
|
const (
|
||||||
@@ -39,41 +39,41 @@ type Mode int
|
|||||||
|
|
||||||
// Runtime configures the oCIS runtime when running in supervised mode.
|
// Runtime configures the oCIS runtime when running in supervised mode.
|
||||||
type Runtime struct {
|
type Runtime struct {
|
||||||
Port string `ocisConfig:"port" env:"OCIS_RUNTIME_PORT"`
|
Port string `yaml:"port" env:"OCIS_RUNTIME_PORT"`
|
||||||
Host string `ocisConfig:"host" env:"OCIS_RUNTIME_HOST"`
|
Host string `yaml:"host" env:"OCIS_RUNTIME_HOST"`
|
||||||
Extensions string `ocisConfig:"extensions" env:"OCIS_RUN_EXTENSIONS"`
|
Extensions string `yaml:"extensions" env:"OCIS_RUN_EXTENSIONS"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// Config combines all available configuration parts.
|
// Config combines all available configuration parts.
|
||||||
type Config struct {
|
type Config struct {
|
||||||
*shared.Commons `ocisConfig:"shared"`
|
*shared.Commons `yaml:"shared"`
|
||||||
|
|
||||||
Tracing shared.Tracing `ocisConfig:"tracing"`
|
Tracing shared.Tracing `yaml:"tracing"`
|
||||||
Log *shared.Log `ocisConfig:"log"`
|
Log *shared.Log `yaml:"log"`
|
||||||
|
|
||||||
Mode Mode // DEPRECATED
|
Mode Mode // DEPRECATED
|
||||||
File string
|
File string
|
||||||
OcisURL string `ocisConfig:"ocis_url"`
|
OcisURL string `yaml:"ocis_url"`
|
||||||
|
|
||||||
Registry string `ocisConfig:"registry"`
|
Registry string `yaml:"registry"`
|
||||||
TokenManager TokenManager `ocisConfig:"token_manager"`
|
TokenManager TokenManager `yaml:"token_manager"`
|
||||||
Runtime Runtime `ocisConfig:"runtime"`
|
Runtime Runtime `yaml:"runtime"`
|
||||||
|
|
||||||
Audit *audit.Config `ocsiConfig:"audit"`
|
Audit *audit.Config `yaml:"audit"`
|
||||||
Accounts *accounts.Config `ocisConfig:"accounts"`
|
Accounts *accounts.Config `yaml:"accounts"`
|
||||||
GLAuth *glauth.Config `ocisConfig:"glauth"`
|
GLAuth *glauth.Config `yaml:"glauth"`
|
||||||
Graph *graph.Config `ocisConfig:"graph"`
|
Graph *graph.Config `yaml:"graph"`
|
||||||
GraphExplorer *graphExplorer.Config `ocisConfig:"graph_explorer"`
|
GraphExplorer *graphExplorer.Config `yaml:"graph_explorer"`
|
||||||
IDP *idp.Config `ocisConfig:"idp"`
|
IDP *idp.Config `yaml:"idp"`
|
||||||
IDM *idm.Config `ocisConfig:"idm"`
|
IDM *idm.Config `yaml:"idm"`
|
||||||
Nats *nats.Config `ocisConfig:"nats"`
|
Nats *nats.Config `yaml:"nats"`
|
||||||
Notifications *notifications.Config `ocisConfig:"notifications"`
|
Notifications *notifications.Config `yaml:"notifications"`
|
||||||
OCS *ocs.Config `ocisConfig:"ocs"`
|
OCS *ocs.Config `yaml:"ocs"`
|
||||||
Web *web.Config `ocisConfig:"web"`
|
Web *web.Config `yaml:"web"`
|
||||||
Proxy *proxy.Config `ocisConfig:"proxy"`
|
Proxy *proxy.Config `yaml:"proxy"`
|
||||||
Settings *settings.Config `ocisConfig:"settings"`
|
Settings *settings.Config `yaml:"settings"`
|
||||||
Storage *storage.Config `ocisConfig:"storage"`
|
Storage *storage.Config `yaml:"storage"`
|
||||||
Store *store.Config `ocisConfig:"store"`
|
Store *store.Config `yaml:"store"`
|
||||||
Thumbnails *thumbnails.Config `ocisConfig:"thumbnails"`
|
Thumbnails *thumbnails.Config `yaml:"thumbnails"`
|
||||||
WebDAV *webdav.Config `ocisConfig:"webdav"`
|
WebDAV *webdav.Config `yaml:"webdav"`
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -68,7 +68,7 @@ func BindSourcesToStructs(extension string, dst interface{}) (*gofig.Config, err
|
|||||||
sources := DefaultConfigSources(extension, supportedExtensions)
|
sources := DefaultConfigSources(extension, supportedExtensions)
|
||||||
cnf := gofig.NewWithOptions(extension)
|
cnf := gofig.NewWithOptions(extension)
|
||||||
cnf.WithOptions(func(options *gofig.Options) {
|
cnf.WithOptions(func(options *gofig.Options) {
|
||||||
options.DecoderConfig.TagName = "ocisConfig"
|
options.DecoderConfig.TagName = "yaml"
|
||||||
})
|
})
|
||||||
cnf.AddDriver(gooyaml.Driver)
|
cnf.AddDriver(gooyaml.Driver)
|
||||||
_ = cnf.LoadFiles(sources...)
|
_ = cnf.LoadFiles(sources...)
|
||||||
|
|||||||
@@ -10,24 +10,24 @@ type EnvBinding struct {
|
|||||||
|
|
||||||
// Log defines the available logging configuration.
|
// Log defines the available logging configuration.
|
||||||
type Log struct {
|
type Log struct {
|
||||||
Level string `ocisConfig:"level" env:"OCIS_LOG_LEVEL"`
|
Level string `yaml:"level" env:"OCIS_LOG_LEVEL"`
|
||||||
Pretty bool `ocisConfig:"pretty" env:"OCIS_LOG_PRETTY"`
|
Pretty bool `yaml:"pretty" env:"OCIS_LOG_PRETTY"`
|
||||||
Color bool `ocisConfig:"color" env:"OCIS_LOG_COLOR"`
|
Color bool `yaml:"color" env:"OCIS_LOG_COLOR"`
|
||||||
File string `ocisConfig:"file" env:"OCIS_LOG_FILE"`
|
File string `yaml:"file" env:"OCIS_LOG_FILE"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// Tracing defines the available tracing configuration.
|
// Tracing defines the available tracing configuration.
|
||||||
type Tracing struct {
|
type Tracing struct {
|
||||||
Enabled bool `ocisConfig:"enabled" env:"OCIS_TRACING_ENABLED"`
|
Enabled bool `yaml:"enabled" env:"OCIS_TRACING_ENABLED"`
|
||||||
Type string `ocisConfig:"type" env:"OCIS_TRACING_TYPE"`
|
Type string `yaml:"type" env:"OCIS_TRACING_TYPE"`
|
||||||
Endpoint string `ocisConfig:"endpoint" env:"OCIS_TRACING_ENDPOINT"`
|
Endpoint string `yaml:"endpoint" env:"OCIS_TRACING_ENDPOINT"`
|
||||||
Collector string `ocisConfig:"collector" env:"OCIS_TRACING_COLLECTOR"`
|
Collector string `yaml:"collector" env:"OCIS_TRACING_COLLECTOR"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// Commons holds configuration that are common to all extensions. Each extension can then decide whether
|
// Commons holds configuration that are common to all extensions. Each extension can then decide whether
|
||||||
// to overwrite its values.
|
// to overwrite its values.
|
||||||
type Commons struct {
|
type Commons struct {
|
||||||
Log *Log `ocisConfig:"log"`
|
Log *Log `yaml:"log"`
|
||||||
Tracing *Tracing `ocisConfig:"tracing"`
|
Tracing *Tracing `yaml:"tracing"`
|
||||||
OcisURL string `ocisConfig:"ocis_url" env:"OCIS_URL"`
|
OcisURL string `yaml:"ocis_url" env:"OCIS_URL"`
|
||||||
}
|
}
|
||||||
|
|||||||
+14
-14
@@ -8,31 +8,31 @@ import (
|
|||||||
|
|
||||||
// Config combines all available configuration parts.
|
// Config combines all available configuration parts.
|
||||||
type Config struct {
|
type Config struct {
|
||||||
*shared.Commons `ocisConfig:"-" yaml:"-"`
|
*shared.Commons `yaml:"-"`
|
||||||
|
|
||||||
Service Service `ocisConfig:"-" yaml:"-"`
|
Service Service `yaml:"-"`
|
||||||
|
|
||||||
Tracing *Tracing `ocisConfig:"tracing"`
|
Tracing *Tracing `yaml:"tracing"`
|
||||||
Log *Log `ocisConfig:"log"`
|
Log *Log `yaml:"log"`
|
||||||
Debug Debug `ocisConfig:"debug"`
|
Debug Debug `yaml:"debug"`
|
||||||
|
|
||||||
HTTP HTTP `ocisConfig:"http"`
|
HTTP HTTP `yaml:"http"`
|
||||||
|
|
||||||
TokenManager TokenManager `ocisConfig:"token_manager"`
|
TokenManager TokenManager `yaml:"token_manager"`
|
||||||
Reva Reva `ocisConfig:"reva"`
|
Reva Reva `yaml:"reva"`
|
||||||
|
|
||||||
IdentityManagement IdentityManagement `ocisConfig:"identity_management"`
|
IdentityManagement IdentityManagement `yaml:"identity_management"`
|
||||||
|
|
||||||
AccountBackend string `ocisConfig:"account_backend" env:"OCS_ACCOUNT_BACKEND_TYPE"`
|
AccountBackend string `yaml:"account_backend" env:"OCS_ACCOUNT_BACKEND_TYPE"`
|
||||||
StorageUsersDriver string `ocisConfig:"storage_users_driver" env:"STORAGE_USERS_DRIVER;OCS_STORAGE_USERS_DRIVER"`
|
StorageUsersDriver string `yaml:"storage_users_driver" env:"STORAGE_USERS_DRIVER;OCS_STORAGE_USERS_DRIVER"`
|
||||||
MachineAuthAPIKey string `ocisConfig:"machine_auth_api_key" env:"OCIS_MACHINE_AUTH_API_KEY;OCS_MACHINE_AUTH_API_KEY"`
|
MachineAuthAPIKey string `yaml:"machine_auth_api_key" env:"OCIS_MACHINE_AUTH_API_KEY;OCS_MACHINE_AUTH_API_KEY"`
|
||||||
|
|
||||||
Context context.Context `ocisConfig:"-" yaml:"-"`
|
Context context.Context `yaml:"-"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// IdentityManagement keeps track of the OIDC address. This is because Reva requisite of uniqueness for users
|
// IdentityManagement keeps track of the OIDC address. This is because Reva requisite of uniqueness for users
|
||||||
// is based in the combination of IDP hostname + UserID. For more information see:
|
// is based in the combination of IDP hostname + UserID. For more information see:
|
||||||
// https://github.com/cs3org/reva/blob/4fd0229f13fae5bc9684556a82dbbd0eced65ef9/pkg/storage/utils/decomposedfs/node/node.go#L856-L865
|
// https://github.com/cs3org/reva/blob/4fd0229f13fae5bc9684556a82dbbd0eced65ef9/pkg/storage/utils/decomposedfs/node/node.go#L856-L865
|
||||||
type IdentityManagement struct {
|
type IdentityManagement struct {
|
||||||
Address string `ocisConfig:"address" env:"OCIS_URL;OCS_IDM_ADDRESS"`
|
Address string `yaml:"address" env:"OCIS_URL;OCS_IDM_ADDRESS"`
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,8 +2,8 @@ package config
|
|||||||
|
|
||||||
// Debug defines the available debug configuration.
|
// Debug defines the available debug configuration.
|
||||||
type Debug struct {
|
type Debug struct {
|
||||||
Addr string `ocisConfig:"addr" env:"OCS_DEBUG_ADDR"`
|
Addr string `yaml:"addr" env:"OCS_DEBUG_ADDR"`
|
||||||
Token string `ocisConfig:"token" env:"OCS_DEBUG_TOKEN"`
|
Token string `yaml:"token" env:"OCS_DEBUG_TOKEN"`
|
||||||
Pprof bool `ocisConfig:"pprof" env:"OCS_DEBUG_PPROF"`
|
Pprof bool `yaml:"pprof" env:"OCS_DEBUG_PPROF"`
|
||||||
Zpages bool `ocisConfig:"zpages" env:"OCS_DEBUG_ZPAGES"`
|
Zpages bool `yaml:"zpages" env:"OCS_DEBUG_ZPAGES"`
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,16 +2,16 @@ package config
|
|||||||
|
|
||||||
// HTTP defines the available http configuration.
|
// HTTP defines the available http configuration.
|
||||||
type HTTP struct {
|
type HTTP struct {
|
||||||
Addr string `ocisConfig:"addr" env:"OCS_HTTP_ADDR"`
|
Addr string `yaml:"addr" env:"OCS_HTTP_ADDR"`
|
||||||
Root string `ocisConfig:"root" env:"OCS_HTTP_ROOT"`
|
Root string `yaml:"root" env:"OCS_HTTP_ROOT"`
|
||||||
Namespace string `ocisConfig:"-" yaml:"-"`
|
Namespace string `yaml:"-"`
|
||||||
CORS CORS `ocisConfig:"cors"`
|
CORS CORS `yaml:"cors"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// CORS defines the available cors configuration.
|
// CORS defines the available cors configuration.
|
||||||
type CORS struct {
|
type CORS struct {
|
||||||
AllowedOrigins []string `ocisConfig:"allowed_origins"`
|
AllowedOrigins []string `yaml:"allowed_origins"`
|
||||||
AllowedMethods []string `ocisConfig:"allowed_methods"`
|
AllowedMethods []string `yaml:"allowed_methods"`
|
||||||
AllowedHeaders []string `ocisConfig:"allowed_headers"`
|
AllowedHeaders []string `yaml:"allowed_headers"`
|
||||||
AllowCredentials bool `ocisConfig:"allowed_credentials"`
|
AllowCredentials bool `yaml:"allowed_credentials"`
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,10 +2,10 @@ package config
|
|||||||
|
|
||||||
// Reva defines all available REVA configuration.
|
// Reva defines all available REVA configuration.
|
||||||
type Reva struct {
|
type Reva struct {
|
||||||
Address string `ocisConfig:"address" env:"REVA_GATEWAY"`
|
Address string `yaml:"address" env:"REVA_GATEWAY"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// TokenManager is the config for using the reva token manager
|
// TokenManager is the config for using the reva token manager
|
||||||
type TokenManager struct {
|
type TokenManager struct {
|
||||||
JWTSecret string `ocisConfig:"jwt_secret" env:"OCIS_JWT_SECRET;OCS_JWT_SECRET"`
|
JWTSecret string `yaml:"jwt_secret" env:"OCIS_JWT_SECRET;OCS_JWT_SECRET"`
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,5 +2,5 @@ package config
|
|||||||
|
|
||||||
// Service defines the available service configuration.
|
// Service defines the available service configuration.
|
||||||
type Service struct {
|
type Service struct {
|
||||||
Name string `ocisConfig:"-" yaml:"-"`
|
Name string `yaml:"-"`
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,8 +2,8 @@ package config
|
|||||||
|
|
||||||
// Tracing defines the available tracing configuration.
|
// Tracing defines the available tracing configuration.
|
||||||
type Tracing struct {
|
type Tracing struct {
|
||||||
Enabled bool `ocisConfig:"enabled" env:"OCIS_TRACING_ENABLED;OCS_TRACING_ENABLED"`
|
Enabled bool `yaml:"enabled" env:"OCIS_TRACING_ENABLED;OCS_TRACING_ENABLED"`
|
||||||
Type string `ocisConfig:"type" env:"OCIS_TRACING_TYPE;OCS_TRACING_TYPE"`
|
Type string `yaml:"type" env:"OCIS_TRACING_TYPE;OCS_TRACING_TYPE"`
|
||||||
Endpoint string `ocisConfig:"endpoint" env:"OCIS_TRACING_ENDPOINT;OCS_TRACING_ENDPOINT"`
|
Endpoint string `yaml:"endpoint" env:"OCIS_TRACING_ENDPOINT;OCS_TRACING_ENDPOINT"`
|
||||||
Collector string `ocisConfig:"collector" env:"OCIS_TRACING_COLLECTOR;OCS_TRACING_COLLECTOR"`
|
Collector string `yaml:"collector" env:"OCIS_TRACING_COLLECTOR;OCS_TRACING_COLLECTOR"`
|
||||||
}
|
}
|
||||||
|
|||||||
+55
-55
@@ -8,47 +8,47 @@ import (
|
|||||||
|
|
||||||
// Config combines all available configuration parts.
|
// Config combines all available configuration parts.
|
||||||
type Config struct {
|
type Config struct {
|
||||||
*shared.Commons `ocisConfig:"-" yaml:"-"`
|
*shared.Commons `yaml:"-"`
|
||||||
|
|
||||||
Service Service `ocisConfig:"-" yaml:"-"`
|
Service Service `yaml:"-"`
|
||||||
|
|
||||||
Tracing *Tracing `ocisConfig:"tracing"`
|
Tracing *Tracing `yaml:"tracing"`
|
||||||
Log *Log `ocisConfig:"log"`
|
Log *Log `yaml:"log"`
|
||||||
Debug Debug `ocisConfig:"debug"`
|
Debug Debug `yaml:"debug"`
|
||||||
|
|
||||||
HTTP HTTP `ocisConfig:"http"`
|
HTTP HTTP `yaml:"http"`
|
||||||
|
|
||||||
Reva Reva `ocisConfig:"reva"`
|
Reva Reva `yaml:"reva"`
|
||||||
|
|
||||||
Policies []Policy `ocisConfig:"policies"`
|
Policies []Policy `yaml:"policies"`
|
||||||
OIDC OIDC `ocisConfig:"oidc"`
|
OIDC OIDC `yaml:"oidc"`
|
||||||
TokenManager TokenManager `ocisConfig:"token_manager"`
|
TokenManager TokenManager `yaml:"token_manager"`
|
||||||
PolicySelector *PolicySelector `ocisConfig:"policy_selector"`
|
PolicySelector *PolicySelector `yaml:"policy_selector"`
|
||||||
PreSignedURL PreSignedURL `ocisConfig:"pre_signed_url"`
|
PreSignedURL PreSignedURL `yaml:"pre_signed_url"`
|
||||||
AccountBackend string `ocisConfig:"account_backend" env:"PROXY_ACCOUNT_BACKEND_TYPE"`
|
AccountBackend string `yaml:"account_backend" env:"PROXY_ACCOUNT_BACKEND_TYPE"`
|
||||||
UserOIDCClaim string `ocisConfig:"user_oidc_claim" env:"PROXY_USER_OIDC_CLAIM"`
|
UserOIDCClaim string `yaml:"user_oidc_claim" env:"PROXY_USER_OIDC_CLAIM"`
|
||||||
UserCS3Claim string `ocisConfig:"user_cs3_claim" env:"PROXY_USER_CS3_CLAIM"`
|
UserCS3Claim string `yaml:"user_cs3_claim" env:"PROXY_USER_CS3_CLAIM"`
|
||||||
MachineAuthAPIKey string `ocisConfig:"machine_auth_api_key" env:"OCIS_MACHINE_AUTH_API_KEY;PROXY_MACHINE_AUTH_API_KEY"`
|
MachineAuthAPIKey string `yaml:"machine_auth_api_key" env:"OCIS_MACHINE_AUTH_API_KEY;PROXY_MACHINE_AUTH_API_KEY"`
|
||||||
AutoprovisionAccounts bool `ocisConfig:"auto_provision_accounts" env:"PROXY_AUTOPROVISION_ACCOUNTS"`
|
AutoprovisionAccounts bool `yaml:"auto_provision_accounts" env:"PROXY_AUTOPROVISION_ACCOUNTS"`
|
||||||
EnableBasicAuth bool `ocisConfig:"enable_basic_auth" env:"PROXY_ENABLE_BASIC_AUTH"`
|
EnableBasicAuth bool `yaml:"enable_basic_auth" env:"PROXY_ENABLE_BASIC_AUTH"`
|
||||||
InsecureBackends bool `ocisConfig:"insecure_backends" env:"PROXY_INSECURE_BACKENDS"`
|
InsecureBackends bool `yaml:"insecure_backends" env:"PROXY_INSECURE_BACKENDS"`
|
||||||
AuthMiddleware AuthMiddleware `ocisConfig:"auth_middleware"`
|
AuthMiddleware AuthMiddleware `yaml:"auth_middleware"`
|
||||||
|
|
||||||
Context context.Context `ocisConfig:"-" yaml:"-"`
|
Context context.Context `yaml:"-"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// Policy enables us to use multiple directors.
|
// Policy enables us to use multiple directors.
|
||||||
type Policy struct {
|
type Policy struct {
|
||||||
Name string `ocisConfig:"name"`
|
Name string `yaml:"name"`
|
||||||
Routes []Route `ocisConfig:"routes"`
|
Routes []Route `yaml:"routes"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// Route define forwarding routes
|
// Route define forwarding routes
|
||||||
type Route struct {
|
type Route struct {
|
||||||
Type RouteType `ocisConfig:"type"`
|
Type RouteType `yaml:"type"`
|
||||||
Endpoint string `ocisConfig:"endpoint"`
|
Endpoint string `yaml:"endpoint"`
|
||||||
Backend string `ocisConfig:"backend"`
|
Backend string `yaml:"backend"`
|
||||||
ApacheVHost bool `ocisConfig:"apache-vhost"`
|
ApacheVHost bool `yaml:"apache-vhost"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// RouteType defines the type of a route
|
// RouteType defines the type of a route
|
||||||
@@ -72,72 +72,72 @@ var (
|
|||||||
|
|
||||||
// AuthMiddleware configures the proxy http auth middleware.
|
// AuthMiddleware configures the proxy http auth middleware.
|
||||||
type AuthMiddleware struct {
|
type AuthMiddleware struct {
|
||||||
CredentialsByUserAgent map[string]string `ocisConfig:"credentials_by_user_agent"`
|
CredentialsByUserAgent map[string]string `yaml:"credentials_by_user_agent"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// OIDC is the config for the OpenID-Connect middleware. If set the proxy will try to authenticate every request
|
// OIDC is the config for the OpenID-Connect middleware. If set the proxy will try to authenticate every request
|
||||||
// with the configured oidc-provider
|
// with the configured oidc-provider
|
||||||
type OIDC struct {
|
type OIDC struct {
|
||||||
Issuer string `ocisConfig:"issuer" env:"OCIS_URL;PROXY_OIDC_ISSUER"`
|
Issuer string `yaml:"issuer" env:"OCIS_URL;PROXY_OIDC_ISSUER"`
|
||||||
Insecure bool `ocisConfig:"insecure" env:"OCIS_INSECURE;PROXY_OIDC_INSECURE"`
|
Insecure bool `yaml:"insecure" env:"OCIS_INSECURE;PROXY_OIDC_INSECURE"`
|
||||||
UserinfoCache UserinfoCache `ocisConfig:"user_info_cache"`
|
UserinfoCache UserinfoCache `yaml:"user_info_cache"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// UserinfoCache is a TTL cache configuration.
|
// UserinfoCache is a TTL cache configuration.
|
||||||
type UserinfoCache struct {
|
type UserinfoCache struct {
|
||||||
Size int `ocisConfig:"size" env:"PROXY_OIDC_USERINFO_CACHE_SIZE"`
|
Size int `yaml:"size" env:"PROXY_OIDC_USERINFO_CACHE_SIZE"`
|
||||||
TTL int `ocisConfig:"ttl" env:"PROXY_OIDC_USERINFO_CACHE_TTL"`
|
TTL int `yaml:"ttl" env:"PROXY_OIDC_USERINFO_CACHE_TTL"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// PolicySelector is the toplevel-configuration for different selectors
|
// PolicySelector is the toplevel-configuration for different selectors
|
||||||
type PolicySelector struct {
|
type PolicySelector struct {
|
||||||
Static *StaticSelectorConf `ocisConfig:"static"`
|
Static *StaticSelectorConf `yaml:"static"`
|
||||||
Migration *MigrationSelectorConf `ocisConfig:"migration"`
|
Migration *MigrationSelectorConf `yaml:"migration"`
|
||||||
Claims *ClaimsSelectorConf `ocisConfig:"claims"`
|
Claims *ClaimsSelectorConf `yaml:"claims"`
|
||||||
Regex *RegexSelectorConf `ocisConfig:"regex"`
|
Regex *RegexSelectorConf `yaml:"regex"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// StaticSelectorConf is the config for the static-policy-selector
|
// StaticSelectorConf is the config for the static-policy-selector
|
||||||
type StaticSelectorConf struct {
|
type StaticSelectorConf struct {
|
||||||
Policy string `ocisConfig:"policy"`
|
Policy string `yaml:"policy"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// TokenManager is the config for using the reva token manager
|
// TokenManager is the config for using the reva token manager
|
||||||
type TokenManager struct {
|
type TokenManager struct {
|
||||||
JWTSecret string `ocisConfig:"jwt_secret" env:"OCIS_JWT_SECRET;PROXY_JWT_SECRET"`
|
JWTSecret string `yaml:"jwt_secret" env:"OCIS_JWT_SECRET;PROXY_JWT_SECRET"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// PreSignedURL is the config for the presigned url middleware
|
// PreSignedURL is the config for the presigned url middleware
|
||||||
type PreSignedURL struct {
|
type PreSignedURL struct {
|
||||||
AllowedHTTPMethods []string `ocisConfig:"allowed_http_methods"`
|
AllowedHTTPMethods []string `yaml:"allowed_http_methods"`
|
||||||
Enabled bool `ocisConfig:"enabled" env:"PROXY_ENABLE_PRESIGNEDURLS"`
|
Enabled bool `yaml:"enabled" env:"PROXY_ENABLE_PRESIGNEDURLS"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// MigrationSelectorConf is the config for the migration-selector
|
// MigrationSelectorConf is the config for the migration-selector
|
||||||
type MigrationSelectorConf struct {
|
type MigrationSelectorConf struct {
|
||||||
AccFoundPolicy string `ocisConfig:"acc_found_policy"`
|
AccFoundPolicy string `yaml:"acc_found_policy"`
|
||||||
AccNotFoundPolicy string `ocisConfig:"acc_not_found_policy"`
|
AccNotFoundPolicy string `yaml:"acc_not_found_policy"`
|
||||||
UnauthenticatedPolicy string `ocisConfig:"unauthenticated_policy"`
|
UnauthenticatedPolicy string `yaml:"unauthenticated_policy"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// ClaimsSelectorConf is the config for the claims-selector
|
// ClaimsSelectorConf is the config for the claims-selector
|
||||||
type ClaimsSelectorConf struct {
|
type ClaimsSelectorConf struct {
|
||||||
DefaultPolicy string `ocisConfig:"default_policy"`
|
DefaultPolicy string `yaml:"default_policy"`
|
||||||
UnauthenticatedPolicy string `ocisConfig:"unauthenticated_policy"`
|
UnauthenticatedPolicy string `yaml:"unauthenticated_policy"`
|
||||||
SelectorCookieName string `ocisConfig:"selector_cookie_name"`
|
SelectorCookieName string `yaml:"selector_cookie_name"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// RegexSelectorConf is the config for the regex-selector
|
// RegexSelectorConf is the config for the regex-selector
|
||||||
type RegexSelectorConf struct {
|
type RegexSelectorConf struct {
|
||||||
DefaultPolicy string `ocisConfig:"default_policy"`
|
DefaultPolicy string `yaml:"default_policy"`
|
||||||
MatchesPolicies []RegexRuleConf `ocisConfig:"matches_policies"`
|
MatchesPolicies []RegexRuleConf `yaml:"matches_policies"`
|
||||||
UnauthenticatedPolicy string `ocisConfig:"unauthenticated_policy"`
|
UnauthenticatedPolicy string `yaml:"unauthenticated_policy"`
|
||||||
SelectorCookieName string `ocisConfig:"selector_cookie_name"`
|
SelectorCookieName string `yaml:"selector_cookie_name"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type RegexRuleConf struct {
|
type RegexRuleConf struct {
|
||||||
Priority int `ocisConfig:"priority"`
|
Priority int `yaml:"priority"`
|
||||||
Property string `ocisConfig:"property"`
|
Property string `yaml:"property"`
|
||||||
Match string `ocisConfig:"match"`
|
Match string `yaml:"match"`
|
||||||
Policy string `ocisConfig:"policy"`
|
Policy string `yaml:"policy"`
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,8 +2,8 @@ package config
|
|||||||
|
|
||||||
// Debug defines the available debug configuration.
|
// Debug defines the available debug configuration.
|
||||||
type Debug struct {
|
type Debug struct {
|
||||||
Addr string `ocisConfig:"addr" env:"PROXY_DEBUG_ADDR"`
|
Addr string `yaml:"addr" env:"PROXY_DEBUG_ADDR"`
|
||||||
Token string `ocisConfig:"token" env:"PROXY_DEBUG_TOKEN"`
|
Token string `yaml:"token" env:"PROXY_DEBUG_TOKEN"`
|
||||||
Pprof bool `ocisConfig:"pprof" env:"PROXY_DEBUG_PPROF"`
|
Pprof bool `yaml:"pprof" env:"PROXY_DEBUG_PPROF"`
|
||||||
Zpages bool `ocisConfig:"zpages" env:"PROXY_DEBUG_ZPAGES"`
|
Zpages bool `yaml:"zpages" env:"PROXY_DEBUG_ZPAGES"`
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -52,8 +52,6 @@ func DefaultConfig() *config.Config {
|
|||||||
AutoprovisionAccounts: false,
|
AutoprovisionAccounts: false,
|
||||||
EnableBasicAuth: false,
|
EnableBasicAuth: false,
|
||||||
InsecureBackends: false,
|
InsecureBackends: false,
|
||||||
// TODO: enable
|
|
||||||
//Policies: defaultPolicies(),
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -152,66 +150,6 @@ func DefaultPolicies() []config.Policy {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
|
||||||
Name: "oc10",
|
|
||||||
Routes: []config.Route{
|
|
||||||
{
|
|
||||||
Endpoint: "/",
|
|
||||||
Backend: "http://localhost:9100",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
Endpoint: "/.well-known/",
|
|
||||||
Backend: "http://localhost:9130",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
Endpoint: "/konnect/",
|
|
||||||
Backend: "http://localhost:9130",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
Endpoint: "/signin/",
|
|
||||||
Backend: "http://localhost:9130",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
Endpoint: "/archiver",
|
|
||||||
Backend: "http://localhost:9140",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
Endpoint: "/ocs/",
|
|
||||||
Backend: "https://demo.owncloud.com",
|
|
||||||
ApacheVHost: true,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
Endpoint: "/remote.php/",
|
|
||||||
Backend: "https://demo.owncloud.com",
|
|
||||||
ApacheVHost: true,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
Endpoint: "/dav/",
|
|
||||||
Backend: "https://demo.owncloud.com",
|
|
||||||
ApacheVHost: true,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
Endpoint: "/webdav/",
|
|
||||||
Backend: "https://demo.owncloud.com",
|
|
||||||
ApacheVHost: true,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
Endpoint: "/status.php",
|
|
||||||
Backend: "https://demo.owncloud.com",
|
|
||||||
ApacheVHost: true,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
Endpoint: "/index.php/",
|
|
||||||
Backend: "https://demo.owncloud.com",
|
|
||||||
ApacheVHost: true,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
Endpoint: "/data",
|
|
||||||
Backend: "https://demo.owncloud.com",
|
|
||||||
ApacheVHost: true,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -247,6 +185,14 @@ func Sanitize(cfg *config.Config) {
|
|||||||
cfg.Policies = DefaultPolicies()
|
cfg.Policies = DefaultPolicies()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if cfg.PolicySelector == nil {
|
||||||
|
cfg.PolicySelector = &config.PolicySelector{
|
||||||
|
Static: &config.StaticSelectorConf{
|
||||||
|
Policy: "ocis",
|
||||||
|
},
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if cfg.HTTP.Root != "/" {
|
if cfg.HTTP.Root != "/" {
|
||||||
cfg.HTTP.Root = strings.TrimSuffix(cfg.HTTP.Root, "/")
|
cfg.HTTP.Root = strings.TrimSuffix(cfg.HTTP.Root, "/")
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,10 +2,10 @@ package config
|
|||||||
|
|
||||||
// HTTP defines the available http configuration.
|
// HTTP defines the available http configuration.
|
||||||
type HTTP struct {
|
type HTTP struct {
|
||||||
Addr string `ocisConfig:"addr" env:"PROXY_HTTP_ADDR"`
|
Addr string `yaml:"addr" env:"PROXY_HTTP_ADDR"`
|
||||||
Root string `ocisConfig:"root" env:"PROXY_HTTP_ROOT"`
|
Root string `yaml:"root" env:"PROXY_HTTP_ROOT"`
|
||||||
Namespace string `ocisConfig:"-" yaml:"-"`
|
Namespace string `yaml:"-"`
|
||||||
TLSCert string `ocisConfig:"tls_cert" env:"PROXY_TRANSPORT_TLS_CERT"`
|
TLSCert string `yaml:"tls_cert" env:"PROXY_TRANSPORT_TLS_CERT"`
|
||||||
TLSKey string `ocisConfig:"tls_key" env:"PROXY_TRANSPORT_TLS_KEY"`
|
TLSKey string `yaml:"tls_key" env:"PROXY_TRANSPORT_TLS_KEY"`
|
||||||
TLS bool `ocisConfig:"tls" env:"PROXY_TLS"`
|
TLS bool `yaml:"tls" env:"PROXY_TLS"`
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,5 +2,5 @@ package config
|
|||||||
|
|
||||||
// Reva defines all available REVA configuration.
|
// Reva defines all available REVA configuration.
|
||||||
type Reva struct {
|
type Reva struct {
|
||||||
Address string `ocisConfig:"address" env:"REVA_GATEWAY"`
|
Address string `yaml:"address" env:"REVA_GATEWAY"`
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,5 +2,5 @@ package config
|
|||||||
|
|
||||||
// Service defines the available service configuration.
|
// Service defines the available service configuration.
|
||||||
type Service struct {
|
type Service struct {
|
||||||
Name string `ocisConfig:"-" yaml:"-"`
|
Name string `yaml:"-"`
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,8 +2,8 @@ package config
|
|||||||
|
|
||||||
// Tracing defines the available tracing configuration.
|
// Tracing defines the available tracing configuration.
|
||||||
type Tracing struct {
|
type Tracing struct {
|
||||||
Enabled bool `ocisConfig:"enabled" env:"OCIS_TRACING_ENABLED;PROXY_TRACING_ENABLED"`
|
Enabled bool `yaml:"enabled" env:"OCIS_TRACING_ENABLED;PROXY_TRACING_ENABLED"`
|
||||||
Type string `ocisConfig:"type" env:"OCIS_TRACING_TYPE;PROXY_TRACING_TYPE"`
|
Type string `yaml:"type" env:"OCIS_TRACING_TYPE;PROXY_TRACING_TYPE"`
|
||||||
Endpoint string `ocisConfig:"endpoint" env:"OCIS_TRACING_ENDPOINT;PROXY_TRACING_ENDPOINT"`
|
Endpoint string `yaml:"endpoint" env:"OCIS_TRACING_ENDPOINT;PROXY_TRACING_ENDPOINT"`
|
||||||
Collector string `ocisConfig:"collector" env:"OCIS_TRACING_COLLECTOR;PROXY_TRACING_COLLECTOR"`
|
Collector string `yaml:"collector" env:"OCIS_TRACING_COLLECTOR;PROXY_TRACING_COLLECTOR"`
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -8,38 +8,38 @@ import (
|
|||||||
|
|
||||||
// Config combines all available configuration parts.
|
// Config combines all available configuration parts.
|
||||||
type Config struct {
|
type Config struct {
|
||||||
*shared.Commons `ocisConfig:"-" yaml:"-"`
|
*shared.Commons `yaml:"-"`
|
||||||
|
|
||||||
Service Service `ocisConfig:"-" yaml:"-"`
|
Service Service `yaml:"-"`
|
||||||
|
|
||||||
Tracing *Tracing `ocisConfig:"tracing"`
|
Tracing *Tracing `yaml:"tracing"`
|
||||||
Log *Log `ocisConfig:"log"`
|
Log *Log `yaml:"log"`
|
||||||
Debug Debug `ocisConfig:"debug"`
|
Debug Debug `yaml:"debug"`
|
||||||
|
|
||||||
HTTP HTTP `ocisConfig:"http"`
|
HTTP HTTP `yaml:"http"`
|
||||||
GRPC GRPC `ocisConfig:"grpc"`
|
GRPC GRPC `yaml:"grpc"`
|
||||||
|
|
||||||
StoreType string `ocisConfig:"store_type" env:"SETTINGS_STORE_TYPE"`
|
StoreType string `yaml:"store_type" env:"SETTINGS_STORE_TYPE"`
|
||||||
DataPath string `ocisConfig:"data_path" env:"SETTINGS_DATA_PATH"`
|
DataPath string `yaml:"data_path" env:"SETTINGS_DATA_PATH"`
|
||||||
Metadata Metadata `ocisConfig:"metadata_config"`
|
Metadata Metadata `yaml:"metadata_config"`
|
||||||
|
|
||||||
Asset Asset `ocisConfig:"asset"`
|
Asset Asset `yaml:"asset"`
|
||||||
TokenManager TokenManager `ocisConfig:"token_manager"`
|
TokenManager TokenManager `yaml:"token_manager"`
|
||||||
|
|
||||||
Context context.Context `ocisConfig:"-" yaml:"-"`
|
Context context.Context `yaml:"-"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// Asset defines the available asset configuration.
|
// Asset defines the available asset configuration.
|
||||||
type Asset struct {
|
type Asset struct {
|
||||||
Path string `ocisConfig:"path" env:"SETTINGS_ASSET_PATH"`
|
Path string `yaml:"path" env:"SETTINGS_ASSET_PATH"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// Metadata configures the metadata store to use
|
// Metadata configures the metadata store to use
|
||||||
type Metadata struct {
|
type Metadata struct {
|
||||||
GatewayAddress string `ocisConfig:"gateway_addr" env:"STORAGE_GATEWAY_GRPC_ADDR"`
|
GatewayAddress string `yaml:"gateway_addr" env:"STORAGE_GATEWAY_GRPC_ADDR"`
|
||||||
StorageAddress string `ocisConfig:"storage_addr" env:"STORAGE_GRPC_ADDR"`
|
StorageAddress string `yaml:"storage_addr" env:"STORAGE_GRPC_ADDR"`
|
||||||
|
|
||||||
ServiceUserID string `ocisConfig:"service_user_id" env:"METADATA_SERVICE_USER_UUID"`
|
ServiceUserID string `yaml:"service_user_id" env:"METADATA_SERVICE_USER_UUID"`
|
||||||
ServiceUserIDP string `ocisConfig:"service_user_idp" env:"OCIS_URL;METADATA_SERVICE_USER_IDP"`
|
ServiceUserIDP string `yaml:"service_user_idp" env:"OCIS_URL;METADATA_SERVICE_USER_IDP"`
|
||||||
MachineAuthAPIKey string `ocisConfig:"machine_auth_api_key" env:"OCIS_MACHINE_AUTH_API_KEY"`
|
MachineAuthAPIKey string `yaml:"machine_auth_api_key" env:"OCIS_MACHINE_AUTH_API_KEY"`
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,8 +2,8 @@ package config
|
|||||||
|
|
||||||
// Debug defines the available debug configuration.
|
// Debug defines the available debug configuration.
|
||||||
type Debug struct {
|
type Debug struct {
|
||||||
Addr string `ocisConfig:"addr" env:"SETTINGS_DEBUG_ADDR"`
|
Addr string `yaml:"addr" env:"SETTINGS_DEBUG_ADDR"`
|
||||||
Token string `ocisConfig:"token" env:"SETTINGS_DEBUG_TOKEN"`
|
Token string `yaml:"token" env:"SETTINGS_DEBUG_TOKEN"`
|
||||||
Pprof bool `ocisConfig:"pprof" env:"SETTINGS_DEBUG_PPROF"`
|
Pprof bool `yaml:"pprof" env:"SETTINGS_DEBUG_PPROF"`
|
||||||
Zpages bool `ocisConfig:"zpages" env:"SETTINGS_DEBUG_ZPAGES"`
|
Zpages bool `yaml:"zpages" env:"SETTINGS_DEBUG_ZPAGES"`
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,6 +2,6 @@ package config
|
|||||||
|
|
||||||
// GRPC defines the available grpc configuration.
|
// GRPC defines the available grpc configuration.
|
||||||
type GRPC struct {
|
type GRPC struct {
|
||||||
Addr string `ocisConfig:"addr" env:"SETTINGS_GRPC_ADDR"`
|
Addr string `yaml:"addr" env:"SETTINGS_GRPC_ADDR"`
|
||||||
Namespace string `ocisConfig:"-" yaml:"-"`
|
Namespace string `yaml:"-"`
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,17 +2,17 @@ package config
|
|||||||
|
|
||||||
// HTTP defines the available http configuration.
|
// HTTP defines the available http configuration.
|
||||||
type HTTP struct {
|
type HTTP struct {
|
||||||
Addr string `ocisConfig:"addr" env:"SETTINGS_HTTP_ADDR"`
|
Addr string `yaml:"addr" env:"SETTINGS_HTTP_ADDR"`
|
||||||
Namespace string `ocisConfig:"-" yaml:"-"`
|
Namespace string `yaml:"-"`
|
||||||
Root string `ocisConfig:"root" env:"SETTINGS_HTTP_ROOT"`
|
Root string `yaml:"root" env:"SETTINGS_HTTP_ROOT"`
|
||||||
CacheTTL int `ocisConfig:"cache_ttl" env:"SETTINGS_CACHE_TTL"`
|
CacheTTL int `yaml:"cache_ttl" env:"SETTINGS_CACHE_TTL"`
|
||||||
CORS CORS `ocisConfig:"cors"`
|
CORS CORS `yaml:"cors"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// CORS defines the available cors configuration.
|
// CORS defines the available cors configuration.
|
||||||
type CORS struct {
|
type CORS struct {
|
||||||
AllowedOrigins []string `ocisConfig:"allowed_origins"`
|
AllowedOrigins []string `yaml:"allowed_origins"`
|
||||||
AllowedMethods []string `ocisConfig:"allowed_methods"`
|
AllowedMethods []string `yaml:"allowed_methods"`
|
||||||
AllowedHeaders []string `ocisConfig:"allowed_headers"`
|
AllowedHeaders []string `yaml:"allowed_headers"`
|
||||||
AllowCredentials bool `ocisConfig:"allowed_credentials"`
|
AllowCredentials bool `yaml:"allowed_credentials"`
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,5 +2,5 @@ package config
|
|||||||
|
|
||||||
// TokenManager is the config for using the reva token manager
|
// TokenManager is the config for using the reva token manager
|
||||||
type TokenManager struct {
|
type TokenManager struct {
|
||||||
JWTSecret string `ocisConfig:"jwt_secret" env:"OCIS_JWT_SECRET;SETTINGS_JWT_SECRET"`
|
JWTSecret string `yaml:"jwt_secret" env:"OCIS_JWT_SECRET;SETTINGS_JWT_SECRET"`
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,5 +2,5 @@ package config
|
|||||||
|
|
||||||
// Service defines the available service configuration.
|
// Service defines the available service configuration.
|
||||||
type Service struct {
|
type Service struct {
|
||||||
Name string `ocisConfig:"-" yaml:"-"`
|
Name string `yaml:"-"`
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,8 +2,8 @@ package config
|
|||||||
|
|
||||||
// Tracing defines the available tracing configuration.
|
// Tracing defines the available tracing configuration.
|
||||||
type Tracing struct {
|
type Tracing struct {
|
||||||
Enabled bool `ocisConfig:"enabled" env:"OCIS_TRACING_ENABLED;SETTINGS_TRACING_ENABLED"`
|
Enabled bool `yaml:"enabled" env:"OCIS_TRACING_ENABLED;SETTINGS_TRACING_ENABLED"`
|
||||||
Type string `ocisConfig:"type" env:"OCIS_TRACING_TYPE;SETTINGS_TRACING_TYPE"`
|
Type string `yaml:"type" env:"OCIS_TRACING_TYPE;SETTINGS_TRACING_TYPE"`
|
||||||
Endpoint string `ocisConfig:"endpoint" env:"OCIS_TRACING_ENDPOINT;SETTINGS_TRACING_ENDPOINT"`
|
Endpoint string `yaml:"endpoint" env:"OCIS_TRACING_ENDPOINT;SETTINGS_TRACING_ENDPOINT"`
|
||||||
Collector string `ocisConfig:"collector" env:"OCIS_TRACING_COLLECTOR;SETTINGS_TRACING_COLLECTOR"`
|
Collector string `yaml:"collector" env:"OCIS_TRACING_COLLECTOR;SETTINGS_TRACING_COLLECTOR"`
|
||||||
}
|
}
|
||||||
|
|||||||
+259
-259
@@ -8,123 +8,123 @@ import (
|
|||||||
|
|
||||||
// Log defines the available logging configuration.
|
// Log defines the available logging configuration.
|
||||||
type Log struct {
|
type Log struct {
|
||||||
Level string `ocisConfig:"level"`
|
Level string `yaml:"level"`
|
||||||
Pretty bool `ocisConfig:"pretty"`
|
Pretty bool `yaml:"pretty"`
|
||||||
Color bool `ocisConfig:"color"`
|
Color bool `yaml:"color"`
|
||||||
File string `ocisConfig:"file"`
|
File string `yaml:"file"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// Debug defines the available debug configuration.
|
// Debug defines the available debug configuration.
|
||||||
type Debug struct {
|
type Debug struct {
|
||||||
Addr string `ocisConfig:"addr"`
|
Addr string `yaml:"addr"`
|
||||||
Token string `ocisConfig:"token"`
|
Token string `yaml:"token"`
|
||||||
Pprof bool `ocisConfig:"pprof"`
|
Pprof bool `yaml:"pprof"`
|
||||||
Zpages bool `ocisConfig:"zpages"`
|
Zpages bool `yaml:"zpages"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// Gateway defines the available gateway configuration.
|
// Gateway defines the available gateway configuration.
|
||||||
type Gateway struct {
|
type Gateway struct {
|
||||||
Port
|
Port
|
||||||
CommitShareToStorageGrant bool `ocisConfig:"commit_share_to_storage_grant"`
|
CommitShareToStorageGrant bool `yaml:"commit_share_to_storage_grant"`
|
||||||
CommitShareToStorageRef bool `ocisConfig:"commit_share_to_storage_ref"`
|
CommitShareToStorageRef bool `yaml:"commit_share_to_storage_ref"`
|
||||||
DisableHomeCreationOnLogin bool `ocisConfig:"disable_home_creation_on_login"`
|
DisableHomeCreationOnLogin bool `yaml:"disable_home_creation_on_login"`
|
||||||
ShareFolder string `ocisConfig:"share_folder"`
|
ShareFolder string `yaml:"share_folder"`
|
||||||
LinkGrants string `ocisConfig:"link_grants"`
|
LinkGrants string `yaml:"link_grants"`
|
||||||
HomeMapping string `ocisConfig:"home_mapping"`
|
HomeMapping string `yaml:"home_mapping"`
|
||||||
EtagCacheTTL int `ocisConfig:"etag_cache_ttl"`
|
EtagCacheTTL int `yaml:"etag_cache_ttl"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// StorageRegistry defines the available storage registry configuration
|
// StorageRegistry defines the available storage registry configuration
|
||||||
type StorageRegistry struct {
|
type StorageRegistry struct {
|
||||||
Driver string `ocisConfig:"driver"`
|
Driver string `yaml:"driver"`
|
||||||
// HomeProvider is the path in the global namespace that the static storage registry uses to determine the home storage
|
// HomeProvider is the path in the global namespace that the static storage registry uses to determine the home storage
|
||||||
HomeProvider string `ocisConfig:"home_provider"`
|
HomeProvider string `yaml:"home_provider"`
|
||||||
Rules []string `ocisConfig:"rules"`
|
Rules []string `yaml:"rules"`
|
||||||
JSON string `ocisConfig:"json"`
|
JSON string `yaml:"json"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// AppRegistry defines the available app registry configuration
|
// AppRegistry defines the available app registry configuration
|
||||||
type AppRegistry struct {
|
type AppRegistry struct {
|
||||||
Driver string `ocisConfig:"driver"`
|
Driver string `yaml:"driver"`
|
||||||
MimetypesJSON string `ocisConfig:"mime_types_json"`
|
MimetypesJSON string `yaml:"mime_types_json"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// AppProvider defines the available app provider configuration
|
// AppProvider defines the available app provider configuration
|
||||||
type AppProvider struct {
|
type AppProvider struct {
|
||||||
Port
|
Port
|
||||||
ExternalAddr string `ocisConfig:"external_addr"`
|
ExternalAddr string `yaml:"external_addr"`
|
||||||
Driver string `ocisConfig:"driver"`
|
Driver string `yaml:"driver"`
|
||||||
WopiDriver WopiDriver `ocisConfig:"wopi_driver"`
|
WopiDriver WopiDriver `yaml:"wopi_driver"`
|
||||||
AppsURL string `ocisConfig:"apps_url"`
|
AppsURL string `yaml:"apps_url"`
|
||||||
OpenURL string `ocisConfig:"open_url"`
|
OpenURL string `yaml:"open_url"`
|
||||||
NewURL string `ocisConfig:"new_url"`
|
NewURL string `yaml:"new_url"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type WopiDriver struct {
|
type WopiDriver struct {
|
||||||
AppAPIKey string `ocisConfig:"app_api_key"`
|
AppAPIKey string `yaml:"app_api_key"`
|
||||||
AppDesktopOnly bool `ocisConfig:"app_desktop_only"`
|
AppDesktopOnly bool `yaml:"app_desktop_only"`
|
||||||
AppIconURI string `ocisConfig:"app_icon_uri"`
|
AppIconURI string `yaml:"app_icon_uri"`
|
||||||
AppInternalURL string `ocisConfig:"app_internal_url"`
|
AppInternalURL string `yaml:"app_internal_url"`
|
||||||
AppName string `ocisConfig:"app_name"`
|
AppName string `yaml:"app_name"`
|
||||||
AppURL string `ocisConfig:"app_url"`
|
AppURL string `yaml:"app_url"`
|
||||||
Insecure bool `ocisConfig:"insecure"`
|
Insecure bool `yaml:"insecure"`
|
||||||
IopSecret string `ocisConfig:"ipo_secret"`
|
IopSecret string `yaml:"ipo_secret"`
|
||||||
JWTSecret string `ocisConfig:"jwt_secret"`
|
JWTSecret string `yaml:"jwt_secret"`
|
||||||
WopiURL string `ocisConfig:"wopi_url"`
|
WopiURL string `yaml:"wopi_url"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// Sharing defines the available sharing configuration.
|
// Sharing defines the available sharing configuration.
|
||||||
type Sharing struct {
|
type Sharing struct {
|
||||||
Port
|
Port
|
||||||
UserDriver string `ocisConfig:"user_driver"`
|
UserDriver string `yaml:"user_driver"`
|
||||||
UserJSONFile string `ocisConfig:"user_json_file"`
|
UserJSONFile string `yaml:"user_json_file"`
|
||||||
CS3ProviderAddr string `ocisConfig:"provider_addr"`
|
CS3ProviderAddr string `yaml:"provider_addr"`
|
||||||
CS3ServiceUser string `ocisConfig:"service_user_id"`
|
CS3ServiceUser string `yaml:"service_user_id"`
|
||||||
CS3ServiceUserIdp string `ocisConfig:"service_user_idp"`
|
CS3ServiceUserIdp string `yaml:"service_user_idp"`
|
||||||
UserSQLUsername string `ocisConfig:"user_sql_username"`
|
UserSQLUsername string `yaml:"user_sql_username"`
|
||||||
UserSQLPassword string `ocisConfig:"user_sql_password"`
|
UserSQLPassword string `yaml:"user_sql_password"`
|
||||||
UserSQLHost string `ocisConfig:"user_sql_host"`
|
UserSQLHost string `yaml:"user_sql_host"`
|
||||||
UserSQLPort int `ocisConfig:"user_sql_port"`
|
UserSQLPort int `yaml:"user_sql_port"`
|
||||||
UserSQLName string `ocisConfig:"user_sql_name"`
|
UserSQLName string `yaml:"user_sql_name"`
|
||||||
PublicDriver string `ocisConfig:"public_driver"`
|
PublicDriver string `yaml:"public_driver"`
|
||||||
PublicJSONFile string `ocisConfig:"public_json_file"`
|
PublicJSONFile string `yaml:"public_json_file"`
|
||||||
PublicPasswordHashCost int `ocisConfig:"public_password_hash_cost"`
|
PublicPasswordHashCost int `yaml:"public_password_hash_cost"`
|
||||||
PublicEnableExpiredSharesCleanup bool `ocisConfig:"public_enable_expired_shares_cleanup"`
|
PublicEnableExpiredSharesCleanup bool `yaml:"public_enable_expired_shares_cleanup"`
|
||||||
PublicJanitorRunInterval int `ocisConfig:"public_janitor_run_interval"`
|
PublicJanitorRunInterval int `yaml:"public_janitor_run_interval"`
|
||||||
UserStorageMountID string `ocisConfig:"user_storage_mount_id"`
|
UserStorageMountID string `yaml:"user_storage_mount_id"`
|
||||||
Events Events `ocisConfig:"events"`
|
Events Events `yaml:"events"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type Events struct {
|
type Events struct {
|
||||||
Address string `ocisConfig:"address"`
|
Address string `yaml:"address"`
|
||||||
ClusterID string `ocisConfig:"cluster_id"`
|
ClusterID string `yaml:"cluster_id"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// Port defines the available port configuration.
|
// Port defines the available port configuration.
|
||||||
type Port struct {
|
type Port struct {
|
||||||
// MaxCPUs can be a number or a percentage
|
// MaxCPUs can be a number or a percentage
|
||||||
MaxCPUs string `ocisConfig:"max_cpus"`
|
MaxCPUs string `yaml:"max_cpus"`
|
||||||
LogLevel string `ocisConfig:"log_level"`
|
LogLevel string `yaml:"log_level"`
|
||||||
// GRPCNetwork can be tcp, udp or unix
|
// GRPCNetwork can be tcp, udp or unix
|
||||||
GRPCNetwork string `ocisConfig:"grpc_network"`
|
GRPCNetwork string `yaml:"grpc_network"`
|
||||||
// GRPCAddr to listen on, hostname:port (0.0.0.0:9999 for all interfaces) or socket (/var/run/reva/sock)
|
// GRPCAddr to listen on, hostname:port (0.0.0.0:9999 for all interfaces) or socket (/var/run/reva/sock)
|
||||||
GRPCAddr string `ocisConfig:"grpc_addr"`
|
GRPCAddr string `yaml:"grpc_addr"`
|
||||||
// Protocol can be grpc or http
|
// Protocol can be grpc or http
|
||||||
// HTTPNetwork can be tcp, udp or unix
|
// HTTPNetwork can be tcp, udp or unix
|
||||||
HTTPNetwork string `ocisConfig:"http_network"`
|
HTTPNetwork string `yaml:"http_network"`
|
||||||
// HTTPAddr to listen on, hostname:port (0.0.0.0:9100 for all interfaces) or socket (/var/run/reva/sock)
|
// HTTPAddr to listen on, hostname:port (0.0.0.0:9100 for all interfaces) or socket (/var/run/reva/sock)
|
||||||
HTTPAddr string `ocisConfig:"http_addr"`
|
HTTPAddr string `yaml:"http_addr"`
|
||||||
// Protocol can be grpc or http
|
// Protocol can be grpc or http
|
||||||
Protocol string `ocisConfig:"protocol"`
|
Protocol string `yaml:"protocol"`
|
||||||
// Endpoint is used by the gateway and registries (eg localhost:9100 or cloud.example.com)
|
// Endpoint is used by the gateway and registries (eg localhost:9100 or cloud.example.com)
|
||||||
Endpoint string `ocisConfig:"endpoint"`
|
Endpoint string `yaml:"endpoint"`
|
||||||
// DebugAddr for the debug endpoint to bind to
|
// DebugAddr for the debug endpoint to bind to
|
||||||
DebugAddr string `ocisConfig:"debug_addr"`
|
DebugAddr string `yaml:"debug_addr"`
|
||||||
// Services can be used to give a list of services that should be started on this port
|
// Services can be used to give a list of services that should be started on this port
|
||||||
Services []string `ocisConfig:"services"`
|
Services []string `yaml:"services"`
|
||||||
// Config can be used to configure the reva instance.
|
// Config can be used to configure the reva instance.
|
||||||
// Services and Protocol will be ignored if this is used
|
// Services and Protocol will be ignored if this is used
|
||||||
Config map[string]interface{} `ocisConfig:"config"`
|
Config map[string]interface{} `yaml:"config"`
|
||||||
|
|
||||||
// Context allows for context cancellation and propagation
|
// Context allows for context cancellation and propagation
|
||||||
Context context.Context
|
Context context.Context
|
||||||
@@ -136,120 +136,120 @@ type Port struct {
|
|||||||
// Users defines the available users configuration.
|
// Users defines the available users configuration.
|
||||||
type Users struct {
|
type Users struct {
|
||||||
Port
|
Port
|
||||||
Driver string `ocisConfig:"driver"`
|
Driver string `yaml:"driver"`
|
||||||
JSON string `ocisConfig:"json"`
|
JSON string `yaml:"json"`
|
||||||
UserGroupsCacheExpiration int `ocisConfig:"user_groups_cache_expiration"`
|
UserGroupsCacheExpiration int `yaml:"user_groups_cache_expiration"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// AuthMachineConfig defines the available configuration for the machine auth driver.
|
// AuthMachineConfig defines the available configuration for the machine auth driver.
|
||||||
type AuthMachineConfig struct {
|
type AuthMachineConfig struct {
|
||||||
MachineAuthAPIKey string `ocisConfig:"machine_auth_api_key"`
|
MachineAuthAPIKey string `yaml:"machine_auth_api_key"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// Groups defines the available groups configuration.
|
// Groups defines the available groups configuration.
|
||||||
type Groups struct {
|
type Groups struct {
|
||||||
Port
|
Port
|
||||||
Driver string `ocisConfig:"driver"`
|
Driver string `yaml:"driver"`
|
||||||
JSON string `ocisConfig:"json"`
|
JSON string `yaml:"json"`
|
||||||
GroupMembersCacheExpiration int `ocisConfig:"group_members_cache_expiration"`
|
GroupMembersCacheExpiration int `yaml:"group_members_cache_expiration"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// FrontendPort defines the available frontend configuration.
|
// FrontendPort defines the available frontend configuration.
|
||||||
type FrontendPort struct {
|
type FrontendPort struct {
|
||||||
Port
|
Port
|
||||||
|
|
||||||
AppProviderInsecure bool `ocisConfig:"app_provider_insecure"`
|
AppProviderInsecure bool `yaml:"app_provider_insecure"`
|
||||||
AppProviderPrefix string `ocisConfig:"app_provider_prefix"`
|
AppProviderPrefix string `yaml:"app_provider_prefix"`
|
||||||
ArchiverInsecure bool `ocisConfig:"archiver_insecure"`
|
ArchiverInsecure bool `yaml:"archiver_insecure"`
|
||||||
ArchiverPrefix string `ocisConfig:"archiver_prefix"`
|
ArchiverPrefix string `yaml:"archiver_prefix"`
|
||||||
DatagatewayPrefix string `ocisConfig:"data_gateway_prefix"`
|
DatagatewayPrefix string `yaml:"data_gateway_prefix"`
|
||||||
Favorites bool `ocisConfig:"favorites"`
|
Favorites bool `yaml:"favorites"`
|
||||||
ProjectSpaces bool `ocisConfig:"project_spaces"`
|
ProjectSpaces bool `yaml:"project_spaces"`
|
||||||
OCDavInsecure bool `ocisConfig:"ocdav_insecure"`
|
OCDavInsecure bool `yaml:"ocdav_insecure"`
|
||||||
OCDavPrefix string `ocisConfig:"ocdav_prefix"`
|
OCDavPrefix string `yaml:"ocdav_prefix"`
|
||||||
OCSPrefix string `ocisConfig:"ocs_prefix"`
|
OCSPrefix string `yaml:"ocs_prefix"`
|
||||||
OCSSharePrefix string `ocisConfig:"ocs_share_prefix"`
|
OCSSharePrefix string `yaml:"ocs_share_prefix"`
|
||||||
OCSHomeNamespace string `ocisConfig:"ocs_home_namespace"`
|
OCSHomeNamespace string `yaml:"ocs_home_namespace"`
|
||||||
PublicURL string `ocisConfig:"public_url"`
|
PublicURL string `yaml:"public_url"`
|
||||||
OCSCacheWarmupDriver string `ocisConfig:"ocs_cache_warmup_driver"`
|
OCSCacheWarmupDriver string `yaml:"ocs_cache_warmup_driver"`
|
||||||
OCSAdditionalInfoAttribute string `ocisConfig:"ocs_additional_info_attribute"`
|
OCSAdditionalInfoAttribute string `yaml:"ocs_additional_info_attribute"`
|
||||||
OCSResourceInfoCacheTTL int `ocisConfig:"ocs_resource_info_cache_ttl"`
|
OCSResourceInfoCacheTTL int `yaml:"ocs_resource_info_cache_ttl"`
|
||||||
Middleware Middleware `ocisConfig:"middleware"`
|
Middleware Middleware `yaml:"middleware"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// Middleware configures reva middlewares.
|
// Middleware configures reva middlewares.
|
||||||
type Middleware struct {
|
type Middleware struct {
|
||||||
Auth Auth `ocisConfig:"auth"`
|
Auth Auth `yaml:"auth"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// Auth configures reva http auth middleware.
|
// Auth configures reva http auth middleware.
|
||||||
type Auth struct {
|
type Auth struct {
|
||||||
CredentialsByUserAgent map[string]string `ocisConfig:"credentials_by_user_agenr"`
|
CredentialsByUserAgent map[string]string `yaml:"credentials_by_user_agenr"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// DataGatewayPort has a public url
|
// DataGatewayPort has a public url
|
||||||
type DataGatewayPort struct {
|
type DataGatewayPort struct {
|
||||||
Port
|
Port
|
||||||
PublicURL string `ocisConfig:""`
|
PublicURL string `yaml:""`
|
||||||
}
|
}
|
||||||
|
|
||||||
type DataProvider struct {
|
type DataProvider struct {
|
||||||
Insecure bool `ocisConfig:"insecure"`
|
Insecure bool `yaml:"insecure"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// StoragePort defines the available storage configuration.
|
// StoragePort defines the available storage configuration.
|
||||||
type StoragePort struct {
|
type StoragePort struct {
|
||||||
Port
|
Port
|
||||||
Driver string `ocisConfig:"driver"`
|
Driver string `yaml:"driver"`
|
||||||
MountID string `ocisConfig:"mount_id"`
|
MountID string `yaml:"mount_id"`
|
||||||
AlternativeID string `ocisConfig:"alternative_id"`
|
AlternativeID string `yaml:"alternative_id"`
|
||||||
ExposeDataServer bool `ocisConfig:"expose_data_server"`
|
ExposeDataServer bool `yaml:"expose_data_server"`
|
||||||
// url the data gateway will use to route requests
|
// url the data gateway will use to route requests
|
||||||
DataServerURL string `ocisConfig:"data_server_url"`
|
DataServerURL string `yaml:"data_server_url"`
|
||||||
|
|
||||||
// for HTTP ports with only one http service
|
// for HTTP ports with only one http service
|
||||||
HTTPPrefix string `ocisConfig:"http_prefix"`
|
HTTPPrefix string `yaml:"http_prefix"`
|
||||||
TempFolder string `ocisConfig:"temp_folder"`
|
TempFolder string `yaml:"temp_folder"`
|
||||||
ReadOnly bool `ocisConfig:"read_only"`
|
ReadOnly bool `yaml:"read_only"`
|
||||||
DataProvider DataProvider `ocisConfig:"data_provider"`
|
DataProvider DataProvider `yaml:"data_provider"`
|
||||||
GatewayEndpoint string `ocisConfig:"gateway_endpoint"`
|
GatewayEndpoint string `yaml:"gateway_endpoint"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// PublicStorage configures a public storage provider
|
// PublicStorage configures a public storage provider
|
||||||
type PublicStorage struct {
|
type PublicStorage struct {
|
||||||
StoragePort
|
StoragePort
|
||||||
|
|
||||||
PublicShareProviderAddr string `ocisConfig:"public_share_provider_addr"`
|
PublicShareProviderAddr string `yaml:"public_share_provider_addr"`
|
||||||
UserProviderAddr string `ocisConfig:"user_provider_addr"`
|
UserProviderAddr string `yaml:"user_provider_addr"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// StorageConfig combines all available storage driver configuration parts.
|
// StorageConfig combines all available storage driver configuration parts.
|
||||||
type StorageConfig struct {
|
type StorageConfig struct {
|
||||||
EOS DriverEOS `ocisConfig:"eos"`
|
EOS DriverEOS `yaml:"eos"`
|
||||||
Local DriverCommon `ocisConfig:"local"`
|
Local DriverCommon `yaml:"local"`
|
||||||
OwnCloudSQL DriverOwnCloudSQL `ocisConfig:"owncloud_sql"`
|
OwnCloudSQL DriverOwnCloudSQL `yaml:"owncloud_sql"`
|
||||||
S3 DriverS3 `ocisConfig:"s3"`
|
S3 DriverS3 `yaml:"s3"`
|
||||||
S3NG DriverS3NG `ocisConfig:"s3ng"`
|
S3NG DriverS3NG `yaml:"s3ng"`
|
||||||
OCIS DriverOCIS `ocisConfig:"ocis"`
|
OCIS DriverOCIS `yaml:"ocis"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// DriverCommon defines common driver configuration options.
|
// DriverCommon defines common driver configuration options.
|
||||||
type DriverCommon struct {
|
type DriverCommon struct {
|
||||||
// Root is the absolute path to the location of the data
|
// Root is the absolute path to the location of the data
|
||||||
Root string `ocisConfig:"root"`
|
Root string `yaml:"root"`
|
||||||
//ShareFolder defines the name of the folder jailing all shares
|
//ShareFolder defines the name of the folder jailing all shares
|
||||||
ShareFolder string `ocisConfig:"share_folder"`
|
ShareFolder string `yaml:"share_folder"`
|
||||||
// UserLayout contains the template used to construct
|
// UserLayout contains the template used to construct
|
||||||
// the internal path, eg: `{{substr 0 1 .Username}}/{{.Username}}`
|
// the internal path, eg: `{{substr 0 1 .Username}}/{{.Username}}`
|
||||||
UserLayout string `ocisConfig:"user_layout"`
|
UserLayout string `yaml:"user_layout"`
|
||||||
// EnableHome enables the creation of home directories.
|
// EnableHome enables the creation of home directories.
|
||||||
EnableHome bool `ocisConfig:"enable_home"`
|
EnableHome bool `yaml:"enable_home"`
|
||||||
// PersonalSpaceAliasTemplate contains the template used to construct
|
// PersonalSpaceAliasTemplate contains the template used to construct
|
||||||
// the personal space alias, eg: `"{{.SpaceType}}/{{.User.Username | lower}}"`
|
// the personal space alias, eg: `"{{.SpaceType}}/{{.User.Username | lower}}"`
|
||||||
PersonalSpaceAliasTemplate string `ocisConfig:"personalspacealias_template"`
|
PersonalSpaceAliasTemplate string `yaml:"personalspacealias_template"`
|
||||||
// GeneralSpaceAliasTemplate contains the template used to construct
|
// GeneralSpaceAliasTemplate contains the template used to construct
|
||||||
// the general space alias, eg: `{{.SpaceType}}/{{.SpaceName | replace " " "-" | lower}}`
|
// the general space alias, eg: `{{.SpaceType}}/{{.SpaceName | replace " " "-" | lower}}`
|
||||||
GeneralSpaceAliasTemplate string `ocisConfig:"generalspacealias_template"`
|
GeneralSpaceAliasTemplate string `yaml:"generalspacealias_template"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// DriverEOS defines the available EOS driver configuration.
|
// DriverEOS defines the available EOS driver configuration.
|
||||||
@@ -257,60 +257,60 @@ type DriverEOS struct {
|
|||||||
DriverCommon
|
DriverCommon
|
||||||
|
|
||||||
// ShadowNamespace for storing shadow data
|
// ShadowNamespace for storing shadow data
|
||||||
ShadowNamespace string `ocisConfig:"shadow_namespace"`
|
ShadowNamespace string `yaml:"shadow_namespace"`
|
||||||
|
|
||||||
// UploadsNamespace for storing upload data
|
// UploadsNamespace for storing upload data
|
||||||
UploadsNamespace string `ocisConfig:"uploads_namespace"`
|
UploadsNamespace string `yaml:"uploads_namespace"`
|
||||||
|
|
||||||
// Location of the eos binary.
|
// Location of the eos binary.
|
||||||
// Default is /usr/bin/eos.
|
// Default is /usr/bin/eos.
|
||||||
EosBinary string `ocisConfig:"eos_binary"`
|
EosBinary string `yaml:"eos_binary"`
|
||||||
|
|
||||||
// Location of the xrdcopy binary.
|
// Location of the xrdcopy binary.
|
||||||
// Default is /usr/bin/xrdcopy.
|
// Default is /usr/bin/xrdcopy.
|
||||||
XrdcopyBinary string `ocisConfig:"xrd_copy_binary"`
|
XrdcopyBinary string `yaml:"xrd_copy_binary"`
|
||||||
|
|
||||||
// URL of the Master EOS MGM.
|
// URL of the Master EOS MGM.
|
||||||
// Default is root://eos-example.org
|
// Default is root://eos-example.org
|
||||||
MasterURL string `ocisConfig:"master_url"`
|
MasterURL string `yaml:"master_url"`
|
||||||
|
|
||||||
// URI of the EOS MGM grpc server
|
// URI of the EOS MGM grpc server
|
||||||
// Default is empty
|
// Default is empty
|
||||||
GrpcURI string `ocisConfig:"grpc_uri"`
|
GrpcURI string `yaml:"grpc_uri"`
|
||||||
|
|
||||||
// URL of the Slave EOS MGM.
|
// URL of the Slave EOS MGM.
|
||||||
// Default is root://eos-example.org
|
// Default is root://eos-example.org
|
||||||
SlaveURL string `ocisConfig:"slave_url"`
|
SlaveURL string `yaml:"slave_url"`
|
||||||
|
|
||||||
// Location on the local fs where to store reads.
|
// Location on the local fs where to store reads.
|
||||||
// Defaults to os.TempDir()
|
// Defaults to os.TempDir()
|
||||||
CacheDirectory string `ocisConfig:"cache_directory"`
|
CacheDirectory string `yaml:"cache_directory"`
|
||||||
|
|
||||||
// Enables logging of the commands executed
|
// Enables logging of the commands executed
|
||||||
// Defaults to false
|
// Defaults to false
|
||||||
EnableLogging bool `ocisConfig:"enable_logging"`
|
EnableLogging bool `yaml:"enable_logging"`
|
||||||
|
|
||||||
// ShowHiddenSysFiles shows internal EOS files like
|
// ShowHiddenSysFiles shows internal EOS files like
|
||||||
// .sys.v# and .sys.a# files.
|
// .sys.v# and .sys.a# files.
|
||||||
ShowHiddenSysFiles bool `ocisConfig:"shadow_hidden_files"`
|
ShowHiddenSysFiles bool `yaml:"shadow_hidden_files"`
|
||||||
|
|
||||||
// ForceSingleUserMode will force connections to EOS to use SingleUsername
|
// ForceSingleUserMode will force connections to EOS to use SingleUsername
|
||||||
ForceSingleUserMode bool `ocisConfig:"force_single_user_mode"`
|
ForceSingleUserMode bool `yaml:"force_single_user_mode"`
|
||||||
|
|
||||||
// UseKeyTabAuth changes will authenticate requests by using an EOS keytab.
|
// UseKeyTabAuth changes will authenticate requests by using an EOS keytab.
|
||||||
UseKeytab bool `ocisConfig:"user_keytab"`
|
UseKeytab bool `yaml:"user_keytab"`
|
||||||
|
|
||||||
// SecProtocol specifies the xrootd security protocol to use between the server and EOS.
|
// SecProtocol specifies the xrootd security protocol to use between the server and EOS.
|
||||||
SecProtocol string `ocisConfig:"sec_protocol"`
|
SecProtocol string `yaml:"sec_protocol"`
|
||||||
|
|
||||||
// Keytab specifies the location of the keytab to use to authenticate to EOS.
|
// Keytab specifies the location of the keytab to use to authenticate to EOS.
|
||||||
Keytab string `ocisConfig:"keytab"`
|
Keytab string `yaml:"keytab"`
|
||||||
|
|
||||||
// SingleUsername is the username to use when SingleUserMode is enabled
|
// SingleUsername is the username to use when SingleUserMode is enabled
|
||||||
SingleUsername string `ocisConfig:"single_username"`
|
SingleUsername string `yaml:"single_username"`
|
||||||
|
|
||||||
// gateway service to use for uid lookups
|
// gateway service to use for uid lookups
|
||||||
GatewaySVC string `ocisConfig:"gateway_svc"`
|
GatewaySVC string `yaml:"gateway_svc"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// DriverOCIS defines the available oCIS storage driver configuration.
|
// DriverOCIS defines the available oCIS storage driver configuration.
|
||||||
@@ -322,198 +322,198 @@ type DriverOCIS struct {
|
|||||||
type DriverOwnCloudSQL struct {
|
type DriverOwnCloudSQL struct {
|
||||||
DriverCommon
|
DriverCommon
|
||||||
|
|
||||||
UploadInfoDir string `ocisConfig:"upload_info_dir"`
|
UploadInfoDir string `yaml:"upload_info_dir"`
|
||||||
DBUsername string `ocisConfig:"db_username"`
|
DBUsername string `yaml:"db_username"`
|
||||||
DBPassword string `ocisConfig:"db_password"`
|
DBPassword string `yaml:"db_password"`
|
||||||
DBHost string `ocisConfig:"db_host"`
|
DBHost string `yaml:"db_host"`
|
||||||
DBPort int `ocisConfig:"db_port"`
|
DBPort int `yaml:"db_port"`
|
||||||
DBName string `ocisConfig:"db_name"`
|
DBName string `yaml:"db_name"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// DriverS3 defines the available S3 storage driver configuration.
|
// DriverS3 defines the available S3 storage driver configuration.
|
||||||
type DriverS3 struct {
|
type DriverS3 struct {
|
||||||
DriverCommon
|
DriverCommon
|
||||||
|
|
||||||
Region string `ocisConfig:"region"`
|
Region string `yaml:"region"`
|
||||||
AccessKey string `ocisConfig:"access_key"`
|
AccessKey string `yaml:"access_key"`
|
||||||
SecretKey string `ocisConfig:"secret_key"`
|
SecretKey string `yaml:"secret_key"`
|
||||||
Endpoint string `ocisConfig:"endpoint"`
|
Endpoint string `yaml:"endpoint"`
|
||||||
Bucket string `ocisConfig:"bucket"`
|
Bucket string `yaml:"bucket"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// DriverS3NG defines the available s3ng storage driver configuration.
|
// DriverS3NG defines the available s3ng storage driver configuration.
|
||||||
type DriverS3NG struct {
|
type DriverS3NG struct {
|
||||||
DriverCommon
|
DriverCommon
|
||||||
|
|
||||||
Region string `ocisConfig:"region"`
|
Region string `yaml:"region"`
|
||||||
AccessKey string `ocisConfig:"access_key"`
|
AccessKey string `yaml:"access_key"`
|
||||||
SecretKey string `ocisConfig:"secret_key"`
|
SecretKey string `yaml:"secret_key"`
|
||||||
Endpoint string `ocisConfig:"endpoint"`
|
Endpoint string `yaml:"endpoint"`
|
||||||
Bucket string `ocisConfig:"bucket"`
|
Bucket string `yaml:"bucket"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// OIDC defines the available OpenID Connect configuration.
|
// OIDC defines the available OpenID Connect configuration.
|
||||||
type OIDC struct {
|
type OIDC struct {
|
||||||
Issuer string `ocisConfig:"issuer"`
|
Issuer string `yaml:"issuer"`
|
||||||
Insecure bool `ocisConfig:"insecure"`
|
Insecure bool `yaml:"insecure"`
|
||||||
IDClaim string `ocisConfig:"id_claim"`
|
IDClaim string `yaml:"id_claim"`
|
||||||
UIDClaim string `ocisConfig:"uid_claim"`
|
UIDClaim string `yaml:"uid_claim"`
|
||||||
GIDClaim string `ocisConfig:"gid_claim"`
|
GIDClaim string `yaml:"gid_claim"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// LDAP defines the available ldap configuration.
|
// LDAP defines the available ldap configuration.
|
||||||
type LDAP struct {
|
type LDAP struct {
|
||||||
Hostname string `ocisConfig:"hostname"`
|
Hostname string `yaml:"hostname"`
|
||||||
Port int `ocisConfig:"port"`
|
Port int `yaml:"port"`
|
||||||
CACert string `ocisConfig:"ca_cert"`
|
CACert string `yaml:"ca_cert"`
|
||||||
Insecure bool `ocisConfig:"insecure"`
|
Insecure bool `yaml:"insecure"`
|
||||||
BaseDN string `ocisConfig:"base_dn"`
|
BaseDN string `yaml:"base_dn"`
|
||||||
LoginFilter string `ocisConfig:"login_filter"`
|
LoginFilter string `yaml:"login_filter"`
|
||||||
UserFilter string `ocisConfig:"user_filter"`
|
UserFilter string `yaml:"user_filter"`
|
||||||
UserAttributeFilter string `ocisConfig:"user_attribute_filter"`
|
UserAttributeFilter string `yaml:"user_attribute_filter"`
|
||||||
UserFindFilter string `ocisConfig:"user_find_filter"`
|
UserFindFilter string `yaml:"user_find_filter"`
|
||||||
UserGroupFilter string `ocisConfig:"user_group_filter"`
|
UserGroupFilter string `yaml:"user_group_filter"`
|
||||||
GroupFilter string `ocisConfig:"group_filter"`
|
GroupFilter string `yaml:"group_filter"`
|
||||||
GroupAttributeFilter string `ocisConfig:"group_attribute_filter"`
|
GroupAttributeFilter string `yaml:"group_attribute_filter"`
|
||||||
GroupFindFilter string `ocisConfig:"group_finder_filter"`
|
GroupFindFilter string `yaml:"group_finder_filter"`
|
||||||
GroupMemberFilter string `ocisConfig:"group_member_filter"`
|
GroupMemberFilter string `yaml:"group_member_filter"`
|
||||||
BindDN string `ocisConfig:"bind_dn"`
|
BindDN string `yaml:"bind_dn"`
|
||||||
BindPassword string `ocisConfig:"bind_password"`
|
BindPassword string `yaml:"bind_password"`
|
||||||
IDP string `ocisConfig:"idp"`
|
IDP string `yaml:"idp"`
|
||||||
UserSchema LDAPUserSchema `ocisConfig:"user_schema"`
|
UserSchema LDAPUserSchema `yaml:"user_schema"`
|
||||||
GroupSchema LDAPGroupSchema `ocisConfig:"group_schema"`
|
GroupSchema LDAPGroupSchema `yaml:"group_schema"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// UserGroupRest defines the REST driver specification for user and group resolution.
|
// UserGroupRest defines the REST driver specification for user and group resolution.
|
||||||
type UserGroupRest struct {
|
type UserGroupRest struct {
|
||||||
ClientID string `ocisConfig:"client_id"`
|
ClientID string `yaml:"client_id"`
|
||||||
ClientSecret string `ocisConfig:"client_secret"`
|
ClientSecret string `yaml:"client_secret"`
|
||||||
RedisAddress string `ocisConfig:"redis_address"`
|
RedisAddress string `yaml:"redis_address"`
|
||||||
RedisUsername string `ocisConfig:"redis_username"`
|
RedisUsername string `yaml:"redis_username"`
|
||||||
RedisPassword string `ocisConfig:"redis_password"`
|
RedisPassword string `yaml:"redis_password"`
|
||||||
IDProvider string `ocisConfig:"idp_provider"`
|
IDProvider string `yaml:"idp_provider"`
|
||||||
APIBaseURL string `ocisConfig:"api_base_url"`
|
APIBaseURL string `yaml:"api_base_url"`
|
||||||
OIDCTokenEndpoint string `ocisConfig:"oidc_token_endpoint"`
|
OIDCTokenEndpoint string `yaml:"oidc_token_endpoint"`
|
||||||
TargetAPI string `ocisConfig:"target_api"`
|
TargetAPI string `yaml:"target_api"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// UserOwnCloudSQL defines the available ownCloudSQL user provider configuration.
|
// UserOwnCloudSQL defines the available ownCloudSQL user provider configuration.
|
||||||
type UserOwnCloudSQL struct {
|
type UserOwnCloudSQL struct {
|
||||||
DBUsername string `ocisConfig:"db_username"`
|
DBUsername string `yaml:"db_username"`
|
||||||
DBPassword string `ocisConfig:"db_password"`
|
DBPassword string `yaml:"db_password"`
|
||||||
DBHost string `ocisConfig:"db_host"`
|
DBHost string `yaml:"db_host"`
|
||||||
DBPort int `ocisConfig:"db_port"`
|
DBPort int `yaml:"db_port"`
|
||||||
DBName string `ocisConfig:"db_name"`
|
DBName string `yaml:"db_name"`
|
||||||
Idp string `ocisConfig:"idp"`
|
Idp string `yaml:"idp"`
|
||||||
Nobody int64 `ocisConfig:"nobody"`
|
Nobody int64 `yaml:"nobody"`
|
||||||
JoinUsername bool `ocisConfig:"join_username"`
|
JoinUsername bool `yaml:"join_username"`
|
||||||
JoinOwnCloudUUID bool `ocisConfig:"join_owncloud_uuid"`
|
JoinOwnCloudUUID bool `yaml:"join_owncloud_uuid"`
|
||||||
EnableMedialSearch bool `ocisConfig:"enable_medial_search"`
|
EnableMedialSearch bool `yaml:"enable_medial_search"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// LDAPUserSchema defines the available ldap user schema configuration.
|
// LDAPUserSchema defines the available ldap user schema configuration.
|
||||||
type LDAPUserSchema struct {
|
type LDAPUserSchema struct {
|
||||||
UID string `ocisConfig:"uid"`
|
UID string `yaml:"uid"`
|
||||||
Mail string `ocisConfig:"mail"`
|
Mail string `yaml:"mail"`
|
||||||
DisplayName string `ocisConfig:"display_name"`
|
DisplayName string `yaml:"display_name"`
|
||||||
CN string `ocisConfig:"cn"`
|
CN string `yaml:"cn"`
|
||||||
UIDNumber string `ocisConfig:"uid_number"`
|
UIDNumber string `yaml:"uid_number"`
|
||||||
GIDNumber string `ocisConfig:"gid_number"`
|
GIDNumber string `yaml:"gid_number"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// LDAPGroupSchema defines the available ldap group schema configuration.
|
// LDAPGroupSchema defines the available ldap group schema configuration.
|
||||||
type LDAPGroupSchema struct {
|
type LDAPGroupSchema struct {
|
||||||
GID string `ocisConfig:"gid"`
|
GID string `yaml:"gid"`
|
||||||
Mail string `ocisConfig:"mail"`
|
Mail string `yaml:"mail"`
|
||||||
DisplayName string `ocisConfig:"display_name"`
|
DisplayName string `yaml:"display_name"`
|
||||||
CN string `ocisConfig:"cn"`
|
CN string `yaml:"cn"`
|
||||||
GIDNumber string `ocisConfig:"gid_number"`
|
GIDNumber string `yaml:"gid_number"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// OCDav defines the available ocdav configuration.
|
// OCDav defines the available ocdav configuration.
|
||||||
type OCDav struct {
|
type OCDav struct {
|
||||||
WebdavNamespace string `ocisConfig:"webdav_namespace"`
|
WebdavNamespace string `yaml:"webdav_namespace"`
|
||||||
DavFilesNamespace string `ocisConfig:"dav_files_namespace"`
|
DavFilesNamespace string `yaml:"dav_files_namespace"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// Archiver defines the available archiver configuration.
|
// Archiver defines the available archiver configuration.
|
||||||
type Archiver struct {
|
type Archiver struct {
|
||||||
MaxNumFiles int64 `ocisConfig:"max_num_files"`
|
MaxNumFiles int64 `yaml:"max_num_files"`
|
||||||
MaxSize int64 `ocisConfig:"max_size"`
|
MaxSize int64 `yaml:"max_size"`
|
||||||
ArchiverURL string `ocisConfig:"archiver_url"`
|
ArchiverURL string `yaml:"archiver_url"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// Reva defines the available reva configuration.
|
// Reva defines the available reva configuration.
|
||||||
type Reva struct {
|
type Reva struct {
|
||||||
// JWTSecret used to sign jwt tokens between services
|
// JWTSecret used to sign jwt tokens between services
|
||||||
JWTSecret string `ocisConfig:"jwt_secret"`
|
JWTSecret string `yaml:"jwt_secret"`
|
||||||
SkipUserGroupsInToken bool `ocisConfig:"skip_user_grooups_in_token"`
|
SkipUserGroupsInToken bool `yaml:"skip_user_grooups_in_token"`
|
||||||
TransferSecret string `ocisConfig:"transfer_secret"`
|
TransferSecret string `yaml:"transfer_secret"`
|
||||||
TransferExpires int `ocisConfig:"transfer_expires"`
|
TransferExpires int `yaml:"transfer_expires"`
|
||||||
OIDC OIDC `ocisConfig:"oidc"`
|
OIDC OIDC `yaml:"oidc"`
|
||||||
LDAP LDAP `ocisConfig:"ldap"`
|
LDAP LDAP `yaml:"ldap"`
|
||||||
UserGroupRest UserGroupRest `ocisConfig:"user_group_rest"`
|
UserGroupRest UserGroupRest `yaml:"user_group_rest"`
|
||||||
UserOwnCloudSQL UserOwnCloudSQL `ocisConfig:"user_owncloud_sql"`
|
UserOwnCloudSQL UserOwnCloudSQL `yaml:"user_owncloud_sql"`
|
||||||
OCDav OCDav `ocisConfig:"ocdav"`
|
OCDav OCDav `yaml:"ocdav"`
|
||||||
Archiver Archiver `ocisConfig:"archiver"`
|
Archiver Archiver `yaml:"archiver"`
|
||||||
UserStorage StorageConfig `ocisConfig:"user_storage"`
|
UserStorage StorageConfig `yaml:"user_storage"`
|
||||||
MetadataStorage StorageConfig `ocisConfig:"metadata_storage"`
|
MetadataStorage StorageConfig `yaml:"metadata_storage"`
|
||||||
// Ports are used to configure which services to start on which port
|
// Ports are used to configure which services to start on which port
|
||||||
Frontend FrontendPort `ocisConfig:"frontend"`
|
Frontend FrontendPort `yaml:"frontend"`
|
||||||
DataGateway DataGatewayPort `ocisConfig:"data_gateway"`
|
DataGateway DataGatewayPort `yaml:"data_gateway"`
|
||||||
Gateway Gateway `ocisConfig:"gateway"`
|
Gateway Gateway `yaml:"gateway"`
|
||||||
StorageRegistry StorageRegistry `ocisConfig:"storage_registry"`
|
StorageRegistry StorageRegistry `yaml:"storage_registry"`
|
||||||
AppRegistry AppRegistry `ocisConfig:"app_registry"`
|
AppRegistry AppRegistry `yaml:"app_registry"`
|
||||||
Users Users `ocisConfig:"users"`
|
Users Users `yaml:"users"`
|
||||||
Groups Groups `ocisConfig:"groups"`
|
Groups Groups `yaml:"groups"`
|
||||||
AuthProvider Users `ocisConfig:"auth_provider"`
|
AuthProvider Users `yaml:"auth_provider"`
|
||||||
AuthBasic Port `ocisConfig:"auth_basic"`
|
AuthBasic Port `yaml:"auth_basic"`
|
||||||
AuthBearer Port `ocisConfig:"auth_bearer"`
|
AuthBearer Port `yaml:"auth_bearer"`
|
||||||
AuthMachine Port `ocisConfig:"auth_machine"`
|
AuthMachine Port `yaml:"auth_machine"`
|
||||||
AuthMachineConfig AuthMachineConfig `ocisConfig:"auth_machine_config"`
|
AuthMachineConfig AuthMachineConfig `yaml:"auth_machine_config"`
|
||||||
Sharing Sharing `ocisConfig:"sharing"`
|
Sharing Sharing `yaml:"sharing"`
|
||||||
StorageShares StoragePort `ocisConfig:"storage_shares"`
|
StorageShares StoragePort `yaml:"storage_shares"`
|
||||||
StorageUsers StoragePort `ocisConfig:"storage_users"`
|
StorageUsers StoragePort `yaml:"storage_users"`
|
||||||
StoragePublicLink PublicStorage `ocisConfig:"storage_public_link"`
|
StoragePublicLink PublicStorage `yaml:"storage_public_link"`
|
||||||
StorageMetadata StoragePort `ocisConfig:"storage_metadata"`
|
StorageMetadata StoragePort `yaml:"storage_metadata"`
|
||||||
AppProvider AppProvider `ocisConfig:"app_provider"`
|
AppProvider AppProvider `yaml:"app_provider"`
|
||||||
Permissions Port `ocisConfig:"permissions"`
|
Permissions Port `yaml:"permissions"`
|
||||||
// Configs can be used to configure the reva instance.
|
// Configs can be used to configure the reva instance.
|
||||||
// Services and Ports will be ignored if this is used
|
// Services and Ports will be ignored if this is used
|
||||||
Configs map[string]interface{} `ocisConfig:"configs"`
|
Configs map[string]interface{} `yaml:"configs"`
|
||||||
// chunking and resumable upload config (TUS)
|
// chunking and resumable upload config (TUS)
|
||||||
UploadMaxChunkSize int `ocisConfig:"uppload_max_chunk_size"`
|
UploadMaxChunkSize int `yaml:"uppload_max_chunk_size"`
|
||||||
UploadHTTPMethodOverride string `ocisConfig:"upload_http_method_override"`
|
UploadHTTPMethodOverride string `yaml:"upload_http_method_override"`
|
||||||
// checksumming capabilities
|
// checksumming capabilities
|
||||||
ChecksumSupportedTypes []string `ocisConfig:"checksum_supported_types"`
|
ChecksumSupportedTypes []string `yaml:"checksum_supported_types"`
|
||||||
ChecksumPreferredUploadType string `ocisConfig:"checksum_preferred_upload_type"`
|
ChecksumPreferredUploadType string `yaml:"checksum_preferred_upload_type"`
|
||||||
DefaultUploadProtocol string `ocisConfig:"default_upload_protocol"`
|
DefaultUploadProtocol string `yaml:"default_upload_protocol"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// Tracing defines the available tracing configuration.
|
// Tracing defines the available tracing configuration.
|
||||||
type Tracing struct {
|
type Tracing struct {
|
||||||
Enabled bool `ocisConfig:"enabled"`
|
Enabled bool `yaml:"enabled"`
|
||||||
Type string `ocisConfig:"type"`
|
Type string `yaml:"type"`
|
||||||
Endpoint string `ocisConfig:"endpoint"`
|
Endpoint string `yaml:"endpoint"`
|
||||||
Collector string `ocisConfig:"collector"`
|
Collector string `yaml:"collector"`
|
||||||
Service string `ocisConfig:"service"`
|
Service string `yaml:"service"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// Asset defines the available asset configuration.
|
// Asset defines the available asset configuration.
|
||||||
type Asset struct {
|
type Asset struct {
|
||||||
Path string `ocisConfig:"path"`
|
Path string `yaml:"path"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// Config combines all available configuration parts.
|
// Config combines all available configuration parts.
|
||||||
type Config struct {
|
type Config struct {
|
||||||
*shared.Commons
|
*shared.Commons
|
||||||
|
|
||||||
File string `ocisConfig:"file"`
|
File string `yaml:"file"`
|
||||||
Log *shared.Log `ocisConfig:"log"`
|
Log *shared.Log `yaml:"log"`
|
||||||
Debug Debug `ocisConfig:"debug"`
|
Debug Debug `yaml:"debug"`
|
||||||
Reva Reva `ocisConfig:"reva"`
|
Reva Reva `yaml:"reva"`
|
||||||
Tracing Tracing `ocisConfig:"tracing"`
|
Tracing Tracing `yaml:"tracing"`
|
||||||
Asset Asset `ocisConfig:"asset"`
|
Asset Asset `yaml:"asset"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// New initializes a new configuration with or without defaults.
|
// New initializes a new configuration with or without defaults.
|
||||||
|
|||||||
@@ -8,17 +8,17 @@ import (
|
|||||||
|
|
||||||
// Config combines all available configuration parts.
|
// Config combines all available configuration parts.
|
||||||
type Config struct {
|
type Config struct {
|
||||||
*shared.Commons `ocisConfig:"-" yaml:"-"`
|
*shared.Commons `yaml:"-"`
|
||||||
|
|
||||||
Service Service `ocisConfig:"-" yaml:"-"`
|
Service Service `yaml:"-"`
|
||||||
|
|
||||||
Tracing *Tracing `ocisConfig:"tracing"`
|
Tracing *Tracing `yaml:"tracing"`
|
||||||
Log *Log `ocisConfig:"log"`
|
Log *Log `yaml:"log"`
|
||||||
Debug Debug `ocisConfig:"debug"`
|
Debug Debug `yaml:"debug"`
|
||||||
|
|
||||||
GRPC GRPC `ocisConfig:"grpc"`
|
GRPC GRPC `yaml:"grpc"`
|
||||||
|
|
||||||
Datapath string `ocisConfig:"data_path" env:"STORE_DATA_PATH"`
|
Datapath string `yaml:"data_path" env:"STORE_DATA_PATH"`
|
||||||
|
|
||||||
Context context.Context `ocisConfig:"-" yaml:"-"`
|
Context context.Context `yaml:"-"`
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,8 +2,8 @@ package config
|
|||||||
|
|
||||||
// Debug defines the available debug configuration.
|
// Debug defines the available debug configuration.
|
||||||
type Debug struct {
|
type Debug struct {
|
||||||
Addr string `ocisConfig:"addr" env:"STORE_DEBUG_ADDR"`
|
Addr string `yaml:"addr" env:"STORE_DEBUG_ADDR"`
|
||||||
Token string `ocisConfig:"token" env:"STORE_DEBUG_TOKEN"`
|
Token string `yaml:"token" env:"STORE_DEBUG_TOKEN"`
|
||||||
Pprof bool `ocisConfig:"pprof" env:"STORE_DEBUG_PPROF"`
|
Pprof bool `yaml:"pprof" env:"STORE_DEBUG_PPROF"`
|
||||||
Zpages bool `ocisConfig:"zpages" env:"STORE_DEBUG_ZPAGES"`
|
Zpages bool `yaml:"zpages" env:"STORE_DEBUG_ZPAGES"`
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,6 +2,6 @@ package config
|
|||||||
|
|
||||||
// GRPC defines the available grpc configuration.
|
// GRPC defines the available grpc configuration.
|
||||||
type GRPC struct {
|
type GRPC struct {
|
||||||
Addr string `ocisConfig:"addr" env:"STORE_GRPC_ADDR"`
|
Addr string `yaml:"addr" env:"STORE_GRPC_ADDR"`
|
||||||
Namespace string `ocisConfig:"-" yaml:"-"`
|
Namespace string `yaml:"-"`
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,5 +2,5 @@ package config
|
|||||||
|
|
||||||
// Service defines the available service configuration.
|
// Service defines the available service configuration.
|
||||||
type Service struct {
|
type Service struct {
|
||||||
Name string `ocisConfig:"-" yaml:"-"`
|
Name string `yaml:"-"`
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,8 +2,8 @@ package config
|
|||||||
|
|
||||||
// Tracing defines the available tracing configuration.
|
// Tracing defines the available tracing configuration.
|
||||||
type Tracing struct {
|
type Tracing struct {
|
||||||
Enabled bool `ocisConfig:"enabled" env:"OCIS_TRACING_ENABLED;STORE_TRACING_ENABLED"`
|
Enabled bool `yaml:"enabled" env:"OCIS_TRACING_ENABLED;STORE_TRACING_ENABLED"`
|
||||||
Type string `ocisConfig:"type" env:"OCIS_TRACING_TYPE;STORE_TRACING_TYPE"`
|
Type string `yaml:"type" env:"OCIS_TRACING_TYPE;STORE_TRACING_TYPE"`
|
||||||
Endpoint string `ocisConfig:"endpoint" env:"OCIS_TRACING_ENDPOINT;STORE_TRACING_ENDPOINT"`
|
Endpoint string `yaml:"endpoint" env:"OCIS_TRACING_ENDPOINT;STORE_TRACING_ENDPOINT"`
|
||||||
Collector string `ocisConfig:"collector" env:"OCIS_TRACING_COLLECTOR;STORE_TRACING_COLLECTOR"`
|
Collector string `yaml:"collector" env:"OCIS_TRACING_COLLECTOR;STORE_TRACING_COLLECTOR"`
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -8,40 +8,40 @@ import (
|
|||||||
|
|
||||||
// Config combines all available configuration parts.
|
// Config combines all available configuration parts.
|
||||||
type Config struct {
|
type Config struct {
|
||||||
*shared.Commons `ocisConfig:"-" yaml:"-"`
|
*shared.Commons `yaml:"-"`
|
||||||
|
|
||||||
Service Service `ocisConfig:"-" yaml:"-"`
|
Service Service `yaml:"-"`
|
||||||
|
|
||||||
Tracing *Tracing `ocisConfig:"tracing"`
|
Tracing *Tracing `yaml:"tracing"`
|
||||||
Log *Log `ocisConfig:"log"`
|
Log *Log `yaml:"log"`
|
||||||
Debug Debug `ocisConfig:"debug"`
|
Debug Debug `yaml:"debug"`
|
||||||
|
|
||||||
GRPC GRPC `ocisConfig:"grpc"`
|
GRPC GRPC `yaml:"grpc"`
|
||||||
HTTP HTTP `ocisConfig:"http"`
|
HTTP HTTP `yaml:"http"`
|
||||||
|
|
||||||
Thumbnail Thumbnail `ocisConfig:"thumbnail"`
|
Thumbnail Thumbnail `yaml:"thumbnail"`
|
||||||
|
|
||||||
Context context.Context `ocisConfig:"-" yaml:"-"`
|
Context context.Context `yaml:"-"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// FileSystemStorage defines the available filesystem storage configuration.
|
// FileSystemStorage defines the available filesystem storage configuration.
|
||||||
type FileSystemStorage struct {
|
type FileSystemStorage struct {
|
||||||
RootDirectory string `ocisConfig:"root_directory" env:"THUMBNAILS_FILESYSTEMSTORAGE_ROOT"`
|
RootDirectory string `yaml:"root_directory" env:"THUMBNAILS_FILESYSTEMSTORAGE_ROOT"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// FileSystemSource defines the available filesystem source configuration.
|
// FileSystemSource defines the available filesystem source configuration.
|
||||||
type FileSystemSource struct {
|
type FileSystemSource struct {
|
||||||
BasePath string `ocisConfig:"base_path"`
|
BasePath string `yaml:"base_path"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// Thumbnail defines the available thumbnail related configuration.
|
// Thumbnail defines the available thumbnail related configuration.
|
||||||
type Thumbnail struct {
|
type Thumbnail struct {
|
||||||
Resolutions []string `ocisConfig:"resolutions"`
|
Resolutions []string `yaml:"resolutions"`
|
||||||
FileSystemStorage FileSystemStorage `ocisConfig:"filesystem_storage"`
|
FileSystemStorage FileSystemStorage `yaml:"filesystem_storage"`
|
||||||
WebdavAllowInsecure bool `ocisConfig:"webdav_allow_insecure" env:"OCIS_INSECURE;THUMBNAILS_WEBDAVSOURCE_INSECURE"`
|
WebdavAllowInsecure bool `yaml:"webdav_allow_insecure" env:"OCIS_INSECURE;THUMBNAILS_WEBDAVSOURCE_INSECURE"`
|
||||||
CS3AllowInsecure bool `ocisConfig:"cs3_allow_insecure" env:"OCIS_INSECURE;THUMBNAILS_CS3SOURCE_INSECURE"`
|
CS3AllowInsecure bool `yaml:"cs3_allow_insecure" env:"OCIS_INSECURE;THUMBNAILS_CS3SOURCE_INSECURE"`
|
||||||
RevaGateway string `ocisConfig:"reva_gateway" env:"REVA_GATEWAY"` //TODO: use REVA config
|
RevaGateway string `yaml:"reva_gateway" env:"REVA_GATEWAY"` //TODO: use REVA config
|
||||||
FontMapFile string `ocisConfig:"font_map_file" env:"THUMBNAILS_TXT_FONTMAP_FILE"`
|
FontMapFile string `yaml:"font_map_file" env:"THUMBNAILS_TXT_FONTMAP_FILE"`
|
||||||
TransferTokenSecret string `ocisConfig:"transfer_token" env:"THUMBNAILS_TRANSFER_TOKEN"`
|
TransferTokenSecret string `yaml:"transfer_token" env:"THUMBNAILS_TRANSFER_TOKEN"`
|
||||||
DataEndpoint string `ocisConfig:"data_endpoint" env:"THUMBNAILS_DATA_ENDPOINT"`
|
DataEndpoint string `yaml:"data_endpoint" env:"THUMBNAILS_DATA_ENDPOINT"`
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,8 +2,8 @@ package config
|
|||||||
|
|
||||||
// Debug defines the available debug configuration.
|
// Debug defines the available debug configuration.
|
||||||
type Debug struct {
|
type Debug struct {
|
||||||
Addr string `ocisConfig:"addr" env:"THUMBNAILS_DEBUG_ADDR"`
|
Addr string `yaml:"addr" env:"THUMBNAILS_DEBUG_ADDR"`
|
||||||
Token string `ocisConfig:"token" env:"THUMBNAILS_DEBUG_TOKEN"`
|
Token string `yaml:"token" env:"THUMBNAILS_DEBUG_TOKEN"`
|
||||||
Pprof bool `ocisConfig:"pprof" env:"THUMBNAILS_DEBUG_PPROF"`
|
Pprof bool `yaml:"pprof" env:"THUMBNAILS_DEBUG_PPROF"`
|
||||||
Zpages bool `ocisConfig:"zpages" env:"THUMBNAILS_DEBUG_ZPAGES"`
|
Zpages bool `yaml:"zpages" env:"THUMBNAILS_DEBUG_ZPAGES"`
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,6 +2,6 @@ package config
|
|||||||
|
|
||||||
// GRPC defines the available grpc configuration.
|
// GRPC defines the available grpc configuration.
|
||||||
type GRPC struct {
|
type GRPC struct {
|
||||||
Addr string `ocisConfig:"addr" env:"THUMBNAILS_GRPC_ADDR"`
|
Addr string `yaml:"addr" env:"THUMBNAILS_GRPC_ADDR"`
|
||||||
Namespace string `ocisConfig:"-" yaml:"-"`
|
Namespace string `yaml:"-"`
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ package config
|
|||||||
|
|
||||||
// HTTP defines the available http configuration.
|
// HTTP defines the available http configuration.
|
||||||
type HTTP struct {
|
type HTTP struct {
|
||||||
Addr string `ocisConfig:"addr" env:"THUMBNAILS_HTTP_ADDR"`
|
Addr string `yaml:"addr" env:"THUMBNAILS_HTTP_ADDR"`
|
||||||
Root string `ocisConfig:"root" env:"THUMBNAILS_HTTP_ROOT"`
|
Root string `yaml:"root" env:"THUMBNAILS_HTTP_ROOT"`
|
||||||
Namespace string `ocisConfig:"-" yaml:"-"`
|
Namespace string `yaml:"-"`
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,5 +2,5 @@ package config
|
|||||||
|
|
||||||
// Service defines the available service configuration.
|
// Service defines the available service configuration.
|
||||||
type Service struct {
|
type Service struct {
|
||||||
Name string `ocisConfig:"-" yaml:"-"`
|
Name string `yaml:"-"`
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,8 +2,8 @@ package config
|
|||||||
|
|
||||||
// Tracing defines the available tracing configuration.
|
// Tracing defines the available tracing configuration.
|
||||||
type Tracing struct {
|
type Tracing struct {
|
||||||
Enabled bool `ocisConfig:"enabled" env:"OCIS_TRACING_ENABLED;THUMBNAILS_TRACING_ENABLED"`
|
Enabled bool `yaml:"enabled" env:"OCIS_TRACING_ENABLED;THUMBNAILS_TRACING_ENABLED"`
|
||||||
Type string `ocisConfig:"type" env:"OCIS_TRACING_TYPE;THUMBNAILS_TRACING_TYPE"`
|
Type string `yaml:"type" env:"OCIS_TRACING_TYPE;THUMBNAILS_TRACING_TYPE"`
|
||||||
Endpoint string `ocisConfig:"endpoint" env:"OCIS_TRACING_ENDPOINT;THUMBNAILS_TRACING_ENDPOINT"`
|
Endpoint string `yaml:"endpoint" env:"OCIS_TRACING_ENDPOINT;THUMBNAILS_TRACING_ENDPOINT"`
|
||||||
Collector string `ocisConfig:"collector" env:"OCIS_TRACING_COLLECTOR;THUMBNAILS_TRACING_COLLECTOR"`
|
Collector string `yaml:"collector" env:"OCIS_TRACING_COLLECTOR;THUMBNAILS_TRACING_COLLECTOR"`
|
||||||
}
|
}
|
||||||
|
|||||||
+31
-31
@@ -8,46 +8,46 @@ import (
|
|||||||
|
|
||||||
// Config combines all available configuration parts.
|
// Config combines all available configuration parts.
|
||||||
type Config struct {
|
type Config struct {
|
||||||
*shared.Commons `ocisConfig:"-" yaml:"-"`
|
*shared.Commons `yaml:"-"`
|
||||||
|
|
||||||
Service Service `ocisConfig:"-" yaml:"-"`
|
Service Service `yaml:"-"`
|
||||||
|
|
||||||
Tracing *Tracing `ocisConfig:"tracing"`
|
Tracing *Tracing `yaml:"tracing"`
|
||||||
Log *Log `ocisConfig:"log"`
|
Log *Log `yaml:"log"`
|
||||||
Debug Debug `ocisConfig:"debug"`
|
Debug Debug `yaml:"debug"`
|
||||||
|
|
||||||
HTTP HTTP `ocisConfig:"http"`
|
HTTP HTTP `yaml:"http"`
|
||||||
|
|
||||||
Asset Asset `ocisConfig:"asset"`
|
Asset Asset `yaml:"asset"`
|
||||||
File string `ocisConfig:"file" env:"WEB_UI_CONFIG"` // TODO: rename this to a more self explaining string
|
File string `yaml:"file" env:"WEB_UI_CONFIG"` // TODO: rename this to a more self explaining string
|
||||||
Web Web `ocisConfig:"web"`
|
Web Web `yaml:"web"`
|
||||||
|
|
||||||
Context context.Context `ocisConfig:"-" yaml:"-"`
|
Context context.Context `yaml:"-"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// Asset defines the available asset configuration.
|
// Asset defines the available asset configuration.
|
||||||
type Asset struct {
|
type Asset struct {
|
||||||
Path string `ocisConfig:"path" env:"WEB_ASSET_PATH"`
|
Path string `yaml:"path" env:"WEB_ASSET_PATH"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// WebConfig defines the available web configuration for a dynamically rendered config.json.
|
// WebConfig defines the available web configuration for a dynamically rendered config.json.
|
||||||
type WebConfig struct {
|
type WebConfig struct {
|
||||||
Server string `json:"server,omitempty" ocisConfig:"server" env:"OCIS_URL;WEB_UI_CONFIG_SERVER"`
|
Server string `json:"server,omitempty" yaml:"server" env:"OCIS_URL;WEB_UI_CONFIG_SERVER"`
|
||||||
Theme string `json:"theme,omitempty" ocisConfig:"theme" env:""`
|
Theme string `json:"theme,omitempty" yaml:"theme" env:""`
|
||||||
Version string `json:"version,omitempty" ocisConfig:"version" env:"WEB_UI_CONFIG_VERSION"`
|
Version string `json:"version,omitempty" yaml:"version" env:"WEB_UI_CONFIG_VERSION"`
|
||||||
OpenIDConnect OIDC `json:"openIdConnect,omitempty" ocisConfig:"oids"`
|
OpenIDConnect OIDC `json:"openIdConnect,omitempty" yaml:"oids"`
|
||||||
Apps []string `json:"apps" ocisConfig:"apps"`
|
Apps []string `json:"apps" yaml:"apps"`
|
||||||
ExternalApps []ExternalApp `json:"external_apps,omitempty" ocisConfig:"external_apps"`
|
ExternalApps []ExternalApp `json:"external_apps,omitempty" yaml:"external_apps"`
|
||||||
Options map[string]interface{} `json:"options,omitempty" ocisConfig:"options"`
|
Options map[string]interface{} `json:"options,omitempty" yaml:"options"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// OIDC defines the available oidc configuration
|
// OIDC defines the available oidc configuration
|
||||||
type OIDC struct {
|
type OIDC struct {
|
||||||
MetadataURL string `json:"metadata_url,omitempty" ocisConfig:"metadata_url" env:"WEB_OIDC_METADATA_URL"`
|
MetadataURL string `json:"metadata_url,omitempty" yaml:"metadata_url" env:"WEB_OIDC_METADATA_URL"`
|
||||||
Authority string `json:"authority,omitempty" ocisConfig:"authority" env:"OCIS_URL;WEB_OIDC_AUTHORITY"`
|
Authority string `json:"authority,omitempty" yaml:"authority" env:"OCIS_URL;WEB_OIDC_AUTHORITY"`
|
||||||
ClientID string `json:"client_id,omitempty" ocisConfig:"client_id" env:"WEB_OIDC_CLIENT_ID"`
|
ClientID string `json:"client_id,omitempty" yaml:"client_id" env:"WEB_OIDC_CLIENT_ID"`
|
||||||
ResponseType string `json:"response_type,omitempty" ocisConfig:"response_type" env:"WEB_OIDC_RESPONSE_TYPE"`
|
ResponseType string `json:"response_type,omitempty" yaml:"response_type" env:"WEB_OIDC_RESPONSE_TYPE"`
|
||||||
Scope string `json:"scope,omitempty" ocisConfig:"scope" env:"WEB_OIDC_SCOPE"`
|
Scope string `json:"scope,omitempty" yaml:"scope" env:"WEB_OIDC_SCOPE"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// ExternalApp defines an external web app.
|
// ExternalApp defines an external web app.
|
||||||
@@ -59,21 +59,21 @@ type OIDC struct {
|
|||||||
// }
|
// }
|
||||||
// }
|
// }
|
||||||
type ExternalApp struct {
|
type ExternalApp struct {
|
||||||
ID string `json:"id,omitempty" ocisConfig:"id"`
|
ID string `json:"id,omitempty" yaml:"id"`
|
||||||
Path string `json:"path,omitempty" ocisConfig:"path"`
|
Path string `json:"path,omitempty" yaml:"path"`
|
||||||
// Config is completely dynamic, because it depends on the extension
|
// Config is completely dynamic, because it depends on the extension
|
||||||
Config map[string]interface{} `json:"config,omitempty" ocisConfig:"config"`
|
Config map[string]interface{} `json:"config,omitempty" yaml:"config"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// ExternalAppConfig defines an external web app configuration.
|
// ExternalAppConfig defines an external web app configuration.
|
||||||
type ExternalAppConfig struct {
|
type ExternalAppConfig struct {
|
||||||
URL string `json:"url,omitempty" ocisConfig:"url" env:""`
|
URL string `json:"url,omitempty" yaml:"url" env:""`
|
||||||
}
|
}
|
||||||
|
|
||||||
// Web defines the available web configuration.
|
// Web defines the available web configuration.
|
||||||
type Web struct {
|
type Web struct {
|
||||||
Path string `ocisConfig:"path" env:"WEB_UI_PATH"`
|
Path string `yaml:"path" env:"WEB_UI_PATH"`
|
||||||
ThemeServer string `ocisConfig:"theme_server" env:"OCIS_URL;WEB_UI_THEME_SERVER"` // used to build Theme in WebConfig
|
ThemeServer string `yaml:"theme_server" env:"OCIS_URL;WEB_UI_THEME_SERVER"` // used to build Theme in WebConfig
|
||||||
ThemePath string `ocisConfig:"theme_path" env:"WEB_UI_THEME_PATH"` // used to build Theme in WebConfig
|
ThemePath string `yaml:"theme_path" env:"WEB_UI_THEME_PATH"` // used to build Theme in WebConfig
|
||||||
Config WebConfig `ocisConfig:"config"`
|
Config WebConfig `yaml:"config"`
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,8 +2,8 @@ package config
|
|||||||
|
|
||||||
// Debug defines the available debug configuration.
|
// Debug defines the available debug configuration.
|
||||||
type Debug struct {
|
type Debug struct {
|
||||||
Addr string `ocisConfig:"addr" env:"WEB_DEBUG_ADDR"`
|
Addr string `yaml:"addr" env:"WEB_DEBUG_ADDR"`
|
||||||
Token string `ocisConfig:"token" env:"WEB_DEBUG_TOKEN"`
|
Token string `yaml:"token" env:"WEB_DEBUG_TOKEN"`
|
||||||
Pprof bool `ocisConfig:"pprof" env:"WEB_DEBUG_PPROF"`
|
Pprof bool `yaml:"pprof" env:"WEB_DEBUG_PPROF"`
|
||||||
Zpages bool `ocisConfig:"zpages" env:"WEB_DEBUG_ZPAGES"`
|
Zpages bool `yaml:"zpages" env:"WEB_DEBUG_ZPAGES"`
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,8 +2,8 @@ package config
|
|||||||
|
|
||||||
// HTTP defines the available http configuration.
|
// HTTP defines the available http configuration.
|
||||||
type HTTP struct {
|
type HTTP struct {
|
||||||
Addr string `ocisConfig:"addr" env:"WEB_HTTP_ADDR"`
|
Addr string `yaml:"addr" env:"WEB_HTTP_ADDR"`
|
||||||
Namespace string `ocisConfig:"-" yaml:"-"`
|
Namespace string `yaml:"-"`
|
||||||
Root string `ocisConfig:"root" env:"WEB_HTTP_ROOT"`
|
Root string `yaml:"root" env:"WEB_HTTP_ROOT"`
|
||||||
CacheTTL int `ocisConfig:"cache_ttl" env:"WEB_CACHE_TTL"`
|
CacheTTL int `yaml:"cache_ttl" env:"WEB_CACHE_TTL"`
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,5 +2,5 @@ package config
|
|||||||
|
|
||||||
// Service defines the available service configuration.
|
// Service defines the available service configuration.
|
||||||
type Service struct {
|
type Service struct {
|
||||||
Name string `ocisConfig:"-" yaml:"-"`
|
Name string `yaml:"-"`
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,8 +2,8 @@ package config
|
|||||||
|
|
||||||
// Tracing defines the available tracing configuration.
|
// Tracing defines the available tracing configuration.
|
||||||
type Tracing struct {
|
type Tracing struct {
|
||||||
Enabled bool `ocisConfig:"enabled" env:"OCIS_TRACING_ENABLED;WEB_TRACING_ENABLED"`
|
Enabled bool `yaml:"enabled" env:"OCIS_TRACING_ENABLED;WEB_TRACING_ENABLED"`
|
||||||
Type string `ocisConfig:"type" env:"OCIS_TRACING_TYPE;WEB_TRACING_TYPE"`
|
Type string `yaml:"type" env:"OCIS_TRACING_TYPE;WEB_TRACING_TYPE"`
|
||||||
Endpoint string `ocisConfig:"endpoint" env:"OCIS_TRACING_ENDPOINT;WEB_TRACING_ENDPOINT"`
|
Endpoint string `yaml:"endpoint" env:"OCIS_TRACING_ENDPOINT;WEB_TRACING_ENDPOINT"`
|
||||||
Collector string `ocisConfig:"collector" env:"OCIS_TRACING_COLLECTOR;WEB_TRACING_COLLECTOR"`
|
Collector string `yaml:"collector" env:"OCIS_TRACING_COLLECTOR;WEB_TRACING_COLLECTOR"`
|
||||||
}
|
}
|
||||||
|
|||||||
+10
-10
@@ -8,19 +8,19 @@ import (
|
|||||||
|
|
||||||
// Config combines all available configuration parts.
|
// Config combines all available configuration parts.
|
||||||
type Config struct {
|
type Config struct {
|
||||||
*shared.Commons `ocisConfig:"-" yaml:"-"`
|
*shared.Commons `yaml:"-"`
|
||||||
|
|
||||||
Service Service `ocisConfig:"-" yaml:"-"`
|
Service Service `yaml:"-"`
|
||||||
|
|
||||||
Tracing *Tracing `ocisConfig:"tracing"`
|
Tracing *Tracing `yaml:"tracing"`
|
||||||
Log *Log `ocisConfig:"log"`
|
Log *Log `yaml:"log"`
|
||||||
Debug Debug `ocisConfig:"debug"`
|
Debug Debug `yaml:"debug"`
|
||||||
|
|
||||||
HTTP HTTP `ocisConfig:"http"`
|
HTTP HTTP `yaml:"http"`
|
||||||
|
|
||||||
OcisPublicURL string `ocisConfig:"ocis_public_url" env:"OCIS_URL;OCIS_PUBLIC_URL"`
|
OcisPublicURL string `yaml:"ocis_public_url" env:"OCIS_URL;OCIS_PUBLIC_URL"`
|
||||||
WebdavNamespace string `ocisConfig:"webdav_namespace" env:"STORAGE_WEBDAV_NAMESPACE"` //TODO: prevent this cross config
|
WebdavNamespace string `yaml:"webdav_namespace" env:"STORAGE_WEBDAV_NAMESPACE"` //TODO: prevent this cross config
|
||||||
RevaGateway string `ocisConfig:"reva_gateway" env:"REVA_GATEWAY"`
|
RevaGateway string `yaml:"reva_gateway" env:"REVA_GATEWAY"`
|
||||||
|
|
||||||
Context context.Context `ocisConfig:"-" yaml:"-"`
|
Context context.Context `yaml:"-"`
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,8 +2,8 @@ package config
|
|||||||
|
|
||||||
// Debug defines the available debug configuration.
|
// Debug defines the available debug configuration.
|
||||||
type Debug struct {
|
type Debug struct {
|
||||||
Addr string `ocisConfig:"addr" env:"WEBDAV_DEBUG_ADDR"`
|
Addr string `yaml:"addr" env:"WEBDAV_DEBUG_ADDR"`
|
||||||
Token string `ocisConfig:"token" env:"WEBDAV_DEBUG_TOKEN"`
|
Token string `yaml:"token" env:"WEBDAV_DEBUG_TOKEN"`
|
||||||
Pprof bool `ocisConfig:"pprof" env:"WEBDAV_DEBUG_PPROF"`
|
Pprof bool `yaml:"pprof" env:"WEBDAV_DEBUG_PPROF"`
|
||||||
Zpages bool `ocisConfig:"zpages" env:"WEBDAV_DEBUG_ZPAGES"`
|
Zpages bool `yaml:"zpages" env:"WEBDAV_DEBUG_ZPAGES"`
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,16 +2,16 @@ package config
|
|||||||
|
|
||||||
// CORS defines the available cors configuration.
|
// CORS defines the available cors configuration.
|
||||||
type CORS struct {
|
type CORS struct {
|
||||||
AllowedOrigins []string `ocisConfig:"allowed_origins"`
|
AllowedOrigins []string `yaml:"allowed_origins"`
|
||||||
AllowedMethods []string `ocisConfig:"allowed_methods"`
|
AllowedMethods []string `yaml:"allowed_methods"`
|
||||||
AllowedHeaders []string `ocisConfig:"allowed_headers"`
|
AllowedHeaders []string `yaml:"allowed_headers"`
|
||||||
AllowCredentials bool `ocisConfig:"allow_credentials"`
|
AllowCredentials bool `yaml:"allow_credentials"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// HTTP defines the available http configuration.
|
// HTTP defines the available http configuration.
|
||||||
type HTTP struct {
|
type HTTP struct {
|
||||||
Addr string `ocisConfig:"addr" env:"WEBDAV_HTTP_ADDR"`
|
Addr string `yaml:"addr" env:"WEBDAV_HTTP_ADDR"`
|
||||||
Namespace string `ocisConfig:"-" yaml:"-"`
|
Namespace string `yaml:"-"`
|
||||||
Root string `ocisConfig:"root" env:"WEBDAV_HTTP_ROOT"`
|
Root string `yaml:"root" env:"WEBDAV_HTTP_ROOT"`
|
||||||
CORS CORS `ocisConfig:"cors"`
|
CORS CORS `yaml:"cors"`
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,5 +2,5 @@ package config
|
|||||||
|
|
||||||
// Service defines the available service configuration.
|
// Service defines the available service configuration.
|
||||||
type Service struct {
|
type Service struct {
|
||||||
Name string `ocisConfig:"-" yaml:"-"`
|
Name string `yaml:"-"`
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,8 +2,8 @@ package config
|
|||||||
|
|
||||||
// Tracing defines the available tracing configuration.
|
// Tracing defines the available tracing configuration.
|
||||||
type Tracing struct {
|
type Tracing struct {
|
||||||
Enabled bool `ocisConfig:"enabled" env:"OCIS_TRACING_ENABLED;WEBDAV_TRACING_ENABLED"`
|
Enabled bool `yaml:"enabled" env:"OCIS_TRACING_ENABLED;WEBDAV_TRACING_ENABLED"`
|
||||||
Type string `ocisConfig:"type" env:"OCIS_TRACING_TYPE;WEBDAV_TRACING_TYPE"`
|
Type string `yaml:"type" env:"OCIS_TRACING_TYPE;WEBDAV_TRACING_TYPE"`
|
||||||
Endpoint string `ocisConfig:"endpoint" env:"OCIS_TRACING_ENDPOINT;WEBDAV_TRACING_ENDPOINT"`
|
Endpoint string `yaml:"endpoint" env:"OCIS_TRACING_ENDPOINT;WEBDAV_TRACING_ENDPOINT"`
|
||||||
Collector string `ocisConfig:"collector" env:"OCIS_TRACING_COLLECTOR;WEBDAV_TRACING_COLLECTOR"`
|
Collector string `yaml:"collector" env:"OCIS_TRACING_COLLECTOR;WEBDAV_TRACING_COLLECTOR"`
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user