Re: Making the EOModel to work with LDAP
Re: Making the EOModel to work with LDAP
- Subject: Re: Making the EOModel to work with LDAP
- From: Gustavo Adolfo Pizano <email@hidden>
- Date: Thu, 7 May 2009 10:24:41 +0200
Hello all again.
Im reading package summary of the jndiadaptor from apple's
documentation.
there it says that each entity must have a relativeDistinguesdName
which holds the value of the relative distinguished name and serves as
the primary key.
Right after this, it says "By default, reverse engenieer sets the
relativeDistinguishedName attribute to be neither a class property nor
and attribute that participates in locking"
first, if I have the LDAP server running with its own schema, how can
I do reverse engineering of it?.
Now something else. where is the Custom Formating inspecotr in
EOModeler, due that this is a method they suggest to create the rdn,
but its kind complicated, I don't get it.
there is another method, that is to set the rdn as a class property so
I can read it, and then I can genereate the new rdn.
Cheers
Gustavo
On May 7, 2009, at 9:53 AM, Gustavo Adolfo Pizano wrote:
Hello.
I have read the chapter again, and saw the example once more. but
the model it's not set up to use LDAP. As I see, it has an Entity
called LDAPAuthenticatedUser which inherit from abstractUser, but
the whole EOModel it's set up to work with FrontBase.
Now, I see in the implementation of the LDAPAuthenticatedUser, and
as I said, it has coded the DN and url of the LDAP inside the
custom .java class, not the _LDAPAuthenticatedUser .java.
I have been searching on internet, and saw many post of people
saying that I can't set up a many-to-many relationship for a LDAP
model.
So I don't get it on how to do the model, which attributes should I
put for each entity.
I understand how the Object graph it's build when using a SQL db,
and how to fetch is done, I re-read the EnterpirseObject programming
guide again :P. but no LDAP example.
Authenticated as the book shows is done, but now to fetch the data,
what should I do?. I fetch some data using the search(...) method of
the DirContext class, and seting up a filter, but then Im not using
any EOModel at all.
Thanks
Gustavo
On May 6, 2009, at 7:43 PM, David Avendasora wrote:
Hey Gustavo,
Do you have Practical WebObjects, Right?
Chapter 4 goes into a lot of detail on how to build authentication
into a WO application including how to setup the model, and it
demonstrates how to setup LDAP-based authentication.
I would start with that. If you still run into problems there will
likely be more people that can help you because you will have a
solid foundation already.
Dave
On May 6, 2009, at 10:59 AM, Gustavo Adolfo Pizano wrote:
Hello, I searched on google, and found some stuff, but it seems
that the people already had the model some how build, so thats why
Im asking again, forgive me if Im bothering somebody with this
topic, :P. Also I found an eexample of a EOModel that connects to
a LDAP server via JNDI but hte link is broken :(.
Well, now that I understood better, and took a decision on how to
build this app, now I came with the question on building the
EOModel so it will work eith the LDAP server.
I have set up some Entities and some attributes in it. but then my
boss who is the one in charge of the LDAP server, (and BTW he is
the one who is giving me the "clues" on how to make the searches
and all), showed me that I can get certain attributes only, and
not the whole "entity".
For instance.
I have in the LDAP something like
cn=Contacts,o=xws
cn=Feriva,cn=Contacts,o=xws
cn=4422-Feriva s.r.o.,cn=Feriva,cn=Contacts,o=xws
contactType=FaxWork,cn=4422-Feriva
s.r.o.,cn=Feriva,cn=Contacts,o=xws
contactType=Home,cn=4422-Feriva s.r.o.,cn=Feriva,cn=Contacts,o=xws
so :
XWS
---->Contacts
----------->Feriva
----->4422-Feriva s.r.o
------>FaxWork
------>HOme.
well something like that..
so I set up the adaptor of the DB config to JNDI; authentication
-- simple. and the url username and password.
but then how do I create the model, because this is different than
a SQL server, this one(LDAP) its a tree like schema.
thanks in advance.
Gustavo
PD If you need more info about the attributes each entity has in
the LDAP let me know.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden