JAAS Authentication and Authorization Test

Demo Home

Test Web Application Only - Do NOT Deploy in Production

# JAAS Authentication and Authorization Demo

## Preparation

To enable JAAS in a base jetty instance do:

        $ cd $JETTY_BASE
        $ java -jar $JETTY_HOME/start.jar --add-to-start=jaas

This will create a $JETTY_BASE/start.d/jaas.ini file to enable and parameterize JAAS. If no start.d directory exists, then the same initialisation will be appended to the $JETTY_BASE/start.ini file. The Jetty demo-base already has JAAS enabled in its start.ini file.

The full source of this demonstration is available here.

## Using the Demo

Click on the link below to test JAAS authentication and role-based web security constraint authorization. Use username="me" with password="me". All other usernames, passwords should result in authentication failure.

LOGIN

This demo uses a simple login module that stores its configuration in a properties file. There are other types of login module provided with the jetty distro. For full information, please refer to the Jetty 9 documentation.