wood burning stoves*
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes <login-config> in DD Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA forum!
JavaRanch » Java Forums » Certification » Web Component Certification (SCWCD/OCPJWCD)
Bookmark "<login-config> in DD" Watch "<login-config> in DD" New topic
Author

<login-config> in DD

Kanishka Ajwani
Ranch Hand

Joined: Nov 30, 2009
Posts: 62
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

Joined: Jan 09, 2010
Posts: 183


Only when a resource is constrained authentication will be done.
Kanishka Ajwani
Ranch Hand

Joined: Nov 30, 2009
Posts: 62
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
Bartender

Joined: Apr 07, 2010
Posts: 1665
    
  25

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
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: <login-config> in DD