This project (https://github.com/guofengzh/jaspi-on-jetty) is a working example of a JASPI API in a jetty that uses geronimo-jaspi , which in turn accesses jetty-jaspi modules for authentication. In this example, Geronimo seems to provide a configuration mechanism and attaches the authentication modules themselves.
It seems that you can choose a form, digest, or basic authentication methods. A quick form-based login check showed that it was functioning.
Jaspi factory authentication is configured in the jetty-web.xml file as follows:
<Set name="securityHandler"> <New class="org.eclipse.jetty.security.ConstraintSecurityHandler"> <Set name="loginService"> <New class="org.eclipse.jetty.plus.jaas.JAASLoginService"> <Set name="name">JAASRealm</Set> <Set name="loginModuleName">jaas</Set> </New> </Set> <Set name="authenticatorFactory"> <New class="org.eclipse.jetty.security.jaspi.JaspiAuthenticatorFactory" /> </Set> </New> </Set>
And the jaspi configuration file is referenced through the system property in the pom.xml file:
<systemProperty> <name>org.apache.geronimo.jaspic.configurationFile</name> <value>./conf/jaspi/form-test-jaspi-2.xml</value> </systemProperty>
In addition, the jaspi library you specify is added as a dependency in pom, as well as the implementation of geronimo jaspi:
<dependency> <groupId>org.eclipse.jetty</groupId> <artifactId>jetty-jaspi</artifactId> <version>${jetty.version}</version> </dependency> <dependency> <groupId>org.apache.geronimo.components</groupId> <artifactId>geronimo-jaspi</artifactId> <version>2.0.0</version> </dependency>
I also could not find the documentation on this topic. It seems that the jetty-jaspi module is not one of the standard launch options but can be added to $ {jetty.home / lib / ext} (see Jetty classloading ).
diffa source share