Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  1. Back in the Geronimo Administration Console click on Plan Creator. Browse to the timereport.war you just extracted and click on Configure.



  2. In the resulting screen you will be configuring the web application identity. You may want to change the default proposed values however, for this example, we will be accepting the defaults. Click Next.



  3. As a difference from the other sample applications, for this example we do not have to resolve any resource references so the wizard will jump directly to the security part of the configuration. In the resulting screendefine the security configuration.
    1. Select "TimeReportRealm" from the "Security Realm Name:" pull down menu. This is the security realm you deployed earlier.
    2. For security role employee select Add -> Principal from the pull down menu and add 2 Group Prinicipals with name EmployeeGroup and ManagerGroup.
    3. For security role manager, select Add -> Principal and add 1 Group Prinicipal with name ManagerGroup.



  4. Click Next, the following screen allows you to select WAR dependencies. This application has not dependencies on any these modules, click Next.
  5. In the Created Plan screen you should see a plan similar to this one.
    Code Block
    xml
    xml
    borderStylesolid
    titleGenerated deployment plan without Annotations
    <?xml version="1.0" encoding="UTF-8"?>
    <web-app xmlns="http://geronimo.apache.org/xml/ns/j2ee/web-2.0.1">
        <dep:environment xmlns:dep="http://geronimo.apache.org/xml/ns/deployment-1.2">
            <dep:moduleId>
                <dep:groupId>default</dep:groupId>
                <dep:artifactId>timereport</dep:artifactId>
                <dep:version>1.0</dep:version>
                <dep:type>war</dep:type>
            </dep:moduleId>
        </dep:environment>
        <context-root>timereport</context-root>
        <security-realm-name>TimeReportRealm</security-realm-name>
        <app:security xsi:type="sec:securityType" xmlns:sec="http://geronimo.apache.org/xml/ns/security-2.0" 
                      xmlns:app="http://geronimo.apache.org/xml/ns/j2ee/application-2.0" 
    		  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
            <sec:role-mappings>
                <sec:role role-name="employee">
                    <sec:principal name="EmployeeGroup" class="org.apache.geronimo.security.realm.providers.GeronimoGroupPrincipal"/>
                    <sec:principal name="ManagerGroup" class="org.apache.geronimo.security.realm.providers.GeronimoGroupPrincipal"/>
                </sec:role>
                <sec:role role-name="manager">
                    <sec:principal name="ManagerGroup" class="org.apache.geronimo.security.realm.providers.GeronimoGroupPrincipal"/>
                </sec:role>
            </sec:role-mappings>
        </app:security>
    </web-app>
    
  6. Click on Deploy WAR and then click on Launch Web App to run the sample application. Verify using userid and password values from 1_TimeReportDB.sql.

...