You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@directory.apache.org by Emmanuel Lécharny <el...@gmail.com> on 2013/05/01 10:49:02 UTC
I'll move some of the extended operations and controls from ldap-api-extra-codec(-api)
to api-ldap-codec-core
Hi guys,
I will move the syncrepl controls and the pwdModify extended operation
code from ldap-api-extra-codec(-api) to api-ldap-codec-core. The
rational is that I would like to extend the LdapConnection API to
support the pwdModify() operation directly, without having to go through
the creation of a PwdModifyRequestImpl instance like in :
PwdModifyRequestImpl pwdModifyRequest = new PwdModifyRequestImpl();
pwdModifyRequest.setUserIdentity( Strings.getBytesUtf8(
"cn=User1,ou=system" ) );
pwdModifyRequest.setOldPassword( Strings.getBytesUtf8( "secret" ) );
pwdModifyRequest.setNewPassword( Strings.getBytesUtf8(
"BetterSecret" ) );
// Send the request
PwdModifyResponse pwdModifyResponse = ( PwdModifyResponse )
connection.extended( pwdModifyRequest );
but instead have :
// Change the password
PwdModifyResponse pwdModifyResponse = connection.pwdModify(
"cn=User1,ou=system", "secret", "BetterSecret" );
I currently can't do that as the PwdModifyResponse and
PwdModifyRequestImpl classes aren't visible from the LdapConnection
class. This is the very sae problem for the SYncrepl controls.
thoughts ?
--
Regards,
Cordialement,
Emmanuel Lécharny
www.iktek.com
Re: I'll move some of the extended operations and controls from ldap-api-extra-codec(-api) to api-ldap-codec-core
Posted by Pierre-Arnaud Marcelot <pa...@marcelot.net>.
I kind of agree a bit here.
Maybe a simple static method in the 'PwdModifyRequest' class is enough.
Something like:
> PwdModifyRequest.send( connection, "cn=User1,ou=system", "secret", "BetterSecret" );
My 2 cents,
Pierre-Arnaud
On 1 mai 2013, at 12:25, Radu Creanga <rd...@gmail.com> wrote:
> -1 for including the pwdModify as part of the connection API and don't care for the move from extra to core.
>
> None of you have heard from me before and I'm not sure my vote can count for anything, but I hope the comments will.
>
> PwdModify is an extended request that is optional for a directory server - AD for example does not support it, at least not out of the box. But, by including it as part of the connection API you're creating the wrong impression that it is a standard/universal operation such as add, modify, delete, search, etc.
>
> Regards,
> Radu
>
> On May 1, 2013 5:08 AM, "Emmanuel Lécharny" <el...@gmail.com> wrote:
> Le 5/1/13 10:56 AM, Kiran Ayyagari a écrit :
> > ++1 personally I never liked this distinction of core and extra this only
> > made the things worse, I don't see
> > how some control can be treated as 'belongs to core' and other as 'extra',
> > IMHO a very bad move, and
> > I would like to get rid of this if possible to make it right
>
> Well, the extra controls/extended operations are those only ApacheDS
> support. As teh LDAP API is supposed to be a common LDAP API, there is
> no reason to enforce the usage of our own features for those using the
> API to talk to OpenLDAP, AD? or whatever LDAP server.
>
> This is the reason we have this distinction, and I think it's good to
> keep it this way.
> For the few classes I mentionned, it does not make sense to have them in
> extra - and part of this is my fault, I created the pwdModify classes in
> the worng place -
>
>
>
>
> --
> Regards,
> Cordialement,
> Emmanuel Lécharny
> www.iktek.com
>
Re: I'll move some of the extended operations and controls from ldap-api-extra-codec(-api) to api-ldap-codec-core
Posted by Pierre-Arnaud Marcelot <pa...@marcelot.net>.
On 1 mai 2013, at 16:43, Emmanuel Lécharny <el...@gmail.com> wrote:
> Le 5/1/13 12:25 PM, Radu Creanga a écrit :
>> -1 for including the pwdModify as part of the connection API and don't care
>> for the move from extra to core.
>>
>> None of you have heard from me before and I'm not sure my vote can count
>> for anything, but I hope the comments will.
> There is no formal vote, so your opinion is certainly valuable.
>
> This is why I pushed the mail here (alhought I should have said "I'd
> like to " instead of "I will".
>>
>> PwdModify is an extended request that is optional for a directory server -
>> AD for example does not support it, at least not out of the box. But, by
>> including it as part of the connection API you're creating the wrong
>> impression that it is a standard/universal operation such as add, modify,
>> delete, search, etc.
>
> I will think again about my proposal.
>
> I will start by moving the startTLS extended request, which is supported
> by all the servers.
>
> Regarding the pwdModify extended request, I can provide an utility class
> that make it easiers to send it to the servers that support it.
>
> Thanks for your feedback, this is certainly good food for thoughts !
>
>
> --
> Regards,
> Cordialement,
> Emmanuel Lécharny
> www.iktek.com
>
Re: I'll move some of the extended operations and controls from ldap-api-extra-codec(-api)
to api-ldap-codec-core
Posted by Emmanuel Lécharny <el...@gmail.com>.
Le 5/1/13 12:25 PM, Radu Creanga a écrit :
> -1 for including the pwdModify as part of the connection API and don't care
> for the move from extra to core.
>
> None of you have heard from me before and I'm not sure my vote can count
> for anything, but I hope the comments will.
There is no formal vote, so your opinion is certainly valuable.
This is why I pushed the mail here (alhought I should have said "I'd
like to " instead of "I will".
>
> PwdModify is an extended request that is optional for a directory server -
> AD for example does not support it, at least not out of the box. But, by
> including it as part of the connection API you're creating the wrong
> impression that it is a standard/universal operation such as add, modify,
> delete, search, etc.
I will think again about my proposal.
I will start by moving the startTLS extended request, which is supported
by all the servers.
Regarding the pwdModify extended request, I can provide an utility class
that make it easiers to send it to the servers that support it.
Thanks for your feedback, this is certainly good food for thoughts !
--
Regards,
Cordialement,
Emmanuel Lécharny
www.iktek.com
Re: I'll move some of the extended operations and controls from
ldap-api-extra-codec(-api) to api-ldap-codec-core
Posted by Radu Creanga <rd...@gmail.com>.
-1 for including the pwdModify as part of the connection API and don't care
for the move from extra to core.
None of you have heard from me before and I'm not sure my vote can count
for anything, but I hope the comments will.
PwdModify is an extended request that is optional for a directory server -
AD for example does not support it, at least not out of the box. But, by
including it as part of the connection API you're creating the wrong
impression that it is a standard/universal operation such as add, modify,
delete, search, etc.
Regards,
Radu
On May 1, 2013 5:08 AM, "Emmanuel Lécharny" <el...@gmail.com> wrote:
> Le 5/1/13 10:56 AM, Kiran Ayyagari a écrit :
> > ++1 personally I never liked this distinction of core and extra this only
> > made the things worse, I don't see
> > how some control can be treated as 'belongs to core' and other as
> 'extra',
> > IMHO a very bad move, and
> > I would like to get rid of this if possible to make it right
>
> Well, the extra controls/extended operations are those only ApacheDS
> support. As teh LDAP API is supposed to be a common LDAP API, there is
> no reason to enforce the usage of our own features for those using the
> API to talk to OpenLDAP, AD? or whatever LDAP server.
>
> This is the reason we have this distinction, and I think it's good to
> keep it this way.
> For the few classes I mentionned, it does not make sense to have them in
> extra - and part of this is my fault, I created the pwdModify classes in
> the worng place -
>
>
>
>
> --
> Regards,
> Cordialement,
> Emmanuel Lécharny
> www.iktek.com
>
>
Re: I'll move some of the extended operations and controls from ldap-api-extra-codec(-api)
to api-ldap-codec-core
Posted by Emmanuel Lécharny <el...@gmail.com>.
Le 5/1/13 10:56 AM, Kiran Ayyagari a écrit :
> ++1 personally I never liked this distinction of core and extra this only
> made the things worse, I don't see
> how some control can be treated as 'belongs to core' and other as 'extra',
> IMHO a very bad move, and
> I would like to get rid of this if possible to make it right
Well, the extra controls/extended operations are those only ApacheDS
support. As teh LDAP API is supposed to be a common LDAP API, there is
no reason to enforce the usage of our own features for those using the
API to talk to OpenLDAP, AD? or whatever LDAP server.
This is the reason we have this distinction, and I think it's good to
keep it this way.
For the few classes I mentionned, it does not make sense to have them in
extra - and part of this is my fault, I created the pwdModify classes in
the worng place -
--
Regards,
Cordialement,
Emmanuel Lécharny
www.iktek.com
Re: I'll move some of the extended operations and controls from
ldap-api-extra-codec(-api) to api-ldap-codec-core
Posted by Kiran Ayyagari <ka...@apache.org>.
++1 personally I never liked this distinction of core and extra this only
made the things worse, I don't see
how some control can be treated as 'belongs to core' and other as 'extra',
IMHO a very bad move, and
I would like to get rid of this if possible to make it right
On Wed, May 1, 2013 at 2:19 PM, Emmanuel Lécharny <el...@gmail.com>wrote:
> Hi guys,
>
> I will move the syncrepl controls and the pwdModify extended operation
> code from ldap-api-extra-codec(-api) to api-ldap-codec-core. The
> rational is that I would like to extend the LdapConnection API to
> support the pwdModify() operation directly, without having to go through
> the creation of a PwdModifyRequestImpl instance like in :
>
> PwdModifyRequestImpl pwdModifyRequest = new PwdModifyRequestImpl();
> pwdModifyRequest.setUserIdentity( Strings.getBytesUtf8(
> "cn=User1,ou=system" ) );
> pwdModifyRequest.setOldPassword( Strings.getBytesUtf8( "secret" )
> );
> pwdModifyRequest.setNewPassword( Strings.getBytesUtf8(
> "BetterSecret" ) );
>
> // Send the request
> PwdModifyResponse pwdModifyResponse = ( PwdModifyResponse )
> connection.extended( pwdModifyRequest );
>
> but instead have :
>
> // Change the password
> PwdModifyResponse pwdModifyResponse = connection.pwdModify(
> "cn=User1,ou=system", "secret", "BetterSecret" );
>
> I currently can't do that as the PwdModifyResponse and
> PwdModifyRequestImpl classes aren't visible from the LdapConnection
> class. This is the very sae problem for the SYncrepl controls.
>
> thoughts ?
>
> --
> Regards,
> Cordialement,
> Emmanuel Lécharny
> www.iktek.com
>
>
--
Kiran Ayyagari
http://keydap.com