I have set up a custom IDP Adapter script to do policy based authorization per SP. It is based on the sample. (IDP adapter plugin :: AM 7.2.2)
However, I need to add an ldapfilter condition to the saml policy. This fails because the filter condition requires the realmDN to be set, which the sample does not do.
I got it going by changing idpAdapterScriptHelper.getEntitlements to pass an environment, and it works as expected, however…
Passing an environment to getEntitlements requires a Map to be passed, (and the value in the Map is a Set) but when I tried to create the Set and Map with
const map = new Map();
const set = new Set();
The script fails with the error ReferenceError: “Map” is not defined.
(or Set if I do that first)
I got it to work by using JavaImporter to import
and creating the Set and Map using them.