Allow for role name to be used as entity alias #226
+160
−89
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Overview
Allows for the name of the role being used during authentication to be provided as the name of the entity alias. This allows for JWTs with many distinct, disparate claims to effectively be mapped to a single identity. Examples and more explanation can be found in #217.
Closes #217.
If this is something y'all would be willing to accept, I can make the documentation PR. 😄
Design of Change
Adds a boolean to roles on the JWT auth backend (
role_name_as_entity_alias
) which is checked at login and if true causes the name of the role being used to be provided as the entity alias name. This defaults tofalse
.Related Issues/Pull Requests
Testing Output
Contributor Checklist