How to configure Idira SAML SSO with Alibaba Cloud for Role-Based SSO
87
Created On 11/10/26 10:54 AM - Last Modified 11/10/26 15:55 PM
Objective
This article will walk through the steps for configuring SAML single sign-on for the Alibaba Cloud Management Console and assume RAM Roles based on Idira Roles. The areas that will be covered includes:
- Creating Idira Roles
- Configuring SAML integration between Idira and Alibaba Cloud
- Creating new Alibaba RAM Roles that will be mapped to Idira Roles
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 CyberArk Roles
Before you start, decide on a naming convention for accessing the Alibaba Cloud Management Console. The names of the role must have a common prefix in the name of the roles. For example:
- AliRDSAdmin
- AliFullAdmin
In the CyberArk Admin Portal, go to Core Services > Roles and create the desired roles and assign role members.
Configuring SAML integration between CyberArk and Alibaba Cloud
Add a new SAML configuration in CyberArk
- In the CyberArk Admin Portal, go to Apps & Widgets > Web Apps and click Add Web Apps.
- Go to the Custom tab, scroll to SAML and click Add.
- Click Yes, then click Close.
- Change the Name to “Alibaba Cloud” or something to help identify what the configurations are for. Click Save.
- Go to Trust > Identity Provider Configuration and click Download Metadata File. Keep the Trust settings window open and log into the Alibaba Cloud Management Console in another browser window or tab.
Add a new IdP in Alibaba
- In the Alibaba Console, log on to the RAM console.
- In the left-side navigation pane, click SSO.
- On the Role-based SSO tab, click the SAML tab and click Create IdP.
- On the Create IdP page, configure IdP Name. Take note of this name, as it will be used in the SAML Response script in a later step.
- In the Metadata File section, click Upload to upload the metadata file that was downloaded from the CyberArk Admin Portal.
- Click OK.
- Copy the Alibaba SAML SP metadata URL.
Complete SAML configurations in CyberArk
- Back in the CyberArk Admin Portal, go to Trust > Service Provider Configuration.
- Paste the SAML SP metadata URL copied from the Alibaba Console into URL and click Load.
- Go to SAML Response > SAML Script Editor and paste the following script:
setVersion('2');
setIssuer(Issuer);
setSubjectName(LoginUser.Username);
setAudience('urn:alibaba:cloudcomputing:international');
setRecipient(ServiceUrl);
setSignatureType('Assertion');
setServiceUrl(ServiceUrl);
setHttpDestination(ServiceUrl);
setNameFormat('persistent');
// Attribute: RoleSessionName
// "The value is typically a user ID (bobsmith) or an email address (bobsmith@example.com); it should not be a value like a user's display name (Bob Smith) that includes a space." [AWS Documentation]
setAttribute('https://www.aliyun.com/SAML-Role/Attributes/RoleSessionName', LoginUser.Username);
// Attribute: Role
var roleNames = LoginUser.RoleNames;
var attrArray = new Array();
var accountNumber = '5xxxxxxxxxxxxxxx';
for (var i=0; i < roleNames.Length; i++)
{
if (~roleNames[i].indexOf('Ali')) {
var v = 'acs:ram::' + accountNumber + ':role/' + roleNames[i] + ',acs:ram::' + accountNumber + ':saml-provider/' + 'CyberArk';
attrArray.push(v);
}
}
setAttributeArray('https://www.aliyun.com/SAML-Role/Attributes/Role', attrArray);
- Replace 5xxxxxxxxxxxxxxx with your Alibaba account number.
- Replace Ali with the common prefix of the CyberArk Role(s) you created.
- Replace CyberArk with the IdP Name you used for creating a new IdP in Alibaba.
- Go to Permissions and add the CyberArk Role(s) that will access Alibaba Console. Click Save.
Add new SAML Role in Alibaba Cloud Console
- In the Alibaba Console, go to Roles and click Create Role.
- Select the IdP for the role type. Click Next.
- In the RAM Role Name, use the same name(s) as the CyberArk Roles created earlier. Make sure the case matches. In the Select IdP setting select the IdP setting you created earlier. Click OK.
- Add the desired permissions to the RAM Role.