karaf-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] (KARAF-4968) LDAPLoginModule does not correctly implement login method
Date Tue, 31 Jan 2017 20:25:51 GMT

    [ https://issues.apache.org/jira/browse/KARAF-4968?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15847447#comment-15847447
] 

ASF GitHub Bot commented on KARAF-4968:
---------------------------------------

GitHub user sstrickx opened a pull request:

    https://github.com/apache/karaf/pull/276

    [KARAF-4968] LDAPLoginModule does not correctly implement login method

    Correcting the behavior of the LDAPLoginModule's login method in case of failed authentication.
    More details provided in the JIRA issue: https://issues.apache.org/jira/browse/KARAF-4968

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/sstrickx/karaf karaf-4968

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/karaf/pull/276.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #276
    
----
commit 98992e454111fbccc54387a7e71002512b2f7b51
Author: Stijn Strickx <stijn.strickx@gmail.com>
Date:   2017-01-31T20:21:25Z

    [KARAF-4968] LDAPLoginModule does not correctly implement login method
    
    Correcting the behavior of the LDAPLoginModule's login method in case of
    failed authentication

----


> LDAPLoginModule does not correctly implement login method
> ---------------------------------------------------------
>
>                 Key: KARAF-4968
>                 URL: https://issues.apache.org/jira/browse/KARAF-4968
>             Project: Karaf
>          Issue Type: Bug
>          Components: karaf-security
>    Affects Versions: 4.0.8
>            Reporter: Stijn Strickx
>            Priority: Minor
>
> When the LDAPLoginModule fails to authenticate a user, given the provided credentials,
the login() method will return false.
> This is incorrect behavior as explained in the JAAS Dev Guide: http://docs.oracle.com/javase/8/docs/technotes/guides/security/jaas/JAASLMDevGuide.html#login
> The login() method should throw a LoginException in that case. Returning false actually
tells the LoginContext that this LoginModule should be ignore.
> As long as the LDAPLoginModule is the only LoginModule configured within a Realm, the
resulting behavior from the LoginContext is as expected. The problem becomes apparent when
using the LDAPLoginModule as one of multiple LoginModules defined within a Realm. If, for
example, all LoginModule's flags are set to "required", a failure to login in the LDAPLoginModule
will just be ignored (while it logs a warning about invalid credentials) as long as the other
LoginModules were able to do a successful login. This is not the expected behavior since the
LDAPLoginModule is also configured to be "required".



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Mime
View raw message