Last active
November 27, 2019 22:51
-
-
Save vi7/862e54ba90c9639e2b15843b4869302d to your computer and use it in GitHub Desktop.
Tomcat app authz example: /usr/local/tomcat/webapps/ROOT/WEB-INF/web.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- /usr/local/tomcat/webapps/ROOT/WEB-INF/web.xml --> | |
<?xml version="1.0" encoding="UTF-8"?> | |
<web-app xmlns="http://java.sun.com/xml/ns/javaee" | |
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee | |
http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" | |
version="2.5"> | |
<!-- Authorization section starts here --> | |
<security-role> | |
<role-name>admin</role-name> | |
</security-role> | |
<security-constraint> | |
<web-resource-collection> | |
<web-resource-name>Whole app</web-resource-name> | |
<url-pattern>/*</url-pattern> | |
</web-resource-collection> | |
<auth-constraint> | |
<role-name>admin</role-name> | |
</auth-constraint> | |
</security-constraint> | |
<login-config> | |
<auth-method>BASIC</auth-method> | |
</login-config> | |
</web-app> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
/usr/local/tomcat/conf/tomcat-users.xml