Configuring Liferay Authentication With Okta Using OpenId Connect (2024)

Configuring Liferay Authentication With Okta Using OpenId Connect (18)

DXP / Portal

  • Analytics Cloud
  • Commerce
  • DXP / Portal
  • Liferay Cloud
  • Reference

Configuring Single Sign-On

  • Token-based Single Sign On Authentication
  • Authenticating with SAML
  • Using OpenAM
  • Using OpenID Connect
  • Authenticating with CAS (Central Authentication Service)
  • Authenticating with Kerberos
  • Configuring Liferay Authentication With Auth0 Using OpenId Connect
  • Configuring Liferay Authentication With Okta Using OpenId Connect
  • Configuring Liferay Authentication With PingOne Using SAML
  • DXP
  • Installation and Upgrades
  • Securing Liferay
  • Configuring Single Sign-On
  • Configuring Liferay Authentication With Okta Using OpenId Connect

This tutorial guides you through the basic steps needed to integrate Okta, your Identity Provider (IdP), with your environment using OpenID Connect.

Prerequisites

  • Okta Dev account
  • Liferay DXP environment
  • A user who has administrative access Okta Admin Console
  • A user who has administrative access to Liferay’s Control Panel

Okta Configuration

  1. Log in to Okta Dev and navigate to ApplicationsAdd ApplicationCreate App Integration.

  2. Select OIDC - OpenID Connect, under Sign-in method, and Web Application, under Application type.

    Configuring Liferay Authentication With Okta Using OpenId Connect (24)

  3. Enter Liferay DXP - OIDC as the app integration name.

  4. For grant types, select Authorization Code and Refresh Token

  5. Enter https://[your_instance_url]/c/portal/login/openidconnect for the sign-in redirect URIs.

  6. Enter https://[your_instance_url] for the sign-out redirect URIs.

  7. Under assignments, select Skip group assignment for now.

  8. Click Save.

  9. On the Assignments tab, assign users to this application.

    Note

    Make sure to assign yourself and provision your own user account so that you will still be able to log in as the Liferay administrator.

Obtaining endpoint URLs

  1. In your Okta Dev account, go to the side panel and navigate to SecurityAPI.

  2. Under the “Authorization Servers” tab, locate the server named default and click on it to edit its configuration.

    Configuring Liferay Authentication With Okta Using OpenId Connect (25)

  3. Click on the “Metadata URI” link, which typically looks like this: https://dev-123456.okta.com/oauth2/default/.well-known/oauth-authorization-server

     issuer: "https://dev-123456.okta.com/oauth2/default" authorization_endpoint: "https://dev-123456.okta.com/oauth2/default/v1/authorize" token_endpoint: "https://dev-123456.okta.com/oauth2/default/v1/token" registration_endpoint: "https://dev-123456.okta.com/oauth2/v1/clients" jwks_uri: "https://dev-123456.okta.com/oauth2/default/v1/keys"
  4. This will give you the necessary URLs, with the exception of /userinfo endpoint. You can construct that endpoint by combining your base URL with the Auth Server name. For example: https://dev-123456.okta.com/oauth2/default/v1/userinfo.

Liferay OIDC Configuration

Note

Your installation must have a configured connection to a mail server to send email notifications. Alternatively, you can disable the feature Require strangers to verify their email address. See Tips and Troubleshooting for more information.

  1. On your DXP instance, navigate to Global MenuControl PanelInstance SettingsSecuritySSO.

  2. Go to OpenID Connect Provider Connection tab and add a new connection entry.

  3. Fill in the fields with the data you find at the endpoint URLs, as shown in the table below.

    Field Data
    Provider Name Okta OIDC
    Scopes scopes_supported
    Authorization Endpoint authorization_endpoint url
    Issuer URL issuer url
    JWKS URI jwks_uri url
    Subject Types subject_types_supported
    Token Endpoint token_endpoint url
    User Information Endpoint Follow step 4 from obtaining endpoint URLs
    OpenID Connect Client ID Under your application’s General tab in Okta
    OpenID Connect Client Secret Under your application’s General tab in Okta

Once that is done, OpenID Connect needs to be enabled. To enable the OpenId Connect:

  1. Navigate to Global MenuControl PanelConfigurationInstance Settings.

  2. Click on SSO under the security section.

  3. Go to the OpenID Connect tab, click the Enabled checkbox and click Save.

    Configuring Liferay Authentication With Okta Using OpenId Connect (26)

Validation

  1. Start your Liferay DXP instance

  2. Click on the Sign In button and choose OpenId Connect.

    Configuring Liferay Authentication With Okta Using OpenId Connect (27)

  3. Choose Client to Okta OIDC from the list.

    Configuring Liferay Authentication With Okta Using OpenId Connect (28)

  4. Sign in with your Okta account.

    Configuring Liferay Authentication With Okta Using OpenId Connect (29)

Conclusion

Congratulations! You have successfully completed this Solution Tutorial.

Tips and Troubleshooting

Sign-in and Sign-out Redirect URIs

If you encounter an error like the image below, verify that your sign-in and sign-out redirect URIs are configured correctly in Okta with the appropriate path and Hypertext Transfer Protocol (HTTP or HTTPS). You can find them in your Dev Okta account by navigating to the application you created → General tab → General SettingLogin section.

Configuring Liferay Authentication With Okta Using OpenId Connect (30)

Verify email address

By default, new users must verify their email address upon first login. To disable this requirement, in your Liferay DXP unselect the “Require strangers to verify their email address” checkbox. Navigate to Control PanelInstance SettingsPlatformUser Authentication and unselect the checkbox. However, if you want to keep email validation enabled, a configured connection to a mail server is necessary for your installation.

Configuring Liferay Authentication With Okta Using OpenId Connect (31)

Capability:

Platform

Resource Type:

Official Documentation

Feature:

DXP Configuration

Identity Management and Authentication

Deployment Approach:

Liferay PaaS

Liferay SaaS

Liferay Self-Hosted

    Liferay.com

    Ask

    Events

    Capabilities

    View All Capabilities

    Product

    Analytics Cloud

    Commerce

    DXP

    Liferay Cloud

    Reference

    Contact Us

    Powered by Liferay

    © 2024 Liferay Inc. All Rights Reserved • Privacy Policy

    Node: liferay-75c5b54c88-hsnvh:8080:

    Configuring Liferay Authentication With Okta Using OpenId Connect (2024)
    Top Articles
    Latest Posts
    Article information

    Author: Kelle Weber

    Last Updated:

    Views: 6552

    Rating: 4.2 / 5 (53 voted)

    Reviews: 92% of readers found this page helpful

    Author information

    Name: Kelle Weber

    Birthday: 2000-08-05

    Address: 6796 Juan Square, Markfort, MN 58988

    Phone: +8215934114615

    Job: Hospitality Director

    Hobby: tabletop games, Foreign language learning, Leather crafting, Horseback riding, Swimming, Knapping, Handball

    Introduction: My name is Kelle Weber, I am a magnificent, enchanting, fair, joyous, light, determined, joyous person who loves writing and wants to share my knowledge and understanding with you.