• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

<login-config> in DD

 
Kanishka Ajwani
Ranch Hand
Posts: 62
  • 0
  • Mark post as helpful
  • send pies
  • 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?
 
Simran Dass
Ranch Hand
Posts: 183
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


Only when a resource is constrained authentication will be done.
 
Kanishka Ajwani
Ranch Hand
Posts: 62
  • 0
  • Mark post as helpful
  • send pies
  • 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?
 
Frits Walraven
Creator of Enthuware JWS+ V6
Saloon Keeper
Pie
Posts: 2164
57
Android Chrome Eclipse IDE
  • 0
  • Mark post as helpful
  • send pies
  • 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
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic