diff options
-rw-r--r-- | bundleconfig-local/etc/appprops/MsgRtrApi.properties | 2 | ||||
-rw-r--r-- | demo/docker_files/cadi.properties | 33 | ||||
-rw-r--r-- | pom.xml | 75 | ||||
-rw-r--r-- | src/main/config/ajsc-override-web.xml | 4 | ||||
-rw-r--r-- | src/main/config/cadi.properties | 74 | ||||
-rw-r--r-- | src/main/config/keyfilenew | 27 | ||||
-rw-r--r-- | src/main/config/org.onap.dmaap.mr.p12 | bin | 0 -> 4056 bytes | |||
-rw-r--r-- | src/main/config/runner-web.xml | 4 | ||||
-rw-r--r-- | src/main/config/truststoreONAPall.jks | bin | 0 -> 114865 bytes | |||
-rw-r--r-- | src/main/java/com/att/nsa/dmaap/util/DMaaPAuthFilter.java | 2 | ||||
-rw-r--r-- | src/test/java/com/att/nsa/dmaap/util/DMaaPAuthFilterTest.java | 13 |
11 files changed, 105 insertions, 129 deletions
diff --git a/bundleconfig-local/etc/appprops/MsgRtrApi.properties b/bundleconfig-local/etc/appprops/MsgRtrApi.properties index 552c6a7..160cc0b 100644 --- a/bundleconfig-local/etc/appprops/MsgRtrApi.properties +++ b/bundleconfig-local/etc/appprops/MsgRtrApi.properties @@ -151,7 +151,7 @@ msgRtr.topicfactory.aaf=org.onap.dmaap.mr.topicFactory|:org.onap.dmaap.mr.topic: enforced.topic.name.AAF=org.onap forceAAF=false transidUEBtopicreqd=false -defaultNSforUEB=org.onap.dmaap.mr.ueb +defaultNSforUEB=org.onap.dmaap.mr ############################################################################## #Mirror Maker Agent msgRtr.mirrormakeradmin.aaf=com.onap.dmaap.mr.dev.mirrormaker|*|admin diff --git a/demo/docker_files/cadi.properties b/demo/docker_files/cadi.properties index 1cb00a5..a79bb8d 100644 --- a/demo/docker_files/cadi.properties +++ b/demo/docker_files/cadi.properties @@ -1,21 +1,20 @@ -basic_realm=openecomp.org -basic_warn=TRUE +aaf_locate_url=https://aaf-onap-test.osaaf.org:8095 +aaf_url=https://AAF_LOCATE_URL/AAF_NS.service:2.1 +aaf_env=DEV +aaf_lur=org.onap.aaf.cadi.aaf.v2_0.AAFLurPerm -cadi_loglevel=DEBUG -#cadi_keyfile=target/swm/package/nix/dist_files/appl/${artifactId}/etc/keyfile2 -cadi_keyfile=/appl/dmaapMR1/etc/keyfile -# Configure AAF -aaf_url=https://DME2RESOLVE/service=org.openecomp.authz.AuthorizationService/version=2.0/envContext=DEV/routeOffer=BAU_SE +cadi_truststore=/appl/dmaapMR1/etc/truststoreONAPall.jks +cadi_truststore_password=changeit -aaf_id=dgl@openecomp.org -aaf_password=enc:f2u5br1mh29M02- -aaf_timeout=5000 -aaf_clean_interval=1200000 -aaf_user_expires=60000 -aaf_high_count=1000000 +cadi_keyfile=/appl/dmaapMR1/etc/keyfilenew +cadi_alias=dmaapmr@mr.dmaap.onap.org +cadi_keystore=/appl/dmaapMR1/etc/org.onap.dmaap.mr.p12 +cadi_keystore_password=Messaging for All +cadi_x509_issuers=CN=intermediateCA_1, OU=OSAAF, O=ONAP, C=US -# The following properties are being set by the AJSC Container and should NOT need to be set here. -AFT_LATITUDE=33.823589 -AFT_LONGITUDE=-84.366982 -AFT_ENVIRONMENT=AFTUAT + +cadi_loglevel=INFO +cadi_protocols=TLSv1.1,TLSv1.2 +cadi_latitude=37.78187 +cadi_longitude=-122.26147
\ No newline at end of file @@ -345,7 +345,7 @@ <version>3.2.5</version> </dependency> - <dependency> + <!-- <dependency> <groupId>com.att.cadi</groupId> <artifactId>cadi-core</artifactId> <version>1.3.0</version> @@ -354,7 +354,7 @@ <groupId>com.att.aft</groupId> <artifactId>dme2</artifactId> <version>3.1.200-oss</version> - </dependency> + </dependency> --> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-expression</artifactId> @@ -457,7 +457,7 @@ <dependency> <groupId>org.onap.dmaap.messagerouter.msgrtr</groupId> <artifactId>msgrtr</artifactId> - <version>1.1.7</version> + <version>1.1.9</version> <exclusions> <exclusion> <groupId>org.slf4j</groupId> @@ -602,37 +602,16 @@ <type>pom</type> </dependency> - <dependency> - <groupId>com.att.cadi</groupId> - <artifactId>cadi-aaf</artifactId> - <version>1.3.0</version> - </dependency> - - <dependency> - <groupId>com.att.inno</groupId> - <artifactId>rosetta</artifactId> - <version>1.2.11</version> - </dependency> - <dependency> - <groupId>com.att.inno</groupId> - <artifactId>env</artifactId> - <version>1.2.11</version> - </dependency> - <dependency> - <groupId>com.att.inno</groupId> - <artifactId>xgen</artifactId> - <version>1.2.11</version> - </dependency> - <dependency> - <groupId>com.att.inno</groupId> - <artifactId>rosetta</artifactId> - <version>1.2.11</version> - </dependency> - <dependency> - <groupId>backport-util-concurrent</groupId> - <artifactId>backport-util-concurrent</artifactId> - <version>3.1</version> - </dependency> + <dependency> + <groupId>org.onap.aaf.authz</groupId> + <artifactId>aaf-cadi-aaf</artifactId> + <version>2.1.2-SNAPSHOT</version> + </dependency> + <dependency> + <groupId>backport-util-concurrent</groupId> + <artifactId>backport-util-concurrent</artifactId> + <version>3.1</version> + </dependency> <dependency> <groupId>org.apache.camel</groupId> <artifactId>camel-core</artifactId> @@ -1358,6 +1337,34 @@ </execution> </executions> </plugin> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-enforcer-plugin</artifactId> + <executions> + <execution> + <id>enforce-no-snapshots</id> + <goals> + <goal>enforce</goal> + </goals> + <configuration> + <rules> + <requireReleaseDeps> + <message>No Snapshots Allowed!</message> + <excludes> + <exclude>org.onap.aaf.authz:aaf-cadi-client</exclude> + <exclude>org.onap.aaf.authz:aaf-misc-env</exclude> + <exclude>org.onap.aaf.authz:aaf-cadi-aaf</exclude> + <exclude>org.onap.aaf.authz:aaf-auth-client</exclude> + <exclude>org.onap.aaf.authz:aaf-cadi-core</exclude> + <exclude>org.onap.aaf.authz:aaf-misc-rosetta</exclude> + </excludes> + </requireReleaseDeps> + </rules> + <fail>true</fail> + </configuration> + </execution> + </executions> + </plugin> </plugins> <pluginManagement> <plugins> diff --git a/src/main/config/ajsc-override-web.xml b/src/main/config/ajsc-override-web.xml index 7bd3c1d..42652d4 100644 --- a/src/main/config/ajsc-override-web.xml +++ b/src/main/config/ajsc-override-web.xml @@ -25,10 +25,10 @@ xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd" metadata-complete="false" version="3.0"> - <!-- <filter-mapping> + <filter-mapping> <filter-name>DMaaPAuthFilter</filter-name> <url-pattern>/*</url-pattern> - </filter-mapping> --> + </filter-mapping> <filter-mapping> <filter-name>WriteableRequestFilter</filter-name> diff --git a/src/main/config/cadi.properties b/src/main/config/cadi.properties index 30df1b9..a79bb8d 100644 --- a/src/main/config/cadi.properties +++ b/src/main/config/cadi.properties @@ -1,64 +1,20 @@ -############################################################################### -# ============LICENSE_START======================================================= -# org.onap.dmaap -# ================================================================================ -# Copyright © 2017 AT&T Intellectual Property. All rights reserved. -# ================================================================================ -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# ============LICENSE_END========================================================= -# -# ECOMP is a trademark and service mark of AT&T Intellectual Property. -# -############################################################################### -#This properties file is used for defining AAF properties related to the CADI framework. This file is used for running AAF framework -#using the ajsc-cadi plugin. For more information on the ajsc-cadi plugin, +aaf_locate_url=https://aaf-onap-test.osaaf.org:8095 +aaf_url=https://AAF_LOCATE_URL/AAF_NS.service:2.1 +aaf_env=DEV +aaf_lur=org.onap.aaf.cadi.aaf.v2_0.AAFLurPerm -#In order to test functionality of cadi-ajsc-plugin locally (pertaining to GLO (AT&T Global Login)), you will need an AT&T cross -#domain cookie. Cadi "should" find your hostname for you. However, we have seen some situations where this fails. A Local testing -#modification can include modifying your hosts file so that you can use "mywebserver.att.com" for your localhost in order -#to test/verify GLO functionality locally. If you are on a Windows machine, you will already have a machine name associated with -#it that will utilize an AT&T domain such as "sbc.com". You may need to add your AT&T domain to this as a comma separated list depending -#upon your particular machine domain. This property is commented out as cadi SHOULD find your machine name. With version 1.2.1 of cadi, -#it appears to resolve Mac machine names as well, now. But, this can be somewhat inconsistent depending on your specific working envrironment. -hostname=mywebserver.att.com +cadi_truststore=/appl/dmaapMR1/etc/truststoreONAPall.jks +cadi_truststore_password=changeit -#Setting csp_domain to PROD will allow for testing using your attuid and password through GLO. -csp_domain=PROD -csp_devl_localhost=true +cadi_keyfile=/appl/dmaapMR1/etc/keyfilenew -basic_realm=csp.att.com -#basic_realm=aaf.att.com -basic_warn=TRUE +cadi_alias=dmaapmr@mr.dmaap.onap.org +cadi_keystore=/appl/dmaapMR1/etc/org.onap.dmaap.mr.p12 +cadi_keystore_password=Messaging for All +cadi_x509_issuers=CN=intermediateCA_1, OU=OSAAF, O=ONAP, C=US -cadi_loglevel=DEBUG -#cadi_keyfile=target/swm/package/nix/dist_files/appl/${artifactId}/etc/keyfile2 -cadi_keyfile=etc/keyfile -# Configure AAF -aaf_url=https://DME2RESOLVE/service=com.att.authz.AuthorizationService/version=2.0/envContext=TEST/routeOffer=BAU_SE -#AJSC - MECHID - -aaf_id=<aaf_id> -aaf_password=<aaf_password> - - -aaf_timeout=5000 -aaf_clean_interval=1200000 -aaf_user_expires=60000 -aaf_high_count=1000000 - - -# Some Libs need System Property Sets (i.e. AT&T Discovery) -# The following properties are being set by the AJSC Container and should NOT need to be set here. -#AFT_LATITUDE=33.823589 -#AFT_LONGITUDE=-84.366982 -#AFT_ENVIRONMENT=AFTUAT
\ No newline at end of file +cadi_loglevel=INFO +cadi_protocols=TLSv1.1,TLSv1.2 +cadi_latitude=37.78187 +cadi_longitude=-122.26147
\ No newline at end of file diff --git a/src/main/config/keyfilenew b/src/main/config/keyfilenew new file mode 100644 index 0000000..884375f --- /dev/null +++ b/src/main/config/keyfilenew @@ -0,0 +1,27 @@ +Riwh4gx5ye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9pxwVeUBulB4j1BtLOPhQaAXHTWpD-85n6ecPEYfpIK73_S7fLBfUD1gyQ6tZj4VYjoSfGKAFStE +zCUMvryARBNVFJ0ENq-xKyst_M4V3WjcIeiLW3LmjByk-aymys-e8mUL_tcn_MO9pCktAr1xu5Yx +wBcBOrFlB2UP8Im7vBHbGgf77ssqyxy5_cJhaO9MBKUx5KZQw9eE9ePf6UvELTev7Urhla4QKUm9 +AMemzy2RvC2ghZeh7fzBahbZpRM3vDDm4IhbcZavA2d2DEgq8c0AUhlPYE-LCv2BOKBeUEkGULxU +29uIc8LkcLHh37WHmJOjVbH9gB9enHH0sBf9cnv7A70R1evSWeHn0ty9vVXPOLODSQGqbB40qAhQ +MEsRt-13WUAlHjosA7yj2zHTLMeuSqqPuPeiyGPtblkWUC-gpEJxgK8hTb1LzoZVZeteqgdMKlde +Q0gmI_0CX5RtCjITSlHaKxzw6ly9qqv52GZVpAYlu2SWeFdlCg9txh2ke0x3rTMKsM8i0ccCdmLq +E60akH2bPa4vB7zRiu3im-IVli9V8zz8U2roQrfN08IJCAatSQRVfUiyAAJkOEcghuHmaErA-kD8 +fu0sWuAHsEgKBtfaeOu5OFeyeLmNRiPKpVotMyDHrEjjBW-TVTppWwgN5Utmx80RghSmzwUjglyG +3aaM3iJqp8xvgtlLtoJkq2A8rMbw0eAQ7I33hAn-jfBkmjsVkzsVgffe5xqGA1DDYm1lTkv4OjFX +_tTzYfN2V1BtYNUN_edhQRMsNh5-mpZwOeb5JpdJQFZUXaFtwDedx_sqe54NEJ4jV7w4up7H0MXp +WTazMQmwRzsLTs1U8zeJ0Ib0LAb4EsX6DML3Ue87nmYCj450KE9DM0tYGWn13jiGWoDEhW4noi2X +gkcjwIcM-87wwvsb-rMIOdo2DXQee8zKzB51N4YAn4VBUfjXVMhjjSwg40yHlzKQE0hAOuJN
\ No newline at end of file diff --git a/src/main/config/org.onap.dmaap.mr.p12 b/src/main/config/org.onap.dmaap.mr.p12 Binary files differnew file mode 100644 index 0000000..79549ed --- /dev/null +++ b/src/main/config/org.onap.dmaap.mr.p12 diff --git a/src/main/config/runner-web.xml b/src/main/config/runner-web.xml index 55d7961..2bcf11d 100644 --- a/src/main/config/runner-web.xml +++ b/src/main/config/runner-web.xml @@ -66,7 +66,7 @@ </filter> <!-- Content length filter for Msgrtr --> - <!-- <filter> + <filter> <display-name>DMaaPAuthFilter</display-name> <filter-name>DMaaPAuthFilter</filter-name> <filter-class>com.att.nsa.dmaap.util.DMaaPAuthFilter</filter-class> @@ -74,7 +74,7 @@ <param-name>cadi_prop_files</param-name> <param-value>/appl/dmaapMR1/etc/cadi.properties </param-value> </init-param> - </filter> --> + </filter> <!-- End Content length filter for Msgrtr --> <servlet> diff --git a/src/main/config/truststoreONAPall.jks b/src/main/config/truststoreONAPall.jks Binary files differnew file mode 100644 index 0000000..2da1dcc --- /dev/null +++ b/src/main/config/truststoreONAPall.jks diff --git a/src/main/java/com/att/nsa/dmaap/util/DMaaPAuthFilter.java b/src/main/java/com/att/nsa/dmaap/util/DMaaPAuthFilter.java index 8453a12..652bfc2 100644 --- a/src/main/java/com/att/nsa/dmaap/util/DMaaPAuthFilter.java +++ b/src/main/java/com/att/nsa/dmaap/util/DMaaPAuthFilter.java @@ -33,7 +33,7 @@ import com.att.eelf.configuration.EELFLogger; import com.att.eelf.configuration.EELFManager; import org.springframework.stereotype.Component; -import com.att.cadi.filter.CadiFilter; +import org.onap.aaf.cadi.filter.CadiFilter; //import ajsc.external.plugins.cadi.AjscCadiFilter; import javax.servlet.FilterConfig; diff --git a/src/test/java/com/att/nsa/dmaap/util/DMaaPAuthFilterTest.java b/src/test/java/com/att/nsa/dmaap/util/DMaaPAuthFilterTest.java index 4d9fa95..f5ad531 100644 --- a/src/test/java/com/att/nsa/dmaap/util/DMaaPAuthFilterTest.java +++ b/src/test/java/com/att/nsa/dmaap/util/DMaaPAuthFilterTest.java @@ -44,7 +44,6 @@ import com.att.ajsc.beans.PropertiesMapBean; import com.att.dmf.mr.beans.DMaaPContext;
import com.att.dmf.mr.exception.DMaaPResponseCode;
-import com.att.cadi.Access.Level;
@RunWith(PowerMockRunner.class)
@PrepareForTest({ PropertiesMapBean.class, DMaaPResponseCode.class })
@@ -97,17 +96,5 @@ public class DMaaPAuthFilterTest { }
- @Test
- public void testLog() {
- String s[] = { "test1", "test2" };
- Object[] o = s;
- filter.log(Level.AUDIT, o);
- filter.log(Level.DEBUG, o);
- filter.log(Level.ERROR, o);
- filter.log(Level.INFO, o);
- filter.log(Level.INIT, o);
- filter.log(Level.WARN, o);
- assertTrue(true);
- }
}
\ No newline at end of file |