recipe
公開されました August 05, 2024

Integrate Azure AD with Liferay DXP Using SAML

learn-recipe-header-text

紹介

As a general best practice, integrating Liferay DXP with other Identity Providers (IdPs) provides enhanced security and streamlines authentication management.

This recipe guides you through the basic steps needed to integrate Azure AD, your Identity Provider (IdP), with your Liferay environment using Security Assertion Markup Language (SAML).

prerequisites

  • Liferay DXP environment

  • A user with administrative access to SAML Admin in Liferay's Control Panel

  • A Microsoft Azure account with permissions to administer Azure AD

  • At least one user created in your Azure AD account

steps

  1. From the Azure portal, go to Enterprise Applications.

  2. Click New application to create a new application.

  3. Click Create your own application.

  4. Name your application as desired and select Integrate any other application you don't find in the gallery (Non-gallery).

  5. Once your application is created, go to Users and groups on the left sidebar menu and assign your users to the application.

  6. Go to Single sign-on on the left sidebar menu and select SAML.

    This redirects you to the SAML SSO configuration page.

  7. Under Basic SAML Configuration, click Edit, enter these values, and click Save:

    Field Value
    Identifier (Entity ID) https://[your_web_server]/saml
    Reply URL https://[your_web_server]/c/portal/saml/acs
  8. Edit the Attributes & Claims section and ensure that user.mail is set as the Unique User Identifier (Name ID).

  9. Under Additional claims, ensure it has suitable values for the user's given name (first name), surname (last name), and email address.

  10. メモ

    You can add, update, or delete any of the Additional Claims. However, Liferay requires specific values (first name, last name, and email address) to successfully add a user to the instance.

  11. Back in the SSO setup page, edit the SAML Certificates section and ensure the Signing Option is set to Sign SAML response and assertion.

    This is necessary for Liferay DXP to trust Azure as its Identity Provider.

  12. Copy the App Federation Metadata Url and download the Federation Metadata XML.

    You'll use these in a later step to configure Liferay.

  13. On your Liferay DXP instance, open the Global Menu and go to Control Panel → Security → SAML Admin.

  14. Under the General tab, set these values and click Save:

    Field Value
    SAML Role Service Provider
    Entity ID https://[your_web_server]/saml
  15. 警告

    Do not enable SAML until you have finished configuring all settings.

  16. Create a Certificate and Private Key. An Encryption Certificate is not needed.

  17. Go to the Service Provider tab, ensure these settings are checked, and click Save:

    • Require Assertion Signature?

    • Sign Authn Requests?

    • Sign Metadata?

    • SSL Required

    • Allow showing the login portlet.

  18. Go to the Identity Provider Connections tab.

  19. Click Add Identity Provider and configure these settings:

    Field Value
    Name Azure AD
    Entity ID Enter the entityID found in the Federation Metadata XML file you downloaded from Azure
    Enabled Checked
    Upload Metadata XML Checked
    Metadata XML Upload the Federation Metadata XML file
    Name Identifier Format Email Address
  20. Under Attribute Mapping, add these Basic User Fields:

    User Field Expression SAML Attribute
    emailAddress mail
    firstName givenname
    lastName surname
  21. Click Save.

  22. Go back to the General tab, check Enabled, and click Save.

    You can now use Azure with SAML to authenticate in your Liferay instance.

  23. Log out of your current user.

  24. Click Sign In

    This redirects you to Microsoft's login page.

  25. Enter the email address and password for your user.

    Once you've successfully logged in, your Azure user should be registered in Liferay.

  26. Sign back in as your Liferay admin user.

  27. Open the Global Menu and go to Control Panel → Users and Organizations. Verify that your Azure user displays on the list.

conclusion

Congratulations! Users may now authenticate to your Liferay environment by using Azure AD via SAML.

ヒント

ヒント

Identifier Not Found In The Directory

Ensure the configuration in Azure AD and Liferay DXP matches, particularly the Entity IDs and reply URLs.

Unable To Process SAML Request

If you see an error message indicating that Liferay DXP was unable to parse the SAML request, ensure the SAML Certificates in Azure AD are set to sign the SAML response and assertion.

recipe
20 分

Capabilities

Product

Contact Us

Connect

Powered by Liferay
© 2024 Liferay Inc. All Rights Reserved • Privacy Policy