Skip to content

Mark all connections for closure on LDAP Auth Credential expiration #731

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 1 commit into from
May 4, 2021

Conversation

bigmontz
Copy link
Contributor

@bigmontz bigmontz commented Apr 30, 2021

When an authenticated connection is made by the drivers, the server takes the raw credentials passed in the HELLO message and uses them to generate a token which is then cached and used to authorize all subsequent requests.

In some implementations of auth (principally LDAP), this cached token can expire and the original raw credentials are required to generate a new token. Since these raw credentials are not stored on the server and are only provided during connection initialization, the only way currently to refresh these tokens is by terminating the existing connection and create new connections.

When the driver receives an error with status Neo.ClientError.Security.AuthorizationExpired this should have the effect of marking all current connections as stale/invalid, forcing the driver to establish new connections and therefore refreshing the credentials cached on the server. Existing connections which are currently in use should not be interrupted.

@bigmontz bigmontz force-pushed the 4.3-retry-on-authorization-error branch 2 times, most recently from c688fcc to 9f6beed Compare May 3, 2021 12:26
When an authenticated connection is made by the drivers, the server takes the raw credentials passed in the HELLO message and uses them to generate a token which is then cached and used to authorize all subsequent requests.

In some implementations of auth (principally LDAP), this cached token can expire and the original raw credentials are required to generate a new token. Since these raw credentials are not stored on the server and are only provided during connection initialization, the only way currently to refresh these tokens is by terminating the existing connection and create new connections.

When the driver receives an error with status `Status.Security.AuthorizationExpired` this should have the effect of marking all current connections as stale/invalid, forcing the driver to establish new connections and therefore refreshing the credentials cached on the server. Existing connections which are currently in use should not be interrupted.
@bigmontz bigmontz force-pushed the 4.3-retry-on-authorization-error branch from 9f6beed to abadbd6 Compare May 3, 2021 12:53
@bigmontz bigmontz marked this pull request as ready for review May 3, 2021 12:55
@bigmontz bigmontz merged commit e033b24 into neo4j:4.3 May 4, 2021
@bigmontz bigmontz deleted the 4.3-retry-on-authorization-error branch May 4, 2021 15:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant