Hi Edgar,
Yes, we can definitely co-operate.
Turbine has made things really simple for using it's security service (TSS). You need
to implement User, UserManager;
both are simple. It's the design of UserPeer which we need to implement is the
problem. UserPeer is required by DB
implementation of TSS, which I and I guess, you, want to use. Instead of having a
getId(username) method, it says give
me the username and let me do a join. And *that* is the problem. It could have been
very easy if they had chosen the ID
way.
The only solution I can think of is to have a table with two columns (username and id)
and always sync with LDAP (either
in real-time, when the user logs in OR in batch). The mapping of username and id will
remain stable since nothing will
change.
Ideas?
-ngd.
----- Original Message -----
From: "Edgar Gonzalez" <[EMAIL PROTECTED]>
To: "Turbine Users List" <[EMAIL PROTECTED]>
Sent: Tuesday, April 09, 2002 1:14 PM
Subject: Re: SecurityService & UserPeer Dependence
: Hi Nikhil,
:
: I'm working in something similar, Users stored in some LDAP backend, and
: still using the TurbineSecurity bases to Groups, Roles, etc..
: Maybe we can share ideas
:
: Edgar
:
:
: ----- Original Message -----
: From: "Nikhil G. Daddikar" <[EMAIL PROTECTED]>
: To: "Turbine Users List" <[EMAIL PROTECTED]>
: Sent: Monday, April 08, 2002 12:03 PM
: Subject: Re: SecurityService & UserPeer Dependence
:
:
: > What I am saying is that I want to use Turbine Security but I don't have
: users in a relational database and the only
: > reason UserPeer was invented is because RolePeer can do a join to get the
: user id, which it could have got in a
: > different way than through UserPeer.
: >
: > For example, UserPeer just had a getId(String username) method, that would
: have sufficed.
: >
: > Thanks.
: >
: > ----- Original Message -----
: >
: > : Hi UserPeer was created for you to implement it.
: > : Implement UserPeer to indicate which TABLE and COLUMN are to used by
: > : TSecuritySystem. for example :
: > :
: > : public class YourPeer implements UserPeer
: > : {
: > : public static final String USER_ID = YOUR_TABLE.YOUR_ID_COLUMN;
: > : ...
: > : }
: > :
: > : and you must edit TR.conf to use your UserPeer impl.
: > :
: > :
: > : On Mon, 2002-04-08 at 04:19, Nikhil G. Daddikar wrote:
: > :
: > :
: > : > Folks,
: > : >
: > : > I have been studying Turbine (2.1) to see how to fit in my own User
: > : > implementation. During that process I noticed a few things which I
: > : > would like clarification on.
: > : >
: > : > Security classes Role, Permission and Group deal with USER_ID
: (according
: > : > to the schema). The concept of UserPeer has been introduced so that
: > : > RolePeer.retrieve(User, Group) can do an SQL join to figure out the
: > : > USER_ID from the USERNAME as indicated below in the code:
: > : >
: > : > UserPeer up =
: > : > ((DBSecurityService)TurbineSecurity.getService())
: > : > .getUserPeerInstance();
: > : >
: > : > criteria.add(up.getFullColumnName(UserPeer.USERNAME),
: > : > user.getUserName());
: > : > criteria.add(UserGroupRolePeer.GROUP_ID,
: > : > ((Persistent)group).getPrimaryKey());
: > : >
: > : > criteria.addJoin(up.getFullColumnName(UserPeer.USER_ID),
: > : > UserGroupRolePeer.USER_ID);
: > : > criteria.addJoin(UserGroupRolePeer.ROLE_ID, RolePeer.ROLE_ID);
: > : > criteria.toString();
: > : > return retrieveSet(criteria);
: > : >
: > : > If the ID (int) was available in some way, the concept of UserPeer (as
: > : > it is now) will disappear.
: > : >
: > : > In my case the User will be in a directory (accessible through LDAP)
: and
: > : > hence there will be no columns to join on. However, all users have a
: > : > unique ID (int) and I still want to use the TurbineSecurity system
: > : > (database form) which is quite great.
: > : >
: > : > Instead of depending on UserPeer's column names, if there was a way
: to
: > : > get the integer ID from the username, that would have sufficed.
: > : >
: > : > Now I don't know how to proceed.
: > : >
: > : > Have I missed anything? Any help will be greatly appreciated.
: > : >
: > : > Thanks.
: > : > -ngd.
: > : >
: > : >
: > : >
: > : >
: > : >
: > : >
: > : > --
: > : > To unsubscribe, e-mail:
: <mailto:[EMAIL PROTECTED]>
: > : > For additional commands, e-mail:
: <mailto:[EMAIL PROTECTED]>
: > : --
: > : Leandro Rodrigo Saad Cruz
: > : IT - Inter Business Tecnologia e Servicos (IB)
: > : http://www.ibnetwork.com.br
: > :
: > :
: > : --
: > : To unsubscribe, e-mail:
: <mailto:[EMAIL PROTECTED]>
: > : For additional commands, e-mail:
: <mailto:[EMAIL PROTECTED]>
: > :
: > :
: > :
: >
: >
: > --
: > To unsubscribe, e-mail:
: <mailto:[EMAIL PROTECTED]>
: > For additional commands, e-mail:
: <mailto:[EMAIL PROTECTED]>
: >
: >
: >
:
:
: --
: To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
: For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
:
:
:
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>