Skip to content

Conversation

@erthalion
Copy link
Contributor

It's not supported, neither it's a best practice. Also fix potential
null pointer access.

@erthalion erthalion changed the title Prevent superuser from being connection pool user Prevent superuser from being a connection pool user Apr 7, 2020
@erthalion erthalion force-pushed the fix/pooler-not-superuser branch from 4079115 to 6ff099e Compare April 7, 2020 10:27
It's not supported, neither it's a best practice. Also fix potential
null pointer access.
Comment on lines +172 to +175
if result.ConnectionPooler.User == result.SuperUsername {
msg := "Connection pool user is not allowed to be the same as super user, username: %s"
panic(fmt.Errorf(msg, result.ConnectionPooler.User))
}
Copy link
Member

Choose a reason for hiding this comment

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

isn't it validated in config.go anyway?

@FxKu
Copy link
Member

FxKu commented Apr 7, 2020

👍

@sdudoladov sdudoladov added this to the 1.5 milestone Apr 8, 2020
For protected users it makes sense by intent of protecting this users
(e.g. from being overriden or used as something else than supposed). For
system users the reason is the same as for superuser, it's about
replicastion user and it's under patroni control.
@sdudoladov
Copy link
Member

👍

1 similar comment
@FxKu
Copy link
Member

FxKu commented Apr 9, 2020

👍

@erthalion erthalion merged commit a1f2bd0 into master Apr 9, 2020
@erthalion erthalion deleted the fix/pooler-not-superuser branch April 9, 2020 07:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants