variable assign
4 TopicsAssign a variable based on AD query
I think I have this figured it but was hoping to get a sanity check. I have an access policy that is querying AD. Later on I am sending an email to the user but there are two potential email fields. If the user has f5EmailAddress as an AD attribute then I need to use that - if they don’t then I need to use session.ad.last.email. I think this should just be a variable assignment after the AD query but I’m not sure if my syntax is correct. Here’s what I have (forgive me in advance I’m writing this on an iPhone) session.custom.company.email = if { ( [mcget {session.ad.last.attr.f5ProfileEmailAddress}] contains “@“)} { return ([mcget {session.ad.last.attr.f5ProfileEmailAddress }]} else { return ([mcget {session.ad.last.attr.email}])}492Views0likes2CommentsBIG-IP : variable value in case set fails
f5 BIG-IP LTM VE v11.4.0 on ESXi tcl does not have a concept of null nil undefined So what value do variables assume in the case where the set operation fails to retrieve a value ? set param1 [URI::query [HTTP::uri] param1 ] What is param1 value for case where "param1=xxx" not present in query-string ? set cookie1 [HTTP::cookie value "cookie1"] What's cookie1 value for case where request doesn't contain cookie "cookie1" ?289Views0likes1Comment(APM) I have a need to combine two fields from login page for AD authentication
In AD we have our user accounts in format of username.clientid Our login page contains fields for: username, password and clientid. Username in format of login page entry is just the user's name without the client id attached. Can anyone assist with the process to concatenate the username and clientid in format listed above for AD authentication "username.clientid"? Thanks277Views0likes1CommentAPM HTTP Connector request and HTTP Headers
Hello, can someone share working solution for populating variables, used to send APM HTTP connector auth request, from HTTP headers? User (API) sends credentials in HTTP headers X-LOGIN and X-TOKEN. I tried to assign variables directly in per request policy, but this is not supported. I also tried to assign them using iRule: when HTTP_REQUEST { set loginvalue [HTTP::header "X-LOGIN"] set tokenvalue [HTTP::header "X-TOKEN"] log local0. "Assigned variables are: LOGIN:$loginvalue TOKEN:$tokenvalue" } cURL request: curl 1.2.3.4 --header "X-LOGIN: James" --header "X-TOKEN: Brown" --header "clientless-mode: 1" Local traffic log shows correct assignment: Rule /Common/headers_variables <HTTP_REQUEST>: Assigned variables are: LOGIN:James TOKEN:Brown Direct using variables loginvalue and tokenvalue in HTTP connector request is not working, so I also tried to map them in PRP "Variable assign" block: session.custom.login = Session Variable loginvalue session.custom.token= Session Variable tokenvalue But HTTP connector auth request http://www.auth.com/api/v1/auth?login=%{session.custom.login}&token=%{session.custom.token} is always empty, as seen from tcpdump capture: [Full request URI: http://www.auth.com/api/v1/auth?login=&token=] Any ideas please?Solved90Views0likes2Comments