How to configure Idira SAML SSO with Alibaba Cloud for Role-Based SSO

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
This naming convention will be used in the SAML response for mapping CyberArk Roles to Alibaba RAM Roles.

In the CyberArk Admin Portal, go to Core Services > Roles and create the desired roles and assign role members.
Graphical user interface, application  Description automatically generated
 

Configuring SAML integration between CyberArk and Alibaba Cloud

 

Add a new SAML configuration in CyberArk

  1. In the CyberArk Admin Portal, go to Apps & Widgets > Web Apps and click Add Web Apps. Graphical user interface, text, application, email  Description automatically generated
  2. Go to the Custom tab, scroll to SAML and click Add.
Graphical user interface, text, application  Description automatically generated
  1. Click Yes, then click Close.
  2. Change the Name to “Alibaba Cloud” or something to help identify what the configurations are for. Click Save.
  3. 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.
Graphical user interface, application  Description automatically generated

 

Add a new IdP in Alibaba

  1. In the Alibaba Console, log on to the RAM console.
  2. In the left-side navigation pane, click SSO. 
  3. On the Role-based SSO tab, click the SAML tab and click Create IdP. 
Graphical user interface, application  Description automatically generated
  1. 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. 
  2. In the Metadata File section, click Upload to upload the metadata file that was downloaded from the CyberArk Admin Portal. 
  3. Click OK.
  4. Copy the Alibaba SAML SP metadata URL.Graphical user interface, application  Description automatically generated

Complete SAML configurations in CyberArk

  1. Back in the CyberArk Admin Portal, go to Trust > Service Provider Configuration.
  2. Paste the SAML SP metadata URL copied from the Alibaba Console into URL and click Load.
Graphical user interface, text, application  Description automatically generated
  1. Go to SAML Response > SAML Script Editor and paste the following script:

Graphical user interface, application  Description automatically generated

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.

  1. Go to Permissions and add the CyberArk Role(s) that will access Alibaba Console. Click Save.
Table  Description automatically generated with medium confidence

Add new SAML Role in Alibaba Cloud Console

  1. In the Alibaba Console, go to Roles and click Create Role.
  2. Select the IdP for the role type. Click Next.
Graphical user interface, application, Word  Description automatically generated
  1. 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.
Graphical user interface, text, application, email  Description automatically generated
  1. Add the desired permissions to the RAM Role.

Logging In via SAML

Log into the CyberArk User Portal and click on the Alibaba Cloud app tile and you should be logged directly into the Alibaba Console. The user may be prompted to choose an Alibaba RAM Roles if the user is assigned to multiple Alibaba RAM Roles.

Graphical user interface, application  Description automatically generated
 


Actions
  • Print
  • Copy Link

    https://knowledgebase.paloaltonetworks.com/KCSArticleDetail?id=kA1hj0000000ynNCAQ&lang=en_US&refURL=http%3A%2F%2Fknowledgebase.paloaltonetworks.com%2FKCSArticleDetail