-
Notifications
You must be signed in to change notification settings - Fork 83
User Auth Providers #1745
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
Merged
Merged
User Auth Providers #1745
Changes from all commits
Commits
Show all changes
62 commits
Select commit
Hold shift + click to select a range
0851f22
Auth Objects docs:
phil198 3ff49f1
Update modules/ROOT/pages/authentication-authorization/auth-objects.adoc
phil198 70c9539
Update modules/ROOT/pages/authentication-authorization/manage-users.adoc
phil198 1d9cd7e
Auth Objects docs:
phil198 0864470
pr review comments
phil198 8c29c86
pr review comments
phil198 76d8ebb
use the term `Auth Provider` instead of `Auth Object`
phil198 89c346b
rewording
phil198 860bb43
clarifying what `<key><value>`s are allowed
phil198 d3f4644
pr review comments
phil198 cdb1491
add example for multiple ldap trees
phil198 58ca963
Apply suggestions from code review
phil198 e988b8b
pr review comments
phil198 e425718
pr review comments
phil198 69ce049
pr review comments
phil198 16c330d
pr review comments
phil198 303608b
Apply suggestions from code review
phil198 3bb38cc
pr review comments
phil198 c7bf5e3
Apply suggestions from code review
phil198 44d473e
pr review comments
phil198 4b33ada
pr review comments
phil198 a2e27f3
document and link to the `require_local_user` setting
phil198 491f9dc
pr review comments
phil198 f81fd91
pr review comments
phil198 4404e2a
Update modules/ROOT/pages/authentication-authorization/manage-users.adoc
phil198 e56f30c
unifiying config description
phil198 519f254
Update modules/ROOT/pages/configuration/configuration-settings.adoc
phil198 701cd54
pr review comments
phil198 c0cef00
adding "migrating" note
phil198 340488f
adding SHOW USERS WITH AUTH description
phil198 6f266a2
pr review comments
phil198 3fde3c2
updating privilege svgs
phil198 a30d8a6
updating privilege svg width
phil198 d461462
Apply suggestions from code review
phil198 c087c8c
Apply suggestions from code review
phil198 fcf21e9
pr review comments
phil198 89636ea
pr review comments
phil198 8cfad89
convert the label to a role
renetapopova 9647b0d
editorial review of the PR
renetapopova 4ed694a
Update modules/ROOT/pages/authentication-authorization/ldap-integrati…
renetapopova 10e6ed5
Update modules/ROOT/pages/authentication-authorization/manage-users.adoc
renetapopova 2049ab8
Update modules/ROOT/pages/authentication-authorization/auth-providers…
renetapopova ae52401
Update modules/ROOT/pages/authentication-authorization/auth-providers…
renetapopova 35fafde
Update modules/ROOT/pages/authentication-authorization/auth-providers…
renetapopova d509b3e
Update modules/ROOT/pages/authentication-authorization/auth-providers…
renetapopova 95d1d02
Update modules/ROOT/pages/authentication-authorization/manage-users.adoc
renetapopova 6ea6053
Update modules/ROOT/pages/authentication-authorization/manage-users.adoc
renetapopova 70dfc13
Update modules/ROOT/pages/tutorial/tutorial-sso-configuration.adoc
renetapopova 9ffa139
Update modules/ROOT/pages/tutorial/tutorial-sso-configuration.adoc
renetapopova a3fa746
Update modules/ROOT/pages/tutorial/tutorial-sso-configuration.adoc
renetapopova 98b573f
Update modules/ROOT/pages/authentication-authorization/manage-users.adoc
renetapopova 58bd7a2
Update modules/ROOT/pages/authentication-authorization/manage-users.adoc
Hunterness cd8f489
add native to the manage users
renetapopova 5943694
revert the set password change not required descriptions
renetapopova 4f56af7
refer to the examples in the respective sections
renetapopova 4f52fc5
Update modules/ROOT/pages/authentication-authorization/manage-users.adoc
renetapopova 5a19818
Update modules/ROOT/pages/authentication-authorization/manage-users.adoc
renetapopova 9ddb616
Update modules/ROOT/pages/authentication-authorization/manage-users.adoc
renetapopova a3cfb43
Update modules/ROOT/pages/authentication-authorization/manage-users.adoc
renetapopova 6cde04e
Update modules/ROOT/pages/authentication-authorization/manage-users.adoc
renetapopova ff5bcd3
Update modules/ROOT/pages/authentication-authorization/manage-users.adoc
renetapopova ab3e9d6
add that changed required is `null` if the user has `native` auth dis…
renetapopova File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 1 addition & 9 deletions
10
modules/ROOT/images/privileges_grant_and_deny_syntax_dbms_privileges.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
69 changes: 69 additions & 0 deletions
69
modules/ROOT/pages/authentication-authorization/auth-providers.adoc
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,69 @@ | ||
| :description: This section explains how to use Cypher to manage authentication and authorization at the user level using Cypher. | ||
| :page-role: enterprise-edition new-5.24 | ||
|
|
||
| [[access-control-auth-providers]] | ||
| = User auth providers | ||
|
|
||
| Authentication and authorization can be controlled on a user level using Cypher by setting auth providers on users. | ||
|
|
||
| To use auth providers, you need to set the xref:configuration/configuration-settings.adoc#config_dbms.security.require_local_user[`dbms.security.require_local_user`] configuration setting to `true`. | ||
| This setting mandates that users with the relevant auth provider attached to them must exist in the database before they can authenticate and authorize with that auth provider. | ||
|
|
||
| User auth providers allow you to link externally-defined users (e.g., in a third-party ID provider like OIDC or LDAP) to the Neo4j internal user model. | ||
| The internal model can define roles (authorization), `SUSPENDED` status, `HOME DATABASE`, and metadata such as the unique displayed name of the user. | ||
| For consistency, you can also define `native` (password-based) auth using the auth provider syntax, including native-only users (i.e., users who can only authenticate with a password). | ||
|
|
||
| == Use cases | ||
|
|
||
| User auth providers can be used for a variety of use cases, including: | ||
|
|
||
| * Provisioning different auth providers (including native username/password auth) for different users. | ||
| * Setting an arbitrary easy username for a user while using an external unique identifier (like `sub` for OIDC auths, which itself is not a user-friendly value). | ||
| * Setting `HOME DATABASE` for externally authenticated users. | ||
| * Setting `SUSPENDED` status for an externally authenticated user. | ||
| * Using native authorization to manage roles for externally authenticated users. | ||
| * Retaining full control of which users can authenticate from within the database. | ||
|
|
||
| == How it works | ||
|
|
||
| When a user authenticates, their identifying attributes are checked against the relevant property of the auth providers in the database. | ||
| If there is a match, then the user is linked to the Neo4j user and authorized according to the DBMS security configuration settings that match the name of the matching auth provider. | ||
|
|
||
| How the matching lookup is done depends on the type of provider. | ||
| For example: | ||
|
|
||
| * For an OIDC provider, the claim configured by xref:configuration/configuration-settings.adoc#config_dbms.security.oidc.-provider-.claims.username[`dbms.security.oidc.mysso.claims.username`] (default `sub`) is taken from the token and is used to look up an auth provider whose `ID` and `provider` properties match the `sub` and provider respectively of the OIDC provider. | ||
| * For an LDAP provider, the `dn` is used to look up an auth provider with a `provider` property of `ldap` and an `ID` property that matches the supplied `dn`. | ||
| * For the `native` (username/password) provider, the supplied username itself is used to look up the auth provider. | ||
|
|
||
| == Enabling user auth providers mode | ||
|
|
||
| To enable user auth providers mode, set the configuration setting xref:configuration/configuration-settings.adoc#config_dbms.security.require_local_user[`dbms.security.require_local_user`] to `true`. | ||
| This setting mandates that users with the relevant auth provider attached to them must exist in the database before they can authenticate and authorize with that auth provider. | ||
|
|
||
| When the user authenticates, Neo4j searches for a user with a matching authentication provider. | ||
| If a match is found, the user can log in and be authorized successfully. | ||
|
|
||
| == Migrating to auth providers mode | ||
|
|
||
| If you have existing users in the database and want to migrate to auth providers mode, you can use the `ALTER USER ... SET AUTH` command to attach an auth provider to each of them. | ||
| Until you change `dbms.security.require_local_user` to `true`, this will not impact the users' ability to authenticate and authorize as they always have done. | ||
|
|
||
| Once the process of adding auth providers to your users finishes, you can set `dbms.security.require_local_user` to `true` and restart the DBMS to complete the migration. | ||
| After this time, only users with a corresponding auth provider in the database will be able to authenticate and authorize. | ||
|
|
||
| [NOTE] | ||
| ==== | ||
| Existing users created using the original `CREATE USER ... SET PASSWORD` command implicitly have the native (username/password) auth provider, so you do not need to add it explicitly using `SET AUTH`. | ||
|
|
||
| To verify which auth providers are attached to a user, use the xref:authentication-authorization/manage-users.adoc#access-control-list-users[`SHOW USERS WITH AUTH`] command. | ||
| ==== | ||
|
|
||
| == Examples | ||
|
|
||
| For examples of how to use auth providers with different authentication providers, see the following sections: | ||
|
|
||
| - xref:authentication-authorization/sso-integration.adoc#auth-sso-auth-providers[Configure SSO at the user level using auth providers] | ||
| - xref:authentication-authorization/manage-users.adoc#access-control-create-users[Creating users] | ||
| - xref:authentication-authorization/ldap-integration.adoc#auth-ldap-auth-providers[Configure authentication/authorization at the user level using LDAP as an auth provider] | ||
|
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.