-
Notifications
You must be signed in to change notification settings - Fork 121
Allow USER role to get UI Configuration #664
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
Conversation
|
When running Trino gateway with the follow config |
With this config, I'd expect |
|
Yes, I'd expect the same behaviou. I think it's related to the error I mentioned. I had also tried adding extra logs using console.log() at https://github.com/trinodb/trino-gateway/blob/main/webapp/src/api/base.ts#L30 which is the source for sending the |
|
Yeah, currently the only way to access is to use ADMIN privilege. The behavior has changed with this PR: |
mosabua
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Makes sense to me and looks good.


Description
Trino Gateway supports disabling pages from the UI using uiConfiguration config https://trinodb.github.io/trino-gateway/gateway-api/#disable-routing-rules-ui
The webapp makes the call to get the list of disabled pages using the /webapp/getUIConfiguration endpoint.
This is called irrespective of whether an Admin has logged in or User because the pages disabled in the uiConfiguration are globally disabled.
However, currently only the ADMIN role is allowed to call /webapp/getUIConfiguration endpoint which results in "Login has expired, please login again" error messages whenever anyone with USER role logs in through the webapp.
Additional context and related issues
Only the Admin is allowed to get the uiConfiguration based on https://github.com/trinodb/trino-gateway/blob/main/gateway-ha/src/main/java/io/trino/gateway/ha/resource/GatewayWebAppResource.java#L466
webapp makes the getUIConfiguration call at https://github.com/trinodb/trino-gateway/blob/main/webapp/src/components/layout.tsx#L25
Release notes
( ) This is not user-visible or is docs only, and no release notes are required.
(x) Release notes are required. Please propose a release note for me.
( ) Release notes are required, with the following suggested text:
* Allow USER role to get UI configuration