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

TOTP MFA prevents SAML claims from populating in ID token #8249

Open
nvjoshi2 opened this issue May 15, 2024 · 0 comments
Open

TOTP MFA prevents SAML claims from populating in ID token #8249

nvjoshi2 opened this issue May 15, 2024 · 0 comments

Comments

@nvjoshi2
Copy link

Operating System

Mac OS 14.2.1 (23C71)

Browser Version

Chrome/124.0.6367.119

Firebase SDK Version

10.12.0

Firebase SDK Product:

Auth

Describe your project's tooling

React Next.js SPA

Describe the problem

When I enable TOTP MFA for a tenant, SAML claims are no longer populated in the JWT for a signed in user.

Steps and code to reproduce issue

  1. Create Google Identity Platform Project
  2. Enable multitenancy, create tenant
  3. Enable TOTP MFA for tenant via admin-sdk
  4. Add SAML provider to tenant (used Entra ID in my case)
  5. Make React application, add firebase as dependency
  6. Set up TOTP MFA enrollment and sign in flows
  7. Initiate SAML redirect sign in flow
signInWithRedirect(auth, new SAMLAuthProvider("<Provider ID>"))
  1. Be prompted to enroll in MFA (At this point the JWT does contain SAML claims)

image

  1. Complete enrollment

  2. Print UserImpl, decode JWT

{
  "iss": "<redacted>",
  "aud": "<redacted>",
  "auth_time": 1715792567,
  "user_id": "<redacted>",
  "sub": "<redacted>",
  "iat": 1715792567,
  "exp": 1715796167,
  "email": "<redacted>",
  "email_verified": true,
  "firebase": {
    "identities": {
      "saml.cyvidia-entra-id": [
        "<redacted>"
      ],
      "email": [
        "<redacted>"
      ]
    },
    "sign_in_provider": "saml.cyvidia-entra-id",
    "sign_in_second_factor": "totp",
    "second_factor_identifier": "c2393de3-646f-45c5-aade-5ade10bc203e",
    "tenant": "customer-1-p2kfv"
  }
}
  1. Log out, log back in
  2. Print UserImpl, verify that JWT still does not contain claims
  3. Disable TOTP MFA using admin sdk
  4. Log out, log back in
  5. Print UserImpl, decode JWT
{
  "iss": "<redacted>",
  "aud": "<redacted>",
  "auth_time": 1715792890,
  "user_id": "<redacted>",
  "sub": "<redacted>",
  "iat": 1715792890,
  "exp": 1715796490,
  "email": "<redacted>",
  "email_verified": true,
  "firebase": {
    "identities": {
      "saml.cyvidia-entra-id": [
        "<redacted>"
      ],
      "email": [
        "<redacted>"
      ]
    },
    "sign_in_provider": "saml.cyvidia-entra-id",
    "sign_in_attributes": {
      "http://schemas.microsoft.com/identity/claims/displayname": "<redacted>",
      "http://schemas.microsoft.com/identity/claims/tenantid": "<redacted>",
      "http://schemas.microsoft.com/identity/claims/identityprovider": "<redacted>",
      "http://schemas.microsoft.com/identity/claims/objectidentifier": "<redacted>",
      "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/givenname": "<redacted>",
      "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/name": "<redacted>",
      "http://schemas.microsoft.com/claims/authnmethodsreferences": [
        "http://schemas.microsoft.com/ws/2008/06/identity/authenticationmethod/password",
        "http://schemas.microsoft.com/claims/multipleauthn"
      ],
      "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/surname": "<redacted>",
      "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/emailaddress": "<redacted>"
    },
    "tenant": "customer-1-p2kfv"
  }
}
@nvjoshi2 nvjoshi2 added new A new issue that hasn't be categoirzed as question, bug or feature request question labels May 15, 2024
@rizafran rizafran removed the new A new issue that hasn't be categoirzed as question, bug or feature request label May 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants