Tech Tip : CA Single Sign-On : Rule Actions are not set properly when creating a Rule with Perl CLI

Document created by Albert_Fernandez Employee on Mar 15, 2017
Version 1Show Document
  • View in full screen mode

Issue:

I have created a Rule by using the Perl CLI with the following code:

 

$rule=$realm->CreateRule("TEST",
"TEST Rule",
"GET,POST",
"TEST/*"
);

 

The Rule is correctly created and I can see it in the AdminUI. If I click on the "View" button to see the Rule, I see still the Rule with the expected configuration. But if I click on "Modify" button for this Rule, in the method selection box, no action gets selected. In order to make the Rule applicable, I need to select the methods manually and save the changes in the AdminUI. So each time I create a Rule with the Perl CLI, I need to select the methods in the AdminUI after. If not, the Rule won't be applied. Every Rule I create with the CLI have the same behavior.

 

Environment:

Policy Server R12.52 SP1

Cause:

The Rule Actions to be applied need to have the same syntax as per the Agent Type of the Agent. In your case, the Agent has "Agent Type" "Web Agent". In AdminUI, if you go to Agent / Agent Types and select "Web Agent", then you'll see Actions as "Get", "Post", "Put".

Resolution:

In your Perl CLI script, if you pass the actions as "Get,Post" instead of "GET,POST", then the Rule will be applied, and you'll see in the Rule definition these actions selected in method selection box.

 

The code will look like this :

$realm->CreateRule("TEST",
"TEST Rule",
"Get,Post",
"TEST/*"
);

 

Additional Information:

KD : TEC1731025

Attachments

    Outcomes