remove all "omitempty" from config structs to bring back full configuration file documentation

This commit is contained in:
Willy Kloucek
2022-04-28 15:08:40 +02:00
parent aba2ee0c39
commit ab254b05d0
31 changed files with 802 additions and 802 deletions

View File

@@ -12,21 +12,21 @@ type Config struct {
Service Service `yaml:"-"`
Tracing *Tracing `yaml:"tracing,omitempty"`
Log *Log `yaml:"log,omitempty"`
Debug Debug `yaml:"debug,omitempty"`
Tracing *Tracing `yaml:"tracing"`
Log *Log `yaml:"log"`
Debug Debug `yaml:"debug"`
HTTP HTTP `yaml:"http,omitempty"`
GRPC GRPC `yaml:"grpc,omitempty"`
HTTP HTTP `yaml:"http"`
GRPC GRPC `yaml:"grpc"`
TokenManager *TokenManager `yaml:"token_manager,omitempty"`
TokenManager *TokenManager `yaml:"token_manager"`
Asset Asset `yaml:"asset,omitempty"`
Repo Repo `yaml:"repo,omitempty"`
Index Index `yaml:"index,omitempty"`
ServiceUser ServiceUser `yaml:"service_user,omitempty"`
HashDifficulty int `yaml:"hash_difficulty,omitempty" env:"ACCOUNTS_HASH_DIFFICULTY" desc:"The hash difficulty makes sure that validating a password takes at least a certain amount of time."`
DemoUsersAndGroups bool `yaml:"demo_users_and_groups,omitempty" env:"ACCOUNTS_DEMO_USERS_AND_GROUPS" desc:"If this flag is set the service will setup the demo users and groups."`
Asset Asset `yaml:"asset"`
Repo Repo `yaml:"repo"`
Index Index `yaml:"index"`
ServiceUser ServiceUser `yaml:"service_user"`
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 `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 `yaml:"-"`
}

View File

@@ -5,20 +5,20 @@ import "github.com/owncloud/ocis/ocis-pkg/shared"
type Config struct {
*shared.Commons `yaml:"-"`
Service Service `yaml:"-"`
Tracing *Tracing `yaml:"tracing,omitempty"`
Logging *Logging `yaml:"log,omitempty"`
Debug Debug `yaml:"debug,omitempty"`
Supervised bool `yaml:"supervised,omitempty"`
Tracing *Tracing `yaml:"tracing"`
Logging *Logging `yaml:"log"`
Debug Debug `yaml:"debug"`
Supervised bool `yaml:"supervised"`
GRPC GRPCConfig `yaml:"grpc,omitempty"`
GRPC GRPCConfig `yaml:"grpc"`
TokenManager *TokenManager `yaml:"token_manager,omitempty"`
Reva *Reva `yaml:"reva,omitempty"`
TokenManager *TokenManager `yaml:"token_manager"`
Reva *Reva `yaml:"reva"`
SkipUserGroupsInToken bool `yaml:"skip_user_groups_in_token,omitempty"`
ExternalAddr string `yaml:"external_addr,omitempty"`
Driver string `yaml:"driver,omitempty"`
Drivers Drivers `yaml:"drivers,omitempty"`
SkipUserGroupsInToken bool `yaml:"skip_user_groups_in_token"`
ExternalAddr string `yaml:"external_addr"`
Driver string `yaml:"driver"`
Drivers Drivers `yaml:"drivers"`
}
type Tracing struct {

View File

@@ -12,11 +12,11 @@ type Config struct {
Service Service `yaml:"-"`
Log *Log `yaml:"log,omitempty"`
Debug Debug `yaml:"debug,omitempty"`
Log *Log `yaml:"log"`
Debug Debug `yaml:"debug"`
Events Events `yaml:"events,omitempty"`
Auditlog Auditlog `yaml:"auditlog,omitempty"`
Events Events `yaml:"events"`
Auditlog Auditlog `yaml:"auditlog"`
Context context.Context `yaml:"-"`
}

View File

@@ -5,19 +5,19 @@ import "github.com/owncloud/ocis/ocis-pkg/shared"
type Config struct {
*shared.Commons `yaml:"-"`
Service Service `yaml:"-"`
Tracing *Tracing `yaml:"tracing,omitempty"`
Logging *Logging `yaml:"log,omitempty"`
Debug Debug `yaml:"debug,omitempty"`
Supervised bool `yaml:"supervised,omitempty"`
Tracing *Tracing `yaml:"tracing"`
Logging *Logging `yaml:"log"`
Debug Debug `yaml:"debug"`
Supervised bool `yaml:"supervised"`
GRPC GRPCConfig `yaml:"grpc,omitempty"`
GRPC GRPCConfig `yaml:"grpc"`
TokenManager *TokenManager `yaml:"token_manager,omitempty"`
Reva *Reva `yaml:"reva,omitempty"`
TokenManager *TokenManager `yaml:"token_manager"`
Reva *Reva `yaml:"reva"`
SkipUserGroupsInToken bool `yaml:"skip_user_groups_in_token,omitempty"`
AuthProvider string `yaml:"auth_provider,omitempty" env:"AUTH_BASIC_AUTH_PROVIDER" desc:"The auth provider which should be used by the service"`
AuthProviders AuthProviders `yaml:"auth_providers,omitempty"`
SkipUserGroupsInToken bool `yaml:"skip_user_groups_in_token"`
AuthProvider string `yaml:"auth_provider" env:"AUTH_BASIC_AUTH_PROVIDER" desc:"The auth provider which should be used by the service"`
AuthProviders AuthProviders `yaml:"auth_providers"`
}
type Tracing struct {
Enabled bool `yaml:"enabled" env:"OCIS_TRACING_ENABLED;AUTH_BASIC_TRACING_ENABLED" desc:"Activates tracing."`
@@ -50,9 +50,9 @@ type GRPCConfig struct {
}
type AuthProviders struct {
JSON JSONProvider `yaml:"json,omitempty"`
LDAP LDAPProvider `yaml:"ldap,omitempty"`
OwnCloudSQL OwnCloudSQLProvider `yaml:"owncloud_sql,omitempty"`
JSON JSONProvider `yaml:"json"`
LDAP LDAPProvider `yaml:"ldap"`
OwnCloudSQL OwnCloudSQLProvider `yaml:"owncloud_sql"`
}
type JSONProvider struct {
@@ -60,24 +60,24 @@ type JSONProvider struct {
}
type LDAPProvider struct {
URI string `yaml:",omitempty" env:"LDAP_URI;AUTH_BASIC_LDAP_URI"`
CACert string `yaml:",omitempty" env:"LDAP_CACERT;AUTH_BASIC_LDAP_CACERT"`
Insecure bool `yaml:",omitempty" env:"LDAP_INSECURE;AUTH_BASIC_LDAP_INSECURE"`
BindDN string `yaml:",omitempty" env:"LDAP_BIND_DN;AUTH_BASIC_LDAP_BIND_DN"`
BindPassword string `yaml:",omitempty" env:"LDAP_BIND_PASSWORD;AUTH_BASIC_LDAP_BIND_PASSWORD"`
UserBaseDN string `yaml:",omitempty" env:"LDAP_USER_BASE_DN;AUTH_BASIC_LDAP_USER_BASE_DN"`
GroupBaseDN string `yaml:",omitempty" env:"LDAP_GROUP_BASE_DN;AUTH_BASIC_LDAP_GROUP_BASE_DN"`
UserScope string `yaml:",omitempty" env:"LDAP_USER_SCOPE;AUTH_BASIC_LDAP_USER_SCOPE"`
GroupScope string `yaml:",omitempty" env:"LDAP_GROUP_SCOPE;AUTH_BASIC_LDAP_GROUP_SCOPE"`
UserFilter string `yaml:",omitempty" env:"LDAP_USERFILTER;AUTH_BASIC_LDAP_USERFILTER"`
GroupFilter string `yaml:",omitempty" env:"LDAP_GROUPFILTER;AUTH_BASIC_LDAP_USERFILTER"`
UserObjectClass string `yaml:",omitempty" env:"LDAP_USER_OBJECTCLASS;AUTH_BASIC_LDAP_USER_OBJECTCLASS"`
GroupObjectClass string `yaml:",omitempty" env:"LDAP_GROUP_OBJECTCLASS;AUTH_BASIC_LDAP_GROUP_OBJECTCLASS"`
LoginAttributes []string `yaml:",omitempty" env:"LDAP_LOGIN_ATTRIBUTES;AUTH_BASIC_LDAP_LOGIN_ATTRIBUTES"`
IDP string `yaml:",omitempty" env:"OCIS_URL;AUTH_BASIC_IDP_URL"` // TODO what is this for?
GatewayEndpoint string `yaml:",omitempty"` // TODO do we need this here?
UserSchema LDAPUserSchema `yaml:",omitempty"`
GroupSchema LDAPGroupSchema `yaml:",omitempty"`
URI string `yaml:"" env:"LDAP_URI;AUTH_BASIC_LDAP_URI"`
CACert string `yaml:"" env:"LDAP_CACERT;AUTH_BASIC_LDAP_CACERT"`
Insecure bool `yaml:"" env:"LDAP_INSECURE;AUTH_BASIC_LDAP_INSECURE"`
BindDN string `yaml:"" env:"LDAP_BIND_DN;AUTH_BASIC_LDAP_BIND_DN"`
BindPassword string `yaml:"" env:"LDAP_BIND_PASSWORD;AUTH_BASIC_LDAP_BIND_PASSWORD"`
UserBaseDN string `yaml:"" env:"LDAP_USER_BASE_DN;AUTH_BASIC_LDAP_USER_BASE_DN"`
GroupBaseDN string `yaml:"" env:"LDAP_GROUP_BASE_DN;AUTH_BASIC_LDAP_GROUP_BASE_DN"`
UserScope string `yaml:"" env:"LDAP_USER_SCOPE;AUTH_BASIC_LDAP_USER_SCOPE"`
GroupScope string `yaml:"" env:"LDAP_GROUP_SCOPE;AUTH_BASIC_LDAP_GROUP_SCOPE"`
UserFilter string `yaml:"" env:"LDAP_USERFILTER;AUTH_BASIC_LDAP_USERFILTER"`
GroupFilter string `yaml:"" env:"LDAP_GROUPFILTER;AUTH_BASIC_LDAP_USERFILTER"`
UserObjectClass string `yaml:"" env:"LDAP_USER_OBJECTCLASS;AUTH_BASIC_LDAP_USER_OBJECTCLASS"`
GroupObjectClass string `yaml:"" env:"LDAP_GROUP_OBJECTCLASS;AUTH_BASIC_LDAP_GROUP_OBJECTCLASS"`
LoginAttributes []string `yaml:"" env:"LDAP_LOGIN_ATTRIBUTES;AUTH_BASIC_LDAP_LOGIN_ATTRIBUTES"`
IDP string `yaml:"" env:"OCIS_URL;AUTH_BASIC_IDP_URL"` // TODO what is this for?
GatewayEndpoint string `yaml:""` // TODO do we need this here?
UserSchema LDAPUserSchema `yaml:""`
GroupSchema LDAPGroupSchema `yaml:""`
}
type LDAPUserSchema struct {

View File

@@ -5,19 +5,19 @@ import "github.com/owncloud/ocis/ocis-pkg/shared"
type Config struct {
*shared.Commons `yaml:"-"`
Service Service `yaml:"-"`
Tracing *Tracing `yaml:"tracing,omitempty"`
Logging *Logging `yaml:"log,omitempty"`
Debug Debug `yaml:"debug,omitempty"`
Supervised bool `yaml:"supervised,omitempty"`
Tracing *Tracing `yaml:"tracing"`
Logging *Logging `yaml:"log"`
Debug Debug `yaml:"debug"`
Supervised bool `yaml:"supervised"`
GRPC GRPCConfig `yaml:"grpc,omitempty"`
GRPC GRPCConfig `yaml:"grpc"`
TokenManager *TokenManager `yaml:"token_manager,omitempty"`
Reva *Reva `yaml:"reva,omitempty"`
TokenManager *TokenManager `yaml:"token_manager"`
Reva *Reva `yaml:"reva"`
SkipUserGroupsInToken bool `yaml:"skip_user_groups_in_token,omitempty"`
AuthProvider string `yaml:"auth_provider,omitempty" env:"AUTH_BEARER_AUTH_PROVIDER" desc:"The auth provider which should be used by the service"`
AuthProviders AuthProviders `yaml:"auth_providers,omitempty"`
SkipUserGroupsInToken bool `yaml:"skip_user_groups_in_token"`
AuthProvider string `yaml:"auth_provider" env:"AUTH_BEARER_AUTH_PROVIDER" desc:"The auth provider which should be used by the service"`
AuthProviders AuthProviders `yaml:"auth_providers"`
}
type Tracing struct {
Enabled bool `yaml:"enabled" env:"OCIS_TRACING_ENABLED;AUTH_BEARER_TRACING_ENABLED" desc:"Activates tracing."`
@@ -38,25 +38,25 @@ type Service struct {
}
type Debug struct {
Addr string `yaml:"addr,omitempty" env:"AUTH_BEARER_DEBUG_ADDR"`
Token string `yaml:"token,omitempty" env:"AUTH_BEARER_DEBUG_TOKEN"`
Pprof bool `yaml:"pprof,omitempty" env:"AUTH_BEARER_DEBUG_PPROF"`
Zpages bool `yaml:"zpages,omitempty" env:"AUTH_BEARER_DEBUG_ZPAGES"`
Addr string `yaml:"addr" env:"AUTH_BEARER_DEBUG_ADDR"`
Token string `yaml:"token" env:"AUTH_BEARER_DEBUG_TOKEN"`
Pprof bool `yaml:"pprof" env:"AUTH_BEARER_DEBUG_PPROF"`
Zpages bool `yaml:"zpages" env:"AUTH_BEARER_DEBUG_ZPAGES"`
}
type GRPCConfig struct {
Addr string `yaml:"addr,omitempty" env:"AUTH_BEARER_GRPC_ADDR" desc:"The address of the grpc service."`
Protocol string `yaml:"protocol,omitempty" env:"AUTH_BEARER_GRPC_PROTOCOL" desc:"The transport protocol of the grpc service."`
Addr string `yaml:"addr" env:"AUTH_BEARER_GRPC_ADDR" desc:"The address of the grpc service."`
Protocol string `yaml:"protocol" env:"AUTH_BEARER_GRPC_PROTOCOL" desc:"The transport protocol of the grpc service."`
}
type AuthProviders struct {
OIDC OIDCProvider `yaml:"oidc,omitempty"`
OIDC OIDCProvider `yaml:"oidc"`
}
type OIDCProvider struct {
Issuer string `yaml:"issuer,omitempty" env:"OCIS_URL;AUTH_BEARER_OIDC_ISSUER"`
Insecure bool `yaml:"insecure,omitempty" env:"OCIS_INSECURE;AUTH_BEARER_OIDC_INSECURE"`
IDClaim string `yaml:"id_claim,omitempty"`
UIDClaim string `yaml:"uid_claim,omitempty"`
GIDClaim string `yaml:"gid_claim,omitempty"`
Issuer string `yaml:"issuer" env:"OCIS_URL;AUTH_BEARER_OIDC_ISSUER"`
Insecure bool `yaml:"insecure" env:"OCIS_INSECURE;AUTH_BEARER_OIDC_INSECURE"`
IDClaim string `yaml:"id_claim"`
UIDClaim string `yaml:"uid_claim"`
GIDClaim string `yaml:"gid_claim"`
}

View File

@@ -5,19 +5,19 @@ import "github.com/owncloud/ocis/ocis-pkg/shared"
type Config struct {
*shared.Commons `yaml:"-"`
Service Service `yaml:"-"`
Tracing *Tracing `yaml:"tracing,omitempty"`
Logging *Logging `yaml:"log,omitempty"`
Debug Debug `yaml:"debug,omitempty"`
Supervised bool `yaml:"supervised,omitempty"`
Tracing *Tracing `yaml:"tracing"`
Logging *Logging `yaml:"log"`
Debug Debug `yaml:"debug"`
Supervised bool `yaml:"supervised"`
GRPC GRPCConfig `yaml:"grpc,omitempty"`
GRPC GRPCConfig `yaml:"grpc"`
TokenManager *TokenManager `yaml:"token_manager,omitempty"`
Reva *Reva `yaml:"reva,omitempty"`
TokenManager *TokenManager `yaml:"token_manager"`
Reva *Reva `yaml:"reva"`
SkipUserGroupsInToken bool `yaml:"skip_user_groups_in_token,omitempty"`
AuthProvider string `yaml:"auth_provider,omitempty" env:"AUTH_MACHINE_AUTH_PROVIDER" desc:"The auth provider which should be used by the service"`
AuthProviders AuthProviders `yaml:"auth_providers,omitempty"`
SkipUserGroupsInToken bool `yaml:"skip_user_groups_in_token"`
AuthProvider string `yaml:"auth_provider" env:"AUTH_MACHINE_AUTH_PROVIDER" desc:"The auth provider which should be used by the service"`
AuthProviders AuthProviders `yaml:"auth_providers"`
}
type Tracing struct {
Enabled bool `yaml:"enabled" env:"OCIS_TRACING_ENABLED;AUTH_MACHINE_TRACING_ENABLED" desc:"Activates tracing."`

View File

@@ -5,51 +5,51 @@ import "github.com/owncloud/ocis/ocis-pkg/shared"
type Config struct {
*shared.Commons `yaml:"-"`
Service Service `yaml:"-"`
Tracing *Tracing `yaml:"tracing,omitempty"`
Logging *Logging `yaml:"log,omitempty"`
Debug Debug `yaml:"debug,omitempty"`
Tracing *Tracing `yaml:"tracing"`
Logging *Logging `yaml:"log"`
Debug Debug `yaml:"debug"`
Supervised bool `yaml:"-"`
HTTP HTTPConfig `yaml:"http,omitempty"`
HTTP HTTPConfig `yaml:"http"`
// JWTSecret used to verify reva access token
TransferSecret string `yaml:"transfer_secret,omitempty" env:"STORAGE_TRANSFER_SECRET"`
TransferSecret string `yaml:"transfer_secret" env:"STORAGE_TRANSFER_SECRET"`
TokenManager *TokenManager `yaml:"token_manager,omitempty"`
Reva *Reva `yaml:"reva,omitempty"`
TokenManager *TokenManager `yaml:"token_manager"`
Reva *Reva `yaml:"reva"`
SkipUserGroupsInToken bool `yaml:"skip_users_groups_in_token,omitempty"`
SkipUserGroupsInToken bool `yaml:"skip_users_groups_in_token"`
EnableFavorites bool `yaml:"favorites,omitempty"`
EnableProjectSpaces bool `yaml:"enable_project_spaces,omitempty"`
UploadMaxChunkSize int `yaml:"upload_max_chunk_size,omitempty"`
UploadHTTPMethodOverride string `yaml:"upload_http_method_override,omitempty"`
DefaultUploadProtocol string `yaml:"default_upload_protocol,omitempty"`
EnableFavorites bool `yaml:"favorites"`
EnableProjectSpaces bool `yaml:"enable_project_spaces"`
UploadMaxChunkSize int `yaml:"upload_max_chunk_size"`
UploadHTTPMethodOverride string `yaml:"upload_http_method_override"`
DefaultUploadProtocol string `yaml:"default_upload_protocol"`
PublicURL string `yaml:"public_url,omitempty" env:"OCIS_URL;FRONTEND_PUBLIC_URL"`
PublicURL string `yaml:"public_url" env:"OCIS_URL;FRONTEND_PUBLIC_URL"`
Archiver Archiver `yaml:"archiver,omitempty"`
AppProvider AppProvider `yaml:"app_provider,omitempty"`
DataGateway DataGateway `yaml:"data_gateway,omitempty"`
OCS OCS `yaml:"ocs,omitempty"`
AuthMachine AuthMachine `yaml:"auth_machine,omitempty"`
Checksums Checksums `yaml:"checksums,omitempty"`
Archiver Archiver `yaml:"archiver"`
AppProvider AppProvider `yaml:"app_provider"`
DataGateway DataGateway `yaml:"data_gateway"`
OCS OCS `yaml:"ocs"`
AuthMachine AuthMachine `yaml:"auth_machine"`
Checksums Checksums `yaml:"checksums"`
Middleware Middleware `yaml:"middleware,omitempty"`
Middleware Middleware `yaml:"middleware"`
}
type Tracing struct {
Enabled bool `yaml:"enabled,omitempty" env:"OCIS_TRACING_ENABLED;FRONTEND_TRACING_ENABLED" desc:"Activates tracing."`
Type string `yaml:"type,omitempty" env:"OCIS_TRACING_TYPE;FRONTEND_TRACING_TYPE"`
Endpoint string `yaml:"endpoint,omitempty" env:"OCIS_TRACING_ENDPOINT;FRONTEND_TRACING_ENDPOINT" desc:"The endpoint to the tracing collector."`
Collector string `yaml:"collector,omitempty" env:"OCIS_TRACING_COLLECTOR;FRONTEND_TRACING_COLLECTOR"`
Enabled bool `yaml:"enabled" env:"OCIS_TRACING_ENABLED;FRONTEND_TRACING_ENABLED" desc:"Activates tracing."`
Type string `yaml:"type" env:"OCIS_TRACING_TYPE;FRONTEND_TRACING_TYPE"`
Endpoint string `yaml:"endpoint" env:"OCIS_TRACING_ENDPOINT;FRONTEND_TRACING_ENDPOINT" desc:"The endpoint to the tracing collector."`
Collector string `yaml:"collector" env:"OCIS_TRACING_COLLECTOR;FRONTEND_TRACING_COLLECTOR"`
}
type Logging struct {
Level string `yaml:"level,omitempty" env:"OCIS_LOG_LEVEL;FRONTEND_LOG_LEVEL" desc:"The log level."`
Pretty bool `yaml:"pretty,omitempty" env:"OCIS_LOG_PRETTY;FRONTEND_LOG_PRETTY" desc:"Activates pretty log output."`
Color bool `yaml:"color,omitempty" env:"OCIS_LOG_COLOR;FRONTEND_LOG_COLOR" desc:"Activates colorized log output."`
File string `yaml:"file,omitempty" env:"OCIS_LOG_FILE;FRONTEND_LOG_FILE" desc:"The target log file."`
Level string `yaml:"level" env:"OCIS_LOG_LEVEL;FRONTEND_LOG_LEVEL" desc:"The log level."`
Pretty bool `yaml:"pretty" env:"OCIS_LOG_PRETTY;FRONTEND_LOG_PRETTY" desc:"Activates pretty log output."`
Color bool `yaml:"color" env:"OCIS_LOG_COLOR;FRONTEND_LOG_COLOR" desc:"Activates colorized log output."`
File string `yaml:"file" env:"OCIS_LOG_FILE;FRONTEND_LOG_FILE" desc:"The target log file."`
}
type Service struct {
@@ -57,44 +57,44 @@ type Service struct {
}
type Debug struct {
Addr string `yaml:"addr,omitempty" env:"FRONTEND_DEBUG_ADDR"`
Token string `yaml:"token,omitempty" env:"FRONTEND_DEBUG_TOKEN"`
Pprof bool `yaml:"pprof,omitempty" env:"FRONTEND_DEBUG_PPROF"`
Zpages bool `yaml:"zpages,omitempty" env:"FRONTEND_DEBUG_ZPAGES"`
Addr string `yaml:"addr" env:"FRONTEND_DEBUG_ADDR"`
Token string `yaml:"token" env:"FRONTEND_DEBUG_TOKEN"`
Pprof bool `yaml:"pprof" env:"FRONTEND_DEBUG_PPROF"`
Zpages bool `yaml:"zpages" env:"FRONTEND_DEBUG_ZPAGES"`
}
type HTTPConfig struct {
Addr string `yaml:"addr,omitempty" env:"FRONTEND_HTTP_ADDR" desc:"The address of the http service."`
Protocol string `yaml:"protocol,omitempty" env:"FRONTEND_HTTP_PROTOCOL" desc:"The transport protocol of the http service."`
Prefix string `yaml:"prefix,omitempty"`
Addr string `yaml:"addr" env:"FRONTEND_HTTP_ADDR" desc:"The address of the http service."`
Protocol string `yaml:"protocol" env:"FRONTEND_HTTP_PROTOCOL" desc:"The transport protocol of the http service."`
Prefix string `yaml:"prefix"`
}
// Middleware configures reva middlewares.
type Middleware struct {
Auth Auth `yaml:"auth,omitempty"`
Auth Auth `yaml:"auth"`
}
// Auth configures reva http auth middleware.
type Auth struct {
CredentialsByUserAgent map[string]string `yaml:"credentials_by_user_agent,omitempty"`
CredentialsByUserAgent map[string]string `yaml:"credentials_by_user_agent"`
}
type Archiver struct {
MaxNumFiles int64 `yaml:"max_num_files,omitempty"`
MaxSize int64 `yaml:"max_size,omitempty"`
MaxNumFiles int64 `yaml:"max_num_files"`
MaxSize int64 `yaml:"max_size"`
Prefix string `yaml:"-"`
Insecure bool `yaml:"insecure,omitempty" env:"OCIS_INSECURE;FRONTEND_ARCHIVER_INSECURE"`
Insecure bool `yaml:"insecure" env:"OCIS_INSECURE;FRONTEND_ARCHIVER_INSECURE"`
}
type AppProvider struct {
ExternalAddr string `yaml:"external_addr,omitempty"`
Driver string `yaml:"driver,omitempty"`
ExternalAddr string `yaml:"external_addr"`
Driver string `yaml:"driver"`
// WopiDriver WopiDriver `yaml:"wopi_driver"`
AppsURL string `yaml:"-"`
OpenURL string `yaml:"-"`
NewURL string `yaml:"-"`
Prefix string `yaml:"-"`
Insecure bool `yaml:"insecure,omitempty" env:"OCIS_INSECURE;FRONTEND_APPPROVIDER_INSECURE"`
Insecure bool `yaml:"insecure" env:"OCIS_INSECURE;FRONTEND_APPPROVIDER_INSECURE"`
}
type DataGateway struct {

View File

@@ -6,41 +6,41 @@ type Config struct {
*shared.Commons `yaml:"-"`
Service Service `yaml:"-"`
Tracing *Tracing `yaml:"tracing,omitempty"`
Logging *Logging `yaml:"log,omitempty"`
Debug Debug `yaml:"debug,omitempty"`
Supervised bool `yaml:"supervised,omitempty"`
Tracing *Tracing `yaml:"tracing"`
Logging *Logging `yaml:"log"`
Debug Debug `yaml:"debug"`
Supervised bool `yaml:"supervised"`
GRPC GRPCConfig `yaml:"grpc,omitempty"`
GRPC GRPCConfig `yaml:"grpc"`
TokenManager *TokenManager `yaml:"token_manager,omitempty"`
Reva *Reva `yaml:"reva,omitempty"`
TokenManager *TokenManager `yaml:"token_manager"`
Reva *Reva `yaml:"reva"`
SkipUserGroupsInToken bool `yaml:",omitempty"`
SkipUserGroupsInToken bool `yaml:""`
CommitShareToStorageGrant bool `yaml:"commit_share_to_storage_grant,omitempty"`
CommitShareToStorageRef bool `yaml:"commit_share_to_storage_ref,omitempty"`
ShareFolder string `yaml:"share_folder,omitempty"`
DisableHomeCreationOnLogin bool `yaml:"disable_home_creation_on_login,omitempty"`
TransferSecret string `yaml:"transfer_secret,omitempty" env:"STORAGE_TRANSFER_SECRET"`
TransferExpires int `yaml:"transfer_expires,omitempty"`
HomeMapping string `yaml:"home_mapping,omitempty"`
EtagCacheTTL int `yaml:"etag_cache_ttl,omitempty"`
CommitShareToStorageGrant bool `yaml:"commit_share_to_storage_grant"`
CommitShareToStorageRef bool `yaml:"commit_share_to_storage_ref"`
ShareFolder string `yaml:"share_folder"`
DisableHomeCreationOnLogin bool `yaml:"disable_home_creation_on_login"`
TransferSecret string `yaml:"transfer_secret" env:"STORAGE_TRANSFER_SECRET"`
TransferExpires int `yaml:"transfer_expires"`
HomeMapping string `yaml:"home_mapping"`
EtagCacheTTL int `yaml:"etag_cache_ttl"`
UsersEndpoint string `yaml:"users_endpoint,omitempty"`
GroupsEndpoint string `yaml:"groups_endpoint,omitempty"`
PermissionsEndpoint string `yaml:"permissions_endpoint,omitempty"`
SharingEndpoint string `yaml:"sharing_endpoint,omitempty"`
FrontendPublicURL string `yaml:"frontend_public_url,omitempty" env:"OCIS_URL;GATEWAY_FRONTEND_PUBLIC_URL"`
AuthBasicEndpoint string `yaml:"auth_basic_endpoint,omitempty"`
AuthBearerEndpoint string `yaml:"auth_bearer_endpoint,omitempty"`
AuthMachineEndpoint string `yaml:"auth_machine_endpoint,omitempty"`
StoragePublicLinkEndpoint string `yaml:"storage_public_link_endpoint,omitempty"`
StorageUsersEndpoint string `yaml:"storage_users_endpoint,omitempty"`
StorageSharesEndpoint string `yaml:"storage_shares_endpoint,omitempty"`
UsersEndpoint string `yaml:"users_endpoint"`
GroupsEndpoint string `yaml:"groups_endpoint"`
PermissionsEndpoint string `yaml:"permissions_endpoint"`
SharingEndpoint string `yaml:"sharing_endpoint"`
FrontendPublicURL string `yaml:"frontend_public_url" env:"OCIS_URL;GATEWAY_FRONTEND_PUBLIC_URL"`
AuthBasicEndpoint string `yaml:"auth_basic_endpoint"`
AuthBearerEndpoint string `yaml:"auth_bearer_endpoint"`
AuthMachineEndpoint string `yaml:"auth_machine_endpoint"`
StoragePublicLinkEndpoint string `yaml:"storage_public_link_endpoint"`
StorageUsersEndpoint string `yaml:"storage_users_endpoint"`
StorageSharesEndpoint string `yaml:"storage_shares_endpoint"`
StorageRegistry StorageRegistry `yaml:"storage_registry,omitempty"`
AppRegistry AppRegistry `yaml:"app_registry,omitempty"`
StorageRegistry StorageRegistry `yaml:"storage_registry"`
AppRegistry AppRegistry `yaml:"app_registry"`
}
type Tracing struct {
Enabled bool `yaml:"enabled" env:"OCIS_TRACING_ENABLED;GATEWAY_TRACING_ENABLED" desc:"Activates tracing."`

View File

@@ -12,17 +12,17 @@ type Config struct {
Service Service `yaml:"-"`
Tracing *Tracing `yaml:"tracing,omitempty"`
Log *Log `yaml:"log,omitempty"`
Debug Debug `yaml:"debug,omitempty"`
Tracing *Tracing `yaml:"tracing"`
Log *Log `yaml:"log"`
Debug Debug `yaml:"debug"`
Ldap Ldap `yaml:"ldap,omitempty"`
Ldaps Ldaps `yaml:"ldaps,omitempty"`
Ldap Ldap `yaml:"ldap"`
Ldaps Ldaps `yaml:"ldaps"`
Backend Backend `yaml:"backend,omitempty"`
Fallback FallbackBackend `yaml:"fallback,omitempty"`
Backend Backend `yaml:"backend"`
Fallback FallbackBackend `yaml:"fallback"`
RoleBundleUUID string `yaml:"role_bundle_uuid,omitempty" env:"GLAUTH_ROLE_BUNDLE_ID"`
RoleBundleUUID string `yaml:"role_bundle_uuid" env:"GLAUTH_ROLE_BUNDLE_ID"`
Context context.Context `yaml:"-"`
}

View File

@@ -12,13 +12,13 @@ type Config struct {
Service Service `yaml:"-"`
Tracing *Tracing `yaml:"tracing,omitempty"`
Log *Log `yaml:"log,omitempty"`
Debug Debug `yaml:"debug,omitempty"`
Tracing *Tracing `yaml:"tracing"`
Log *Log `yaml:"log"`
Debug Debug `yaml:"debug"`
HTTP HTTP `yaml:"http,omitempty"`
HTTP HTTP `yaml:"http"`
GraphExplorer GraphExplorer `yaml:"graph_explorer,omitempty"`
GraphExplorer GraphExplorer `yaml:"graph_explorer"`
Context context.Context `yaml:"-"`
}

View File

@@ -12,62 +12,62 @@ type Config struct {
Service Service `yaml:"-"`
Tracing *Tracing `yaml:"tracing,omitempty"`
Log *Log `yaml:"log,omitempty"`
Debug Debug `yaml:"debug,omitempty"`
Tracing *Tracing `yaml:"tracing"`
Log *Log `yaml:"log"`
Debug Debug `yaml:"debug"`
HTTP HTTP `yaml:"http,omitempty"`
HTTP HTTP `yaml:"http"`
Reva *Reva `yaml:"reva,omitempty"`
TokenManager *TokenManager `yaml:"token_manager,omitempty"`
Reva *Reva `yaml:"reva"`
TokenManager *TokenManager `yaml:"token_manager"`
Spaces Spaces `yaml:"spaces,omitempty"`
Identity Identity `yaml:"identity,omitempty"`
Events Events `yaml:"events,omitempty"`
Spaces Spaces `yaml:"spaces"`
Identity Identity `yaml:"identity"`
Events Events `yaml:"events"`
Context context.Context `yaml:"-"`
}
type Spaces struct {
WebDavBase string `yaml:"webdav_base,omitempty" env:"OCIS_URL;GRAPH_SPACES_WEBDAV_BASE"`
WebDavPath string `yaml:"webdav_path,omitempty" env:"GRAPH_SPACES_WEBDAV_PATH"`
DefaultQuota string `yaml:"default_quota,omitempty" env:"GRAPH_SPACES_DEFAULT_QUOTA"`
Insecure bool `yaml:"insecure,omitempty" env:"OCIS_INSECURE;GRAPH_SPACES_INSECURE"`
ExtendedSpacePropertiesCacheTTL int `yaml:"extended_space_properties_cache_ttl,omitempty" env:"GRAPH_SPACES_EXTENDED_SPACE_PROPERTIES_CACHE_TTL"`
WebDavBase string `yaml:"webdav_base" env:"OCIS_URL;GRAPH_SPACES_WEBDAV_BASE"`
WebDavPath string `yaml:"webdav_path" env:"GRAPH_SPACES_WEBDAV_PATH"`
DefaultQuota string `yaml:"default_quota" env:"GRAPH_SPACES_DEFAULT_QUOTA"`
Insecure bool `yaml:"insecure" env:"OCIS_INSECURE;GRAPH_SPACES_INSECURE"`
ExtendedSpacePropertiesCacheTTL int `yaml:"extended_space_properties_cache_ttl" env:"GRAPH_SPACES_EXTENDED_SPACE_PROPERTIES_CACHE_TTL"`
}
type LDAP struct {
URI string `yaml:"uri,omitempty" env:"LDAP_URI;GRAPH_LDAP_URI"`
Insecure bool `yaml:"insecure,omitempty" env:"OCIS_INSECURE;GRAPH_LDAP_INSECURE"`
BindDN string `yaml:"bind_dn,omitempty" env:"LDAP_BIND_DN;GRAPH_LDAP_BIND_DN"`
BindPassword string `yaml:"bind_password,omitempty" env:"LDAP_BIND_PASSWORD;GRAPH_LDAP_BIND_PASSWORD"`
UseServerUUID bool `yaml:"use_server_uuid,omitempty" env:"GRAPH_LDAP_SERVER_UUID"`
WriteEnabled bool `yaml:"write_enabled,omitempty" env:"GRAPH_LDAP_SERVER_WRITE_ENABLED"`
URI string `yaml:"uri" env:"LDAP_URI;GRAPH_LDAP_URI"`
Insecure bool `yaml:"insecure" env:"OCIS_INSECURE;GRAPH_LDAP_INSECURE"`
BindDN string `yaml:"bind_dn" env:"LDAP_BIND_DN;GRAPH_LDAP_BIND_DN"`
BindPassword string `yaml:"bind_password" env:"LDAP_BIND_PASSWORD;GRAPH_LDAP_BIND_PASSWORD"`
UseServerUUID bool `yaml:"use_server_uuid" env:"GRAPH_LDAP_SERVER_UUID"`
WriteEnabled bool `yaml:"write_enabled" env:"GRAPH_LDAP_SERVER_WRITE_ENABLED"`
UserBaseDN string `yaml:"user_base_dn,omitempty" env:"LDAP_USER_BASE_DN;GRAPH_LDAP_USER_BASE_DN"`
UserSearchScope string `yaml:"user_search_scope,omitempty" env:"LDAP_USER_SCOPE;GRAPH_LDAP_USER_SCOPE"`
UserFilter string `yaml:"user_filter,omitempty" env:"LDAP_USER_FILTER;GRAPH_LDAP_USER_FILTER"`
UserObjectClass string `yaml:"user_objectclass,omitempty" env:"LDAP_USER_OBJECTCLASS;GRAPH_LDAP_USER_OBJECTCLASS"`
UserEmailAttribute string `yaml:"user_mail_attribute,omitempty" env:"LDAP_USER_SCHEMA_MAIL;GRAPH_LDAP_USER_EMAIL_ATTRIBUTE"`
UserDisplayNameAttribute string `yaml:"user_displayname_attribute,omitempty" env:"LDAP_USER_SCHEMA_DISPLAY_NAME;GRAPH_LDAP_USER_DISPLAYNAME_ATTRIBUTE"`
UserNameAttribute string `yaml:"user_name_attribute,omitempty" env:"LDAP_USER_SCHEMA_USERNAME;GRAPH_LDAP_USER_NAME_ATTRIBUTE"`
UserIDAttribute string `yaml:"user_id_attribute,omitempty" env:"LDAP_USER_SCHEMA_ID;GRAPH_LDAP_USER_UID_ATTRIBUTE"`
UserBaseDN string `yaml:"user_base_dn" env:"LDAP_USER_BASE_DN;GRAPH_LDAP_USER_BASE_DN"`
UserSearchScope string `yaml:"user_search_scope" env:"LDAP_USER_SCOPE;GRAPH_LDAP_USER_SCOPE"`
UserFilter string `yaml:"user_filter" env:"LDAP_USER_FILTER;GRAPH_LDAP_USER_FILTER"`
UserObjectClass string `yaml:"user_objectclass" env:"LDAP_USER_OBJECTCLASS;GRAPH_LDAP_USER_OBJECTCLASS"`
UserEmailAttribute string `yaml:"user_mail_attribute" env:"LDAP_USER_SCHEMA_MAIL;GRAPH_LDAP_USER_EMAIL_ATTRIBUTE"`
UserDisplayNameAttribute string `yaml:"user_displayname_attribute" env:"LDAP_USER_SCHEMA_DISPLAY_NAME;GRAPH_LDAP_USER_DISPLAYNAME_ATTRIBUTE"`
UserNameAttribute string `yaml:"user_name_attribute" env:"LDAP_USER_SCHEMA_USERNAME;GRAPH_LDAP_USER_NAME_ATTRIBUTE"`
UserIDAttribute string `yaml:"user_id_attribute" env:"LDAP_USER_SCHEMA_ID;GRAPH_LDAP_USER_UID_ATTRIBUTE"`
GroupBaseDN string `yaml:"group_base_dn,omitempty" env:"LDAP_GROUP_BASE_DN;GRAPH_LDAP_GROUP_BASE_DN"`
GroupSearchScope string `yaml:"group_search_scope,omitempty" env:"LDAP_GROUP_SCOPE;GRAPH_LDAP_GROUP_SEARCH_SCOPE"`
GroupFilter string `yaml:"group_filter,omitempty" env:"LDAP_GROUP_FILTER;GRAPH_LDAP_GROUP_FILTER"`
GroupObjectClass string `yaml:"group_objectclass,omitempty" env:"LDAP_GROUP_OBJECTCLASS;GRAPH_LDAP_GROUP_OBJECTCLASS"`
GroupNameAttribute string `yaml:"group_name_attribute,omitempty" env:"LDAP_GROUP_SCHEMA_GROUPNAME;GRAPH_LDAP_GROUP_NAME_ATTRIBUTE"`
GroupIDAttribute string `yaml:"group_id_attribute,omitempty" env:"LDAP_GROUP_SCHEMA_ID;GRAPH_LDAP_GROUP_ID_ATTRIBUTE"`
GroupBaseDN string `yaml:"group_base_dn" env:"LDAP_GROUP_BASE_DN;GRAPH_LDAP_GROUP_BASE_DN"`
GroupSearchScope string `yaml:"group_search_scope" env:"LDAP_GROUP_SCOPE;GRAPH_LDAP_GROUP_SEARCH_SCOPE"`
GroupFilter string `yaml:"group_filter" env:"LDAP_GROUP_FILTER;GRAPH_LDAP_GROUP_FILTER"`
GroupObjectClass string `yaml:"group_objectclass" env:"LDAP_GROUP_OBJECTCLASS;GRAPH_LDAP_GROUP_OBJECTCLASS"`
GroupNameAttribute string `yaml:"group_name_attribute" env:"LDAP_GROUP_SCHEMA_GROUPNAME;GRAPH_LDAP_GROUP_NAME_ATTRIBUTE"`
GroupIDAttribute string `yaml:"group_id_attribute" env:"LDAP_GROUP_SCHEMA_ID;GRAPH_LDAP_GROUP_ID_ATTRIBUTE"`
}
type Identity struct {
Backend string `yaml:"backend,omitempty" env:"GRAPH_IDENTITY_BACKEND"`
LDAP LDAP `yaml:"ldap,omitempty"`
Backend string `yaml:"backend" env:"GRAPH_IDENTITY_BACKEND"`
LDAP LDAP `yaml:"ldap"`
}
// Events combines the configuration options for the event bus.
type Events struct {
Endpoint string `yaml:"events_endpoint,omitempty" env:"GRAPH_EVENTS_ENDPOINT" desc:"the address of the streaming service"`
Cluster string `yaml:"events_cluster,omitempty" env:"GRAPH_EVENTS_CLUSTER" desc:"the clusterID of the streaming service. Mandatory when using nats"`
Endpoint string `yaml:"events_endpoint" env:"GRAPH_EVENTS_ENDPOINT" desc:"the address of the streaming service"`
Cluster string `yaml:"events_cluster" env:"GRAPH_EVENTS_CLUSTER" desc:"the clusterID of the streaming service. Mandatory when using nats"`
}

View File

@@ -5,20 +5,20 @@ import "github.com/owncloud/ocis/ocis-pkg/shared"
type Config struct {
*shared.Commons `yaml:"-"`
Service Service `yaml:"-"`
Tracing *Tracing `yaml:"tracing,omitempty"`
Logging *Logging `yaml:"log,omitempty"`
Debug Debug `yaml:"debug,omitempty"`
Supervised bool `yaml:"supervised,omitempty"`
Tracing *Tracing `yaml:"tracing"`
Logging *Logging `yaml:"log"`
Debug Debug `yaml:"debug"`
Supervised bool `yaml:"supervised"`
GRPC GRPCConfig `yaml:"grpc,omitempty"`
GRPC GRPCConfig `yaml:"grpc"`
TokenManager *TokenManager `yaml:"token_manager,omitempty"`
Reva *Reva `yaml:"reva,omitempty"`
TokenManager *TokenManager `yaml:"token_manager"`
Reva *Reva `yaml:"reva"`
SkipUserGroupsInToken bool `yaml:"skip_user_groups_in_token,omitempty"`
GroupMembersCacheExpiration int `yaml:"group_members_cache_expiration,omitempty"`
Driver string `yaml:"driver,omitempty"`
Drivers Drivers `yaml:"drivers,omitempty"`
SkipUserGroupsInToken bool `yaml:"skip_user_groups_in_token"`
GroupMembersCacheExpiration int `yaml:"group_members_cache_expiration"`
Driver string `yaml:"driver"`
Drivers Drivers `yaml:"drivers"`
}
type Tracing struct {
Enabled bool `yaml:"enabled" env:"OCIS_TRACING_ENABLED;GROUPS_TRACING_ENABLED" desc:"Activates tracing."`
@@ -51,34 +51,34 @@ type GRPCConfig struct {
}
type Drivers struct {
JSON JSONDriver `yaml:",omitempty"`
LDAP LDAPDriver `yaml:",omitempty"`
OwnCloudSQL OwnCloudSQLDriver `yaml:",omitempty"`
REST RESTProvider `yaml:",omitempty"`
JSON JSONDriver `yaml:""`
LDAP LDAPDriver `yaml:""`
OwnCloudSQL OwnCloudSQLDriver `yaml:""`
REST RESTProvider `yaml:""`
}
type JSONDriver struct {
File string
}
type LDAPDriver struct {
URI string `yaml:",omitempty" env:"LDAP_URI;GROUPS_LDAP_URI"`
CACert string `yaml:",omitempty" env:"LDAP_CACERT;GROUPS_LDAP_CACERT"`
Insecure bool `yaml:",omitempty" env:"LDAP_INSECURE;GROUPS_LDAP_INSECURE"`
BindDN string `yaml:",omitempty" env:"LDAP_BIND_DN;GROUPS_LDAP_BIND_DN"`
BindPassword string `yaml:",omitempty" env:"LDAP_BIND_PASSWORD;GROUPS_LDAP_BIND_PASSWORD"`
UserBaseDN string `yaml:",omitempty" env:"LDAP_USER_BASE_DN;GROUPS_LDAP_USER_BASE_DN"`
GroupBaseDN string `yaml:",omitempty" env:"LDAP_GROUP_BASE_DN;GROUPS_LDAP_GROUP_BASE_DN"`
UserScope string `yaml:",omitempty" env:"LDAP_USER_SCOPE;GROUPS_LDAP_USER_SCOPE"`
GroupScope string `yaml:",omitempty" env:"LDAP_GROUP_SCOPE;GROUPS_LDAP_GROUP_SCOPE"`
UserFilter string `yaml:",omitempty" env:"LDAP_USERFILTER;GROUPS_LDAP_USERFILTER"`
GroupFilter string `yaml:",omitempty" env:"LDAP_GROUPFILTER;GROUPS_LDAP_USERFILTER"`
UserObjectClass string `yaml:",omitempty" env:"LDAP_USER_OBJECTCLASS;GROUPS_LDAP_USER_OBJECTCLASS"`
GroupObjectClass string `yaml:",omitempty" env:"LDAP_GROUP_OBJECTCLASS;GROUPS_LDAP_GROUP_OBJECTCLASS"`
LoginAttributes []string `yaml:",omitempty" env:"LDAP_LOGIN_ATTRIBUTES;GROUPS_LDAP_LOGIN_ATTRIBUTES"`
IDP string `yaml:",omitempty" env:"OCIS_URL;GROUPS_IDP_URL"` // TODO what is this for?
GatewayEndpoint string `yaml:",omitempty"` // TODO do we need this here?
UserSchema LDAPUserSchema `yaml:",omitempty"`
GroupSchema LDAPGroupSchema `yaml:",omitempty"`
URI string `yaml:"" env:"LDAP_URI;GROUPS_LDAP_URI"`
CACert string `yaml:"" env:"LDAP_CACERT;GROUPS_LDAP_CACERT"`
Insecure bool `yaml:"" env:"LDAP_INSECURE;GROUPS_LDAP_INSECURE"`
BindDN string `yaml:"" env:"LDAP_BIND_DN;GROUPS_LDAP_BIND_DN"`
BindPassword string `yaml:"" env:"LDAP_BIND_PASSWORD;GROUPS_LDAP_BIND_PASSWORD"`
UserBaseDN string `yaml:"" env:"LDAP_USER_BASE_DN;GROUPS_LDAP_USER_BASE_DN"`
GroupBaseDN string `yaml:"" env:"LDAP_GROUP_BASE_DN;GROUPS_LDAP_GROUP_BASE_DN"`
UserScope string `yaml:"" env:"LDAP_USER_SCOPE;GROUPS_LDAP_USER_SCOPE"`
GroupScope string `yaml:"" env:"LDAP_GROUP_SCOPE;GROUPS_LDAP_GROUP_SCOPE"`
UserFilter string `yaml:"" env:"LDAP_USERFILTER;GROUPS_LDAP_USERFILTER"`
GroupFilter string `yaml:"" env:"LDAP_GROUPFILTER;GROUPS_LDAP_USERFILTER"`
UserObjectClass string `yaml:"" env:"LDAP_USER_OBJECTCLASS;GROUPS_LDAP_USER_OBJECTCLASS"`
GroupObjectClass string `yaml:"" env:"LDAP_GROUP_OBJECTCLASS;GROUPS_LDAP_GROUP_OBJECTCLASS"`
LoginAttributes []string `yaml:"" env:"LDAP_LOGIN_ATTRIBUTES;GROUPS_LDAP_LOGIN_ATTRIBUTES"`
IDP string `yaml:"" env:"OCIS_URL;GROUPS_IDP_URL"` // TODO what is this for?
GatewayEndpoint string `yaml:""` // TODO do we need this here?
UserSchema LDAPUserSchema `yaml:""`
GroupSchema LDAPGroupSchema `yaml:""`
}
type LDAPUserSchema struct {

View File

@@ -12,12 +12,12 @@ type Config struct {
Service Service `yaml:"-"`
Tracing *Tracing `yaml:"tracing,omitempty"`
Log *Log `yaml:"log,omitempty"`
Debug Debug `yaml:"debug,omitempty"`
Tracing *Tracing `yaml:"tracing"`
Log *Log `yaml:"log"`
Debug Debug `yaml:"debug"`
IDM Settings `yaml:"idm,omitempty"`
CreateDemoUsers bool `yaml:"create_demo_users,omitempty" env:"IDM_CREATE_DEMO_USERS;ACCOUNTS_DEMO_USERS_AND_GROUPS" desc:"Flag to enabe/disable the creation of the demo users"`
IDM Settings `yaml:"idm"`
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 `yaml:"service_user_passwords"`

View File

@@ -12,43 +12,43 @@ type Config struct {
Service Service `yaml:"-"`
Tracing *Tracing `yaml:"tracing,omitempty"`
Log *Log `yaml:"log,omitempty"`
Debug Debug `yaml:"debug,omitempty"`
Tracing *Tracing `yaml:"tracing"`
Log *Log `yaml:"log"`
Debug Debug `yaml:"debug"`
HTTP HTTP `yaml:"http,omitempty"`
HTTP HTTP `yaml:"http"`
Asset Asset `yaml:"asset,omitempty"`
IDP Settings `yaml:"idp,omitempty"`
Ldap Ldap `yaml:"ldap,omitempty"`
Asset Asset `yaml:"asset"`
IDP Settings `yaml:"idp"`
Ldap Ldap `yaml:"ldap"`
Context context.Context `yaml:"-"`
}
// Ldap defines the available LDAP configuration.
type Ldap struct {
URI string `yaml:"uri,omitempty" env:"LDAP_URI;IDP_LDAP_URI"`
TLSCACert string `yaml:"cacert,omitempty" env:"LDAP_CACERT;IDP_LDAP_TLS_CACERT"`
URI string `yaml:"uri" env:"LDAP_URI;IDP_LDAP_URI"`
TLSCACert string `yaml:"cacert" env:"LDAP_CACERT;IDP_LDAP_TLS_CACERT"`
BindDN string `yaml:"bind_dn,omitempty" env:"LDAP_BIND_DN;IDP_LDAP_BIND_DN"`
BindPassword string `yaml:"bind_password,omitempty" env:"LDAP_BIND_PASSWORD;IDP_LDAP_BIND_PASSWORD"`
BindDN string `yaml:"bind_dn" env:"LDAP_BIND_DN;IDP_LDAP_BIND_DN"`
BindPassword string `yaml:"bind_password" env:"LDAP_BIND_PASSWORD;IDP_LDAP_BIND_PASSWORD"`
BaseDN string `yaml:"base_dn,omitempty" env:"LDAP_USER_BASE_DN,IDP_LDAP_BASE_DN"`
Scope string `yaml:"scope,omitempty" env:"LDAP_USER_SCOPE;IDP_LDAP_SCOPE"`
BaseDN string `yaml:"base_dn" env:"LDAP_USER_BASE_DN,IDP_LDAP_BASE_DN"`
Scope string `yaml:"scope" env:"LDAP_USER_SCOPE;IDP_LDAP_SCOPE"`
LoginAttribute string `yaml:"login_attribute,omitempty" env:"IDP_LDAP_LOGIN_ATTRIBUTE"`
EmailAttribute string `yaml:"email_attribute,omitempty" env:"LDAP_USER_SCHEMA_MAIL;IDP_LDAP_EMAIL_ATTRIBUTE"`
NameAttribute string `yaml:"name_attribute,omitempty" env:"LDAP_USER_SCHEMA_USERNAME;IDP_LDAP_NAME_ATTRIBUTE"`
UUIDAttribute string `yaml:"uuid_attribute,omitempty" env:"LDAP_USER_SCHEMA_ID;IDP_LDAP_UUID_ATTRIBUTE"`
UUIDAttributeType string `yaml:"uuid_attribute_type,omitempty" env:"IDP_LDAP_UUID_ATTRIBUTE_TYPE"`
LoginAttribute string `yaml:"login_attribute" env:"IDP_LDAP_LOGIN_ATTRIBUTE"`
EmailAttribute string `yaml:"email_attribute" env:"LDAP_USER_SCHEMA_MAIL;IDP_LDAP_EMAIL_ATTRIBUTE"`
NameAttribute string `yaml:"name_attribute" env:"LDAP_USER_SCHEMA_USERNAME;IDP_LDAP_NAME_ATTRIBUTE"`
UUIDAttribute string `yaml:"uuid_attribute" env:"LDAP_USER_SCHEMA_ID;IDP_LDAP_UUID_ATTRIBUTE"`
UUIDAttributeType string `yaml:"uuid_attribute_type" env:"IDP_LDAP_UUID_ATTRIBUTE_TYPE"`
Filter string `yaml:"filter,omitempty" env:"LDAP_USER_FILTER;IDP_LDAP_FILTER"`
ObjectClass string `yaml:"objectclass,omitempty" env:"LDAP_USER_OBJECTCLASS;IDP_LDAP_OBJECTCLASS"`
Filter string `yaml:"filter" env:"LDAP_USER_FILTER;IDP_LDAP_FILTER"`
ObjectClass string `yaml:"objectclass" env:"LDAP_USER_OBJECTCLASS;IDP_LDAP_OBJECTCLASS"`
}
// Asset defines the available asset configuration.
type Asset struct {
Path string `yaml:"asset,omitempty" env:"IDP_ASSET_PATH"`
Path string `yaml:"asset" env:"IDP_ASSET_PATH"`
}
type Settings struct {

View File

@@ -12,18 +12,18 @@ type Config struct {
Service Service `yaml:"-"`
Log *Log `yaml:"log,omitempty"`
Debug Debug `yaml:"debug,omitempty"`
Log *Log `yaml:"log"`
Debug Debug `yaml:"debug"`
Nats Nats `ociConfig:"nats,omitempty"`
Nats Nats `ociConfig:"nats"`
Context context.Context `yaml:"-"`
}
// Nats is the nats config
type Nats struct {
Host string `yaml:"host,omitempty" env:"NATS_NATS_HOST"`
Port int `yaml:"port,omitempty" env:"NATS_NATS_PORT"`
ClusterID string `yaml:"clusterid,omitempty" env:"NATS_NATS_CLUSTER_ID"`
StoreDir string `yaml:"store_dir,omitempty" env:"NATS_NATS_STORE_DIR"`
Host string `yaml:"host" env:"NATS_NATS_HOST"`
Port int `yaml:"port" env:"NATS_NATS_PORT"`
ClusterID string `yaml:"clusterid" env:"NATS_NATS_CLUSTER_ID"`
StoreDir string `yaml:"store_dir" env:"NATS_NATS_STORE_DIR"`
}

View File

@@ -12,10 +12,10 @@ type Config struct {
Service Service `yaml:"-"`
Log *Log `yaml:"log,omitempty"`
Debug Debug `yaml:"debug,omitempty"`
Log *Log `yaml:"log"`
Debug Debug `yaml:"debug"`
Notifications Notifications `yaml:"notifications,omitempty"`
Notifications Notifications `yaml:"notifications"`
Context context.Context `yaml:"-"`
}
@@ -23,9 +23,9 @@ type Config struct {
// Notifications definces the config options for the notifications service.
type Notifications struct {
*shared.Commons `yaml:"-"`
SMTP SMTP `yaml:"SMTP,omitempty"`
Events Events `yaml:"events,omitempty"`
RevaGateway string `yaml:"reva_gateway,omitempty" env:"REVA_GATEWAY;NOTIFICATIONS_REVA_GATEWAY"`
SMTP SMTP `yaml:"SMTP"`
Events Events `yaml:"events"`
RevaGateway string `yaml:"reva_gateway" env:"REVA_GATEWAY;NOTIFICATIONS_REVA_GATEWAY"`
MachineAuthAPIKey string `yaml:"machine_auth_api_key" env:"OCIS_MACHINE_AUTH_API_KEY;NOTIFICATIONS_MACHINE_AUTH_API_KEY"`
}

View File

@@ -5,29 +5,29 @@ import "github.com/owncloud/ocis/ocis-pkg/shared"
type Config struct {
*shared.Commons `yaml:"-"`
Service Service `yaml:"-"`
Tracing *Tracing `yaml:"tracing,omitempty"`
Logging *Logging `yaml:"log,omitempty"`
Debug Debug `yaml:"debug,omitempty"`
Supervised bool `yaml:"supervised,omitempty"`
Tracing *Tracing `yaml:"tracing"`
Logging *Logging `yaml:"log"`
Debug Debug `yaml:"debug"`
Supervised bool `yaml:"supervised"`
HTTP HTTPConfig `yaml:"http,omitempty"`
HTTP HTTPConfig `yaml:"http"`
TokenManager *TokenManager `yaml:"token_manager,omitempty"`
Reva *Reva `yaml:"reva,omitempty"`
TokenManager *TokenManager `yaml:"token_manager"`
Reva *Reva `yaml:"reva"`
SkipUserGroupsInToken bool `yaml:"skip_user_groups_in_token,omitempty"`
SkipUserGroupsInToken bool `yaml:"skip_user_groups_in_token"`
WebdavNamespace string `yaml:"webdav_namespace,omitempty"`
FilesNamespace string `yaml:"files_namespace,omitempty"`
SharesNamespace string `yaml:"shares_namespace,omitempty"`
WebdavNamespace string `yaml:"webdav_namespace"`
FilesNamespace string `yaml:"files_namespace"`
SharesNamespace string `yaml:"shares_namespace"`
// PublicURL used to redirect /s/{token} URLs to
PublicURL string `yaml:"public_url,omitempty" env:"OCIS_URL;OCDAV_PUBLIC_URL"`
PublicURL string `yaml:"public_url" env:"OCIS_URL;OCDAV_PUBLIC_URL"`
// Insecure certificates allowed when making requests to the gateway
Insecure bool `yaml:"insecure,omitempty" env:"OCIS_INSECURE;OCDAV_INSECURE"`
Insecure bool `yaml:"insecure" env:"OCIS_INSECURE;OCDAV_INSECURE"`
// Timeout in seconds when making requests to the gateway
Timeout int64 `yaml:"timeout,omitempty"`
Middleware Middleware `yaml:"middleware,omitempty"`
Timeout int64 `yaml:"timeout"`
Middleware Middleware `yaml:"middleware"`
}
type Tracing struct {
Enabled bool `yaml:"enabled" env:"OCIS_TRACING_ENABLED;OCDAV_TRACING_ENABLED" desc:"Activates tracing."`
@@ -62,10 +62,10 @@ type HTTPConfig struct {
// Middleware configures reva middlewares.
type Middleware struct {
Auth Auth `yaml:"auth,omitempty"`
Auth Auth `yaml:"auth"`
}
// Auth configures reva http auth middleware.
type Auth struct {
CredentialsByUserAgent map[string]string `yaml:"credentials_by_user_agenr,omitempty"`
CredentialsByUserAgent map[string]string `yaml:"credentials_by_user_agenr"`
}

View File

@@ -12,20 +12,20 @@ type Config struct {
Service Service `yaml:"-"`
Tracing *Tracing `yaml:"tracing,omitempty"`
Log *Log `yaml:"log,omitempty"`
Debug Debug `yaml:"debug,omitempty"`
Tracing *Tracing `yaml:"tracing"`
Log *Log `yaml:"log"`
Debug Debug `yaml:"debug"`
HTTP HTTP `yaml:"http,omitempty"`
HTTP HTTP `yaml:"http"`
TokenManager *TokenManager `yaml:"token_manager,omitempty"`
Reva *Reva `yaml:"reva,omitempty"`
TokenManager *TokenManager `yaml:"token_manager"`
Reva *Reva `yaml:"reva"`
IdentityManagement IdentityManagement `yaml:"identity_management,omitempty"`
IdentityManagement IdentityManagement `yaml:"identity_management"`
AccountBackend string `yaml:"account_backend,omitempty" env:"OCS_ACCOUNT_BACKEND_TYPE"`
StorageUsersDriver string `yaml:"storage_users_driver,omitempty" env:"STORAGE_USERS_DRIVER;OCS_STORAGE_USERS_DRIVER"`
MachineAuthAPIKey string `yaml:"machine_auth_api_key,omitempty" env:"OCIS_MACHINE_AUTH_API_KEY;OCS_MACHINE_AUTH_API_KEY"`
AccountBackend string `yaml:"account_backend" env:"OCS_ACCOUNT_BACKEND_TYPE"`
StorageUsersDriver string `yaml:"storage_users_driver" env:"STORAGE_USERS_DRIVER;OCS_STORAGE_USERS_DRIVER"`
MachineAuthAPIKey string `yaml:"machine_auth_api_key" env:"OCIS_MACHINE_AUTH_API_KEY;OCS_MACHINE_AUTH_API_KEY"`
Context context.Context `yaml:"-"`
}

View File

@@ -12,27 +12,27 @@ type Config struct {
Service Service `yaml:"-"`
Tracing *Tracing `yaml:"tracing,omitempty"`
Log *Log `yaml:"log,omitempty"`
Debug Debug `yaml:"debug,omitempty"`
Tracing *Tracing `yaml:"tracing"`
Log *Log `yaml:"log"`
Debug Debug `yaml:"debug"`
HTTP HTTP `yaml:"http,omitempty"`
HTTP HTTP `yaml:"http"`
Reva *Reva `yaml:"reva,omitempty"`
Reva *Reva `yaml:"reva"`
Policies []Policy `yaml:"policies,omitempty"`
OIDC OIDC `yaml:"oidc,omitempty"`
TokenManager *TokenManager `yaml:"token_manager,omitempty"`
PolicySelector *PolicySelector `yaml:"policy_selector,omitempty"`
PreSignedURL PreSignedURL `yaml:"pre_signed_url,omitempty"`
AccountBackend string `yaml:"account_backend,omitempty" env:"PROXY_ACCOUNT_BACKEND_TYPE"`
UserOIDCClaim string `yaml:"user_oidc_claim,omitempty" env:"PROXY_USER_OIDC_CLAIM"`
UserCS3Claim string `yaml:"user_cs3_claim,omitempty" env:"PROXY_USER_CS3_CLAIM"`
MachineAuthAPIKey string `yaml:"machine_auth_api_key,omitempty" env:"OCIS_MACHINE_AUTH_API_KEY;PROXY_MACHINE_AUTH_API_KEY"`
AutoprovisionAccounts bool `yaml:"auto_provision_accounts,omitempty" env:"PROXY_AUTOPROVISION_ACCOUNTS"`
EnableBasicAuth bool `yaml:"enable_basic_auth,omitempty" env:"PROXY_ENABLE_BASIC_AUTH"`
InsecureBackends bool `yaml:"insecure_backends,omitempty" env:"PROXY_INSECURE_BACKENDS"`
AuthMiddleware AuthMiddleware `yaml:"auth_middleware,omitempty"`
Policies []Policy `yaml:"policies"`
OIDC OIDC `yaml:"oidc"`
TokenManager *TokenManager `yaml:"token_manager"`
PolicySelector *PolicySelector `yaml:"policy_selector"`
PreSignedURL PreSignedURL `yaml:"pre_signed_url"`
AccountBackend string `yaml:"account_backend" env:"PROXY_ACCOUNT_BACKEND_TYPE"`
UserOIDCClaim string `yaml:"user_oidc_claim" env:"PROXY_USER_OIDC_CLAIM"`
UserCS3Claim string `yaml:"user_cs3_claim" env:"PROXY_USER_CS3_CLAIM"`
MachineAuthAPIKey string `yaml:"machine_auth_api_key" env:"OCIS_MACHINE_AUTH_API_KEY;PROXY_MACHINE_AUTH_API_KEY"`
AutoprovisionAccounts bool `yaml:"auto_provision_accounts" env:"PROXY_AUTOPROVISION_ACCOUNTS"`
EnableBasicAuth bool `yaml:"enable_basic_auth" env:"PROXY_ENABLE_BASIC_AUTH"`
InsecureBackends bool `yaml:"insecure_backends" env:"PROXY_INSECURE_BACKENDS"`
AuthMiddleware AuthMiddleware `yaml:"auth_middleware"`
Context context.Context `yaml:"-"`
}

View File

@@ -12,19 +12,19 @@ type Config struct {
Service Service `yaml:"-"`
Tracing *Tracing `yaml:"tracing,omitempty"`
Log *Log `yaml:"log,omitempty"`
Debug Debug `yaml:"debug,omitempty"`
Tracing *Tracing `yaml:"tracing"`
Log *Log `yaml:"log"`
Debug Debug `yaml:"debug"`
HTTP HTTP `yaml:"http,omitempty"`
GRPC GRPC `yaml:"grpc,omitempty"`
HTTP HTTP `yaml:"http"`
GRPC GRPC `yaml:"grpc"`
StoreType string `yaml:"store_type,omitempty" env:"SETTINGS_STORE_TYPE"`
DataPath string `yaml:"data_path,omitempty" env:"SETTINGS_DATA_PATH"`
Metadata Metadata `yaml:"metadata_config,omitempty"`
StoreType string `yaml:"store_type" env:"SETTINGS_STORE_TYPE"`
DataPath string `yaml:"data_path" env:"SETTINGS_DATA_PATH"`
Metadata Metadata `yaml:"metadata_config"`
Asset Asset `yaml:"asset,omitempty"`
TokenManager *TokenManager `yaml:"token_manager,omitempty"`
Asset Asset `yaml:"asset"`
TokenManager *TokenManager `yaml:"token_manager"`
Context context.Context `yaml:"-"`
}
@@ -36,10 +36,10 @@ type Asset struct {
// Metadata configures the metadata store to use
type Metadata struct {
GatewayAddress string `yaml:"gateway_addr,omitempty" env:"STORAGE_GATEWAY_GRPC_ADDR"`
StorageAddress string `yaml:"storage_addr,omitempty" env:"STORAGE_GRPC_ADDR"`
GatewayAddress string `yaml:"gateway_addr" env:"STORAGE_GATEWAY_GRPC_ADDR"`
StorageAddress string `yaml:"storage_addr" env:"STORAGE_GRPC_ADDR"`
ServiceUserID string `yaml:"service_user_id,omitempty" env:"METADATA_SERVICE_USER_UUID"`
ServiceUserIDP string `yaml:"service_user_idp,omitempty" env:"OCIS_URL;METADATA_SERVICE_USER_IDP"`
MachineAuthAPIKey string `yaml:"machine_auth_api_key,omitempty" env:"OCIS_MACHINE_AUTH_API_KEY"`
ServiceUserID string `yaml:"service_user_id" env:"METADATA_SERVICE_USER_UUID"`
ServiceUserIDP string `yaml:"service_user_idp" env:"OCIS_URL;METADATA_SERVICE_USER_IDP"`
MachineAuthAPIKey string `yaml:"machine_auth_api_key" env:"OCIS_MACHINE_AUTH_API_KEY"`
}

View File

@@ -5,22 +5,22 @@ import "github.com/owncloud/ocis/ocis-pkg/shared"
type Config struct {
*shared.Commons `yaml:"-"`
Service Service `yaml:"-"`
Tracing *Tracing `yaml:"tracing,omitempty"`
Logging *Logging `yaml:"log,omitempty"`
Debug Debug `yaml:"debug,omitempty"`
Supervised bool `yaml:"supervised,omitempty"`
Tracing *Tracing `yaml:"tracing"`
Logging *Logging `yaml:"log"`
Debug Debug `yaml:"debug"`
Supervised bool `yaml:"supervised"`
GRPC GRPCConfig `yaml:"grpc,omitempty"`
GRPC GRPCConfig `yaml:"grpc"`
TokenManager *TokenManager `yaml:"token_manager,omitempty"`
Reva *Reva `yaml:"reva,omitempty"`
TokenManager *TokenManager `yaml:"token_manager"`
Reva *Reva `yaml:"reva"`
SkipUserGroupsInToken bool `yaml:"skip_user_groups_in_token,omitempty"`
UserSharingDriver string `yaml:"user_sharing_driver,omitempty"`
UserSharingDrivers UserSharingDrivers `yaml:"user_sharin_drivers,omitempty"`
PublicSharingDriver string `yaml:"public_sharing_driver,omitempty"`
PublicSharingDrivers PublicSharingDrivers `yaml:"public_sharing_drivers,omitempty"`
Events Events `yaml:"events,omitempty"`
SkipUserGroupsInToken bool `yaml:"skip_user_groups_in_token"`
UserSharingDriver string `yaml:"user_sharing_driver"`
UserSharingDrivers UserSharingDrivers `yaml:"user_sharin_drivers"`
PublicSharingDriver string `yaml:"public_sharing_driver"`
PublicSharingDrivers PublicSharingDrivers `yaml:"public_sharing_drivers"`
Events Events `yaml:"events"`
}
type Tracing struct {
Enabled bool `yaml:"enabled" env:"OCIS_TRACING_ENABLED;SHARING_TRACING_ENABLED" desc:"Activates tracing."`

View File

@@ -9,25 +9,25 @@ import (
type Config struct {
*shared.Commons `yaml:"-"`
Service Service `yaml:"-"`
Tracing *Tracing `yaml:"tracing,omitempty"`
Logging *Logging `yaml:"log,omitempty"`
Debug Debug `yaml:"debug,omitempty"`
Supervised bool `yaml:"supervised,omitempty"`
Tracing *Tracing `yaml:"tracing"`
Logging *Logging `yaml:"log"`
Debug Debug `yaml:"debug"`
Supervised bool `yaml:"supervised"`
GRPC GRPCConfig `yaml:"grpc,omitempty"`
HTTP HTTPConfig `yaml:"http,omitempty"`
GRPC GRPCConfig `yaml:"grpc"`
HTTP HTTPConfig `yaml:"http"`
Context context.Context `yaml:"context,omitempty"`
Context context.Context `yaml:"context"`
TokenManager *TokenManager `yaml:"token_manager,omitempty"`
Reva *Reva `yaml:"reva,omitempty"`
TokenManager *TokenManager `yaml:"token_manager"`
Reva *Reva `yaml:"reva"`
SkipUserGroupsInToken bool `yaml:"skip_user_groups_in_token,omitempty"`
Driver string `yaml:"driver,omitempty" env:"STORAGE_METADATA_DRIVER" desc:"The driver which should be used by the service"`
Drivers Drivers `yaml:"drivers,omitempty"`
DataServerURL string `yaml:"data_server_url,omitempty"`
TempFolder string `yaml:"temp_folder,omitempty"`
DataProviderInsecure bool `yaml:"data_providcer_insecure,omitempty" env:"OCIS_INSECURE;STORAGE_METADATA_DATAPROVIDER_INSECURE"`
SkipUserGroupsInToken bool `yaml:"skip_user_groups_in_token"`
Driver string `yaml:"driver" env:"STORAGE_METADATA_DRIVER" desc:"The driver which should be used by the service"`
Drivers Drivers `yaml:"drivers"`
DataServerURL string `yaml:"data_server_url"`
TempFolder string `yaml:"temp_folder"`
DataProviderInsecure bool `yaml:"data_providcer_insecure" env:"OCIS_INSECURE;STORAGE_METADATA_DATAPROVIDER_INSECURE"`
}
type Tracing struct {
Enabled bool `yaml:"enabled" env:"OCIS_TRACING_ENABLED;STORAGE_METADATA_TRACING_ENABLED" desc:"Activates tracing."`

View File

@@ -9,21 +9,21 @@ import (
type Config struct {
*shared.Commons `yaml:"-"`
Service Service `yaml:"-"`
Tracing *Tracing `yaml:"tracing,omitempty"`
Logging *Logging `yaml:"log,omitempty"`
Debug Debug `yaml:"debug,omitempty"`
Supervised bool `yaml:"supervised,omitempty"`
Tracing *Tracing `yaml:"tracing"`
Logging *Logging `yaml:"log"`
Debug Debug `yaml:"debug"`
Supervised bool `yaml:"supervised"`
GRPC GRPCConfig `yaml:"grpc,omitempty"`
GRPC GRPCConfig `yaml:"grpc"`
Context context.Context `yaml:"context,omitempty"`
Context context.Context `yaml:"context"`
TokenManager *TokenManager `yaml:"token_manager,omitempty"`
Reva *Reva `yaml:"reva,omitempty"`
TokenManager *TokenManager `yaml:"token_manager"`
Reva *Reva `yaml:"reva"`
SkipUserGroupsInToken bool `yaml:"skip_user_groups_in_token,omitempty"`
AuthProvider AuthProvider `yaml:"auth_provider,omitempty"`
StorageProvider StorageProvider `yaml:"storage_provider,omitempty"`
SkipUserGroupsInToken bool `yaml:"skip_user_groups_in_token"`
AuthProvider AuthProvider `yaml:"auth_provider"`
StorageProvider StorageProvider `yaml:"storage_provider"`
}
type Tracing struct {
Enabled bool `yaml:"enabled" env:"OCIS_TRACING_ENABLED;STORAGE_METADATA_TRACING_ENABLED" desc:"Activates tracing."`

View File

@@ -9,21 +9,21 @@ import (
type Config struct {
*shared.Commons `yaml:"-"`
Service Service `yaml:"-"`
Tracing *Tracing `yaml:"tracing,omitempty"`
Logging *Logging `yaml:"log,omitempty"`
Debug Debug `yaml:"debug,omitempty"`
Supervised bool `yaml:"supervised,omitempty"`
Tracing *Tracing `yaml:"tracing"`
Logging *Logging `yaml:"log"`
Debug Debug `yaml:"debug"`
Supervised bool `yaml:"supervised"`
GRPC GRPCConfig `yaml:"grpc,omitempty"`
HTTP HTTPConfig `yaml:"http,omitempty"`
GRPC GRPCConfig `yaml:"grpc"`
HTTP HTTPConfig `yaml:"http"`
TokenManager *TokenManager `yaml:"token_manager,omitempty"`
Reva *Reva `yaml:"reva,omitempty"`
TokenManager *TokenManager `yaml:"token_manager"`
Reva *Reva `yaml:"reva"`
Context context.Context `yaml:"context,omitempty"`
SkipUserGroupsInToken bool `yaml:"skip_user_groups_in_token,omitempty"`
ReadOnly bool `yaml:"readonly,omitempty"`
SharesProviderEndpoint string `yaml:"shares_provider_endpoint,omitempty"`
Context context.Context `yaml:"context"`
SkipUserGroupsInToken bool `yaml:"skip_user_groups_in_token"`
ReadOnly bool `yaml:"readonly"`
SharesProviderEndpoint string `yaml:"shares_provider_endpoint"`
}
type Tracing struct {
Enabled bool `yaml:"enabled" env:"OCIS_TRACING_ENABLED;STORAGE_METADATA_TRACING_ENABLED" desc:"Activates tracing."`

View File

@@ -9,29 +9,29 @@ import (
type Config struct {
*shared.Commons `yaml:"-"`
Service Service `yaml:"-"`
Tracing *Tracing `yaml:"tracing,omitempty"`
Logging *Logging `yaml:"log,omitempty"`
Debug Debug `yaml:"debug,omitempty"`
Supervised bool `yaml:"supervised,omitempty"`
Tracing *Tracing `yaml:"tracing"`
Logging *Logging `yaml:"log"`
Debug Debug `yaml:"debug"`
Supervised bool `yaml:"supervised"`
GRPC GRPCConfig `yaml:"grpc,omitempty"`
HTTP HTTPConfig `yaml:"http,omitempty"`
GRPC GRPCConfig `yaml:"grpc"`
HTTP HTTPConfig `yaml:"http"`
TokenManager *TokenManager `yaml:"token_manager,omitempty"`
Reva *Reva `yaml:"reva,omitempty"`
TokenManager *TokenManager `yaml:"token_manager"`
Reva *Reva `yaml:"reva"`
Context context.Context `yaml:"context,omitempty"`
Context context.Context `yaml:"context"`
SkipUserGroupsInToken bool `yaml:"skip_user_groups_in_token,omitempty"`
Driver string `yaml:"driver,omitempty" env:"STORAGE_USERS_DRIVER" desc:"The storage driver which should be used by the service"`
Drivers Drivers `yaml:"drivers,omitempty"`
DataServerURL string `yaml:"data_server_url,omitempty"`
TempFolder string `yaml:"temp_folder,omitempty"`
DataProviderInsecure bool `yaml:"data_provider_insecure,omitempty" env:"OCIS_INSECURE;STORAGE_USERS_DATAPROVIDER_INSECURE"`
Events Events `yaml:"events,omitempty"`
MountID string `yaml:"mount_id,omitempty"`
ExposeDataServer bool `yaml:"expose_data_server,omitempty"`
ReadOnly bool `yaml:"readonly,omitempty"`
SkipUserGroupsInToken bool `yaml:"skip_user_groups_in_token"`
Driver string `yaml:"driver" env:"STORAGE_USERS_DRIVER" desc:"The storage driver which should be used by the service"`
Drivers Drivers `yaml:"drivers"`
DataServerURL string `yaml:"data_server_url"`
TempFolder string `yaml:"temp_folder"`
DataProviderInsecure bool `yaml:"data_provider_insecure" env:"OCIS_INSECURE;STORAGE_USERS_DATAPROVIDER_INSECURE"`
Events Events `yaml:"events"`
MountID string `yaml:"mount_id"`
ExposeDataServer bool `yaml:"expose_data_server"`
ReadOnly bool `yaml:"readonly"`
}
type Tracing struct {
Enabled bool `yaml:"enabled" env:"OCIS_TRACING_ENABLED;STORAGE_USERS_TRACING_ENABLED" desc:"Activates tracing."`

View File

@@ -8,123 +8,123 @@ import (
// Log defines the available logging configuration.
type Log struct {
Level string `yaml:"level,omitempty"`
Pretty bool `yaml:"pretty,omitempty"`
Color bool `yaml:"color,omitempty"`
File string `yaml:"file,omitempty"`
Level string `yaml:"level"`
Pretty bool `yaml:"pretty"`
Color bool `yaml:"color"`
File string `yaml:"file"`
}
// Debug defines the available debug configuration.
type Debug struct {
Addr string `yaml:"addr,omitempty"`
Token string `yaml:"token,omitempty"`
Pprof bool `yaml:"pprof,omitempty"`
Zpages bool `yaml:"zpages,omitempty"`
Addr string `yaml:"addr"`
Token string `yaml:"token"`
Pprof bool `yaml:"pprof"`
Zpages bool `yaml:"zpages"`
}
// Gateway defines the available gateway configuration.
type Gateway struct {
Port
CommitShareToStorageGrant bool `yaml:"commit_share_to_storage_grant,omitempty"`
CommitShareToStorageRef bool `yaml:"commit_share_to_storage_ref,omitempty"`
DisableHomeCreationOnLogin bool `yaml:"disable_home_creation_on_login,omitempty"`
ShareFolder string `yaml:"share_folder,omitempty"`
LinkGrants string `yaml:"link_grants,omitempty"`
HomeMapping string `yaml:"home_mapping,omitempty"`
EtagCacheTTL int `yaml:"etag_cache_ttl,omitempty"`
CommitShareToStorageGrant bool `yaml:"commit_share_to_storage_grant"`
CommitShareToStorageRef bool `yaml:"commit_share_to_storage_ref"`
DisableHomeCreationOnLogin bool `yaml:"disable_home_creation_on_login"`
ShareFolder string `yaml:"share_folder"`
LinkGrants string `yaml:"link_grants"`
HomeMapping string `yaml:"home_mapping"`
EtagCacheTTL int `yaml:"etag_cache_ttl"`
}
// StorageRegistry defines the available storage registry configuration
type StorageRegistry struct {
Driver string `yaml:"driver,omitempty"`
Driver string `yaml:"driver"`
// HomeProvider is the path in the global namespace that the static storage registry uses to determine the home storage
HomeProvider string `yaml:"home_provider,omitempty"`
Rules []string `yaml:"rules,omitempty"`
JSON string `yaml:"json,omitempty"`
HomeProvider string `yaml:"home_provider"`
Rules []string `yaml:"rules"`
JSON string `yaml:"json"`
}
// AppRegistry defines the available app registry configuration
type AppRegistry struct {
Driver string `yaml:"driver,omitempty"`
MimetypesJSON string `yaml:"mime_types_json,omitempty"`
Driver string `yaml:"driver"`
MimetypesJSON string `yaml:"mime_types_json"`
}
// AppProvider defines the available app provider configuration
type AppProvider struct {
Port
ExternalAddr string `yaml:"external_addr,omitempty"`
Driver string `yaml:"driver,omitempty"`
WopiDriver WopiDriver `yaml:"wopi_driver,omitempty"`
AppsURL string `yaml:"apps_url,omitempty"`
OpenURL string `yaml:"open_url,omitempty"`
NewURL string `yaml:"new_url,omitempty"`
ExternalAddr string `yaml:"external_addr"`
Driver string `yaml:"driver"`
WopiDriver WopiDriver `yaml:"wopi_driver"`
AppsURL string `yaml:"apps_url"`
OpenURL string `yaml:"open_url"`
NewURL string `yaml:"new_url"`
}
type WopiDriver struct {
AppAPIKey string `yaml:"app_api_key,omitempty"`
AppDesktopOnly bool `yaml:"app_desktop_only,omitempty"`
AppIconURI string `yaml:"app_icon_uri,omitempty"`
AppInternalURL string `yaml:"app_internal_url,omitempty"`
AppName string `yaml:"app_name,omitempty"`
AppURL string `yaml:"app_url,omitempty"`
Insecure bool `yaml:"insecure,omitempty"`
IopSecret string `yaml:"ipo_secret,omitempty"`
JWTSecret string `yaml:"jwt_secret,omitempty"`
WopiURL string `yaml:"wopi_url,omitempty"`
AppAPIKey string `yaml:"app_api_key"`
AppDesktopOnly bool `yaml:"app_desktop_only"`
AppIconURI string `yaml:"app_icon_uri"`
AppInternalURL string `yaml:"app_internal_url"`
AppName string `yaml:"app_name"`
AppURL string `yaml:"app_url"`
Insecure bool `yaml:"insecure"`
IopSecret string `yaml:"ipo_secret"`
JWTSecret string `yaml:"jwt_secret"`
WopiURL string `yaml:"wopi_url"`
}
// Sharing defines the available sharing configuration.
type Sharing struct {
Port
UserDriver string `yaml:"user_driver,omitempty"`
UserJSONFile string `yaml:"user_json_file,omitempty"`
CS3ProviderAddr string `yaml:"provider_addr,omitempty"`
CS3ServiceUser string `yaml:"service_user_id,omitempty"`
CS3ServiceUserIdp string `yaml:"service_user_idp,omitempty"`
UserSQLUsername string `yaml:"user_sql_username,omitempty"`
UserSQLPassword string `yaml:"user_sql_password,omitempty"`
UserSQLHost string `yaml:"user_sql_host,omitempty"`
UserSQLPort int `yaml:"user_sql_port,omitempty"`
UserSQLName string `yaml:"user_sql_name,omitempty"`
PublicDriver string `yaml:"public_driver,omitempty"`
PublicJSONFile string `yaml:"public_json_file,omitempty"`
PublicPasswordHashCost int `yaml:"public_password_hash_cost,omitempty"`
PublicEnableExpiredSharesCleanup bool `yaml:"public_enable_expired_shares_cleanup,omitempty"`
PublicJanitorRunInterval int `yaml:"public_janitor_run_interval,omitempty"`
UserStorageMountID string `yaml:"user_storage_mount_id,omitempty"`
Events Events `yaml:"events,omitempty"`
UserDriver string `yaml:"user_driver"`
UserJSONFile string `yaml:"user_json_file"`
CS3ProviderAddr string `yaml:"provider_addr"`
CS3ServiceUser string `yaml:"service_user_id"`
CS3ServiceUserIdp string `yaml:"service_user_idp"`
UserSQLUsername string `yaml:"user_sql_username"`
UserSQLPassword string `yaml:"user_sql_password"`
UserSQLHost string `yaml:"user_sql_host"`
UserSQLPort int `yaml:"user_sql_port"`
UserSQLName string `yaml:"user_sql_name"`
PublicDriver string `yaml:"public_driver"`
PublicJSONFile string `yaml:"public_json_file"`
PublicPasswordHashCost int `yaml:"public_password_hash_cost"`
PublicEnableExpiredSharesCleanup bool `yaml:"public_enable_expired_shares_cleanup"`
PublicJanitorRunInterval int `yaml:"public_janitor_run_interval"`
UserStorageMountID string `yaml:"user_storage_mount_id"`
Events Events `yaml:"events"`
}
type Events struct {
Address string `yaml:"address,omitempty"`
ClusterID string `yaml:"cluster_id,omitempty"`
Address string `yaml:"address"`
ClusterID string `yaml:"cluster_id"`
}
// Port defines the available port configuration.
type Port struct {
// MaxCPUs can be a number or a percentage
MaxCPUs string `yaml:"max_cpus,omitempty"`
LogLevel string `yaml:"log_level,omitempty"`
MaxCPUs string `yaml:"max_cpus"`
LogLevel string `yaml:"log_level"`
// GRPCNetwork can be tcp, udp or unix
GRPCNetwork string `yaml:"grpc_network,omitempty"`
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 string `yaml:"grpc_addr,omitempty"`
GRPCAddr string `yaml:"grpc_addr"`
// Protocol can be grpc or http
// HTTPNetwork can be tcp, udp or unix
HTTPNetwork string `yaml:"http_network,omitempty"`
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 string `yaml:"http_addr,omitempty"`
HTTPAddr string `yaml:"http_addr"`
// Protocol can be grpc or http
Protocol string `yaml:"protocol,omitempty"`
Protocol string `yaml:"protocol"`
// Endpoint is used by the gateway and registries (eg localhost:9100 or cloud.example.com)
Endpoint string `yaml:"endpoint,omitempty"`
Endpoint string `yaml:"endpoint"`
// DebugAddr for the debug endpoint to bind to
DebugAddr string `yaml:"debug_addr,omitempty"`
DebugAddr string `yaml:"debug_addr"`
// Services can be used to give a list of services that should be started on this port
Services []string `yaml:"services,omitempty"`
Services []string `yaml:"services"`
// Config can be used to configure the reva instance.
// Services and Protocol will be ignored if this is used
Config map[string]interface{} `yaml:"config,omitempty"`
Config map[string]interface{} `yaml:"config"`
// Context allows for context cancellation and propagation
Context context.Context
@@ -136,118 +136,118 @@ type Port struct {
// Users defines the available users configuration.
type Users struct {
Port
Driver string `yaml:"driver,omitempty"`
JSON string `yaml:"json,omitempty"`
UserGroupsCacheExpiration int `yaml:"user_groups_cache_expiration,omitempty"`
Driver string `yaml:"driver"`
JSON string `yaml:"json"`
UserGroupsCacheExpiration int `yaml:"user_groups_cache_expiration"`
}
// AuthMachineConfig defines the available configuration for the machine auth driver.
type AuthMachineConfig struct {
MachineAuthAPIKey string `yaml:"machine_auth_api_key,omitempty"`
MachineAuthAPIKey string `yaml:"machine_auth_api_key"`
}
// Groups defines the available groups configuration.
type Groups struct {
Port
Driver string `yaml:"driver,omitempty"`
JSON string `yaml:"json,omitempty"`
GroupMembersCacheExpiration int `yaml:"group_members_cache_expiration,omitempty"`
Driver string `yaml:"driver"`
JSON string `yaml:"json"`
GroupMembersCacheExpiration int `yaml:"group_members_cache_expiration"`
}
// FrontendPort defines the available frontend configuration.
type FrontendPort struct {
Port
AppProviderInsecure bool `yaml:"app_provider_insecure,omitempty"`
AppProviderPrefix string `yaml:"app_provider_prefix,omitempty"`
ArchiverInsecure bool `yaml:"archiver_insecure,omitempty"`
ArchiverPrefix string `yaml:"archiver_prefix,omitempty"`
DatagatewayPrefix string `yaml:"data_gateway_prefix,omitempty"`
Favorites bool `yaml:"favorites,omitempty"`
ProjectSpaces bool `yaml:"project_spaces,omitempty"`
OCSPrefix string `yaml:"ocs_prefix,omitempty"`
OCSSharePrefix string `yaml:"ocs_share_prefix,omitempty"`
OCSHomeNamespace string `yaml:"ocs_home_namespace,omitempty"`
PublicURL string `yaml:"public_url,omitempty"`
OCSCacheWarmupDriver string `yaml:"ocs_cache_warmup_driver,omitempty"`
OCSAdditionalInfoAttribute string `yaml:"ocs_additional_info_attribute,omitempty"`
OCSResourceInfoCacheTTL int `yaml:"ocs_resource_info_cache_ttl,omitempty"`
Middleware Middleware `yaml:"middleware,omitempty"`
AppProviderInsecure bool `yaml:"app_provider_insecure"`
AppProviderPrefix string `yaml:"app_provider_prefix"`
ArchiverInsecure bool `yaml:"archiver_insecure"`
ArchiverPrefix string `yaml:"archiver_prefix"`
DatagatewayPrefix string `yaml:"data_gateway_prefix"`
Favorites bool `yaml:"favorites"`
ProjectSpaces bool `yaml:"project_spaces"`
OCSPrefix string `yaml:"ocs_prefix"`
OCSSharePrefix string `yaml:"ocs_share_prefix"`
OCSHomeNamespace string `yaml:"ocs_home_namespace"`
PublicURL string `yaml:"public_url"`
OCSCacheWarmupDriver string `yaml:"ocs_cache_warmup_driver"`
OCSAdditionalInfoAttribute string `yaml:"ocs_additional_info_attribute"`
OCSResourceInfoCacheTTL int `yaml:"ocs_resource_info_cache_ttl"`
Middleware Middleware `yaml:"middleware"`
}
// Middleware configures reva middlewares.
type Middleware struct {
Auth Auth `yaml:"auth,omitempty"`
Auth Auth `yaml:"auth"`
}
// Auth configures reva http auth middleware.
type Auth struct {
CredentialsByUserAgent map[string]string `yaml:"credentials_by_user_agenr,omitempty"`
CredentialsByUserAgent map[string]string `yaml:"credentials_by_user_agenr"`
}
// DataGatewayPort has a public url
type DataGatewayPort struct {
Port
PublicURL string `yaml:",omitempty"`
PublicURL string `yaml:""`
}
type DataProvider struct {
Insecure bool `yaml:"insecure,omitempty"`
Insecure bool `yaml:"insecure"`
}
// StoragePort defines the available storage configuration.
type StoragePort struct {
Port
Driver string `yaml:"driver,omitempty"`
MountID string `yaml:"mount_id,omitempty"`
AlternativeID string `yaml:"alternative_id,omitempty"`
ExposeDataServer bool `yaml:"expose_data_server,omitempty"`
Driver string `yaml:"driver"`
MountID string `yaml:"mount_id"`
AlternativeID string `yaml:"alternative_id"`
ExposeDataServer bool `yaml:"expose_data_server"`
// url the data gateway will use to route requests
DataServerURL string `yaml:"data_server_url,omitempty"`
DataServerURL string `yaml:"data_server_url"`
// for HTTP ports with only one http service
HTTPPrefix string `yaml:"http_prefix,omitempty"`
TempFolder string `yaml:"temp_folder,omitempty"`
ReadOnly bool `yaml:"read_only,omitempty"`
DataProvider DataProvider `yaml:"data_provider,omitempty"`
GatewayEndpoint string `yaml:"gateway_endpoint,omitempty"`
HTTPPrefix string `yaml:"http_prefix"`
TempFolder string `yaml:"temp_folder"`
ReadOnly bool `yaml:"read_only"`
DataProvider DataProvider `yaml:"data_provider"`
GatewayEndpoint string `yaml:"gateway_endpoint"`
}
// PublicStorage configures a public storage provider
type PublicStorage struct {
StoragePort
PublicShareProviderAddr string `yaml:"public_share_provider_addr,omitempty"`
UserProviderAddr string `yaml:"user_provider_addr,omitempty"`
PublicShareProviderAddr string `yaml:"public_share_provider_addr"`
UserProviderAddr string `yaml:"user_provider_addr"`
}
// StorageConfig combines all available storage driver configuration parts.
type StorageConfig struct {
EOS DriverEOS `yaml:"eos,omitempty"`
Local DriverCommon `yaml:"local,omitempty"`
OwnCloudSQL DriverOwnCloudSQL `yaml:"owncloud_sql,omitempty"`
S3 DriverS3 `yaml:"s3,omitempty"`
S3NG DriverS3NG `yaml:"s3ng,omitempty"`
OCIS DriverOCIS `yaml:"ocis,omitempty"`
EOS DriverEOS `yaml:"eos"`
Local DriverCommon `yaml:"local"`
OwnCloudSQL DriverOwnCloudSQL `yaml:"owncloud_sql"`
S3 DriverS3 `yaml:"s3"`
S3NG DriverS3NG `yaml:"s3ng"`
OCIS DriverOCIS `yaml:"ocis"`
}
// DriverCommon defines common driver configuration options.
type DriverCommon struct {
// Root is the absolute path to the location of the data
Root string `yaml:"root,omitempty"`
Root string `yaml:"root"`
//ShareFolder defines the name of the folder jailing all shares
ShareFolder string `yaml:"share_folder,omitempty"`
ShareFolder string `yaml:"share_folder"`
// UserLayout contains the template used to construct
// the internal path, eg: `{{substr 0 1 .Username}}/{{.Username}}`
UserLayout string `yaml:"user_layout,omitempty"`
UserLayout string `yaml:"user_layout"`
// EnableHome enables the creation of home directories.
EnableHome bool `yaml:"enable_home,omitempty"`
EnableHome bool `yaml:"enable_home"`
// PersonalSpaceAliasTemplate contains the template used to construct
// the personal space alias, eg: `"{{.SpaceType}}/{{.User.Username | lower}},omitempty"`
PersonalSpaceAliasTemplate string `yaml:"personalspacealias_template,omitempty"`
// the personal space alias, eg: `"{{.SpaceType}}/{{.User.Username | lower}}"`
PersonalSpaceAliasTemplate string `yaml:"personalspacealias_template"`
// GeneralSpaceAliasTemplate contains the template used to construct
// the general space alias, eg: `{{.SpaceType}}/{{.SpaceName | replace " " "-" | lower}}`
GeneralSpaceAliasTemplate string `yaml:"generalspacealias_template,omitempty"`
GeneralSpaceAliasTemplate string `yaml:"generalspacealias_template"`
}
// DriverEOS defines the available EOS driver configuration.
@@ -255,60 +255,60 @@ type DriverEOS struct {
DriverCommon
// ShadowNamespace for storing shadow data
ShadowNamespace string `yaml:"shadow_namespace,omitempty"`
ShadowNamespace string `yaml:"shadow_namespace"`
// UploadsNamespace for storing upload data
UploadsNamespace string `yaml:"uploads_namespace,omitempty"`
UploadsNamespace string `yaml:"uploads_namespace"`
// Location of the eos binary.
// Default is /usr/bin/eos.
EosBinary string `yaml:"eos_binary,omitempty"`
EosBinary string `yaml:"eos_binary"`
// Location of the xrdcopy binary.
// Default is /usr/bin/xrdcopy.
XrdcopyBinary string `yaml:"xrd_copy_binary,omitempty"`
XrdcopyBinary string `yaml:"xrd_copy_binary"`
// URL of the Master EOS MGM.
// Default is root://eos-example.org
MasterURL string `yaml:"master_url,omitempty"`
MasterURL string `yaml:"master_url"`
// URI of the EOS MGM grpc server
// Default is empty
GrpcURI string `yaml:"grpc_uri,omitempty"`
GrpcURI string `yaml:"grpc_uri"`
// URL of the Slave EOS MGM.
// Default is root://eos-example.org
SlaveURL string `yaml:"slave_url,omitempty"`
SlaveURL string `yaml:"slave_url"`
// Location on the local fs where to store reads.
// Defaults to os.TempDir()
CacheDirectory string `yaml:"cache_directory,omitempty"`
CacheDirectory string `yaml:"cache_directory"`
// Enables logging of the commands executed
// Defaults to false
EnableLogging bool `yaml:"enable_logging,omitempty"`
EnableLogging bool `yaml:"enable_logging"`
// ShowHiddenSysFiles shows internal EOS files like
// .sys.v# and .sys.a# files.
ShowHiddenSysFiles bool `yaml:"shadow_hidden_files,omitempty"`
ShowHiddenSysFiles bool `yaml:"shadow_hidden_files"`
// ForceSingleUserMode will force connections to EOS to use SingleUsername
ForceSingleUserMode bool `yaml:"force_single_user_mode,omitempty"`
ForceSingleUserMode bool `yaml:"force_single_user_mode"`
// UseKeyTabAuth changes will authenticate requests by using an EOS keytab.
UseKeytab bool `yaml:"user_keytab,omitempty"`
UseKeytab bool `yaml:"user_keytab"`
// SecProtocol specifies the xrootd security protocol to use between the server and EOS.
SecProtocol string `yaml:"sec_protocol,omitempty"`
SecProtocol string `yaml:"sec_protocol"`
// Keytab specifies the location of the keytab to use to authenticate to EOS.
Keytab string `yaml:"keytab,omitempty"`
Keytab string `yaml:"keytab"`
// SingleUsername is the username to use when SingleUserMode is enabled
SingleUsername string `yaml:"single_username,omitempty"`
SingleUsername string `yaml:"single_username"`
// gateway service to use for uid lookups
GatewaySVC string `yaml:"gateway_svc,omitempty"`
GatewaySVC string `yaml:"gateway_svc"`
}
// DriverOCIS defines the available oCIS storage driver configuration.
@@ -320,217 +320,217 @@ type DriverOCIS struct {
type DriverOwnCloudSQL struct {
DriverCommon
UploadInfoDir string `yaml:"upload_info_dir,omitempty"`
DBUsername string `yaml:"db_username,omitempty"`
DBPassword string `yaml:"db_password,omitempty"`
DBHost string `yaml:"db_host,omitempty"`
DBPort int `yaml:"db_port,omitempty"`
DBName string `yaml:"db_name,omitempty"`
UploadInfoDir string `yaml:"upload_info_dir"`
DBUsername string `yaml:"db_username"`
DBPassword string `yaml:"db_password"`
DBHost string `yaml:"db_host"`
DBPort int `yaml:"db_port"`
DBName string `yaml:"db_name"`
}
// DriverS3 defines the available S3 storage driver configuration.
type DriverS3 struct {
DriverCommon
Region string `yaml:"region,omitempty"`
AccessKey string `yaml:"access_key,omitempty"`
SecretKey string `yaml:"secret_key,omitempty"`
Endpoint string `yaml:"endpoint,omitempty"`
Bucket string `yaml:"bucket,omitempty"`
Region string `yaml:"region"`
AccessKey string `yaml:"access_key"`
SecretKey string `yaml:"secret_key"`
Endpoint string `yaml:"endpoint"`
Bucket string `yaml:"bucket"`
}
// DriverS3NG defines the available s3ng storage driver configuration.
type DriverS3NG struct {
DriverCommon
Region string `yaml:"region,omitempty"`
AccessKey string `yaml:"access_key,omitempty"`
SecretKey string `yaml:"secret_key,omitempty"`
Endpoint string `yaml:"endpoint,omitempty"`
Bucket string `yaml:"bucket,omitempty"`
Region string `yaml:"region"`
AccessKey string `yaml:"access_key"`
SecretKey string `yaml:"secret_key"`
Endpoint string `yaml:"endpoint"`
Bucket string `yaml:"bucket"`
}
// OIDC defines the available OpenID Connect configuration.
type OIDC struct {
Issuer string `yaml:"issuer,omitempty"`
Insecure bool `yaml:"insecure,omitempty"`
IDClaim string `yaml:"id_claim,omitempty"`
UIDClaim string `yaml:"uid_claim,omitempty"`
GIDClaim string `yaml:"gid_claim,omitempty"`
Issuer string `yaml:"issuer"`
Insecure bool `yaml:"insecure"`
IDClaim string `yaml:"id_claim"`
UIDClaim string `yaml:"uid_claim"`
GIDClaim string `yaml:"gid_claim"`
}
// LDAP defines the available ldap configuration.
type LDAP struct {
URI string `yaml:"uri,omitempty"`
CACert string `yaml:"ca_cert,omitempty"`
Insecure bool `yaml:"insecure,omitempty"`
UserBaseDN string `yaml:"user_base_dn,omitempty"`
GroupBaseDN string `yaml:"group_base_dn,omitempty"`
UserScope string `yaml:"user_scope,omitempty"`
GroupScope string `yaml:"group_scope,omitempty"`
UserObjectClass string `yaml:"user_objectclass,omitempty"`
GroupObjectClass string `yaml:"group_objectclass,omitempty"`
UserFilter string `yaml:"user_filter,omitempty"`
GroupFilter string `yaml:"group_filter,omitempty"`
LoginAttributes []string `yaml:"login_attributes,omitempty"`
BindDN string `yaml:"bind_dn,omitempty"`
BindPassword string `yaml:"bind_password,omitempty"`
IDP string `yaml:"idp,omitempty"`
UserSchema LDAPUserSchema `yaml:"user_schema,omitempty"`
GroupSchema LDAPGroupSchema `yaml:"group_schema,omitempty"`
URI string `yaml:"uri"`
CACert string `yaml:"ca_cert"`
Insecure bool `yaml:"insecure"`
UserBaseDN string `yaml:"user_base_dn"`
GroupBaseDN string `yaml:"group_base_dn"`
UserScope string `yaml:"user_scope"`
GroupScope string `yaml:"group_scope"`
UserObjectClass string `yaml:"user_objectclass"`
GroupObjectClass string `yaml:"group_objectclass"`
UserFilter string `yaml:"user_filter"`
GroupFilter string `yaml:"group_filter"`
LoginAttributes []string `yaml:"login_attributes"`
BindDN string `yaml:"bind_dn"`
BindPassword string `yaml:"bind_password"`
IDP string `yaml:"idp"`
UserSchema LDAPUserSchema `yaml:"user_schema"`
GroupSchema LDAPGroupSchema `yaml:"group_schema"`
}
// UserGroupRest defines the REST driver specification for user and group resolution.
type UserGroupRest struct {
ClientID string `yaml:"client_id,omitempty"`
ClientSecret string `yaml:"client_secret,omitempty"`
RedisAddress string `yaml:"redis_address,omitempty"`
RedisUsername string `yaml:"redis_username,omitempty"`
RedisPassword string `yaml:"redis_password,omitempty"`
IDProvider string `yaml:"idp_provider,omitempty"`
APIBaseURL string `yaml:"api_base_url,omitempty"`
OIDCTokenEndpoint string `yaml:"oidc_token_endpoint,omitempty"`
TargetAPI string `yaml:"target_api,omitempty"`
ClientID string `yaml:"client_id"`
ClientSecret string `yaml:"client_secret"`
RedisAddress string `yaml:"redis_address"`
RedisUsername string `yaml:"redis_username"`
RedisPassword string `yaml:"redis_password"`
IDProvider string `yaml:"idp_provider"`
APIBaseURL string `yaml:"api_base_url"`
OIDCTokenEndpoint string `yaml:"oidc_token_endpoint"`
TargetAPI string `yaml:"target_api"`
}
// UserOwnCloudSQL defines the available ownCloudSQL user provider configuration.
type UserOwnCloudSQL struct {
DBUsername string `yaml:"db_username,omitempty"`
DBPassword string `yaml:"db_password,omitempty"`
DBHost string `yaml:"db_host,omitempty"`
DBPort int `yaml:"db_port,omitempty"`
DBName string `yaml:"db_name,omitempty"`
Idp string `yaml:"idp,omitempty"`
Nobody int64 `yaml:"nobody,omitempty"`
JoinUsername bool `yaml:"join_username,omitempty"`
JoinOwnCloudUUID bool `yaml:"join_owncloud_uuid,omitempty"`
EnableMedialSearch bool `yaml:"enable_medial_search,omitempty"`
DBUsername string `yaml:"db_username"`
DBPassword string `yaml:"db_password"`
DBHost string `yaml:"db_host"`
DBPort int `yaml:"db_port"`
DBName string `yaml:"db_name"`
Idp string `yaml:"idp"`
Nobody int64 `yaml:"nobody"`
JoinUsername bool `yaml:"join_username"`
JoinOwnCloudUUID bool `yaml:"join_owncloud_uuid"`
EnableMedialSearch bool `yaml:"enable_medial_search"`
}
// LDAPUserSchema defines the available ldap user schema configuration.
type LDAPUserSchema struct {
ID string `yaml:"id,omitempty"`
IDIsOctetString bool `yaml:"id_is_octet_string,omitempty"`
Mail string `yaml:"mail,omitempty"`
DisplayName string `yaml:"display_name,omitempty"`
Username string `yaml:"user_name,omitempty"`
UIDNumber string `yaml:"uid_number,omitempty"`
GIDNumber string `yaml:"gid_number,omitempty"`
ID string `yaml:"id"`
IDIsOctetString bool `yaml:"id_is_octet_string"`
Mail string `yaml:"mail"`
DisplayName string `yaml:"display_name"`
Username string `yaml:"user_name"`
UIDNumber string `yaml:"uid_number"`
GIDNumber string `yaml:"gid_number"`
}
// LDAPGroupSchema defines the available ldap group schema configuration.
type LDAPGroupSchema struct {
ID string `yaml:"id,omitempty"`
IDIsOctetString bool `yaml:"id_is_octet_string,omitempty"`
Mail string `yaml:"mail,omitempty"`
DisplayName string `yaml:"display_name,omitempty"`
Groupname string `yaml:"group_name,omitempty"`
Member string `yaml:"member,omitempty"`
GIDNumber string `yaml:"gid_number,omitempty"`
ID string `yaml:"id"`
IDIsOctetString bool `yaml:"id_is_octet_string"`
Mail string `yaml:"mail"`
DisplayName string `yaml:"display_name"`
Groupname string `yaml:"group_name"`
Member string `yaml:"member"`
GIDNumber string `yaml:"gid_number"`
}
// OCDav defines the available ocdav configuration.
type OCDav struct {
// Addr to listen to with the http server for the ocdav service
Addr string `yaml:"addr,omitempty"`
Prefix string `yaml:"prefix,omitempty"`
WebdavNamespace string `yaml:"webdav_namespace,omitempty"`
FilesNamespace string `yaml:"files_namespace,omitempty"`
SharesNamespace string `yaml:"shares_namespace,omitempty"`
Addr string `yaml:"addr"`
Prefix string `yaml:"prefix"`
WebdavNamespace string `yaml:"webdav_namespace"`
FilesNamespace string `yaml:"files_namespace"`
SharesNamespace string `yaml:"shares_namespace"`
// PublicURL used to redirect /s/{token} URLs to
PublicURL string `yaml:"public_url,omitempty"`
PublicURL string `yaml:"public_url"`
// Addr to listen to with the debug http server
DebugAddr string `yaml:"debug_addr,omitempty"`
DebugAddr string `yaml:"debug_addr"`
// GatewaySVC to forward CS3 requests to TODO use registry
GatewaySVC string `yaml:"gateway_svc,omitempty"`
GatewaySVC string `yaml:"gateway_svc"`
// JWTSecret used to verify reva access token
JWTSecret string `yaml:"jwt_secret,omitempty"`
JWTSecret string `yaml:"jwt_secret"`
// Insecure certificates allowed when making requests to the gateway
Insecure bool `yaml:"insecure,omitempty"`
Insecure bool `yaml:"insecure"`
// Timeout in seconds when making requests to the gateway
Timeout int64 `yaml:"timeout,omitempty"`
Timeout int64 `yaml:"timeout"`
}
// Archiver defines the available archiver configuration.
type Archiver struct {
MaxNumFiles int64 `yaml:"max_num_files,omitempty"`
MaxSize int64 `yaml:"max_size,omitempty"`
ArchiverURL string `yaml:"archiver_url,omitempty"`
MaxNumFiles int64 `yaml:"max_num_files"`
MaxSize int64 `yaml:"max_size"`
ArchiverURL string `yaml:"archiver_url"`
}
// Reva defines the available reva configuration.
type Reva struct {
// JWTSecret used to sign jwt tokens between services
JWTSecret string `yaml:"jwt_secret,omitempty"`
SkipUserGroupsInToken bool `yaml:"skip_user_grooups_in_token,omitempty"`
TransferSecret string `yaml:"transfer_secret,omitempty"`
TransferExpires int `yaml:"transfer_expires,omitempty"`
OIDC OIDC `yaml:"oidc,omitempty"`
LDAP LDAP `yaml:"ldap,omitempty"`
UserGroupRest UserGroupRest `yaml:"user_group_rest,omitempty"`
UserOwnCloudSQL UserOwnCloudSQL `yaml:"user_owncloud_sql,omitempty"`
Archiver Archiver `yaml:"archiver,omitempty"`
UserStorage StorageConfig `yaml:"user_storage,omitempty"`
MetadataStorage StorageConfig `yaml:"metadata_storage,omitempty"`
JWTSecret string `yaml:"jwt_secret"`
SkipUserGroupsInToken bool `yaml:"skip_user_grooups_in_token"`
TransferSecret string `yaml:"transfer_secret"`
TransferExpires int `yaml:"transfer_expires"`
OIDC OIDC `yaml:"oidc"`
LDAP LDAP `yaml:"ldap"`
UserGroupRest UserGroupRest `yaml:"user_group_rest"`
UserOwnCloudSQL UserOwnCloudSQL `yaml:"user_owncloud_sql"`
Archiver Archiver `yaml:"archiver"`
UserStorage StorageConfig `yaml:"user_storage"`
MetadataStorage StorageConfig `yaml:"metadata_storage"`
// Ports are used to configure which services to start on which port
Frontend FrontendPort `yaml:"frontend,omitempty"`
DataGateway DataGatewayPort `yaml:"data_gateway,omitempty"`
Gateway Gateway `yaml:"gateway,omitempty"`
StorageRegistry StorageRegistry `yaml:"storage_registry,omitempty"`
AppRegistry AppRegistry `yaml:"app_registry,omitempty"`
Users Users `yaml:"users,omitempty"`
Groups Groups `yaml:"groups,omitempty"`
AuthProvider Users `yaml:"auth_provider,omitempty"`
AuthBasic Port `yaml:"auth_basic,omitempty"`
AuthBearer Port `yaml:"auth_bearer,omitempty"`
AuthMachine Port `yaml:"auth_machine,omitempty"`
AuthMachineConfig AuthMachineConfig `yaml:"auth_machine_config,omitempty"`
Sharing Sharing `yaml:"sharing,omitempty"`
StorageShares StoragePort `yaml:"storage_shares,omitempty"`
StorageUsers StoragePort `yaml:"storage_users,omitempty"`
StoragePublicLink PublicStorage `yaml:"storage_public_link,omitempty"`
StorageMetadata StoragePort `yaml:"storage_metadata,omitempty"`
AppProvider AppProvider `yaml:"app_provider,omitempty"`
Permissions Port `yaml:"permissions,omitempty"`
Frontend FrontendPort `yaml:"frontend"`
DataGateway DataGatewayPort `yaml:"data_gateway"`
Gateway Gateway `yaml:"gateway"`
StorageRegistry StorageRegistry `yaml:"storage_registry"`
AppRegistry AppRegistry `yaml:"app_registry"`
Users Users `yaml:"users"`
Groups Groups `yaml:"groups"`
AuthProvider Users `yaml:"auth_provider"`
AuthBasic Port `yaml:"auth_basic"`
AuthBearer Port `yaml:"auth_bearer"`
AuthMachine Port `yaml:"auth_machine"`
AuthMachineConfig AuthMachineConfig `yaml:"auth_machine_config"`
Sharing Sharing `yaml:"sharing"`
StorageShares StoragePort `yaml:"storage_shares"`
StorageUsers StoragePort `yaml:"storage_users"`
StoragePublicLink PublicStorage `yaml:"storage_public_link"`
StorageMetadata StoragePort `yaml:"storage_metadata"`
AppProvider AppProvider `yaml:"app_provider"`
Permissions Port `yaml:"permissions"`
// Configs can be used to configure the reva instance.
// Services and Ports will be ignored if this is used
Configs map[string]interface{} `yaml:"configs,omitempty"`
Configs map[string]interface{} `yaml:"configs"`
// chunking and resumable upload config (TUS)
UploadMaxChunkSize int `yaml:"upload_max_chunk_size,omitempty"`
UploadHTTPMethodOverride string `yaml:"upload_http_method_override,omitempty"`
UploadMaxChunkSize int `yaml:"upload_max_chunk_size"`
UploadHTTPMethodOverride string `yaml:"upload_http_method_override"`
// checksumming capabilities
ChecksumSupportedTypes []string `yaml:"checksum_supported_types,omitempty"`
ChecksumPreferredUploadType string `yaml:"checksum_preferred_upload_type,omitempty"`
DefaultUploadProtocol string `yaml:"default_upload_protocol,omitempty"`
ChecksumSupportedTypes []string `yaml:"checksum_supported_types"`
ChecksumPreferredUploadType string `yaml:"checksum_preferred_upload_type"`
DefaultUploadProtocol string `yaml:"default_upload_protocol"`
}
// Tracing defines the available tracing configuration.
type Tracing struct {
Enabled bool `yaml:"enabled,omitempty"`
Type string `yaml:"type,omitempty"`
Endpoint string `yaml:"endpoint,omitempty"`
Collector string `yaml:"collector,omitempty"`
Service string `yaml:"service,omitempty"`
Enabled bool `yaml:"enabled"`
Type string `yaml:"type"`
Endpoint string `yaml:"endpoint"`
Collector string `yaml:"collector"`
Service string `yaml:"service"`
}
// Asset defines the available asset configuration.
type Asset struct {
Path string `yaml:"path,omitempty"`
Path string `yaml:"path"`
}
// Config combines all available configuration parts.
type Config struct {
*shared.Commons `yaml:",omitempty"`
*shared.Commons `yaml:""`
File string `yaml:"file,omitempty"`
Log *shared.Log `yaml:"log,omitempty"`
Debug Debug `yaml:"debug,omitempty"`
OCDav OCDav `yaml:"ocdav,omitempty"`
Reva Reva `yaml:"reva,omitempty"`
Tracing Tracing `yaml:"tracing,omitempty"`
Asset Asset `yaml:"asset,omitempty"`
File string `yaml:"file"`
Log *shared.Log `yaml:"log"`
Debug Debug `yaml:"debug"`
OCDav OCDav `yaml:"ocdav"`
Reva Reva `yaml:"reva"`
Tracing Tracing `yaml:"tracing"`
Asset Asset `yaml:"asset"`
}
// New initializes a new configuration with or without defaults.

View File

@@ -12,14 +12,14 @@ type Config struct {
Service Service `yaml:"-"`
Tracing *Tracing `yaml:"tracing,omitempty"`
Log *Log `yaml:"log,omitempty"`
Debug Debug `yaml:"debug,omitempty"`
Tracing *Tracing `yaml:"tracing"`
Log *Log `yaml:"log"`
Debug Debug `yaml:"debug"`
GRPC GRPC `yaml:"grpc,omitempty"`
HTTP HTTP `yaml:"http,omitempty"`
GRPC GRPC `yaml:"grpc"`
HTTP HTTP `yaml:"http"`
Thumbnail Thumbnail `yaml:"thumbnail,omitempty"`
Thumbnail Thumbnail `yaml:"thumbnail"`
Context context.Context `yaml:"-"`
}
@@ -36,12 +36,12 @@ type FileSystemSource struct {
// Thumbnail defines the available thumbnail related configuration.
type Thumbnail struct {
Resolutions []string `yaml:"resolutions,omitempty"`
FileSystemStorage FileSystemStorage `yaml:"filesystem_storage,omitempty"`
WebdavAllowInsecure bool `yaml:"webdav_allow_insecure,omitempty" env:"OCIS_INSECURE;THUMBNAILS_WEBDAVSOURCE_INSECURE"`
CS3AllowInsecure bool `yaml:"cs3_allow_insecure,omitempty" env:"OCIS_INSECURE;THUMBNAILS_CS3SOURCE_INSECURE"`
RevaGateway string `yaml:"reva_gateway,omitempty" env:"REVA_GATEWAY"` //TODO: use REVA config
FontMapFile string `yaml:"font_map_file,omitempty" env:"THUMBNAILS_TXT_FONTMAP_FILE"`
TransferSecret string `yaml:"transfer_secret,omitempty" env:"THUMBNAILS_TRANSFER_TOKEN"`
DataEndpoint string `yaml:"data_endpoint,omitempty" env:"THUMBNAILS_DATA_ENDPOINT"`
Resolutions []string `yaml:"resolutions"`
FileSystemStorage FileSystemStorage `yaml:"filesystem_storage"`
WebdavAllowInsecure bool `yaml:"webdav_allow_insecure" env:"OCIS_INSECURE;THUMBNAILS_WEBDAVSOURCE_INSECURE"`
CS3AllowInsecure bool `yaml:"cs3_allow_insecure" env:"OCIS_INSECURE;THUMBNAILS_CS3SOURCE_INSECURE"`
RevaGateway string `yaml:"reva_gateway" env:"REVA_GATEWAY"` //TODO: use REVA config
FontMapFile string `yaml:"font_map_file" env:"THUMBNAILS_TXT_FONTMAP_FILE"`
TransferSecret string `yaml:"transfer_secret" env:"THUMBNAILS_TRANSFER_TOKEN"`
DataEndpoint string `yaml:"data_endpoint" env:"THUMBNAILS_DATA_ENDPOINT"`
}

View File

@@ -5,20 +5,20 @@ import "github.com/owncloud/ocis/ocis-pkg/shared"
type Config struct {
*shared.Commons `yaml:"-"`
Service Service `yaml:"-"`
Tracing *Tracing `yaml:"tracing,omitempty"`
Logging *Logging `yaml:"log,omitempty"`
Debug Debug `yaml:"debug,omitempty"`
Supervised bool `yaml:"supervised,omitempty"`
Tracing *Tracing `yaml:"tracing"`
Logging *Logging `yaml:"log"`
Debug Debug `yaml:"debug"`
Supervised bool `yaml:"supervised"`
GRPC GRPCConfig `yaml:"grpc,omitempty"`
GRPC GRPCConfig `yaml:"grpc"`
TokenManager *TokenManager `yaml:"token_manager,omitempty"`
Reva *Reva `yaml:"reva,omitempty"`
TokenManager *TokenManager `yaml:"token_manager"`
Reva *Reva `yaml:"reva"`
SkipUserGroupsInToken bool `yaml:"skip_user_groups_in_token,omitempty"`
UsersCacheExpiration int `yaml:"users_cache_expiration,omitempty"`
Driver string `yaml:"driver,omitempty"`
Drivers Drivers `yaml:"drivers,omitempty"`
SkipUserGroupsInToken bool `yaml:"skip_user_groups_in_token"`
UsersCacheExpiration int `yaml:"users_cache_expiration"`
Driver string `yaml:"driver"`
Drivers Drivers `yaml:"drivers"`
}
type Tracing struct {
Enabled bool `yaml:"enabled" env:"OCIS_TRACING_ENABLED;USERS_TRACING_ENABLED" desc:"Activates tracing."`
@@ -51,34 +51,34 @@ type GRPCConfig struct {
}
type Drivers struct {
JSON JSONDriver `yaml:",omitempty"`
LDAP LDAPDriver `yaml:",omitempty"`
OwnCloudSQL OwnCloudSQLDriver `yaml:",omitempty"`
REST RESTProvider `yaml:",omitempty"`
JSON JSONDriver `yaml:""`
LDAP LDAPDriver `yaml:""`
OwnCloudSQL OwnCloudSQLDriver `yaml:""`
REST RESTProvider `yaml:""`
}
type JSONDriver struct {
File string
}
type LDAPDriver struct {
URI string `yaml:",omitempty" env:"LDAP_URI;USERS_LDAP_URI"`
CACert string `yaml:",omitempty" env:"LDAP_CACERT;USERS_LDAP_CACERT"`
Insecure bool `yaml:",omitempty" env:"LDAP_INSECURE;USERS_LDAP_INSECURE"`
BindDN string `yaml:",omitempty" env:"LDAP_BIND_DN;USERS_LDAP_BIND_DN"`
BindPassword string `yaml:",omitempty" env:"LDAP_BIND_PASSWORD;USERS_LDAP_BIND_PASSWORD"`
UserBaseDN string `yaml:",omitempty" env:"LDAP_USER_BASE_DN;USERS_LDAP_USER_BASE_DN"`
GroupBaseDN string `yaml:",omitempty" env:"LDAP_GROUP_BASE_DN;USERS_LDAP_GROUP_BASE_DN"`
UserScope string `yaml:",omitempty" env:"LDAP_USER_SCOPE;USERS_LDAP_USER_SCOPE"`
GroupScope string `yaml:",omitempty" env:"LDAP_GROUP_SCOPE;USERS_LDAP_GROUP_SCOPE"`
UserFilter string `yaml:",omitempty" env:"LDAP_USERFILTER;USERS_LDAP_USERFILTER"`
GroupFilter string `yaml:",omitempty" env:"LDAP_GROUPFILTER;USERS_LDAP_USERFILTER"`
UserObjectClass string `yaml:",omitempty" env:"LDAP_USER_OBJECTCLASS;USERS_LDAP_USER_OBJECTCLASS"`
GroupObjectClass string `yaml:",omitempty" env:"LDAP_GROUP_OBJECTCLASS;USERS_LDAP_GROUP_OBJECTCLASS"`
LoginAttributes []string `yaml:",omitempty" env:"LDAP_LOGIN_ATTRIBUTES;USERS_LDAP_LOGIN_ATTRIBUTES"`
IDP string `yaml:",omitempty" env:"OCIS_URL;USERS_IDP_URL"` // TODO what is this for?
GatewayEndpoint string `yaml:",omitempty"` // TODO do we need this here?
UserSchema LDAPUserSchema `yaml:",omitempty"`
GroupSchema LDAPGroupSchema `yaml:",omitempty"`
URI string `yaml:"" env:"LDAP_URI;USERS_LDAP_URI"`
CACert string `yaml:"" env:"LDAP_CACERT;USERS_LDAP_CACERT"`
Insecure bool `yaml:"" env:"LDAP_INSECURE;USERS_LDAP_INSECURE"`
BindDN string `yaml:"" env:"LDAP_BIND_DN;USERS_LDAP_BIND_DN"`
BindPassword string `yaml:"" env:"LDAP_BIND_PASSWORD;USERS_LDAP_BIND_PASSWORD"`
UserBaseDN string `yaml:"" env:"LDAP_USER_BASE_DN;USERS_LDAP_USER_BASE_DN"`
GroupBaseDN string `yaml:"" env:"LDAP_GROUP_BASE_DN;USERS_LDAP_GROUP_BASE_DN"`
UserScope string `yaml:"" env:"LDAP_USER_SCOPE;USERS_LDAP_USER_SCOPE"`
GroupScope string `yaml:"" env:"LDAP_GROUP_SCOPE;USERS_LDAP_GROUP_SCOPE"`
UserFilter string `yaml:"" env:"LDAP_USERFILTER;USERS_LDAP_USERFILTER"`
GroupFilter string `yaml:"" env:"LDAP_GROUPFILTER;USERS_LDAP_USERFILTER"`
UserObjectClass string `yaml:"" env:"LDAP_USER_OBJECTCLASS;USERS_LDAP_USER_OBJECTCLASS"`
GroupObjectClass string `yaml:"" env:"LDAP_GROUP_OBJECTCLASS;USERS_LDAP_GROUP_OBJECTCLASS"`
LoginAttributes []string `yaml:"" env:"LDAP_LOGIN_ATTRIBUTES;USERS_LDAP_LOGIN_ATTRIBUTES"`
IDP string `yaml:"" env:"OCIS_URL;USERS_IDP_URL"` // TODO what is this for?
GatewayEndpoint string `yaml:""` // TODO do we need this here?
UserSchema LDAPUserSchema `yaml:""`
GroupSchema LDAPGroupSchema `yaml:""`
}
type LDAPUserSchema struct {

View File

@@ -12,15 +12,15 @@ type Config struct {
Service Service `yaml:"-"`
Tracing *Tracing `yaml:"tracing,omitempty"`
Log *Log `yaml:"log,omitempty"`
Debug Debug `yaml:"debug,omitempty"`
Tracing *Tracing `yaml:"tracing"`
Log *Log `yaml:"log"`
Debug Debug `yaml:"debug"`
HTTP HTTP `yaml:"http,omitempty"`
HTTP HTTP `yaml:"http"`
Asset Asset `yaml:"asset,omitempty"`
File string `yaml:"file,omitempty" env:"WEB_UI_CONFIG"` // TODO: rename this to a more self explaining string
Web Web `yaml:"web,omitempty"`
Asset Asset `yaml:"asset"`
File string `yaml:"file" env:"WEB_UI_CONFIG"` // TODO: rename this to a more self explaining string
Web Web `yaml:"web"`
Context context.Context `yaml:"-"`
}
@@ -32,22 +32,22 @@ type Asset struct {
// WebConfig defines the available web configuration for a dynamically rendered config.json.
type WebConfig struct {
Server string `json:"server,omitempty" yaml:"server" env:"OCIS_URL;WEB_UI_CONFIG_SERVER"`
Theme string `json:"theme,omitempty" yaml:"theme" env:""`
Version string `json:"version,omitempty" yaml:"version" env:"WEB_UI_CONFIG_VERSION"`
OpenIDConnect OIDC `json:"openIdConnect,omitempty" yaml:"oids"`
Server string `json:"server" yaml:"server" env:"OCIS_URL;WEB_UI_CONFIG_SERVER"`
Theme string `json:"theme" yaml:"theme" env:""`
Version string `json:"version" yaml:"version" env:"WEB_UI_CONFIG_VERSION"`
OpenIDConnect OIDC `json:"openIdConnect" yaml:"oids"`
Apps []string `json:"apps" yaml:"apps"`
ExternalApps []ExternalApp `json:"external_apps,omitempty" yaml:"external_apps"`
Options map[string]interface{} `json:"options,omitempty" yaml:"options"`
ExternalApps []ExternalApp `json:"external_apps" yaml:"external_apps"`
Options map[string]interface{} `json:"options" yaml:"options"`
}
// OIDC defines the available oidc configuration
type OIDC struct {
MetadataURL string `json:"metadata_url,omitempty" yaml:"metadata_url" env:"WEB_OIDC_METADATA_URL"`
Authority string `json:"authority,omitempty" yaml:"authority" env:"OCIS_URL;WEB_OIDC_AUTHORITY"`
ClientID string `json:"client_id,omitempty" yaml:"client_id" env:"WEB_OIDC_CLIENT_ID"`
ResponseType string `json:"response_type,omitempty" yaml:"response_type" env:"WEB_OIDC_RESPONSE_TYPE"`
Scope string `json:"scope,omitempty" yaml:"scope" env:"WEB_OIDC_SCOPE"`
MetadataURL string `json:"metadata_url" yaml:"metadata_url" env:"WEB_OIDC_METADATA_URL"`
Authority string `json:"authority" yaml:"authority" env:"OCIS_URL;WEB_OIDC_AUTHORITY"`
ClientID string `json:"client_id" yaml:"client_id" env:"WEB_OIDC_CLIENT_ID"`
ResponseType string `json:"response_type" yaml:"response_type" env:"WEB_OIDC_RESPONSE_TYPE"`
Scope string `json:"scope" yaml:"scope" env:"WEB_OIDC_SCOPE"`
}
// ExternalApp defines an external web app.
@@ -59,15 +59,15 @@ type OIDC struct {
// }
// }
type ExternalApp struct {
ID string `json:"id,omitempty" yaml:"id"`
Path string `json:"path,omitempty" yaml:"path"`
ID string `json:"id" yaml:"id"`
Path string `json:"path" yaml:"path"`
// Config is completely dynamic, because it depends on the extension
Config map[string]interface{} `json:"config,omitempty" yaml:"config"`
Config map[string]interface{} `json:"config" yaml:"config"`
}
// ExternalAppConfig defines an external web app configuration.
type ExternalAppConfig struct {
URL string `json:"url,omitempty" yaml:"url" env:""`
URL string `json:"url" yaml:"url" env:""`
}
// Web defines the available web configuration.

View File

@@ -12,15 +12,15 @@ type Config struct {
Service Service `yaml:"-"`
Tracing *Tracing `yaml:"tracing,omitempty"`
Log *Log `yaml:"log,omitempty"`
Debug Debug `yaml:"debug,omitempty"`
Tracing *Tracing `yaml:"tracing"`
Log *Log `yaml:"log"`
Debug Debug `yaml:"debug"`
HTTP HTTP `yaml:"http,omitempty"`
HTTP HTTP `yaml:"http"`
OcisPublicURL string `yaml:"ocis_public_url,omitempty" env:"OCIS_URL;OCIS_PUBLIC_URL"`
WebdavNamespace string `yaml:"webdav_namespace,omitempty" env:"STORAGE_WEBDAV_NAMESPACE"` //TODO: prevent this cross config
RevaGateway string `yaml:"reva_gateway,omitempty" env:"REVA_GATEWAY"`
OcisPublicURL string `yaml:"ocis_public_url" env:"OCIS_URL;OCIS_PUBLIC_URL"`
WebdavNamespace string `yaml:"webdav_namespace" env:"STORAGE_WEBDAV_NAMESPACE"` //TODO: prevent this cross config
RevaGateway string `yaml:"reva_gateway" env:"REVA_GATEWAY"`
Context context.Context `yaml:"-,omitempty"`
Context context.Context `yaml:"-"`
}

View File

@@ -59,49 +59,49 @@ type Runtime struct {
// Config combines all available configuration parts.
type Config struct {
*shared.Commons `yaml:"shared,omitempty"`
*shared.Commons `yaml:"shared"`
Tracing *shared.Tracing `yaml:"tracing,omitempty"`
Log *shared.Log `yaml:"log,omitempty"`
Tracing *shared.Tracing `yaml:"tracing"`
Log *shared.Log `yaml:"log"`
Mode Mode `yaml:",omitempty"` // DEPRECATED
File string `yaml:",omitempty"`
OcisURL string `yaml:"ocis_url,omitempty"`
Mode Mode `yaml:""` // DEPRECATED
File string `yaml:""`
OcisURL string `yaml:"ocis_url"`
Registry string `yaml:"registry,omitempty"`
TokenManager *shared.TokenManager `yaml:"token_manager,omitempty"`
Registry string `yaml:"registry"`
TokenManager *shared.TokenManager `yaml:"token_manager"`
MachineAuthAPIKey string `yaml:"machine_auth_api_key" env:"OCIS_MACHINE_AUTH_API_KEY"`
TransferSecret string `yaml:"transfer_secret,omitempty"`
Runtime Runtime `yaml:"runtime,omitempty"`
TransferSecret string `yaml:"transfer_secret"`
Runtime Runtime `yaml:"runtime"`
Audit *audit.Config `yaml:"audit,omitempty"`
Accounts *accounts.Config `yaml:"accounts,omitempty"`
GLAuth *glauth.Config `yaml:"glauth,omitempty"`
Graph *graph.Config `yaml:"graph,omitempty"`
GraphExplorer *graphExplorer.Config `yaml:"graph_explorer,omitempty"`
IDP *idp.Config `yaml:"idp,omitempty"`
IDM *idm.Config `yaml:"idm,omitempty"`
Nats *nats.Config `yaml:"nats,omitempty"`
Notifications *notifications.Config `yaml:"notifications,omitempty"`
OCS *ocs.Config `yaml:"ocs,omitempty"`
Web *web.Config `yaml:"web,omitempty"`
Proxy *proxy.Config `yaml:"proxy,omitempty"`
Settings *settings.Config `yaml:"settings,omitempty"`
Gateway *gateway.Config `yaml:"gateway,omitempty"`
Frontend *frontend.Config `yaml:"frontend,omitempty"`
AuthBasic *authbasic.Config `yaml:"auth_basic,omitempty"`
AuthBearer *authbearer.Config `yaml:"auth_bearer,omitempty"`
AuthMachine *authmachine.Config `yaml:"auth_machine,omitempty"`
User *user.Config `yaml:"user,omitempty"`
Group *group.Config `yaml:"group,omitempty"`
AppProvider *appprovider.Config `yaml:"app_provider,omitempty"`
Sharing *sharing.Config `yaml:"sharing,omitempty"`
StorageMetadata *storagemetadata.Config `yaml:"storage_metadata,omitempty"`
StoragePublicLink *storagepublic.Config `yaml:"storage_public,omitempty"`
StorageUsers *storageusers.Config `yaml:"storage_users,omitempty"`
StorageShares *storageshares.Config `yaml:"storage_shares,omitempty"`
OCDav *ocdav.Config `yaml:"ocdav,omitempty"`
Store *store.Config `yaml:"store,omitempty"`
Thumbnails *thumbnails.Config `yaml:"thumbnails,omitempty"`
WebDAV *webdav.Config `yaml:"webdav,omitempty"`
Audit *audit.Config `yaml:"audit"`
Accounts *accounts.Config `yaml:"accounts"`
GLAuth *glauth.Config `yaml:"glauth"`
Graph *graph.Config `yaml:"graph"`
GraphExplorer *graphExplorer.Config `yaml:"graph_explorer"`
IDP *idp.Config `yaml:"idp"`
IDM *idm.Config `yaml:"idm"`
Nats *nats.Config `yaml:"nats"`
Notifications *notifications.Config `yaml:"notifications"`
OCS *ocs.Config `yaml:"ocs"`
Web *web.Config `yaml:"web"`
Proxy *proxy.Config `yaml:"proxy"`
Settings *settings.Config `yaml:"settings"`
Gateway *gateway.Config `yaml:"gateway"`
Frontend *frontend.Config `yaml:"frontend"`
AuthBasic *authbasic.Config `yaml:"auth_basic"`
AuthBearer *authbearer.Config `yaml:"auth_bearer"`
AuthMachine *authmachine.Config `yaml:"auth_machine"`
User *user.Config `yaml:"user"`
Group *group.Config `yaml:"group"`
AppProvider *appprovider.Config `yaml:"app_provider"`
Sharing *sharing.Config `yaml:"sharing"`
StorageMetadata *storagemetadata.Config `yaml:"storage_metadata"`
StoragePublicLink *storagepublic.Config `yaml:"storage_public"`
StorageUsers *storageusers.Config `yaml:"storage_users"`
StorageShares *storageshares.Config `yaml:"storage_shares"`
OCDav *ocdav.Config `yaml:"ocdav"`
Store *store.Config `yaml:"store"`
Thumbnails *thumbnails.Config `yaml:"thumbnails"`
WebDAV *webdav.Config `yaml:"webdav"`
}