cvs commit: incubator-geronimo/modules/core/src/java/org/apache/geronimo/security/bridge - New directory

2004-01-11 Thread djencks
djencks 2004/01/11 00:06:04

  incubator-geronimo/modules/core/src/java/org/apache/geronimo/security/bridge 
- New directory


cvs commit: incubator-geronimo/modules/core/src/java/org/apache/geronimo/connector/outbound/security - New directory

2004-01-11 Thread djencks
djencks 2004/01/11 00:06:04

  
incubator-geronimo/modules/core/src/java/org/apache/geronimo/connector/outbound/security
 - New directory


cvs commit: incubator-geronimo/modules/core/src/test/org/apache/geronimo/security/bridge - New directory

2004-01-11 Thread djencks
djencks 2004/01/11 00:06:57

  incubator-geronimo/modules/core/src/test/org/apache/geronimo/security/bridge 
- New directory


cvs commit: incubator-geronimo/modules/core/src/java/org/apache/geronimo/security/providers SQLSecurityRealm.java

2004-01-11 Thread djencks
djencks 2004/01/11 00:22:59

  Modified:modules/core/src/java/org/apache/geronimo/security/providers
SQLSecurityRealm.java
  Log:
  Make the jdbc use a little safer
  
  Revision  ChangesPath
  1.5   +54 -26
incubator-geronimo/modules/core/src/java/org/apache/geronimo/security/providers/SQLSecurityRealm.java
  
  Index: SQLSecurityRealm.java
  ===
  RCS file: 
/home/cvs/incubator-geronimo/modules/core/src/java/org/apache/geronimo/security/providers/SQLSecurityRealm.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- SQLSecurityRealm.java 5 Jan 2004 18:56:34 -   1.4
  +++ SQLSecurityRealm.java 11 Jan 2004 08:22:59 -  1.5
  @@ -65,6 +65,7 @@
   import java.util.HashSet;
   import java.util.Iterator;
   import java.util.Set;
  +import java.util.Map;
   
   import javax.security.auth.login.AppConfigurationEntry;
   
  @@ -87,8 +88,8 @@
   private String password = ;
   private String userSelect = SELECT UserName, Password FROM Users;
   private String groupSelect = SELECT GroupName, UserName FROM Groups;
  -HashMap users = new HashMap();
  -HashMap groups = new HashMap();
  +final Map users = new HashMap();
  +final Map groups = new HashMap();
   
   final static String REALM_INSTANCE = 
org.apache.geronimo.security.providers.SQLSecurityRealm;
   
  @@ -116,7 +117,6 @@
   
   public void doStop() {
   running = false;
  -connectionURL = null;
   
   users.clear();
   groups.clear();
  @@ -229,35 +229,63 @@
   }
   
   public void refresh() throws GeronimoSecurityException {
  +users.clear();
  +groups.clear();
  +Map users = new HashMap();
  +Map groups = new HashMap();
   try {
   Connection conn = DriverManager.getConnection(connectionURL, 
user, password);
   
  -PreparedStatement statement = conn.prepareStatement(userSelect);
  -ResultSet result = statement.executeQuery();
  -
  -while (result.next()) {
  -String userName = result.getString(1);
  -String userPassword = result.getString(2);
  -
  -users.put(userName, userPassword);
  -}
  -
  -statement = conn.prepareStatement(groupSelect);
  -result = statement.executeQuery();
  +try {
  +PreparedStatement statement = 
conn.prepareStatement(userSelect);
  +try {
  +ResultSet result = statement.executeQuery();
  +
  +try {
  +while (result.next()) {
  +String userName = result.getString(1);
  +String userPassword = result.getString(2);
  +
  +users.put(userName, userPassword);
  +}
  +} finally {
  +result.close();
  +}
  +} finally {
  +statement.close();
  +}
   
  -while (result.next()) {
  -String groupName = result.getString(1);
  -String userName = result.getString(2);
  -
  -Set userset = (Set) groups.get(groupName);
  -if (userset == null) {
  -userset = new HashSet();
  -groups.put(groupName, userset);
  +statement = conn.prepareStatement(groupSelect);
  +try {
  +ResultSet result = statement.executeQuery();
  +
  +try {
  +while (result.next()) {
  +String groupName = result.getString(1);
  +String userName = result.getString(2);
  +
  +Set userset = (Set) groups.get(groupName);
  +if (userset == null) {
  +userset = new HashSet();
  +groups.put(groupName, userset);
  +}
  +userset.add(userName);
  +}
  +} finally {
  +result.close();
  +}
  +} finally {
  +statement.close();
   }
  -userset.add(userName);
  +} finally {
  +conn.close();
   }
   
  -conn.close();
  +//copy results if no exception
  +//calling refresh is not thread safe wrt authorization calls.
  +this.users.putAll(users);
  +this.groups.putAll(groups);
  +
   } catch (SQLException sqle) {
   throw new GeronimoSecurityException(sqle);

cvs commit: incubator-geronimo/modules/core/src/test/org/apache/geronimo/security/bridge AbstractUserPasswordBridgeTest.java CallerIdentityUserPasswordBridgeTest.java ConfiguredIdentityUserPasswordBridgeTest.java MappingUserPasswordBridgeTest.java TestLoginModule.java TestPrincipal.java TestRealm.java

2004-01-11 Thread djencks
djencks 2004/01/11 00:27:03

  Added:   modules/core/src/java/org/apache/geronimo/security/bridge
AbstractPrincipalMappingUserPasswordRealmBridge.java
AbstractRealmBridge.java
CallerIdentityUserPasswordRealmBridge.java
ConfiguredIdentityUserPasswordRealmBridge.java

PropertiesFilePrincipalMappingUserPasswordRealmBridge.java
RealmBridge.java
   modules/core/src/java/org/apache/geronimo/security/providers
GeronimoPasswordCredential.java
GeronimoPasswordCredentialLoginModule.java
   modules/core/src/test/org/apache/geronimo/security/bridge
AbstractUserPasswordBridgeTest.java
CallerIdentityUserPasswordBridgeTest.java
ConfiguredIdentityUserPasswordBridgeTest.java
MappingUserPasswordBridgeTest.java
TestLoginModule.java TestPrincipal.java
TestRealm.java
  Log:
  Implement realm bridge concept, with some examples and tests.
  
  Revision  ChangesPath
  1.1  
incubator-geronimo/modules/core/src/java/org/apache/geronimo/security/bridge/AbstractPrincipalMappingUserPasswordRealmBridge.java
  
  Index: AbstractPrincipalMappingUserPasswordRealmBridge.java
  ===
  /* 
   * The Apache Software License, Version 1.1
   *
   * Copyright (c) 2003 The Apache Software Foundation.  All rights
   * reserved.
   *
   * Redistribution and use in source and binary forms, with or without
   * modification, are permitted provided that the following conditions
   * are met:
   *
   * 1. Redistributions of source code must retain the above copyright
   *notice, this list of conditions and the following disclaimer.
   *
   * 2. Redistributions in binary form must reproduce the above copyright
   *notice, this list of conditions and the following disclaimer in
   *the documentation and/or other materials provided with the
   *distribution.
   *
   * 3. The end-user documentation included with the redistribution,
   *if any, must include the following acknowledgment:
   *   This product includes software developed by the
   *Apache Software Foundation (http://www.apache.org/).
   *Alternately, this acknowledgment may appear in the software itself,
   *if and wherever such third-party acknowledgments normally appear.
   *
   * 4. The names Apache and Apache Software Foundation and
   *Apache Geronimo must not be used to endorse or promote products
   *derived from this software without prior written permission. For
   *written permission, please contact [EMAIL PROTECTED]
   *
   * 5. Products derived from this software may not be called Apache,
   *Apache Geronimo, nor may Apache appear in their name, without
   *prior written permission of the Apache Software Foundation.
   *
   * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
   * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
   * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
   * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
   * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
   * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
   * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
   * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
   * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
   * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
   * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
   * SUCH DAMAGE.
   * 
   *
   * This software consists of voluntary contributions made by many
   * individuals on behalf of the Apache Software Foundation.  For more
   * information on the Apache Software Foundation, please see
   * http://www.apache.org/.
   *
   * 
   */
  
  package org.apache.geronimo.security.bridge;
  
  import java.io.IOException;
  import java.security.Principal;
  import java.util.Map;
  import java.util.Set;
  import java.util.HashMap;
  
  import javax.security.auth.Subject;
  import javax.security.auth.callback.Callback;
  import javax.security.auth.callback.CallbackHandler;
  import javax.security.auth.callback.NameCallback;
  import javax.security.auth.callback.PasswordCallback;
  import javax.security.auth.callback.UnsupportedCallbackException;
  
  import org.apache.geronimo.kernel.service.GeronimoMBeanInfo;
  import 

cvs commit: incubator-geronimo/modules/core/src/test/org/apache/geronimo/connector/outbound/connectiontracking ConnectionTrackingCoordinatorTest.java

2004-01-11 Thread djencks
djencks 2004/01/11 00:28:15

  Modified:modules/core/src/java/org/apache/geronimo/connector/outbound
ConnectionManagerDeployment.java
ConnectionTrackingInterceptor.java
SubjectInterceptor.java
   
modules/core/src/java/org/apache/geronimo/deployment/model/geronimo/connector
GeronimoConnectionDefinition.java
   modules/core/src/java/org/apache/geronimo/xml/deployment
GeronimoConnectorLoader.java
   modules/core/src/test/org/apache/geronimo/connector/outbound
ConnectionManagerTest.java
ConnectionManagerTestUtils.java
   
modules/core/src/test/org/apache/geronimo/connector/outbound/connectiontracking
ConnectionTrackingCoordinatorTest.java
  Added:   
modules/core/src/java/org/apache/geronimo/connector/outbound/security
PasswordCredentialLoginModule.java
PasswordCredentialRealm.java ResourcePrincipal.java
  Removed: modules/core/src/java/org/apache/geronimo/connector/outbound
SecurityDomain.java SecurityDomainImpl.java
  Log:
  Convert from non-implemented SecurityDomain concept to RealmBridge concept
  
  Revision  ChangesPath
  1.8   +18 -15
incubator-geronimo/modules/core/src/java/org/apache/geronimo/connector/outbound/ConnectionManagerDeployment.java
  
  Index: ConnectionManagerDeployment.java
  ===
  RCS file: 
/home/cvs/incubator-geronimo/modules/core/src/java/org/apache/geronimo/connector/outbound/ConnectionManagerDeployment.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- ConnectionManagerDeployment.java  28 Dec 2003 19:31:16 -  1.7
  +++ ConnectionManagerDeployment.java  11 Jan 2004 08:28:15 -  1.8
  @@ -70,6 +70,7 @@
   import org.apache.geronimo.kernel.service.GeronimoMBeanTarget;
   import org.apache.geronimo.kernel.service.GeronimoOperationInfo;
   import org.apache.geronimo.kernel.service.GeronimoParameterInfo;
  +import org.apache.geronimo.security.bridge.RealmBridge;
   
   /**
* ConnectionManagerDeployment is an mbean that sets up a 
ProxyConnectionManager
  @@ -104,7 +105,7 @@
*/
   private String jndiName;
   //dependencies
  -private SecurityDomain securityDomain;
  +private RealmBridge realmBridge;
   private ConnectionTracker connectionTracker;
   
   //GeronimoMBeanTarget support.
  @@ -122,7 +123,7 @@
boolean useTransactions,
int maxSize,
int blockingTimeout,
  - SecurityDomain securityDomain,
  + RealmBridge realmBridge,
String jndiName,
ConnectionTracker connectionTracker) {
   this.useConnectionRequestInfo = useConnectionRequestInfo;
  @@ -132,7 +133,7 @@
   this.useTransactions = useTransactions;
   this.maxSize = maxSize;
   this.blockingTimeout = blockingTimeout;
  -this.securityDomain = securityDomain;
  +this.realmBridge = realmBridge;
   this.jndiName = jndiName;
   this.connectionTracker = connectionTracker;
   setUpConnectionManager(null, null);
  @@ -166,14 +167,14 @@
* ConnectionHandleInterceptor
* TransactionCachingInterceptor (useTransactions  
useTransactionCaching)
* TransactionEnlistingInterceptor (useTransactions)
  - * SubjectInterceptor (securityDomain != null)
  + * SubjectInterceptor (realmBridge != null)
* SinglePoolConnectionInterceptor or MultiPoolConnectionInterceptor
* LocalXAResourceInsertionInterceptor or XAResourceInsertionInterceptor 
(useTransactions (localTransactions))
* MCFConnectionInterceptor
*/
   private void setUpConnectionManager(String agentID, ObjectName 
connectionManagerName) {
   //check for consistency between attributes
  -if (securityDomain == null) {
  +if (realmBridge == null) {
   assert useSubject == false: To use Subject in pooling, you need 
a SecurityDomain;
   }
   
  @@ -201,8 +202,8 @@
   maxSize,
   blockingTimeout);
   }
  -if (securityDomain != null) {
  -stack = new SubjectInterceptor(stack, securityDomain);
  +if (realmBridge != null) {
  +stack = new SubjectInterceptor(stack, realmBridge);
   }
   if (useTransactions) {
   stack = new TransactionEnlistingInterceptor(stack);
  @@ -216,7 +217,7 @@
   stack,
   jndiName,
   connectionTracker,
  -securityDomain);
  +realmBridge);
   }
   
   cm = new ProxyConnectionManager(agentID, connectionManagerName, 
stack);
  @@ -231,7 +232,7 @@

[Apache Geronimo Wiki] Updated: LogoContest

2004-01-11 Thread incubator-geronimo-cvs
   Date: 2004-01-11T06:17:37
   Editor: 213.39.227.95 
   Wiki: Apache Geronimo Wiki
   Page: LogoContest
   URL: http://wiki.apache.org/geronimo/LogoContest

   no comment

Change Log:

--
@@ -116,3 +116,4 @@
 || Pravin Pillai || Entry #4 || n/a ||
 || Nausher Ahmed Cholavaram || Entry #4 || n/a ||
 || Cedric Veilleux || Entry #10 || n/a ||
+|| Anderson Graepp || Entry #2 || n/a ||


[Apache Geronimo Wiki] Updated: LogoContest

2004-01-11 Thread incubator-geronimo-cvs
   Date: 2004-01-11T06:19:09
   Editor: 213.39.227.95 
   Wiki: Apache Geronimo Wiki
   Page: LogoContest
   URL: http://wiki.apache.org/geronimo/LogoContest

   no comment

Change Log:

--
@@ -116,4 +116,4 @@
 || Pravin Pillai || Entry #4 || n/a ||
 || Nausher Ahmed Cholavaram || Entry #4 || n/a ||
 || Cedric Veilleux || Entry #10 || n/a ||
-|| Anderson Graepp || Entry #2 || n/a ||
+|| Anderson Graepp || Entry #2 || Variant #10 ||


[Apache Geronimo Wiki] Updated: LogoContest

2004-01-11 Thread incubator-geronimo-cvs
   Date: 2004-01-11T07:23:12
   Editor: 166.84.147.106 
   Wiki: Apache Geronimo Wiki
   Page: LogoContest
   URL: http://wiki.apache.org/geronimo/LogoContest

   no comment

Change Log:

--
@@ -1,22 +1,67 @@
-= Submitted Entries =
+= Purpose =
+The only task of the logo is to be a recognizable visual avatar for the 
project. It does not need to convey any message such as functionality, speed, 
reliability or anything to the contrary.
 
-|| '''Entry''' ||
-|| [wiki:/01 Entry #1] ||
-|| [wiki:/02 Entry #2] ||
-|| [http://elegoff.free.fr/geronimo_logos.html Entry #3] ||
-|| [http://www.opentools.org/geronimo Entry #4] ||
-|| [http://www.geocities.com/standard_template/glogo/index.html Entry #5] ||
-|| [wiki:/06 Entry #6] ||
-|| [wiki:/07 Entry #7] ||
-|| [http://www.eradigital.com.br/~adriano/download Entry #8] ||
-|| [http://w1.455.telia.com/~u45524234/geronimo/Geronimo_logos.html Entry #9] 
||
-|| [wiki:/10 Entry #10] ||
 
-= Rules =
+= Copy =
+The logo must use the copy (text) Apache Geronimo or Geronimo.  The 
smaller versions of the logo may use less or no text.
+
+No additional copy, taglines, slogans will be accepted.  Specifically J2EE 
must not be included in the submitted logo, but an option to add it may 
eventually be desirable.
+
+
+= Imagery =
+The Geronimo PPMC has undertaken to respect the Geronimo name that we have 
adopted for the project.  As such, we wish to avoid any imagery that is 
stereotypical or caricatural in nature or that would impart a new identity to 
the Geronimo name.
+
+The Apache feather may be included in some or all of the logo sizes, but is 
not a requirement.
+
+
+= Logo Size = 
+The logo submitted should be suitable to be rendered in several sizes.
+
+Submissions must include:
+
+450x50 banner   image
+100x30 powered  image
+large scale original with any separations or layers available
+
+Optionally submissions may include
+
+32x32  icon
+16x16  icon
+An ASCII art rendering of the logo.
+
+
+= Colours =
+The logo should be able to be rendered in a web optimised colour palette. A 
monochrome and/or blackwhite versions for printing are also desirable.
+
 
-The logo with the most votes wins.  In the event that the top voted logos 
receive the same number of votes, a run-off contest will take place.
+= License =
+The logo, any fonts or images used in it's production and the storage format 
must be usable under a license usable by the ASF.  The copyright of the logo 
must be assigned to the ASF.
 
-'''The deadline for voting is January 1st, 2004.'''
+
+= The Process =
+The Geronimo PPMC is responsible for the final selection of the logo, but will 
of course take into account the opinions and votes from the community.  We
+invite the submission or update of logos against this design brief.   Following
+that there will be a period of discussion about the submission, ending with 
the PPMC giving a short review of each submission.  Designers will then be 
invited to do a final update before a community vote takes place, followed by a 
PPMC vote.
+
+
+= Submissions =
+Logos should be submitted by editing the wiki page at
+
+http://wiki.apache.org/geronimo/LogoContest
+
+An announcement message should also be posted to [EMAIL PROTECTED]
+
+The competition closing will be announced with 1 weeks notice once community 
discussion and submissions have reached steady state.
+
+
+= Design Brief Revisions =
+The brief itself is open for review by the community, so that if there is any 
feedback or suggestions for improving this brief, please post them to the 
[EMAIL PROTECTED] list.
+
+
+= Submitted Entries =
+
+|| '''Entry''' ||
+|| [wiki:/01 Sample Entry #1] ||
 
 = Vote Here =
 
@@ -26,94 +71,7 @@
 
 Some entries have multiple submissions.  If this is the case for the entry 
that you wish to vote on, use the '''Variant''' column to specify which logo 
you are voting for.
 
-'''DO NOT USE THIS PAGE TO DEBATE THE VIRTUES OR DEFICIENCIES OF THE SUBMITTED 
LOGOS'''
+|| '''Name''' || '''Vote''' || '''Variant''' ''(Use if entry has more than one 
submission)'' ||
+|| Sample Name|| Sample Entry #1 || N/A ||
 
 
-|| '''Name''' || '''Vote''' || '''Variant''' ''(Use if entry has more than one 
submission)'' ||
-|| Alan Cabrera || Entry #1 || N/A ||
-|| Philip Mark Donaghy || Entry #4 || N/A ||
-|| Eric Le Goff || Entry #3 || Variant #1 ||
-|| Ed Letifov || Entry #4 || N/A ||
-|| Mike || Entry #2 || N/A ||
-|| Vikram Goyal || Entry #1 || N/A ||
-|| Sudharsan G'rajan || Entry #4 || N/A ||
-|| Martin Dengler || Entry #4 || N/A ||
-|| Subhash Chandran || Entry #8 || Variant #1 ||
-|| Kristian Köhler || Entry #4 || N/A ||
-|| pwmamta sahu || Entry #2 || N/A ||
-|| Greg Wilkins || Entry #3 || Variant #1 ||
-|| Marek Lange || Entry #6 || N/A ||
-|| Ronald Tetsuo Miura || Entry #4 || N/A ||
-|| Tobias Kieninger || Entry #4 || N/A ||
-|| Siddharth Paralikar || Entry #2 || N/A ||
-|| Neal Sanche || 

[Apache Geronimo Wiki] Updated: FrontPage

2004-01-11 Thread incubator-geronimo-cvs
   Date: 2004-01-11T07:26:48
   Editor: 166.84.147.106 
   Wiki: Apache Geronimo Wiki
   Page: FrontPage
   URL: http://wiki.apache.org/geronimo/FrontPage

   no comment

Change Log:

--
@@ -13,6 +13,10 @@
 
 Apache Geronimo has been launched within the [http://incubator.apache.org 
Apache Incubator].
 
+= Logo contest =
+
+The logo contest has been restarted.  Please visit LogoContest for more 
infromation.
+
 = Mailing Lists =
 
 If you would like to find out more or become involved, please send subscribe 
to the project's mailing list.  The project's mailing list is the primary 
''roster'' and means of communication.


[Apache Geronimo Wiki] Updated: IntroduceYourself

2004-01-11 Thread incubator-geronimo-cvs
   Date: 2004-01-11T07:37:01
   Editor: 62.103.180.198 
   Wiki: Apache Geronimo Wiki
   Page: IntroduceYourself
   URL: http://wiki.apache.org/geronimo/IntroduceYourself

   no comment

Change Log:

--
@@ -119,6 +119,7 @@
 || Brendan W. McAdams || Livingston || New Jersey || USA || Sr. J2EE / 
mod_perl Developer at http://www.themunicenter.com TheMuniCenter  ||
 || N.R.Suresh || Hyderabad || Andhra Pradesh || INDIA || J2EE Developer 
([EMAIL PROTECTED]) ||
 || Rory Winston  || London  UK || Java developer architect ||
+|| Roxana Quiroga Sollinger || Athens  Greece || Java / J2EE Developer ||
 
 
 CategoryCategory


[Apache Geronimo Wiki] Updated: LogoContest/01

2004-01-11 Thread incubator-geronimo-cvs
   Date: 2004-01-11T13:16:59
   Editor: 166.84.147.106 
   Wiki: Apache Geronimo Wiki
   Page: LogoContest/01
   URL: http://wiki.apache.org/geronimo/LogoContest/01

   no comment

Change Log:

--
@@ -1,2 +1,2 @@
-main: http://www.toolazydogs.com/images/geronimo_logo.gif
-powered: http://www.toolazydogs.com/images/geronimo_powered.gif
+main: http://www.toolazydogs.com/images/main_sample.gif
+powered: http://www.toolazydogs.com/images/powered_sample.gif


[Apache Geronimo Wiki] Updated: LogoContest/01

2004-01-11 Thread incubator-geronimo-cvs
   Date: 2004-01-11T13:22:07
   Editor: 166.84.147.106 
   Wiki: Apache Geronimo Wiki
   Page: LogoContest/01
   URL: http://wiki.apache.org/geronimo/LogoContest/01

   no comment

Change Log:

--
@@ -1,2 +1,3 @@
+= Make your own page and put your logins in it =
 main: http://www.toolazydogs.com/images/main_sample.gif
 powered: http://www.toolazydogs.com/images/powered_sample.gif