Forum Discussion
vaahtera
Nov 05, 2019Nimbostratus
HSSR sideband connection for querying LDAP not working
I'm having this issue, that i can't get the sideband connection to work. Code is like this: when HTTP_REQUEST {
set apikey [URI::query [HTTP::uri] api-key]
log local0. $apikey
if { ...
vaahtera
Nov 06, 2019Nimbostratus
Ok, got this a bit further. I was missing the /Common before the virtual server in the call. But now as the another virtual has this iRule code, it never get's to the ACCESS_POLICY_COMPLETED:
when HTTP_REQUEST {
log local0. "Got http request to internal virtual"
set apikey ""
if {[HTTP::path] starts_with "/"} {
regexp {/([^/]+)$} [HTTP::path] junk x
set apikey [URI::decode $x]
}
}
when ACCESS_SESSION_STARTED {
if {$apikey ne ""} {
log local0. "Access session started on internal virtual"
ACCESS::session data set session.custom.apikey $apikey
}
}
when ACCESS_POLICY_COMPLETED {
set reply "NOT_FOUND"
if {[ACCESS::session data get session.ldap.last.queryresult] == 1} {
set reply [ACCESS::session data get session.ldap.last.attr.apikey]
}
log local0. "Access session policy completed with reply: $reply"
ACCESS::respond 200 content $reply Content-Type "text/plain" Connection close
}
The access policy attached to this internal virtual contains only one LDAP query that ends in deny no matter what the query result is.
What am i missing here?
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