Forum Discussion

Pedro_Boavida's avatar
Pedro_Boavida
Icon for Nimbostratus rankNimbostratus
Oct 24, 2019

APM mcget multiple results

Hi,

 

I'm trying to compare the output of an [ mcget {session.ldap.last.attr.cn} ] with a specific string. However, I do actually have several variables that could serve this purpose...

 

The output of "sessiondump -allkeys" with some grep will retrieve something like this:

 

session.ldap.last.attr.cn

session.ldap.last.attr.cn.1

session.ldap.last.attr.cn.2

session.ldap.last.attr.cn.3

 

Is there any means to build an expression to go through each variable and do run for a match ? Does the mcget accepts wildcards for the session variables?

 

Best regards,

 

Pedro

3 Replies

  • Hi

     

    Not quite sure why you have multiple CN there. Can you let us know what you LDAP Query is, and what you are trying to achieve. Maybe a nice LDAP filter in the LDAP query could do the trick to do what you need ?

     

    Yoann

  • Hi Yoann,

     

    The query is ran against an OpenLDAP directory and user's group membership is defined this way....

     

    Regards

  • Hi

     

    Sorry I didn't get it... You are querying OpenLDAP to get user's group membership ? And want to make a decision based on group membership of the user ?

     

    Yoann