Forum Discussion
karthik_sriniva
Nimbostratus
Apr 12, 2005Multiple Auth
Hi,
Can someone post an example on how to do multiple authentication.
For example, first one could be radius auth and the next one could be ldap authentication.
Thanks!!!
- Tao_Liu_90341Historic F5 Account
rule twoauth { when CLIENT_ACCEPTED { set ldap_authed 0 set radius_authed 0 } when HTTP_REQUEST { set username [HTTP::username] set password [HTTP::password] set asid_ldap [AUTH::start pam default_ldap] set asid_radius [AUTH::start pam default_radius] AUTH::username_credential $asid_ldap $username AUTH::password_credential $asid_ldap $password AUTH::authenticate $asid_ldap AUTH::username_credential $asid_radius $username AUTH::password_credential $asid_radius $password AUTH::authenticate $asid_radius HTTP::collect } when AUTH_SUCCESS { if {$asid_ldap eq [AUTH::last_event_session_id]} { set ldap_authed 1 } if {$asid_radius eq [AUTH::last_event_session_id]} { set radius_authed 1 } if {$radius_authed == 1 && $ldap_authed == 1} { HTTP::release } } when AUTH_FAILURE { if {$asid_ldap eq [AUTH::last_event_session_id] || $asid_radius eq [AUTH::last_event_session_id]} { HTTP::respond 401 } } when AUTH_WANTCREDENTIAL { if {$asid_ldap eq [AUTH::last_event_session_id] || $asid_radius eq [AUTH::last_event_session_id]} { HTTP::respond 401 } } when AUTH_ERROR { if {$asid_ldap eq [AUTH::last_event_session_id] || $asid_radius eq [AUTH::last_event_session_id]} { HTTP::respond 401 } } }
- Carla_Molenda_1
Nimbostratus
We are interested in a similar configuration, but are using 3 LDAP registries. This iRule looks like it can work for us as well. However, the doc on creating virtual servers indicates there is 1 authentication profile with a virtual server. Any of these registries can be used to authenticate to any of our servers behind the BigIP. We need the virtual servers to have access to all the authentication profiles. Is this possible? We don't have the hardware yet, this question is based on the doc. Thanks. - Tao_Liu_90341Historic F5 AccountYour case is bit different from the original purpose of this rule. Because your ldap servers are equivalent to each other, you can just use the authentication facility shiped with bigip as it is, though you can create a ldap virtual server in bigip with three of your ldap registries as server side, and use that virtual server in your ldap auth setting.
- Carla_Molenda_1
Nimbostratus
Actually, our servers are different. Once we got a hold of the box, we found we could use multiple authentication profiles for a single virtual server. This worked for us. - Robert_Decker_2
Nimbostratus
I am trying to modify the existing post for ldap only authentication. It will be used in a dual auth rule with SSL. I would like to see what the results are for this instead of sys auth ldap I am currently using. I am having problems with the modified rule included below. The big ip will not contact the ldap server until I click stop in the browser toolbar. Could somebody tell me what I have done incorrectly? - Tao_Liu_90341Historic F5 AccountThis rule itself looks fine. What is the other part of your dual auth rule ?
- Robert_Decker_2
Nimbostratus
I separated the rule so that it stood by itself. I have that attached to an auth profile (ldap), but nothing else. Like I stated before, the Big IP doesn't try to contact the LDAP server until I hit stop on the browser toolbar. Any thoughts? Could I have done something by playing around with the Irules that makes it behave this way? - Tao_Liu_90341Historic F5 AccountFor auth via LDAP and SSL, they are done in different stage, actually you don't have to modify these rules. Just use the default auth profiles.
- Robert_Decker_2
Nimbostratus
I am trying to create a rule that challenges a user for a client cert or allows them to use LDAP as a secondary means. I've been using the following subject post for that: - Robert_Decker_2
Nimbostratus
I reloaded 9.1.0 Build 6.2 and was able to successfully use the rule below. I switched back to a system running 9.2.2 Build 76.6 and am experiencing problems. The configs are near identical on each F5 (the 9.2.2 system has more virtual servers as the 9.1.0 only has the ldap stuff). The 9.2.2 system "loads" the page 5 minutes after entering the credentials. The 9.1.0 system "loads" the page almost immediately after the ldap credentials are entered. Have you experienced the same type of problems? Could you confirm this? Is there a newer version of the os?
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