Skip to content
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

ADR 019 password rotation #523

Merged
merged 6 commits into from
Aug 30, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Merge branch 'feature/password-rotation' of github.com:StephenCathcar…
…t/neo4j-go-driver into feature/password-rotation
StephenCathcart committed Aug 22, 2023

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
commit 60544eea64224eb251770ed656cf3d8c8576db44
19 changes: 9 additions & 10 deletions neo4j/internal/pool/pool.go
Original file line number Diff line number Diff line change
@@ -452,8 +452,7 @@ func (p *Pool) Return(ctx context.Context, c idb.Connection) {
}

func (p *Pool) OnNeo4jError(ctx context.Context, connection idb.Connection, error *db.Neo4jError) error {
switch error.Code {
case "Neo.ClientError.Security.AuthorizationExpired":
if error.Code == "Neo.ClientError.Security.AuthorizationExpired" {
serverName := connection.ServerName()
p.serversMut.Lock()
defer p.serversMut.Unlock()
@@ -473,16 +472,16 @@ func (p *Pool) OnNeo4jError(ctx context.Context, connection idb.Connection, erro
error.MarkRetriable()
}
}
case "Neo.TransientError.General.DatabaseUnavailable":
}
if error.Code == "Neo.TransientError.General.DatabaseUnavailable" {
p.deactivate(ctx, connection.ServerName())
default:
if error.IsRetriableCluster() {
var database string
if dbSelector, ok := connection.(idb.DatabaseSelector); ok {
database = dbSelector.Database()
}
p.deactivateWriter(connection.ServerName(), database)
}
if error.IsRetriableCluster() {
var database string
if dbSelector, ok := connection.(idb.DatabaseSelector); ok {
database = dbSelector.Database()
}
p.deactivateWriter(connection.ServerName(), database)
}

return nil
3 changes: 2 additions & 1 deletion testkit-backend/backend.go
Original file line number Diff line number Diff line change
@@ -1106,7 +1106,8 @@ func (b *backend) handleRequest(req map[string]any) {
//"Feature:API:Liveness.Check",
"Feature:API:Result.List",
"Feature:API:Result.Peek",
"Feature:API:RetryableExceptions",
//"Feature:API:Result.Single",
//"Feature:API:Result.SingleOptional",
"Feature:API:Session:AuthConfig",
//"Feature:API:Session:NotificationsConfig",
//"Feature:API:SSLConfig",
You are viewing a condensed version of this merge commit. You can view the full changes here.