Skip to content

Conversation

@evelinadanielsson
Copy link
Contributor

We have added OIDC credential forwarding as an additional way to configure a remote database alias. We need to update and add documentation to describe how it is supposed to be used and how it works.

@evelinadanielsson
Copy link
Contributor Author

evelinadanielsson commented Oct 30, 2025

Maybe we should have a figure showing the OIDC flow as well... Something like the one bellow. As of now, the added documentation is written as if there is a figure included.
example_OIDC

@l-heemann l-heemann self-assigned this Oct 31, 2025
Comment on lines 390 to 391
When creating a remote database alias, the credentials used to target to the remote DBMS need to be specified. This can be done by providing the credentials of a native user, or
by forwarding the OIDC credentials of the user logged in to the local DBMS.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We probably need to have one of these version tags somewhere indicating that CREDENTIAL FORWARDING is new.
Bildschirmfoto 2025-10-31 um 09 20 23

I believe we would want that to show the version in which we set internal.cypher.enable_oidc_credential_forwarding to default to true. Before we set that flag to true I think we would want the SHOW updates to be done and also have done our manual testing.

Question for the docs reviewer: Do we ever document features that aren't released yet, e.g. "This feature is in beta and you need to set config x.y.z=true to access it"

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've added a few labels now

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sometimes we do document them; sometimes we don't. If we document them, then we also label them with beta, and the version of the feature is introduced. But I don't know when we do one or the other. I guess it's a PR decision.

Comment on lines 201 to 267
. Set up SSO and support for the identity provider.
. Map the identity provider groups to the Neo4j roles. This is where the permission to use the remote database alias is set.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we might want more details here. I.e. the same OIDC config as for B, and maybe the command to create the alias and the commands to give Carol a role with access on the alias.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Duplicated and moved the Manage remote database aliases section to be included under both setup examples. A bit of duplicate information but might be a better way of having it, the Connect to remote database aliases still lies outside the two setup examples.

@evelinadanielsson evelinadanielsson force-pushed the dev-update-create-show-remote-database-alias-docs branch from 1d858a2 to 8d95871 Compare November 7, 2025 09:01
When using `OIDC CREDENTIAL FORWARDING` the actual end-user's credentials and permissions will be used, this will result in per-user audit trails being logged on the remote DBMS.
====

[NOTE]
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A lot of [NOTE] containers after each other, is this ok or should we structure it in a different way?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it's fine, maybe docs reviewer has a better idea 🤷

@evelinadanielsson evelinadanielsson force-pushed the dev-update-create-show-remote-database-alias-docs branch from 82c30c3 to 6d3f524 Compare November 10, 2025 07:49
@evelinadanielsson evelinadanielsson marked this pull request as ready for review November 10, 2025 07:54
@evelinadanielsson evelinadanielsson added the team-cypher-operations Cypher operations should review this label Nov 10, 2025
@evelinadanielsson
Copy link
Contributor Author

Included this figure, matching the design of the one for stored credentials on the same page.

remote-alias-credential-forwarding-overview

@evelinadanielsson evelinadanielsson marked this pull request as draft November 10, 2025 10:29
@evelinadanielsson evelinadanielsson force-pushed the dev-update-create-show-remote-database-alias-docs branch 2 times, most recently from 3050604 to 82c30c3 Compare November 10, 2025 12:36
@evelinadanielsson evelinadanielsson changed the title docs: updated and added OIDC credential forwarding docs: updated and added OIDC credential forwarding COPS-264 and COPS-284 Nov 10, 2025
@l-heemann
Copy link
Contributor

Included this figure, matching the design of the one for stored credentials on the same page.

remote-alias-credential-forwarding-overview

I think the "token" arrow should go from IDP to Carol. Do we need the second DB in DBMS B?

Copy link
Contributor

@l-heemann l-heemann left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Starting to look very good I think. Mostly some nit-picks left

_Bob_ is the administrator responsible for the setup of the remote DBMS, which includes the following steps:

. Set up SSO and support for the identity provider.
. Map the identity provider groups to the Neo4j roles. If you don’t want specific users to access `Db2`, here is where you set it.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe this is a good point to link to
https://neo4j.com/docs/operations-manual/current/tutorial/tutorial-sso-configuration/

Same for "Configure local DBMS" below

Copy link
Contributor Author

@evelinadanielsson evelinadanielsson Nov 17, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added SSO tutorials as you mentioned, but I have previously added xref:authentication-authorization/sso-integration.adoc#auth-sso-map-idp-roles[Map the identity provider groups to the Neo4j roles] in other places of in the docs when talking about the mapping, which links to https://neo4j.com/docs/operations-manual/2025.10/authentication-authorization/sso-integration/#auth-sso-map-idp-roles

@evelinadanielsson evelinadanielsson force-pushed the dev-update-create-show-remote-database-alias-docs branch 3 times, most recently from 6d237b1 to 6173293 Compare November 17, 2025 13:25
Copy link
Contributor

@l-heemann l-heemann left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

When using `OIDC CREDENTIAL FORWARDING` the actual end-user's credentials and permissions will be used, this will result in per-user audit trails being logged on the remote DBMS.
====

[NOTE]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it's fine, maybe docs reviewer has a better idea 🤷

@evelinadanielsson evelinadanielsson force-pushed the dev-update-create-show-remote-database-alias-docs branch from 6173293 to bdd167a Compare November 24, 2025 14:40
@renetapopova renetapopova self-assigned this Nov 24, 2025
@renetapopova renetapopova marked this pull request as ready for review November 24, 2025 16:13
@renetapopova
Copy link
Collaborator

I've made some editorial changes, but I haven't finished reviewing the PR.

@evelinadanielsson
Copy link
Contributor Author

@renetapopova this feature is not yet GA so we can keep the do not merge tag on til further 🙂

@renetapopova
Copy link
Collaborator

I think the page 'Configuring remote database aliases' looks great now! I'm wondering only if we need to add OIDC CREDENTIALS FORWARDING to the page Database management syntax?

That's a very good point! @evelinadanielsson, @l-heemann?

@evelinadanielsson
Copy link
Contributor Author

@renetapopova Great, I'm having a look at the PR, have some comments on certain things, but over all it starts looking great!

@l-heemann l-heemann removed their request for review December 11, 2025 09:48
Copy link
Contributor

@l-heemann l-heemann left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm handing this over to Evelina to review since I am changing teams. No more objections from my side

@evelinadanielsson
Copy link
Contributor Author

@renetapopova have made some changes, can you have a look at them. Yes, we should probably add OIDC CREDENTIALS FORWARDING to the page Database management syntax. Will do that in another commit.

Copy link
Collaborator

@renetapopova renetapopova left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, @evelinadanielsson. Just some small editorial suggestions and one comment. Otherwise, I think it looks great!

dbms.security.oidc.<provider>.claims.groups=groups
dbms.security.oidc.<provider>.authorization.group_to_role_mapping= "engineers" = admin; \
"collaborators" = reader; \
"remote_users" = db1_access
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here, the role is different from the one configured on DBMS A. Don't they need to be the same?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

They don't need to be the the same no. As the text says in the Caution block. The user belongs to the group remote users in both systems, as they receive this group from the identity provider, this group is then matched to different roles in Neo4j. So there is nothing that stops the user from having the group assigned to different roles in different systems. Now our custom roles are pretty limited to what they can do, but this is more important to think about if one uses the built-in roles of Neo4j. In fact, it is likely that costumers will have different group to role mapping between the systems if custom defined roles are used, since some roles may only exist on one of the systems. This cation tab is more to let the user know that this is a critical thing that they need to think about.

While it is possible to use different OIDC configurations across distinct DBMS instances (DBMS A & B in this example), database administrators must be aware of the resulting privilege disparity.
A user's effective permissions are not dictated by the identity provider groups alone, but by the mapping of those groups to the roles defined within each specific Neo4j DBMS.
See xref:authentication-authorization/sso-integration.adoc#auth-sso-map-idp-roles[Map the identity provider groups to the Neo4j roles].
Crucially, if the OIDC configuration settings differ between the local DBMS and the target DBMS, the user will have different effective privileges on those systems.
This configuration independence can lead to privilege inconsistency (e.g., over-privileging or unexpected access denial).

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Eg, what is DBMS B also have remote aliases and thus also would need a remote_access role, then it would be mapped to users both able to read db1 and to access the remote database alias on DBMS B.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let me know if things are still a bit confusing :)

Copy link
Collaborator

@renetapopova renetapopova Dec 15, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I somehow got confused by these sentences in the admonition: "A user's effective permissions are not dictated by the identity provider groups alone, but by the mapping of those groups to the roles defined within each specific Neo4j DBMS. Crucially, if the OIDC configuration settings differ between the local DBMS and the target DBMS, the user will have different effective privileges on those systems. This configuration independence can lead to privilege inconsistency (e.g., over-privileging or unexpected access denial)."

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I understand it as that the mapping should be the same.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe we can rewrite the admonition to something like this:

OIDC group-to-role mappings are defined per DBMS, which means a user’s effective permissions are not dictated by the identity provider groups alone, but by the mapping of those groups to roles defined within each Neo4j DBMS.
See xref:authentication-authorization/sso-integration.adoc#auth-sso-map-idp-roles[Map the identity provider groups to the Neo4j roles].
As a result, different OIDC configurations across distinct DBMS instances (DBMS A and DBMS B in this example) lead to different effective privileges for the same user.
While it is possible to use different OIDC configurations across DBMS instances, database administrators must be aware of the resulting privilege disparity and ensure that group-to-role mappings intended to grant equivalent access remain consistent across DBMSs, to avoid privilege inconsistency (for example, over-privileging or unexpected access denial).

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, when do we plan to merge it?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We were planning to make it GA for this last cut off 2025.12, however something technical versin of how the feature is implemented came around last minute, and we decided to revert the PR to release it, so we could discuss the details of the technical implementation first, to see if we want to make any changes.

So we are currently aiming for 2026.01 (if that's how you count the version).

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great! Thank you. I'll add a label.

Co-authored-by: Reneta Popova <reneta.popova@neo4j.com>
_Bob_ configures the remote *DBMS B* to support SSO with the same identity provider used by _Carol_ to log in to *DBMS A*.
He also configures the mapping of the identity provider groups to the Neo4j roles such that the _Carol's_ identity provider groups grant the appropriate privileges to access `db1` on the *DBMS B*.

[CAUTION]
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@renetapopova I rewrote the part you pointed out, very much like you suggestion. Have a look and see if this makes things more clear.

@neo4j-docops-agent
Copy link
Collaborator

@evelinadanielsson evelinadanielsson changed the title docs: updated and added OIDC credential forwarding COPS-264 and COPS-284 docs: updated and added OIDC credential forwarding COPS-264, COPS-284, COPS-319 Dec 15, 2025
Copy link
Collaborator

@renetapopova renetapopova left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great! Thank you @evelinadanielsson!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

2026.01 DO NOT MERGE team-cypher-operations Cypher operations should review this

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants