Set Up Tomcat Container Authentication
Table of Contents
Apache Tomcat is an open source Java servlet container. Tomcat implements Java enterprise specs, including the Java Servlet, JavaServer Pages JSP, and WebSockets APIs.
To have Tomcat manage authentication for your application:
-
Add this module to your POM (
pom.xml
file in the root of the application):<dependency> <groupId>twigkit</groupId> <artifactId>twigkit.security.provider.tomcat7</artifactId> <version>${project.parent.version}</version> </dependency>
-
Set the requisite type in
security.conf
(found insrc/main/resources/conf/security/
):type: tomcat7
This picks up the user and all roles from the configured Tomcat authentication mechanism. This is often used in Windows environments. More information on this type of authentication can be found in the Tomcat documentation.