From scm-return-24230-apmail-geronimo-scm-archive=geronimo.apache.org@geronimo.apache.org Sat Jan 05 20:24:00 2008 Return-Path: Delivered-To: apmail-geronimo-scm-archive@www.apache.org Received: (qmail 3253 invoked from network); 5 Jan 2008 20:23:59 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 5 Jan 2008 20:23:59 -0000 Received: (qmail 31580 invoked by uid 500); 5 Jan 2008 20:23:48 -0000 Delivered-To: apmail-geronimo-scm-archive@geronimo.apache.org Received: (qmail 31542 invoked by uid 500); 5 Jan 2008 20:23:48 -0000 Mailing-List: contact scm-help@geronimo.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: Reply-To: dev@geronimo.apache.org List-Id: Delivered-To: mailing list scm@geronimo.apache.org Received: (qmail 31531 invoked by uid 99); 5 Jan 2008 20:23:48 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 05 Jan 2008 12:23:48 -0800 X-ASF-Spam-Status: No, hits=-100.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.3] (HELO eris.apache.org) (140.211.11.3) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 05 Jan 2008 20:23:32 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id AD6D71A98A3; Sat, 5 Jan 2008 12:22:59 -0800 (PST) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r609207 [7/8] - in /geronimo/server/trunk/plugins/console: console-base-portlets/src/main/resources/ console-base-portlets/src/main/webapp/WEB-INF/view/ajax/ console-base-portlets/src/main/webapp/WEB-INF/view/apache/jk/ console-base-portlet... Date: Sat, 05 Jan 2008 20:22:38 -0000 To: scm@geronimo.apache.org From: dwoods@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20080105202259.AD6D71A98A3@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Modified: geronimo/server/trunk/plugins/console/console-base-portlets/src/main/webapp/WEB-INF/view/realmwizard/usage.jsp URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/console/console-base-portlets/src/main/webapp/WEB-INF/view/realmwizard/usage.jsp?rev=609207&r1=609206&r2=609207&view=diff ============================================================================== --- geronimo/server/trunk/plugins/console/console-base-portlets/src/main/webapp/WEB-INF/view/realmwizard/usage.jsp (original) +++ geronimo/server/trunk/plugins/console/console-base-portlets/src/main/webapp/WEB-INF/view/realmwizard/usage.jsp Sat Jan 5 12:22:33 2008 @@ -17,21 +17,20 @@ <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %> <%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %> <%@ taglib uri="http://java.sun.com/portlet" prefix="portlet"%> +<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%> + -

This page talks about how to use the security realm ${realm.name} from a J2EE application. - The example here is a web application, but other application modules would work similarly.

+

+ +

WEB-INF/web.xml

The web.xml should have

-
    -
  • One or more security-constraint blocks designating the protected pages or URLs
  • -
  • A login-config section configuring the login style for the application
  • -
  • One or more security-role blocks listing the security roles used by the - application
  • -
+ +
 <web-app xmlns="http://java.sun.com/xml/ns/j2ee"
@@ -69,15 +68,7 @@
 
 

WEB-INF/geronimo-web.xml

-

To configure the security realm and the members of each role, the web application -needs to have a geronimo-web.xml deployment plan. That may be packaged in the WAR -in the WEB-INF directory, or it may be provided separately on the command line to -the deploy tool.

- -

The geronimo-web.xml plan should have a security-realm-name -element indicating which realm will be used to authenticate logins to the web application. -It also needs to have a security element listing the users or groups who -should be members of each security-role listed in web.xml.

+
 <?xml version="1.0" encoding="UTF-8"?>
@@ -111,43 +102,16 @@
     </security>
 </web-app>
 
+ + + + +

+ -

This example indicated that ${realm.name} will be used to handle all logins to -the web application. Then it maps the admin role to a combination of -one user (root) and one group (administrators), using a combination -of the principal classes and principal names. (Note that if ${realm.name} uses a -custom login module, the principal classes may be different, but the ones listed -above are used for users and groups by all the standard Geronimo login modules.)

- -

It's also possible to configure separate login modules to use separate login -domain names, and then use the login domain names in the role mapping (so a user -"root" from login domain "Foo" is different from a user "root" from login domain -"Bar"), but this is only important if you have multiple login modules assigning -principals to the users.

- -

Finally, if the security section is declared in an EAR -application.xml deployment descriptor, there's no need to repeat it -in any of the modules inside the EAR -- they'll all share the same role mapping -information.

- -

Application Code

- -

No special application code is required to work with security roles.

- -

If an application calls HttpServletRequest.getUserPrincipal(), -Geronimo will return a principal where the principal class implements -GeronimoCallerPrincipal -- normally a username (since GeronimoUserPrincipal -implements GeronimoCallerPrincipal). If you're using a custom login -module and getting the wrong results for getUserPrincipal, try -making your user principal class implement GeronimoCallerPrincipal.

- -

If an application calls HttpServletRequest.isUserInRole(role), -Geronimo will return true or false depending on whether any of the principals -assigned to that user by the realm's login modules were listed in the role -mapping above.


- ">Return to list

+ ">

Modified: geronimo/server/trunk/plugins/console/console-base-portlets/src/main/webapp/WEB-INF/view/repository/help.jsp URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/console/console-base-portlets/src/main/webapp/WEB-INF/view/repository/help.jsp?rev=609207&r1=609206&r2=609207&view=diff ============================================================================== --- geronimo/server/trunk/plugins/console/console-base-portlets/src/main/webapp/WEB-INF/view/repository/help.jsp (original) +++ geronimo/server/trunk/plugins/console/console-base-portlets/src/main/webapp/WEB-INF/view/repository/help.jsp Sat Jan 5 12:22:33 2008 @@ -14,20 +14,22 @@ See the License for the specific language governing permissions and limitations under the License. --%> -

This page displays the artifacts installed in the server's repository. The layout of the repository is the same as that used by Apache Maven making it possible to easily copy files over. The Geronimo Console provides a method for adding artifacts:


+<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%> + +


- + - +
BrowseUse the Browse button to select the artifact to be added.
InstallClick on the Install button to install the artifact.
-

To use an artifact in an application, add a dependency element into it's deployment plan. For example, to use Castor XML add the following XML to the plan: +

     <dependency>
         <uri>org/codehaus/castor/castor/1.0.5/castor-1.0.5.jar</uri>

Modified: geronimo/server/trunk/plugins/console/console-base-portlets/src/main/webapp/WEB-INF/view/repository/normal.jsp
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/console/console-base-portlets/src/main/webapp/WEB-INF/view/repository/normal.jsp?rev=609207&r1=609206&r2=609207&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/console/console-base-portlets/src/main/webapp/WEB-INF/view/repository/normal.jsp (original)
+++ geronimo/server/trunk/plugins/console/console-base-portlets/src/main/webapp/WEB-INF/view/repository/normal.jsp Sat Jan  5 12:22:33 2008
@@ -19,6 +19,8 @@
 
 <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
 <%@ taglib uri="http://java.sun.com/portlet" prefix="portlet"%>
+<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
+
 
 
 
@@ -95,31 +97,31 @@
   
"> - + - + - + - + - + - + - +
Add Archive to Repository
File    
Group::
Artifact::
Version::
Type::
 
@@ -127,8 +129,8 @@ -Current Repository Entries -

Click on an entry to view usage.

+ +

  • ">
  • Modified: geronimo/server/trunk/plugins/console/console-base-portlets/src/main/webapp/WEB-INF/view/repository/usage.jsp URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/console/console-base-portlets/src/main/webapp/WEB-INF/view/repository/usage.jsp?rev=609207&r1=609206&r2=609207&view=diff ============================================================================== --- geronimo/server/trunk/plugins/console/console-base-portlets/src/main/webapp/WEB-INF/view/repository/usage.jsp (original) +++ geronimo/server/trunk/plugins/console/console-base-portlets/src/main/webapp/WEB-INF/view/repository/usage.jsp Sat Jan 5 12:22:33 2008 @@ -17,10 +17,19 @@ <%-- $Rev$ $Date$ --%> -Usage for ${res} +<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%> + -

    To use ${res} in an application or a module, add a dependency element under dependencies in environment element in -it's deployment plan as shown below: + + + + + +

    + + + +

         <environment>
             ...
    @@ -36,4 +45,4 @@
         </environment>
     
    -

    Back +

    Modified: geronimo/server/trunk/plugins/console/console-base-portlets/src/main/webapp/WEB-INF/view/securityrealmmanager/derby/groups/addmaximized.jsp URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/console/console-base-portlets/src/main/webapp/WEB-INF/view/securityrealmmanager/derby/groups/addmaximized.jsp?rev=609207&r1=609206&r2=609207&view=diff ============================================================================== --- geronimo/server/trunk/plugins/console/console-base-portlets/src/main/webapp/WEB-INF/view/securityrealmmanager/derby/groups/addmaximized.jsp (original) +++ geronimo/server/trunk/plugins/console/console-base-portlets/src/main/webapp/WEB-INF/view/securityrealmmanager/derby/groups/addmaximized.jsp Sat Jan 5 12:22:33 2008 @@ -17,6 +17,8 @@ <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %> <%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %> <%@ taglib uri="http://java.sun.com/portlet" prefix="portlet"%> +<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%> + - @@ -51,16 +55,16 @@ Modified: geronimo/server/trunk/plugins/console/console-base-portlets/src/main/webapp/WEB-INF/view/webmanager/help.jsp URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/console/console-base-portlets/src/main/webapp/WEB-INF/view/webmanager/help.jsp?rev=609207&r1=609206&r2=609207&view=diff ============================================================================== --- geronimo/server/trunk/plugins/console/console-base-portlets/src/main/webapp/WEB-INF/view/webmanager/help.jsp (original) +++ geronimo/server/trunk/plugins/console/console-base-portlets/src/main/webapp/WEB-INF/view/webmanager/help.jsp Sat Jan 5 12:22:33 2008 @@ -14,19 +14,23 @@ See the License for the specific language governing permissions and limitations under the License. --%> -

    Geronimo Console will collect statistics on the number of requests received by Geronimo Console and on the number of connections made to the Geronimo server. Click on the enable link to monitor the performance of the Geronimo server.

    +<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%> + +

    +

    - Filter Criteria: + : - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + @@ -187,7 +191,7 @@
    Container::
    Search Web Container:: Log:
    Search Web Log::
    Date::
    From (MM/DD/YYYY):: To (MM/DD/YYYY)::
    Ignore Dates:: checked/>
    Identity::
    Remote Address:: Authenticated User::
    Request::
    Request Method:: Requested URI::
    Result Size::
    Start Result:: Max Results::
    - + @@ -199,7 +203,7 @@
    Found ${fn:length(logs)} matches in logfile (${logLength} lines searched)..
    - No log entries found. +
    - - + + - - + + - - + +
    refreshUpdate the display with the latest statistics. +
    disableTurn off statistics gathering and return the user to the main page.
    resetReset all counts, totals, averages, etc., to 0 and start gathering statistics again. +