geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From xuhaih...@apache.org
Subject svn commit: r1172421 - /geronimo/server/trunk/framework/modules/geronimo-service-builder/src/main/java/org/apache/geronimo/deployment/service/JavaBeanXmlAttributeEditor.java
Date Mon, 19 Sep 2011 04:25:58 GMT
Author: xuhaihong
Date: Mon Sep 19 04:25:58 2011
New Revision: 1172421

URL: http://svn.apache.org/viewvc?rev=1172421&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/trunk/framework/modules/geronimo-service-builder/src/main/java/org/apache/geronimo/deployment/service/JavaBeanXmlAttributeEditor.java

Modified: geronimo/server/trunk/framework/modules/geronimo-service-builder/src/main/java/org/apache/geronimo/deployment/service/JavaBeanXmlAttributeEditor.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/framework/modules/geronimo-service-builder/src/main/java/org/apache/geronimo/deployment/service/JavaBeanXmlAttributeEditor.java?rev=1172421&r1=1172420&r2=1172421&view=diff
==============================================================================
--- geronimo/server/trunk/framework/modules/geronimo-service-builder/src/main/java/org/apache/geronimo/deployment/service/JavaBeanXmlAttributeEditor.java
(original)
+++ geronimo/server/trunk/framework/modules/geronimo-service-builder/src/main/java/org/apache/geronimo/deployment/service/JavaBeanXmlAttributeEditor.java
Mon Sep 19 04:25:58 2011
@@ -79,11 +79,17 @@ public class JavaBeanXmlAttributeEditor 
         try {
             JavabeanDocument document = JavabeanDocument.Factory.parse(text);
             JavabeanType javaBeanType = document.getJavabean();
-            
+
+            for (PropertyType propertyType : javaBeanType.getPropertyArray()) {
+                if (propertyType.getName().endsWith("Password") || propertyType.getName().endsWith("password"))
{
+                    String decryptedValue = (String) EncryptionManager.decrypt(propertyType.getStringValue());
+                    propertyType.setStringValue(decryptedValue);
+                }
+            }
             Object javabean = xmlAttributeBuilder.getValue(javaBeanType,
                     document, javaBeanClazz.getName(),
                 bundle);
-
+            
             setValue(javabean);
         } catch (XmlException e) {
             throw new PropertyEditorException(e);



Mime
View raw message