For more information regarding the security incident at F5, the actions we are taking to address it, and our ongoing efforts to protect our customers, click here.

Forum Discussion

Ruggerfly1's avatar
Ruggerfly1
Icon for Nimbostratus rankNimbostratus
Jun 17, 2016

APM Certificate authentication - DENY for users who's cert subject does notmatch the regexp grab

Trying to restrict certificate authentication for specific users -

 

Certificate Subject CN=lab.username - the 'lab.' is the unique piece.

 

I'm using this to grab the username in a variable assign: regexp {(?x)(CN)=lab.([^,]+)} [mcget {session.ssl.cert.subject}] match CN USER; return $USER

 

IF a certificate not from lab comes across (CN=Username) I want to deny.

 

The sessions are coming in using clientless mode.

 

I've tried a branch rule on the variable assign using the regexp as it appears above but it doesn't deny the CN=Username certificates.

 

Can I do a match on the certificate authentication for the "CN=lab." only and fail the rest?

 

thanks!

 

1 Reply

  • Update - any feedback on this approach:

     

    After the certificate Inspection I added an Empty box, it is using this expression: expr { [mcget {session.ssl.cert.subject}] contains "lab" }, which catches the lower case "lab" in the full username, seems to be working.

     

    Has anyone used this approach?