Use session.ldap.last.attr.userPrincipalName in an iRule
Hello,
In an iRule, I want to compare the userPrincipalName fetched from LDAP with the DN of an SSL certificate.
I have successfully extracted the email address from the certificate in a variable. That part is working fine.
Now I'm not able to use the session variable called "session.ldap.last.attr.userPrincipalName" to do my comparison.
I tried this:
set myupn [ACCESS::session data get "session.ldap.last.attr.userPrincipalName"] log local0. "UPN VALUE is $myupn"
... but the variable $myupn remains empty.
For the sake of troubleshooting, in the above code, I tried to access session.logon.last.logonname, and in that case it works.
In the list of variables of the access policy, I see that "session.ldap.last.attr.userPrincipalName" is there and populated with the expected value.
How can I access the value of session.ldap.last.attr.userPrincipalName properly?
Thank you in advance.
Best Regards,