Forum Discussion
Can I enforce a maximum character limit for APM user name?
I would like to limit the username field to no more than 7 characters to prevent users from accidently putting their username and password in the username field.
Is this possible?
If so, how?
If not, is there an alternative that will allow non-plain-text usernames? (I believe the username needs to be sent in plain text to our Domain Controllers??)
THANKS!!! Nick
2 Replies
- cjunior
Nacreous
Hi, I think that's weird you need, but, in a simple way you could add a script in logon.inc resource on advanced mode design to check this in client side:
(Place it at the bottom before the tag )
Just a tip. I hope it helps you.
Regards. - Lucas_Thompson_Historic F5 Account
With APM you can basically do anything because you can stick TCL anywhere you want. Here's how to do that:
- Go to VPE in your access policy
- Add (or edit) a logon page Policy Item.
- Add a branch rule
- Add whatever expression you want (it doesn't matter, we're going to edit it)
- Click the Advanced tab
- Use this expression: expr { [string length [mcget {session.logon.last.username}]] > 7 }
The system evaluates that from the innermost square brackets out, like algebra. "string length" is TCL to grab the length of a string. "mcget" grabs a session variable from APD's cache (or sessiondb, depending). "expr" evaluates the expression mathematically.
- expr { [string length [mcget {session.logon.last.username}]] > 7 }
- expr { [string length "johndoe"] > 7 }
- expr { 7 > 7 }
- expr { 0 }
- Result: FALSE
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)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