{"modulePath":"github.com/opencloud-eu/opencloud","version":"v1.1.0","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package config\n\n## Types\n\n```go\ntype AuthProviders struct {\n\tLDAP        LDAPProvider        `yaml:\"ldap\"`\n\tOwnCloudSQL OwnCloudSQLProvider `yaml:\"owncloudsql\"`\n\tJSON        JSONProvider        `yaml:\"json,omitempty\"` // not supported by the OpenCloud product, therefore not part of docs\n}\n```\n\n```go\ntype Config struct {\n\tCommons *shared.Commons `yaml:\"-\"` // don't use this directly as configuration for a service\n\tService Service         `yaml:\"-\"`\n\tTracing *Tracing        `yaml:\"tracing\"`\n\tLog     *Log            `yaml:\"log\"`\n\tDebug   Debug           `yaml:\"debug\"`\n\n\tGRPC GRPCConfig `yaml:\"grpc\"`\n\n\tTokenManager *TokenManager `yaml:\"token_manager\"`\n\tReva         *shared.Reva  `yaml:\"reva\"`\n\n\tSkipUserGroupsInToken bool          `yaml:\"skip_user_groups_in_token\" env:\"AUTH_BASIC_SKIP_USER_GROUPS_IN_TOKEN\" desc:\"Disables the encoding of the user's group memberships in the reva access token. This reduces the token size, especially when users are members of a large number of groups.\" introductionVersion:\"1.0.0\"`\n\tAuthProvider          string        `yaml:\"auth_provider\" env:\"AUTH_BASIC_AUTH_MANAGER\" desc:\"The authentication manager to check if credentials are valid. Supported value is 'ldap'.\" introductionVersion:\"1.0.0\"`\n\tAuthProviders         AuthProviders `yaml:\"auth_providers\"`\n\n\tContext context.Context `yaml:\"-\"`\n}\n```\n\n```go\ntype Debug struct {\n\tAddr   string `yaml:\"addr\" env:\"AUTH_BASIC_DEBUG_ADDR\" desc:\"Bind address of the debug server, where metrics, health, config and debug endpoints will be exposed.\" introductionVersion:\"1.0.0\"`\n\tToken  string `yaml:\"token\" env:\"AUTH_BASIC_DEBUG_TOKEN\" desc:\"Token to secure the metrics endpoint.\" introductionVersion:\"1.0.0\"`\n\tPprof  bool   `yaml:\"pprof\" env:\"AUTH_BASIC_DEBUG_PPROF\" desc:\"Enables pprof, which can be used for profiling.\" introductionVersion:\"1.0.0\"`\n\tZpages bool   `yaml:\"zpages\" env:\"AUTH_BASIC_DEBUG_ZPAGES\" desc:\"Enables zpages, which can  be used for collecting and viewing traces in-memory.\" introductionVersion:\"1.0.0\"`\n}\n```\n\n```go\ntype GRPCConfig struct {\n\tAddr      string                 `yaml:\"addr\" env:\"AUTH_BASIC_GRPC_ADDR\" desc:\"The bind address of the GRPC service.\" introductionVersion:\"1.0.0\"`\n\tTLS       *shared.GRPCServiceTLS `yaml:\"tls\"`\n\tNamespace string                 `yaml:\"-\"`\n\tProtocol  string                 `yaml:\"protocol\" env:\"OC_GRPC_PROTOCOL;AUTH_BASIC_GRPC_PROTOCOL\" desc:\"The transport protocol of the GRPC service.\" introductionVersion:\"1.0.0\"`\n}\n```\n\n```go\ntype JSONProvider struct {\n\tFile string `yaml:\"file,omitempty\"`\n}\n```\n\n```go\ntype LDAPGroupSchema struct {\n\tID              string `yaml:\"id\" env:\"OC_LDAP_GROUP_SCHEMA_ID;AUTH_BASIC_LDAP_GROUP_SCHEMA_ID\" desc:\"LDAP Attribute to use as the unique id for groups. This should be a stable globally unique id (e.g. a UUID).\" introductionVersion:\"1.0.0\"`\n\tIDIsOctetString bool   `yaml:\"id_is_octet_string\" env:\"OC_LDAP_GROUP_SCHEMA_ID_IS_OCTETSTRING;AUTH_BASIC_LDAP_GROUP_SCHEMA_ID_IS_OCTETSTRING\" desc:\"Set this to true if the defined 'id' attribute for groups is of the 'OCTETSTRING' syntax. This is e.g. required when using the 'objectGUID' attribute of Active Directory for the group IDs.\" introductionVersion:\"1.0.0\"`\n\tMail            string `yaml:\"mail\" env:\"OC_LDAP_GROUP_SCHEMA_MAIL;AUTH_BASIC_LDAP_GROUP_SCHEMA_MAIL\" desc:\"LDAP Attribute to use for the email address of groups (can be empty).\" introductionVersion:\"1.0.0\"`\n\tDisplayName     string `yaml:\"display_name\" env:\"OC_LDAP_GROUP_SCHEMA_DISPLAYNAME;AUTH_BASIC_LDAP_GROUP_SCHEMA_DISPLAYNAME\" desc:\"LDAP Attribute to use for the displayname of groups (often the same as groupname attribute).\" introductionVersion:\"1.0.0\"`\n\tGroupname       string `yaml:\"group_name\" env:\"OC_LDAP_GROUP_SCHEMA_GROUPNAME;AUTH_BASIC_LDAP_GROUP_SCHEMA_GROUPNAME\" desc:\"LDAP Attribute to use for the name of groups.\" introductionVersion:\"1.0.0\"`\n\tMember          string `yaml:\"member\" env:\"OC_LDAP_GROUP_SCHEMA_MEMBER;AUTH_BASIC_LDAP_GROUP_SCHEMA_MEMBER\" desc:\"LDAP Attribute that is used for group members.\" introductionVersion:\"1.0.0\"`\n}\n```\n\n```go\ntype LDAPProvider struct {\n\tURI                      string          `yaml:\"uri\" env:\"OC_LDAP_URI;AUTH_BASIC_LDAP_URI\" desc:\"URI of the LDAP Server to connect to. Supported URI schemes are 'ldaps://' and 'ldap://'\" introductionVersion:\"1.0.0\"`\n\tCACert                   string          `yaml:\"ca_cert\" env:\"OC_LDAP_CACERT;AUTH_BASIC_LDAP_CACERT\" desc:\"Path/File name for the root CA certificate (in PEM format) used to validate TLS server certificates of the LDAP service. If not defined, the root directory derives from $OC_BASE_DATA_PATH/idm.\" introductionVersion:\"1.0.0\"`\n\tInsecure                 bool            `yaml:\"insecure\" env:\"OC_LDAP_INSECURE;AUTH_BASIC_LDAP_INSECURE\" desc:\"Disable TLS certificate validation for the LDAP connections. Do not set this in production environments.\" introductionVersion:\"1.0.0\"`\n\tBindDN                   string          `yaml:\"bind_dn\" env:\"OC_LDAP_BIND_DN;AUTH_BASIC_LDAP_BIND_DN\" desc:\"LDAP DN to use for simple bind authentication with the target LDAP server.\" introductionVersion:\"1.0.0\"`\n\tBindPassword             string          `yaml:\"bind_password\" env:\"OC_LDAP_BIND_PASSWORD;AUTH_BASIC_LDAP_BIND_PASSWORD\" desc:\"Password to use for authenticating the 'bind_dn'.\" introductionVersion:\"1.0.0\"`\n\tUserBaseDN               string          `yaml:\"user_base_dn\" env:\"OC_LDAP_USER_BASE_DN;AUTH_BASIC_LDAP_USER_BASE_DN\" desc:\"Search base DN for looking up LDAP users.\" introductionVersion:\"1.0.0\"`\n\tGroupBaseDN              string          `yaml:\"group_base_dn\" env:\"OC_LDAP_GROUP_BASE_DN;AUTH_BASIC_LDAP_GROUP_BASE_DN\" desc:\"Search base DN for looking up LDAP groups.\" introductionVersion:\"1.0.0\"`\n\tUserScope                string          `yaml:\"user_scope\" env:\"OC_LDAP_USER_SCOPE;AUTH_BASIC_LDAP_USER_SCOPE\" desc:\"LDAP search scope to use when looking up users. Supported values are 'base', 'one' and 'sub'.\" introductionVersion:\"1.0.0\"`\n\tGroupScope               string          `yaml:\"group_scope\" env:\"OC_LDAP_GROUP_SCOPE;AUTH_BASIC_LDAP_GROUP_SCOPE\" desc:\"LDAP search scope to use when looking up groups. Supported values are 'base', 'one' and 'sub'.\" introductionVersion:\"1.0.0\"`\n\tUserFilter               string          `yaml:\"user_filter\" env:\"OC_LDAP_USER_FILTER;AUTH_BASIC_LDAP_USER_FILTER\" desc:\"LDAP filter to add to the default filters for user search like '(objectclass=openCloudUser)'.\" introductionVersion:\"1.0.0\"`\n\tGroupFilter              string          `yaml:\"group_filter\" env:\"OC_LDAP_GROUP_FILTER;AUTH_BASIC_LDAP_GROUP_FILTER\" desc:\"LDAP filter to add to the default filters for group searches.\" introductionVersion:\"1.0.0\"`\n\tUserObjectClass          string          `yaml:\"user_object_class\" env:\"OC_LDAP_USER_OBJECTCLASS;AUTH_BASIC_LDAP_USER_OBJECTCLASS\" desc:\"The object class to use for users in the default user search filter ('inetOrgPerson').\" introductionVersion:\"1.0.0\"`\n\tGroupObjectClass         string          `yaml:\"group_object_class\" env:\"OC_LDAP_GROUP_OBJECTCLASS;AUTH_BASIC_LDAP_GROUP_OBJECTCLASS\" desc:\"The object class to use for groups in the default group search filter ('groupOfNames').\" introductionVersion:\"1.0.0\"`\n\tLoginAttributes          []string        `yaml:\"login_attributes\" env:\"LDAP_LOGIN_ATTRIBUTES;AUTH_BASIC_LDAP_LOGIN_ATTRIBUTES\" desc:\"A list of user object attributes that can be used for login. See the Environment Variable Types description for more details.\" introductionVersion:\"1.0.0\"`\n\tIDP                      string          `yaml:\"idp\" env:\"OC_URL;OC_OIDC_ISSUER;AUTH_BASIC_IDP_URL\" desc:\"The identity provider value to set in the userids of the CS3 user objects for users returned by this user provider.\" introductionVersion:\"1.0.0\"`\n\tDisableUserMechanism     string          `yaml:\"disable_user_mechanism\" env:\"OC_LDAP_DISABLE_USER_MECHANISM;AUTH_BASIC_DISABLE_USER_MECHANISM\" desc:\"An option to control the behavior for disabling users. Valid options are 'none', 'attribute' and 'group'. If set to 'group', disabling a user via API will add the user to the configured group for disabled users, if set to 'attribute' this will be done in the ldap user entry, if set to 'none' the disable request is not processed.\" introductionVersion:\"1.0.0\"`\n\tLdapDisabledUsersGroupDN string          `yaml:\"ldap_disabled_users_group_dn\" env:\"OC_LDAP_DISABLED_USERS_GROUP_DN;AUTH_BASIC_DISABLED_USERS_GROUP_DN\" desc:\"The distinguished name of the group to which added users will be classified as disabled when 'disable_user_mechanism' is set to 'group'.\" introductionVersion:\"1.0.0\"`\n\tUserSchema               LDAPUserSchema  `yaml:\"user_schema\"`\n\tGroupSchema              LDAPGroupSchema `yaml:\"group_schema\"`\n}\n```\n\n```go\ntype LDAPUserSchema struct {\n\tID              string `yaml:\"id\" env:\"OC_LDAP_USER_SCHEMA_ID;AUTH_BASIC_LDAP_USER_SCHEMA_ID\" desc:\"LDAP Attribute to use as the unique ID for users. This should be a stable globally unique ID like a UUID.\" introductionVersion:\"1.0.0\"`\n\tIDIsOctetString bool   `yaml:\"id_is_octet_string\" env:\"OC_LDAP_USER_SCHEMA_ID_IS_OCTETSTRING;AUTH_BASIC_LDAP_USER_SCHEMA_ID_IS_OCTETSTRING\" desc:\"Set this to true if the defined 'ID' attribute for users is of the 'OCTETSTRING' syntax. This is e.g. required when using the 'objectGUID' attribute of Active Directory for the user IDs.\" introductionVersion:\"1.0.0\"`\n\tMail            string `yaml:\"mail\" env:\"OC_LDAP_USER_SCHEMA_MAIL;AUTH_BASIC_LDAP_USER_SCHEMA_MAIL\" desc:\"LDAP Attribute to use for the email address of users.\" introductionVersion:\"1.0.0\"`\n\tDisplayName     string `yaml:\"display_name\" env:\"OC_LDAP_USER_SCHEMA_DISPLAYNAME;AUTH_BASIC_LDAP_USER_SCHEMA_DISPLAYNAME\" desc:\"LDAP Attribute to use for the displayname of users.\" introductionVersion:\"1.0.0\"`\n\tUsername        string `yaml:\"user_name\" env:\"OC_LDAP_USER_SCHEMA_USERNAME;AUTH_BASIC_LDAP_USER_SCHEMA_USERNAME\" desc:\"LDAP Attribute to use for username of users.\" introductionVersion:\"1.0.0\"`\n\tEnabled         string `yaml:\"user_enabled\" env:\"OC_LDAP_USER_ENABLED_ATTRIBUTE;AUTH_BASIC_LDAP_USER_ENABLED_ATTRIBUTE\" desc:\"LDAP attribute to use as a flag telling if the user is enabled or disabled.\" introductionVersion:\"1.0.0\"`\n}\n```\n\n```go\ntype Log struct {\n\tLevel  string `yaml:\"level\" env:\"OC_LOG_LEVEL;AUTH_BASIC_LOG_LEVEL\" desc:\"The log level. Valid values are: 'panic', 'fatal', 'error', 'warn', 'info', 'debug', 'trace'.\" introductionVersion:\"1.0.0\"`\n\tPretty bool   `yaml:\"pretty\" env:\"OC_LOG_PRETTY;AUTH_BASIC_LOG_PRETTY\" desc:\"Activates pretty log output.\" introductionVersion:\"1.0.0\"`\n\tColor  bool   `yaml:\"color\" env:\"OC_LOG_COLOR;AUTH_BASIC_LOG_COLOR\" desc:\"Activates colorized log output.\" introductionVersion:\"1.0.0\"`\n\tFile   string `yaml:\"file\" env:\"OC_LOG_FILE;AUTH_BASIC_LOG_FILE\" desc:\"The path to the log file. Activates logging to this file if set.\" introductionVersion:\"1.0.0\"`\n}\n```\n\n```go\ntype OwnCloudSQLProvider struct {\n\tDBUsername       string `yaml:\"db_username\" env:\"AUTH_BASIC_OWNCLOUDSQL_DB_USERNAME\" desc:\"Database user to use for authenticating with the owncloud database.\" introductionVersion:\"1.0.0\"`\n\tDBPassword       string `yaml:\"db_password\" env:\"AUTH_BASIC_OWNCLOUDSQL_DB_PASSWORD\" desc:\"Password for the database user.\" introductionVersion:\"1.0.0\"`\n\tDBHost           string `yaml:\"db_host\" env:\"AUTH_BASIC_OWNCLOUDSQL_DB_HOST\" desc:\"Hostname of the database server.\" introductionVersion:\"1.0.0\"`\n\tDBPort           int    `yaml:\"db_port\" env:\"AUTH_BASIC_OWNCLOUDSQL_DB_PORT\" desc:\"Network port to use for the database connection.\" introductionVersion:\"1.0.0\"`\n\tDBName           string `yaml:\"db_name\" env:\"AUTH_BASIC_OWNCLOUDSQL_DB_NAME\" desc:\"Name of the owncloud database.\" introductionVersion:\"1.0.0\"`\n\tIDP              string `yaml:\"idp\" env:\"AUTH_BASIC_OWNCLOUDSQL_IDP\" desc:\"The identity provider value to set in the userids of the CS3 user objects for users returned by this user provider.\" introductionVersion:\"1.0.0\"`\n\tNobody           int64  `yaml:\"nobody\" env:\"AUTH_BASIC_OWNCLOUDSQL_NOBODY\" desc:\"Fallback number if no numeric UID and GID properties are provided.\" introductionVersion:\"1.0.0\"`\n\tJoinUsername     bool   `yaml:\"join_username\" env:\"AUTH_BASIC_OWNCLOUDSQL_JOIN_USERNAME\" desc:\"Join the user properties table to read usernames\" introductionVersion:\"1.0.0\"`\n\tJoinOwnCloudUUID bool   `yaml:\"join_owncloud_uuid\" env:\"AUTH_BASIC_OWNCLOUDSQL_JOIN_OWNCLOUD_UUID\" desc:\"Join the user properties table to read user ID's.\" introductionVersion:\"1.0.0\"`\n}\n```\n\n```go\ntype Service struct {\n\tName string `yaml:\"-\"`\n}\n```\n\n```go\ntype TokenManager struct {\n\tJWTSecret string `yaml:\"jwt_secret\" env:\"OC_JWT_SECRET;AUTH_BASIC_JWT_SECRET\" desc:\"The secret to mint and validate jwt tokens.\" introductionVersion:\"1.0.0\"`\n}\n```\nTokenManager is the config for using the reva token manager\n\n```go\ntype Tracing struct {\n\tEnabled   bool   `yaml:\"enabled\" env:\"OC_TRACING_ENABLED;AUTH_BASIC_TRACING_ENABLED\" desc:\"Activates tracing.\" introductionVersion:\"1.0.0\"`\n\tType      string `yaml:\"type\" env:\"OC_TRACING_TYPE;AUTH_BASIC_TRACING_TYPE\" desc:\"The type of tracing. Defaults to '', which is the same as 'jaeger'. Allowed tracing types are 'jaeger' and '' as of now.\" introductionVersion:\"1.0.0\"`\n\tEndpoint  string `yaml:\"endpoint\" env:\"OC_TRACING_ENDPOINT;AUTH_BASIC_TRACING_ENDPOINT\" desc:\"The endpoint of the tracing agent.\" introductionVersion:\"1.0.0\"`\n\tCollector string `yaml:\"collector\" env:\"OC_TRACING_COLLECTOR;AUTH_BASIC_TRACING_COLLECTOR\" desc:\"The HTTP endpoint for sending spans directly to a collector, i.e. http://jaeger-collector:14268/api/traces. Only used if the tracing endpoint is unset.\" introductionVersion:\"1.0.0\"`\n}\n```\nTracing defines the tracing configuration.\n\n```go\nfunc (t Tracing) Convert() tracing.Config\n```\nConvert Tracing to the tracing package's Config struct.\n\n","path":"github.com/opencloud-eu/opencloud/services/auth-basic/pkg/config","name":"config","synopsis":"","isRedistributable":true}
