This week's book giveaway is in the Cloud forum.
We're giving away four copies of The Business Blockchain and have William Mougayar on-line!
See this thread for details.
Win a copy of The Business Blockchain this week in the Cloud forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Container managed security

 
Solomon Raz
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
My understanding is in container managed security, if a protected resource is accessed, the container will direct the user to the sign-on page. Let's say the user has never registered before and clicks the Register button on the sign-on page and successfully registers and logs on. Will the container take the user back to the protected resource he/she was originally attempting to access? Or is it up to the application to do that.

Solomon
 
Harry Tan
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have some problem in understanding the container managed security as well.

So far I've been developing bean without putting the restriction because my application is based on application security design.

And I've just browsed into Petstore code and I've found the restriction imposed on 'place order' and only allowed 'customer' role to have access to that particular method.

I've been looking around the code but unable to find a bean lookup that specifies any userid/password during the lookup process such as:

InitialContext ic = new InitialContext();
Object objref = ic.lookup(jndiHomeName);
Object obj = PortableRemoteObject.narrow(objref, className);


My questions is:
*How EJBcontainer knows that the logged on application client that access a specific bean has any role?
 
Dhiren Joshi
Ranch Hand
Posts: 463
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have some problem in understanding the container managed security as well.

So far I've been developing bean without putting the restriction because my application is based on application security design.

And I've just browsed into Petstore code and I've found the restriction imposed on 'place order' and only allowed 'customer' role to have access to that particular method.

I've been looking around the code but unable to find a bean lookup that specifies any userid/password during the lookup process such as:

InitialContext ic = new InitialContext();
Object objref = ic.lookup(jndiHomeName);
Object obj = PortableRemoteObject.narrow(objref, className);


My questions is:
*How EJBcontainer knows that the logged on application client that access a specific bean has any role?


Take a look at http://java.sun.com/blueprints/guidelines/designing_enterprise_applications_2e/sample-app/sample-app1.3.1a3.html
And the part User Signon And Customer Registration Module Design
HTH
Dhiren
 
Joseph Zhou
Ranch Hand
Posts: 129
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
As I remember, the answer for question "How EJBcontainer knows that the logged on application client that access a specific bean has any role?" is container implementation specific according to the EJB spec., and it is method based(you can specify a method can be accessed by which roles). As for the the re-direct to login page, that is in Servlet 2.3 described as one of the intercept filter.
 
Solomon Raz
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm redeploying this question again. Will get help in any form: ans, links, book names etc.,

My understanding is in container managed security, if a protected resource is accessed, the container will direct the user to the sign-on page. Let's say the user has never registered before and clicks the Register button on the sign-on page and successfully registers and logs on. Will the container take the user back to the protected resource he/she was originally attempting to access? Or is it up to the application to do that.

Solomon
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic