Versions Compared

Key

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

...

This document offers a series of different sample application so you can have a better understanding of how this wizard works. This document is organized in the following sections:

Table of Contents

Supported features

The Plan Creator wizard will help you generate the appropriate deployment plan for the application you are deploying. The wizard currently works for web apps and supports the following features.

...

Security configuration
Anchor
security2
security2

This sample application is a basic time reporting system that uses Servlets, JSPs and J2EE declarative security. In addition to above features it uses Geronimo's embedded Derby database to store user information of the system. Even though this application uses a database to hold user information, it is merely for configuration purposes. This sample application is a slight variation from the one covered in Geronimo v2.0 Documentation. The focus of this document is on the Plan Creator wizard so we will not cover in much detail this application's inner working, please refer to Web application security sample for further details.

The noAnnotations-TestSecuritySettings.zip provides a number of SQL scripts and deployment plans to facilitate set up the environment the security sample application requires to run. The provided files are 1_TimeReportDB.sql, 2_dbPoolPlan.xml, 3_securityRealmPlan.xml. In addition there is a 0_Readme.txt which is a condensed set of intructions to deploy this sample application, timereport.war which is the application we will be deploying and a sample of the generated deployment plan timereport_generatedPlan.xml. Download and extract the zip file to a directory of your convenience.

1) Using "DBManager" portlet, create a database by name "TimeReportDB" and run "1_TimeReportDB.sql" on this new database.

2) Using "Deploy New" portlet, create a new database pool "TimeReportPool" by specifying "<GERONIMO_HOME>\repository\org\tranql\tranql-connector-ra\1.3\tranql-connector-ra-1.3.rar" as the "Archive" and "2_dbPoolPlan.xml" as the "Plan".

3) Using "Deploy New" portlet, create a new security realm "TimeReportRealm" by only specifying "3_securityRealmPlan.xml" as the "Plan".

4) Finally create the geronimo-web.xml for "timereport.war" by using "Create Plan" portlet as below:
a) In the 'security configuration' page, select "TimeReportRealm" as the "Security Realm Name".
b) For security role "employee", select "Add -> Principal" and add 2 "Group Prinicipals" with name "EmployeeGroup" and "ManagerGroup".
c) For security role "manager", select "Add -> Principal" and add 1 "Group Prinicipal" with name "ManagerGroup".
d) Press "Next" twice.
e) In the 'created plan' page, you should see a plan similar to "timereport_generatedPlan.xml".
f) Press "Deploy WAR" and click on "Launch Web App" to run the sample application.
g) Verify using "userid" and "password" values from "1_TimeReportDB.sql".

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>

Attachments

Attachments
patterns.*zip