Configuring OpenID Connect authentication
4 Tasks
45 mins
Scenario
Front Stage is considering using OpenID Connect to Authenticate Operators.
Design and implement an OpenID Connect as a proof of concept.
Pega now supports SSO login with OpenID Connect. You can use Gmail, Facebook, or any other Open ID connect Identity Providers to log in to the Pega Platform™ application.
To use Gmail credentials to log in to the Pega Platform application, you make configurations on the Google Account and in the Pega Platform application.
The following table provides the credentials you need to complete the challenge.
Role | User name | Password |
---|---|---|
Administrator | Admin@Booking | rules |
Detailed Tasks
1 Review the solution detail
- Make configurations on Google Account.
- Create a project on Google API & Services.
- Fill OAuth consent screen.
- Create Credentials.
- Make configurations in the Pega Platform application.
- Configure new SSO login from App Studio.
- Verify Authentication Service.
2 Create the project in Google API & Services
- Click the link to access the Google API Console.
- In the Credentials section, click Create to create the project as shown in the following image.
- In the Project name field, enter PegaOpenIDConnectProject.
- Click Create to create the new project.
- Click Configure Consent Screen to fill in the details.
- In the User Type section, select External, and then click Create.
- Here we have to provide the Authorized Domain. Generating a Client ID and Secret Key are mandatory:
- Application Name: Enter a name to identify your configuration.
- Support Email: Enter your Gmail address. This is displayed automatically.
- Scope of Google API: Define the scope (for example, Email, Profile, OpenID).
- Authentication Domain: Add your hostname where the Pega Platform application is running. If you are using the Pega Cloud, the domain name is easy to find and use. If you are using the Pega VM or Personal Edition, then a change is required in the Tomcat server.xml file to use some domain name for localhost. Instructions are provided at the end of these exercise instructions. For example, www.pegaopenid.com is the domain in the Tomcat server.xml file/
- In the header, click Create Credentials > OAuth Client ID to configure the OAuth client ID.
-
In the Application type section, select Web application.
-
In the Authorized redirect URIs field, enter a pathname. For example, https://www.pegaopenid.com/prweb/PRAuth.
-
Click Create to view the pop-up window with the Client ID and Client secret key.
-
the Client ID and Client secret key for use in configuring rules in the Pega Platform application.
Note: The Client ID and Client secret key are also accessible on the Create Credentials page.
3 Configure new Single sign-on (SSO) login in App Studio
Configure new SSO login from App Studio
- Log in into App Studio.
- In the navigation pane on the left, click Users.
- In the Users explorer, click Single sign-on (SSO).
- In the upper right, click New > Google.
- Create the new single sign-on login.
- Name: Enter a name for this configuration; this name is appended to the URL.
- Import metadata: Click to select URL and provide the URL (for example, https://accounts.google.com/.well-known/openid-configuration)
- Client ID and Client secret: Use the values from the Create Credentials page of Google API & Services.
- Map operator ID from claim: Enter your name.
- Create operators for new users: Select this check box and provide the access group.
- Configure your IDP: Copy this URL to paste into the Import metadata field.
- Click Submit.
The SSO with OpenID connect is created and can be opened in Dev Studio for further configuration or verification.
Tip: Open the Authentication Service rule in Dev Studio if any further configuration changes are required. You can map required properties on the Mapping tab.
Changes in the Server.xml file of Tomcat
If you are performing the challenge in a personal edition or in a VM machine, perform the following changes to the server.xml file.
- Pega Personal Edition (on Windows) will be installed in C:\PRPCPersonalEdition.
- Open server.xml file from C:\PRPCPersonalEdition\tomcat\conf.
- If using VM – Linux Lite, the server.xml file is located at /opt/tomcat/conf.
- Search for the connector port and set it 80, with the following changes:
<Connector port="80" protocol="HTTP/1.1"
connectionTimeout="20000"
redirectPort="8443" /> - Search for the default host and enter an address with .com to act as your domain <Engine name="Catalina" defaultHost="www.pegaopenid.com">
- In the same server.xml file, search for host name and give the same name.
<Host name="www.pegaopenid.com"
appBase="webapps"
unpackWARs="true"
autoDeploy="true"> - After making the changes, save the server.xml in Tomcat.
- In the hosts file, enter the following line:
- If Windows: C:\Windows\System32\drivers\etc\hosts
- If VM- Linux lite: /etc/hosts
127.0.0.1 www.pegaopenid.com (name as given in the server.xml)
After making changes to the files, you can now access the personal edition with a domain name (no need for the port number).
- http://localhost:8080/prweb -- earlier
- http://www.pegaopenid.com/prweb -- after changes to server.xml and hosts file
4 Confirm your work
- Copy the Login URL from the Authentication Service.
- Open a different browser (if you are using Chrome, open Firefox).
- Paste the Login URL into the Web browser.
- In the Login with Gmail section, enter your Gmail credentials.
Available in the following mission:
If you are having problems with your training, please review the Pega Academy Support FAQs.
Want to help us improve this content?