azure SSO不适用于使用自定义策略的MFA的多个应用程序

uajslkp6  于 2023-11-21  发布在  其他
关注(0)|答案(1)|浏览(123)

我们有多个Angular SPA使用相同的应用程序(客户端ID)在B2C。我们已经实现了自定义策略的用户流- MFA使用电话或电子邮件选项,在每个应用程序中独立调用。
我们希望实现应用程序之间的SSO,即如果应用程序A成功登录,用户尝试打开应用程序B,它应该自动登录。
使用自定义策略中的以下SSO配置,当在浏览器中访问应用程序B时,我们能够绕过登录屏幕,但用户无法通过MFA,并且即使在用户已经使用应用程序A登录后,也始终显示MFA屏幕。

  1. <UserJourneyBehaviors>
  2. <SingleSignOn Scope="Tenant" KeepAliveInDays="7" />
  3. <SessionExpiryType>Rolling</SessionExpiryType>
  4. <SessionExpiryInSeconds>86400</SessionExpiryInSeconds>
  5. </UserJourneyBehaviors>

字符串
不确定是否需要任何额外的设置来绕过MFA。
我也试过使用Preconditions来检查'isActiveMFASession'并跳过MFA之旅,但无法使其工作。我们有以下演示步骤。

  1. <UserJourneys>
  2. <UserJourney Id="SignUpOrSignInMFAOption" DefaultCpimIssuerTechnicalProfileReferenceId="JwtIssuer">
  3. <OrchestrationSteps>
  4. <OrchestrationStep Order="1" Type="CombinedSignInAndSignUp" ContentDefinitionReferenceId="api.signuporsignin">
  5. <ClaimsProviderSelections>
  6. <!-- <ClaimsProviderSelection TargetClaimsExchangeId="FacebookExchange"/> -->
  7. <ClaimsProviderSelection ValidationClaimsExchangeId="LocalAccountSigninEmailExchange" />
  8. </ClaimsProviderSelections>
  9. <ClaimsExchanges>
  10. <ClaimsExchange Id="LocalAccountSigninEmailExchange" TechnicalProfileReferenceId="SelfAsserted-LocalAccountSignin-Email" />
  11. </ClaimsExchanges>
  12. </OrchestrationStep>
  13. <!-- Check if the user has selected to sign in using one of the social providers -->
  14. <OrchestrationStep Order="2" Type="ClaimsExchange">
  15. <Preconditions>
  16. <Precondition Type="ClaimsExist" ExecuteActionsIf="true">
  17. <Value>objectId</Value>
  18. <Action>SkipThisOrchestrationStep</Action>
  19. </Precondition>
  20. </Preconditions>
  21. <ClaimsExchanges>
  22. <!-- <ClaimsExchange Id="FacebookExchange" TechnicalProfileReferenceId="Facebook-OAUTH"/> -->
  23. <ClaimsExchange Id="SignUpWithLogonEmailExchange" TechnicalProfileReferenceId="LocalAccountSignUpWithLogonEmail" />
  24. </ClaimsExchanges>
  25. </OrchestrationStep>
  26. <OrchestrationStep Order="3" Type="ClaimsExchange">
  27. <Preconditions>
  28. <Precondition Type="ClaimEquals" ExecuteActionsIf="true">
  29. <Value>authenticationSource</Value>
  30. <Value>socialIdpAuthentication</Value>
  31. <Action>SkipThisOrchestrationStep</Action>
  32. </Precondition>
  33. </Preconditions>
  34. <ClaimsExchanges>
  35. <ClaimsExchange Id="AADUserReadWithObjectId" TechnicalProfileReferenceId="AAD-UserReadUsingObjectId" />
  36. </ClaimsExchanges>
  37. </OrchestrationStep>
  38. <!--Sample: If uses is enrolled for MFA, ask the user to select the preferred method-->
  39. <OrchestrationStep Order="4" Type="ClaimsExchange">
  40. <Preconditions>
  41. <Precondition Type="ClaimsExist" ExecuteActionsIf="true">
  42. <Value>isActiveMFASession</Value>
  43. <Action>SkipThisOrchestrationStep</Action>
  44. </Precondition>
  45. </Preconditions>
  46. <ClaimsExchanges>
  47. <ClaimsExchange Id="SelfAsserted-Select-MFA-Method" TechnicalProfileReferenceId="SelfAsserted-Select-MFA-Method" />
  48. </ClaimsExchanges>
  49. </OrchestrationStep>
  50. <!-- Throw error if control was bypassed -->
  51. <OrchestrationStep Order="5" Type="SendClaims" CpimIssuerTechnicalProfileReferenceId="Return-MFA-Method-Incorrect-Error">
  52. <Preconditions>
  53. <Precondition Type="ClaimEquals" ExecuteActionsIf="true">
  54. <Value>extension_mfaByPhoneOrEmail</Value>
  55. <Value>email</Value>
  56. <Action>SkipThisOrchestrationStep</Action>
  57. </Precondition>
  58. <Precondition Type="ClaimEquals" ExecuteActionsIf="true">
  59. <Value>extension_mfaByPhoneOrEmail</Value>
  60. <Value>phone</Value>
  61. <Action>SkipThisOrchestrationStep</Action>
  62. </Precondition>
  63. </Preconditions>
  64. </OrchestrationStep>
  65. <!-- Phone verification: If MFA is not required, the next three steps (#5-#7) should be removed.
  66. This step checks whether there's a phone number on record, for the user. If found, then the user is challenged to verify it. -->
  67. <OrchestrationStep Order="6" Type="ClaimsExchange">
  68. <Preconditions>
  69. <Precondition Type="ClaimsExist" ExecuteActionsIf="true">
  70. <Value>isActiveMFASession</Value>
  71. <Action>SkipThisOrchestrationStep</Action>
  72. </Precondition>
  73. <!--Sample: If the preferred MFA method is not 'phone' skip this orchestration step-->
  74. <Precondition Type="ClaimEquals" ExecuteActionsIf="false">
  75. <Value>extension_mfaByPhoneOrEmail</Value>
  76. <Value>phone</Value>
  77. <Action>SkipThisOrchestrationStep</Action>
  78. </Precondition>
  79. </Preconditions>
  80. <ClaimsExchanges>
  81. <ClaimsExchange Id="PhoneFactor-Verify" TechnicalProfileReferenceId="PhoneFactor-InputOrVerify" />
  82. </ClaimsExchanges>
  83. </OrchestrationStep>
  84. <!-- Save MFA phone number: The precondition verifies whether the user provided a new number in the
  85. previous step. If so, then the phone number is stored in the directory for future authentication
  86. requests. -->
  87. <OrchestrationStep Order="7" Type="ClaimsExchange">
  88. <Preconditions>
  89. <Precondition Type="ClaimsExist" ExecuteActionsIf="false">
  90. <Value>newPhoneNumberEntered</Value>
  91. <Action>SkipThisOrchestrationStep</Action>
  92. </Precondition>
  93. </Preconditions>
  94. <ClaimsExchanges>
  95. <ClaimsExchange Id="AADUserWriteWithObjectId" TechnicalProfileReferenceId="AAD-UserWritePhoneNumberUsingObjectId" />
  96. </ClaimsExchanges>
  97. </OrchestrationStep>
  98. <!--Sample: MFA with email-->
  99. <OrchestrationStep Order="8" Type="ClaimsExchange">
  100. <Preconditions>
  101. <Precondition Type="ClaimEquals" ExecuteActionsIf="false">
  102. <Value>extension_mfaByPhoneOrEmail</Value>
  103. <Value>email</Value>
  104. <Action>SkipThisOrchestrationStep</Action>
  105. </Precondition>
  106. </Preconditions>
  107. <ClaimsExchanges>
  108. <ClaimsExchange Id="Email-Verify" TechnicalProfileReferenceId="EmailVerifyOnSignIn" />
  109. </ClaimsExchanges>
  110. </OrchestrationStep>
  111. <OrchestrationStep Order="9" Type="SendClaims" CpimIssuerTechnicalProfileReferenceId="JwtIssuer" />
  112. </OrchestrationSteps>
  113. <ClientDefinition ReferenceId="DefaultWeb" />
  114. </UserJourney>
  115. </UserJourneys>


我也试着阅读SM-AAD和SM-MFA的文档,但在如何与我的策略集成方面没有太多的运气。
任何帮助给予正确的方向,使这项工作是高度赞赏。
更新1:
我能够使单点登录的工作,但如果我注销的任何应用程序,它不是要求我选择的选项,无论是电话或电子邮件的MFA和默认我的最后选定的一个,当用户试图登录。
是因为我为extension_mfaByPhoneOrEmail设置的声明吗?
我有一个业务流程步骤,首先跳过它来实现SSO

  1. <!--Sample: If uses is enrolled for MFA, ask the user to select the preferred method-->
  2. <OrchestrationStep Order="5" Type="ClaimsExchange">
  3. <Preconditions>
  4. <Precondition Type="ClaimsExist" ExecuteActionsIf="true">
  5. <Value>extension_mfaByPhoneOrEmail</Value>
  6. <Action>SkipThisOrchestrationStep</Action>
  7. </Precondition>
  8. </Preconditions>
  9. <ClaimsExchanges>
  10. <ClaimsExchange Id="SelfAsserted-Select-MFA-Method" TechnicalProfileReferenceId="SelfAsserted-Select-MFA-Method" />
  11. </ClaimsExchanges>
  12. </OrchestrationStep>


甚至单点登录也不起作用,即如果我注销一个应用程序,则另一个应用程序会有一个活动会话。
你能帮我解决这个问题吗?我试过使用前提条件,但如果我删除上述声明,我的SSO首先就不工作了。

qmb5sa22

qmb5sa221#

要在整个过程中实现SSO,您需要为每个步骤使用相同的SM。
我通常做一个新的SM,结合SM-AAD和SM-MFA,然后使用它。

相关问题