Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id E770E200C17 for ; Fri, 10 Feb 2017 20:59:16 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id E5CA4160B5C; Fri, 10 Feb 2017 19:59:16 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 3A3FE160B4E for ; Fri, 10 Feb 2017 20:59:16 +0100 (CET) Received: (qmail 67500 invoked by uid 500); 10 Feb 2017 19:59:15 -0000 Mailing-List: contact issues-help@karaf.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@karaf.apache.org Delivered-To: mailing list issues@karaf.apache.org Received: (qmail 67486 invoked by uid 99); 10 Feb 2017 19:59:15 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 10 Feb 2017 19:59:15 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd1-us-west.apache.org (ASF Mail Server at spamd1-us-west.apache.org) with ESMTP id DFB05C08FF for ; Fri, 10 Feb 2017 19:59:14 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -1.199 X-Spam-Level: X-Spam-Status: No, score=-1.199 tagged_above=-999 required=6.31 tests=[KAM_ASCII_DIVIDERS=0.8, KAM_LAZY_DOMAIN_SECURITY=1, RP_MATCHES_RCVD=-2.999] autolearn=disabled Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id iy5Oi5Ae-sRx for ; Fri, 10 Feb 2017 19:59:14 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTP id E6B9E5F576 for ; Fri, 10 Feb 2017 19:59:13 +0000 (UTC) Received: from jira-lw-us.apache.org (unknown [207.244.88.139]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id A17A2E05E0 for ; Fri, 10 Feb 2017 19:58:42 +0000 (UTC) Received: from jira-lw-us.apache.org (localhost [127.0.0.1]) by jira-lw-us.apache.org (ASF Mail Server at jira-lw-us.apache.org) with ESMTP id 16D5B21D6C for ; Fri, 10 Feb 2017 19:58:42 +0000 (UTC) Date: Fri, 10 Feb 2017 19:58:42 +0000 (UTC) From: "ASF subversion and git services (JIRA)" To: issues@karaf.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (KARAF-4968) LDAPLoginModule does not correctly implement login method MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Fri, 10 Feb 2017 19:59:17 -0000 [ https://issues.apache.org/jira/browse/KARAF-4968?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15861776#comment-15861776 ] ASF subversion and git services commented on KARAF-4968: -------------------------------------------------------- Commit 929a21c7c7fd9005d0150fca5dbd00d8be2addeb in karaf's branch refs/heads/master from [~sstrickx] [ https://git-wip-us.apache.org/repos/asf?p=karaf.git;h=929a21c ] [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 > Assignee: Guillaume Nodet > Priority: Minor > Fix For: 4.0.9, 4.1.1 > > > 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 ignored. > 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 LoginModules their 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)