Forum Discussion
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
- Ruggerfly1
Nimbostratus
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?
Recent Discussions
Related Content
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com