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

Potentially misleading error message: "requested user blah_blah is not authorized for tenant {1}" #96174

Closed
mgoddard opened this issue Jan 30, 2023 · 1 comment · Fixed by #96207
Labels
C-bug Code not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior. O-community Originated from the community X-blathers-untriaged blathers was unable to find an owner

Comments

@mgoddard
Copy link

mgoddard commented Jan 30, 2023

Describe the problem

When attempting to connect to the DB, using ssl certs (as well as a username/password), the error message seems to emphasize "tenant {1}" while the error was really triggered by a mismatch between the username and the user for whom the ssl certs were created. We were initially puzzled until our user provided their connection string and then we were able to determine the root cause of their connection issue.

To Reproduce

  • Deploy a CockroachDB cluster
  • Generate SSL certs for root user
  • Create a new DB user "blah_blah", with password
  • Attempt to connect as this user, but providing ssl parameters for the root user; e.g.
postgres://user:password@host:26257/db_name?sslmode=verify-full&sslrootcert=path/to/ca.crt&sslcert=path/to/client.root.crt&sslkey=path/to/client.root.key&application_name=schema-migration

Expected behavior
We expect the connection to fail, but with an error message pointing to the fact that the SSL cert doesn't match the username.

Environment:

  • CockroachDB version 22.2.0
  • Server OS: Linux / K8s

Additional context
The impact was that we initially explored whether this was due to the new(er) multi-tenant aspect of CockroachDB, so it led to several iterations of problem solving exchanges.

Jira issue: CRDB-23983

@mgoddard mgoddard added the C-bug Code not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior. label Jan 30, 2023
@blathers-crl
Copy link

blathers-crl bot commented Jan 30, 2023

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 was unable to automatically find someone to ping.

If we have not gotten back to your issue within a few business days, you can try the following:

  • Join our community slack channel and ask on #cockroachdb.
  • Try find someone from here if you know they worked closely on the area and CC them.

🦉 Hoot! I am a Blathers, a bot for CockroachDB. My owner is dev-inf.

@blathers-crl blathers-crl bot added O-community Originated from the community X-blathers-untriaged blathers was unable to find an owner labels Jan 30, 2023
@craig craig bot closed this as completed in 8b35f22 Feb 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Code not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior. O-community Originated from the community X-blathers-untriaged blathers was unable to find an owner
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant