How to add Microsoft Azure AD as a SAML Identity Provider in AWS Cognito?

Поделиться
HTML-код
  • Опубликовано: 9 янв 2025

Комментарии • 55

  • @securityinaction1018
    @securityinaction1018  Год назад

    Please subscribe to this channel for regular updates ruclips.net/channel/UCEEayyyCrJO94FYlzF0NLTg
    Thank You for the support.

  • @ddavity
    @ddavity 5 месяцев назад

    AMAZING explanation! Showing first the overview and then going through each single step required with actual testing to see how it works. I need to do this kind of integration and this video is just gold to me. Thank you!

    • @securityinaction1018
      @securityinaction1018  5 месяцев назад

      Thank you. Glad it was helpful!
      Please like, subscribe & share this video / channel !! Thanks in advance.

  • @joshuaalharrison
    @joshuaalharrison Год назад +2

    Phenomenal explanation. The flow you provided made a very murky concept crystal clear. Thank you.

  • @rcoundon
    @rcoundon 10 месяцев назад

    This was an excellent one-stop-shop for setting this up. I'd previously been trying to pull together many disparate pieces of documentation, blog posts and articles to get this to work but this video took care of it all in one go.
    The only thing I'm stuck on now is how to use the idToken that Cognito returns after the federated login in a call to an API Gateway endpoint. This works without the federated login but there's something about the token that API Gateway doesn't like.

    • @securityinaction1018
      @securityinaction1018  10 месяцев назад

      Glad it was helpful!
      What authorizer is configured in API GW? Do you see any difference between the ID token generated from federated login vs non-federated login? I think identities array might be different. But, all the other claims should be similar.
      Please subscribe, like & share to support this channel. Thanks in advance.

  • @RohitSankpal-x5v
    @RohitSankpal-x5v Год назад

    really nice and insightful videos , kindly continue same method of explaining going ahead

  • @derekmab7734
    @derekmab7734 Год назад

    A great video! I learned a lot from it and thank you very much for your time and efforts. I have subscribed.

  • @learnsharegrow7294
    @learnsharegrow7294 Год назад

    Thanks for sharing. It works practically .. :)

  • @ehsansotoodeh6522
    @ehsansotoodeh6522 Год назад

    It was very helpful. Thanks

  • @omega1962
    @omega1962 Год назад

    Excellent Excellent Excellent.....made it look very easy. Sir can you post a video explaining ADFS integration with AWS/Azure? Use case: I have AD server on-prem and I want to integrate to AWS or Azure, so that I should use the AD users to login to both Azure and AWS portals.

    • @securityinaction1018
      @securityinaction1018  Год назад +1

      I have not tried this. I think the best option is to integrate AzureAD with the AD and then do a SAML / OIDC federation with AWS / AZure. Or other option is to use ADFS + AD and do a SAML federation.

    • @omega1962
      @omega1962 Год назад +1

      Thank you for the explanation.

  • @CoericK
    @CoericK Год назад

    Hey, great video!, do you have a video to understand azure active directory and saml basics from scratch?

  • @vitor19980407
    @vitor19980407 9 месяцев назад

    Thanks for the video, it was really clarifying.
    What does need to change if I want that any user with a Microsoft account may be able to login?
    Right now I'm stucked with this error:
    AADSTS50020: ... The account needs to be added as an external user in the tenant first. Sign out and sign in again with a different Azure Active Directory user account.

    • @securityinaction1018
      @securityinaction1018  9 месяцев назад +1

      Thank you. I have not tried that. This documentation might help learn.microsoft.com/en-us/entra/identity-platform/supported-accounts-validation
      Please like, subscribe & share!! Thanks in advance.

    • @vitor19980407
      @vitor19980407 9 месяцев назад

      @@securityinaction1018 Thanks for this reference. I was kind of discovering that it wouldn't support some signInAudience with Cognito, but this reference just says it explicitly. So this integration only works for organizations, and not for personal emails.

    • @securityinaction1018
      @securityinaction1018  9 месяцев назад +1

      I have not tried it. But, please check if you can enable "personal emails" option when AzureAD is added as a OIDC provider in Cognito. You can refer this video for the steps ruclips.net/video/3ImxqC60SWw/видео.html on how to add AzureAD as OIDC provider

  • @prathikp-q3z
    @prathikp-q3z Год назад

    please make a video for logout of azure ad when using cognito hosted ui

    • @securityinaction1018
      @securityinaction1018  Год назад

      Unfortunately, it won't work because Cognito supports only POST binding for SAML logout requests and AzureAD supports only redirect binding (HTTP GET) for SAML logout endpoint

  • @guptashweta14
    @guptashweta14 Год назад

    Hi.. its great to know about SAML tracer. I have requirement to add aws cognito saml authentication on custom ui. Not getting enough idea over internet.
    I am able to login via hosted ui. But i need to add same on custom ui.
    Any help would be appreciated.

    • @securityinaction1018
      @securityinaction1018  Год назад +1

      Hi Shweta,
      Hosted UI is required for any external SAML identity provider to work in Cognito because SAML federation happens in browser. From custom UI, you can add a button which will initiate the SAML federation with AzureAD. What you can do is, when a user clicks this button, it should initiate authorization code grant flow with Cognito. In the authorize endpoint, pass the the identity_provider and idp_identifier parameter to bypass the hosted UI login page and redirect to AzureAD. In this way, users won't even realize hosted UI exists.
      Refer docs.aws.amazon.com/cognito/latest/developerguide/authorization-endpoint.html where it talks about these parameters

  • @osmarromeo7
    @osmarromeo7 Год назад

    Thank you for this video and your help. excuse me, in my project I cant logout the session, can you help me

    • @securityinaction1018
      @securityinaction1018  Год назад +1

      I have not tried the single logout option. But, Cognito supports SLO based on this documentation docs.aws.amazon.com/cognito/latest/developerguide/cognito-user-pools-managing-saml-idp-console.html. Please note that AzureAD should also SLO for this to work.

  • @Shouvik-sc
    @Shouvik-sc 11 месяцев назад

    Thanks for making this video. It offered great conceptual clarity with excellent explanation.
    I have one question though. If I create an user in the Cognito user pool directly (with a default password) and then I try to login using idp rather than the password, then I am getting an error in SAML response.
    "Invalid SAML response received: User already exists with provider user id"
    Is there any way to deal with this?

    • @securityinaction1018
      @securityinaction1018  11 месяцев назад

      You shouldn't get that error. Are you creating a user with the same username as the IdP user in the user pool?

    • @Shouvik-sc
      @Shouvik-sc 11 месяцев назад

      @@securityinaction1018 yes, once I created the user with different username, it created 2 different users with same email. One that I created on Cognito and one that got auto created. I am trying to use AdminLinkProviderForUser with pre-signup lambda with prevent creation of duplicate user now.

    • @securityinaction1018
      @securityinaction1018  11 месяцев назад

      Yes, you can link both the users. What is the use case? Do you want to pre-provision the users in user pool before they login using IdP?

    • @Shouvik-sc
      @Shouvik-sc 11 месяцев назад

      The usecase is to create users who have not signed up on the application yet. The users can be assigned some tasks. When the user signs in using SSO, it should get linked to the same user so that they can find their tasks.

    • @securityinaction1018
      @securityinaction1018  11 месяцев назад

      Got it. So, you want to pre-provision the users, assign some tasks so that they can view it after they SSO using their IdP. Whatever approach you are taking is the right one.

  • @shubh2294
    @shubh2294 Год назад

    Very nice video. For some reason i'm getting 500 when i'm getting the SAML response :(

    • @securityinaction1018
      @securityinaction1018  Год назад

      Please use the SAML tracer to verify if SAML assertion is posted back to Cognito. Also, check if any error message is displayed in the browser URL as a request parameter.

    • @shubh2294
      @shubh2294 Год назад

      @@securityinaction1018 checked that. It's just plain and simple 500

    • @securityinaction1018
      @securityinaction1018  Год назад +1

      Ok, then most probably some issue in AzureAD configuration. Please check the steps again in the video to make sure all the configurations are correct.

    • @shubh2294
      @shubh2294 Год назад +1

      Thanks man

  • @Luke-g6p
    @Luke-g6p 5 месяцев назад

    Could you please add time stamps to this video?

    • @securityinaction1018
      @securityinaction1018  5 месяцев назад

      Sorry, I am not aware of that. If you can share any websites on how it needs to be done, I will surely take a look.

    • @Luke-g6p
      @Luke-g6p 5 месяцев назад

      @@securityinaction1018 I'd recommend googling "how to add timestamps to youtube video" and it'll teach you how. Thanks for the video again! Helped a lot.

    • @securityinaction1018
      @securityinaction1018  4 месяца назад

      Glad it helped. Sure, will check it out.
      Please like, subscribe & share this video / channel !! Thanks in advance.

  • @mrwho2513
    @mrwho2513 8 месяцев назад

    hi there, what about the logout? does cognito provides log out from SAML provider, in this case Azure AD? or may Okta? I use aws amplify, and after the logout, the users still remails logged in IdP

    • @securityinaction1018
      @securityinaction1018  8 месяцев назад +1

      As per this doc learn.microsoft.com/en-us/entra/identity-platform/single-sign-out-saml-protocol, AzureAD SAML logout supports only redirect binding (HTTP GET), and not HTTP POST binding. Cognito uses POST binding for SAML logout and that is the reason why IdP session is not logged out. I have not tested Okta. If Okta supports HTTP POST binding for SAML logout, it should work.
      Please like, subscribe & share!! Thanks in advance.

    • @mrwho2513
      @mrwho2513 8 месяцев назад

      @@securityinaction1018 I have tested with BOTH, indeed, cognito does not work with GET, Okta sends POST, but then okta session is still persisted, whereas AzureAD session is terminated, even though cognito returns with an error after the GET request, what a pitty

    • @securityinaction1018
      @securityinaction1018  8 месяцев назад

      That's not good. Is Okta sending a successful response for SAML logout request from Cognito?