You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@directory.apache.org by Harakiri <ha...@yahoo.com> on 2007/02/19 18:08:39 UTC
Trigger on ldap search, create entry if it doesnt exists ?
Hello,
i've read the guides on the apacheds HP, but im unsure
where to start - triggers seem to be right.
What i want to achieve is - unauthenticated users
search for a name (for example) - if the name is not
found in the repository/backend a trigger should
create this entry with some default values and return
the newly inserted data to the requesting user...
Can this be done ? Where should i start looking ? Has
it something to do with interceptors ? Maybe intercept
the search, search through the API by yourself - it it
doesnt exist - create - after that the interceptor
would call the "normal" search routine...
I greatly appreciate any starting hints where to look
Thanks
____________________________________________________________________________________
Bored stiff? Loosen up...
Download and play hundreds of games for free on Yahoo! Games.
http://games.yahoo.com/games/front
Fwd: userCertificate;binary doesnt work?
Posted by Ersin Er <er...@gmail.com>.
[Forwarding Harakiri's email to the list.]
I tried to insert a DER encoded user certificate into
an entity - it does not work :
with
userCertificate;binary::
MIIE8DCCA9igAwIBAgIBAjANBgkqhkiG9w0BAQQFADCBwTELM
AkGA1UEBhMCQ0gxEDAOBgNVBAgTB1p1ZXJpY2gxEzARBgNVBAcTCldpbnRlcnRodXIxJzA...
[LDAP: error code 17 - failed to add entry
cn=someCN,o=myOrg: usercertificate;binary not found in
attribute registry!]
whereas (without binary)
userCertificate:
MIIE8DCCA9igAwIBAgIBAjANBgkqhkiG9w0BAQQFADCBwTELM
AkGA1UEBhMCQ0gxEDAOBgNVBAgTB1p1ZXJpY2gxEzARBgNVBAcTCldpbnRlcnRodXIxJzA
works...
--
Ersin
Re: Trigger on ldap search, create entry if it doesnt exists ?
Posted by Alex Karasulu <ak...@apache.org>.
Ersin,
See there is a use case for triggers on non-write operations :). This is a
good example of that I think.
Alex
On 2/19/07, Ersin Er <er...@gmail.com> wrote:
>
> On 2/19/07, Harakiri <ha...@yahoo.com> wrote:
> > Hello,
>
> Hi,
>
> > i've read the guides on the apacheds HP, but im unsure
> > where to start - triggers seem to be right.
> >
> > What i want to achieve is - unauthenticated users
> > search for a name (for example) - if the name is not
> > found in the repository/backend a trigger should
> > create this entry with some default values and return
> > the newly inserted data to the requesting user...
>
> Current implementation of Triggers allow firing events upon change
> inducing operations only. Although we have modeled Triggers for all
> kind of operations they have not been implemented yet.
>
> > Can this be done ? Where should i start looking ? Has
> > it something to do with interceptors ? Maybe intercept
> > the search, search through the API by yourself - it it
> > doesnt exist - create - after that the interceptor
> > would call the "normal" search routine...
>
> You can simply implement this via Interceptors. All of ApacheDS
> services are based on Interceptors and for advanved needs Interceptors
> fit best. There are lots of examples in ApacheDS code to learn how to
> develop Interceptors.
>
> You may also look at some presentation materials here:
>
> https://svn.safehaus.org/repos/sandbox/workshop/
>
> > I greatly appreciate any starting hints where to look
> >
> > Thanks
>
> HTH,
> --
> Ersin
>
Re: Trigger on ldap search, create entry if it doesnt exists ?
Posted by Harakiri <ha...@yahoo.com>.
Great thanks.
My limited knowledge in interceptors would assume that
:
1. I define my interceptor in the server.xml
2. Implement the BaseInterceptor in my class and put
this in ApacheDS classpath
Where should this interceptor be ? After the Auth
interceptor or normalize interceptor ?
Am I correct in assuming, that when my interceptor is
finished - the normal "search" process to the backends
proceeds and the data is automatically returned to the
user i.e. the interceptor will not halt the normal
flow ?
--- Ersin Er <er...@gmail.com> wrote:
> On 2/19/07, Harakiri <ha...@yahoo.com> wrote:
> > Hello,
>
> Hi,
>
> > i've read the guides on the apacheds HP, but im
> unsure
> > where to start - triggers seem to be right.
> >
> > What i want to achieve is - unauthenticated users
> > search for a name (for example) - if the name is
> not
> > found in the repository/backend a trigger should
> > create this entry with some default values and
> return
> > the newly inserted data to the requesting user...
>
> Current implementation of Triggers allow firing
> events upon change
> inducing operations only. Although we have modeled
> Triggers for all
> kind of operations they have not been implemented
> yet.
>
> > Can this be done ? Where should i start looking ?
> Has
> > it something to do with interceptors ? Maybe
> intercept
> > the search, search through the API by yourself -
> it it
> > doesnt exist - create - after that the interceptor
> > would call the "normal" search routine...
>
> You can simply implement this via Interceptors. All
> of ApacheDS
> services are based on Interceptors and for advanved
> needs Interceptors
> fit best. There are lots of examples in ApacheDS
> code to learn how to
> develop Interceptors.
>
> You may also look at some presentation materials
> here:
>
> https://svn.safehaus.org/repos/sandbox/workshop/
>
> > I greatly appreciate any starting hints where to
> look
> >
> > Thanks
>
> HTH,
> --
> Ersin
>
____________________________________________________________________________________
Sucker-punch spam with award-winning protection.
Try the free Yahoo! Mail Beta.
http://advision.webevents.yahoo.com/mailbeta/features_spam.html
Re: Trigger on ldap search, create entry if it doesnt exists ?
Posted by Ersin Er <er...@gmail.com>.
On 2/19/07, Harakiri <ha...@yahoo.com> wrote:
> Hello,
Hi,
> i've read the guides on the apacheds HP, but im unsure
> where to start - triggers seem to be right.
>
> What i want to achieve is - unauthenticated users
> search for a name (for example) - if the name is not
> found in the repository/backend a trigger should
> create this entry with some default values and return
> the newly inserted data to the requesting user...
Current implementation of Triggers allow firing events upon change
inducing operations only. Although we have modeled Triggers for all
kind of operations they have not been implemented yet.
> Can this be done ? Where should i start looking ? Has
> it something to do with interceptors ? Maybe intercept
> the search, search through the API by yourself - it it
> doesnt exist - create - after that the interceptor
> would call the "normal" search routine...
You can simply implement this via Interceptors. All of ApacheDS
services are based on Interceptors and for advanved needs Interceptors
fit best. There are lots of examples in ApacheDS code to learn how to
develop Interceptors.
You may also look at some presentation materials here:
https://svn.safehaus.org/repos/sandbox/workshop/
> I greatly appreciate any starting hints where to look
>
> Thanks
HTH,
--
Ersin