Proxy Service Configuration

Introduction

The proxy service is an API-Gateway for the ownCloud Infinite Scale microservices. Every HTTP request goes through this service. Authentication, logging and other preprocessing of requests also happens here. Mechanisms like request rate limiting or intrusion prevention are not included in the proxy service and must be set up in front of an external reverse proxy.

See the Developer Documentation for details if you want to write your own extensions and need to change or add routes to endpoints.

Default Values

  • The proxy listens on port 9200 by default.

Authentication

The following request authentication schemes are implemented:

  • Basic Auth (Only use in development, never in production setups!)

  • OpenID Connect

  • Signed URL

  • Public Share Token

Automatic User and Group Provisioning

When using an external OpenID Connect IDP, the proxy can be configured to automatically provision users upon their first login.

Prerequisites

A number of prerequisites must be met for automatic user provisioning to work:

  • Infinite Scale must be configured to use an external OpenID Connect IDP.

  • The graph service must be configured to allow updating users and groups (GRAPH_LDAP_SERVER_WRITE_ENABLED).

  • One of the claim values returned by the IDP as part of the userinfo response or the access token must be unique and stable for the user. I.e. the value must not change for the whole lifetime of the user. This claim is configured via the PROXY_USER_OIDC_CLAIM environment variable (see below). A natural choice would e.g. be the sub claim which is guaranteed to be unique and stable per IDP. If a claim like email or preferred_username is used, you have to ensure that the user’s email address or username never changes.

Configuration

To enable automatic user provisioning, the following environment variables must be set for the proxy service:

  • PROXY_AUTOPROVISION_ACCOUNTS
    Set to true to enable automatic user provisioning.

  • PROXY_AUTOPROVISION_CLAIM_USERNAME
    The name of an OIDC claim whose value should be used as the username for the auto-provisioned user in ownCloud Infinite Scale. Defaults to preferred_username. Can also be set to e.g. sub to guarantee a unique and stable username.

  • PROXY_AUTOPROVISION_CLAIM_EMAIL
    The name of an OIDC claim whose value should be used for the mail attribute of the auto-provisioned user in ownCloud Infinite Scale. Defaults to email.

  • PROXY_AUTOPROVISION_CLAIM_DISPLAYNAME
    The name of an OIDC claim whose value should be used for the displayname attribute of the auto-provisioned user in ownCloud Infinite Scale. Defaults to name.

  • PROXY_AUTOPROVISION_CLAIM_GROUPS
    The name of an OIDC claim whose value should be used to maintain a user’s group membership. The claim value should contain a list of group names the user should be a member of. Defaults to groups.

  • PROXY_USER_OIDC_CLAIM
    When resolving an authenticated OIDC user, the value of this claim is used to lookup the user in the users service. For auto provisioning setups this usually is the same claims as set via PROXY_AUTOPROVISION_CLAIM_USERNAME.

  • PROXY_USER_CS3_CLAIM
    This is the name of the user attribute in ocis that is used to lookup the user by the value of the PROXY_USER_OIDC_CLAIM. For auto provisioning setups this usually needs to be set to username.

How it Works

When a user logs into ownCloud Infinite Scale for the first time, the proxy checks if that user already exists. This is done by querying the users service for users, where the attribute set in PROXY_USER_CS3_CLAIM matches the value of the OIDC claim configured in PROXY_USER_OIDC_CLAIM.

If the user does not exist, the proxy will create a new user via the graph service using the claim values configured in PROXY_AUTOPROVISION_CLAIM_USERNAME, PROXY_AUTOPROVISION_CLAIM_EMAIL and PROXY_AUTOPROVISION_CLAIM_DISPLAYNAME.

If the user does already exist, the proxy checks if the displayname has changed and updates that accordingly via graph service.

Unless the claim configured via PROXY_AUTOPROVISION_CLAIM_EMAIL is the same as the one set via PROXY_USER_OIDC_CLAIM the proxy will also check if the email address has changed and update that as well.

Next, the proxy will check if the user is a member of the groups configured in PROXY_AUTOPROVISION_CLAIM_GROUPS. It will add the user to the groups listed via the OIDC claim that holds the groups defined in the envvar and removes it from all other groups that he is currently a member of. Groups that do not exist in the external IDP yet will be created. Note: This can be a somewhat costly operation, especially if the user is a member of a large number of groups. If the group memberships of a user are changed in the IDP after the first login, it can take up to 5 minutes until the changes are reflected in Infinite Scale.

Claim Updates

OpenID Connect (OIDC) scopes are used by an application during authentication to authorize access to a user’s detail, like name, email or picture information. A scope can also contain among other things groups, roles, and permissions data. Each scope returns a set of attributes, which are called claims. The scopes an application requests, depends on which attributes the application needs. Once the user authorizes the requested scopes, the claims are returned in a token.

These issued JWT tokens are immutable and integrity-protected. Which means, any change in the source requires issuing a new token containing updated claims. On the other hand side, there is no active synchronisation process between the identity provider (IDP) who issues the token and Infinite Scale. The earliest possible time that Infinite Scale will notice changes is, when the current access token has expired and a new access token is issued by the IDP, or the user logs out and relogs in.

  • For resource optimisation, Infinite Scale skips any checks and updates on groupmemberships, if the last update happened less than 5min ago.

  • Infinite Scale can’t differentiate between a group being renamed in the IDP and users being reassigned to a different group.

  • Infinite Scale does not get aware when a group is being deleted in the IDP, a new claim will not hold any information from the deleted group. Infinite Scale does not track a claim history to compare.

Impacts

For shares or space memberships based on groups, a renamed or deleted group will impact accessing the resource:

  • There is no user notification about the inability accessing the resource.

  • The user will only experience rejected access.

  • This also applies for connected apps like the Desktop, iOS or Android app!

To give access for rejected users on a resource, one with rights to share must update the group information.

Automatic Quota Assignments

It is possible to automatically assign a specific quota to new users depending on their role. To do this, you need to configure a mapping between roles defined by their ID and the quota in bytes. The assignment can only be done via a yaml configuration and not via environment variables. See the following proxy.yaml config snippet for a configuration example.

role_quotas:
    <role ID1>: <quota1>
    <role ID2>: <quota2>

Automatic Role Assignments

When users log in, they automatically get a role assigned. The automatic role assignment can be configured in different ways. The PROXY_ROLE_ASSIGNMENT_DRIVER environment variable (or the driver setting in the role_assignment section of the configuration file) selects which mechanism to use for the automatic role assignment.

  • When PROXY_ROLE_ASSIGNMENT_DRIVER is set to default, all users that do not have a role assigned at the time of their first login will get the role 'user' assigned. (This is also the default behavior if PROXY_ROLE_ASSIGNMENT_DRIVER is unset.

  • When PROXY_ROLE_ASSIGNMENT_DRIVER is set to oidc, the role assignment for a user will happen based on the values of an OpenID Connect Claim of that user. The name of the OpenID Connect Claim to be used for the role assignment can be configured via the PROXY_ROLE_ASSIGNMENT_OIDC_CLAIM environment variable. It is also possible to define a mapping of claim values to role names defined in ownCloud Infinite Scale via a yaml configuration. See the following proxy.yaml snippet for an example.

    role_assignment:
        driver: oidc
        oidc_role_mapper:
            role_claim: ocisRoles
            role_mapping:
                - role_name: admin
                  claim_value: myAdminRole
                - role_name: spaceadmin
                  claim_value: mySpaceAdminRole
                - role_name: user
                  claim_value: myUserRole
                - role_name: guest
                  claim_value: myGuestRole

    This would assign the role admin to users with the value myAdminRole in the claim ocisRoles. The role user to users with the values myUserRole in the claim ocisRoles and so on.

    Claim values that are not mapped to a specific Infinite Scale role will be ignored.

    An Infinite Scale user can only have a single role assigned. If the configured role_mapping and a user’s claim values result in multiple possible roles for a user, the order in which the role mappings are defined in the configuration is important. The first role in the role_mappings where the claim_value matches a value from the user’s roles claim will be assigned to the user. So if e.g. a user’s ocisRoles claim has the values myUserRole and mySpaceAdminRole that user will get the ocis role spaceadmin assigned (because spaceadmin appears before user in the above sample configuration).

    If a user’s claim values don’t match any of the configured role mappings, an error will be logged and the user will not be able to log in.

    The default role_claim (or PROXY_ROLE_ASSIGNMENT_OIDC_CLAIM) is roles. The default role_mapping is:

    - role_name: admin
      claim_value: ocisAdmin
    - role_name: spaceadmin
      claim_value: ocisSpaceAdmin
    - role_name: user
      claim_value: ocisUser
    - role_name: guest
      claim_value: ocisGuest

Recommendations for Production Deployments

  • The proxy service is the only service communicating to the outside and therefore needs the usual protection against DDOS, Slow Loris or other attack vectors. All other services are not exposed to the outside, but also need protective measures when it comes to distributed setups like when using container orchestration over various physical servers.

  • In a production deployment, you want to have basic authentication (PROXY_ENABLE_BASIC_AUTH) disabled which is the default state. You should also set up a firewall to only allow requests to the proxy service or the reverse proxy if you have one. Requests to the other services should be blocked by the firewall.

Presigned Urls

Important, also see section caching above.

To authenticate presigned URLs, the proxy service needs to read the signing keys from a store that is populated by the ocs service.

The following stores can be configured via the OCS_PRESIGNEDURL_SIGNING_KEYS_STORE environment variable:

  • nats-js-kv
    Stores data using key-value-store feature of nats jetstream.

  • redis-sentinel
    Stores data in a configured Redis Sentinel cluster.

  • The memory store cannot be used as they do not share the memory from the ocs service signing key memory store, even in a single process.

  • Make sure to configure the same store for pre-signed URLs as here in the proxy service.

Store specific notes:

  • When using redis-sentinel
    The Redis master to use is configured via e.g. OCS_PRESIGNEDURL_SIGNING_KEYS_STORE_NODES in the form of <sentinel-host>:<sentinel-port>/<redis-master> like 10.10.0.200:26379/mymaster.

  • When using nats-js-kv
    It is recommended to set PROXY_PRESIGNEDURL_SIGNING_KEYS_STORE_NODES to the same value as OCS_PRESIGNEDURL_SIGNING_KEYS_STORE_NODES. That way the proxy service uses the same nats instance as the ocs service.

  • When using ocisstoreservice
    The OCS_PRESIGNEDURL_SIGNING_KEYS_STORE_NODES must be set to the service name com.owncloud.api.store. It does not support TTL and stores the presigning keys indefinitely. Also, the store service needs to be started.

Special Settings

When using the Infinite Scale IDP service instead of an external IDP:

  • Use the environment variable OCIS_URL to define how Infinite Scale can be accessed; mandatory is the use of https as protocol for the URL.

  • If no reverse proxy is set up, the PROXY_TLS environment variable must be set to true because the embedded libreConnect shipped with the IDP service has a hard check if the connection is on TLS and uses the HTTPS protocol. If this mismatches, an error will be logged and no connection from the client can be established.

  • PROXY_TLS can be set to false if a reverse proxy is used and the https connection is terminated at the reverse proxy. When setting to false, the communication between the reverse proxy and Infinite Scale is not secured. If set to true, you must provide certificates.

Metrics

For details on monitoring see the Metrics for Prometheus documentation.

Caching

Important, also see section Presigned Urls below.

The proxy service can use a configured store via the global OCIS_CACHE_STORE environment variable.

Note that for each global environment variable, an independent service-based one might be available additionally. For precedences see Environment Variable Notes. Check the configuration section below. Supported stores are:

Store Type Description

memory

Basic in-memory store. Will not survive a restart.
Usually the default for caches. See the store environment variable for which one is used.

nats-js-kv

Stores data using key-value-store feature of NATS JetStream.
Usually the default for stores, see the store environment variable for which one is used.

redis-sentinel

Stores data in a configured Redis Sentinel cluster.

noop

Stores nothing. Useful for testing. Not recommended in production environments.

The proxy service can only be scaled if not using the memory store and the stores are configured identically over all instances!
If you have used one of the deprecated stores of a former version, you should reconfigure to use one of the supported ones as the deprecated stores will be removed in a later version.
Store specific notes
  • When using redis-sentinel:
    The Redis master to use is configured via e.g. OCIS_CACHE_STORE_NODES in the form of <sentinel-host>:<sentinel-port>/<redis-master> like 10.10.0.200:26379/mymaster.

  • When using nats-js-kv:

    • It is recommended to set OCIS_CACHE_STORE_NODES to the same value as OCIS_EVENTS_ENDPOINT. That way the cache uses the same nats instance as the event bus. See the Event Bus Configuration for more details.

    • Authentication can be added, if configured, via OCIS_CACHE_AUTH_USERNAME and OCIS_CACHE_AUTH_PASSWORD.

    • It is possible to set OCIS_CACHE_DISABLE_PERSISTENCE to instruct nats to not persist cache data on disc.

Event Bus Configuration

The Infinite Scale event bus can be configured by a set of environment variables.

  • If you are using a binary installation as described in Minimal Bare Metal Deployment or Bare Metal with systemd, the address of the event bus OCIS_EVENTS_ENDPOINT is predefined as localhost address without the need for further configuration, but changeable on demand.

  • In case of an orchestrated installation like with Docker or Kubernetes, the event bus must be an external service for scalability like a Redis Sentinel cluster or a key-value-store NATS JetStream. Both named stores are supported and also used in Caching and Persistence. The store used is not part of the Infinite Scale installation and must be separately provided and configured.

  • Note that from a configuration point of view, caching and persistence are independent of the event bus configuration.

Note that for each global environment variable, a service-based one might be available additionally. For precedences see Environment Variable Notes. Check the configuration section below.

Without the aim of completeness, see the list of environment variables to configure the event bus:

Envvar Description

OCIS_EVENTS_ENDPOINT

The address of the event system.

OCIS_EVENTS_CLUSTER

The clusterID of the event system. Mandatory when using NATS as event system.

OCIS_EVENTS_ENABLE_TLS

Enable TLS for the connection to the events broker.

OCIS_INSECURE

Whether to verify the server TLS certificates.

OCIS_EVENTS_AUTH_USERNAME

The username to authenticate with the events broker.

OCIS_EVENTS_AUTH_PASSWORD

The password to authenticate with the events broker.

Configuration

Environment Variables

The proxy 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.

  • master + Rolling 6.6.1

Environment variables for the proxy service
Name IV Type Default Value Description

OCIS_TRACING_ENABLED
PROXY_TRACING_ENABLED

pre5.0

bool

false

Activates tracing.

OCIS_TRACING_TYPE
PROXY_TRACING_TYPE

pre5.0

string

The type of tracing. Defaults to '', which is the same as 'jaeger'. Allowed tracing types are 'jaeger' and '' as of now.

OCIS_TRACING_ENDPOINT
PROXY_TRACING_ENDPOINT

pre5.0

string

The endpoint of the tracing agent.

OCIS_TRACING_COLLECTOR
PROXY_TRACING_COLLECTOR

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.

OCIS_LOG_LEVEL
PROXY_LOG_LEVEL

pre5.0

string

The log level. Valid values are: 'panic', 'fatal', 'error', 'warn', 'info', 'debug', 'trace'.

OCIS_LOG_PRETTY
PROXY_LOG_PRETTY

pre5.0

bool

false

Activates pretty log output.

OCIS_LOG_COLOR
PROXY_LOG_COLOR

pre5.0

bool

false

Activates colorized log output.

OCIS_LOG_FILE
PROXY_LOG_FILE

pre5.0

string

The path to the log file. Activates logging to this file if set.

PROXY_DEBUG_ADDR

pre5.0

string

127.0.0.1:9205

Bind address of the debug server, where metrics, health, config and debug endpoints will be exposed.

PROXY_DEBUG_TOKEN

pre5.0

string

Token to secure the metrics endpoint.

PROXY_DEBUG_PPROF

pre5.0

bool

false

Enables pprof, which can be used for profiling.

PROXY_DEBUG_ZPAGES

pre5.0

bool

false

Enables zpages, which can be used for collecting and viewing in-memory traces.

PROXY_HTTP_ADDR

pre5.0

string

0.0.0.0:9200

The bind address of the HTTP service.

PROXY_HTTP_ROOT

pre5.0

string

/

Subdirectory that serves as the root for this HTTP service.

PROXY_TRANSPORT_TLS_CERT

pre5.0

string

/var/lib/ocis/proxy/server.crt

Path/File name of the TLS server certificate (in PEM format) for the external http services. If not defined, the root directory derives from $OCIS_BASE_DATA_PATH/proxy.

PROXY_TRANSPORT_TLS_KEY

pre5.0

string

/var/lib/ocis/proxy/server.key

Path/File name for the TLS certificate key (in PEM format) for the server certificate to use for the external http services. If not defined, the root directory derives from $OCIS_BASE_DATA_PATH/proxy.

PROXY_TLS

pre5.0

bool

true

Enable/Disable HTTPS for external HTTP services. Must be set to 'true' if the built-in IDP service an no reverse proxy is used. See the text description for details.

OCIS_REVA_GATEWAY

pre5.0

string

com.owncloud.api.gateway

The CS3 gateway endpoint.

OCIS_GRPC_CLIENT_TLS_MODE

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.

OCIS_GRPC_CLIENT_TLS_CACERT

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.

OCIS_URL
OCIS_OIDC_ISSUER
PROXY_OIDC_ISSUER

pre5.0

string

https://localhost:9200

URL of the OIDC issuer. It defaults to URL of the builtin IDP.

OCIS_INSECURE
PROXY_OIDC_INSECURE

pre5.0

bool

false

Disable TLS certificate validation for connections to the IDP. Note that this is not recommended for production environments.

PROXY_OIDC_ACCESS_TOKEN_VERIFY_METHOD

pre5.0

string

jwt

Sets how OIDC access tokens should be verified. Possible values are 'none' and 'jwt'. When using 'none', no special validation apart from using it for accessing the IPD’s userinfo endpoint will be done. When using 'jwt', it tries to parse the access token as a jwt token and verifies the signature using the keys published on the IDP’s 'jwks_uri'.

PROXY_OIDC_SKIP_USER_INFO

pre5.0

bool

false

Do not look up user claims at the userinfo endpoint and directly read them from the access token. Incompatible with 'PROXY_OIDC_ACCESS_TOKEN_VERIFY_METHOD=none'.

OCIS_CACHE_STORE
PROXY_OIDC_USERINFO_CACHE_STORE

pre5.0

string

memory

The type of the cache store. Supported values are: 'memory', 'redis-sentinel', 'nats-js-kv', 'noop'. See the text description for details.

OCIS_CACHE_STORE_NODES
PROXY_OIDC_USERINFO_CACHE_STORE_NODES

pre5.0

[]string

[127.0.0.1:9233]

A list of nodes to access the configured store. This has no effect when 'memory' store is configured. Note that the behaviour how nodes are used is dependent on the library of the configured store. See the Environment Variable Types description for more details.

OCIS_CACHE_DATABASE

pre5.0

string

cache-userinfo

The database name the configured store should use.

PROXY_OIDC_USERINFO_CACHE_TABLE

pre5.0

string

The database table the store should use.

OCIS_CACHE_TTL
PROXY_OIDC_USERINFO_CACHE_TTL

pre5.0

Duration

10s

Default time to live for user info in the user info cache. Only applied when access tokens has no expiration. See the Environment Variable Types description for more details.

OCIS_CACHE_DISABLE_PERSISTENCE
PROXY_OIDC_USERINFO_CACHE_DISABLE_PERSISTENCE

pre5.0

bool

false

Disables persistence of the cache. Only applies when store type 'nats-js-kv' is configured. Defaults to false.

OCIS_CACHE_AUTH_USERNAME
PROXY_OIDC_USERINFO_CACHE_AUTH_USERNAME

5.0

string

The username to authenticate with the cache. Only applies when store type 'nats-js-kv' is configured.

OCIS_CACHE_AUTH_PASSWORD
PROXY_OIDC_USERINFO_CACHE_AUTH_PASSWORD

5.0

string

The password to authenticate with the cache. Only applies when store type 'nats-js-kv' is configured.

PROXY_OIDC_JWKS_REFRESH_INTERVAL

pre5.0

uint64

60

The interval for refreshing the JWKS (JSON Web Key Set) in minutes in the background via a new HTTP request to the IDP.

PROXY_OIDC_JWKS_REFRESH_TIMEOUT

pre5.0

uint64

10

The timeout in seconds for an outgoing JWKS request.

PROXY_OIDC_JWKS_REFRESH_RATE_LIMIT

pre5.0

uint64

60

Limits the rate in seconds at which refresh requests are performed for unknown keys. This is used to prevent malicious clients from imposing high network load on the IDP via ocis.

PROXY_OIDC_JWKS_REFRESH_UNKNOWN_KID

pre5.0

bool

true

If set to 'true', the JWKS refresh request will occur every time an unknown KEY ID (KID) is seen. Always set a 'refresh_limit' when enabling this.

PROXY_OIDC_REWRITE_WELLKNOWN

pre5.0

bool

false

Enables rewriting the /.well-known/openid-configuration to the configured OIDC issuer. Needed by the Desktop Client, Android Client and iOS Client to discover the OIDC provider.

OCIS_SERVICE_ACCOUNT_ID
PROXY_SERVICE_ACCOUNT_ID

5.0

string

The ID of the service account the service should use. See the 'auth-service' service description for more details.

OCIS_SERVICE_ACCOUNT_SECRET
PROXY_SERVICE_ACCOUNT_SECRET

5.0

string

The service account secret.

PROXY_ROLE_ASSIGNMENT_DRIVER

pre5.0

string

default

The mechanism that should be used to assign roles to user upon login. Supported values: 'default' or 'oidc'. 'default' will assign the role 'user' to users which don’t have a role assigned at the time they login. 'oidc' will assign the role based on the value of a claim (configured via PROXY_ROLE_ASSIGNMENT_OIDC_CLAIM) from the users OIDC claims.

PROXY_ROLE_ASSIGNMENT_OIDC_CLAIM

pre5.0

string

roles

The OIDC claim used to create the users role assignment.

PROXY_ENABLE_PRESIGNEDURLS

pre5.0

bool

true

Allow OCS to get a signing key to sign requests.

OCIS_CACHE_STORE
PROXY_PRESIGNEDURL_SIGNING_KEYS_STORE

5.0

string

nats-js-kv

The type of the signing key store. Supported values are: 'redis-sentinel', 'nats-js-kv' and 'ocisstoreservice' (deprecated). See the text description for details.

OCIS_CACHE_STORE_NODES
PROXY_PRESIGNEDURL_SIGNING_KEYS_STORE_NODES

5.0

[]string

[127.0.0.1:9233]

A list of nodes to access the configured store. Note that the behaviour how nodes are used is dependent on the library of the configured store. See the Environment Variable Types description for more details.

OCIS_CACHE_TTL
PROXY_PRESIGNEDURL_SIGNING_KEYS_STORE_TTL

5.0

Duration

12h0m0s

Default time to live for signing keys. See the Environment Variable Types description for more details.

OCIS_CACHE_DISABLE_PERSISTENCE
PROXY_PRESIGNEDURL_SIGNING_KEYS_STORE_DISABLE_PERSISTENCE

5.0

bool

true

Disables persistence of the store. Only applies when store type 'nats-js-kv' is configured. Defaults to true.

OCIS_CACHE_AUTH_USERNAME
PROXY_PRESIGNEDURL_SIGNING_KEYS_STORE_AUTH_USERNAME

5.0

string

The username to authenticate with the store. Only applies when store type 'nats-js-kv' is configured.

OCIS_CACHE_AUTH_PASSWORD
PROXY_PRESIGNEDURL_SIGNING_KEYS_STORE_AUTH_PASSWORD

5.0

string

The password to authenticate with the store. Only applies when store type 'nats-js-kv' is configured.

PROXY_ACCOUNT_BACKEND_TYPE

pre5.0

string

cs3

Account backend the PROXY service should use. Currently only 'cs3' is possible here.

PROXY_USER_OIDC_CLAIM

pre5.0

string

preferred_username

The name of an OpenID Connect claim that is used for resolving users with the account backend. The value of the claim must hold a per user unique, stable and non re-assignable identifier. The availability of claims depends on your Identity Provider. There are common claims available for most Identity providers like 'email' or 'preferred_username' but you can also add your own claim.

PROXY_USER_CS3_CLAIM

pre5.0

string

username

The name of a CS3 user attribute (claim) that should be mapped to the 'user_oidc_claim'. Supported values are 'username', 'mail' and 'userid'.

OCIS_MACHINE_AUTH_API_KEY
PROXY_MACHINE_AUTH_API_KEY

pre5.0

string

Machine auth API key used to validate internal requests necessary to access resources from other services.

PROXY_AUTOPROVISION_ACCOUNTS

pre5.0

bool

false

Set this to 'true' to automatically provision users that do not yet exist in the users service on-demand upon first sign-in. To use this a write-enabled libregraph user backend needs to be setup an running.

PROXY_AUTOPROVISION_CLAIM_USERNAME

6.0.0

string

preferred_username

The name of the OIDC claim that holds the username.

PROXY_AUTOPROVISION_CLAIM_EMAIL

6.0.0

string

email

The name of the OIDC claim that holds the email.

PROXY_AUTOPROVISION_CLAIM_DISPLAYNAME

6.0.0

string

name

The name of the OIDC claim that holds the display name.

PROXY_AUTOPROVISION_CLAIM_GROUPS

6.1.0

string

groups

The name of the OIDC claim that holds the groups.

PROXY_ENABLE_BASIC_AUTH

pre5.0

bool

false

Set this to true to enable 'basic authentication' (username/password).

PROXY_INSECURE_BACKENDS

pre5.0

bool

false

Disable TLS certificate validation for all HTTP backend connections.

PROXY_HTTPS_CACERT

pre5.0

string

Path/File for the root CA certificate used to validate the server’s TLS certificate for https enabled backend services.

PROXY_ENABLE_APP_AUTH

7.0.0

bool

false

Allow app authentication. This can be used to authenticate 3rd party applications. Note that auth-app service must be running for this feature to work.

PROXY_POLICIES_QUERY

pre5.0

string

Defines the 'Complete Rules' variable defined in the rego rule set this step uses for its evaluation. Rules default to deny if the variable was not found.

PROXY_CSP_CONFIG_FILE_LOCATION

6.0.0

string

The location of the CSP configuration file.

OCIS_EVENTS_ENDPOINT
PROXY_EVENTS_ENDPOINT

7.0.0

string

127.0.0.1:9233

The address of the event system. The event system is the message queuing service. It is used as message broker for the microservice architecture. Set to a empty string to disable emitting events.

OCIS_EVENTS_CLUSTER
PROXY_EVENTS_CLUSTER

7.0.0

string

ocis-cluster

The clusterID of the event system. The event system is the message queuing service. It is used as message broker for the microservice architecture.

OCIS_INSECURE
PROXY_EVENTS_TLS_INSECURE

7.0.0

bool

false

Whether to verify the server TLS certificates.

OCIS_EVENTS_TLS_ROOT_CA_CERTIFICATE
PROXY_EVENTS_TLS_ROOT_CA_CERTIFICATE

7.0.0

string

The root CA certificate used to validate the server’s TLS certificate. If provided PROXY_EVENTS_TLS_INSECURE will be seen as false.

OCIS_EVENTS_ENABLE_TLS
PROXY_EVENTS_ENABLE_TLS

7.0.0

bool

false

Enable TLS for the connection to the events broker. The events broker is the ocis service which receives and delivers events between the services.

OCIS_EVENTS_AUTH_USERNAME
PROXY_EVENTS_AUTH_USERNAME

7.0.0

string

The username to authenticate with the events broker. The events broker is the ocis service which receives and delivers events between the services.

OCIS_EVENTS_AUTH_PASSWORD
PROXY_EVENTS_AUTH_PASSWORD

7.0.0

string

The password to authenticate with the events broker. The events broker is the ocis service which receives and delivers events between the services.

YAML Example

  • master + Rolling 6.6.1

# Autogenerated
# Filename: proxy-config-example.yaml

tracing:
  enabled: false
  type: ""
  endpoint: ""
  collector: ""
log:
  level: ""
  pretty: false
  color: false
  file: ""
debug:
  addr: 127.0.0.1:9205
  token: ""
  pprof: false
  zpages: false
http:
  addr: 0.0.0.0:9200
  root: /
  tls_cert: /var/lib/ocis/proxy/server.crt
  tls_key: /var/lib/ocis/proxy/server.key
  tls: true
reva:
  address: com.owncloud.api.gateway
  tls:
    mode: ""
    cacert: ""
grpc_client_tls: null
role_quotas: {}
policies:
- name: ocis
  routes:
  - endpoint: /
    service: com.owncloud.web.web
    unprotected: true
  - endpoint: /.well-known/ocm
    service: com.owncloud.web.ocm
    unprotected: true
  - endpoint: /.well-known/webfinger
    service: com.owncloud.web.webfinger
    unprotected: true
  - endpoint: /.well-known/openid-configuration
    service: com.owncloud.web.idp
    unprotected: true
  - endpoint: /branding/logo
    service: com.owncloud.web.web
  - endpoint: /konnect/
    service: com.owncloud.web.idp
    unprotected: true
  - endpoint: /signin/
    service: com.owncloud.web.idp
    unprotected: true
  - endpoint: /archiver
    service: com.owncloud.web.frontend
  - endpoint: /ocs/v2.php/apps/notifications/api/v1/notifications/sse
    service: com.owncloud.sse.sse
  - endpoint: /ocs/v2.php/apps/notifications/api/v1/notifications
    service: com.owncloud.web.userlog
  - type: regex
    endpoint: /ocs/v[12].php/cloud/user/signing-key
    service: com.owncloud.web.ocs
  - type: regex
    endpoint: /ocs/v[12].php/config
    service: com.owncloud.web.frontend
    unprotected: true
  - endpoint: /sciencemesh/
    service: com.owncloud.web.ocm
  - endpoint: /ocm/
    service: com.owncloud.web.ocm
  - endpoint: /ocs/
    service: com.owncloud.web.frontend
  - type: query
    endpoint: /remote.php/?preview=1
    service: com.owncloud.web.webdav
  - type: regex
    method: REPORT
    endpoint: (/remote.php)?/(web)?dav
    service: com.owncloud.web.webdav
  - type: query
    endpoint: /dav/?preview=1
    service: com.owncloud.web.webdav
  - type: query
    endpoint: /webdav/?preview=1
    service: com.owncloud.web.webdav
  - endpoint: /remote.php/
    service: com.owncloud.web.ocdav
  - endpoint: /dav/
    service: com.owncloud.web.ocdav
  - endpoint: /webdav/
    service: com.owncloud.web.ocdav
  - endpoint: /status
    service: com.owncloud.web.ocdav
    unprotected: true
  - endpoint: /status.php
    service: com.owncloud.web.ocdav
    unprotected: true
  - endpoint: /index.php/
    service: com.owncloud.web.ocdav
  - endpoint: /apps/
    service: com.owncloud.web.ocdav
  - endpoint: /data
    service: com.owncloud.web.frontend
    unprotected: true
  - endpoint: /app/list
    service: com.owncloud.web.frontend
    unprotected: true
  - endpoint: /app/
    service: com.owncloud.web.frontend
  - endpoint: /graph/v1beta1/extensions/org.libregraph/activities
    service: com.owncloud.web.activitylog
  - endpoint: /graph/v1.0/invitations
    service: com.owncloud.web.invitations
  - endpoint: /graph/
    service: com.owncloud.web.graph
  - endpoint: /api/v0/settings
    service: com.owncloud.web.settings
  - endpoint: /auth-app/tokens
    service: com.owncloud.web.auth-app
additional_policies: []
oidc:
  issuer: https://localhost:9200
  insecure: false
  access_token_verify_method: jwt
  skip_user_info: false
  user_info_cache:
    store: memory
    addresses:
    - 127.0.0.1:9233
    database: cache-userinfo
    table: ""
    ttl: 10s
    disable_persistence: false
    username: ""
    password: ""
  jwks:
    refresh_interval: 60
    refresh_timeout: 10
    refresh_limit: 60
    refresh_unknown_kid: true
  rewrite_well_known: false
service_account:
  service_account_id: ""
  service_account_secret: ""
role_assignment:
  driver: default
  oidc_role_mapper:
    role_claim: roles
    role_mapping:
    - role_name: admin
      claim_value: ocisAdmin
    - role_name: spaceadmin
      claim_value: ocisSpaceAdmin
    - role_name: user
      claim_value: ocisUser
    - role_name: user-light
      claim_value: ocisGuest
policy_selector:
  static:
    policy: ocis
  claims: null
  regex: null
pre_signed_url:
  allowed_http_methods:
  - GET
  enabled: true
  signing_keys:
    store: nats-js-kv
    addresses:
    - 127.0.0.1:9233
    ttl: 12h0m0s
    disable_persistence: true
    username: ""
    password: ""
account_backend: cs3
user_oidc_claim: preferred_username
user_cs3_claim: username
machine_auth_api_key: ""
auto_provision_accounts: false
auto_provision_claims:
  username: preferred_username
  email: email
  display_name: name
  groups: groups
enable_basic_auth: false
insecure_backends: false
backend_https_cacert: ""
auth_middleware:
  credentials_by_user_agent: {}
  allow_app_auth: false
policies_middleware:
  query: ""
csp_config_file_location: ""
events:
  endpoint: 127.0.0.1:9233
  cluster: ocis-cluster
  tls_insecure: false
  tls_root_ca_certificate: ""
  enable_tls: false
  username: ""
  password: ""