geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ammul...@apache.org
Subject svn commit: r356402 - in /geronimo/trunk: configs/j2ee-system/ modules/system/ modules/system/src/java/org/apache/geronimo/system/configuration/ modules/util/src/java/org/apache/geronimo/util/
Date Mon, 12 Dec 2005 22:28:41 GMT
Author: ammulder
Date: Mon Dec 12 14:28:30 2005
New Revision: 356402

URL: http://svn.apache.org/viewcvs?rev=356402&view=rev
Log:
Port password encryption change from branch to trunk

Added:
    geronimo/trunk/modules/util/src/java/org/apache/geronimo/util/EncryptionManager.java
      - copied unchanged from r356395, geronimo/branches/1.0/modules/util/src/java/org/apache/geronimo/util/EncryptionManager.java
Modified:
    geronimo/trunk/configs/j2ee-system/project.properties
    geronimo/trunk/modules/system/project.xml
    geronimo/trunk/modules/system/src/java/org/apache/geronimo/system/configuration/GBeanOverride.java

Modified: geronimo/trunk/configs/j2ee-system/project.properties
URL: http://svn.apache.org/viewcvs/geronimo/trunk/configs/j2ee-system/project.properties?rev=356402&r1=356401&r2=356402&view=diff
==============================================================================
--- geronimo/trunk/configs/j2ee-system/project.properties (original)
+++ geronimo/trunk/configs/j2ee-system/project.properties Mon Dec 12 14:28:30 2005
@@ -29,6 +29,7 @@
     ../lib/geronimo-common-${geronimo_version}.jar \
     ../lib/geronimo-kernel-${geronimo_version}.jar \
     ../lib/geronimo-system-${geronimo_version}.jar \
+    ../lib/geronimo-util-${geronimo_version}.jar \
     ../lib/cglib-nodep-${cglib_version}.jar \
     ../lib/commons-cli-${commons_cli_version}.jar \
     ../lib/commons-logging-${commons_logging_version}.jar \

Modified: geronimo/trunk/modules/system/project.xml
URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/system/project.xml?rev=356402&r1=356401&r2=356402&view=diff
==============================================================================
--- geronimo/trunk/modules/system/project.xml (original)
+++ geronimo/trunk/modules/system/project.xml Mon Dec 12 14:28:30 2005
@@ -49,6 +49,12 @@
 
         <dependency>
             <groupId>geronimo</groupId>
+            <artifactId>geronimo-util</artifactId>
+            <version>${pom.currentVersion}</version>
+        </dependency>
+
+        <dependency>
+            <groupId>geronimo</groupId>
             <artifactId>geronimo-kernel</artifactId>
             <version>${pom.currentVersion}</version>
         </dependency>

Modified: geronimo/trunk/modules/system/src/java/org/apache/geronimo/system/configuration/GBeanOverride.java
URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/system/src/java/org/apache/geronimo/system/configuration/GBeanOverride.java?rev=356402&r1=356401&r2=356402&view=diff
==============================================================================
--- geronimo/trunk/modules/system/src/java/org/apache/geronimo/system/configuration/GBeanOverride.java
(original)
+++ geronimo/trunk/modules/system/src/java/org/apache/geronimo/system/configuration/GBeanOverride.java
Mon Dec 12 14:28:30 2005
@@ -20,6 +20,7 @@
 import org.apache.geronimo.gbean.GAttributeInfo;
 import org.apache.geronimo.gbean.GBeanData;
 import org.apache.geronimo.gbean.GBeanInfo;
+import org.apache.geronimo.util.EncryptionManager;
 import org.w3c.dom.Element;
 import org.w3c.dom.Node;
 import org.w3c.dom.NodeList;
@@ -109,7 +110,7 @@
             Element attribute = (Element) attributes.item(a);
 
             String attributeName = attribute.getAttribute("name");
-            String attributeValue = getContentsAsText(attribute);
+            String attributeValue = (String)EncryptionManager.decrypt(getContentsAsText(attribute));
             setAttribute(attributeName, attributeValue);
         }
 
@@ -222,6 +223,9 @@
             Map.Entry entry = (Map.Entry) iterator.next();
             String name = (String) entry.getKey();
             String value = (String) entry.getValue();
+            if(name.toLowerCase().indexOf("password") > -1) {
+                value = EncryptionManager.encrypt(value);
+            }
             out.println("      <attribute name=\"" + name + "\">" +  value + "</attribute>");
         }
 



Mime
View raw message