Hi Jahanzaib,
It is not exactly clear what you want to do. Are we talking about the same authentication policy but two different mechanisms? It is possible to share information from one mechanism to a subsequent one, but not in the @MACRO@. The scope of the @MACRO@ seems to be local.
To pass an attribute from one mechanism to the next you have to put it in the session:
context.set(Scope.SESSION, "urn:ibm:security:asf:response:token:attributes", "macroToSave", "some_value");
Later you can retrieve it and put it in the macro:
var macroToSave = context.get(Scope.SESSION,"urn:ibm:security:asf:response:token:attributes", "macroToSave");
macros.put("@MACRO@", macroToSave);
So if you can execute your own script in the subsequent mechanism it is easy. For mechanisms where you can't use your own script this is of course impossible. But perhaps you can expand a little on what the subsequent mechanism is. I had problems with the built-in "Email Message" mechanism because it was not clear for me how to set the macros. It was only after quite some try and error that I found out that although the format in the template is also @macro@, the value is actually taken from the credential.
So to use an attribute @myMacro@ in your template you first have to put it in the credential :
context.set(Scope.SESSION, "urn:ibm:security:asf:response:token:attributes", "myMacro", "some_value");
Hope this helps.
------------------------------
Laurent LA Asselborn
------------------------------
Original Message:
Sent: Fri April 03, 2020 06:07 PM
From: Jahanzaib Sarwar
Subject: ISAM: Populate MACROS using InfoMap
Hello,
Is it possible to populate MACROs using InfoMap authentication mechanisms which could then be accessed in the template files utilized by other authentication mechanisms?
For example, if I create an authentication policy to call two authentication mechanisms:
1. Infomap authentication mechanism running my mapping rule (to get information from request and populate MACROS)
2. Any other authentication mechanism which would need to utilize those MACROS
Would I be able to use those MACROS in the template pages? I am sure about the first step on how to populate macros, but I am not sure what would be the scope of these MACROS. Any ideas?
Best regards,
------------------------------
Jahanzaib Sarwar
------------------------------