Skip to content

UI: Non-admin users will see 500s and loading states on Databases and Events #48152

@chrisseto

Description

@chrisseto

Describe the problem

When visiting the "Databases" and "Events" pages of the admin UI as a user that is not part of the admin role they appear broken.

To Reproduce

  1. Set up secure CockroachDB cluster
  2. Create a normal user CREATE USER blah WITH PASSWORD ...
  3. Log into the Admin UI as the created user
  4. Navigate to either the "Databases" or "Events" page
  5. See error

Expected behavior
I would expect to see a banner stating that my user does not have access to the requested data.
I would also expect to see 403 responses rather than 500s.
Screen Shot 2020-04-29 at 9 30 17 AM

Additional data / screenshots
The events page returns a 500.
Screen Shot 2020-04-29 at 9 16 08 AM
The Databases page correctly returns a 403 but does not handle it.
Screen Shot 2020-04-29 at 9 15 28 AM

Environment:

  • CockroachDB version 19.2.x, V20.1.0-RC.2

Additional context
While debugging issues with a production cluster I noticed certain pages of the admin UI where not loading and 500s coming back from the server.
This lead me to believe that something was extremely wrong.
Another SRE was unable to reproduce the problem with an admin user which led us to the conclusion that non-admin users may be problematic.
Nothing is particularly dangerous but it is quite the red herring if a cluster is already misbehaving.

Metadata

Metadata

Labels

A-webuiTriage label for DB Console (fka admin UI) issues. Add this if nothing else is clear.A-webui-security

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions