-
Notifications
You must be signed in to change notification settings - Fork 3.8k
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
User name maps and kerberos not interacting as expected #93637
Comments
Hello, I am Blathers. I am here to help you get the issue triaged. Hoot - a bug! Though bugs are the bane of my existence, rest assured the wretched thing will get the best of care here. I have CC'd a few people who may be able to assist you:
If we have not gotten back to your issue within a few business days, you can try the following:
🦉 Hoot! I am a Blathers, a bot for CockroachDB. My owner is otan. |
@andy-dulson many thanks for filing this.
Do you get any better behavior if you remove the leading |
Removing the leading
|
@knz, I suspect this is because the auth API assumes there's a 1:1 mapping of external system identity to database role. If you look at this code at the top level, we assume that the external auth API is going to provide a single replacement identity, and we don't check that against the user/role name that the client requests. Maybe cockroach/pkg/sql/pgwire/auth.go Lines 120 to 141 in 53b1dea
|
Thanks for breaking it down for me bob. Your explanation seems reasonable. |
Describe the problem
We were hoping to use user name maps to create foo_super user accounts that can be authed to with user foo's krb credentials. This works in postgres, but doesn't seem to in cockroach.
To Reproduce
What did you do? Describe in your own words.
These steps were on a v21.2.17 cluster:
(1) Create db users that match the system username, and the system username with a _super suffix:
(2) The cluster is already set-up (as per these instructions) so that kerberos authentication works for the user which matches the system username:
In particular
(3) Set
server.identity_map.configuration
to the same config we have in postgres:(4) At that point, I expect the -U argument to psql to allow me to login as
adulson_super
usingadulson
's krb credentials. That's not what happens though:Expected behavior
In step four, I expect the cluster to recognise me as user
adulson_super
.Additional data / screenshots
This works on postgres; with the same config in pg_ident.conf as we set in etting server.identity_map.configuration we see:
Environment:
cockroach sql
doesn't support kerberos)Additional context
What was the impact?
Add any other context about the problem here.
Jira issue: CRDB-22446
The text was updated successfully, but these errors were encountered: