You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by "sujeeth62 (via GitHub)" <gi...@apache.org> on 2025/09/06 07:54:48 UTC
[D] Can Superset support authentication via REMOTE_USER and authorization via AD groups together? [superset]
GitHub user sujeeth62 created a discussion: Can Superset support authentication via REMOTE_USER and authorization via AD groups together?
Hi Superset community đ
Weâre running Superset inside Google Kubernetes Engine (GKE) and want to integrate it with Active Directory (AD) in the following way:
1. Authentication:
⢠Handled by an upstream proxy (e.g. NGINX Ingress, OAuth2 Proxy, Envoy).
⢠Proxy authenticates the user against AD (Kerberos/SSO/OIDC).
⢠It sets the REMOTE_USER header with the authenticated username (e.g. alice@company.com).
⢠Superset is configured with AUTH_TYPE = AUTH_REMOTE_USER to trust this identity.
2. Authorization:
⢠Once Superset receives the REMOTE_USER, it should query AD/LDAP to fetch the userâs groups.
⢠Those AD groups should map to Superset roles (e.g. Admin, Gamma, etc.) via AUTH_ROLES_MAPPING.
Questions
⢠Does Superset currently support combining AUTH_REMOTE_USER for authentication with AD/LDAP lookups for authorization in the same deployment?
⢠If not directly, whatâs the recommended pattern to achieve this (e.g. extending SupersetSecurityManager)?
⢠Are there any best practices around caching LDAP group lookups for performance?
Any guidance or examples would be much appreciated!
GitHub link: https://github.com/apache/superset/discussions/35040
----
This is an automatically sent email for notifications@superset.apache.org.
To unsubscribe, please send an email to: notifications-unsubscribe@superset.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [D] Can Superset support authentication via REMOTE_USER and authorization via AD groups together? [superset]
Posted by "sujeeth62 (via GitHub)" <gi...@apache.org>.
GitHub user sujeeth62 added a comment to the discussion: Can Superset support authentication via REMOTE_USER and authorization via AD groups together?
If I only setup authentication using REMOTE_USER, do I still need to write CustomSecurityManager
GitHub link: https://github.com/apache/superset/discussions/35040#discussioncomment-14325860
----
This is an automatically sent email for notifications@superset.apache.org.
To unsubscribe, please send an email to: notifications-unsubscribe@superset.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [D] Can Superset support authentication via REMOTE_USER and authorization via AD groups together? [superset]
Posted by "dosubot[bot] (via GitHub)" <gi...@apache.org>.
GitHub user dosubot[bot] edited a comment on the discussion: Can Superset support authentication via REMOTE_USER and authorization via AD groups together?
<!-- Greeting -->
Hi @sujeeth62! I'm [Dosu](https://go.dosu.dev/dosubot) and Iâm helping the superset team.
<!-- Answer -->
Superset supports authentication via AUTH_REMOTE_USER (trusting the REMOTE_USER header from your proxy), but it does not natively combine this with LDAP/AD group lookups for authorization in a single deployment. To achieve your desired patternâauthenticate via REMOTE_USER and then authorize via AD/LDAP groupsâyou'll need to implement a custom security manager by subclassing SupersetSecurityManager. In your custom class, after authenticating the user from REMOTE_USER, you can query AD/LDAP for group membership and map those groups to Superset roles (using AUTH_ROLES_MAPPING or custom logic)Â ([example pattern](https://github.com/apache/superset/discussions/32038), [code reference](https://github.com/apache/superset/blob/829e4d92d91ceae4b43b1ed3b063ffe45377799c/superset/security/manager.py), [init reference](https://github.com/apache/superset/blob/829e4d92d91ceae4b43b1ed3b063ffe45377799c/superset/initialization/__init__.py)).
For LDAP group caching, there is no built-in mechanism, but you can use standard Python tools like functools.lru_cache or an external cache (e.g., Redis) in your custom security manager to avoid repeated LDAP queries.
Best practices: make sure your custom security manager extends SupersetSecurityManager (not Flask AppBuilder's SecurityManager), and handle role synchronization carefully to avoid overwriting manual assignments. If you need a starting point, check out the linked discussion and code for examples of custom authentication flows.
<!-- Dosu Comment Footer -->
*To reply, just mention [@dosu](https://go.dosu.dev/dosubot?utm_source=github&utm_medium=bot-comment&utm_campaign=github-comment-footer-20260415&utm_content=reply-with-mention&utm_term=apache%2Fsuperset).*
---
Docs are dead. Just use [Dosu](https://dosu.dev?utm_source=github&utm_medium=bot-comment&utm_campaign=github-comment-footer-20260415&utm_content=static-docs-tagline&utm_term=apache%2Fsuperset).
[](https://app.dosu.dev/response-feedback?utm_source=github&utm_medium=bot-comment&utm_campaign=github-comment-footer-20260415&utm_content=static-docs-feedback&utm_term=apache%2Fsuperset&message_id=0015c0bf-9c48-4a81-b1a0-95c83abe4049) [](https://github.dosu.com/apache/superset?utm_source=github&utm_medium=bot-comment&utm_campaign=github-comment-footer-20260415&utm_content=static-docs-ask-repo&utm_term=apache%2Fsuperset) [](https://app.dosu.dev/signup?referrer=openSource&source=github-footer&utm_source=github&utm_medium=bot-comment&utm_campaign=github-comment-footer-20260415&utm_content=static-docs-share-team&utm_term=apache%2Fsuperset)
GitHub link: https://github.com/apache/superset/discussions/35040#discussioncomment-14325814
----
This is an automatically sent email for notifications@superset.apache.org.
To unsubscribe, please send an email to: notifications-unsubscribe@superset.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [D] Can Superset support authentication via REMOTE_USER and authorization via AD groups together? [superset]
Posted by "dosubot[bot] (via GitHub)" <gi...@apache.org>.
GitHub user dosubot[bot] edited a comment on the discussion: Can Superset support authentication via REMOTE_USER and authorization via AD groups together?
<!-- Answer -->
No, if you only set up authentication using REMOTE_USER (with AUTH_TYPE = AUTH_REMOTE_USER), you do not need to write a CustomSecurityManagerâSuperset supports this natively out of the box. A CustomSecurityManager is only needed if you want to add custom logic, like automatic role assignment or user provisioning beyond what the default REMOTE_USER flow provides ([source](https://github.com/apache/superset/discussions/32038)).
<!-- Dosu Comment Footer -->
*To reply, just mention [@dosu](https://go.dosu.dev/dosubot?utm_source=github&utm_medium=bot-comment&utm_campaign=github-comment-footer-20260415&utm_content=reply-with-mention&utm_term=apache%2Fsuperset).*
---
Docs are dead. Just use [Dosu](https://dosu.dev?utm_source=github&utm_medium=bot-comment&utm_campaign=github-comment-footer-20260415&utm_content=static-docs-tagline&utm_term=apache%2Fsuperset).
[](https://app.dosu.dev/response-feedback?utm_source=github&utm_medium=bot-comment&utm_campaign=github-comment-footer-20260415&utm_content=static-docs-feedback&utm_term=apache%2Fsuperset&message_id=f681877e-7bb0-4aaf-8399-82b7a15bd8a1) [](https://github.dosu.com/apache/superset?utm_source=github&utm_medium=bot-comment&utm_campaign=github-comment-footer-20260415&utm_content=static-docs-ask-repo&utm_term=apache%2Fsuperset) [](https://app.dosu.dev/signup?referrer=openSource&source=github-footer&utm_source=github&utm_medium=bot-comment&utm_campaign=github-comment-footer-20260415&utm_content=static-docs-share-team&utm_term=apache%2Fsuperset)
GitHub link: https://github.com/apache/superset/discussions/35040#discussioncomment-14325865
----
This is an automatically sent email for notifications@superset.apache.org.
To unsubscribe, please send an email to: notifications-unsubscribe@superset.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [D] Can Superset support authentication via REMOTE_USER and authorization via AD groups together? [superset]
Posted by "dosubot[bot] (via GitHub)" <gi...@apache.org>.
GitHub user dosubot[bot] added a comment to the discussion: Can Superset support authentication via REMOTE_USER and authorization via AD groups together?
<!-- Answer -->
No, if you only set up authentication using REMOTE_USER (with AUTH_TYPE = AUTH_REMOTE_USER), you do not need to write a CustomSecurityManagerâSuperset supports this natively out of the box. A CustomSecurityManager is only needed if you want to add custom logic, like automatic role assignment or user provisioning beyond what the default REMOTE_USER flow provides ([source](https://github.com/apache/superset/discussions/32038)).
<!-- Dosu Comment Footer -->
*To reply, just mention [@dosu](https://go.dosu.dev/dosubot).*
---
<sup>How did I do? [Good](https://app.dosu.dev/response-feedback/f681877e-7bb0-4aaf-8399-82b7a15bd8a1?feedback_type=great_response) | [Irrelevant](https://app.dosu.dev/response-feedback/f681877e-7bb0-4aaf-8399-82b7a15bd8a1?feedback_type=irrelevant_answer) | [Incorrect](https://app.dosu.dev/response-feedback/f681877e-7bb0-4aaf-8399-82b7a15bd8a1?feedback_type=incorrect_sources) | [Verbose](https://app.dosu.dev/response-feedback/f681877e-7bb0-4aaf-8399-82b7a15bd8a1?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/f681877e-7bb0-4aaf-8399-82b7a15bd8a1?feedback_type=hallucination) | [Report đ](https://app.dosu.dev/response-feedback/f681877e-7bb0-4aaf-8399-82b7a15bd8a1?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/f681877e-7bb0-4aaf-8399-82b7a15bd8a1?feedback_type=other)</sup> [](https://app.dosu.dev/a28d3c7e-a9d3-459e-9fb6-3a6f9ff4f357/ask?utm_source=github)&
nbsp;[](https://go.dosu.dev/discord-bot) [](https://twitter.com/intent/tweet?text=%40dosu_ai%20helped%20me%20solve%20this%20issue!&url=https%3A//github.com/apache/superset/discussions/35040)
GitHub link: https://github.com/apache/superset/discussions/35040#discussioncomment-14325865
----
This is an automatically sent email for notifications@superset.apache.org.
To unsubscribe, please send an email to: notifications-unsubscribe@superset.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [D] Can Superset support authentication via REMOTE_USER and authorization via AD groups together? [superset]
Posted by "sujeeth62 (via GitHub)" <gi...@apache.org>.
GitHub user sujeeth62 added a comment to the discussion: Can Superset support authentication via REMOTE_USER and authorization via AD groups together?
Is it possible for you to give a sample code which will use authenticated remote_user and perform LDAP based authorization.
GitHub link: https://github.com/apache/superset/discussions/35040#discussioncomment-14325869
----
This is an automatically sent email for notifications@superset.apache.org.
To unsubscribe, please send an email to: notifications-unsubscribe@superset.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [D] Can Superset support authentication via REMOTE_USER and authorization via AD groups together? [superset]
Posted by "dosubot[bot] (via GitHub)" <gi...@apache.org>.
GitHub user dosubot[bot] added a comment to the discussion: Can Superset support authentication via REMOTE_USER and authorization via AD groups together?
<!-- Greeting -->
Hi @sujeeth62! I'm [Dosu](https://go.dosu.dev/dosubot) and Iâm helping the superset team.
<!-- Answer -->
Superset supports authentication via AUTH_REMOTE_USER (trusting the REMOTE_USER header from your proxy), but it does not natively combine this with LDAP/AD group lookups for authorization in a single deployment. To achieve your desired patternâauthenticate via REMOTE_USER and then authorize via AD/LDAP groupsâyou'll need to implement a custom security manager by subclassing SupersetSecurityManager. In your custom class, after authenticating the user from REMOTE_USER, you can query AD/LDAP for group membership and map those groups to Superset roles (using AUTH_ROLES_MAPPING or custom logic)Â ([example pattern](https://github.com/apache/superset/discussions/32038), [code reference](https://github.com/apache/superset/blob/829e4d92d91ceae4b43b1ed3b063ffe45377799c/superset/security/manager.py), [init reference](https://github.com/apache/superset/blob/829e4d92d91ceae4b43b1ed3b063ffe45377799c/superset/initialization/__init__.py)).
For LDAP group caching, there is no built-in mechanism, but you can use standard Python tools like functools.lru_cache or an external cache (e.g., Redis) in your custom security manager to avoid repeated LDAP queries.
Best practices: make sure your custom security manager extends SupersetSecurityManager (not Flask AppBuilder's SecurityManager), and handle role synchronization carefully to avoid overwriting manual assignments. If you need a starting point, check out the linked discussion and code for examples of custom authentication flows.
<!-- Dosu Comment Footer -->
*To reply, just mention [@dosu](https://go.dosu.dev/dosubot).*
---
<sup>How did I do? [Good](https://app.dosu.dev/response-feedback/0015c0bf-9c48-4a81-b1a0-95c83abe4049?feedback_type=great_response) | [Irrelevant](https://app.dosu.dev/response-feedback/0015c0bf-9c48-4a81-b1a0-95c83abe4049?feedback_type=irrelevant_answer) | [Incorrect](https://app.dosu.dev/response-feedback/0015c0bf-9c48-4a81-b1a0-95c83abe4049?feedback_type=incorrect_sources) | [Verbose](https://app.dosu.dev/response-feedback/0015c0bf-9c48-4a81-b1a0-95c83abe4049?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/0015c0bf-9c48-4a81-b1a0-95c83abe4049?feedback_type=hallucination) | [Report đ](https://app.dosu.dev/response-feedback/0015c0bf-9c48-4a81-b1a0-95c83abe4049?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/0015c0bf-9c48-4a81-b1a0-95c83abe4049?feedback_type=other)</sup> [](https://app.dosu.dev/a28d3c7e-a9d3-459e-9fb6-3a6f9ff4f357/ask?utm_source=github)&
nbsp;[](https://go.dosu.dev/discord-bot) [](https://twitter.com/intent/tweet?text=%40dosu_ai%20helped%20me%20solve%20this%20issue!&url=https%3A//github.com/apache/superset/discussions/35040)
GitHub link: https://github.com/apache/superset/discussions/35040#discussioncomment-14325814
----
This is an automatically sent email for notifications@superset.apache.org.
To unsubscribe, please send an email to: notifications-unsubscribe@superset.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org