Forum Discussion

Ruggerfly1's avatar
Ruggerfly1
Icon for Nimbostratus rankNimbostratus
Jul 25, 2016

APM Variable Assign force to Lowercase

Good Afternoon

 

I have an APM policy grabbing the username from a certificate - how can I force this to lowercase? regexp {(?x)(CN)=DOMAIN.([^,]+)} [mcget {session.ssl.cert.subject}] match CN USER; return $USER

 

2 Replies

  • Can't test it right now, but off the top of my head, have you tried wrapping the $USER like this:

    [string tolower $USER]
    ? or perhaps the mcget:
    [string tolower [mcget {session.ssl.cert.subject}]]
    .

  • this worked perfectly - thank you!

     

    regexp {(?x)(CN)=lab.([^,]+)} [mcget {session.ssl.cert.subject}] match CN USER; return [string tolower $USER]