Is there any way to read Driver Parameters (e.g. Subscriber and Publisher Options) from within policy?
Matt
Cybersecurity
DevOps Cloud
IT Operations Cloud
If an answer to your question is correct, click on "Verify Answer" under the "More" button. The answer will now appear with a checkmark. Please be sure to always mark answers that resolve your issue as verified. Your fellow Community members will appreciate it! Learn more.
Is there any way to read Driver Parameters (e.g. Subscriber and Publisher Options) from within policy?
Matt
You would have to read the DirXML-DriverConfig attribute from the Driver object (Use the auto GCV to get the DN). May have to B64 decode it. You coudl use the Document token but I find it just as easy to use Source Attribute.
Then XPATH out the item you want.
No tokens.
Interestingly enough in a driver shim, the built in classes support easily reading driver parameters but not GCVs. Which is why the gcv-ref Syntax type exists for GCV/Driver Settings I think. You specify it once, as a Driver Config, then in the GCV you point at that, so change it once, changes it in two places so to speak. Then it is easy to read in either place.
You would have to read the DirXML-DriverConfig attribute from the Driver object (Use the auto GCV to get the DN). May have to B64 decode it. You coudl use the Document token but I find it just as easy to use Source Attribute.
Then XPATH out the item you want.
No tokens.
Interestingly enough in a driver shim, the built in classes support easily reading driver parameters but not GCVs. Which is why the gcv-ref Syntax type exists for GCV/Driver Settings I think. You specify it once, as a Driver Config, then in the GCV you point at that, so change it once, changes it in two places so to speak. Then it is easy to read in either place.
Thanks for the great explanation! May be more hassle then it's worth for what I wanted to do.
Also thanks for the gcv-ref explanation. I often wondered why the heck sometimes the values would be in two places. I didn't understand what the purpose was!
Matt
When a driver shim is started, the engine calls https://www.netiq.com/documentation/identity-manager-developer/driver-developer-kit/javadocs/com/novell/nds/dirxml/driver/DriverShim.html#init-com.novell.nds.dirxml.driver.XmlDocument- and sends the contents of DirXML-ShimConfigInfo.
If you have settings that are required by both a shim and in policy, then specify it as GCV and reference it it in the driver configuration using gcv-ref. The engine will then inject the values before initializing a shim.
To read DirXML-ShimConfigInfo (or any other stream attribute that contains XML) in policy use<do-set-local-variable name="shimConfigInfo" scope="driver">
<arg-node-set>
<token-document>
<arg-string>
<token-text xml:space="preserve">vnd.nds.stream:</token-text>
<token-text xml:space="preserve">/</token-text>
<token-parse-dn dest-dn-delims="00,/+=*\" dest-dn-format="custom"
src-dn-format="slash">
<token-global-variable name="dirxml.auto.driverdn" />
</token-parse-dn>
<token-text xml:space="preserve">#</token-text>
<token-text xml:space="preserve">DirXML-ShimConfigInfo</token-text>
</arg-string>
</token-document>
</arg-node-set>
</do-set-local-variable>