Titel-Logo
Projektstudien
TraceLogger
Basics of Cryptography
Custom JBossAS Login
The problem
SaltedPasswordLoginModule
Configuration
Example application
Salt and Hash Generator
Further improvements
Downloads
SOAP Webservice
Role Based Access Control
Example Application

The demo is a simple Java Server Faces (JSF) application. The unrestricted start page displays some status information about the server and the thread which has processed the present request. A link refers to the secured area. Following the link without a valid session triggers the display of the configured login page. The key point is that the programmer doesn't need to implement this behaviour because it is managed by the container. Upon successfull login the user has been assigned his predefined roles. If the user holds the admin role a command button is rendered which leads further to the administration page. Without holding the admin role it isn't possible to access this page even when manually typing the location of the administration page within the adress bar.

The demo application comes in two flavours, one for the JBossAS 7.1.1 and another for its successor Wildfly 8. The former is a Java EE 6 application and the latter one a Java EE 7 application. Both applications require configurations equivalent to those explained at Configuration. The web descriptors need not to be configured because they are contained within the demo application and will be deployed together with it.

There are several ways to deploy the demo application to a running server: through the Wildfly (JBossAS) web interface, by the Wildfly (JBossAS) CLI or via the Wildfly (JBossAS) Maven plugin. Consult your documentation if necessary. First you would have to download the project or the binary, see Downloads, The binary is sufficient if you deploy via CLI (or web interface), e.g.:

$ ./jboss-cli.sh --connect --commands="deploy -f <PATH_TO_WAR>/salt-example-2014-12-11.war"

Otherwise setup Maven and switch to the project directory of the demo application and type:

$ mvn wildfly:deploy
Wildfly 8.2.0

Or rather:

$ mvn jboss-as:deploy
JBossAS 7.1.1

The unrestricted page of the example app may be accessed by http://localhost:8080/salt-example/test.jsf upon successful deployment.

Valid XHTML 1.0 Strict