49 lines
2.4 KiB
Markdown
Executable File
49 lines
2.4 KiB
Markdown
Executable File
---
|
|
title: Auth-Bearer
|
|
date: 2025-04-24T00:36:06.614809152Z
|
|
weight: 20
|
|
geekdocRepo: https://github.com/owncloud/ocis
|
|
geekdocEditPath: edit/master/services/auth-bearer
|
|
geekdocFilePath: README.md
|
|
geekdocCollapseSection: true
|
|
---
|
|
|
|
<!-- Do not edit this file, it is autogenerated. Edit the service README.md instead -->
|
|
|
|
## Abstract
|
|
|
|
|
|
The oCIS Auth Bearer service communicates with the configured OpenID Connect identity provider to authenticate requests. OpenID Connect is the default authentication mechanism for all clients: web, desktop and mobile. Basic auth is only used for testing and has to be explicity enabled.
|
|
|
|
|
|
## Table of Contents
|
|
|
|
* [The `auth` Service Family](#the-`auth`-service-family)
|
|
* [Built in OpenID Connect Identity Provider](#built-in-openid-connect-identity-provider)
|
|
* [Scalability](#scalability)
|
|
* [Example Yaml Config](#example-yaml-config)
|
|
|
|
## The `auth` Service Family
|
|
|
|
ocis uses serveral 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 services exist:
|
|
- `auth-app` handles authentication of external 3rd party apps
|
|
- `auth-basic` handles basic authentication
|
|
- `auth-bearer` handles oidc authentication
|
|
- `auth-machine` handles interservice authentication when a user is impersonated
|
|
- `auth-service` handles interservice authentication when using service accounts
|
|
|
|
## Built in OpenID Connect Identity Provider
|
|
|
|
A default oCIS deployment will start a [built in OpenID Connect identity provider](https://github.com/owncloud/ocis/tree/master/services/idp) but can be configured to use an external one as well.
|
|
|
|
## Scalability
|
|
|
|
There is no persistance or caching. The proxy caches verified auth bearer tokens. Requests will be forwarded to the identity provider. Therefore, multiple instances of the `auth-bearer` service can be started without further configuration. Currently, the auth registry used by the gateway can only use a single instance of the service. To use more than one auth provider per deployment you need to scale the gateway.
|
|
|
|
This will change when we use the service registry in more places and use micro clients to select an instance of a service.
|
|
## Example Yaml Config
|
|
{{< include file="services/_includes/auth-bearer-config-example.yaml" language="yaml" >}}
|
|
|
|
{{< include file="services/_includes/auth-bearer_configvars.md" >}}
|
|
|