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 9FB97200D01 for ; Fri, 8 Sep 2017 03:41:41 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 9E3DE160FC4; Fri, 8 Sep 2017 01:41:41 +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 E4D7F160C9B for ; Fri, 8 Sep 2017 03:41:40 +0200 (CEST) Received: (qmail 4471 invoked by uid 500); 8 Sep 2017 01:41:39 -0000 Mailing-List: contact api-help@directory.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: api@directory.apache.org Delivered-To: mailing list api@directory.apache.org Received: (qmail 4460 invoked by uid 99); 8 Sep 2017 01:41:39 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 08 Sep 2017 01:41:39 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd3-us-west.apache.org (ASF Mail Server at spamd3-us-west.apache.org) with ESMTP id 04BBA18D493 for ; Fri, 8 Sep 2017 01:41:39 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -1.301 X-Spam-Level: X-Spam-Status: No, score=-1.301 tagged_above=-999 required=6.31 tests=[KAM_LAZY_DOMAIN_SECURITY=1, RCVD_IN_DNSWL_MED=-2.3, RP_MATCHES_RCVD=-0.001] autolearn=disabled Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id jh431-j3C0DJ for ; Fri, 8 Sep 2017 01:41:33 +0000 (UTC) Received: from tr22g10.aset.psu.edu (tr22g10.aset.psu.edu [146.186.149.133]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTPS id 44D9B5F666 for ; Fri, 8 Sep 2017 01:41:33 +0000 (UTC) Received: from ucs22.ait.psu.edu (ucs22.ait.psu.edu [128.118.73.60]) by tr22g10.aset.psu.edu (8.15.2/8.15.2) with ESMTP id v881fQFe8978596 for ; Thu, 7 Sep 2017 21:41:26 -0400 Date: Thu, 7 Sep 2017 21:41:25 -0400 (EDT) From: CRAIG BENNER To: api@directory.apache.org Message-ID: <1442009683.16485977.1504834885751.JavaMail.zimbra@psu.edu> In-Reply-To: References: <473683107.34496.1504447116171.JavaMail.zimbra@psu.edu> <7a4afa4b-5b66-7787-3730-77bc080a7916@gmail.com> <2140643619.370609.1504565437966.JavaMail.zimbra@psu.edu> <1226264384.1941056.1504815658976.JavaMail.zimbra@psu.edu> Subject: Re: Ldap API Custom Controls MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Originating-IP: [172.25.2.33] X-Mailer: Zimbra 8.7.7_GA_1787 (ZimbraWebClient - GC60 (Win)/8.7.7_GA_1787) Thread-Topic: Ldap API Custom Controls Thread-Index: EGFXEvDIVwSH2ujnU44m6I92Az+R/g== X-Virus-Scanned: by amavisd-new archived-at: Fri, 08 Sep 2017 01:41:41 -0000 I'm working with Chris. We've tried both coding approaches for setting the control // LdapServerPolicyHintsOid hints =3D new LdapServerPolicyHintsOidIm= pl(); // hints.setFlags(1); =20 // hints.setCritical(true); // modRequest.addControl(hints); --or-- LdapServerPolicyHintsOidDecorator decCtrl =3D new LdapServerPolicyH= intsOidDecorator(getReadableLdapConnection().getCodecService()); modRequest.addControl(decCtrl); ModifyResponse modResponse =3D getWriteableLdapConnection().modify(mo= dRequest); We are interacting with ActiveDirectory and we are using the ResetPassword = logic (ModifyRequest Replace logic for uniCodePwd). We are trying to add h= onoring of the Password History data by adding the control for policy hints= documented on the first email Chris Sent. It will take some changes to get a wireshark capture, since Password's can = only be managed over a secure connection. Hopefully tomorrow I can get you= the wireshark capture Thanks.=20 Craig Benner ----- Original Message ----- From: "Emmanuel L=C3=A9charny" To: api@directory.apache.org Sent: Thursday, September 7, 2017 4:51:49 PM Subject: Re: Ldap API Custom Controls Le 07/09/2017 =C3=A0 22:20, Chris Pike a =C3=A9crit=C2=A0: > So I added the controls, but they don't seem to be working. We are gettin= g a error code 53 (unwilling to preform) when we add the control to our req= uest, so assuming there is something wrong with the control, but don't know= enough about ldap or the library to know what. Any ideas on what to try or= what might be wrong? We need more info to be able to understand what's wrong : - a capture of the messages being exchanged (wireshark) - the server you use > > > > ----- Original Message ----- > From: "Chris Pike" > To: "api" > Sent: Monday, September 4, 2017 6:50:37 PM > Subject: Re: Ldap API Custom Controls > > Thanks for the suggestions and code examples. I'll work on adding this ne= w control and let you know if I have any issues. > > ~Chris Pike > > > > ----- Original Message ----- > From: "Emmanuel L=C3=A9charny" > To: "api" > Sent: Monday, September 4, 2017 3:46:49 AM > Subject: Re: Ldap API Custom Controls > > Le 04/09/2017 =C3=A0 09:16, Radovan Semancik a =C3=A9crit=C2=A0: >> On 09/04/2017 09:02 AM, Emmanuel L=C3=A9charny wrote: >>> Actually, the tricky part is the grammar, which is a state engine >>> description. >> Oh, that is usually not that difficult either. Most of those "custom" >> controls are very simple. Just a couple of fields. Complex data >> structures seem to be very rare. If you start with existing control >> that is somehow similar it is not difficult to implement a new control. > FTR, the code I provided yesterday night in one of my previous mail took > me around 30 mins, all included. For a more complex control, like > syncrepl, that would have takne a bit more time, mainly because you want > to add unit tests to cover teh various cases. > > Now, I think that we should provide a bit of documentation about how to > implement a control... > --=20 Emmanuel Lecharny Symas.com directory.apache.org