Auth Basic Service Configuration
Introduction
The Infinite Scale Auth Basic service provides basic authentication for those clients who cannot handle OIDC. This is a rare case, is usually not necessary and mainly used for tests or development.
The auth-basic
service is responsible for validating authentication of incoming requests. To do so, it will use the configured auth manager
, see the Auth Managers
section. Only HTTP basic auth requests to ocis will involve the auth-basic
service.
To enable auth-basic
, you first must set PROXY_ENABLE_BASIC_AUTH
to true
.
The basic authentication implementation does not support cookies and is therefore not intended to be used for benchmarks. |
The auth
Service Family
Infinite Scale uses several authentication services for different use cases. All services that start with auth-
are part of the authentication service family. Each member authenticates requests with different scopes.
As of now, these auth services exist |
|
---|---|
Handles 3rd party app authentication. |
|
Handles basic authentication. |
|
Handles OIDC authentication. |
|
Handles interservice authentication when a user is impersonated. |
|
Handles interservice authentication when using service accounts. |
Auth Managers
Since the auth-basic
service does not do any validation itself, it needs to be configured with an authentication manager. One can use the AUTH_BASIC_AUTH_PROVIDER
environment variable to configure this.
Scalability
Scalability, just like memory and CPU consumption, are highly dependent on the configured auth manager. When using the recommended one which is "ldap"
, there is no persistance as requests will just be forwarded to the LDAP server. Therefore, multiple instances of the auth-basic
service can be started without further configuration. Be aware, that other auth managers might not allow that.
Configuration
Environment Variables
The auth-basic
service is configured via the following environment variables. Read the Environment Variable Types documentation for important details. Column IV
shows with which release the environment variable has been introduced.
Name | IV | Type | Default Value | Description |
---|---|---|---|---|
|
pre5.0 |
bool |
false |
Activates tracing. |
|
pre5.0 |
string |
|
The type of tracing. Defaults to '', which is the same as 'jaeger'. Allowed tracing types are 'jaeger' and '' as of now. |
|
pre5.0 |
string |
|
The endpoint of the tracing agent. |
|
pre5.0 |
string |
|
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. |
|
pre5.0 |
string |
|
The log level. Valid values are: 'panic', 'fatal', 'error', 'warn', 'info', 'debug', 'trace'. |
|
pre5.0 |
bool |
false |
Activates pretty log output. |
|
pre5.0 |
bool |
false |
Activates colorized log output. |
|
pre5.0 |
string |
|
The path to the log file. Activates logging to this file if set. |
|
pre5.0 |
string |
127.0.0.1:9147 |
Bind address of the debug server, where metrics, health, config and debug endpoints will be exposed. |
|
pre5.0 |
string |
|
Token to secure the metrics endpoint. |
|
pre5.0 |
bool |
false |
Enables pprof, which can be used for profiling. |
|
pre5.0 |
bool |
false |
Enables zpages, which can be used for collecting and viewing traces in-memory. |
|
pre5.0 |
string |
127.0.0.1:9146 |
The bind address of the GRPC service. |
|
pre5.0 |
string |
tcp |
The transport protocol of the GRPC service. |
|
pre5.0 |
string |
|
The secret to mint and validate jwt tokens. |
|
pre5.0 |
string |
com.owncloud.api.gateway |
The CS3 gateway endpoint. |
|
pre5.0 |
string |
|
TLS mode for grpc connection to the go-micro based grpc services. Possible values are 'off', 'insecure' and 'on'. 'off': disables transport security for the clients. 'insecure' allows using transport security, but disables certificate verification (to be used with the autogenerated self-signed certificates). 'on' enables transport security, including server certificate verification. |
|
pre5.0 |
string |
|
Path/File name for the root CA certificate (in PEM format) used to validate TLS server certificates of the go-micro based grpc services. |
|
pre5.0 |
bool |
false |
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. |
|
pre5.0 |
string |
ldap |
The authentication manager to check if credentials are valid. Supported value is 'ldap'. |
|
pre5.0 |
string |
ldaps://localhost:9235 |
URI of the LDAP Server to connect to. Supported URI schemes are 'ldaps://' and 'ldap://' |
|
pre5.0 |
string |
/var/lib/ocis/idm/ldap.crt |
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 $OCIS_BASE_DATA_PATH/idm. |
|
pre5.0 |
bool |
false |
Disable TLS certificate validation for the LDAP connections. Do not set this in production environments. |
|
pre5.0 |
string |
uid=reva,ou=sysusers,o=libregraph-idm |
LDAP DN to use for simple bind authentication with the target LDAP server. |
|
pre5.0 |
string |
|
Password to use for authenticating the 'bind_dn'. |
|
pre5.0 |
string |
ou=users,o=libregraph-idm |
Search base DN for looking up LDAP users. |
|
pre5.0 |
string |
ou=groups,o=libregraph-idm |
Search base DN for looking up LDAP groups. |
|
pre5.0 |
string |
sub |
LDAP search scope to use when looking up users. Supported values are 'base', 'one' and 'sub'. |
|
pre5.0 |
string |
sub |
LDAP search scope to use when looking up groups. Supported values are 'base', 'one' and 'sub'. |
|
pre5.0 |
string |
|
LDAP filter to add to the default filters for user search like '(objectclass=ownCloud)'. |
|
pre5.0 |
string |
|
LDAP filter to add to the default filters for group searches. |
|
pre5.0 |
string |
inetOrgPerson |
The object class to use for users in the default user search filter ('inetOrgPerson'). |
|
pre5.0 |
string |
groupOfNames |
The object class to use for groups in the default group search filter ('groupOfNames'). |
|
pre5.0 |
[]string |
[uid] |
A list of user object attributes that can be used for login. See the Environment Variable Types description for more details. |
|
pre5.0 |
string |
https://localhost:9200 |
The identity provider value to set in the userids of the CS3 user objects for users returned by this user provider. |
|
pre5.0 |
string |
attribute |
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. |
|
pre5.0 |
string |
cn=DisabledUsersGroup,ou=groups,o=libregraph-idm |
The distinguished name of the group to which added users will be classified as disabled when 'disable_user_mechanism' is set to 'group'. |
|
pre5.0 |
string |
ownclouduuid |
LDAP Attribute to use as the unique ID for users. This should be a stable globally unique ID like a UUID. |
|
pre5.0 |
bool |
false |
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. |
|
pre5.0 |
string |
LDAP Attribute to use for the email address of users. |
|
|
pre5.0 |
string |
displayname |
LDAP Attribute to use for the displayname of users. |
|
pre5.0 |
string |
uid |
LDAP Attribute to use for username of users. |
|
pre5.0 |
string |
ownCloudUserEnabled |
LDAP attribute to use as a flag telling if the user is enabled or disabled. |
|
pre5.0 |
string |
ownclouduuid |
LDAP Attribute to use as the unique id for groups. This should be a stable globally unique id (e.g. a UUID). |
|
pre5.0 |
bool |
false |
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. |
|
pre5.0 |
string |
LDAP Attribute to use for the email address of groups (can be empty). |
|
|
pre5.0 |
string |
cn |
LDAP Attribute to use for the displayname of groups (often the same as groupname attribute). |
|
pre5.0 |
string |
cn |
LDAP Attribute to use for the name of groups. |
|
pre5.0 |
string |
member |
LDAP Attribute that is used for group members. |
|
pre5.0 |
string |
owncloud |
Database user to use for authenticating with the owncloud database. |
|
pre5.0 |
string |
|
Password for the database user. |
|
pre5.0 |
string |
mysql |
Hostname of the database server. |
|
pre5.0 |
int |
3306 |
Network port to use for the database connection. |
|
pre5.0 |
string |
owncloud |
Name of the owncloud database. |
|
pre5.0 |
string |
https://localhost:9200 |
The identity provider value to set in the userids of the CS3 user objects for users returned by this user provider. |
|
pre5.0 |
int64 |
90 |
Fallback number if no numeric UID and GID properties are provided. |
|
pre5.0 |
bool |
false |
Join the user properties table to read usernames |
|
pre5.0 |
bool |
false |
Join the user properties table to read user ID’s. |
YAML Example
-
Note the file shown below must be renamed and placed in the correct folder according to the Configuration File Naming conventions to be effective.
-
See the Notes for Environment Variables if you want to use environment variables in the yaml file.
# Autogenerated
# Filename: auth-basic-config-example.yaml
tracing:
enabled: false
type: ""
endpoint: ""
collector: ""
log:
level: ""
pretty: false
color: false
file: ""
debug:
addr: 127.0.0.1:9147
token: ""
pprof: false
zpages: false
grpc:
addr: 127.0.0.1:9146
tls: null
protocol: tcp
token_manager:
jwt_secret: ""
reva:
address: com.owncloud.api.gateway
tls:
mode: ""
cacert: ""
skip_user_groups_in_token: false
auth_provider: ldap
auth_providers:
ldap:
uri: ldaps://localhost:9235
ca_cert: /var/lib/ocis/idm/ldap.crt
insecure: false
bind_dn: uid=reva,ou=sysusers,o=libregraph-idm
bind_password: ""
user_base_dn: ou=users,o=libregraph-idm
group_base_dn: ou=groups,o=libregraph-idm
user_scope: sub
group_scope: sub
user_filter: ""
group_filter: ""
user_object_class: inetOrgPerson
group_object_class: groupOfNames
login_attributes:
- uid
idp: https://localhost:9200
disable_user_mechanism: attribute
ldap_disabled_users_group_dn: cn=DisabledUsersGroup,ou=groups,o=libregraph-idm
user_schema:
id: ownclouduuid
id_is_octet_string: false
mail: mail
display_name: displayname
user_name: uid
user_enabled: ownCloudUserEnabled
group_schema:
id: ownclouduuid
id_is_octet_string: false
mail: mail
display_name: cn
group_name: cn
member: member
owncloudsql:
db_username: owncloud
db_password: ""
db_host: mysql
db_port: 3306
db_name: owncloud
idp: https://localhost:9200
nobody: 90
join_username: false
join_owncloud_uuid: false