Forum Discussion
Bhargav_9588
Nimbostratus
Feb 15, 2010getfield Parsing error
Hello,
I am trying to add an iRule to insert an http header value by stripping out domain from REMOTE_USER header. The following is the iRule I am trying to use:
when HTT...
Bhargav_9588
Nimbostratus
Feb 16, 2010Thanks Aaron for your input.
After navigating to one of the link, found the following but it is checking only for domain name, how do I get the username from it:
when HTTP_REQUEST {
Check for Authorization header value starting with NTLM before trying to parse the request.
if {[string tolower [HTTP::header Authorization]] starts_with "ntlm"}{
if { [b64decode [getfield [HTTP::header Authorization] " " 2]] matches_regex {([Tt].[Ee].[Ss].[Tt].[Dd].[Oo].[Mm].[Aa].[Ii].[Nn])} } {
HTTP::respond 200 content {
Apology Page
You are not allowed to authenticate as your user belongs to testdomain ...
}
}
}}
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
