Issue with AUTH_ROLES_MAPPING in Superset LDAP Authentication #32172
Replies: 3 comments 1 reply
-
Hey there, @amoi-amoi! I'm here to help you with your Superset LDAP authentication issue. Let's work together to get this sorted out. I found a similar unsolved discussion that might be relevant to your issue: Assign superset roles to Keycloak authenticated users using the AUTH_ROLES_MAPPING [1]. Regarding your issue with
If these steps do not resolve the issue, you might need to explore further into the Superset codebase or consider reaching out to others who might have faced similar issues. To continue talking to Dosu, mention @dosu. Help Dosu learn! Give it feedback: Great Response | Irrelevant Answer | Incorrect Sources | Too Verbose | Hallucination | Other |
Beta Was this translation helpful? Give feedback.
-
I found a similar open issue that might be relevant to your problem. The suggested solution includes the following steps:
You can find more details in the related issue [1]. To continue talking to Dosu, mention @dosu. Help Dosu learn! Give it feedback: Great Response | Irrelevant Answer | Incorrect Sources | Too Verbose | Hallucination | Other |
Beta Was this translation helpful? Give feedback.
-
Have a same problem. Superset version 3.0.0rc1 works fine before. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Bug description
Hello everyone,
I'm having trouble configuring AUTH_ROLES_MAPPING in Superset. I can successfully log in using my LDAP server credentials, but the user roles are not being mapped correctly.
If AUTH_USER_REGISTRATION_ROLE is set, all users are assigned that role, regardless of AUTH_ROLES_MAPPING.
If AUTH_USER_REGISTRATION_ROLE is not set, all users are assigned the public role.
It seems that AUTH_ROLES_MAPPING is not working as expected.
Here’s a summary of my setup:
Authentication works: Users can log in with LDAP credentials.
Role mapping does not work: Users are not assigned roles based on their LDAP groups.
This is the configuration I’m using for AUTH_ROLES_MAPPING:
AUTH_ROLES_MAPPING = {
"cn=superset_admin,ou=People,dc=my-domain,dc=com": ["Admin"],
"cn=superset_external,ou=People,dc=my-domain,dc=com": ["Alpha"],
"cn=superset_readonly,ou=People,dc=my-domain,dc=com": ["Admin"],
"cn=superset_sqllab,ou=People,dc=my-domain,dc=com": ["Alpha"]
}
I have also set the following parameter:
AUTH_LDAP_GROUP_FIELD = "memberUid"
I configured it as memberUid because, as shown in the attached screenshot, the user attribute appears to be memberUid instead of memberOf.
To provide more context, I’ve attached screenshots of both the user configuration and the group configuration from the LDAP server.
Has anyone encountered this issue before? Am I missing something in my configuration? Any help would be greatly appreciated!
Thanks in advance!
Screenshots/recordings
Superset version
4.1.1
Python version
Not applicable
Node version
I don't know
Browser
Not applicable
Additional context
I am running Superset on a Linux virtual machine
Checklist
Beta Was this translation helpful? Give feedback.
All reactions