geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From xuhaih...@apache.org
Subject svn commit: r1172420 - /geronimo/server/branches/2.2/framework/modules/geronimo-service-builder/src/main/java/org/apache/geronimo/deployment/service/JavaBeanXmlAttributeEditor.java
Date Mon, 19 Sep 2011 04:23:02 GMT
Author: xuhaihong
Date: Mon Sep 19 04:23:01 2011
New Revision: 1172420

URL: http://svn.apache.org/viewvc?rev=1172420&view=rev
Log:
GERONIMO-5704 Farming module provision of utilizing encrypted password instead of plain text
(Based on the patch from Xiao Yi)

Modified:
    geronimo/server/branches/2.2/framework/modules/geronimo-service-builder/src/main/java/org/apache/geronimo/deployment/service/JavaBeanXmlAttributeEditor.java

Modified: geronimo/server/branches/2.2/framework/modules/geronimo-service-builder/src/main/java/org/apache/geronimo/deployment/service/JavaBeanXmlAttributeEditor.java
URL: http://svn.apache.org/viewvc/geronimo/server/branches/2.2/framework/modules/geronimo-service-builder/src/main/java/org/apache/geronimo/deployment/service/JavaBeanXmlAttributeEditor.java?rev=1172420&r1=1172419&r2=1172420&view=diff
==============================================================================
--- geronimo/server/branches/2.2/framework/modules/geronimo-service-builder/src/main/java/org/apache/geronimo/deployment/service/JavaBeanXmlAttributeEditor.java
(original)
+++ geronimo/server/branches/2.2/framework/modules/geronimo-service-builder/src/main/java/org/apache/geronimo/deployment/service/JavaBeanXmlAttributeEditor.java
Mon Sep 19 04:23:01 2011
@@ -80,7 +80,12 @@ public class JavaBeanXmlAttributeEditor 
             Object javabean = xmlAttributeBuilder.getValue(javaBeanType,
                 javaBeanClazz.getName(),
                 getClass().getClassLoader());
-
+            for (PropertyType propertyType : javaBeanType.getPropertyArray()) {
+                if (propertyType.getName().endsWith("Password") || propertyType.getName().endsWith("password"))
{
+                    String decryptedValue = (String) EncryptionManager.decrypt(propertyType.getStringValue());
+                    propertyType.setStringValue(decryptedValue);
+                }
+            }
             setValue(javabean);
         } catch (XmlException e) {
             throw new PropertyEditorException(e);



Mime
View raw message