Pro Tip: How to Seamlessly Move Cloud Rules Across Tenants

In any deployment, you will end up writing a couple of cloud rules that need to be sent to SailPoint Expert Services (ES) for uploading to your tenant.

Typically, we deploy to the sandbox tenant, test the rules, and then move them to the production tenant. Traditionally, this involved emailing ES to request the rule transfer across tenants.

However, there is a quick and easy alternative if you don’t want to wait for ES deployment in the next tenant. I will explain the sp-config API available for moving code across environments.

Many may not be aware that this API can also export and import deployed rules. The number of supported objects has increased since I last wrote my article.

This list is continually growing, but the main object we currently care about is RULE.

Here are the simple steps:

  • Get your rule approved and deployed into your sandbox environment
  • Export the rule from sandbox environment via sp-config 

  • Once exported, import the rule into the production environment. It will allow you to move rules so long as you don’t change it in transit or edit the JSON.

This method is great for moving rules across tenants. However, I still recommend deploying the rules via the normal process for consistency.

Tokenisation for Environments

When moving rules across environments, we often need to make changes because there are different values for variables, such as the AD OU structure that might be referenced. How can we make the process seamless, allowing you to copy and deploy the same rule without any changes in all environments?

Let’s go through each cloud rule type and see how we can solve this issue. Please note that this may not work for very complex rules but should be effective most of the time.

  • Generic Rule: These rules are always referred to via a transform, so the code inside is easy to maintain. Pass the variables via transform, which can remain the same across tenants.
  • Identity Attribute Rule: For example, LCS rules which uses source names to refer to attributes and retrieve their values. Keep the same source name across environments, ensuring that the backend source name remains consistent and can be referred to in the rule. This will also help in transform moves since source names they are referring to are same.
  • Manager Correlation / Correlation / Account Profile / Before Provisioning Rule: All of these rule types are attached to a source, which means they have an input of application class. Here’s what I typically do

Let’s say a Before Provisioning (BP) rule is created for the AD connector in the sandbox and needs to be moved to production. There might be some subtle changes in the rule between both environments, such as the AD Disabled OU

AD Dev Disabled OU: OU=Disabled,DC=abc,DC=dev,DC=local

AD Prod Disabled OU: OU=Disabled,DC=abc,DC=local

Rest all your logic may be similar but you need to change these between environments. To handle this, I use the following code within the rule

As you can see, I use the application.getId() method to retrieve the ID of the application the rule is attached to. Since we would have created the source in both the sandbox and production environments, you can obtain the ID via the /v3/sources API and set them accordingly. By knowing which environment my rule is attached to, I can then set the variables for AD_SOURCE and AD_DISABLED_OU (and other logics), allowing me to copy the same rule into both the sandbox and production environments.

This approach minimizes code maintenance for both environments and ensures that the same rule can be easily copied to both environments. As long as we have set the correct variables for each environment, our logic will work when tested in the sandbox and in production. This also eliminates the need to inject such values into the source JSON (an old method).

I hope this explanation makes sense and helps simplify your rule development, maintenance, and deployment across tenants.

Happy coding!!!

IdentityNow Rule Validator 3.0 + Generic Rules

As you may know, for IdentityNow Cloud Rules – they have to be submitted to SailPoint for upload to the tenant. We have a rule validator tool to validate IdentityNow rules for malformed or incorrect code fragments, and help make sure they conform to the SailPoint IdentityNow Rule Guide before rule submission.

We have had a great release of a brand new IdentityNow Rule Validator v3.0 (currently sitting on 3.0.23 at the time of writing). This is a major jump forward with mention in release notes (many more enhancements than what it states 🙂 ) 

  • BeanShell linter will now validate syntax and usage to help discover issues in your code before you deploy
  • A watch option which continually monitors and validate/lint  your code while you develop.

Download: https://community.sailpoint.com/t5/Professional-Services/IdentityNow-Rule-Validator/ta-p/166116

Please download and use the latest one when submitting rules for deployment otherwise you rule will get rejected for using the old version.

What I wanted to point out was that Generic Rules may start failing validation as it is doing much strict linting check for variables coming from transform which are not defined in the rule. You will need to add them to <Signature> tag for it to now pass validator.

Example

You will see two inputs 

  • identity – this is the identity context which every cloud rule has access to but not predefined as input in the Generic Rule type.
  • identityEndDate – this is an input coming from a transform which is calling the rule

If I run this on the rule validator, it will fail with the following errors

As you can see – it couldn’t retrieve the definition for both the attributes 

Solution

You need to define them under the Signature XML tag so that the validator allows it through

As you can see the Signature tag is defined with Argument name and type. This will allow the rule validator to understand what they are. So the rule will now look like

Now the rule will pass

You are good to submit your rule now… 

Happy coding!!!

IDN Admin Console v2.5.0

We’re excited to announce the release of IDN Admin Console v2.5.0! This latest version includes new features and bug fixes that will improve your experience using our software.

Enhancements:

  • Source Rule Management: We’ve added a new menu item under “Source” for Rule Attachment Management. With this feature, you can easily manage and attach rules to sources in the IDN Admin Console.

Bug Fixes:

  • Version Check: We’ve fixed a 401 issue that was preventing users from checking the version of the IDN Admin Console.
  • Logout: We’ve fixed a 404 issue that was occurring when users tried to log out of the IDN Admin Console.

We’re committed to improving the performance and functionality of the IDN Admin Console, and these enhancements and bug fixes are just the latest examples of our efforts. We appreciate your feedback and support, which has helped us to make IDN Admin Console even better.

Download IDN Admin Console v2.5.0 today to take advantage of the new features and improvements. We’ve included screenshots to show you how to access and use the Source Rule Management feature. Plus, you can easily check the version of the IDN Admin Console and log out without any issues.

Download: Releases · piyush-khandelwal-sp/idn-admin-console · GitHub

Project: GitHub – piyush-khandelwal-sp/idn-admin-console

Docker: https://hub.docker.com/r/khandelwalpiyush/idn-admin-console

Thank you for choosing IDN Admin Console for your identity and access management needs. We’re confident that you’ll enjoy the enhancements we’ve made to our software. If you have any questions or feedback, please don’t hesitate to reach out to us.

BTW: Above blob is auto generated via ChatGPT.. so cool 😀 

IDN Admin Console: v2.4.0

Enhancements

  • #262 Bulk Entitlement Management (Add Owner / Update Owner / Delete Owner / Mark As Requestable / Unmark as Requestable / Mark as Privileged / Unmark as Privileged)
  • #265 Allow Users to Submit via Enter Key on TextBoxes (Press Enter to Submit)
  • #270 Performance Improvement For Roles & Access Profiles Load
  • #272 Check for Latest Version & Notify of Update

Bug Fixes

  • #266 Destroy API calls for Multiple Accounts Report Page on Navigation
  • #268 Destroy API calls for Roles & Access Profiles on Navigation

Download: Releases · piyush-khandelwal-sp/idn-admin-console · GitHub

Project: GitHub – piyush-khandelwal-sp/idn-admin-console

Docker: https://hub.docker.com/r/khandelwalpiyush/idn-admin-console

IDN Admin Console: v2.3.0

🎉Pagination – Slow but works (well most of the time):tada:

:tada:Mac arm64 (Apple M1/M2) Binaries now available on GitHub (idn-admin-console-darwin-arm64.zip) :tada:

  •  Enhancements
    • #18 Add Pagination (Roles / Access Profiles)
    • #256 Export All – LCS & Source Create Profile
    • #260 Slow Down Source API calls
    • #261 Clean up unnecessary duplicate API calls

Download: Releases · piyush-khandelwal-sp/idn-admin-console · GitHub

Project: GitHub – piyush-khandelwal-sp/idn-admin-console

Docker: https://hub.docker.com/r/khandelwalpiyush/idn-admin-console

%d bloggers like this: