Configuring Idira Identity OIDC Authenication to AWS ALB
99
Created On 11/10/26 11:03 AM - Last Modified 11/10/26 15:52 PM
Objective
This document will walk you through the necessary steps to configure Idira Identity as a AWS provider AWS Application Load Balancer (ALB). By doing so Idira Identity will become the primary authentication method for the give AWS ALB.
Below are the basic steps that need to be done during the configuration:
- Create a new Custom OIDC application in Idira Identity
- Collect the endpoint URL’s Idira Identity OIDC application
- Configure the AWS ALB Listener for OIDC authentication
Environment
21.1;21.2;21.3;21.4;21.5;21.6;21.7;21.8;21.9;21.10;21.11;21.12;22.1;22.2;22.3;22.4;22.5;22.6 Identity App Access Service
Procedure
Create Custom OIDC application in CyberArk Identity
The first thing that we need to do is create a new custom OIDC application in CyberArk Identity. Login to the admin console for your tenant to start the configuration.From the admin portal select “Web Apps” from the left-hand menu.
Once the Web Apps page loads click the Add Web Apps from upper right-hand corner in the admin portal. This will launch the Add Web Apps wizard.
Select the Custom tab at the top left and scroll down on the right-hand side until you see the OpenID Connect connector. Then click Add.
Once the Add Web App confirmation screen loads click Yes to add the new OpenID Connect application.
Now click Close to proceed to the new OpenID Connect Application configuration.
On the Settings tab, provide an Application ID for this OpenID Connect application. In this example we just use “awsalb”. This should be something that represents the application(s) that are behind this AWS ALB.
Note: Only Alphanumeric characters are allowed. No special characters or spaces are allowed in this field.
Next, change the Name of the connector to something meaningful in this example we just use a more visual friendly name of the Application ID.
Next, uncheck the Show in user app list since AWS ALB do not support IDP initiated connections. Click Save to commit our changes.
Click on the Trust in the left-hand menu. We need to add a string for the Client Secret, this should be at least 20+ characters in length for security purposes. In both the Resources application URL and the Authorized Redirect URIs enter the AWS ALB callback URL in the following format: https://<DNS CNAME>/oauth2/idpresponse
Click on the Token in the left-hand menu. Set the Token Lifetime and if you would like to allow refresh tokens. Next, we need to add a script on what we need in the token returned to the AWS ALB.
| setIssuer(Issuer); setClaim("name", LoginUser.DisplayName); setClaim("preferred_username", LoginUser.Username); setClaim('given_name', LoginUser.Get('givenName')); setClaim('family_name', LoginUser.Get('sn')); /* setClaim("groups", LoginUser.GroupNames); */ var email = LoginUser.Email; setClaim("email", email); if (email && email != 'unset') setClaim("email_verified", 'true'); var phoneNumber = LoginUser["MobileNumber"]; if (!phoneNumber) phoneNumber = LoginUser["OfficeNumber"]; setClaim("phone_number", phoneNumber); if (phoneNumber && phoneNumber != 'unset') setClaim("phone_number_verified", 'true'); |
Copy and paste the above script into the token window.
At this point we can extract the URL’s for the OpenID Connect application. Click on the Trust in the left-hand menu. Note down both the Client ID and Client Secret. Then click the Copy button on the Metadata URL.
Paste that URL in a browser which should render a page similar to above. You will need 4 URLs from this application metadata. You will need the authorization_endpoint, issuer, userinfo_endpoint and token_endpoint.
Now that we have the Client ID, Client Secret and the 4 URL’s needed we can proceed with the configuration of the AWS ALB.
Configure the AWS ALB Listener for OIDC authentication
Using the data and URL’s collected in the previous steps we can now configure the AWS ALB to use CyberArk Identity for authentication for any applications behind the ALB. While the ALB will be handling the authentication of the user, it is required that the backend applications perform the Authorization of the user for their application.
To start the configuration you will need permissions or an AWS IAM role that will allow you to Create/Modify a ALB configuration. Login to the AWS console and launch the EC2 Console.
Once in the EC2 Console scroll down on the left hand menu and select Load Balancers.
Select the Load Balancer that you want to configure Authentication for. Then in the bottom window select the Listeners tab.
Select the listener that you would like to add authentication. Then Click Edit.
From the Listener edit screen scroll down till you find the Add action drop down and select Authenticate.
This will add an Authenticate section as the first step in the Listeners configuration.
Populate the URL fields with the 4 URLS collected in the previous step. Also enter the Client ID and Secret.
Scroll down and select Save Changes.
This completes the configuration of the AWS ALB OIDC authentication. You can now test the configuration by accessing the Load Balancers DNS address. You should be redirected to your CyberArk Identity tenant for Authencation.