Forum Discussion
Querying AD in iRule using Certain attribute to fetch info against that Attribute BIG IP APM
I Have hosted an Application in BIG IP APM using the Web Application Access Management for Local Traffic Virtual Servers. The Log in credentials are the AD credentials.
I am already passing the Username entered in the Login Screen using the iRule as :
when ACCESS_ACL_ALLOWED { set user [ACCESS::session data get "session.logon.last.username"] HTTP::header insert "X-USERNAME" $user }
Through this i am able to pass Username in header.
My ques is whether it is possible to query AD and fetch information and diff fields from AD and filter some using username as the serach criteria. Passing Through header is not an issue now, Pls help in fetching info.
2 Replies
- Michael_Jenkins
Cirrostratus
Within your policy in the VPE, are you using authenticating the user to AD after they provide their login credentials? You could add an
item there to grab whatever AD properties you need and then access them within the iRule (e.g. session.ad.last.attr.).AD Query - Stanislas_Piro2
Cumulonimbus
Hi,
In AD Query, select required attributes.
Then, change your irule to:
when ACCESS_ACL_ALLOWED { HTTP::header insert "X-USERNAME" [ACCESS::session data get "session.logon.last.username"] HTTP::header insert "X-sAMAccountName" [ACCESS::session data get "session.ad.last.attr.sAMAccountName"] HTTP::header insert "X-otherAttribute" [ACCESS::session data get "session.ad.last.attr.otherAttribute"] }
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