Change or provide an alternative implementation?
If I did either one, would you commit it?
I mean, would that be a "clean" solution?
David E. Jones schrieb:
Rather than trying to do this through the entity engine it might be
better/easier to just change the userLogin service to look at both
sources, and manage conflicts as desired, etc.
-David
On Feb 28, 2007, at 11:29 AM, Torsten Schlabach wrote:
Hi!
I think I am about to find my way through OFBiz internals, so
basically I am just asking for confirmation and some little hints.
What I am trying to do is to read users and their passwords not from
the embedded Derby database but from a given LDAP directory.
I have taken a look at org.ofbiz.common.login.LoginServices. From
there I find out that it's using a delegator to retrieve the username
and corresponding password through the entity engine.
Am I right that I would have to configure the entity engine in a way
that it keeps retrieving anything else from where it does today, but
that I would have to tell it to use a different datasource for the
entity UserLogin?
I haven't found that specific place yet, but hopefully that shouldn't
be that difficult.
But browsing pre-defined datasources in entityengine.xml, I did not
find anything which looked like LDAP to me. So I wonder: Are
delegators tied to SQL databases and JDBC? Or to something which has
to have a relational structure? (LDAP can be mapped into a relational
structure, but as we know, it's not relational by default.)
Would I have to code a new implementation of a Delegator to talk to
an LDAP server? Or would there be a way to achieve this just through
configuration?
Also I haven't yet found the place where datasources, delegators and
entities are connected.
Can this be done at all at reasonable effort?
I am thinking of implementing my own replacement for LoginServices as
an alternative. That would for example allow to check for container
based authentication (getUserPrincial()). But that would just manage
logins. I would loose the chance to create new users through OFBiz,
wouldn't I?
Any comments or pointers to specific documents are welcome.
Regards,
Torsten