ResourceEnvIP 's sample script

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

2 Likes

Hi @sam.phua, thank you for sharing your invaluable knowledge and providing a working example of how to use the reserved keyword “IP” in the evaluation script. Once again, your proactive insights greatly benefit the entire community, and we deeply appreciate your insights and contributions!

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’

1 Like