Return-Path: Delivered-To: apmail-directory-users-archive@www.apache.org Received: (qmail 78749 invoked from network); 11 Mar 2010 18:28:23 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 11 Mar 2010 18:28:23 -0000 Received: (qmail 16787 invoked by uid 500); 11 Mar 2010 18:27:49 -0000 Delivered-To: apmail-directory-users-archive@directory.apache.org Received: (qmail 16689 invoked by uid 500); 11 Mar 2010 18:27:48 -0000 Mailing-List: contact users-help@directory.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@directory.apache.org Delivered-To: mailing list users@directory.apache.org Received: (qmail 16681 invoked by uid 99); 11 Mar 2010 18:27:48 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 11 Mar 2010 18:27:48 +0000 X-ASF-Spam-Status: No, hits=-2.3 required=10.0 tests=RCVD_IN_DNSWL_MED,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of R.Lee.Cook@ngc.com designates 155.104.240.104 as permitted sender) Received: from [155.104.240.104] (HELO xmrm0101.northgrum.com) (155.104.240.104) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 11 Mar 2010 18:27:37 +0000 Received: from xbhm0001.northgrum.com ([155.104.118.90]) by xmrm0101.northgrum.com with InterScan Message Security Suite; Thu, 11 Mar 2010 13:23:51 -0500 Received: from XBHIL102.northgrum.com ([134.223.165.151]) by xbhm0001.northgrum.com over TLS secured channel with Microsoft SMTPSVC(6.0.3790.3959); Thu, 11 Mar 2010 13:27:14 -0500 Received: from XMBIL103.northgrum.com ([134.223.165.14]) by XBHIL102.northgrum.com over TLS secured channel with Microsoft SMTPSVC(6.0.3790.3959); Thu, 11 Mar 2010 12:27:13 -0600 X-MimeOLE: Produced By Microsoft Exchange V6.5 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="----_=_NextPart_001_01CAC148.7828C089" Subject: RE: first small ldap java design Date: Thu, 11 Mar 2010 12:23:22 -0600 Message-ID: <790350B079ED634F9A4FDB52E267E2E6073F1A1C@XMBIL103.northgrum.com> X-MS-Has-Attach: X-MS-TNEF-Correlator: <790350B079ED634F9A4FDB52E267E2E6073F1A1C@XMBIL103.northgrum.com> Thread-Topic: first small ldap java design thread-index: Acq/EPdgCU3vI3fhRkq3gyylsNW5+ABu98h4AB7GD9Y= References: <4B957B3B.8040305@gmail.com> <790350B079ED634F9A4FDB52E267E2E6073F1A19@XMBIL103.northgrum.com> From: "Cook, Lee (IS) (Contr)" To: X-OriginalArrivalTime: 11 Mar 2010 18:27:13.0393 (UTC) FILETIME=[78520E10:01CAC148] X-Virus-Checked: Checked by ClamAV on apache.org ------_=_NextPart_001_01CAC148.7828C089 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable a simpler question. if i authenticate by getting an InitialDirContext with a user as = principal, how can i use the context to pull this users attributes? Context.getAttributes() expects a Name, confused... Lee! ________________________________ From: Cook, Lee (IS) (Contr) [mailto:R.Lee.Cook@ngc.com] Sent: Wed 3/10/2010 9:42 PM To: users@directory.apache.org Subject: first small ldap java design Hi, Im new to LDAP Java and need to provide code for the following usecase. Wondering if anyone might review my initial logic notes writen in novice = terms perhaps offer some advice, pseudo or even real LDAP Java code examples. taking first baby steps... Thks, Lee! 1- connect to the customer's LDAP Directory service LDAPAPI:=20 get a new InitialDirContext() with customer's LDAP Directory service hostname:port, Bind principal and Bind principal password ? supply base DN ? =20 2- authenticate simple mode LDAP username/password credentials LDAPAPI: uid =3D username, userpassword =3D password ? user password stored in UNIX crypt format ? Bind ? Search user uid, userpassword? =20 3- if authenticated, retrieve membership of 3 possible role groups, and the personname attribute value LDAPAPI: Search and return attributes ? =20 4- Close the LDAP service connection LDAPAPI: Unbind * =20 ------_=_NextPart_001_01CAC148.7828C089--