-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Closed
Labels
area/openid-connectOpenID Connect 1.0 / OAuth 2.0 related features/bugsOpenID Connect 1.0 / OAuth 2.0 related features/bugsstatus/needs-designRequires formal design process via a discussion or feature requestRequires formal design process via a discussion or feature requesttype/featureRequest for adding a new featureRequest for adding a new feature
Milestone
Description
Feature Request
This is a feature request covering the eventual design of a feature.
Description
Important Notes:
- Users should be able to apply attribute mappings in differing ways such as a header etc. Should reconsider the design with this in mind.
The idea is allow admins to map attribtues from the authentication backend to other elements within the application. For starters this would be useful to map specific attributes to specific claims in OIDC. This however could potentially be applied to other areas in the future such as access control (Remote-* headers).
Proposed Config Example:
attribute_mapping:
default:
- name: manager
source: manager
scope: profile
gitea:
- name: email
source: alternateEmail
scope: email
- name: manager
source: manager
scope: profile
custom_headers:
- name: Remote-Manager
source: manager
access_control:
rules:
- domain: example.com
policy: bypass
attribute_mapping: custom_headers
identity_providers:
oidc:
clients:
- id: gitea
attribute_mapping: gitea
Proposed User File Example:
users:
john:
displayname: "John Doe"
password: "$argon2id$v=19$m=65536,t=3,p=2$BpLnfgDsc2WD8F2q$o/vzA4myCqZZ36bUGsDY//8mKUYNZZaR0t4MFFSs+iM"
email: john.doe@authelia.com
groups:
- admins
- dev
custom_attributes:
manager: Fred J
Rules/Points:
- The mapping named default would set overrides for anything not specifically configured to use another mapping.
- The standard values for all claims will be applied to all tokens unless override by the mapping.
- Storage of attributes:
- The storage of user information will be refactored into a memory cache instead of being part of the session.
- The only things stored in the session after this date will be the username and any session locked information.
- The user cache will have a TTL which when expired will trigger the check of the authentication backend for updated information instead of handling this in the handlers package.
- All attributes required by a mapping will be loaded when user information is requested if they are available. If the attributes do not exist they will be ignored for that user.
- Mappings could potentially be restricted to specific scopes, so multiple clients with different scope options could share the same mapping without having all mappings apply.
- We would have to restrict the potential mapping names so that important claims cannot be override. For example sub, iat, etc.
Use Case
Mapping attributes in a customized way.
Leptopoda, csarn, gutoandreollo, tetofonta, TheEaterr and 24 more
Metadata
Metadata
Assignees
Labels
area/openid-connectOpenID Connect 1.0 / OAuth 2.0 related features/bugsOpenID Connect 1.0 / OAuth 2.0 related features/bugsstatus/needs-designRequires formal design process via a discussion or feature requestRequires formal design process via a discussion or feature requesttype/featureRequest for adding a new featureRequest for adding a new feature