Forum Discussion
Dan_Ezell
Nimbostratus
Sep 29, 2015How to control access to multiple webapps behind a single virtual server using AD groups
I have a number of webapps behind a single virtual server. Access to each webapp should be granted based on group membership in an AD group.
Example:
VirtualServer1(Extranet.example.test)
...
Brad_Parker
Cirrus
Sep 29, 2015You could try something like this:
when HTTP_REQUEST {
if {[string tolower [HTTP::uri]] starts_with "/webapp1"}{
if {not ([ACCESS::session data get session.ad.last.attr.memberOf] contains "CN=Webapp1-access")}{
HTTP::respond 403
}
}
elseif {[string tolower [HTTP::uri]] starts_with "/webapp2"}{
if {not ([ACCESS::session data get session.ad.last.attr.memberOf] contains "CN=Webapp2-access")}{
HTTP::respond 403
}
}
elseif {[string tolower [HTTP::uri]] starts_with "/webapp3"}{
if {not ([ACCESS::session data get session.ad.last.attr.memberOf] contains "CN=Webapp3-access")}{
HTTP::respond 403
}
}
}
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)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
