Release docker image of AAF to onap nexus 49/12749/1
authorsg481n <sg481n@att.com>
Fri, 15 Sep 2017 17:06:30 +0000 (13:06 -0400)
committersg481n <sg481n@att.com>
Fri, 15 Sep 2017 17:06:37 +0000 (13:06 -0400)
Adding new plugins in authz-service to release aaf
docker image into ONAP nexus

Issue-id: AAF-60
Change-Id: I373f6861e3bd62f16ee3256ff56b51487af578e5
Signed-off-by: sg481n <sg481n@att.com>
18 files changed:
authz-cmd/aafcli.sh
authz-core/src/main/java/org/onap/aaf/authz/common/Define.java
authz-service/pom.xml
authz-service/src/main/resources/authAPI.props [deleted file]
authz-service/src/main/resources/dme2reg/service=org.onap.aaf.authz.AuthorizationService/version=2.0/envContext=DEV/routeOffer=BAU_SE.txt [new file with mode: 0644]
authz-service/src/main/resources/docker/Dockerfile [new file with mode: 0644]
authz-service/src/main/resources/docker/authAPI.props [new file with mode: 0644]
authz-service/src/main/resources/docker/com.osaaf.common.props [new file with mode: 0644]
authz-service/src/main/resources/docker/com.osaaf.props [new file with mode: 0644]
authz-service/src/main/resources/docker/startup.sh [new file with mode: 0644]
authz-service/src/main/resources/etc/authAPI.props [new file with mode: 0644]
authz-service/src/main/resources/etc/com.osaaf.common.props [new file with mode: 0644]
authz-service/src/main/resources/etc/com.osaaf.props [new file with mode: 0644]
authz-service/start.sh
dme2reg/service=org.onap.aaf.authz.AuthorizationService/version=2.0/envContext=DEV/.gitignore [deleted file]
dme2reg/service=org.onap.aaf.authz.AuthorizationService/version=2.0/envContext=DEV/routeOffer=BAU_SE.txt [new file with mode: 0644]
opt/app/aaf/common/.gitignore [deleted file]
pom.xml

index 6eeddbb..e60f54f 100644 (file)
@@ -1,9 +1,13 @@
 DIR=`pwd`
-DME2REG=$DIR/../dme2reg
-CLASSPATH=etc:target/authz-cmd-1.0.0-SNAPSHOT-jar-with-dependencies.jar
+#DME2REG=$DIR/../dme2reg
+DME2REG=/opt/dme2reg
+#CLASSPATH=etc:target/authz-cmd-1.0.0-SNAPSHOT-jar-with-dependencies.jar
 
-java -cp $CLASSPATH \
-       -Dcadi_prop_files=../authz-service/src/main/sample/authAPI.props \
-       -DDME2_EP_REGISTRY_CLASS=DME2FS -DAFT_DME2_EP_REGISTRY_FS_DIR=$DME2REG \
-       com.att.cmd.AAFcli $*
+#java -cp $CLASSPATH \
+       #-Dcadi_prop_files=../authz-service/src/main/sample/authAPI.props \
+       #-DDME2_EP_REGISTRY_CLASS=DME2FS -DAFT_DME2_EP_REGISTRY_FS_DIR=$DME2REG \
+       #com.att.cmd.AAFcli $*
 
+CLASSPATH=/opt/app/aaf/authz-service/1.0.0-SNAPSHOT/etc:/opt/app/aaf/authz-service/1.0.0-SNAPSHOT/lib/authz-cmd-1.0.0-SNAPSHOT-jar-with-dependencies.jar  
+#java -cp $CLASSPATH -Dcadi_prop_files=../authz-service/src/main/sample/authAPI.props -DDME2_EP_REGISTRY_CLASS=DME2FS -DAFT_DME2_EP_REGISTRY_FS_DIR=$DME2REG com.att.cmd.AAFcli $*
+java -cp $CLASSPATH -Dcadi_prop_files=/opt/app/aaf/authz-service/1.0.0-SNAPSHOT/etc/authAPI.props -DDME2_EP_REGISTRY_CLASS=DME2FS -DAFT_DME2_EP_REGISTRY_FS_DIR=$DME2REG org.onap.aaf.cmd.AAFcli $*
index 58a8674..0a3ccdf 100644 (file)
@@ -27,7 +27,7 @@ import org.onap.aaf.cadi.config.Config;
 import org.onap.aaf.inno.env.Env;\r
 \r
 public class Define {\r
-       public static String ROOT_NS="NS.Not.Set";\r
+       public static String ROOT_NS="org.openecomp";\r
        public static String ROOT_COMPANY=ROOT_NS;\r
 \r
        public static void set(Env env) throws CadiException {\r
index 609967f..ec11fb2 100644 (file)
@@ -54,6 +54,9 @@
                <maven.test.failure.ignore>true</maven.test.failure.ignore>\r
                <project.swmVersion>1</project.swmVersion>\r
                        <project.cadiVersion>1.0.0-SNAPSHOT</project.cadiVersion>\r
+           <dockerLocation>${basedir}/target/</dockerLocation>\r
+               <docker.registry>zlp11313.vci.att.com:5100</docker.registry>\r
+               <distFilesRootDirPath>opt/app/aaf/${project.artifactId}/${project.version}</distFilesRootDirPath>\r
                        <sonar.language>java</sonar.language>\r
                <sonar.java.coveragePlugin>jacoco</sonar.java.coveragePlugin>\r
                <sonar.surefire.reportsPath>${project.build.directory}/surefire-reports</sonar.surefire.reportsPath>\r
             <groupId>org.onap.aaf.authz</groupId>\r
             <artifactId>authz-client</artifactId>\r
         </dependency>\r
-\r
+               \r
+               <dependency>\r
+            <groupId>org.onap.aaf.authz</groupId>\r
+            <artifactId>authz-cmd</artifactId>\r
+        </dependency>          \r
         <dependency>\r
             <groupId>org.onap.aaf.authz</groupId>\r
             <artifactId>authz-core</artifactId>\r
                <dependency>\r
                        <groupId>org.onap.aaf.cadi</groupId>\r
                        <artifactId>cadi-aaf</artifactId>\r
-               </dependency>\r
-\r
-       \r
-\r
-       \r
+               </dependency>   \r
        </dependencies>\r
        \r
        <build>\r
            <plugins>\r
+               <plugin>\r
+                <groupId>org.apache.maven.plugins</groupId>\r
+                <artifactId>maven-resources-plugin</artifactId>\r
+                <version>2.7</version>\r
+                <executions>\r
+                    <execution>\r
+                        <id>copy-docker-file</id>\r
+                        <phase>package</phase>\r
+                        <goals>\r
+                            <goal>copy-resources</goal>\r
+                        </goals>\r
+                        <configuration>\r
+                            <outputDirectory>${dockerLocation}</outputDirectory>\r
+                            <overwrite>true</overwrite>\r
+                            <resources>\r
+                                <resource>\r
+                                    <directory>${basedir}/src/main/resources/docker</directory>\r
+                                    <filtering>true</filtering>\r
+                                    <includes>\r
+                                        <include>**/*</include>\r
+                                    </includes>\r
+                                </resource>\r
+                            </resources>\r
+                        </configuration>\r
+                    </execution>\r
+                </executions>\r
+            </plugin>\r
+                       <plugin>\r
+                <groupId>com.spotify</groupId>\r
+                <artifactId>docker-maven-plugin</artifactId>\r
+                <version>0.4.11</version>\r
+                <configuration>\r
+                    <imageName>onap/aaf/authz-service</imageName>\r
+                    <dockerDirectory>${dockerLocation}</dockerDirectory>\r
+                    <serverId>docker-hub</serverId>\r
+                     <registryUrl>https://${docker.registry}</registryUrl>\r
+                    <imageTags>\r
+                        <imageTag>${project.version}</imageTag>\r
+                        <imageTag>latest</imageTag>\r
+                    </imageTags>\r
+                                            <resources>\r
+                                <resource>\r
+                                                               <targetPath>/</targetPath>\r
+                                    <directory>/${basedir}/target/opt</directory>\r
+                                    <filtering>true</filtering>\r
+                                    <includes>\r
+                                        <include>**/*</include>\r
+                                    </includes>\r
+                                </resource>\r
+                            </resources>\r
+                    <forceTags>true</forceTags>\r
+                </configuration>\r
+            </plugin>\r
+                       <plugin>\r
+    <artifactId>maven-resources-plugin</artifactId>\r
+    <version>2.7</version>\r
+    <executions>\r
+      <execution>\r
+        <id>copy-resources-1</id>\r
+        <phase>validate</phase>\r
+        <goals>\r
+          <goal>copy-resources</goal>\r
+        </goals>\r
+        <configuration>\r
+         <outputDirectory>${project.build.directory}/opt/dme2reg/</outputDirectory>\r
+          <resources>\r
+            <resource>\r
+                        <directory>${project.basedir}/src/main/resources/dme2reg/</directory> \r
+                                                <includes>\r
+                                                <include>**/*.txt</include>\r
+                        </includes>\r
+                    </resource>\r
+          </resources>\r
+        </configuration>\r
+      </execution>\r
+      <execution>\r
+        <id>copy-resources-2</id>\r
+        <phase>validate</phase>\r
+        <goals>\r
+          <goal>copy-resources</goal>\r
+        </goals>\r
+        <configuration>\r
+          <outputDirectory>${project.build.directory}/opt/app/aaf/authz-service/${project.version}/etc</outputDirectory>\r
+          <resources>\r
+            <resource>\r
+                        <directory>${project.basedir}/src/main/resources/etc</directory>\r
+                        <includes>\r
+                            <include>**/**</include>\r
+                        </includes>\r
+                    </resource>\r
+          </resources>\r
+        </configuration>\r
+      </execution>\r
+         \r
+          <execution>\r
+        <id>copy-resources-3</id>\r
+        <phase>validate</phase>\r
+        <goals>\r
+          <goal>copy-resources</goal>\r
+        </goals>\r
+        <configuration>\r
+          <outputDirectory>${project.build.directory}/opt/app/aaf/authz-service/${project.version}/lib</outputDirectory>\r
+          <resources>\r
+            <resource>\r
+                        <directory>${project.basedir}/../authz-cmd/target</directory>\r
+                        <includes>\r
+                            <include>**/authz-cmd-1.0.0-SNAPSHOT-jar-with-dependencies.jar</include>\r
+                        </includes>\r
+                    </resource>\r
+          </resources>\r
+        </configuration>\r
+      </execution>\r
+         <execution>\r
+        <id>copy-resources-4</id>\r
+        <phase>validate</phase>\r
+        <goals>\r
+          <goal>copy-resources</goal>\r
+        </goals>\r
+        <configuration>\r
+          <outputDirectory>${project.build.directory}/opt/app/aaf/authz-service/${project.version}</outputDirectory>\r
+          <resources>\r
+            <resource>\r
+                        <directory>${project.basedir}/../authz-cmd</directory>\r
+                        <includes>\r
+                            <include>**/aafcli.sh</include>\r
+                        </includes>\r
+                    </resource>\r
+          </resources>\r
+        </configuration>\r
+      </execution>\r
+          <execution>\r
+        <id>copy-resources-5</id>\r
+        <phase>validate</phase>\r
+        <goals>\r
+          <goal>copy-resources</goal>\r
+        </goals>\r
+        <configuration>\r
+          <outputDirectory>${project.build.directory}/opt/app/aaf/authz-service/${project.version}/etc</outputDirectory>\r
+          <resources>\r
+            <resource>\r
+                        <directory>${project.basedir}/../authz-cmd/etc</directory>\r
+                        <includes>\r
+                            <include>**/**</include>\r
+                        </includes>\r
+                    </resource>\r
+          </resources>\r
+        </configuration>\r
+      </execution>\r
+    </executions>\r
+  </plugin>\r
+                       <plugin>\r
+                               <groupId>org.apache.maven.plugins</groupId>\r
+                               <artifactId>maven-dependency-plugin</artifactId>\r
+                               <version>2.10</version>\r
+                               <executions>\r
+                                       <execution>\r
+                                               <id>copy-dependencies</id>\r
+                                               <phase>package</phase>\r
+                                               <goals>\r
+                                                       <goal>copy-dependencies</goal>\r
+                                               </goals>\r
+                                               <configuration>\r
+                                                       <outputDirectory>${project.build.directory}/opt/app/aaf/authz-service/${project.version}/lib</outputDirectory>\r
+                                                       <overWriteReleases>false</overWriteReleases>\r
+                                                       <overWriteSnapshots>false</overWriteSnapshots>\r
+                                                       <overWriteIfNewer>true</overWriteIfNewer>\r
+                                               </configuration>\r
+                                       </execution>\r
+                               </executions>\r
+                       </plugin>\r
+                               \r
                    <plugin>\r
                        <groupId>org.codehaus.mojo</groupId>\r
                        <artifactId>exec-maven-plugin</artifactId>\r
diff --git a/authz-service/src/main/resources/authAPI.props b/authz-service/src/main/resources/authAPI.props
deleted file mode 100644 (file)
index 6bc7869..0000000
+++ /dev/null
@@ -1,24 +0,0 @@
-##
-## AUTHZ API (authz-service) Properties
-##
-
-hostname=_HOSTNAME_
-
-## DISCOVERY (DME2) Parameters on the Command Line
-AFT_LATITUDE=_AFT_LATITUDE_
-AFT_LONGITUDE=_AFT_LONGITUDE_
-AFT_ENVIRONMENT=_AFT_ENVIRONMENT_
-DEPLOYED_VERSION=_ARTIFACT_VERSION_
-
-## Pull in common/security properties
-
-cadi_prop_files=_COMMON_DIR_/com.att.aaf.common.props;_COMMON_DIR_/com.att.aaf.props
-
-##DME2 related parameters
-
-DMEServiceName=service=com.att.authz.AuthorizationService/version=_MAJOR_VER_._MINOR_VER_._PATCH_VER_/envContext=_ENV_CONTEXT_/routeOffer=_ROUTE_OFFER_
-AFT_DME2_PORT_RANGE=_AUTHZ_SERVICE_PORT_RANGE_
-
-
-CACHE_HIGH_COUNT=20000
-CACHE_CLEAN_INTERVAL=60000
\ No newline at end of file
diff --git a/authz-service/src/main/resources/dme2reg/service=org.onap.aaf.authz.AuthorizationService/version=2.0/envContext=DEV/routeOffer=BAU_SE.txt b/authz-service/src/main/resources/dme2reg/service=org.onap.aaf.authz.AuthorizationService/version=2.0/envContext=DEV/routeOffer=BAU_SE.txt
new file mode 100644 (file)
index 0000000..b88df64
--- /dev/null
@@ -0,0 +1,8 @@
+#
+#Wed Nov 30 23:48:45 EST 2016
+alcdtl15rj6015,60498=latitude\=32.78014;longitude\=-96.800451;lease\=1480372013837;protocol\=http;contextPath\=/;routeOffer\=BAU_SE
+ALCDTL46RJ6015,55998=latitude\=32.78014;longitude\=-96.800451;lease\=1479687428093;protocol\=http;contextPath\=/;routeOffer\=BAU_SE
+localhost,42246=latitude\=32.78014;longitude\=-96.800451;lease\=1478985613892;protocol\=http;contextPath\=/;routeOffer\=BAU_SE
+localhost,39157=latitude\=32.78014;longitude\=-96.800451;lease\=1478811101528;protocol\=http;contextPath\=/;routeOffer\=BAU_SE
+alcdtl15rj6015,55889=latitude\=32.78014;longitude\=-96.800451;lease\=1480371829514;protocol\=http;contextPath\=/;routeOffer\=BAU_SE
+localhost,36473=latitude\=32.78014;longitude\=-96.800451;lease\=1478801682319;protocol\=http;contextPath\=/;routeOffer\=BAU_SE
diff --git a/authz-service/src/main/resources/docker/Dockerfile b/authz-service/src/main/resources/docker/Dockerfile
new file mode 100644 (file)
index 0000000..6894ed8
--- /dev/null
@@ -0,0 +1,9 @@
+FROM openjdk:8-jdk \r
+ADD opt /opt/\r
+ADD authz-service-1.0.0-SNAPSHOT.jar /opt/app/aaf/authz-service/1.0.0-SNAPSHOT/lib/authz-service-1.0.0-SNAPSHOT.jar\r
+ADD startup.sh /startup.sh\r
+RUN chmod 777 /startup.sh\r
+RUN chmod -R 777 /opt/app/aaf/authz-service/1.0.0-SNAPSHOT/etc\r
+ENTRYPOINT ./startup.sh\r
+\r
+\r
diff --git a/authz-service/src/main/resources/docker/authAPI.props b/authz-service/src/main/resources/docker/authAPI.props
new file mode 100644 (file)
index 0000000..f8c1b40
--- /dev/null
@@ -0,0 +1,111 @@
+##\r
+## AUTHZ API (authz-service) Properties\r
+##\r
+#hostname=localhost\r
+hostname=0.0.0.0\r
+# Standard AFT for THIS box, and THIS box is in St Louis.  Put your own LAT/LONG in here.  Use "bing.com/maps" or \r
+# SWMTools (geoloc for DataCenters) to get YOURs\r
+\r
+AFT_LATITUDE=32.780140\r
+AFT_LONGITUDE=-96.800451\r
+AFT_ENVIRONMENT=AFTUAT\r
+DEPLOYED_VERSION=2.0.SAMPLE\r
+\r
+##DME2 related parameters\r
+DMEServiceName=service=org.onap.aaf.authz.AuthorizationService/version=2.0/envContext=DEV/routeOffer=BAU_SE\r
+\r
+#DME2 can limit Port Ranges with the following:\r
+#AFT_DME2_PORT_RANGE=8101-8029,8100\r
+#DME2 picks any unused port in +1024 range\r
+#AFT_DME2_PORT=0\r
+AFT_DME2_ALLOW_PORT_CACHING=false\r
+aaf_root_ns=org.openecomp\r
+\r
+# Point to "Common" files, used between all the AAF Services. ... \r
+\r
+# DEVELOPER ONLY SETTING!!!!!  DO NOT USE on ANY BOX other than your Developer box, and it\r
+# would be better if you got a Cert for that, and remove this!  There is nothing stupider than\r
+# an unsecured Security Service.\r
+cadi_trust_all_x509=true\r
+\r
+# Public (i.e. Verisign) Key stores.\r
+# AFT_DME2_KEYSTORE=\r
+# AFT_DME2_KEYSTORE_PASSWORD=\r
+# AFT_DME2_KEY_PASSWORD=\r
+# cadi_truststore=\r
+# cadi_truststore_password=\r
+\r
+# Standard for this App/Machine\r
+aaf_env=DEV\r
+aaf_data_dir=../data\r
+cadi_loglevel=WARN\r
+aaf_id=<osaaf's Application Identity>\r
+aaf_password=enc:31-LFPNtP9Yl1DZKAz1rx8N8YfYVY8VKnnDr\r
+\r
+aaf_conn_timeout=6000\r
+aaf_timeout=10000\r
+aaf_user_expires=600000\r
+aaf_clean_interval=45000\r
+aaf_refresh_trigger_count=3\r
+aaf_high_count=30000\r
+\r
+# Basic Auth\r
+aaf_default_realm=openecomp.org\r
+#aaf_domain_support=.org\r
+basic_realm=openecomp.org\r
+basic_warn=false\r
+aaf_root_ns=org.openecomp\r
+localhost_deny=false\r
+\r
+\r
+# Cassandra\r
+# IP:Cass DataCenter:Latitude:Longitude,IP....\r
+cassandra.clusters=127.0.0.1\r
+cassandra.clusters.port=9042\r
+cassandra.clusters.user=authz\r
+cassandra.clusters.password=authz\r
+## Exceptions from Cassandra which require resetting the Cassandra Connections\r
+cassandra.reset.exceptions=com.datastax.driver.core.exceptions.NoHostAvailableException:"no host was tried":"Connection has been closed"\r
+\r
+# Consistency Settings\r
+cassandra.writeConsistency.ns=LOCAL_QUORUM\r
+cassandra.writeConsistency.perm=LOCAL_QUORUM\r
+cassandra.writeConsistency.role=LOCAL_QUORUM\r
+cassandra.writeConsistency.user_role=LOCAL_QUORUM\r
+cassandra.writeConsistency.cred=LOCAL_QUORUM\r
+cassandra.writeConsistency.ns_attrib=LOCAL_QUORUM\r
+\r
+## Supported Plugin Organizational Units\r
+Organization.com.osaaf=org.onap.aaf.osaaf.defOrg.DefaultOrg\r
+\r
+## Email Server settings for Def Organization.\r
+#Sender's email ID needs to be mentioned\r
+com.osaaf.mailFromUserId=mailid@bogus.com\r
+com.osaaf.supportEmail=support@bogus.com\r
+com.osaaf.mailHost=smtp.bogus.com\r
+\r
+# Standard AAF DME2 Props\r
+AFT_DME2_REMOVE_PERSISTENT_CACHE_ON_STARTUP=TRUE\r
+AFT_DME2_DISABLE_PERSISTENT_CACHE=TRUE\r
+AFT_DME2_DISABLE_PERSISTENT_CACHE_LOAD=TRUE\r
+\r
+## SSL OPTIONAL ONLY IN DEVELOPMENT PC/Local... WHATEVER YOU DO, don't use this on any box than your local PC\r
+AFT_DME2_SSL_ENABLE=false\r
+# for when you turn on SSL... Only TLSv1.1+ is secure as of 2016\r
+AFT_DME2_SSL_WANT_CLIENT_AUTH=TRUE\r
+AFT_DME2_SSL_INCLUDE_PROTOCOLS=TLSv1.1,TLSv1.2\r
+AFT_DME2_SSL_VALIDATE_CERTS=FALSE\r
+AFT_DME2_CLIENT_IGNORE_SSL_CONFIG=false\r
+\r
+## Extra CA Trusts, for Certifiate Manager to build truststore with external CAs\r
+cm_trust_cas=VerisignG3_CA.cer;VerisignG4_CA.cer;VerisignG5_CA.cer\r
+\r
+\r
+#cadi_prop_files=com.osaaf.common.props;com.osaaf.props\r
+cadi_prop_files=opt/app/aaf/authz-service/1.0.0-SNAPSHOT/etc/com.osaaf.common.props;opt/app/aaf/authz-service/1.0.0-SNAPSHOT/etc/com.osaaf.props\r
+CACHE_HIGH_COUNT=40000\r
+CACHE_CLEAN_INTERVAL=60000\r
+\r
+\r
+\r
+\r
diff --git a/authz-service/src/main/resources/docker/com.osaaf.common.props b/authz-service/src/main/resources/docker/com.osaaf.common.props
new file mode 100644 (file)
index 0000000..5bf127c
--- /dev/null
@@ -0,0 +1,81 @@
+############################################################
+# Properties Written by Jonathan Gathman
+#   on 2016-08-12T04:17:59.628-0500
+# These properties encapsulate the Verisign Public Certificates
+############################################################
+# DEVELOPER ONLY SETTING!!!!!  DO NOT USE on ANY BOX other than your Developer box, and it
+# would be better if you got a Cert for that, and remove this!  There is nothing stupider than
+# an unsecured Security Service.
+cadi_trust_all_x509=true
+
+# Public (i.e. Verisign) Key stores.
+# AFT_DME2_KEYSTORE=
+# AFT_DME2_KEYSTORE_PASSWORD=
+# AFT_DME2_KEY_PASSWORD=
+# cadi_truststore=
+# cadi_truststore_password=
+
+# Standard for this App/Machine
+aaf_env=DEV
+aaf_data_dir=../data
+cadi_loglevel=WARN
+aaf_id=<osaaf's Application Identity>
+aaf_password=enc:31-LFPNtP9Yl1DZKAz1rx8N8YfYVY8VKnnDr
+
+aaf_conn_timeout=6000
+aaf_timeout=10000
+aaf_user_expires=600000
+aaf_clean_interval=45000
+aaf_refresh_trigger_count=3
+aaf_high_count=30000
+
+# Basic Auth
+aaf_default_realm=openecomp.org
+#aaf_domain_support=.org
+basic_realm=openecomp.org
+basic_warn=false
+aaf_root_ns=org.openecomp
+localhost_deny=false
+
+
+# Cassandra
+# IP:Cass DataCenter:Latitude:Longitude,IP....
+cassandra.clusters=127.0.0.1
+cassandra.clusters.port=9042
+cassandra.clusters.user=authz
+cassandra.clusters.password=authz
+## Exceptions from Cassandra which require resetting the Cassandra Connections
+cassandra.reset.exceptions=com.datastax.driver.core.exceptions.NoHostAvailableException:"no host was tried":"Connection has been closed"
+
+# Consistency Settings
+cassandra.writeConsistency.ns=LOCAL_QUORUM
+cassandra.writeConsistency.perm=LOCAL_QUORUM
+cassandra.writeConsistency.role=LOCAL_QUORUM
+cassandra.writeConsistency.user_role=LOCAL_QUORUM
+cassandra.writeConsistency.cred=LOCAL_QUORUM
+cassandra.writeConsistency.ns_attrib=LOCAL_QUORUM
+
+## Supported Plugin Organizational Units
+Organization.com.osaaf=org.onap.aaf.osaaf.defOrg.DefaultOrg
+
+## Email Server settings for Def Organization.
+#Sender's email ID needs to be mentioned
+com.osaaf.mailFromUserId=mailid@bogus.com
+com.osaaf.supportEmail=support@bogus.com
+com.osaaf.mailHost=smtp.bogus.com
+
+# Standard AAF DME2 Props
+AFT_DME2_REMOVE_PERSISTENT_CACHE_ON_STARTUP=TRUE
+AFT_DME2_DISABLE_PERSISTENT_CACHE=TRUE
+AFT_DME2_DISABLE_PERSISTENT_CACHE_LOAD=TRUE
+
+## SSL OPTIONAL ONLY IN DEVELOPMENT PC/Local... WHATEVER YOU DO, don't use this on any box than your local PC
+AFT_DME2_SSL_ENABLE=false
+# for when you turn on SSL... Only TLSv1.1+ is secure as of 2016
+AFT_DME2_SSL_WANT_CLIENT_AUTH=TRUE
+AFT_DME2_SSL_INCLUDE_PROTOCOLS=TLSv1.1,TLSv1.2
+AFT_DME2_SSL_VALIDATE_CERTS=FALSE
+AFT_DME2_CLIENT_IGNORE_SSL_CONFIG=false
+
+## Extra CA Trusts, for Certifiate Manager to build truststore with external CAs
+cm_trust_cas=VerisignG3_CA.cer;VerisignG4_CA.cer;VerisignG5_CA.cer
diff --git a/authz-service/src/main/resources/docker/com.osaaf.props b/authz-service/src/main/resources/docker/com.osaaf.props
new file mode 100644 (file)
index 0000000..24a0add
--- /dev/null
@@ -0,0 +1,9 @@
+############################################################
+# Initial File for Generating
+#   on 2016-10-26T06:56:19.905-0500
+# @copyright 2016, AT&T
+############################################################
+cm_url=https://<certificate manager host>:8150
+hostname=localhost
+cadi_x509_issuers=CN=ATT CADI Issuing CA - Test 01, OU=CSO, O=ATT, C=US
+#cadi_keyfile=keyfile
diff --git a/authz-service/src/main/resources/docker/startup.sh b/authz-service/src/main/resources/docker/startup.sh
new file mode 100644 (file)
index 0000000..7b18f9d
--- /dev/null
@@ -0,0 +1,21 @@
+
+LIB=/opt/app/aaf/authz-service/1.0.0-SNAPSHOT/lib
+
+ETC=/opt/app/aaf/authz-service/1.0.0-SNAPSHOT/etc
+DME2REG=/opt/dme2reg
+
+echo "this is LIB" $LIB
+echo "this is ETC" $ETC
+echo "this is DME2REG" $DME2REG
+
+CLASSPATH=$ETC
+for FILE in `find $LIB -name *.jar`; do
+  CLASSPATH=$CLASSPATH:$FILE
+done
+java -classpath $CLASSPATH -DDME2_EP_REGISTRY_CLASS=DME2FS -DAFT_DME2_EP_REGISTRY_FS_DIR=$DME2REG org.onap.aaf.authz.service.AuthAPI
+
+
+
+
+
+
diff --git a/authz-service/src/main/resources/etc/authAPI.props b/authz-service/src/main/resources/etc/authAPI.props
new file mode 100644 (file)
index 0000000..f0dbc8b
--- /dev/null
@@ -0,0 +1,59 @@
+##\r
+## AUTHZ API (authz-service) Properties\r
+##\r
+#hostname=localhost\r
+hostname=0.0.0.0\r
+# Standard AFT for THIS box, and THIS box is in St Louis.  Put your own LAT/LONG in here.  Use "bing.com/maps" or \r
+# SWMTools (geoloc for DataCenters) to get YOURs\r
+\r
+AFT_LATITUDE=32.780140\r
+AFT_LONGITUDE=-96.800451\r
+AFT_ENVIRONMENT=AFTUAT\r
+DEPLOYED_VERSION=2.0.SAMPLE\r
+\r
+##DME2 related parameters\r
+DMEServiceName=service=org.onap.aaf.authz.AuthorizationService/version=2.0/envContext=DEV/routeOffer=BAU_SE\r
+\r
+#DME2 can limit Port Ranges with the following:\r
+#AFT_DME2_PORT_RANGE=8101-8029,8100\r
+#DME2 picks any unused port in +1024 range\r
+#AFT_DME2_PORT=0\r
+AFT_DME2_ALLOW_PORT_CACHING=false\r
+aaf_root_ns=org.openecomp\r
+\r
+# Point to "Common" files, used between all the AAF Services. ... \r
+\r
+\r
+\r
+\r
+# Cassandra\r
+# IP:Cass DataCenter:Latitude:Longitude,IP....\r
+cassandra.clusters=127.0.0.1\r
+cassandra.clusters.port=9042\r
+cassandra.clusters.user=authz\r
+cassandra.clusters.password=authz\r
+## Exceptions from Cassandra which require resetting the Cassandra Connections\r
+cassandra.reset.exceptions=com.datastax.driver.core.exceptions.NoHostAvailableException:"no host was tried":"Connection has been closed"\r
+\r
+# Consistency Settings\r
+cassandra.writeConsistency.ns=LOCAL_QUORUM\r
+cassandra.writeConsistency.perm=LOCAL_QUORUM\r
+cassandra.writeConsistency.role=LOCAL_QUORUM\r
+cassandra.writeConsistency.user_role=LOCAL_QUORUM\r
+cassandra.writeConsistency.cred=LOCAL_QUORUM\r
+cassandra.writeConsistency.ns_attrib=LOCAL_QUORUM\r
+\r
+## Supported Plugin Organizational Units\r
+Organization.com.osaaf=org.onap.aaf.osaaf.defOrg.DefaultOrg\r
+\r
+\r
+\r
+\r
+#cadi_prop_files=com.osaaf.common.props;com.osaaf.props\r
+cadi_prop_files=opt/app/aaf/authz-service/1.0.0-SNAPSHOT/etc/com.osaaf.common.props;opt/app/aaf/authz-service/1.0.0-SNAPSHOT/etc/com.osaaf.props\r
+CACHE_HIGH_COUNT=40000\r
+CACHE_CLEAN_INTERVAL=60000\r
+\r
+\r
+\r
+\r
diff --git a/authz-service/src/main/resources/etc/com.osaaf.common.props b/authz-service/src/main/resources/etc/com.osaaf.common.props
new file mode 100644 (file)
index 0000000..5bf127c
--- /dev/null
@@ -0,0 +1,81 @@
+############################################################
+# Properties Written by Jonathan Gathman
+#   on 2016-08-12T04:17:59.628-0500
+# These properties encapsulate the Verisign Public Certificates
+############################################################
+# DEVELOPER ONLY SETTING!!!!!  DO NOT USE on ANY BOX other than your Developer box, and it
+# would be better if you got a Cert for that, and remove this!  There is nothing stupider than
+# an unsecured Security Service.
+cadi_trust_all_x509=true
+
+# Public (i.e. Verisign) Key stores.
+# AFT_DME2_KEYSTORE=
+# AFT_DME2_KEYSTORE_PASSWORD=
+# AFT_DME2_KEY_PASSWORD=
+# cadi_truststore=
+# cadi_truststore_password=
+
+# Standard for this App/Machine
+aaf_env=DEV
+aaf_data_dir=../data
+cadi_loglevel=WARN
+aaf_id=<osaaf's Application Identity>
+aaf_password=enc:31-LFPNtP9Yl1DZKAz1rx8N8YfYVY8VKnnDr
+
+aaf_conn_timeout=6000
+aaf_timeout=10000
+aaf_user_expires=600000
+aaf_clean_interval=45000
+aaf_refresh_trigger_count=3
+aaf_high_count=30000
+
+# Basic Auth
+aaf_default_realm=openecomp.org
+#aaf_domain_support=.org
+basic_realm=openecomp.org
+basic_warn=false
+aaf_root_ns=org.openecomp
+localhost_deny=false
+
+
+# Cassandra
+# IP:Cass DataCenter:Latitude:Longitude,IP....
+cassandra.clusters=127.0.0.1
+cassandra.clusters.port=9042
+cassandra.clusters.user=authz
+cassandra.clusters.password=authz
+## Exceptions from Cassandra which require resetting the Cassandra Connections
+cassandra.reset.exceptions=com.datastax.driver.core.exceptions.NoHostAvailableException:"no host was tried":"Connection has been closed"
+
+# Consistency Settings
+cassandra.writeConsistency.ns=LOCAL_QUORUM
+cassandra.writeConsistency.perm=LOCAL_QUORUM
+cassandra.writeConsistency.role=LOCAL_QUORUM
+cassandra.writeConsistency.user_role=LOCAL_QUORUM
+cassandra.writeConsistency.cred=LOCAL_QUORUM
+cassandra.writeConsistency.ns_attrib=LOCAL_QUORUM
+
+## Supported Plugin Organizational Units
+Organization.com.osaaf=org.onap.aaf.osaaf.defOrg.DefaultOrg
+
+## Email Server settings for Def Organization.
+#Sender's email ID needs to be mentioned
+com.osaaf.mailFromUserId=mailid@bogus.com
+com.osaaf.supportEmail=support@bogus.com
+com.osaaf.mailHost=smtp.bogus.com
+
+# Standard AAF DME2 Props
+AFT_DME2_REMOVE_PERSISTENT_CACHE_ON_STARTUP=TRUE
+AFT_DME2_DISABLE_PERSISTENT_CACHE=TRUE
+AFT_DME2_DISABLE_PERSISTENT_CACHE_LOAD=TRUE
+
+## SSL OPTIONAL ONLY IN DEVELOPMENT PC/Local... WHATEVER YOU DO, don't use this on any box than your local PC
+AFT_DME2_SSL_ENABLE=false
+# for when you turn on SSL... Only TLSv1.1+ is secure as of 2016
+AFT_DME2_SSL_WANT_CLIENT_AUTH=TRUE
+AFT_DME2_SSL_INCLUDE_PROTOCOLS=TLSv1.1,TLSv1.2
+AFT_DME2_SSL_VALIDATE_CERTS=FALSE
+AFT_DME2_CLIENT_IGNORE_SSL_CONFIG=false
+
+## Extra CA Trusts, for Certifiate Manager to build truststore with external CAs
+cm_trust_cas=VerisignG3_CA.cer;VerisignG4_CA.cer;VerisignG5_CA.cer
diff --git a/authz-service/src/main/resources/etc/com.osaaf.props b/authz-service/src/main/resources/etc/com.osaaf.props
new file mode 100644 (file)
index 0000000..24a0add
--- /dev/null
@@ -0,0 +1,9 @@
+############################################################
+# Initial File for Generating
+#   on 2016-10-26T06:56:19.905-0500
+# @copyright 2016, AT&T
+############################################################
+cm_url=https://<certificate manager host>:8150
+hostname=localhost
+cadi_x509_issuers=CN=ATT CADI Issuing CA - Test 01, OU=CSO, O=ATT, C=US
+#cadi_keyfile=keyfile
index 8d247c2..7b18f9d 100644 (file)
@@ -1,11 +1,21 @@
-DIR=`pwd`
-LIB=$DIR/target/swm/package/nix/dist_files/opt/app/aaf/authz-service/2.0.15/lib
-ETC=$DIR/src/main/sample
-DME2REG=$DIR/../dme2reg
+
+LIB=/opt/app/aaf/authz-service/1.0.0-SNAPSHOT/lib
+
+ETC=/opt/app/aaf/authz-service/1.0.0-SNAPSHOT/etc
+DME2REG=/opt/dme2reg
+
+echo "this is LIB" $LIB
+echo "this is ETC" $ETC
+echo "this is DME2REG" $DME2REG
 
 CLASSPATH=$ETC
-for FILE in `find $LIB -depth 1 -name *.jar`; do
+for FILE in `find $LIB -name *.jar`; do
   CLASSPATH=$CLASSPATH:$FILE
 done
-java -classpath $CLASSPATH -DDME2_EP_REGISTRY_CLASS=DME2FS -DAFT_DME2_EP_REGISTRY_FS_DIR=$DME2REG com.att.authz.service.AuthAPI
+java -classpath $CLASSPATH -DDME2_EP_REGISTRY_CLASS=DME2FS -DAFT_DME2_EP_REGISTRY_FS_DIR=$DME2REG org.onap.aaf.authz.service.AuthAPI
+
+
+
+
+
 
diff --git a/dme2reg/service=org.onap.aaf.authz.AuthorizationService/version=2.0/envContext=DEV/.gitignore b/dme2reg/service=org.onap.aaf.authz.AuthorizationService/version=2.0/envContext=DEV/.gitignore
deleted file mode 100644 (file)
index 25b6eed..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-/routeOffer=BAU_SE.lock
-/routeOffer=BAU_SE.txt
diff --git a/dme2reg/service=org.onap.aaf.authz.AuthorizationService/version=2.0/envContext=DEV/routeOffer=BAU_SE.txt b/dme2reg/service=org.onap.aaf.authz.AuthorizationService/version=2.0/envContext=DEV/routeOffer=BAU_SE.txt
new file mode 100644 (file)
index 0000000..b88df64
--- /dev/null
@@ -0,0 +1,8 @@
+#
+#Wed Nov 30 23:48:45 EST 2016
+alcdtl15rj6015,60498=latitude\=32.78014;longitude\=-96.800451;lease\=1480372013837;protocol\=http;contextPath\=/;routeOffer\=BAU_SE
+ALCDTL46RJ6015,55998=latitude\=32.78014;longitude\=-96.800451;lease\=1479687428093;protocol\=http;contextPath\=/;routeOffer\=BAU_SE
+localhost,42246=latitude\=32.78014;longitude\=-96.800451;lease\=1478985613892;protocol\=http;contextPath\=/;routeOffer\=BAU_SE
+localhost,39157=latitude\=32.78014;longitude\=-96.800451;lease\=1478811101528;protocol\=http;contextPath\=/;routeOffer\=BAU_SE
+alcdtl15rj6015,55889=latitude\=32.78014;longitude\=-96.800451;lease\=1480371829514;protocol\=http;contextPath\=/;routeOffer\=BAU_SE
+localhost,36473=latitude\=32.78014;longitude\=-96.800451;lease\=1478801682319;protocol\=http;contextPath\=/;routeOffer\=BAU_SE
diff --git a/opt/app/aaf/common/.gitignore b/opt/app/aaf/common/.gitignore
deleted file mode 100644 (file)
index 4e8dea1..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-/com.osaaf.common.props
-/com.osaaf.keyfile
-/com.osaaf.props
-/mylocal.common.props
diff --git a/pom.xml b/pom.xml
index d591201..ba50a9b 100644 (file)
--- a/pom.xml
+++ b/pom.xml
@@ -1,9 +1,8 @@
 <!--
   ============LICENSE_START====================================================
-  * org.onap.aai
+  * org.onap.aaf
   * ===========================================================================
   * Copyright © 2017 AT&T Intellectual Property. All rights reserved.
-  * Copyright © 2017 Amdocs
   * ===========================================================================
   * Licensed under the Apache License, Version 2.0 (the "License");
   * you may not use this file except in compliance with the License.