From: Instrumental Date: Tue, 8 May 2018 19:33:18 +0000 (-0500) Subject: Check Perm Instance ending in colon X-Git-Tag: Beijing-2.1.1~63 X-Git-Url: https://gerrit.onap.org/r/gitweb?p=aaf%2Fauthz.git;a=commitdiff_plain;h=de038d3a92e1f13fac72ca53b52676fe223556a7 Check Perm Instance ending in colon Issue-ID: AAF-269 Change-Id: I5422c0f119a53284ddc25eb7b99a8a6b09d3dd39 Signed-off-by: Instrumental Fix broken JUnits Issue-ID: AAF-270 Change-Id: I91e5d24b0e0610b10dcd12e90813e9ea00af1812 Signed-off-by: Instrumental --- diff --git a/auth-client/pom.xml b/auth-client/pom.xml index 9f0bef76..789e24ee 100644 --- a/auth-client/pom.xml +++ b/auth-client/pom.xml @@ -122,7 +122,6 @@ org.apache.maven.plugins maven-deploy-plugin - 2.5 false @@ -140,7 +139,6 @@ org.sonatype.plugins nexus-staging-maven-plugin - 1.6.7 true ${nexusproxy} @@ -151,7 +149,6 @@ org.jacoco jacoco-maven-plugin - 0.7.7.201606060606 true diff --git a/auth/auth-service/src/test/java/org/onap/aaf/auth/service/validation/test/JU_ServiceValidator.java b/auth/auth-service/src/test/java/org/onap/aaf/auth/service/validation/test/JU_ServiceValidator.java index a0e5bfa6..f304fccd 100644 --- a/auth/auth-service/src/test/java/org/onap/aaf/auth/service/validation/test/JU_ServiceValidator.java +++ b/auth/auth-service/src/test/java/org/onap/aaf/auth/service/validation/test/JU_ServiceValidator.java @@ -53,6 +53,18 @@ public class JU_ServiceValidator { assertTrue(validator.errs().equals("ERR_Security\n")); } + + @Test + public void permInstance() { + assertFalse(validator.permInstance("hello").err()); + assertFalse(validator.permInstance("hello32").err()); + assertFalse(validator.permInstance("hello-32").err()); + assertFalse(validator.permInstance(":asdf:*:sdf*:sdk").err()); + assertFalse(validator.permInstance(":asdf:*:sdf*:sdk*").err()); + // Perms may not end in ":" + assertTrue(validator.permInstance(":").err()); + assertTrue(validator.permInstance(":hello:").err()); + } @Test public void permOkNull() { diff --git a/auth/sample/local/org.osaaf.aaf.p12 b/auth/sample/local/org.osaaf.aaf.p12 index f40a7556..1e1ce696 100644 Binary files a/auth/sample/local/org.osaaf.aaf.p12 and b/auth/sample/local/org.osaaf.aaf.p12 differ diff --git a/cadi/aaf/src/main/java/org/onap/aaf/cadi/cm/PlaceArtifactInKeystore.java b/cadi/aaf/src/main/java/org/onap/aaf/cadi/cm/PlaceArtifactInKeystore.java index 9360e02f..2b498d4f 100644 --- a/cadi/aaf/src/main/java/org/onap/aaf/cadi/cm/PlaceArtifactInKeystore.java +++ b/cadi/aaf/src/main/java/org/onap/aaf/cadi/cm/PlaceArtifactInKeystore.java @@ -125,17 +125,16 @@ public class PlaceArtifactInKeystore extends ArtifactDir { char[] truststorePassArray = trustStorePass.toCharArray(); jks.load(null,truststorePassArray); // load in - // Add Trusted Certificates + // Add Trusted Certificates, but PKCS12 doesn't support for(int i=0; i", baos); - PropAccess ta = new PropAccess(); + PropAccess ta = new PropAccess() { + @Override + public String decrypt(String encrypted, boolean anytext) throws IOException { + return symmetric.depass(encrypted); + } + + @Override + public String encrypt(String unencrypted) throws IOException { + return symmetric.enpass(unencrypted); + } + + }; + Lur ml = up = new LocalLur(ta,"myname:groupA,groupB","admin:myname,yourname;suser:hisname,hername,m1234%"+baos.toString()); diff --git a/cadi/core/src/test/resources/output_key b/cadi/core/src/test/resources/output_key deleted file mode 100644 index 9d94dcbd..00000000 --- a/cadi/core/src/test/resources/output_key +++ /dev/null @@ -1 +0,0 @@ -QRSTUVWXYZabcdef \ No newline at end of file diff --git a/cadi/core/test/output_key b/cadi/core/test/output_key deleted file mode 100644 index 353fabd2..00000000 --- a/cadi/core/test/output_key +++ /dev/null @@ -1,27 +0,0 @@ -g6wDq10CsnMUE0HB18N2UsrFri27TBG05Z1JzrvNSPUhIphFcv7gst-eHKvfbgffKF-rs9Zkjd5F -3FZDci9MlG4vhwrXHXLgo6DXEVH4FsfT5MP__E3yrnuGOcDI4kWUFdni3xG48PXNcT_xQoPb6JR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