-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 7 posts ] 
Author Message
 Post subject: A question about declaritive security
PostPosted: Mon Nov 28, 2005 2:17 pm 
Beginner
Beginner

Joined: Thu Oct 20, 2005 12:34 am
Posts: 28
While reading over the documentation this weekend, I came upon the following:

http://www.hibernate.org/hib_docs/v3/re ... l-security


My question is, is there anything else that I have to do? Any interfaces to implement? etc...

Thank You,
Bill


Top
 Profile  
 
 Post subject:
PostPosted: Mon Nov 28, 2005 2:49 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 12:50 pm
Posts: 5130
Location: Melbourne, Australia
No interfaces to implement.

But I'm not sure that the docs for configuring this stuff are up to date.

And we've only been testing this stuff in the context of EJB3, so I'm not sure what is the exact status of thie stuff in the Hibernate standalone case. I know that in 3.0.0 this was all broken, but we (not me personally) did some fixes to it in 3.1 branch.

Emmanuel and Kabir know more.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Nov 28, 2005 4:43 pm 
Beginner
Beginner

Joined: Thu Oct 20, 2005 12:34 am
Posts: 28
Gavin,

Thanks for your reply. Unfortunately, my team can't switch to Hibernate 3.1. We need to stick with the 1.4.2_xx API atm.

Maybe later though.

Again, thank you for your input and time.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Nov 28, 2005 4:52 pm 
Hibernate Team
Hibernate Team

Joined: Sun Sep 14, 2003 3:54 am
Posts: 7256
Location: Paris, France
Hibernate 3.1 works with JDK 1.4.x

_________________
Emmanuel


Top
 Profile  
 
 Post subject:
PostPosted: Mon Nov 28, 2005 5:11 pm 
Beginner
Beginner

Joined: Thu Oct 20, 2005 12:34 am
Posts: 28
emmanuel wrote:
Hibernate 3.1 works with JDK 1.4.x


hmmm, I thought I read somewhere that it needed 1.5. Probably just for annotations though.

This is great news. Thanks Emmanuel.

So, how dependable is the security w/ 3.1? I only ask because of Gavins earlier statement.


Thank You.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Nov 29, 2005 5:41 am 
Hibernate Team
Hibernate Team

Joined: Sun Sep 14, 2003 3:54 am
Posts: 7256
Location: Paris, France
This works fine in HEAD;
Have a look at the way I configure those JACCEventListeners in Hibernate EntityManager EventListenerConfigurator.
Basically you need to pass a context Id to them.

_________________
Emmanuel


Top
 Profile  
 
 Post subject:
PostPosted: Tue Nov 29, 2005 7:27 am 
Newbie

Joined: Tue Nov 29, 2005 7:13 am
Posts: 1
From the EJB 3 side, as Emmanuel says, the event listeners are configured from what you put in your persistence.xml.

You need to specify that you want to use jacc and the permissions for each of your entities

<entity-manager>
<properties>
<property name="hibernate.jacc.allowed.org.jboss.ejb3.test.jacc.AllEntity" value="insert,update,delete,read"/>

<property name="hibernate.jacc.enabled" value="true"/>
</properties>
</entity-manager>

This relies on a) a JACC provider being present and b) security information getting set. In JBoss EJB 3 a) is done using the JBoss JACC security provider, and b) by the container for a session bean accessing the entitymanager - this information must be available for the event listeners to work.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 7 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.