- Access exclusive content
- Connect with peers
- Share your expertise
- Find support resources
Architectural scenario
Idira is used to provision an external user/vendor (that is not managed by the company’s directory), and to facilitate access to the company’s Google Cloud Platform (GCP) project. This architectural design lets you use an external entity’s (user/vendor’s) email address that has a different domain from the company domain (user/vendors’ identities are not part of the company's directory) to allow access to GCP through the company’s Idira portal web app.
Prerequisites
The customer needs to create and configure two GCP web apps: A web app for the connection to GCP with SCA enabled and a GCP web app with outbound provisioning to GCP from Idira Identity (Idira must be the IDP, i.e. The “Idira as the IDP” checkbox is selected within the Secure Cloud Access section of the web app). The customer must also configure the web app to work with SCA.
Expected behavior
A vendor logs in to CyberArk’s Identity Portal and gets a GCP web app tile. The vendor / user clicks the GCP tile and gets the GCP project with the specific roles attached for them in the SCA policy.
Architecture configuration
This configuration is unique where the user’s identifier (email address) differs from what GCP expects (the company’s domain) and therefore uses an account mapping approach for vendor access to GCP. In this scenario, two web apps are necessary: one for GCP access, the other for provisioning.
The basic provisioning works as required (the user account is provisioned to GCP with the correct domain suffix). However, when SCA tries to assume the role on the GCP project, SCA takes the username from the Email attributes of the user in Idira Identity. Since this user is an external vendor, the Email field is not from the customer’s organization domain (it could be, for example, “cyberark.com” or “gmail.com” or any other domain that is different from the organization domain). Since this user, which was taken from the Email field, has not been provisioned to GCP, they cannot assume any role and an error is generated.
The solution for this use case is to use the Account Mapping feature in the web app configuration to let SCA assume the role to the correct username (caution must be taken to ensure a unique identity, ex <alias>[email protected] is used). But, since provisioning is configured, account mapping is disabled and cannot be configured together with the provisioning configuration (this is by design in Idira Identity). The workaround for this situation is to create two web apps: one for provisioning and one for SCA, as detailed below.
Implementation steps
To use provisioning and the account mapping for SCA, do the following:
if (source.Classification == "User") {
destination.DisplayName = source.DisplayName + source.DisplayName.split("@")[0] + "@Add-Domain-Name.com" ;
destination.Username = source.DisplayName + source.DisplayName.split("@")[0] + "@Add-Domain-Name.com" ;
destination.Email = source.DisplayName + source.DisplayName.split("@")[0] + "@Add-Domain-Name.com" ;
trace('DisplayName=' + destination.DisplayName);
destination.PrimaryEmail = source.Email.split("@")[0] + "@" + GoogleDomain;
//Obtain First and Last name by splitting DisplayName on space char.
//Token 0 is FirstName, Token 1..N is LastName.
var nameTokens = source.DisplayName.split(" ");
destination.FirstName = nameTokens[0];
if (nameTokens.length == 1) {
destination.LastName = nameTokens[0];
}
else {
destination.LastName = nameTokens.slice(1, nameTokens.length).join(" "); }
destination.HomePhone = source.HomePhone;
destination.MobilePhone = source.MobilePhone;
destination.OfficePhone = source.OfficePhone;
// The code below is to set the user's Aliases by the Proxy Addresses.
// Alternatively, you can set the user's Aliases by the syntax:
// destination.Aliases = "[email_address_1],[email_address_2]";
// Note: The email addresses must be in verified domain and not exist in the account.
var proxyAddresses = source.GetDsProperty("ProxyAddresses");
if (proxyAddresses !== null && proxyAddresses.Length > 0) {
var addrString = "";
for (var i = 0; i < proxyAddresses.Length; i++) {
if (addrString) {
addrString += "," + proxyAddresses[i];
} else {
addrString = proxyAddresses[i];
}
}
destination.Aliases = addrString;
}
}
if (source.Classification == "Group") {
var propArr = getSourcePropertyByName("description");
if (propArr && propArr.Length) {
destination.Description = propArr[0];
}
destination.Email = DefaultEmail.split("@")[0] + "@" + GoogleDomain;
propArr = getSourcePropertyByName("name");
if (propArr && propArr.Length) {
destination.Name = propArr[0];
}
}
// to filter/omit groups from sync use the reject() method.
// the example below skips the sync of groups based on elements
// in the distinguished name (any group in org unit of accounts, is skipped)
// you can uncomment the code below and replace ou=accounts with
// applicable name component for your org.
/*
if (source.Classification == "Group") {
var dnArray = getSourcePropertyByName("distinguishedname");
if (dnArray && dnArray.Length) {
var dn = String(dnArray[0]).toLowerCase();
if (dn.indexOf("ou=accounts") >= 0) {
reject("ou=accounts, is rejected");
}
}
}
*/