continuum-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From br...@apache.org
Subject svn commit: r1366992 - in /continuum/trunk/continuum-release: pom.xml src/main/java/org/apache/continuum/release/config/ContinuumPropertiesReleaseDescriptorStore.java
Date Mon, 30 Jul 2012 04:27:34 GMT
Author: brett
Date: Mon Jul 30 04:27:33 2012
New Revision: 1366992

URL: http://svn.apache.org/viewvc?rev=1366992&view=rev
Log:
[CONTINUUM-2202] use Jetty utility to obfuscate password in release.properties

Modified:
    continuum/trunk/continuum-release/pom.xml
    continuum/trunk/continuum-release/src/main/java/org/apache/continuum/release/config/ContinuumPropertiesReleaseDescriptorStore.java

Modified: continuum/trunk/continuum-release/pom.xml
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-release/pom.xml?rev=1366992&r1=1366991&r2=1366992&view=diff
==============================================================================
--- continuum/trunk/continuum-release/pom.xml (original)
+++ continuum/trunk/continuum-release/pom.xml Mon Jul 30 04:27:33 2012
@@ -120,6 +120,12 @@ under the License.
       <artifactId>maven-scm-manager-plexus</artifactId>
       <scope>compile</scope>
     </dependency>
+    <dependency>
+      <groupId>org.eclipse.jetty</groupId>
+      <artifactId>jetty-security</artifactId>
+      <!-- TODO: change this to jetty.version when using Jetty 7 throughout -->
+      <version>8.1.5.v20120716</version>
+    </dependency>  
     <!-- === Testing Dependencies === -->
     <dependency>
       <groupId>hsqldb</groupId>

Modified: continuum/trunk/continuum-release/src/main/java/org/apache/continuum/release/config/ContinuumPropertiesReleaseDescriptorStore.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-release/src/main/java/org/apache/continuum/release/config/ContinuumPropertiesReleaseDescriptorStore.java?rev=1366992&r1=1366991&r2=1366992&view=diff
==============================================================================
--- continuum/trunk/continuum-release/src/main/java/org/apache/continuum/release/config/ContinuumPropertiesReleaseDescriptorStore.java
(original)
+++ continuum/trunk/continuum-release/src/main/java/org/apache/continuum/release/config/ContinuumPropertiesReleaseDescriptorStore.java
Mon Jul 30 04:27:33 2012
@@ -39,6 +39,7 @@ import org.apache.maven.shared.release.c
 import org.apache.maven.shared.release.config.ReleaseDescriptorStoreException;
 import org.apache.maven.shared.release.config.ReleaseUtils;
 import org.codehaus.plexus.util.IOUtil;
+import org.eclipse.jetty.util.security.Password;
 
 public class ContinuumPropertiesReleaseDescriptorStore
     extends PropertiesReleaseDescriptorStore
@@ -73,7 +74,16 @@ public class ContinuumPropertiesReleaseD
         releaseDescriptor.setCompletedPhase( properties.getProperty( "completedPhase" ) );
         releaseDescriptor.setScmSourceUrl( properties.getProperty( "scm.url" ) );
         releaseDescriptor.setScmUsername( properties.getProperty( "scm.username" ) );
-        releaseDescriptor.setScmPassword( properties.getProperty( "scm.password" ) );
+        
+        String password = properties.getProperty( "scm.password" );
+        if ( password != null && password.startsWith( "OBF:" ) )
+        {
+            releaseDescriptor.setScmPassword( Password.deobfuscate( password ) );
+        }
+        else
+        {
+            releaseDescriptor.setScmPassword( password );
+        }
         releaseDescriptor.setScmPrivateKey( properties.getProperty( "scm.privateKey" ) );
         releaseDescriptor.setScmPrivateKeyPassPhrase( properties.getProperty( "scm.passphrase"
) );
         releaseDescriptor.setScmTagBase( properties.getProperty( "scm.tagBase" ) );
@@ -158,7 +168,8 @@ public class ContinuumPropertiesReleaseD
         }
         if ( config.getScmPassword() != null )
         {
-            properties.setProperty( "scm.password", config.getScmPassword() );
+            // obfuscate password
+            properties.setProperty( "scm.password", Password.obfuscate( config.getScmPassword()
) );
         }
         if ( config.getScmPrivateKey() != null )
         {



Mime
View raw message