You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@turbine.apache.org by Thomas Vandahl <tv...@apache.org> on 2016/08/05 15:03:19 UTC

Re: Turbine 4 Entity User Data Model, Facts and Discussion, Fulcrum Security

On 08.07.16 13:11, Georg Kallidis wrote:
> Hi,
> 
> comparing Turbine4-M1, Turbine4-M2 and current trunk 4.0-SNAPSHOT I took 
> some notes, which may now get their (right) place in this list to have 
> some more reviewing and discussion. Sorry for this lengthy mail!

I think this dpost is a good starting point for a migration guide. You
may want to add it to the Wiki. Any ideas on how to clean up this mess
are very welcome.

> Discussion
> - No configurable wrapper?
> org.apache.turbine.services.security.DefaultUserManager has hard coded 
> DefaultUserImpl as a wrapper in the wrap method. If its not configurable 
> you have to setup your onw user manager (extending DefaultUserManager and 
> overriding the wrap method ) and set it in TR.properties to 
> services.SecurityService.user.manager.

This would be easy to fix. The problem I had when creating all this
stuff is the basic idea of separating the security model from Turbine
and keeping only a few connection points. I may have overlooked this case.

> - Be aware if using TurbineUserImpl the name property is set to "
> toLowerCase"!
> 
> In 
> org.apache.fulcrum.security.entity.impl.SecurityEntityImpl.setName(String), 
> which is used in TurbineUserImpl (and its also in 
> org.apache.fulcrum.security.torque.TorqueAbstractSecurityEntity.setName(String)
> org.apache.fulcrum.security.torque.TorqueAbstractUserManager.getUser(String)) 
> name is set toLowerCase.
> 
> If its a kind of legacy support/Turbine feature, it neverthelesse should 
> be made more explicitely IMO (in my case I need it case sensitive). 
> 

This has been the Fulcrum Security concept for all security entities,
users, roles, groups and permissions. I just looked into the Turbine 2.3
code where everything is indeed case sensitive. It didn't matter to me
but I have no problem to revert to case sensitive behavior or - even
better - a configurable behavior.

> - Should entityId, entityName be included in 
> org.apache.fulcrum.security.entity.SecurityEntity, as it is used by 
> default in Security Torque? I think there COULD be some confusion about so 
> many "entity"s (as package, name part, plain property, but not interfaced) 
> ;-)

This is a kludge to handle exactly the case-insensitivity of the entity
name and the problem of mapping an Integer id in Torque to the generic
Object id in Fulcrum Security. As such, it is
fulcrum-security-torque-specific. I'm open to better solutions.

Bye, Thomas.



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@turbine.apache.org
For additional commands, e-mail: dev-help@turbine.apache.org


Antwort: Re: Turbine 4 Entity User Data Model, Facts and Discussion, Fulcrum Security

Posted by Georg Kallidis <gk...@cedis.fu-berlin.de>.
Hi Thomas, 

it could go into the wiki, may be as supplement to the already existing 
T1-T2 migration guides (
https://wiki.apache.org/turbine/Turbine4/Turbine4.0M2)? I could do this 
wiki stuff.

+1 more configurable user managers (case sensititive behaviour, wrapper, 
may be also switch off/on saveOnSessionUnbind, which may be not always 
what you want).

@entities
The idea is once you have the entities (entityId and entityName) set in 
Torque (Torque schema), you could just use id/name (interface 
SecurityEntity). May be some short explanation in the wiki would helpful 
in this case as well ..

Best regards, Georg




Von:    Thomas Vandahl <tv...@apache.org>
An:     Turbine Developers List <de...@turbine.apache.org>
Datum:  05.08.2016 17:03
Betreff:        Re: Turbine 4 Entity User Data Model, Facts and 
Discussion, Fulcrum Security



On 08.07.16 13:11, Georg Kallidis wrote:
> Hi,
> 
> comparing Turbine4-M1, Turbine4-M2 and current trunk 4.0-SNAPSHOT I took 

> some notes, which may now get their (right) place in this list to have 
> some more reviewing and discussion. Sorry for this lengthy mail!

I think this dpost is a good starting point for a migration guide. You
may want to add it to the Wiki. Any ideas on how to clean up this mess
are very welcome.

> Discussion
> - No configurable wrapper?
> org.apache.turbine.services.security.DefaultUserManager has hard coded 
> DefaultUserImpl as a wrapper in the wrap method. If its not configurable 

> you have to setup your onw user manager (extending DefaultUserManager 
and 
> overriding the wrap method ) and set it in TR.properties to 
> services.SecurityService.user.manager.

This would be easy to fix. The problem I had when creating all this
stuff is the basic idea of separating the security model from Turbine
and keeping only a few connection points. I may have overlooked this case.

> - Be aware if using TurbineUserImpl the name property is set to "
> toLowerCase"!
> 
> In 
> 
org.apache.fulcrum.security.entity.impl.SecurityEntityImpl.setName(String), 

> which is used in TurbineUserImpl (and its also in 
> 
org.apache.fulcrum.security.torque.TorqueAbstractSecurityEntity.setName(String)
> 
org.apache.fulcrum.security.torque.TorqueAbstractUserManager.getUser(String)) 

> name is set toLowerCase.
> 
> If its a kind of legacy support/Turbine feature, it neverthelesse should 

> be made more explicitely IMO (in my case I need it case sensitive). 
> 

This has been the Fulcrum Security concept for all security entities,
users, roles, groups and permissions. I just looked into the Turbine 2.3
code where everything is indeed case sensitive. It didn't matter to me
but I have no problem to revert to case sensitive behavior or - even
better - a configurable behavior.

> - Should entityId, entityName be included in 
> org.apache.fulcrum.security.entity.SecurityEntity, as it is used by 
> default in Security Torque? I think there COULD be some confusion about 
so 
> many "entity"s (as package, name part, plain property, but not 
interfaced) 
> ;-)

This is a kludge to handle exactly the case-insensitivity of the entity
name and the problem of mapping an Integer id in Torque to the generic
Object id in Fulcrum Security. As such, it is
fulcrum-security-torque-specific. I'm open to better solutions.

Bye, Thomas.



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@turbine.apache.org
For additional commands, e-mail: dev-help@turbine.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@turbine.apache.org
For additional commands, e-mail: dev-help@turbine.apache.org