You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@syncope.apache.org by co...@apache.org on 2017/07/17 18:16:04 UTC

syncope git commit: Filter security.properties for the spring tests as well

Repository: syncope
Updated Branches:
  refs/heads/master 2d444f625 -> 3faef350f


Filter security.properties for the spring tests as well


Project: http://git-wip-us.apache.org/repos/asf/syncope/repo
Commit: http://git-wip-us.apache.org/repos/asf/syncope/commit/3faef350
Tree: http://git-wip-us.apache.org/repos/asf/syncope/tree/3faef350
Diff: http://git-wip-us.apache.org/repos/asf/syncope/diff/3faef350

Branch: refs/heads/master
Commit: 3faef350fd2d9fdaf3d20ab6bd73ce6b83e4c695
Parents: 2d444f6
Author: Colm O hEigeartaigh <co...@apache.org>
Authored: Mon Jul 17 19:15:53 2017 +0100
Committer: Colm O hEigeartaigh <co...@apache.org>
Committed: Mon Jul 17 19:15:53 2017 +0100

----------------------------------------------------------------------
 core/spring/pom.xml                                           | 7 +++++++
 .../apache/syncope/core/spring/security/EncryptorTest.java    | 7 +++++++
 2 files changed, 14 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/syncope/blob/3faef350/core/spring/pom.xml
----------------------------------------------------------------------
diff --git a/core/spring/pom.xml b/core/spring/pom.xml
index d92d4e0..d33a01f 100644
--- a/core/spring/pom.xml
+++ b/core/spring/pom.xml
@@ -104,5 +104,12 @@ under the License.
         <artifactId>maven-checkstyle-plugin</artifactId>
       </plugin>
     </plugins>
+    <resources>
+      <resource>
+        <directory>src/main/resources</directory>
+        <filtering>true</filtering>
+      </resource>
+    </resources>
+
   </build>
 </project>

http://git-wip-us.apache.org/repos/asf/syncope/blob/3faef350/core/spring/src/test/java/org/apache/syncope/core/spring/security/EncryptorTest.java
----------------------------------------------------------------------
diff --git a/core/spring/src/test/java/org/apache/syncope/core/spring/security/EncryptorTest.java b/core/spring/src/test/java/org/apache/syncope/core/spring/security/EncryptorTest.java
index 4bfa0fa..98c3f16 100644
--- a/core/spring/src/test/java/org/apache/syncope/core/spring/security/EncryptorTest.java
+++ b/core/spring/src/test/java/org/apache/syncope/core/spring/security/EncryptorTest.java
@@ -20,6 +20,7 @@ package org.apache.syncope.core.spring.security;
 
 import org.apache.syncope.core.spring.security.Encryptor;
 
+import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertFalse;
 import static org.junit.Assert.assertNotNull;
 import static org.junit.Assert.assertTrue;
@@ -57,4 +58,10 @@ public class EncryptorTest {
             }
         }
     }
+
+    @Test
+    public void testDecodeDefaultAESKey() throws Exception {
+        String password = encryptor.decode("9Pav+xl+UyHt02H9ZBytiA==", CipherAlgorithm.AES);
+        assertEquals("password", password);
+    }
 }