You are viewing a plain text version of this content. The canonical link for it is here.
Posted to scm@geronimo.apache.org by ha...@apache.org on 2011/04/06 09:02:42 UTC

svn commit: r1089328 - in /geronimo/devtools/eclipse-plugin/trunk/plugins: org.apache.geronimo.runtime.v11/ org.apache.geronimo.runtime.v11/META-INF/ org.apache.geronimo.runtime.v20/ org.apache.geronimo.runtime.v20/META-INF/ org.apache.geronimo.runtime...

Author: hanhongfang
Date: Wed Apr  6 07:02:42 2011
New Revision: 1089328

URL: http://svn.apache.org/viewvc?rev=1089328&view=rev
Log:
GERONIMODEVTOOLS-732 Server admin password is written in plain text

Modified:
    geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.runtime.v11/.classpath
    geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.runtime.v11/META-INF/MANIFEST.MF
    geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.runtime.v11/pom.xml
    geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.runtime.v20/.classpath
    geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.runtime.v20/META-INF/MANIFEST.MF
    geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.runtime.v20/pom.xml
    geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.runtime.v21/META-INF/MANIFEST.MF
    geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.runtime.v22/META-INF/MANIFEST.MF
    geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.core/src/main/java/org/apache/geronimo/st/core/GeronimoServerDelegate.java
    geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.core/src/main/java/org/apache/geronimo/st/v11/core/GeronimoServer.java
    geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v20.core/src/main/java/org/apache/geronimo/st/v20/core/GeronimoServer.java
    geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.core/src/main/java/org/apache/geronimo/st/v21/core/GeronimoServer.java
    geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v22.core/src/main/java/org/apache/geronimo/st/v22/core/GeronimoServer.java
    geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.core/src/main/java/org/apache/geronimo/st/v30/core/GeronimoServerDelegate.java

Modified: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.runtime.v11/.classpath
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.runtime.v11/.classpath?rev=1089328&r1=1089327&r2=1089328&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.runtime.v11/.classpath (original)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.runtime.v11/.classpath Wed Apr  6 07:02:42 2011
@@ -1,18 +1,19 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
-	<classpathentry exported="true" kind="lib" path="lib/geronimo-common-1.1.1.jar"/>
-	<classpathentry exported="true" kind="lib" path="lib/geronimo-connector-builder-1.1.1.jar"/>
-	<classpathentry exported="true" kind="lib" path="lib/geronimo-deploy-jsr88-1.1.1.jar"/>
-	<classpathentry exported="true" kind="lib" path="lib/geronimo-deployment-1.1.1.jar"/>
-	<classpathentry exported="true" kind="lib" path="lib/geronimo-j2ee-builder-1.1.1.jar"/>
-	<classpathentry exported="true" kind="lib" path="lib/geronimo-j2ee-schema-1.1.1.jar"/>
-	<classpathentry exported="true" kind="lib" path="lib/geronimo-kernel-1.1.1.jar"/>
-	<classpathentry exported="true" kind="lib" path="lib/geronimo-naming-builder-1.1.1.jar"/>
-	<classpathentry exported="true" kind="lib" path="lib/geronimo-security-builder-1.1.1.jar"/>
-	<classpathentry exported="true" kind="lib" path="lib/geronimo-service-builder-1.1.1.jar"/>
-	<classpathentry exported="true" kind="lib" path="lib/geronimo-system-1.1.1.jar"/>
-	<classpathentry exported="true" kind="lib" path="lib/geronimo-util-1.1.1.jar"/>
-	<classpathentry exported="true" kind="lib" path="lib/geronimo-web-builder-1.1.1.jar"/>
-	<classpathentry exported="true" kind="lib" path="lib/openejb-builder-2.1.1.jar"/>
-	<classpathentry kind="output" path="bin"/>
-</classpath>
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+	<classpathentry exported="true" kind="lib" path="lib/geronimo-common-1.1.1.jar"/>
+	<classpathentry exported="true" kind="lib" path="lib/geronimo-connector-builder-1.1.1.jar"/>
+	<classpathentry exported="true" kind="lib" path="lib/geronimo-deploy-jsr88-1.1.1.jar"/>
+	<classpathentry exported="true" kind="lib" path="lib/geronimo-deployment-1.1.1.jar"/>
+	<classpathentry exported="true" kind="lib" path="lib/geronimo-j2ee-builder-1.1.1.jar"/>
+	<classpathentry exported="true" kind="lib" path="lib/geronimo-j2ee-schema-1.1.1.jar"/>
+	<classpathentry exported="true" kind="lib" path="lib/geronimo-kernel-1.1.1.jar"/>
+	<classpathentry exported="true" kind="lib" path="lib/geronimo-naming-builder-1.1.1.jar"/>
+	<classpathentry exported="true" kind="lib" path="lib/geronimo-security-builder-1.1.1.jar"/>
+	<classpathentry exported="true" kind="lib" path="lib/geronimo-service-builder-1.1.1.jar"/>
+	<classpathentry exported="true" kind="lib" path="lib/geronimo-system-1.1.1.jar"/>
+	<classpathentry exported="true" kind="lib" path="lib/geronimo-util-1.1.1.jar"/>
+	<classpathentry exported="true" kind="lib" path="lib/geronimo-web-builder-1.1.1.jar"/>
+	<classpathentry exported="true" kind="lib" path="lib/openejb-builder-2.1.1.jar"/>
+	<classpathentry exported="true" kind="lib" path="lib/geronimo-crypto-2.2.1.jar"/>
+	<classpathentry kind="output" path="bin"/>
+</classpath>

Modified: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.runtime.v11/META-INF/MANIFEST.MF
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.runtime.v11/META-INF/MANIFEST.MF?rev=1089328&r1=1089327&r2=1089328&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.runtime.v11/META-INF/MANIFEST.MF (original)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.runtime.v11/META-INF/MANIFEST.MF Wed Apr  6 07:02:42 2011
@@ -17,13 +17,15 @@ Bundle-ClassPath: lib/openejb-builder-2.
  lib/geronimo-deployment-1.1.1.jar,
  lib/geronimo-deploy-jsr88-1.1.1.jar,
  lib/geronimo-connector-builder-1.1.1.jar,
- lib/geronimo-common-1.1.1.jar
+ lib/geronimo-common-1.1.1.jar,
+ lib/geronimo-crypto-2.2.1.jar
 Export-Package: 
  org.apache.geronimo.common,
  org.apache.geronimo.common.propertyeditor,
  org.apache.geronimo.connector.deployment,
  org.apache.geronimo.connector.deployment.dconfigbean,
  org.apache.geronimo.connector.deployment.jsr88,
+ org.apache.geronimo.crypto,
  org.apache.geronimo.deployment,
  org.apache.geronimo.deployment.javabean.xbeans,
  org.apache.geronimo.deployment.javabean.xbeans.impl,

Modified: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.runtime.v11/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.runtime.v11/pom.xml?rev=1089328&r1=1089327&r2=1089328&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.runtime.v11/pom.xml (original)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.runtime.v11/pom.xml Wed Apr  6 07:02:42 2011
@@ -181,6 +181,11 @@
                                     <artifactId>geronimo-deployment</artifactId>
                                     <version>${geronimoVersion}</version>
                                 </artifactItem>
+                                <artifactItem>
+                                    <groupId>org.apache.geronimo.framework</groupId>
+                                    <artifactId>geronimo-crypto</artifactId>
+                                    <version>2.2.1</version>
+                                </artifactItem>
                             </artifactItems>
                             <outputDirectory>lib</outputDirectory>
                         </configuration>
@@ -387,5 +392,10 @@
             <artifactId>org.apache.geronimo.runtime.common</artifactId>
             <version>${version}</version>
         </dependency>
+		<dependency>
+			<groupId>org.apache.geronimo.framework</groupId>
+			<artifactId>geronimo-crypto</artifactId>
+			<version>2.2.1</version>
+		</dependency>
     </dependencies>
 </project>

Modified: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.runtime.v20/.classpath
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.runtime.v20/.classpath?rev=1089328&r1=1089327&r2=1089328&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.runtime.v20/.classpath (original)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.runtime.v20/.classpath Wed Apr  6 07:02:42 2011
@@ -7,6 +7,7 @@
 	<classpathentry exported="true" kind="lib" path="lib/geronimo-j2ee-schema-2.0.2.jar"/>
 	<classpathentry exported="true" kind="lib" path="lib/geronimo-kernel-2.0.2.jar"/>
 	<classpathentry exported="true" kind="lib" path="lib/geronimo-system-2.0.2.jar"/>
-	<classpathentry exported="true" kind="lib" path="lib/geronimo-util-2.0.2.jar"/>
+	<classpathentry exported="true" kind="lib" path="lib/geronimo-util-2.0.2.jar"/>	
+	<classpathentry exported="true" kind="lib" path="lib/geronimo-crypto-2.2.1.jar"/>
 	<classpathentry kind="output" path="bin"/>
 </classpath>

Modified: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.runtime.v20/META-INF/MANIFEST.MF
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.runtime.v20/META-INF/MANIFEST.MF?rev=1089328&r1=1089327&r2=1089328&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.runtime.v20/META-INF/MANIFEST.MF (original)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.runtime.v20/META-INF/MANIFEST.MF Wed Apr  6 07:02:42 2011
@@ -11,10 +11,12 @@ Bundle-ClassPath: lib/geronimo-common-2.
  lib/geronimo-kernel-2.0.2.jar,
  lib/geronimo-system-2.0.2.jar,
  lib/geronimo-util-2.0.2.jar,
- lib/geronimo-deploy-config-2.0.2.jar
+ lib/geronimo-deploy-config-2.0.2.jar,
+ lib/geronimo-crypto-2.2.1.jar
 Export-Package: 
  org.apache.geronimo.common,
  org.apache.geronimo.common.propertyeditor,
+ org.apache.geronimo.crypto,
  org.apache.geronimo.deployment,
  org.apache.geronimo.deployment.plugin,
  org.apache.geronimo.deployment.plugin.factories,

Modified: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.runtime.v20/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.runtime.v20/pom.xml?rev=1089328&r1=1089327&r2=1089328&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.runtime.v20/pom.xml (original)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.runtime.v20/pom.xml Wed Apr  6 07:02:42 2011
@@ -152,6 +152,11 @@
                                     <artifactId>geronimo-deploy-config</artifactId>
                                     <version>${geronimoVersion}</version>
                                 </artifactItem>
+                                <artifactItem>
+                                    <groupId>org.apache.geronimo.framework</groupId>
+                                    <artifactId>geronimo-crypto</artifactId>
+                                    <version>2.2.1</version>
+                                </artifactItem>
                             </artifactItems>
                             <outputDirectory>lib</outputDirectory>
                         </configuration>

Modified: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.runtime.v21/META-INF/MANIFEST.MF
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.runtime.v21/META-INF/MANIFEST.MF?rev=1089328&r1=1089327&r2=1089328&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.runtime.v21/META-INF/MANIFEST.MF (original)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.runtime.v21/META-INF/MANIFEST.MF Wed Apr  6 07:02:42 2011
@@ -20,6 +20,7 @@ Bundle-ClassPath: lib/geronimo-common-2.
 Export-Package: 
  org.apache.geronimo.common,
  org.apache.geronimo.common.propertyeditor,
+ org.apache.geronimo.crypto,
  org.apache.geronimo.deployment,
  org.apache.geronimo.deployment.plugin,
  org.apache.geronimo.deployment.plugin.factories,

Modified: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.runtime.v22/META-INF/MANIFEST.MF
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.runtime.v22/META-INF/MANIFEST.MF?rev=1089328&r1=1089327&r2=1089328&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.runtime.v22/META-INF/MANIFEST.MF (original)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.runtime.v22/META-INF/MANIFEST.MF Wed Apr  6 07:02:42 2011
@@ -20,6 +20,7 @@ Bundle-ClassPath: lib/geronimo-common-2.
 Export-Package: 
  org.apache.geronimo.common,
  org.apache.geronimo.common.propertyeditor,
+ org.apache.geronimo.crypto,
  org.apache.geronimo.deployment,
  org.apache.geronimo.deployment.plugin,
  org.apache.geronimo.deployment.plugin.factories,

Modified: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.core/src/main/java/org/apache/geronimo/st/core/GeronimoServerDelegate.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.core/src/main/java/org/apache/geronimo/st/core/GeronimoServerDelegate.java?rev=1089328&r1=1089327&r2=1089328&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.core/src/main/java/org/apache/geronimo/st/core/GeronimoServerDelegate.java (original)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.core/src/main/java/org/apache/geronimo/st/core/GeronimoServerDelegate.java Wed Apr  6 07:02:42 2011
@@ -248,7 +248,7 @@ abstract public class GeronimoServerDele
 	}
 
 	public String getAdminPassword() {
-		return getInstanceProperty(PROPERTY_ADMIN_PW);
+		return decrypt(getInstanceProperty(PROPERTY_ADMIN_PW));
 	}
 
 	public String getRMINamingPort() {
@@ -272,7 +272,7 @@ abstract public class GeronimoServerDele
 	}
 
 	public void setAdminPassword(String value) {
-		setInstanceProperty(PROPERTY_ADMIN_PW, value);
+		setInstanceProperty(PROPERTY_ADMIN_PW, encrypt(value));
 	}
 
 	public void setRMINamingPort(String value) {
@@ -423,6 +423,9 @@ abstract public class GeronimoServerDele
 	public void setServerInstanceProperties(Map map) {
 		setAttribute(GeronimoRuntimeDelegate.SERVER_INSTANCE_PROPERTIES, map);
 	}
-
+	
+	public abstract String encrypt(String value);
+	
+	public abstract String decrypt(String value);
 	
 }

Modified: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.core/src/main/java/org/apache/geronimo/st/v11/core/GeronimoServer.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.core/src/main/java/org/apache/geronimo/st/v11/core/GeronimoServer.java?rev=1089328&r1=1089327&r2=1089328&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.core/src/main/java/org/apache/geronimo/st/v11/core/GeronimoServer.java (original)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.core/src/main/java/org/apache/geronimo/st/v11/core/GeronimoServer.java Wed Apr  6 07:02:42 2011
@@ -19,6 +19,7 @@ package org.apache.geronimo.st.v11.core;
 import javax.enterprise.deploy.spi.DeploymentManager;
 import javax.enterprise.deploy.spi.factories.DeploymentFactory;
 
+import org.apache.geronimo.crypto.EncryptionManager;
 import org.apache.geronimo.deployment.plugin.factories.DeploymentFactoryImpl;
 import org.apache.geronimo.deployment.plugin.jmx.JMXDeploymentManager;
 import org.apache.geronimo.st.core.GeronimoServerDelegate;
@@ -120,5 +121,13 @@ public class GeronimoServer extends Gero
         //Currently not support server plugin for 1.1 adapter
         return null;
     }
+    
+    public String encrypt(String value) {
+        return value == null ? null : EncryptionManager.encrypt(value);
+    }
+    
+    public String decrypt(String value) {
+        return value == null ? null : (String) EncryptionManager.decrypt(value);
+    }
 
 }
\ No newline at end of file

Modified: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v20.core/src/main/java/org/apache/geronimo/st/v20/core/GeronimoServer.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v20.core/src/main/java/org/apache/geronimo/st/v20/core/GeronimoServer.java?rev=1089328&r1=1089327&r2=1089328&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v20.core/src/main/java/org/apache/geronimo/st/v20/core/GeronimoServer.java (original)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v20.core/src/main/java/org/apache/geronimo/st/v20/core/GeronimoServer.java Wed Apr  6 07:02:42 2011
@@ -21,6 +21,7 @@ import java.io.File;
 import javax.enterprise.deploy.spi.DeploymentManager;
 import javax.enterprise.deploy.spi.factories.DeploymentFactory;
 
+import org.apache.geronimo.crypto.EncryptionManager;
 import org.apache.geronimo.deployment.plugin.factories.DeploymentFactoryImpl;
 import org.apache.geronimo.deployment.plugin.jmx.JMXDeploymentManager;
 import org.apache.geronimo.st.core.GeronimoRuntimeDelegate;
@@ -212,5 +213,12 @@ public class GeronimoServer extends Gero
         //v20 adapter doesn't provide operations in plugin manager
         return null;
     }
-
+    
+    public String encrypt(String value) {
+        return value == null ? null : EncryptionManager.encrypt(value);
+    }
+    
+    public String decrypt(String value) {
+        return value == null ? null : (String) EncryptionManager.decrypt(value);
+    }
 }
\ No newline at end of file

Modified: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.core/src/main/java/org/apache/geronimo/st/v21/core/GeronimoServer.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.core/src/main/java/org/apache/geronimo/st/v21/core/GeronimoServer.java?rev=1089328&r1=1089327&r2=1089328&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.core/src/main/java/org/apache/geronimo/st/v21/core/GeronimoServer.java (original)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.core/src/main/java/org/apache/geronimo/st/v21/core/GeronimoServer.java Wed Apr  6 07:02:42 2011
@@ -20,6 +20,7 @@ import java.io.File;
 import javax.enterprise.deploy.spi.DeploymentManager;
 import javax.enterprise.deploy.spi.factories.DeploymentFactory;
 
+import org.apache.geronimo.crypto.EncryptionManager;
 import org.apache.geronimo.deployment.plugin.factories.DeploymentFactoryImpl;
 import org.apache.geronimo.deployment.plugin.jmx.JMXDeploymentManager;
 import org.apache.geronimo.st.core.GeronimoRuntimeDelegate;
@@ -211,5 +212,11 @@ public class GeronimoServer extends Gero
         return new GeronimoServerV21PluginManager(this.getServer());
     }
 
-
+    public String encrypt(String value) {
+        return value == null ? null : EncryptionManager.encrypt(value);
+    }
+    
+    public String decrypt(String value) {
+        return value == null ? null : (String) EncryptionManager.decrypt(value);
+    }
 }
\ No newline at end of file

Modified: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v22.core/src/main/java/org/apache/geronimo/st/v22/core/GeronimoServer.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v22.core/src/main/java/org/apache/geronimo/st/v22/core/GeronimoServer.java?rev=1089328&r1=1089327&r2=1089328&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v22.core/src/main/java/org/apache/geronimo/st/v22/core/GeronimoServer.java (original)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v22.core/src/main/java/org/apache/geronimo/st/v22/core/GeronimoServer.java Wed Apr  6 07:02:42 2011
@@ -20,6 +20,7 @@ import java.io.File;
 import javax.enterprise.deploy.spi.DeploymentManager;
 import javax.enterprise.deploy.spi.factories.DeploymentFactory;
 
+import org.apache.geronimo.crypto.*;
 import org.apache.geronimo.deployment.plugin.factories.DeploymentFactoryImpl;
 import org.apache.geronimo.deployment.plugin.jmx.JMXDeploymentManager;
 import org.apache.geronimo.st.core.GeronimoRuntimeDelegate;
@@ -211,5 +212,13 @@ public class GeronimoServer extends Gero
     public IGeronimoServerPluginManager getServerPluginManager() {
         return new GeronimoServerV22PluginManager(this.getServer());
     }
+    
+    public String encrypt(String value) {
+        return value == null ? null : EncryptionManager.encrypt(value);
+    }
+    
+    public String decrypt(String value) {
+        return value == null ? null : (String) EncryptionManager.decrypt(value);
+    }
 
 }
\ No newline at end of file

Modified: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.core/src/main/java/org/apache/geronimo/st/v30/core/GeronimoServerDelegate.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.core/src/main/java/org/apache/geronimo/st/v30/core/GeronimoServerDelegate.java?rev=1089328&r1=1089327&r2=1089328&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.core/src/main/java/org/apache/geronimo/st/v30/core/GeronimoServerDelegate.java (original)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.core/src/main/java/org/apache/geronimo/st/v30/core/GeronimoServerDelegate.java Wed Apr  6 07:02:42 2011
@@ -32,6 +32,7 @@ import java.util.jar.Manifest;
 import java.util.regex.Matcher;
 import java.util.regex.Pattern;
 
+import org.apache.geronimo.crypto.EncryptionManager;
 import org.apache.geronimo.st.v30.core.internal.Trace;
 import org.apache.geronimo.st.v30.core.osgi.AriesHelper;
 import org.apache.geronimo.st.v30.core.osgi.OsgiConstants;
@@ -394,13 +395,15 @@ abstract public class GeronimoServerDele
     // PROPERTY_ADMIN_PW 
     // 
     public String getAdminPassword() {
-        return getInstanceProperty(PROPERTY_ADMIN_PW);
+        String password = getInstanceProperty(PROPERTY_ADMIN_PW);
+        return password == null ? null : (String) EncryptionManager.decrypt(password);
     }
+    
     public void setAdminPassword(String value) {
-        setInstanceProperty(PROPERTY_ADMIN_PW, value);
+        String password = value == null ? null : EncryptionManager.encrypt(value);
+        setInstanceProperty(PROPERTY_ADMIN_PW, password);
     }
 
-
     // 
     // PROPERTY_RMI_PORT 
     //