RE: AD account gets locked up using CAS.

View: New views
8 Messages — Rating Filter:   Alert me  

RE: AD account gets locked up using CAS.

by Unai Rodriguez-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Dear All,

Using tcpdump I was able to see that the CAS server is actually sending the
request 5 times, which causes the Active Directory account to get locked
up.

My CAS configuration (deployerConfigContext.xml) looks like this (it may be
found here as well: http://pastebin.ca/1059708):

<bean class="org.jasig.cas.adaptors.ldap.BindLdapAuthenticationHandler" >
        <property name="filter" value="sAMAccountName=%u" />
        <property name="searchBase" value="OU=A,DC=B,DC=C,DC=D" />
        <property name="contextSource" ref="contextSource" />
        <property name="ignorePartialResultException" value="yes" />
</bean>

[...]

<bean id="contextSource"
class="org.jasig.cas.adaptors.ldap.util.AuthenticatedLdapContextSource">
        <property name="authenticatedReadOnly" value="true" />
        <property name="userName" value="xxxxxxxxx" />
        <property name="password" value="yyyyyyyyy" />
        <property name="urls">
                <list>
                        <value>ldap://10.123.8.47:389</value>
                        <value>ldap://10.123.8.46:389</value>
                        <value>ldap://10.130.0.45:389</value>
                        <value>ldap://10.100.0.45:389</value>
                        <value>ldap://10.190.0.45:389</value>
                </list>
        </property>
        <property name="baseEnvironmentProperties">
                <map>
                     <entry>
                             <key><value>java.naming.security.authentication</value></key>
                             <value>simple</value>
                     </entry>
                </map>
        </property>
</bean>

I have tried setting "ignorePartialResultException" to "no", with the same
results (i.e. CAS sends 5 consecutive invalid requests which causes the AD
account to get locked up).

Is there any setting to control this?

thanks,
unai


> Dear All,
>
> I have set up CAS with an Active Directory backend. The CAS server
details
> are:
>
> - CAS version 3.0.5
> - OS: Debian Linux 3.1 (Sarge)
> - Tomcat version 5.5.23
>
> The Active Directory has some rules set (which are meant to be kept)
which

> lock up accounts that attempt to login providing the wrong password 5
> consecutive times.
>
> The issue is that if I provide the wrong password through CAS login page,
> my AD account will be locked (ie with only one failed attempt).
>
> 1) Is this behavior expected/normal?
> 2) How can I tweak/change this?
>
> Thank you so much,
> unai

_______________________________________________
Yale CAS mailing list
cas@...
http://tp.its.yale.edu/mailman/listinfo/cas

Re: AD account gets locked up using CAS.

by scott_battaglia :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Is it sending the request once to each of those servers?

-Scott

-Scott Battaglia
PGP Public Key Id: 0x383733AA
LinkedIn: http://www.linkedin.com/in/scottbattaglia

On Tue, Jul 1, 2008 at 2:39 AM, Unai Rodriguez <me@...> wrote:
Dear All,

Using tcpdump I was able to see that the CAS server is actually sending the
request 5 times, which causes the Active Directory account to get locked
up.

My CAS configuration (deployerConfigContext.xml) looks like this (it may be
found here as well: http://pastebin.ca/1059708):

<bean class="org.jasig.cas.adaptors.ldap.BindLdapAuthenticationHandler" >
       <property name="filter" value="sAMAccountName=%u" />
       <property name="searchBase" value="OU=A,DC=B,DC=C,DC=D" />
       <property name="contextSource" ref="contextSource" />
       <property name="ignorePartialResultException" value="yes" />
</bean>

[...]

<bean id="contextSource"
class="org.jasig.cas.adaptors.ldap.util.AuthenticatedLdapContextSource">
       <property name="authenticatedReadOnly" value="true" />
       <property name="userName" value="xxxxxxxxx" />
       <property name="password" value="yyyyyyyyy" />
       <property name="urls">
               <list>
                       <value>ldap://10.123.8.47:389</value>
                       <value>ldap://10.123.8.46:389</value>
                       <value>ldap://10.130.0.45:389</value>
                       <value>ldap://10.100.0.45:389</value>
                       <value>ldap://10.190.0.45:389</value>
               </list>
       </property>
       <property name="baseEnvironmentProperties">
               <map>
                    <entry>
                            <key><value>java.naming.security.authentication</value></key>
                            <value>simple</value>
                    </entry>
               </map>
       </property>
</bean>

I have tried setting "ignorePartialResultException" to "no", with the same
results (i.e. CAS sends 5 consecutive invalid requests which causes the AD
account to get locked up).

Is there any setting to control this?

thanks,
unai


> Dear All,
>
> I have set up CAS with an Active Directory backend. The CAS server
details
> are:
>
> - CAS version 3.0.5
> - OS: Debian Linux 3.1 (Sarge)
> - Tomcat version 5.5.23
>
> The Active Directory has some rules set (which are meant to be kept)
which
> lock up accounts that attempt to login providing the wrong password 5
> consecutive times.
>
> The issue is that if I provide the wrong password through CAS login page,
> my AD account will be locked (ie with only one failed attempt).
>
> 1) Is this behavior expected/normal?
> 2) How can I tweak/change this?
>
> Thank you so much,
> unai

_______________________________________________
Yale CAS mailing list
cas@...
http://tp.its.yale.edu/mailman/listinfo/cas


_______________________________________________
Yale CAS mailing list
cas@...
http://tp.its.yale.edu/mailman/listinfo/cas

Re: AD account gets locked up using CAS.

by Unai Rodriguez-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi Scott,



On Tue, 1 Jul 2008 09:44:28 -0400, "Scott Battaglia"
<scott.battaglia@...> wrote:
> Is it sending the request once to each of those servers?

a) ONE Initial successful request to the first server (10.123.8.47) to
"bind" as the 'xxxxxxxxx' user
b) TWO unsuccessful requests to the 1st server (10.123.8.47), providing
wrong password
c) ONE unsuccessful requests to the 2nd server (10.123.8.46), providing
wrong password
d) ONE unsuccessful requests to the 3rd server (10.130.0.45), providing
wrong password
e) ONE unsuccessful requests to the 4th server (10.100.0.45), providing
wrong password
f) ONE unsuccessful requests to the 5th server (10.190.0.45), providing
wrong password

You may find attached a .cap file with all these packets and also a network
flow graph.

I am using:

- OS:     Debian Linux Sarge 3.1
- CAS:    version 3.0.5
- Tomcat: version 5.5.23.0.
- Java:   version "1.5.0_08"

thanks,
unai

����hH2{
ll�e��PV��E^ X@@�
{v
{/���6�����-S
���H0(`#behringer\ISDG.TEMP� sugarCRM1��hHY�
XXPV���e��EJ�@�
{/
{v������6�=�����
�q���H0�a�
��hH�
���e��PV��E� Z@@F
{v
{/���6�=����dK
���Q�q0��ce*OU=BEHRINGER,DC=BEHRINGER,DC=CORP,DC=INTRA

�� sAMAccountNameunai.rodriguez01.1�02.16.840.1.113730.3.4.2��hHx�
��PV���e��E��@Ɲ
{/
{v������6�ǀ�K�
�q���Q0�wd�nfCN=Rodriguez\, Unai,OU=IS Development,OU=GWC,OU=Users,OU=SG,OU=BEHRINGER,DC=BEHRINGER,DC=CORP,DC=INTRA0�0�e�
��hH��
���e��PV��E�1�@@��
{v
{/���G�t��^�
���X0w`rfCN=Rodriguez\, Unai,OU=IS Development,OU=GWC,OU=Users,OU=SG,OU=BEHRINGER,DC=BEHRINGER,DC=CORP,DC=INTRA�asasd��hH+e ��PV���e��E�@ƹ
{/
{v��t��G����d
�r���X0�ga�^
1W80090308: LdapErr: DSID-0C090334, comment: AcceptSecurityContext error, data 52e, vece��hHps ���e��PV��E��@@M�
{v
{.���Om���"��
��҇0w`rfCN=Rodriguez\, Unai,OU=IS Development,OU=GWC,OU=Users,OU=SG,OU=BEHRINGER,DC=BEHRINGER,DC=CORP,DC=INTRA�asasd��hHo� ��PV���e��E�cH@ju
{.
{v����"�On���E�
^*���҇0�ga�^
1W80090308: LdapErr: DSID-0C090334, comment: AcceptSecurityContext error, data 52e, vece��hH�U���e��PV��E�'L@@�_
{v
�-� ������w:����
���Dα�(0w`rfCN=Rodriguez\, Unai,OU=IS Development,OU=GWC,OU=Users,OU=SG,OU=BEHRINGER,DC=BEHRINGER,DC=CORP,DC=INTRA�asasd��hH#���PV���e��E��@?$.
�-
{v�� �w:����J����
αϧ���D0�ga�^
1W80090308: LdapErr: DSID-0C090334, comment: AcceptSecurityContext error, data 52e, vece��hH�k���e��PV��E�aP@@�y
{v
d-�
�Ƀ���Sh��H
��؋α�m0w`rfCN=Rodriguez\, Unai,OU=IS Development,OU=GWC,OU=Users,OU=SG,OU=BEHRINGER,DC=BEHRINGER,DC=CORP,DC=INTRA�asasd��hHw� ��PV���e��E��@?��
d-
{v��
�ShɃ�%���0
α�i��؋0�ga�^
1W80090308: LdapErr: DSID-0C090334, comment: AcceptSecurityContext error, data 52e, vece��hHe ���e��PV��E��@@�
{v
�-� ��*������
��ަα֏0w`rfCN=Rodriguez\, Unai,OU=IS Development,OU=GWC,OU=Users,OU=SG,OU=BEHRINGER,DC=BEHRINGER,DC=CORP,DC=INTRA�asasd��hHs3��PV���e��E��=@?B>
�-
{v�� ���*�����
α׌��ަ0�ga�^
1W80090308: LdapErr: DSID-0C090334, comment: AcceptSecurityContext error, data 52e, vece
_______________________________________________
Yale CAS mailing list
cas@...
http://tp.its.yale.edu/mailman/listinfo/cas

CAS_to_AD_network_flow.jpg (175K) Download Attachment

Re: AD account gets locked up using CAS.

by Unai Rodriguez-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Solved, it seems that CAS sends a request per LDAP server defined. If I
stick to 2 servers only, it will send the wrong password twice. I have
attached another network traffic graphic flow.

Thank you so much!
unai

On Tue, 01 Jul 2008 19:47:05 -0600, Unai Rodriguez <me@...>
wrote:

> Hi Scott,
>
>
>
> On Tue, 1 Jul 2008 09:44:28 -0400, "Scott Battaglia"
> <scott.battaglia@...> wrote:
>> Is it sending the request once to each of those servers?
>
> a) ONE Initial successful request to the first server (10.123.8.47) to
> "bind" as the 'xxxxxxxxx' user
> b) TWO unsuccessful requests to the 1st server (10.123.8.47), providing
> wrong password
> c) ONE unsuccessful requests to the 2nd server (10.123.8.46), providing
> wrong password
> d) ONE unsuccessful requests to the 3rd server (10.130.0.45), providing
> wrong password
> e) ONE unsuccessful requests to the 4th server (10.100.0.45), providing
> wrong password
> f) ONE unsuccessful requests to the 5th server (10.190.0.45), providing
> wrong password
>
> You may find attached a .cap file with all these packets and also a
> network
> flow graph.
>
> I am using:
>
> - OS:     Debian Linux Sarge 3.1
> - CAS:    version 3.0.5
> - Tomcat: version 5.5.23.0.
> - Java:   version "1.5.0_08"
>
> thanks,
> unai

_______________________________________________
Yale CAS mailing list
cas@...
http://tp.its.yale.edu/mailman/listinfo/cas

Re: AD account gets locked up using CAS.

by scott_battaglia :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

That's strange that it checks all of them though.  Generally client side failover it only in the case where it can't contact the server, not when the binding fails.

-Scott

-Scott Battaglia
PGP Public Key Id: 0x383733AA
LinkedIn: http://www.linkedin.com/in/scottbattaglia

On Wed, Jul 2, 2008 at 5:53 AM, Unai Rodriguez <me@...> wrote:
Solved, it seems that CAS sends a request per LDAP server defined. If I
stick to 2 servers only, it will send the wrong password twice. I have
attached another network traffic graphic flow.

Thank you so much!
unai

On Tue, 01 Jul 2008 19:47:05 -0600, Unai Rodriguez <me@...>
wrote:
> Hi Scott,
>
>
>
> On Tue, 1 Jul 2008 09:44:28 -0400, "Scott Battaglia"
> <scott.battaglia@...> wrote:
>> Is it sending the request once to each of those servers?
>
> a) ONE Initial successful request to the first server (10.123.8.47) to
> "bind" as the 'xxxxxxxxx' user
> b) TWO unsuccessful requests to the 1st server (10.123.8.47), providing
> wrong password
> c) ONE unsuccessful requests to the 2nd server (10.123.8.46), providing
> wrong password
> d) ONE unsuccessful requests to the 3rd server (10.130.0.45), providing
> wrong password
> e) ONE unsuccessful requests to the 4th server (10.100.0.45), providing
> wrong password
> f) ONE unsuccessful requests to the 5th server (10.190.0.45), providing
> wrong password
>
> You may find attached a .cap file with all these packets and also a
> network
> flow graph.
>
> I am using:
>
> - OS:     Debian Linux Sarge 3.1
> - CAS:    version 3.0.5
> - Tomcat: version 5.5.23.0.
> - Java:   version "1.5.0_08"
>
> thanks,
> unai

_______________________________________________
Yale CAS mailing list
cas@...
http://tp.its.yale.edu/mailman/listinfo/cas


_______________________________________________
Yale CAS mailing list
cas@...
http://tp.its.yale.edu/mailman/listinfo/cas

Re: AD account gets locked up using CAS.

by Unai Rodriguez-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

> That's strange that it checks all of them though.  Generally client side
> failover it only in the case where it can't contact the server, not when
> the
> binding fails.
>
> -Scott

Where can I start looking at to get the issue completely fixed? Is this a
known issue of older versions of CAS? I am using 3.0.5. Should a CAS
upgrade do, or it is more on the LDAP side? What sort of responses trigger
the failover?

thanks,
unai

_______________________________________________
Yale CAS mailing list
cas@...
http://tp.its.yale.edu/mailman/listinfo/cas

Re: AD account gets locked up using CAS.

by scott_battaglia :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Java tends to handle that so I don't think its an issue with CAS.  There's a thread on this list about Java's timeouts with regards to LDAP and sockets, check that out.

You're way behind on your CAS versions though ;-)

-Scott

-Scott Battaglia
PGP Public Key Id: 0x383733AA
LinkedIn: http://www.linkedin.com/in/scottbattaglia

On Wed, Jul 2, 2008 at 9:57 PM, Unai Rodriguez <me@...> wrote:
> That's strange that it checks all of them though.  Generally client side
> failover it only in the case where it can't contact the server, not when
> the
> binding fails.
>
> -Scott

Where can I start looking at to get the issue completely fixed? Is this a
known issue of older versions of CAS? I am using 3.0.5. Should a CAS
upgrade do, or it is more on the LDAP side? What sort of responses trigger
the failover?

thanks,
unai

_______________________________________________
Yale CAS mailing list
cas@...
http://tp.its.yale.edu/mailman/listinfo/cas


_______________________________________________
Yale CAS mailing list
cas@...
http://tp.its.yale.edu/mailman/listinfo/cas

Re: AD account gets locked up using CAS.

by Unai Rodriguez-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

> Java tends to handle that so I don't think its an issue with CAS.
There's
> a
> thread on this list about Java's timeouts with regards to LDAP and
> sockets,
> check that out.
>
> You're way behind on your CAS versions though ;-)
>
> -Scott

I see, thank you so much.

unai

_______________________________________________
Yale CAS mailing list
cas@...
http://tp.its.yale.edu/mailman/listinfo/cas
LightInTheBox - Buy quality products at wholesale price