ResourceEnvIP 's sample script

Author:

Sam Phua

Created at:

Jul 2023

Updated at:

Jul 2023

The documentation in Policies over REST :: AM 7.3.0 did not give an example how to use the reserved keyword IP in the evaluation script.

Here is an example

curl -s --request POST --header ‘iPlanetDirectoryPro: DUr4Avc9KLImXBYt87C0ZVvNE6c.AAJTSQACMDIAAlNLABx3RUR3Vk5va2hVOUlSV3RBVENJYVdxcHNEN0U9AAR0eXBlAANDVFMAAlMxAAIwMQ…’ --header ‘Accept-API-Version: resource=2.1’ --header ‘Content-Type: application/json’ --data ‘\{
“resources”: [ “http://eave.internal.example.com:8000/index.html”
],
“subject”: \{
“ssoToken”: “lQjRVeydW7KwH1ayGm-qFepDk8A.AAJTSQACMDIAAlNLABxKNmw2SXhweGJTTDFiNzZ1RkhiU0ZQbWFnL1E9AAR0eXBlAANDVFMAAlMxAAIwMQ…” },
“application”: “iPlanetAMWebAgentService”,
“environment”: \{ “IP”: [“[192.168.xxx.50]”, “[192.68.xxx.x]”],
“ipaddress”: []
}
}’ ‘http://openam.internal.example.com:8080/openam/json/realms/root/policies?_action=evaluate’