Return-Path: Delivered-To: apmail-db-derby-dev-archive@www.apache.org Received: (qmail 76189 invoked from network); 5 Apr 2006 16:35:13 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 5 Apr 2006 16:35:13 -0000 Received: (qmail 89357 invoked by uid 500); 5 Apr 2006 16:35:10 -0000 Delivered-To: apmail-db-derby-dev-archive@db.apache.org Received: (qmail 89189 invoked by uid 500); 5 Apr 2006 16:35:06 -0000 Mailing-List: contact derby-dev-help@db.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: Delivered-To: mailing list derby-dev@db.apache.org Received: (qmail 89080 invoked by uid 99); 5 Apr 2006 16:35:05 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 05 Apr 2006 09:35:05 -0700 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received: from [192.87.106.226] (HELO ajax.apache.org) (192.87.106.226) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 05 Apr 2006 09:35:05 -0700 Received: from ajax (localhost.localdomain [127.0.0.1]) by ajax.apache.org (Postfix) with ESMTP id 2EB786ACA9 for ; Wed, 5 Apr 2006 17:34:44 +0100 (BST) Message-ID: <1268316683.1144254884188.JavaMail.jira@ajax> Date: Wed, 5 Apr 2006 17:34:44 +0100 (BST) From: "Anders Morken (JIRA)" To: derby-dev@db.apache.org Subject: [jira] Updated: (DERBY-1000) For LDAP authentication: derby.authentication.server should support ldaps:// as part of the server url. In-Reply-To: <2134178364.1140159226969.JavaMail.jira@ajax.apache.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N [ http://issues.apache.org/jira/browse/DERBY-1000?page=all ] Anders Morken updated DERBY-1000: --------------------------------- Derby Info: [Patch Available] > For LDAP authentication: derby.authentication.server should support ldaps:// as part of the server url. > ------------------------------------------------------------------------------------------------------- > > Key: DERBY-1000 > URL: http://issues.apache.org/jira/browse/DERBY-1000 > Project: Derby > Type: Bug > Components: Newcomer, Security > Versions: 10.0.2.0, 10.0.2.1, 10.1.1.0, 10.1.1.1, 10.1.1.2, 10.1.2.0, 10.1.2.1, 10.1.2.2, 10.2.0.0 > Environment: all > Reporter: Sunitha Kambhampati > Priority: Trivial > Attachments: DERBY-1000.patch, DERBY1000-docs.patch > > derby.authentication.server does not recognize secure ldap url - ie if the url starts with ldaps:// > Trying to connect using LDAP authentication with the following properties set > derby.authentication.provider=LDAP > derby.authentication.server=ldaps://xyz.abc.com:636 > derby.authentication.ldap.searchBase='ou=xyz,o=abc.com' > derby.authentication.ldap.searchFilter='(emailaddress=%USERNAME%)' > derby.connection.requireAuthentication=true > throws InvalidNameException > ij> connect 'jdbc:derby:testdb;user=a;password=p'; > ERROR 08004: Connection refused : javax.naming.InvalidNameException: Invalid name: /xyz.abc.com:636 > Code - LDAPAuthenticationSchemeImpl#setJNDIProviderProperties. > Problem is the code expects that if Context.PROVIDER_URL is not and if derby.authentication.server is set, then the ldapServer is either of the format //server:port or it already starts with ldap:// else it just adds ldap:// . > Thus for a ldaps://xyz.com:636 url , it will become ldap://ldaps://xyz.com:636 > in the code snippet, dflLDAPURL is ldap:// > if (ldapServer.startsWith(dfltLDAPURL)) > this.providerURL = ldapServer; > else if (ldapServer.startsWith("//")) > this.providerURL = "ldap:" + ldapServer; > else > this.providerURL = dfltLDAPURL + ldapServer; > } > initDirContextEnv.put(Context.PROVIDER_URL, providerURL); > We should support specifiying secure ldap , ie ldaps:// in the derby.authentication.server. Add condition to support the ldaps:// > ie. > if (ldapServer.startsWith(dfltLDAPURL) || ldapServer.startsWith("ldaps://")) > this.providerURL = ldapServer; > ======== > A workaround to the problem is to set the Context.PROVIDER_URL instead. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira