-
-
Notifications
You must be signed in to change notification settings - Fork 916
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
website/integrations: vault: add external group documentation #11994
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: Mattis Haase <[email protected]>
✅ Deploy Preview for authentik-docs ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
✅ Deploy Preview for authentik-storybook canceled.
|
@@ -88,8 +88,64 @@ vault write auth/oidc/role/reader \ | |||
policies="reader" | |||
``` | |||
|
|||
## External Groups | |||
|
|||
If you wish to manage group membership in vault via Authentik you have to use [external groups](https://developer.hashicorp.com/vault/tutorials/auth-methods/oidc-auth#create-an-external-vault-group). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you wish to manage group membership in vault via Authentik you have to use [external groups](https://developer.hashicorp.com/vault/tutorials/auth-methods/oidc-auth#create-an-external-vault-group). | |
If you wish to manage group membership in Hashicorp Vault via Authentik you have to use [external groups](https://developer.hashicorp.com/vault/tutorials/auth-methods/oidc-auth#create-an-external-vault-group). |
:::note | ||
If you intend to create [external groups](https://developer.hashicorp.com/vault/tutorials/auth-methods/oidc-auth#create-an-external-vault-group) in Vault to manage user access the OIDC role will need to specifically request a custom scope using the `oidc_scopes` option when creating the OIDC role. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does one no longer need to use the oidc_scopes
option at all?
|
||
### Step 1 | ||
|
||
In authentik, edit the oidc provider created above. Unser "Advanced protocol settings" add "authentik default OAuth Mapping: OpenID 'profile'". This includes the "groups" mapping. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In authentik, edit the oidc provider created above. Unser "Advanced protocol settings" add "authentik default OAuth Mapping: OpenID 'profile'". This includes the "groups" mapping. | |
In authentik, edit the OIDC provider created above. Unser **Advanced protocol settings** add `authentik default OAuth Mapping: OpenID 'profile'` This includes the groups mapping. |
|
||
### Step 2 | ||
|
||
In hashicorp vault, change the reader role |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In hashicorp vault, change the reader role | |
In Vault, change the reader role to have the following settings: |
oidc_scopes=[ "openid profile email" ] | ||
``` | ||
|
||
Add a group |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add a group | |
Add a group. |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #11994 +/- ##
==========================================
- Coverage 92.58% 92.56% -0.02%
==========================================
Files 761 761
Lines 37822 37822
==========================================
- Hits 35016 35009 -7
- Misses 2806 2813 +7
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
type="external" | ||
``` | ||
|
||
Get the canonical id of the group |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Get the canonical id of the group | |
Get the canonical ID of the group. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If this is the canonical ID, let's add this full name: vault_identity_group
vault list identity/group/id | ||
``` | ||
|
||
Get the id of the oidc accessor |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Get the id of the oidc accessor | |
Get the ID of the OIDC accessor. |
``` | ||
|
||
|
||
Add a group alias, this maps the group to the oidc backend |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add a group alias, this maps the group to the oidc backend | |
Add a group alias; this alias maps the group to the OIDC backend. |
canonical_id="group_id" \ | ||
name="group name in authentik" | ||
``` | ||
|
||
You should then be able to sign in via OIDC |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you add a period at end of this sentence, please?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks so much for adding this additional, important info! A couple of edits and suggestions, then let's git it merged! Thanks again.
You might need to run |
I implemented the changes in a new commit. |
Details
This PR changes the documentation page https://docs.goauthentik.io/integrations/services/hashicorp-vault/.
It adds more in-depth explanation on how to integrate authentik with hashicorp vault when wanting to use external groups.