Tagged: #OpenAM, Scripted Policy Condition
This topic has 4 replies, 2 voices, and was last updated 3 years, 6 months ago by someswara.reddy.karem.
-
AuthorPosts
-
February 5, 2019 at 6:10 pm #24692
someswara.reddy.karem
ParticipantHi,
I have two questions about “Scripted Policy Condition”.
1) How to read System properties in “Scripted Policy Condition”.
I have defined custom properties (ex:auth.header, auth.url etc) in Configure->Server Defaults->Advanced.
I want to read these properties in “Scripted Policy Condition”, is it possible to read these properties as the below??
//Sample code
var header = SystemProperties.get(“auth.header”);
var url = SystemProperties.get(“auth.url”);2) Call/invoke one “Scripted Policy Condition” in another.
Requirement is, I want to develop generic scripted policy conditions (re-usable code) and client specific scripted policy conditions.
And is it possible to call/invoke one “Scripted Policy Condition” in another “Scripted Policy Condition”??
Thanks for your prompt response.
Best Regards
SomFebruary 6, 2019 at 10:31 am #24699Peter Major
Moderator1) I suppose you could add SystemProperties to the class whitelist in the script engine configuration and access them via Groovy.
2) Scripts can’t call each other I’m afraid.
February 6, 2019 at 1:15 pm #24702someswara.reddy.karem
ParticipantHi Peter,
Thanks for your prompt response.
Can you please share any documents reference or steps etc??or Knowledge base article??
Thanks
SomFebruary 6, 2019 at 3:45 pm #24704Peter Major
ModeratorSee:
https://backstage.forgerock.com/docs/am/6.5/authorization-guide/index.html#chap-authz-customization
https://backstage.forgerock.com/knowledge/kb/article/a47487197
https://stash.forgerock.org/projects/OPENAM/repos/am-external/browse/openam-samples/policy-evaluation-plugin?at=refs%2Fheads%2Freleases%2F6.5.0.1February 6, 2019 at 3:52 pm #24705someswara.reddy.karem
ParticipantThanks Pater, it works now.
-
AuthorPosts
You must be logged in to reply to this topic.