• 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
  • Paul Clapham
  • Ron McLeod
  • Jeanne Boyarsky
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Frits Walraven
Bartenders:
  • Piet Souris
  • Himai Minh

<login-config> in DD

 
Ranch Hand
Posts: 62
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Does the <login-config> element of the DD needs the user to be authenticated to access any resource of the web application or only the resources constrained by a <security-constraint> in the DD?
For eg,



The above snippet from a DD, will allow only users in MANAGER role to send a POST request for the resource available at /index.jsp. But all users who try to access /index.jsp will be asked for username/password which will be sent over HTTPS (for confidentiality).

If any user tries to access any other resource in the web application, does the login-config performs authentication even then?
 
Ranch Hand
Posts: 183
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator


Only when a resource is constrained authentication will be done.
 
Kanishka Ajwani
Ranch Hand
Posts: 62
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks Simran.

Only when a resource is constrained authentication will be done.



Does that mean any unconstrained resource will be available to all the users without authentication?
Just to get my concepts right, let us consider the above example I gave. In the current scenario, any requests (be it from any role/user) to "/index.jsp" will be authenticated because "/index.jsp" is a constrained resource. Have I got it right?
 
Creator of Enthuware JWS+ V6
Posts: 3398
312
Android Eclipse IDE Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Kanishka,

In the current scenario, any requests (be it from any role/user) to "/index.jsp" will be authenticated because "/index.jsp" is a constrained resource. Have I got it right?


Almost correct, but not exactly: only the requests that are using a POST.

If there is request accessing /index.jsp via a GET the user firing it won't be asked for authentication...

Regards,
Frits
 
Could you hold this puppy for a sec? I need to adjust this tiny ad:
Free, earth friendly heat - from the CodeRanch trailboss
https://www.kickstarter.com/projects/paulwheaton/free-heat
reply
    Bookmark Topic Watch Topic
  • New Topic