-
Notifications
You must be signed in to change notification settings - Fork 14.4k
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
Endpoint /api/me/roles returns 401 "Not authorized" despite valid access token #25740
Comments
Still happening in 3.0.1 |
You can try a fix around by hitting a get request to http://localhost:8088/login endpoint and sending the csrf_token obtained along with username and password as formData and then get the access token to request http://localhost:8088/api/v1/me/roles api Issue addressed here #25876 |
Still happening in 3.1.1, also blocking usage of embedded dashboards. Unfortunately the workaround above won't work because the embed SDK won't do that for me |
Digging into this more, it seems |
I am facing the same issue |
So superset only returns the dashboard available to that user according to the role defined |
I had to do a hack (
|
Ah, good find! Yeah, that's looks close, the one I have starts with a
Perhaps switch to server side sessions might help? |
I tried, but still not working |
Hi all, same problem here. Do I have to rollback on version 2 or do you think this problem may be fixed in a rather short time ? Thx !! |
Turns out guest token I was using wasn't formatted correct in which case the Embedded SDK successfully creates the dashboard just to fail on the subsequent call to /roles |
@mortenesbensen when you say it "wasn't formatted correctly" what was the issue? I think we're running into this same issue now. |
Hello, I am new to Apache Superset and am working on integrating REST APIs for CRUD operations within my project. I understand that in order to interact with the Superset REST APIs, I need to obtain an API token. Could you please provide guidance on how to retrieve the API token either through the Superset UI or by sending HTTP requests? For context, I have already configured Keycloak for authentication, and would appreciate any instructions or references to help me proceed. Thank you for your assistance! |
I am running Superset 3.0.0 with Docker Compose. Trying to access the following API endpoint:
I have created an access token from
/api/v1/security/login
for a user with the Admin, Public and Gamma roles. I make a request for the mentioned API endpoint with the appropriate header.Various endpoints return 200 and a valid JSON payload, such as
/api/v1/dashboard
and/api/v1/chart
. However, the/api/me/roles
endpoint returns 401 "Not authorized". This blocks the embedded dashboard feature. Could this be a bug, or am I doing something wrong? I sense there is something special with this endpoint and authentication as it relates to the currently authenticated user.The
/api/me/roles
endpoint returns the roles when I log in through the UI and load the endpoint in a web browser.Expected results
I expect the roles to be returned from the API with 200 OK status.
Actual results
The endpoint returns 401 "Not authorized" despite the access token seemingly being valid.
Environment
(please complete the following information):
Flags
The text was updated successfully, but these errors were encountered: