• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Devaka Cooray
  • Tim Cooke
Sheriffs:
  • Rob Spoor
  • Liutauras Vilda
  • paul wheaton
Saloon Keepers:
  • Tim Holloway
  • Tim Moores
  • Mikalai Zaikin
  • Carey Brown
  • Piet Souris
Bartenders:
  • Stephan van Hulst

Container managed security

 
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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?
 
Ranch Hand
Posts: 463
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Ranch Hand
Posts: 129
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
What's that smell? Hey, sniff this tiny ad:
Smokeless wood heat with a rocket mass heater
https://woodheat.net
reply
    Bookmark Topic Watch Topic
  • New Topic