Skip to content

Conversation

@HannesSandberg
Copy link
Contributor

No description provided.

@HannesSandberg HannesSandberg added team-cypher-operations Cypher operations should review this NOT_READY_FOR_MERGE labels Nov 19, 2025
[[attribute-based-access-control]]
= Attribute-based access control

Attribute-based access control, ABAC grants roles based on the evaluation of attributes (or claims) contained in a user's authentication token.
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
Attribute-based access control, ABAC grants roles based on the evaluation of attributes (or claims) contained in a user's authentication token.
Attribute-based access control (ABAC) grants roles based on the evaluation of attributes (or claims) contained in a user's authentication token.

We could subsequently use "ABAC" throughout?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

hmm, do we want to? Yes, if we want people to call it ABAC. No if we want to be clear and use the full name (I hate to stop reading and look up what an acronym stands for).

Copy link
Contributor

@phil198 phil198 Jan 5, 2026

Choose a reason for hiding this comment

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

yes perhaps I am thinking more of how easy it is to keep writing, rather than the readers experience. It would not hurt at all to leave it as Attribute-based access control. I had a look and this is also more consistent with what we do for the other *BACs 😄

Copy link
Contributor Author

Choose a reason for hiding this comment

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

do we write it out for the other ones?

Use the following steps to set up attribute-based access control:

1. Enable attribute-based access control in the `neo4j.conf` file by setting the `internal.dbms.feature_flag.attribute_based_access_control` setting to `true`.
2. Specify which OIDC provider will be used for attribute-based access control by setting the `internal.dbms.security.abac_enabled_authorization_providers` setting to the appropriate providers.
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
2. Specify which OIDC provider will be used for attribute-based access control by setting the `internal.dbms.security.abac_enabled_authorization_providers` setting to the appropriate providers.
2. Specify which OIDC provider(s) will be used for attribute-based access control by setting the `internal.dbms.security.abac_enabled_authorization_providers` setting to the appropriate providers.


[NOTE]
====
No roles with associated deny privileges can be assigned using attribute-based access control.
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
No roles with associated deny privileges can be assigned using attribute-based access control.
No roles with associated deny privileges can be assigned using attribute-based access control. This is to ensure that if a role is unexpectedly not fulfilled (e.g. because a claim is missing from the users auth token) then there can never be an escalation of privileges, only ever a reduction.

== Caveats and limitations

* When evaluating `abac.oidc.user_attribute('<claim_key>')`, if the claim does not exist in the authentication token, it will evaluate to `NULL`.
* Newly created auth rules are not applied to existing user sessions. Users must re-authenticate to have the new rules applied.
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
* Newly created auth rules are not applied to existing user sessions. Users must re-authenticate to have the new rules applied.
* Newly created auth rules are applied to existing user sessions, but will only have access to the user claims which had rules containing them at the start of the session. So only user claims which are used in pre-existing auth rules at the start of a session are retained. Users must re-authenticate to have new rules applied if the new rules use new claims.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Applied this, but removed the "So" from " So only user claims..."

* When evaluating `abac.oidc.user_attribute('<claim_key>')`, if the claim does not exist in the authentication token, it will evaluate to `NULL`.
* Newly created auth rules are not applied to existing user sessions. Users must re-authenticate to have the new rules applied.
* Attribute-based access control is only supported for OIDC authentication providers.
* For troubleshooting ABAC evaluation, enable debug logging for the security log and turn on JWT claims logging at debug level in `neo4j.conf`: `dbms.security.logs.oidc.jwt_claims_at_debug_level_enabled=true`
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
* For troubleshooting ABAC evaluation, enable debug logging for the security log and turn on JWT claims logging at debug level in `neo4j.conf`: `dbms.security.logs.oidc.jwt_claims_at_debug_level_enabled=true`
* For troubleshooting ABAC evaluation, enable debug logging for the security log and debug log, and turn on JWT claims logging at debug level in `neo4j.conf`: `dbms.security.logs.oidc.jwt_claims_at_debug_level_enabled=true`

@neo4j-docops-agent
Copy link
Collaborator

This PR includes documentation updates
View the updated docs at https://neo4j-docs-operations-2728.surge.sh

New pages:

Updated pages:

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

Labels

NOT_READY_FOR_MERGE team-cypher-operations Cypher operations should review this

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants