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

ui: console shows forbidden errors for requests to v1/settings #98356

Closed
andreimatei opened this issue Mar 9, 2023 · 6 comments · Fixed by #98521
Closed

ui: console shows forbidden errors for requests to v1/settings #98356

andreimatei opened this issue Mar 9, 2023 · 6 comments · Fixed by #98521
Assignees
Labels
A-observability-inf A-webui Triage label for DB Console (fka admin UI) issues. Add this if nothing else is clear. C-bug Code not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior.

Comments

@andreimatei
Copy link
Contributor

andreimatei commented Mar 9, 2023

After logging in, on the home page I see periodic:

GET https://andrei-crdb-ycsb-0002.roachprod.crdb.io:26258/_admin/v1/settings?unredacted_values=true 403 (Forbidden)

If I refresh the page, the errors are gone. So it seems to happen only on the page loaded after a login.

Jira issue: CRDB-25216

@andreimatei andreimatei added C-bug Code not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior. A-webui Triage label for DB Console (fka admin UI) issues. Add this if nothing else is clear. T-observability-inf labels Mar 9, 2023
@abarganier abarganier assigned abarganier and unassigned dhartunian Mar 10, 2023
@abarganier
Copy link
Contributor

This was related to #97786, which was fixed in #97940.

This error appeared on v23.1-alpha.1, which did not contain the SHA that fixed the backwards compatibility issues that originally existed with multitenant session cookies.

I did some testing on master to try and reproduce this, but was unable, so I think it's safe to say that #97940 fixed this.

Marking as closed, but if this somehow appears on master let's reopen.

@andreimatei
Copy link
Contributor Author

I'm also seeing these errors on a 22.2.2 cluster, on the dashboards page. And I'm seeing it after navigating for a while, and after refreshing, so not immediately after login.
Haven't tried master, but reopening. Feel free to close again, though.

@andreimatei andreimatei reopened this Mar 10, 2023
@andreimatei andreimatei changed the title ui: console shows forbidden errors after logging in ui: console shows forbidden errors for requests to v1/settings Mar 10, 2023
@dhartunian
Copy link
Collaborator

This is a frontend bug where we continue requesting settings even when the user account does not have permissions to view them. The fix should be to just give up after a 403 error.

@andreimatei
Copy link
Contributor Author

Indeed, I'm using a user with viewactrivity, not an admin.

@abarganier
Copy link
Contributor

abarganier commented Mar 10, 2023

Thanks for reopening, I was testing with an admin user, so I missed this part. I'll give the repro another try and take @dhartunian's suggested approach as a fix.

@abarganier
Copy link
Contributor

abarganier commented Mar 13, 2023

Yup, easily reproduced when the user doesn't have admin! I'll get to work on a fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-observability-inf A-webui Triage label for DB Console (fka admin UI) issues. Add this if nothing else is clear. C-bug Code not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants