Forum Discussion
Takahiro_M_3645
Sep 28, 2010Historic F5 Account
LDAP attribute based LB
I am trying to create an iRule to do LDAP attribute based LB using v10.2.
An issue I am facing seems to obtain LDAP attribute in the iRule.
Below is sample script I created but "log local0," lines don't output any valuable characters in /var/log/ltm. And also value of 'log local0. "[array size [AUTH::response_data]]"' is always "0".
HTTP basic authentication with LDAP server works correctly by using auth profiles regardless of using this iRule. And additionally, according to tcpdump of server, LDAP server returns attributes to BIG-IP correctly.
Could you share with me if you have solution for this?
---------------
when RULE_INIT {
set tmm_auth_subscription "*"
}
when AUTH_RESULT {
array set auth_response_data [AUTH::response_data]
log local0. [AUTH::status]
log local0. "[array size [AUTH::response_data]]"
log local0. "[lindex [array get auth_response_data] 2]"
set ldap_group [lindex [array get auth_response_data ldap:attr:uid] 0]
log local0. "$ldap_group"
}
---------------
---------------
ltm auth ldap auth-ldap {
bind-dn cn=admin,dc=example,dc=com
bind-pw admin
bind-timeout 30
check-host-attr disabled
debug enabled
filter none
group-dn none
group-member-attribute none
idle-timeout 3600
ignore-auth-info-unavail no
ignore-unknown-user disabled
login-attribute none
partition Common
port ldap
scope sub
search-base-dn dc=example,dc=com
search-timeout 30
servers { 10.100.4.201 }
ssl disabled
ssl-ca-cert-file none
ssl-check-peer disabled
ssl-ciphers none
ssl-client-cert none
ssl-client-key none
user-template none
version 3
warnings enabled
}
---------------
- hooleylistCirrostratusHi Takahiro,
when CLIENT_ACCEPTED { set tmm_auth_subscription "*" }
- Takahiro_M_3645Historic F5 AccountIt worked as expected since I made a change my iRule event to CLIENT_ACCEPTED from RULE_INIT. I didn't noticed to see bigip_base.conf....
- hooleylistCirrostratusHi Takahiro,
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