-
Notifications
You must be signed in to change notification settings - Fork 14.3k
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
Cannot use drill-by/drill-to in embedded mode without can explore on Superset
permission
#25630
Comments
I've seen a suggestion in Slack that |
I may have mentioned the incorrect permission in that old Slack thread. Link What is actually needed is:
|
Getting the correct permissions for using embedded is indeed very difficult and hard to maintain. As of now, not even the Gamma role contains all the needed permissions. The best solution would probably be to have a new standard "Embedded" role that one can use a base. |
As best as I can work out, this is the bare minimum list for an embedded dashboard with Drill By (currently) which I've applied to my Guest user:
*I think this needs a fix, should work with specified datasets, though I'm not sure if guest tokens restrict the datasets or leave it open to all @cwegener you're right, |
im still struggling with the above as well Our primary usecae is embedded and we want to enable the drill by and drill to detail options as it changes the way we design dashboards. we are still back on v2.1.1 but assume things havent changed on 3.x. Ive also noticed the cross filter scoping option is available with the above permissions. The user cannot change them but its confusing as an option that seems available to the end user |
I have I've added all these permissions along with Public + Gamma.
But drilldown not working with embedded. Request:
Response:
Could you tell what went wrong? |
That might be some new regression .. at first glance your request should be allowed ... |
Hi @cwegener Could that be problem? async function getCsrfToken() {
let config = {
method: 'get',
url: `${supersetBaseUrl}/security/csrf_token/`
};
var response = await axios.request(config);
console.log(response.headers);
const cookieName = "session";
const sessionCookie = (response.headers['set-cookie'])
.find(cookie => cookie.includes(cookieName))
?.match(new RegExp(`^${cookieName}=(.+?);`))
?.[1];
return [response.data, sessionCookie];
}
async function getGuestToken(user, dashboardId, appToken, csrfToken, sessionCookie) {
console.log(sessionCookie, csrfToken);
try {
let data = JSON.stringify({
"user": user,
"resources": [
{
"type": "dashboard",
"id": dashboardId
}
],
"rls": []
});
let config = {
method: 'post',
url: `${supersetBaseUrl}/security/guest_token/`,
headers: {
'X-CSRFToken': csrfToken,
'Authorization': 'Bearer ' + appToken,
'Content-Type': 'application/json',
'Cookie': 'session=' + sessionCookie
},
withCredentials: true,
data: data
};
var response = await axios.request(config);
return response.data;
} catch (error) {
return "";
}
} |
Any fix for this? |
update: Seem not related to Role/Permission issue, for debug tried Admin role for Embed guest user, didn't work. This requires fix. @Purush0th @ggam @Truffula - did you get this working? please advise if any workaround or fixes? |
When a dashboard is accessed using the embedding UI, the Drill By/Drill to Detail functions in the right click menu and chart menu are only available if the guest user Role has the
can explore on Superset
permission. However, this permission also enables heading links to the Explore screen, along with other chart menu options which are not desirable in an embedded chart, e.g.:If the user does have the
can explore on Superset
but lacks thecan samples on Datasource
permission, theDrill to detail [by]
menu items appear but the data cannot be loaded.How to reproduce the bug
can explore on Superset
permission.Expected results
Given some other permission applied to the guest user (I'm unsure which one is appropriate, or if a new one is needed), and given they don't have
can explore on Superset
:can samples on Datasource
permission,Drill to detail
andDrill to detail by
will not appear in the menu.Actual results
can samples on Datasource
permission, openingDrill to detail
orDrill to detail by
will display an errorError: Access is Denied
.Screenshots
If applicable, add screenshots to help explain your problem.
Environment
(please complete the following information):
Checklist
Make sure to follow these steps before submitting your issue - thank you!
Additional context
The files in which the permissions are checked and need updating are:
The text was updated successfully, but these errors were encountered: