BASIC Authentication in Websphere Application Server

1 ) Secure the application resources using the descriptor (web.xml) <!DOCTYPE web-app PUBLIC “-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN” “http://java.sun.com/dtd/web-app_2_3.dtd”> <web-app id=”WebApp”> <welcome-file-list> <welcome-file>index.jsp</welcome-file> </welcome-file-list> <security-constraint> <display-name>Constraint-0</display-name> <web-resource-collection> <web-resource-name>Constraint-0</web-resource-name> <url-pattern>/*</url-pattern> </web-resource-collection> <auth-constraint> <role-name>pegaadmin</role-name> </auth-constraint> <user-data-constraint> <transport-guarantee>NONE</transport-guarantee> </user-data-constraint> </security-constraint> <login-config> <auth-method>BASIC</auth-method> </login-config> <security-role> <role-name>pegaadmin</role-name> </security-role> </web-app>   2) Deploy the application

Continue reading »

BASIC Authentication with Apache

Create user.txt with the username and password separated by colon user.txt testuser:testuser Then use the htpasswd to encrypt the password Apache2\bin>htpasswd.exe -b user.txt testuser testuser Automatically using MD5 format. Updating password for user testuser Add the following in the httpd.conf file present in C:\Program Files\Apache Group\Apache2\bin LoadModule weblogic_module modules/mod_wl128_20.so <Location

Continue reading »