Skip to content
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

Azure Authentication UPN key error in security/manage.py file #24852

Closed
1 of 3 tasks
Narender-007 opened this issue Aug 1, 2023 · 1 comment
Closed
1 of 3 tasks

Azure Authentication UPN key error in security/manage.py file #24852

Narender-007 opened this issue Aug 1, 2023 · 1 comment

Comments

@Narender-007
Copy link

Narender-007 commented Aug 1, 2023

when i am login with azure authentication in apche super set i can't login because have got upn key error after authentication token, when i am replacing "upn" to "email" working fine like

default:
if provider == "azure":
log.debug("Azure response received : {0}".format(resp))
id_token = resp["id_token"]
log.debug(str(id_token))
me = self._azure_jwt_token_parse(id_token)
log.debug("Parse JWT token : {0}".format(me))
return {
"name": me.get("name", ""),
"email": me["upn"],
"first_name": me.get("given_name", ""),
"last_name": me.get("family_name", ""),
"id": me["oid"],
"username": me["oid"],
"role_keys": me.get("roles", []),
}

customized:

    if provider == "azure":
        log.debug("Azure response received : {0}".format(resp))
        id_token = resp["id_token"]
        log.debug(str(id_token))
        me = self._azure_jwt_token_parse(id_token)
        log.debug("Parse JWT token : {0}".format(me))
        return {
            "name": me.get("name", ""),
            **"email": me["email"],**
            "first_name": me.get("given_name", ""),
            "last_name": me.get("family_name", ""),
            "id": me["oid"],
            "username": me["oid"],
            "role_keys": me.get("roles", []),
        }

when i am changing that key name successfully login

How to reproduce the bug

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected results

am expecting token will generate with upn key and successfully login azure authentication in super set
what you expected to happen.

Actual results

what actually happens.

Screenshots

image

If applicable, add screenshots to help explain your problem.

Environment

(please complete the following information):

  • browser type and version:
  • superset version: superset version
  • python version: 3.9
  • node.js version: node -v
  • any feature flags active:

Checklist

Make sure to follow these steps before submitting your issue - thank you!

  • I have checked the superset logs for python stacktraces and included it here as text if there are any.
  • I have reproduced the issue with at least the latest released version of superset.
  • I have checked the issue tracker for the same issue and I haven't found one similar.

Additional context

Add any other context about the problem here.

@rusackas
Copy link
Member

rusackas commented Mar 6, 2024

I believe this should have been closed with #26037
Let us know if you still see this in 3.x, and we can revisit.

@rusackas rusackas closed this as completed Mar 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants