Forum Discussion
David_20479
Jan 23, 2012Nimbostratus
REGEX syntax for APM NTLM Auth
Looking for REGEX syntax assistance with my APM policy.
need to change user@domain.com to domain\user
something like:
session.user = expr { [regsub\(.*\)@\(.*\)/\2\\\1} [mcget {session.logon.last.username}] ""] }
- hooleylistCirrostratusHi David,
- David_20479NimbostratusThanks for your help Hoolio. This was a success.
- hooleylistCirrostratus5c is a hex encoded backslash. That does seem like a bug. Can you open a case with F5 Support on this?
- hooleylistCirrostratusOr maybe this to remove the 5c:
- hooleylistCirrostratusHi David,
- David_20479NimbostratusHi Hoolio,
- hooleylistCirrostratusI suggest opening a case on the conversion of the backslash to the hex 5c. It would be helpful to document the issue and get it fixed.
- Maynor_OvalleNimbostratusI have a very similar situation. I'm running 11.1 HF1 and doint multiple AD domain authentication. With 11.1 APM has no issue identifying the domain if the user types domain\username but if the user types domain/username it sets the username as domain/username and of course user is not going to authenticate. So I'm writing a regular expression to identify if the session.logon.last.username contains / to take the domain value up to the / and set the session.logon.last.domain to that value and set the rest of the string as the session.logon.last.username. I have the expr {[mcget {session.logon.last.username}] contains "/"} and I need to embed the action to set the domain and username values into variables by using ^|\/.+ which just takes the domain info and .+\/|^ which just takes the username. Any ideas how I can embed that info the contains /? Thanks for your help
Recent Discussions
Related Content
DevCentral Quicklinks
* 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
Discover DevCentral Connects