From: Jonathan Gathman Date: Wed, 7 Aug 2019 15:24:03 +0000 (+0000) Subject: Merge "Sonar Fix: ApprovalDAO.java" X-Git-Tag: 2.1.17~171 X-Git-Url: https://gerrit.onap.org/r/gitweb?p=aaf%2Fauthz.git;a=commitdiff_plain;h=321dce367d74092a0ba09930c3aa526abdbd5da8;hp=de5f58719eea97ac92085568974b6c87af5e0e55 Merge "Sonar Fix: ApprovalDAO.java" --- diff --git a/.gitignore b/.gitignore index b36780dc..8259e7e7 100644 --- a/.gitignore +++ b/.gitignore @@ -6,3 +6,5 @@ /temp/ .metadata/ /cadisample/ +.classpath +/bin/ diff --git a/.gitreview b/.gitreview new file mode 100644 index 00000000..8be5c654 --- /dev/null +++ b/.gitreview @@ -0,0 +1,4 @@ +[gerrit] +host=gerrit.onap.org +port=29418 +project=aaf/authz.git diff --git a/HowToRelease.txt b/HowToRelease.txt new file mode 100644 index 00000000..03853bec --- /dev/null +++ b/HowToRelease.txt @@ -0,0 +1,8 @@ +To release, add an appropriately named Release file to the releases Directory +with the following KIND of entries, then submit. + +--- releases/2.1.16.yaml ---- +distribution_type: 'maven' +version: '2.1.16' +project: 'aaf-authz' +log_dir: 'aaf-authz-maven-stage-master/69/' diff --git a/auth-client/pom.xml b/auth-client/pom.xml index bbcffbb4..c404ab1f 100644 --- a/auth-client/pom.xml +++ b/auth-client/pom.xml @@ -19,160 +19,170 @@ * ============LICENSE_END==================================================== * --> - - 4.0.0 + + 4.0.0 org.onap.aaf.authz parent - 2.1.15-SNAPSHOT + 2.1.16-SNAPSHOT - - aaf-auth-client - AAF Auth Client - XSD Generated classes for AAF Auth - jar - - UTF-8 - true - - true - 0.7.7.201606060606 - 3.2 - jacoco - - target/code-coverage/jacoco-ut.exec - target/code-coverage/jacoco-it.exec - - **/gen/**,**/generated-sources/**,**/yang-gen**,**/pax/** - https://nexus.onap.org - /content/repositories/snapshots/ - /content/repositories/releases/ - /content/repositories/staging/ - /content/sites/site/org/onap/aaf/authz/${project.artifactId}/${project.version} - + aaf-auth-client + AAF Auth Client + XSD Generated classes for AAF Auth + jar - - - Jonathan Gathman - jonathan.gathman@att.com - ATT - - Architect - Lead Developer - - - - Gabe Maurer - gabe.maurer@att.com - ATT - - Developer - - - - Ian Howell - ian.howell@att.com - ATT - - Developer - - - - Sai Gandham - sai.gandham@att.com - ATT - - Developer - - - + + UTF-8 + true + + true + 0.7.7.201606060606 + 3.2 + jacoco + + target/code-coverage/jacoco-ut.exec + target/code-coverage/jacoco-it.exec + + **/gen/**,**/generated-sources/**,**/yang-gen**,**/pax/** + https://nexus.onap.org + /content/repositories/snapshots/ + /content/repositories/releases/ + /content/repositories/staging/ + /content/sites/site/org/onap/aaf/authz/${project.artifactId}/${project.version} + - - - - junit - junit - test - + + + Jonathan Gathman + jonathan.gathman@att.com + ATT + + Architect + Lead Developer + + + + Gabe Maurer + gabe.maurer@att.com + ATT + + Developer + + + + Ian Howell + ian.howell@att.com + ATT + + Developer + + + + Sai Gandham + sai.gandham@att.com + ATT + + Developer + + + - - - - - org.jvnet.jaxb2.maven2 - maven-jaxb2-plugin - 0.8.2 - - - - generate - - - - - src/main/xsd - - + + + junit + junit + test + - - org.apache.maven.plugins - maven-deploy-plugin - - false - - + - - org.apache.maven.plugins - maven-compiler-plugin - 2.3.2 - - 1.6 - 1.6 - - - - org.jacoco - jacoco-maven-plugin - - true - - org.onap.aaf.* - - - - - pre-unit-test - - prepare-agent - - - ${project.build.directory}/coverage-reports/jacoco.exec - - - - - pre-integration-test - pre-integration-test - - prepare-agent - - - ${project.build.directory}/coverage-reports/jacoco-it.exec - - - - + + + + org.apache.maven.plugins + maven-deploy-plugin + + true + + + + org.jvnet.jaxb2.maven2 + maven-jaxb2-plugin + 0.8.2 + + + + generate + + + + + src/main/xsd + + + + + org.apache.maven.plugins + maven-deploy-plugin + + false + + + + + org.apache.maven.plugins + maven-compiler-plugin + 2.3.2 + + 1.6 + 1.6 + + + + org.jacoco + jacoco-maven-plugin + + true + + org.onap.aaf.* + + + + + pre-unit-test + + prepare-agent + + + ${project.build.directory}/coverage-reports/jacoco.exec + + + + + pre-integration-test + pre-integration-test + + prepare-agent + + + ${project.build.directory}/coverage-reports/jacoco-it.exec + + + + merge post-integration-test - + ${project.build.directory}/coverage-reports *.exec @@ -182,26 +192,26 @@ ${project.build.directory}/jacoco-dev.exec - - - - + + + + - - ecomp-releases - AAF Release Repository - ${nexusproxy}${releaseNexusPath} - - - ecomp-snapshots - AAF Snapshot Repository - ${nexusproxy}${snapshotNexusPath} - - - ecomp-site - dav:${nexusproxy}${sitePath} - - + + ecomp-releases + AAF Release Repository + ${nexusproxy}${releaseNexusPath} + + + ecomp-snapshots + AAF Snapshot Repository + ${nexusproxy}${snapshotNexusPath} + + + ecomp-site + dav:${nexusproxy}${sitePath} + + diff --git a/auth/auth-batch/pom.xml b/auth/auth-batch/pom.xml index 304a23f7..802538ab 100644 --- a/auth/auth-batch/pom.xml +++ b/auth/auth-batch/pom.xml @@ -20,242 +20,235 @@ * --> - 4.0.0 - - org.onap.aaf.authz - authparent - 2.1.15-SNAPSHOT - ../pom.xml - - - aaf-auth-batch - AAF Auth Batch - Batch Processing for AAF Auth - jar - - - - Jonathan Gathman - jonathan.gathman@att.com - ATT - - Architect - Lead Developer - - - - Gabe Maurer - gabe.maurer@att.com - ATT - - Developer - - - - Ian Howell - ian.howell@att.com - ATT - - Developer - - - - Sai Gandham - sai.gandham@att.com - ATT - - Developer - - - - - - - - - false - - - 0.7.7.201606060606 - 3.2 - jacoco - - target/code-coverage/jacoco-ut.exec - target/code-coverage/jacoco-it.exec - - **/gen/**,**/generated-sources/**,**/yang-gen**,**/pax/** - https://nexus.onap.org - /content/repositories/snapshots/ - /content/repositories/releases/ - /content/repositories/staging/ - /content/sites/site/org/onap/aaf/authz/${project.artifactId}/${project.version} - - - - - - org.onap.aaf.authz - aaf-misc-env - - - - org.onap.aaf.authz - aaf-cadi-core - - - - org.onap.aaf.authz - aaf-misc-rosetta - - - - org.onap.aaf.authz - aaf-cadi-aaf - - - - org.onap.aaf.authz - aaf-auth-cass - - - - org.onap.aaf.authz - aaf-auth-deforg - - - - - - - - - - org.apache.maven.plugins - maven-compiler-plugin - - 1.8 - 1.8 - - - - - org.apache.maven.plugins - maven-deploy-plugin - - false - - - - org.jacoco - jacoco-maven-plugin - - - **/gen/** - **/generated-sources/** - **/yang-gen/** - **/pax/** - - - - - - pre-unit-test - - prepare-agent - - - ${project.build.directory}/code-coverage/jacoco-ut.exec - surefireArgLine - - - - - - post-unit-test - test - - report - - - ${project.build.directory}/code-coverage/jacoco-ut.exec - ${project.reporting.outputDirectory}/jacoco-ut - - - - pre-integration-test - pre-integration-test - - prepare-agent - - - ${project.build.directory}/code-coverage/jacoco-it.exec - failsafeArgLine - - - - - post-integration-test - post-integration-test - - report - - - ${project.build.directory}/code-coverage/jacoco-it.exec - ${project.reporting.outputDirectory}/jacoco-it - - - - - - maven-assembly-plugin - - tests - - - org.onap.aaf.auth.batch.Batch - - - true - - - - - - - full - package - - single - - - - src/assemble/auth-batch.xml - - - - - - - - - - - ecomp-releases - AAF Release Repository - ${nexusproxy}${releaseNexusPath} - - - ecomp-snapshots - AAF Snapshot Repository - ${nexusproxy}${snapshotNexusPath} - - - ecomp-site - dav:${nexusproxy}${sitePath} - - + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> + 4.0.0 + + org.onap.aaf.authz + authparent + 2.1.16-SNAPSHOT + ../pom.xml + + + aaf-auth-batch + AAF Auth Batch + Batch Processing for AAF Auth + jar + + + + Jonathan Gathman + jonathan.gathman@att.com + ATT + + Architect + Lead Developer + + + + Gabe Maurer + gabe.maurer@att.com + ATT + + Developer + + + + Ian Howell + ian.howell@att.com + ATT + + Developer + + + + Sai Gandham + sai.gandham@att.com + ATT + + Developer + + + + + + + + + false + + + 0.7.7.201606060606 + 3.2 + jacoco + + target/code-coverage/jacoco-ut.exec + target/code-coverage/jacoco-it.exec + + **/gen/**,**/generated-sources/**,**/yang-gen**,**/pax/** + https://nexus.onap.org + /content/repositories/snapshots/ + /content/repositories/releases/ + /content/repositories/staging/ + /content/sites/site/org/onap/aaf/authz/${project.artifactId}/${project.version} + + + + + + org.onap.aaf.authz + aaf-misc-env + + + + org.onap.aaf.authz + aaf-cadi-core + + + + org.onap.aaf.authz + aaf-misc-rosetta + + + + org.onap.aaf.authz + aaf-cadi-aaf + + + + org.onap.aaf.authz + aaf-auth-cass + + + + org.onap.aaf.authz + aaf-auth-deforg + + + + + + + + + + org.apache.maven.plugins + maven-compiler-plugin + + 1.8 + 1.8 + + + + + org.jacoco + jacoco-maven-plugin + + + **/gen/** + **/generated-sources/** + **/yang-gen/** + **/pax/** + + + + + + pre-unit-test + + prepare-agent + + + ${project.build.directory}/code-coverage/jacoco-ut.exec + surefireArgLine + + + + + + post-unit-test + test + + report + + + ${project.build.directory}/code-coverage/jacoco-ut.exec + ${project.reporting.outputDirectory}/jacoco-ut + + + + pre-integration-test + pre-integration-test + + prepare-agent + + + ${project.build.directory}/code-coverage/jacoco-it.exec + failsafeArgLine + + + + + post-integration-test + post-integration-test + + report + + + ${project.build.directory}/code-coverage/jacoco-it.exec + ${project.reporting.outputDirectory}/jacoco-it + + + + + + maven-assembly-plugin + + tests + + + org.onap.aaf.auth.batch.Batch + + + true + + + + + + + full + package + + single + + + + src/assemble/auth-batch.xml + + + + + + + + + + + ecomp-releases + AAF Release Repository + ${nexusproxy}${releaseNexusPath} + + + ecomp-snapshots + AAF Snapshot Repository + ${nexusproxy}${snapshotNexusPath} + + + ecomp-site + dav:${nexusproxy}${sitePath} + + diff --git a/auth/auth-batch/src/main/java/org/onap/aaf/auth/batch/reports/ApprovedRpt.java b/auth/auth-batch/src/main/java/org/onap/aaf/auth/batch/reports/ApprovedRpt.java index 7b6e09f5..a943cbc2 100644 --- a/auth/auth-batch/src/main/java/org/onap/aaf/auth/batch/reports/ApprovedRpt.java +++ b/auth/auth-batch/src/main/java/org/onap/aaf/auth/batch/reports/ApprovedRpt.java @@ -30,13 +30,10 @@ import java.util.List; import java.util.Map; import java.util.TreeMap; import java.util.UUID; - import org.onap.aaf.auth.batch.Batch; import org.onap.aaf.auth.env.AuthzTrans; import org.onap.aaf.auth.org.OrganizationException; -import org.onap.aaf.cadi.routing.GreatCircle; import org.onap.aaf.cadi.util.CSV; -import org.onap.aaf.cadi.util.CSV.Visitor; import org.onap.aaf.cadi.util.CSV.Writer; import org.onap.aaf.misc.env.APIException; import org.onap.aaf.misc.env.Env; diff --git a/auth/auth-batch/src/test/java/org/onap/aaf/auth/batch/approvalsets/JU_ApprovalSetTest.java b/auth/auth-batch/src/test/java/org/onap/aaf/auth/batch/approvalsets/JU_ApprovalSetTest.java new file mode 100644 index 00000000..fe7bd6c5 --- /dev/null +++ b/auth/auth-batch/src/test/java/org/onap/aaf/auth/batch/approvalsets/JU_ApprovalSetTest.java @@ -0,0 +1,150 @@ +/** + * ============LICENSE_START==================================================== + * org.onap.aaf + * =========================================================================== + * Copyright (c) 2018 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==================================================== + * + */ + +package org.onap.aaf.auth.batch.approvalsets; + +import static org.junit.Assert.assertFalse; +import static org.junit.Assert.assertTrue; +import static org.mockito.MockitoAnnotations.initMocks; + +import java.io.IOException; +import java.util.Date; +import java.util.GregorianCalendar; +import java.util.Properties; +import java.util.Set; + +import org.junit.Before; +import org.junit.Test; +import org.mockito.Mock; +import org.mockito.Mockito; +import org.onap.aaf.auth.common.Define; +import org.onap.aaf.auth.dao.cass.ApprovalDAO; +import org.onap.aaf.auth.dao.cass.FutureDAO; +import org.onap.aaf.auth.env.AuthzTrans; +import org.onap.aaf.auth.layer.Result; +import org.onap.aaf.cadi.CadiException; +import org.onap.aaf.cadi.PropAccess; +import org.onap.aaf.cadi.config.Config; +import org.onap.aaf.misc.env.APIException; +import org.onap.aaf.misc.env.LogTarget; +import org.onap.aaf.misc.env.TimeTaken; + +import com.datastax.driver.core.Cluster; +import com.datastax.driver.core.ColumnDefinitions; +import com.datastax.driver.core.PreparedId; +import com.datastax.driver.core.PreparedStatement; +import com.datastax.driver.core.ResultSet; +import com.datastax.driver.core.Session; + +public class JU_ApprovalSetTest { + + @Mock + AuthzTrans trans; + @Mock + Cluster cluster; + @Mock + PropAccess access; + + @Mock + ApprovalSet actionObj; + + @Mock + DataView dv; + + @Before + public void setUp() throws APIException, IOException { + initMocks(this); + Session sessionObj=Mockito.mock(Session.class); + PreparedStatement psObj =Mockito.mock(PreparedStatement.class); + try { + Mockito.doReturn(Mockito.mock(LogTarget.class)).when(trans).init(); + Mockito.doReturn(Mockito.mock(LogTarget.class)).when(trans).warn(); + Mockito.doReturn(Mockito.mock(LogTarget.class)).when(trans).debug(); + Mockito.doReturn("10").when(trans).getProperty(Config.AAF_USER_EXPIRES, Config.AAF_USER_EXPIRES_DEF); + Mockito.doReturn(Mockito.mock(TimeTaken.class)).when(trans).start(Mockito.anyString(),Mockito.anyInt()); + Mockito.doReturn(sessionObj).when(cluster).connect("authz"); + Mockito.doReturn(psObj).when(sessionObj).prepare(Mockito.anyString()); + + Mockito.doReturn(Mockito.mock(ColumnDefinitions.class)).when(psObj).getVariables(); + Mockito.doReturn(Mockito.mock(PreparedId.class)).when(psObj).getPreparedId(); + Mockito.doReturn(Mockito.mock(Properties.class)).when(access).getProperties(); + Mockito.doReturn("test.test").when(access).getProperty(Config.AAF_ROOT_NS,"org.osaaf.aaf"); + Define.set(access); + GregorianCalendar start= new GregorianCalendar(); + actionObj = new ApprovalSet(start, "test", dv); + } catch (CadiException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } + } + + @Test + public void testPuntDate() { + actionObj.write(trans); + ApprovalDAO.Data dataObj = new ApprovalDAO.Data(); + + Result rs1 = new Result(null,0,"test",new Object[0]); + Mockito.doReturn(rs1).when(dv).insert(Mockito.any(AuthzTrans.class), Mockito.any(FutureDAO.Data.class)); + Mockito.doReturn(rs1).when(dv).insert(Mockito.any(AuthzTrans.class), Mockito.any(ApprovalDAO.Data.class)); + actionObj.ladd.add(dataObj); + Result retVal = actionObj.write(trans); + + rs1 = new Result(null,1,"test",new Object[0]); + Mockito.doReturn(rs1).when(dv).insert(Mockito.any(AuthzTrans.class), Mockito.any(ApprovalDAO.Data.class)); + retVal = actionObj.write(trans); + assertTrue("Security - test".equals(retVal.details)); + + actionObj.ladd.add(dataObj); + retVal = actionObj.write(trans); + assertTrue(retVal.details.contains("Security - test")); + + Mockito.doReturn(rs1).when(dv).insert(Mockito.any(AuthzTrans.class), Mockito.any(FutureDAO.Data.class)); + retVal = actionObj.write(trans); + assertTrue(retVal.details.contains("Security - test")); + + actionObj.setConstruct(null); + actionObj.setExpires(new GregorianCalendar()); + actionObj.setMemo(""); + actionObj.ladd = null; + actionObj.write(trans); + } + + @Test + public void testHasApprovals() { + assertFalse(actionObj.hasApprovals()); + + ApprovalDAO.Data dataObj = new ApprovalDAO.Data(); + actionObj.ladd.add(dataObj); + assertTrue(actionObj.hasApprovals()); + } + + @Test + public void testApprovers() { + Set retVal = actionObj.approvers(); + assertTrue(retVal.size() == 0); + + ApprovalDAO.Data dataObj = new ApprovalDAO.Data(); + actionObj.ladd.add(dataObj); + retVal = actionObj.approvers(); + assertTrue(retVal.size() == 1); + + } +} diff --git a/auth/auth-batch/src/test/java/org/onap/aaf/auth/batch/approvalsets/JU_Pending.java b/auth/auth-batch/src/test/java/org/onap/aaf/auth/batch/approvalsets/JU_Pending.java new file mode 100644 index 00000000..eca5ed7c --- /dev/null +++ b/auth/auth-batch/src/test/java/org/onap/aaf/auth/batch/approvalsets/JU_Pending.java @@ -0,0 +1,133 @@ +/** + * ============LICENSE_START==================================================== + * org.onap.aaf + * =========================================================================== + * Copyright (c) 2018 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==================================================== + * + */ + +package org.onap.aaf.auth.batch.approvalsets; + +import static org.junit.Assert.assertTrue; +import static org.mockito.MockitoAnnotations.initMocks; + +import java.io.IOException; +import java.text.ParseException; +import java.util.ArrayList; +import java.util.Calendar; +import java.util.Date; +import java.util.List; + +import org.junit.Before; +import org.junit.Test; +import org.mockito.Mock; +import org.mockito.Mockito; +import org.onap.aaf.auth.env.AuthzTrans; +import org.onap.aaf.cadi.PropAccess; +import org.onap.aaf.cadi.util.CSV.Writer; +import org.onap.aaf.misc.env.APIException; + +import com.datastax.driver.core.Cluster; + +public class JU_Pending { + + @Mock + AuthzTrans trans; + @Mock + Cluster cluster; + @Mock + PropAccess access; + + @Mock + DataView dv; + + @Before + public void setUp() throws APIException, IOException { + initMocks(this); + } + + @Test + public void testRow() { + Writer approveCW = Mockito.mock(Writer.class); + Mockito.doNothing().when(approveCW).row(Mockito.anyString(), + Mockito.anyString(), Mockito.anyBoolean(), Mockito.anyString(), + Mockito.anyInt()); + Pending pendingObj = new Pending(new Date()); + pendingObj.row(approveCW, "key"); + Date date = null; + pendingObj = new Pending(date); + } + + @Test + public void testInc() { + List inpList = new ArrayList<>(); + inpList.add("test"); + inpList.add("test"); + inpList.add("test"); + inpList.add(null); + inpList.add("10"); + try { + Pending pendingObj = new Pending(inpList); + pendingObj.inc(); + assertTrue(11 == pendingObj.qty()); + + Pending tempPending = new Pending(inpList); + pendingObj.inc(tempPending); + assertTrue(21 == pendingObj.qty()); + + tempPending.earliest = new Date(); + pendingObj.earliest = new Date(); + pendingObj.inc(tempPending); + + Calendar calendar = Calendar.getInstance(); + calendar.add(Calendar.DAY_OF_YEAR, 1); + pendingObj.earliest = calendar.getTime(); + pendingObj.inc(tempPending); + } catch (ParseException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } + } + + @Test + public void testEarliest() { + List inpList = new ArrayList<>(); + try { + inpList.add("test"); + inpList.add("test"); + inpList.add("test"); + inpList.add("2019-01-01"); + inpList.add("10"); + Pending.create(); + + Pending pendingObj = new Pending(inpList); + pendingObj.earliest(null); + + pendingObj.earliest = null; + pendingObj.earliest(new Date()); + + Calendar calendar = Calendar.getInstance(); + calendar.add(Calendar.DAY_OF_YEAR, 1); + pendingObj.earliest(calendar.getTime()); + assertTrue(119 == pendingObj.earliest().getYear()); + assertTrue(pendingObj.newApprovals()); + } catch (ParseException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } + } + +} diff --git a/auth/auth-batch/src/test/java/org/onap/aaf/auth/batch/approvalsets/JU_URApprovalSet.java b/auth/auth-batch/src/test/java/org/onap/aaf/auth/batch/approvalsets/JU_URApprovalSet.java new file mode 100644 index 00000000..dd9527a1 --- /dev/null +++ b/auth/auth-batch/src/test/java/org/onap/aaf/auth/batch/approvalsets/JU_URApprovalSet.java @@ -0,0 +1,234 @@ +/** + * ============LICENSE_START==================================================== + * org.onap.aaf + * =========================================================================== + * Copyright (c) 2018 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==================================================== + * + */ + +package org.onap.aaf.auth.batch.approvalsets; + +import static org.junit.Assert.assertTrue; +import static org.mockito.MockitoAnnotations.initMocks; + +import java.io.IOException; +import java.util.ArrayList; +import java.util.Date; +import java.util.GregorianCalendar; +import java.util.List; + +import org.junit.Before; +import org.junit.Test; +import org.mockito.Mock; +import org.mockito.Mockito; +import org.onap.aaf.auth.dao.cass.NsDAO; +import org.onap.aaf.auth.dao.cass.RoleDAO; +import org.onap.aaf.auth.dao.cass.UserRoleDAO; +import org.onap.aaf.auth.dao.cass.UserRoleDAO.Data; +import org.onap.aaf.auth.env.AuthzTrans; +import org.onap.aaf.auth.layer.Result; +import org.onap.aaf.auth.org.Organization; +import org.onap.aaf.auth.org.Organization.Identity; +import org.onap.aaf.auth.org.OrganizationException; +import org.onap.aaf.cadi.CadiException; +import org.onap.aaf.cadi.PropAccess; +import org.onap.aaf.org.DefaultOrgIdentity; + +import com.datastax.driver.core.Cluster; + +public class JU_URApprovalSet { + + @Mock + AuthzTrans trans; + @Mock + Cluster cluster; + @Mock + PropAccess access; + + @Mock + DataView dv; + + URApprovalSet approvalObj; + + @Mock + Loader lurdd; + + @Before + public void setUp() { + initMocks(this); + } + + @Test + public void testConstructor() { + GregorianCalendar start = new GregorianCalendar(); + UserRoleDAO.Data urdd = new UserRoleDAO.Data(); + urdd.rname = "owner"; + urdd.expires = new Date(); + Organization orgObj = Mockito.mock(Organization.class); + try { + + Mockito.doReturn(urdd).when(lurdd).load(); + Mockito.doReturn(orgObj).when(trans).org(); + Mockito.doReturn(Mockito.mock(GregorianCalendar.class)).when(orgObj) + .expiration(null, Organization.Expiration.UserInRole); + + Result rsRoleData = new Result(null, 0, + "test", new Object[0]); + Mockito.doReturn(rsRoleData).when(dv).roleByName(trans, urdd.role); + approvalObj = new URApprovalSet(trans, start, dv, lurdd); + } catch (CadiException e) { + assertTrue(e.getMessage().contains("Error - test")); + } catch (IOException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } + + try { + urdd.rname = "admin"; + RoleDAO.Data dataObj = new RoleDAO.Data(); + Result rsRoleData = new Result(dataObj, + 0, "test", new Object[0]); + Mockito.doReturn(rsRoleData).when(dv).roleByName(trans, urdd.role); + + Result rsNsData = new Result(null, 0, + "test", new Object[0]); + Mockito.doReturn(rsNsData).when(dv).ns(trans, urdd.ns); + approvalObj = new URApprovalSet(trans, start, dv, lurdd); + } catch (CadiException e) { + assertTrue(e.getMessage().contains("Error - test")); + } catch (IOException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } + + try { + urdd.rname = "rname"; + NsDAO.Data dataObj = new NsDAO.Data(); + + Result rsNsData = new Result(dataObj, 0, + "test", new Object[0]); + Mockito.doReturn(rsNsData).when(dv).ns(trans, urdd.ns); + + Result> rsData = new Result>(null, 1, "test", + new Object[0]); + Mockito.doReturn(rsData).when(dv).ursByRole(trans, urdd.role); + approvalObj = new URApprovalSet(trans, start, dv, lurdd); + } catch (CadiException e) { + assertTrue(e.getMessage() + .contains("User 'null' in Role 'null' does not exist")); + } catch (IOException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } + + try { + + List dataAL = new ArrayList<>(); + Data data = new Data(); + data.user = "user"; + urdd.user = "test"; + dataAL.add(data); + Result> rsData = new Result>(dataAL, 0, + "test", new Object[0]); + Mockito.doReturn(rsData).when(dv).ursByRole(trans, urdd.role); + approvalObj = new URApprovalSet(trans, start, dv, lurdd); + } catch (CadiException e) { + assertTrue(e.getMessage() + .contains("User 'test' in Role 'null' does not exist")); + } catch (IOException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } + + try { + + List dataAL = new ArrayList<>(); + Data data = new Data(); + data.user = "user"; + urdd.user = "user"; + dataAL.add(data); + Result> rsData = new Result>(dataAL, 0, + "test", new Object[0]); + Mockito.doReturn(rsData).when(dv).ursByRole(trans, urdd.role); + + Result> rsURData = new Result>( + null, 1, "test", new Object[0]); + Mockito.doReturn(rsURData).when(dv).ursByRole(trans, + urdd.ns + ".owner"); + + approvalObj = new URApprovalSet(trans, start, dv, lurdd); + + List urDataAL = new ArrayList<>(); + UserRoleDAO.Data urData = new UserRoleDAO.Data(); + urData.user = "user"; + urDataAL.add(urData); + rsURData = new Result>(urDataAL, 0, "test", + new Object[0]); + Mockito.doReturn(rsURData).when(dv).ursByRole(trans, + urdd.ns + ".owner"); + approvalObj = new URApprovalSet(trans, start, dv, lurdd); + + List identityAL = new ArrayList(); + Identity idenObj = Mockito.mock(DefaultOrgIdentity.class); + identityAL.add(idenObj); + + try { + Mockito.doReturn(identityAL).when(orgObj).getApprovers(trans, + urdd.user); + } catch (OrganizationException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } + approvalObj = new URApprovalSet(trans, start, dv, lurdd); + + urDataAL = new ArrayList<>(); + urData = new UserRoleDAO.Data(); + urData.user = "user1"; + urDataAL.add(urData); + rsURData = new Result>(urDataAL, 0, "test", + new Object[0]); + Mockito.doReturn(rsURData).when(dv).ursByRole(trans, + urdd.ns + ".owner"); + approvalObj = new URApprovalSet(trans, start, dv, lurdd); + } catch (CadiException e) { + assertTrue(e.getMessage() + .contains("User 'null' in Role 'null' does not exist")); + } catch (IOException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } + + try { + try { + Mockito.doThrow(new OrganizationException()).when(orgObj) + .getApprovers(trans, urdd.user); + } catch (OrganizationException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } + approvalObj = new URApprovalSet(trans, start, dv, lurdd); + } catch (CadiException e) { + e.printStackTrace(); + assertTrue(e.getMessage() + .contains("User 'null' in Role 'null' does not exist")); + } catch (IOException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } + + } + +} diff --git a/auth/auth-batch/src/test/java/org/onap/aaf/auth/batch/helpers/JU_BatchDataViewTest.java b/auth/auth-batch/src/test/java/org/onap/aaf/auth/batch/helpers/JU_BatchDataViewTest.java new file mode 100644 index 00000000..b918c31d --- /dev/null +++ b/auth/auth-batch/src/test/java/org/onap/aaf/auth/batch/helpers/JU_BatchDataViewTest.java @@ -0,0 +1,174 @@ +/** + * ============LICENSE_START==================================================== + * org.onap.aaf + * =========================================================================== + * Copyright (c) 2018 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==================================================== + * + */ + +package org.onap.aaf.auth.batch.helpers; + +import static org.junit.Assert.assertTrue; +import static org.mockito.MockitoAnnotations.initMocks; + +import java.io.IOException; +import java.nio.ByteBuffer; +import java.util.Date; +import java.util.List; +import java.util.UUID; + +import org.junit.Before; +import org.junit.Test; +import org.mockito.Mock; +import org.mockito.Mockito; +import org.onap.aaf.auth.dao.cass.ApprovalDAO; +import org.onap.aaf.auth.dao.cass.FutureDAO; +import org.onap.aaf.auth.dao.cass.NsDAO; +import org.onap.aaf.auth.dao.cass.RoleDAO; +import org.onap.aaf.auth.dao.cass.UserRoleDAO; +import org.onap.aaf.auth.env.AuthzTrans; +import org.onap.aaf.auth.layer.Result; +import org.onap.aaf.cadi.PropAccess; +import org.onap.aaf.misc.env.APIException; +import org.onap.aaf.misc.env.TimeTaken; + +import com.datastax.driver.core.Session; + +public class JU_BatchDataViewTest { + + @Mock + AuthzTrans trans; + + @Mock + Session session; + + @Mock + PropAccess access; + + BatchDataView batchDataViewObj; + + @Before + public void setUp() throws APIException, IOException { + initMocks(this); + batchDataViewObj = new BatchDataView(trans, session, true); + Mockito.doReturn(Mockito.mock(TimeTaken.class)).when(trans).start( + Mockito.anyString(), Mockito.anyInt(), Mockito.anyString()); + } + + @Test + public void testNs() { + Result retVal = batchDataViewObj.ns(trans, "test"); + assertTrue(retVal.status == 9); + + NS n = new NS("test1", "test2", "test3", 1, 2); + NS.data.put("test", n); + retVal = batchDataViewObj.ns(trans, "test"); + assertTrue(retVal.status == 0); + } + + @Test + public void testRoleByName() { + Result retVal = batchDataViewObj.roleByName(trans, + "test"); + assertTrue(retVal.status == 9); + + Role n = new Role("test1"); + n.rdd = new RoleDAO.Data(); + Role.byName.put("test", n); + retVal = batchDataViewObj.roleByName(trans, "test"); + assertTrue(retVal.status == 0); + + n.rdd = null; + Role.byName.put("test", n); + retVal = batchDataViewObj.roleByName(trans, "test"); + assertTrue(retVal.status == 9); + } + @Test + public void testUrsByRole() { + Result> retVal = batchDataViewObj + .ursByRole(trans, "test"); + assertTrue(retVal.status == 9); + + Role n = new Role("test1"); + n.rdd = new RoleDAO.Data(); + UserRole ur = new UserRole("user", "role", "ns", "rname", new Date()); + (new UserRole.DataLoadVisitor()).visit(ur); + retVal = batchDataViewObj.ursByRole(trans, "role"); + assertTrue(retVal.status == 0); + + } + @Test + public void testUrsByUser() { + Result> retVal = batchDataViewObj + .ursByUser(trans, "test"); + assertTrue(retVal.status == 9); + + Role n = new Role("test1"); + n.rdd = new RoleDAO.Data(); + UserRole ur = new UserRole("user", "role", "ns", "rname", new Date()); + (new UserRole.DataLoadVisitor()).visit(ur); + retVal = batchDataViewObj.ursByUser(trans, "user"); + assertTrue(retVal.status == 0); + + } + @Test + public void testDeleteFuture() { + FutureDAO.Data dataObj = new FutureDAO.Data(); + dataObj.id = new UUID(1000L, 1000L); + Result retVal = batchDataViewObj.delete(trans, dataObj); + assertTrue(retVal.status == 0); + + } + @Test + public void testDeleteApproval() { + ApprovalDAO.Data dataObj = new ApprovalDAO.Data(); + dataObj.id = new UUID(1000L, 1000L); + Result retVal = batchDataViewObj.delete(trans, + dataObj); + assertTrue(retVal.status == 0); + + } + + @Test + public void testInsertApproval() { + ApprovalDAO.Data dataObj = new ApprovalDAO.Data(); + dataObj.id = new UUID(1000L, 1000L); + dataObj.memo = "memo"; + dataObj.ticket = new UUID(1000L, 1000L); + Result retVal = batchDataViewObj.insert(trans, + dataObj); + assertTrue(retVal.status == 0); + + } + @Test + public void testInsertFuture() { + FutureDAO.Data dataObj = new FutureDAO.Data(); + dataObj.id = new UUID(1000L, 1000L); + dataObj.memo = "memo"; + dataObj.construct = ByteBuffer.allocate(1000); + Result retVal = batchDataViewObj.insert(trans, dataObj); + assertTrue(retVal.status == 0); + + dataObj.target_key = "memo"; + retVal = batchDataViewObj.insert(trans, dataObj); + assertTrue(retVal.status == 0); + } + @Test + public void testFlush() { + batchDataViewObj.flush(); + + } +} diff --git a/auth/auth-batch/src/test/java/org/onap/aaf/auth/batch/helpers/JU_CQLBatchLoopTest.java b/auth/auth-batch/src/test/java/org/onap/aaf/auth/batch/helpers/JU_CQLBatchLoopTest.java new file mode 100644 index 00000000..aef5d22c --- /dev/null +++ b/auth/auth-batch/src/test/java/org/onap/aaf/auth/batch/helpers/JU_CQLBatchLoopTest.java @@ -0,0 +1,177 @@ +/** + * ============LICENSE_START==================================================== + * org.onap.aaf + * =========================================================================== + * Copyright (c) 2018 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==================================================== + * + */ + +package org.onap.aaf.auth.batch.helpers; + +import static org.junit.Assert.assertTrue; +import static org.mockito.MockitoAnnotations.initMocks; + +import java.io.IOException; +import java.lang.reflect.Field; +import java.lang.reflect.Modifier; + +import org.junit.Before; +import org.junit.Test; +import org.mockito.Mock; +import org.mockito.Mockito; +import org.onap.aaf.auth.env.AuthzTrans; +import org.onap.aaf.misc.env.APIException; +import org.onap.aaf.misc.env.LogTarget; + +import com.datastax.driver.core.Session; + +public class JU_CQLBatchLoopTest { + + @Mock + AuthzTrans trans; + + @Mock + Session session; + + @Mock + LogTarget lg; + + @Mock + CQLBatch cqlBatchObj; + + CQLBatchLoop cqlBatchLoopObj; + + @Before + public void setUp() throws APIException, IOException { + initMocks(this); + Mockito.doReturn(lg).when(trans).info(); + Mockito.doReturn(new StringBuilder()).when(cqlBatchObj).begin(); + cqlBatchLoopObj = new CQLBatchLoop(cqlBatchObj, 0, false); + } + + @Test + public void testShowProgress() { + CQLBatchLoop tempLoopObj = cqlBatchLoopObj.showProgress(); + Field f; + try { + f = CQLBatchLoop.class.getDeclaredField("showProgress"); + f.setAccessible(true); + assertTrue(cqlBatchLoopObj.total() == 0); + assertTrue(f.getBoolean(tempLoopObj)); + } catch (NoSuchFieldException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } catch (SecurityException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } catch (IllegalArgumentException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } catch (IllegalAccessException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } + } + + @Test + public void testInc() { + StringBuilder sb = cqlBatchLoopObj.inc(); + sb = cqlBatchLoopObj.inc(); + assertTrue(cqlBatchLoopObj.batches() == 1); + Field f; + try { + f = CQLBatchLoop.class.getDeclaredField("showProgress"); + f.setAccessible(true); + f.set(cqlBatchLoopObj, true); + } catch (NoSuchFieldException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } catch (SecurityException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } catch (IllegalArgumentException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } catch (IllegalAccessException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } + cqlBatchLoopObj.inc(); + assertTrue(cqlBatchLoopObj.batches() == 2); + System.out.println(sb.toString()); + } + + @Test + public void testFlush() { + Field f, f1; + try { + f1 = CQLBatchLoop.class.getDeclaredField("i"); + f1.setAccessible(true); + + f1.set(cqlBatchLoopObj, -1); + } catch (NoSuchFieldException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } catch (SecurityException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } catch (IllegalArgumentException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } catch (IllegalAccessException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } + cqlBatchLoopObj.flush(); + try { + f = CQLBatchLoop.class.getDeclaredField("current"); + f1 = CQLBatchLoop.class.getDeclaredField("i"); + f.setAccessible(true); + f1.setAccessible(true); + + Field modifiersField = Field.class.getDeclaredField("modifiers"); + modifiersField.setAccessible(true); + modifiersField.setInt(f, f.getModifiers() & ~Modifier.FINAL); + + StringBuilder sb = new StringBuilder("tets"); + for (int i = 1; i < 25600; i++) { + sb = sb.append("test"); + } + f.set(cqlBatchLoopObj, sb); + f1.set(cqlBatchLoopObj, 10); + } catch (NoSuchFieldException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } catch (SecurityException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } catch (IllegalArgumentException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } catch (IllegalAccessException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } + cqlBatchLoopObj.flush(); + } + + @Test + public void testReset() { + cqlBatchLoopObj.reset(); + assertTrue(cqlBatchLoopObj.batches() == 0); + System.out.println(cqlBatchLoopObj.toString()); + } +} diff --git a/auth/auth-batch/src/test/java/org/onap/aaf/auth/batch/helpers/JU_CQLBatchTest.java b/auth/auth-batch/src/test/java/org/onap/aaf/auth/batch/helpers/JU_CQLBatchTest.java new file mode 100644 index 00000000..a826a983 --- /dev/null +++ b/auth/auth-batch/src/test/java/org/onap/aaf/auth/batch/helpers/JU_CQLBatchTest.java @@ -0,0 +1,121 @@ +/** + * ============LICENSE_START==================================================== + * org.onap.aaf + * =========================================================================== + * Copyright (c) 2018 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==================================================== + * + */ + +package org.onap.aaf.auth.batch.helpers; + +import static org.junit.Assert.assertNull; +import static org.mockito.MockitoAnnotations.initMocks; + +import java.io.IOException; +import java.lang.reflect.Field; + +import org.junit.Before; +import org.junit.Test; +import org.mockito.Mock; +import org.mockito.Mockito; +import org.onap.aaf.auth.env.AuthzTrans; +import org.onap.aaf.misc.env.APIException; +import org.onap.aaf.misc.env.LogTarget; +import org.onap.aaf.misc.env.TimeTaken; + +import com.datastax.driver.core.ResultSet; +import com.datastax.driver.core.Session; + +public class JU_CQLBatchTest { + + @Mock + AuthzTrans trans; + + @Mock + Session session; + + @Mock + LogTarget lg; + + CQLBatch cqlBatchObj; + + @Before + public void setUp() throws APIException, IOException { + initMocks(this); + Mockito.doReturn(lg).when(trans).info(); + cqlBatchObj = new CQLBatch(lg, session); + Mockito.doReturn(Mockito.mock(TimeTaken.class)).when(trans).start( + Mockito.anyString(), Mockito.anyInt(), Mockito.anyString()); + + Mockito.doReturn(Mockito.mock(ResultSet.class)).when(session) + .execute(Mockito.anyString()); + } + + @Test + public void testExecute() { + ResultSet retVal = cqlBatchObj.execute(); + assertNull(retVal); + + Field f; + try { + f = CQLBatch.class.getDeclaredField("sb"); + f.setAccessible(true); + f.set(cqlBatchObj, new StringBuilder("test")); + retVal = cqlBatchObj.execute(); + } catch (NoSuchFieldException | SecurityException + | IllegalArgumentException | IllegalAccessException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } + + } + + @Test + public void testExecute2() { + ResultSet retVal = cqlBatchObj.execute(false); + assertNull(retVal); + + Field f; + try { + f = CQLBatch.class.getDeclaredField("sb"); + f.setAccessible(true); + f.set(cqlBatchObj, new StringBuilder("test")); + retVal = cqlBatchObj.execute(true); + cqlBatchObj.toString(); + } catch (NoSuchFieldException | SecurityException + | IllegalArgumentException | IllegalAccessException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } + + } + + @Test + public void testSingleExec() { + ResultSet retVal = cqlBatchObj.singleExec(new StringBuilder("test"), + true); + assertNull(retVal); + + retVal = cqlBatchObj.singleExec(new StringBuilder("test"), false); + } + + @Test + public void testTouch() { + cqlBatchObj.touch("test", 0, 4, true); + + } + +} diff --git a/auth/auth-cass/docker/Dockerfile.cass b/auth/auth-cass/docker/Dockerfile.cass index 0406411f..c25135ed 100644 --- a/auth/auth-cass/docker/Dockerfile.cass +++ b/auth/auth-cass/docker/Dockerfile.cass @@ -31,9 +31,9 @@ COPY cass_init/*.props /opt/app/aaf/cass_init/ COPY aaf-auth-batch-${AAF_VERSION}-full.jar /opt/app/aaf/cass_init/ COPY cass_data/*.dat /opt/app/aaf/cass_init/dats/ -RUN mkdir -p /opt/app/aaf/status && chmod 777 /opt/app/aaf/status -RUN addgroup ${USER} && adduser --no-create-home --ingroup ${USER} --disabled-password --gecos "" --shell /bin/bash ${USER} -RUN chown -R ${USER}:${USER} /opt/app/aaf/cass_init +RUN mkdir -p /opt/app/aaf/status && chmod 777 /opt/app/aaf/status && \ + addgroup ${USER} && adduser --no-create-home --ingroup ${USER} --disabled-password --gecos "" --shell /bin/bash ${USER} && \ + chown -R ${USER}:${USER} /opt/app/aaf/cass_init ENTRYPOINT ["/bin/bash","/opt/app/aaf/cass_init/cmd.sh"] diff --git a/auth/auth-cass/docker/dbuild.sh b/auth/auth-cass/docker/dbuild.sh index 17d359ce..641b42ba 100644 --- a/auth/auth-cass/docker/dbuild.sh +++ b/auth/auth-cass/docker/dbuild.sh @@ -45,6 +45,8 @@ sed -e 's/${AAF_VERSION}/'${VERSION}'/g' \ cd .. cp -Rf sample/cass_data auth-cass/cass_data cp sample/data/sample.identities.dat auth-cass +pwd +ls -ltr auth-batch/target cp auth-batch/target/aaf-auth-batch-$VERSION-full.jar auth-cass echo "$0: $DOCKER build -t ${ORG}/${PROJECT}/aaf_cass:${VERSION} auth-cass" diff --git a/auth/auth-cass/docker/dcqlsh.sh b/auth/auth-cass/docker/dcqlsh.sh index 92944f00..2518eb90 100644 --- a/auth/auth-cass/docker/dcqlsh.sh +++ b/auth/auth-cass/docker/dcqlsh.sh @@ -22,5 +22,5 @@ if [ -e ../../docker/d.props ]; then . ../../docker/d.props fi -${DOCKER:=docker} exec -it aaf_cass /usr/bin/cqlsh -k authz +${DOCKER:=docker} exec -it aaf-cass /usr/bin/cqlsh -k authz diff --git a/auth/auth-cass/pom.xml b/auth/auth-cass/pom.xml index 4b9f9fee..d8e25cc3 100644 --- a/auth/auth-cass/pom.xml +++ b/auth/auth-cass/pom.xml @@ -1,235 +1,226 @@ + * org.onap.aaf * =========================================================================== + * Copyright (c) 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==================================================== + * --> - 4.0.0 - - org.onap.aaf.authz - authparent - 2.1.15-SNAPSHOT - ../pom.xml - - - aaf-auth-cass - AAF Auth Cass - Cassandra Data Libraries for AAF Auth - jar - - - - Jonathan Gathman - jonathan.gathman@att.com - ATT - - Architect - Lead Developer - - - - Gabe Maurer - gabe.maurer@att.com - ATT - - Developer - - - - Ian Howell - ian.howell@att.com - ATT - - Developer - - - - Sai Gandham - sai.gandham@att.com - ATT - - Developer - - - - - - - - 0.7.7.201606060606 - 3.2 - jacoco - - target/code-coverage/jacoco-ut.exec - target/code-coverage/jacoco-it.exec - - **/gen/**,**/generated-sources/**,**/yang-gen**,**/pax/** - https://nexus.onap.org - /content/repositories/snapshots/ - /content/repositories/releases/ - /content/repositories/staging/ - /content/sites/site/org/onap/aaf/authz/${project.artifactId}/${project.version} - - - - - org.onap.aaf.authz - aaf-auth-core - - - - org.onap.aaf.authz - aaf-cadi-aaf - - - - com.datastax.cassandra - cassandra-driver-core - - - - com.github.jnr - jnr-posix - - - - - - com.github.jnr - jnr-posix - 3.0.45 - - - - com.google.guava - guava - - - - - org.xerial.snappy - snappy-java - 1.1.1-M1 - - - - net.jpountz.lz4 - lz4 - 1.2.0 - - - - com.googlecode.jcsv - jcsv - 1.4.0 - - - - org.slf4j - slf4j-log4j12 - test - - - - - - - - org.apache.maven.plugins - maven-deploy-plugin - - false - - - - org.jacoco - jacoco-maven-plugin - - - **/gen/** - **/generated-sources/** - **/yang-gen/** - **/pax/** - - - - - - pre-unit-test - - prepare-agent - - - ${project.build.directory}/code-coverage/jacoco-ut.exec - surefireArgLine - - - - - - post-unit-test - test - - report - - - ${project.build.directory}/code-coverage/jacoco-ut.exec - ${project.reporting.outputDirectory}/jacoco-ut - - - - pre-integration-test - pre-integration-test - - prepare-agent - - - ${project.build.directory}/code-coverage/jacoco-it.exec - failsafeArgLine - - - - - post-integration-test - post-integration-test - - report - - - ${project.build.directory}/code-coverage/jacoco-it.exec - ${project.reporting.outputDirectory}/jacoco-it - - - - - - - - - - ecomp-releases - AAF Release Repository - ${nexusproxy}${releaseNexusPath} - - - ecomp-snapshots - AAF Snapshot Repository - ${nexusproxy}${snapshotNexusPath} - - - ecomp-site - dav:${nexusproxy}${sitePath} - - + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> + 4.0.0 + + org.onap.aaf.authz + authparent + 2.1.16-SNAPSHOT + ../pom.xml + + + aaf-auth-cass + AAF Auth Cass + Cassandra Data Libraries for AAF Auth + jar + + + + Jonathan Gathman + jonathan.gathman@att.com + ATT + + Architect + Lead Developer + + + + Gabe Maurer + gabe.maurer@att.com + ATT + + Developer + + + + Ian Howell + ian.howell@att.com + ATT + + Developer + + + + Sai Gandham + sai.gandham@att.com + ATT + + Developer + + + + + + + + 0.7.7.201606060606 + 3.2 + jacoco + + target/code-coverage/jacoco-ut.exec + target/code-coverage/jacoco-it.exec + + **/gen/**,**/generated-sources/**,**/yang-gen**,**/pax/** + https://nexus.onap.org + /content/repositories/snapshots/ + /content/repositories/releases/ + /content/repositories/staging/ + /content/sites/site/org/onap/aaf/authz/${project.artifactId}/${project.version} + + + + + org.onap.aaf.authz + aaf-auth-core + + + + org.onap.aaf.authz + aaf-cadi-aaf + + + + com.datastax.cassandra + cassandra-driver-core + + + + com.github.jnr + jnr-posix + + + + + + com.github.jnr + jnr-posix + 3.0.45 + + + + com.google.guava + guava + + + + + org.xerial.snappy + snappy-java + 1.1.1-M1 + + + + net.jpountz.lz4 + lz4 + 1.2.0 + + + + com.googlecode.jcsv + jcsv + 1.4.0 + + + + org.slf4j + slf4j-log4j12 + test + + + + + + org.jacoco + jacoco-maven-plugin + + + **/gen/** + **/generated-sources/** + **/yang-gen/** + **/pax/** + + + + + + pre-unit-test + + prepare-agent + + + ${project.build.directory}/code-coverage/jacoco-ut.exec + surefireArgLine + + + + + + post-unit-test + test + + report + + + ${project.build.directory}/code-coverage/jacoco-ut.exec + ${project.reporting.outputDirectory}/jacoco-ut + + + + pre-integration-test + pre-integration-test + + prepare-agent + + + ${project.build.directory}/code-coverage/jacoco-it.exec + failsafeArgLine + + + + + post-integration-test + post-integration-test + + report + + + ${project.build.directory}/code-coverage/jacoco-it.exec + ${project.reporting.outputDirectory}/jacoco-it + + + + + + + + + + ecomp-releases + AAF Release Repository + ${nexusproxy}${releaseNexusPath} + + + ecomp-snapshots + AAF Snapshot Repository + ${nexusproxy}${snapshotNexusPath} + + + ecomp-site + dav:${nexusproxy}${sitePath} + + diff --git a/auth/auth-cass/src/main/java/org/onap/aaf/auth/dao/cass/CacheInfoDAO.java b/auth/auth-cass/src/main/java/org/onap/aaf/auth/dao/cass/CacheInfoDAO.java index 0ad15277..9672199b 100644 --- a/auth/auth-cass/src/main/java/org/onap/aaf/auth/dao/cass/CacheInfoDAO.java +++ b/auth/auth-cass/src/main/java/org/onap/aaf/auth/dao/cass/CacheInfoDAO.java @@ -3,6 +3,8 @@ * org.onap.aaf * =========================================================================== * Copyright (c) 2018 AT&T Intellectual Property. All rights reserved. + * + * Modification Copyright (c) 2019 IBM * =========================================================================== * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -72,6 +74,11 @@ public class CacheInfoDAO extends CassDAOImpl impl private final Date startTime; private final boolean cacheNotify; private PreparedStatement psCheck; + + ////////////////////////////////////////// + // Data Definition, matches Cassandra DM + ////////////////////////////////////////// + private static final int KEYLIMIT = 2; public CacheInfoDAO(AuthzTrans trans, Cluster cluster, String keyspace) throws APIException, IOException { super(trans, CacheInfoDAO.class.getSimpleName(),cluster,keyspace,Data.class,TABLE,readConsistency(trans,TABLE), writeConsistency(trans,TABLE)); @@ -96,15 +103,14 @@ public class CacheInfoDAO extends CassDAOImpl impl String container = trans.getProperty(Config.AAF_LOCATOR_CONTAINER); return ! ("helm".equals(container) || "oom".equals(container)); } - - ////////////////////////////////////////// - // Data Definition, matches Cassandra DM - ////////////////////////////////////////// - private static final int KEYLIMIT = 2; /** * @author Jonathan */ public static class Data { + public String name; + public int seg; + public Date touched; + public Data() { name = null; touched = null; @@ -114,10 +120,6 @@ public class CacheInfoDAO extends CassDAOImpl impl this.seg = seg; touched = null; } - - public String name; - public int seg; - public Date touched; } private static class InfoLoader extends Loader { @@ -137,8 +139,8 @@ public class CacheInfoDAO extends CassDAOImpl impl } @Override - protected void key(Data data, int _idx, Object[] obj) { - int idx = _idx; + protected void key(Data data, int idxParam, Object[] obj) { + int idx = idxParam; obj[idx]=data.name; obj[++idx]=data.seg; @@ -152,7 +154,8 @@ public class CacheInfoDAO extends CassDAOImpl impl public static synchronized void startUpdate(AuthzEnv env, HMangr hman, SecuritySetter ss, String ip, int port) { if (cacheUpdate==null) { - Thread t= new Thread(cacheUpdate = new CacheUpdate(env,hman,ss, ip,port),"CacheInfo Update Thread"); + cacheUpdate = new CacheUpdate(env,hman,ss, ip,port); + Thread t= new Thread(cacheUpdate,"CacheInfo Update Thread"); t.setDaemon(true); t.start(); } @@ -164,7 +167,7 @@ public class CacheInfoDAO extends CassDAOImpl impl } } - private final static class CacheUpdate extends Thread { + private static final class CacheUpdate extends Thread { public static BlockingQueue notifyDQ = new LinkedBlockingQueue(2000); private static final String VOID_CT="application/Void+json;q=1.0;charset=utf-8;version=2.0,application/json;q=1.0;version=2.0,*/*;q=1.0"; diff --git a/auth/auth-cass/src/main/java/org/onap/aaf/auth/dao/hl/Question.java b/auth/auth-cass/src/main/java/org/onap/aaf/auth/dao/hl/Question.java index 3b61da31..6b6c23bf 100644 --- a/auth/auth-cass/src/main/java/org/onap/aaf/auth/dao/hl/Question.java +++ b/auth/auth-cass/src/main/java/org/onap/aaf/auth/dao/hl/Question.java @@ -224,6 +224,31 @@ public class Question { alwaysSpecial = Boolean.parseBoolean(trans.getProperty("aaf_always_special", Boolean.FALSE.toString())); } + + /** + * Note: This Constructor created for JUNIT Purposes. Do not use otherwise. + */ + public Question(AuthzTrans trans, HistoryDAO historyDAO, CacheInfoDAO cacheInfoDAO, + CachedNSDAO nsDAO, CachedPermDAO permDAO, CachedRoleDAO roleDAO, + CachedUserRoleDAO userRoleDAO, CachedCredDAO credDAO, CachedCertDAO certDAO, + LocateDAO locateDAO,FutureDAO futureDAO, DelegateDAO delegateDAO, + ApprovalDAO approvalDAO ) { + this.historyDAO = historyDAO; + this.cacheInfoDAO = cacheInfoDAO; + this.nsDAO = nsDAO; + this.permDAO = permDAO; + this.roleDAO = roleDAO; + this.userRoleDAO = userRoleDAO; + this.credDAO = credDAO; + this.certDAO = certDAO; + this.locateDAO = locateDAO; + this.futureDAO = futureDAO; + this.delegateDAO = delegateDAO; + this.approvalDAO = approvalDAO; + + cldays = Integer.parseInt(trans.getProperty(Config.AAF_CRED_WARN_DAYS, Config.AAF_CRED_WARN_DAYS_DFT)); + alwaysSpecial = Boolean.parseBoolean(trans.getProperty("aaf_always_special", Boolean.FALSE.toString())); + } public void startTimers(AuthzEnv env) { // Only want to aggressively cleanse User related Caches... The others, @@ -987,25 +1012,27 @@ public class Question { } public Result userCredCheck(AuthzTrans trans, CredDAO.Data orig, final byte[] raw) { - TimeTaken tt = trans.start("CheckCred Cred", Env.SUB); - try { - switch(orig.type) { - case CredDAO.BASIC_AUTH_SHA256: - ByteBuffer bb = ByteBuffer.allocate(Integer.SIZE + raw.length); - bb.putInt(orig.other); - bb.put(raw); - return Result.ok(Hash.compareTo(orig.cred.array(),Hash.hashSHA256(bb.array()))==0); - case CredDAO.BASIC_AUTH: - return Result.ok( Hash.compareTo(orig.cred.array(), Hash.hashMD5(raw))==0); - case CredDAO.FQI: - default: - return Result.ok(false); - } - } catch (NoSuchAlgorithmException e) { - return Result.err(Status.ERR_General,e.getLocalizedMessage()); - } finally { - tt.done(); + Result rv; + TimeTaken tt = trans.start("CheckCred Cred", Env.SUB); + try { + switch(orig.type) { + case CredDAO.BASIC_AUTH_SHA256: + ByteBuffer bb = ByteBuffer.allocate(Integer.SIZE + raw.length); + bb.putInt(orig.other); + bb.put(raw); + rv = Result.ok(Hash.compareTo(orig.cred.array(),Hash.hashSHA256(bb.array()))==0); + case CredDAO.BASIC_AUTH: + rv= Result.ok( Hash.compareTo(orig.cred.array(), Hash.hashMD5(raw))==0); + case CredDAO.FQI: + default: + rv = Result.ok(false); } + } catch (NoSuchAlgorithmException e) { + rv = Result.err(Status.ERR_General,e.getLocalizedMessage()); + } finally { + tt.done(); + } + return rv; } public static final String APPROVED = "APPROVE"; @@ -1214,7 +1241,7 @@ public class Question { } public boolean isOwner(AuthzTrans trans, String user, String ns) { - Result> rur = userRoleDAO.read(trans, user,ns+DOT_OWNER); + Result> rur = userRoleDAO().read(trans, user,ns+DOT_OWNER); if (rur.isOKhasData()) {for (UserRoleDAO.Data urdd : rur.value){ Date now = new Date(); if (urdd.expires.after(now)) { @@ -1225,7 +1252,7 @@ public class Question { } public int countOwner(AuthzTrans trans, String ns) { - Result> rur = userRoleDAO.readByRole(trans,ns+DOT_OWNER); + Result> rur = userRoleDAO().readByRole(trans,ns+DOT_OWNER); Date now = new Date(); int count = 0; if (rur.isOKhasData()) {for (UserRoleDAO.Data urdd : rur.value){ diff --git a/auth/auth-cass/src/test/java/org/onap/aaf/auth/dao/JU_DAOException.java b/auth/auth-cass/src/test/java/org/onap/aaf/auth/dao/JU_DAOException.java index 0e9d199d..0ee0ce8f 100644 --- a/auth/auth-cass/src/test/java/org/onap/aaf/auth/dao/JU_DAOException.java +++ b/auth/auth-cass/src/test/java/org/onap/aaf/auth/dao/JU_DAOException.java @@ -31,20 +31,36 @@ import org.onap.aaf.auth.dao.DAOException; import org.powermock.api.mockito.PowerMockito; import org.powermock.modules.junit4.PowerMockRunner; -@RunWith(PowerMockRunner.class) public class JU_DAOException { -DAOException daoException; + DAOException daoException; - //DAOException daoException = new DAOException(); String message = "message"; Throwable cause; @Before public void setUp(){ - daoException = new DAOException(); + daoException = new DAOException(); } @Test - public void test(){ - assertTrue(true); + public void testNoArgConstructor(){ + assertNull(daoException.getMessage()); + } + + @Test + public void testOneArgConstructorMsg(){ + daoException = new DAOException("test message"); + assertTrue("test message".equalsIgnoreCase(daoException.getMessage())); + } + + @Test + public void testOneArgConstructorThrowable(){ + daoException = new DAOException(new Throwable()); + assertTrue("java.lang.Throwable".equalsIgnoreCase(daoException.getMessage())); + } + + @Test + public void testTwoArgConstructor(){ + daoException = new DAOException("test message", new Throwable()); + assertTrue("test message".equalsIgnoreCase(daoException.getMessage())); } } diff --git a/auth/auth-certman/pom.xml b/auth/auth-certman/pom.xml index 82d127ce..69465b7d 100644 --- a/auth/auth-certman/pom.xml +++ b/auth/auth-certman/pom.xml @@ -1,228 +1,218 @@ - + * org.onap.aaf + * =========================================================================== + * Copyright (c) 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==================================================== + * --> + - 4.0.0 - - org.onap.aaf.authz - authparent - 2.1.15-SNAPSHOT - ../pom.xml - + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> + 4.0.0 + + org.onap.aaf.authz + authparent + 2.1.16-SNAPSHOT + ../pom.xml + - aaf-auth-certman - AAF Auth Certificate Manager - Certificate Manager API + aaf-auth-certman + AAF Auth Certificate Manager + Certificate Manager API - - - - 0.7.7.201606060606 - 3.2 - jacoco - - target/code-coverage/jacoco-ut.exec - target/code-coverage/jacoco-it.exec - - **/gen/**,**/generated-sources/**,**/yang-gen**,**/pax/** - https://nexus.onap.org - /content/repositories/snapshots/ - /content/repositories/releases/ - /content/repositories/staging/ - /content/sites/site/org/onap/aaf/authz/${project.artifactId}/${project.version} - 1.60 - + + + + 0.7.7.201606060606 + 3.2 + jacoco + + target/code-coverage/jacoco-ut.exec + target/code-coverage/jacoco-it.exec + + **/gen/**,**/generated-sources/**,**/yang-gen**,**/pax/** + https://nexus.onap.org + /content/repositories/snapshots/ + /content/repositories/releases/ + /content/repositories/staging/ + /content/sites/site/org/onap/aaf/authz/${project.artifactId}/${project.version} + 1.60 + - + org.powermock powermock-module-junit4-rule-agent 1.6.4 test - - org.onap.aaf.authz - aaf-auth-core - - - - org.onap.aaf.authz - aaf-auth-cass - + + org.onap.aaf.authz + aaf-auth-core + - - org.onap.aaf.authz - aaf-cadi-aaf - - - - - org.onap.aaf.authz - aaf-auth-deforg - + + org.onap.aaf.authz + aaf-auth-cass + - - com.google.code.jscep - jscep - 2.4.0 - - - org.bouncycastle - bcprov-jdk15on - - - org.bouncycastle - bcpkix-jdk15on - - - - - - org.bouncycastle - bcprov-jdk15on - ${project.bouncyCastleVersion} - - - org.bouncycastle - bcpkix-jdk15on - ${project.bouncyCastleVersion} - - + + org.onap.aaf.authz + aaf-cadi-aaf + + + + + org.onap.aaf.authz + aaf-auth-deforg + - - - - org.apache.maven.plugins - maven-jar-plugin - - - **/*.class - - - 2.3.1 - + + com.google.code.jscep + jscep + 2.4.0 + + + org.bouncycastle + bcprov-jdk15on + + + org.bouncycastle + bcpkix-jdk15on + + + + + + org.bouncycastle + bcprov-jdk15on + ${project.bouncyCastleVersion} + + + org.bouncycastle + bcpkix-jdk15on + ${project.bouncyCastleVersion} + + - - - org.apache.maven.plugins - maven-deploy-plugin - - false - - - - org.codehaus.mojo - appassembler-maven-plugin - - - - org.onap.aaf.auth.cm.AAF_CM - cm - - cadi_prop_files=${project.ext_root_dir}/etc/org.osaaf.aaf.cm.props - cadi_log_dir=${project.ext_root_dir}/logs/cm - - - - - - - org.jacoco - jacoco-maven-plugin - - - **/gen/** - **/generated-sources/** - **/yang-gen/** - **/pax/** - - - + + + + org.apache.maven.plugins + maven-jar-plugin + + + **/*.class + + + 2.3.1 + + + org.codehaus.mojo + appassembler-maven-plugin + + + + org.onap.aaf.auth.cm.AAF_CM + cm + + cadi_prop_files=${project.ext_root_dir}/etc/org.osaaf.aaf.cm.props + cadi_log_dir=${project.ext_root_dir}/logs/cm + + + + + + + org.jacoco + jacoco-maven-plugin + + + **/gen/** + **/generated-sources/** + **/yang-gen/** + **/pax/** + + + - - pre-unit-test - - prepare-agent - - - ${project.build.directory}/code-coverage/jacoco-ut.exec - surefireArgLine - - + + pre-unit-test + + prepare-agent + + + ${project.build.directory}/code-coverage/jacoco-ut.exec + surefireArgLine + + - - post-unit-test - test - - report - - - ${project.build.directory}/code-coverage/jacoco-ut.exec - ${project.reporting.outputDirectory}/jacoco-ut - - - - pre-integration-test - pre-integration-test - - prepare-agent - - - ${project.build.directory}/code-coverage/jacoco-it.exec - failsafeArgLine - - + + post-unit-test + test + + report + + + ${project.build.directory}/code-coverage/jacoco-ut.exec + ${project.reporting.outputDirectory}/jacoco-ut + + + + pre-integration-test + pre-integration-test + + prepare-agent + + + ${project.build.directory}/code-coverage/jacoco-it.exec + failsafeArgLine + + - - post-integration-test - post-integration-test - - report - - - ${project.build.directory}/code-coverage/jacoco-it.exec - ${project.reporting.outputDirectory}/jacoco-it - - - - - - + + post-integration-test + post-integration-test + + report + + + ${project.build.directory}/code-coverage/jacoco-it.exec + ${project.reporting.outputDirectory}/jacoco-it + + + + + + - - - ecomp-releases - AAF Release Repository - ${nexusproxy}${releaseNexusPath} - - - ecomp-snapshots - AAF Snapshot Repository - ${nexusproxy}${snapshotNexusPath} - - - ecomp-site - dav:${nexusproxy}${sitePath} - - + + + ecomp-releases + AAF Release Repository + ${nexusproxy}${releaseNexusPath} + + + ecomp-snapshots + AAF Snapshot Repository + ${nexusproxy}${snapshotNexusPath} + + + ecomp-site + dav:${nexusproxy}${sitePath} + + diff --git a/auth/auth-certman/src/main/java/org/onap/aaf/auth/cm/cert/CSRMeta.java b/auth/auth-certman/src/main/java/org/onap/aaf/auth/cm/cert/CSRMeta.java index a3740bfe..f67f445f 100644 --- a/auth/auth-certman/src/main/java/org/onap/aaf/auth/cm/cert/CSRMeta.java +++ b/auth/auth-certman/src/main/java/org/onap/aaf/auth/cm/cert/CSRMeta.java @@ -3,6 +3,8 @@ * org.onap.aaf * =========================================================================== * Copyright (c) 2018 AT&T Intellectual Property. All rights reserved. + * + * Modifications Copyright (C) 2019 IBM. * =========================================================================== * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -151,7 +153,7 @@ public class CSRMeta { } } - public X509Certificate initialConversationCert(Trans trans) throws IOException, CertificateException, OperatorCreationException { + public X509Certificate initialConversationCert(Trans trans) throws CertificateException, OperatorCreationException { GregorianCalendar gc = new GregorianCalendar(); Date start = gc.getTime(); gc.add(GregorianCalendar.DAY_OF_MONTH,2); diff --git a/auth/auth-cmd/pom.xml b/auth/auth-cmd/pom.xml index 6c6505fc..6de09de5 100644 --- a/auth/auth-cmd/pom.xml +++ b/auth/auth-cmd/pom.xml @@ -1,223 +1,216 @@ + * org.onap.aaf * =========================================================================== + * Copyright (c) 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==================================================== + * --> - 4.0.0 - - org.onap.aaf.authz - authparent - 2.1.15-SNAPSHOT - ../pom.xml - + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> + 4.0.0 + + org.onap.aaf.authz + authparent + 2.1.16-SNAPSHOT + ../pom.xml + - aaf-auth-cmd - AAF Auth Command - Command Line Processor for AAF Auth - jar + aaf-auth-cmd + AAF Auth Command + Command Line Processor for AAF Auth + jar - - false - - - 0.7.7.201606060606 - 3.2 - jacoco - - target/code-coverage/jacoco-ut.exec - target/code-coverage/jacoco-it.exec - - **/gen/**,**/generated-sources/**,**/yang-gen**,**/pax/** - https://nexus.onap.org - /content/repositories/snapshots/ - /content/repositories/releases/ - /content/repositories/staging/ - /content/sites/site/org/onap/aaf/authz/${project.artifactId}/${project.version} - + + false + + + 0.7.7.201606060606 + 3.2 + jacoco + + target/code-coverage/jacoco-ut.exec + target/code-coverage/jacoco-it.exec + + **/gen/**,**/generated-sources/**,**/yang-gen**,**/pax/** + https://nexus.onap.org + /content/repositories/snapshots/ + /content/repositories/releases/ + /content/repositories/staging/ + /content/sites/site/org/onap/aaf/authz/${project.artifactId}/${project.version} + - - - Jonathan Gathman - jonathan.gathman@att.com - ATT - - Architect - Lead Developer - - - - Gabe Maurer - gabe.maurer@att.com - ATT - - Developer - - - - Ian Howell - ian.howell@att.com - ATT - - Developer - - - - Sai Gandham - sai.gandham@att.com - ATT - - Developer - - - + + + Jonathan Gathman + jonathan.gathman@att.com + ATT + + Architect + Lead Developer + + + + Gabe Maurer + gabe.maurer@att.com + ATT + + Developer + + + + Ian Howell + ian.howell@att.com + ATT + + Developer + + + + Sai Gandham + sai.gandham@att.com + ATT + + Developer + + + - - - - org.apache.maven.plugins - maven-deploy-plugin - - false - - - - org.jacoco - jacoco-maven-plugin - - - **/gen/** - **/generated-sources/** - **/yang-gen/** - **/pax/** - - - + + + + org.jacoco + jacoco-maven-plugin + + + **/gen/** + **/generated-sources/** + **/yang-gen/** + **/pax/** + + + - - pre-unit-test - - prepare-agent - - - ${project.build.directory}/code-coverage/jacoco-ut.exec - surefireArgLine - - + + pre-unit-test + + prepare-agent + + + ${project.build.directory}/code-coverage/jacoco-ut.exec + surefireArgLine + + - - post-unit-test - test - - report - - - ${project.build.directory}/code-coverage/jacoco-ut.exec - ${project.reporting.outputDirectory}/jacoco-ut - - - - pre-integration-test - pre-integration-test - - prepare-agent - - - ${project.build.directory}/code-coverage/jacoco-it.exec - failsafeArgLine - - + + post-unit-test + test + + report + + + ${project.build.directory}/code-coverage/jacoco-ut.exec + ${project.reporting.outputDirectory}/jacoco-ut + + + + pre-integration-test + pre-integration-test + + prepare-agent + + + ${project.build.directory}/code-coverage/jacoco-it.exec + failsafeArgLine + + - - post-integration-test - post-integration-test - - report - - - ${project.build.directory}/code-coverage/jacoco-it.exec - ${project.reporting.outputDirectory}/jacoco-it - - - - - - maven-assembly-plugin - - tests - - - org.onap.aaf.auth.cmd.AAFcli - - - true - - - - - - full - package - - single - - - - src/assemble/auth-cmd.xml - - - - - - - - + + post-integration-test + post-integration-test + + report + + + ${project.build.directory}/code-coverage/jacoco-it.exec + ${project.reporting.outputDirectory}/jacoco-it + + + + + + maven-assembly-plugin + + tests + + + org.onap.aaf.auth.cmd.AAFcli + + + true + + + + + + full + package + + single + + + + src/assemble/auth-cmd.xml + + + + + + + + - - - org.onap.aaf.authz - aaf-cadi-aaf - + + + org.onap.aaf.authz + aaf-cadi-aaf + - - org.onap.aaf.authz - aaf-auth-core - + + org.onap.aaf.authz + aaf-auth-core + - - jline - jline - 2.14.2 - + + jline + jline + 2.14.2 + - + - - - ecomp-releases - AAF Release Repository - ${nexusproxy}${releaseNexusPath} - - - ecomp-snapshots - AAF Snapshot Repository - ${nexusproxy}${snapshotNexusPath} - - - ecomp-site - dav:${nexusproxy}${sitePath} - - + + + ecomp-releases + AAF Release Repository + ${nexusproxy}${releaseNexusPath} + + + ecomp-snapshots + AAF Snapshot Repository + ${nexusproxy}${snapshotNexusPath} + + + ecomp-site + dav:${nexusproxy}${sitePath} + + diff --git a/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/AAFcli.java b/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/AAFcli.java index 01d001fd..9e01d7c7 100644 --- a/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/AAFcli.java +++ b/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/AAFcli.java @@ -341,7 +341,7 @@ public class AAFcli { } finally { clearSingleLineProperties(); } - rv = expect.isEmpty() ? true : expect.contains(ret); + rv = expect.isEmpty() || expect.contains(ret); if (verbose) { if (rv) { pw.println(); @@ -542,7 +542,7 @@ public class AAFcli { String line; while ((line = reader.readLine()) != null) { - showDetails = (line.contains("-d"))?true:false; + showDetails = (line.contains("-d")); if (line.equalsIgnoreCase("quit") || line.equalsIgnoreCase("q") || line.equalsIgnoreCase("exit")) { break; diff --git a/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/perm/Perm.java b/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/perm/Perm.java index 02030211..917e19a4 100644 --- a/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/perm/Perm.java +++ b/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/perm/Perm.java @@ -3,6 +3,8 @@ * org.onap.aaf * =========================================================================== * Copyright (c) 2018 AT&T Intellectual Property. All rights reserved. + * + * Modifications Copyright (C) 2019 IBM. * =========================================================================== * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -28,7 +30,7 @@ import org.onap.aaf.misc.env.APIException; public class Perm extends BaseCmd { Role role; - public Perm(Role role) throws APIException { + public Perm(Role role) { super(role.aafcli, "perm"); this.role = role; diff --git a/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/role/Role.java b/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/role/Role.java index e3c838af..459848a1 100644 --- a/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/role/Role.java +++ b/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/role/Role.java @@ -3,6 +3,8 @@ * org.onap.aaf * =========================================================================== * Copyright (c) 2018 AT&T Intellectual Property. All rights reserved. + * + * Modifications Copyright (C) 2019 IBM. * =========================================================================== * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -28,12 +30,12 @@ import org.onap.aaf.misc.env.APIException; public class Role extends BaseCmd { public List list; - public Role(AAFcli aafcli) throws APIException { + public Role(AAFcli aafcli) { super(aafcli, "role"); cmds.add(new CreateDelete(this)); -// cmds.add(new Delete(this)); cmds.add(new User(this)); cmds.add(new Describe(this)); - cmds.add(list = new List(this)); + list = new List(this); + cmds.add(list); } } diff --git a/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/user/Cred.java b/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/user/Cred.java index 2d626d4e..d7431be1 100644 --- a/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/user/Cred.java +++ b/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/user/Cred.java @@ -3,6 +3,8 @@ * org.onap.aaf * =========================================================================== * Copyright (c) 2018 AT&T Intellectual Property. All rights reserved. + * + * Modifications Copyright (C) 2019 IBM. * =========================================================================== * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -43,7 +45,6 @@ public class Cred extends Cmd { private static final String CRED_PATH = "/authn/cred"; private static final String[] options = {"add","del","reset","extend"/*,"clean"*/}; private ErrMessage em; -// private RosettaDF errDF; public Cred(User parent) throws APIException { super(parent,"cred", new Param(optionsToString(options),true), @@ -55,15 +56,17 @@ public class Cred extends Cmd { } @Override - public int _exec(int _idx, final String ... args) throws CadiException, APIException, LocatorException { - int idx = _idx; + public int _exec(int idxVar, final String ... args) throws CadiException, APIException, LocatorException { + int idx = idxVar; String key = args[idx++]; final int option = whichOption(options,key); final CredRequest cr = new CredRequest(); cr.setId(args[idx++]); if (option!=1 && option!=3) { - if (idx>=args.length) throw new CadiException("Password Required"); + if (idx>=args.length) { + throw new CadiException("Password Required"); + } cr.setPassword(args[idx++]); } if (args.length>idx) { @@ -145,13 +148,15 @@ public class Cred extends Cmd { return fp.code(); } }); - if (ret==null)ret = -1; + if (ret==null) { + ret = -1; + } return ret; } @Override - public void detailedHelp(int _indent, StringBuilder sb) { - int indent = _indent; + public void detailedHelp(int indentVar, StringBuilder sb) { + int indent = indentVar; detailLine(sb,indent,"Add, Delete or Reset Credential"); indent+=2; detailLine(sb,indent,"id - the ID to create/delete/reset within AAF"); diff --git a/auth/auth-core/pom.xml b/auth/auth-core/pom.xml index a7ae68c6..91517836 100644 --- a/auth/auth-core/pom.xml +++ b/auth/auth-core/pom.xml @@ -20,195 +20,188 @@ * --> - 4.0.0 - - org.onap.aaf.authz - authparent - 2.1.15-SNAPSHOT - ../pom.xml - + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> + 4.0.0 + + org.onap.aaf.authz + authparent + 2.1.16-SNAPSHOT + ../pom.xml + - aaf-auth-core - AAF Auth Core - Core Library for AAF Auth Components - jar + aaf-auth-core + AAF Auth Core + Core Library for AAF Auth Components + jar - - - Jonathan Gathman - jonathan.gathman@att.com - ATT - - Architect - Lead Developer - - - - Gabe Maurer - gabe.maurer@att.com - ATT - - Developer - - - - Ian Howell - ian.howell@att.com - ATT - - Developer - - - - Sai Gandham - sai.gandham@att.com - ATT - - Developer - - - + + + Jonathan Gathman + jonathan.gathman@att.com + ATT + + Architect + Lead Developer + + + + Gabe Maurer + gabe.maurer@att.com + ATT + + Developer + + + + Ian Howell + ian.howell@att.com + ATT + + Developer + + + + Sai Gandham + sai.gandham@att.com + ATT + + Developer + + + - - - 0.7.7.201606060606 - 3.2 - jacoco - - target/code-coverage/jacoco-ut.exec - target/code-coverage/jacoco-it.exec - - **/gen/**,**/generated-sources/**,**/yang-gen**,**/pax/** - https://nexus.onap.org - /content/repositories/snapshots/ - /content/repositories/releases/ - /content/repositories/staging/ - /content/sites/site/org/onap/aaf/authz/${project.artifactId}/${project.version} - - - - - org.onap.aaf.authz - aaf-misc-env - - - org.onap.aaf.authz - aaf-cadi-aaf - + + + 0.7.7.201606060606 + 3.2 + jacoco + + target/code-coverage/jacoco-ut.exec + target/code-coverage/jacoco-it.exec + + **/gen/**,**/generated-sources/**,**/yang-gen**,**/pax/** + https://nexus.onap.org + /content/repositories/snapshots/ + /content/repositories/releases/ + /content/repositories/staging/ + /content/sites/site/org/onap/aaf/authz/${project.artifactId}/${project.version} + + + + + org.onap.aaf.authz + aaf-misc-env + + + org.onap.aaf.authz + aaf-cadi-aaf + - - javax.servlet - javax.servlet-api - + + javax.servlet + javax.servlet-api + - - org.onap.aaf.authz - aaf-misc-log4j - + + org.onap.aaf.authz + aaf-misc-log4j + - - org.onap.aaf.authz - aaf-cadi-core - + + org.onap.aaf.authz + aaf-cadi-core + - - org.eclipse.jetty - jetty-servlet - compile - + + org.eclipse.jetty + jetty-servlet + compile + - - org.slf4j - slf4j-log4j12 - - - - - - - org.apache.maven.plugins - maven-deploy-plugin - - false - - - - org.jacoco - jacoco-maven-plugin - - - **/gen/** - **/generated-sources/** - **/yang-gen/** - **/pax/** - - - - - pre-unit-test - - prepare-agent - - - ${project.build.directory}/code-coverage/jacoco-ut.exec - surefireArgLine - - - - post-unit-test - test - - report - - - ${project.build.directory}/code-coverage/jacoco-ut.exec - ${project.reporting.outputDirectory}/jacoco-ut - - - - pre-integration-test - pre-integration-test - - prepare-agent - - - ${project.build.directory}/code-coverage/jacoco-it.exec - failsafeArgLine - - + + org.slf4j + slf4j-log4j12 + + + + + + + org.jacoco + jacoco-maven-plugin + + + **/gen/** + **/generated-sources/** + **/yang-gen/** + **/pax/** + + + + + pre-unit-test + + prepare-agent + + + ${project.build.directory}/code-coverage/jacoco-ut.exec + surefireArgLine + + + + post-unit-test + test + + report + + + ${project.build.directory}/code-coverage/jacoco-ut.exec + ${project.reporting.outputDirectory}/jacoco-ut + + + + pre-integration-test + pre-integration-test + + prepare-agent + + + ${project.build.directory}/code-coverage/jacoco-it.exec + failsafeArgLine + + - - post-integration-test - post-integration-test - - report - - - ${project.build.directory}/code-coverage/jacoco-it.exec - ${project.reporting.outputDirectory}/jacoco-it - - - - - - - - - ecomp-releases - AAF Release Repository - ${nexusproxy}${releaseNexusPath} - - - ecomp-snapshots - AAF Snapshot Repository - ${nexusproxy}${snapshotNexusPath} - - - ecomp-site - dav:${nexusproxy}${sitePath} - - + + post-integration-test + post-integration-test + + report + + + ${project.build.directory}/code-coverage/jacoco-it.exec + ${project.reporting.outputDirectory}/jacoco-it + + + + + + + + + ecomp-releases + AAF Release Repository + ${nexusproxy}${releaseNexusPath} + + + ecomp-snapshots + AAF Snapshot Repository + ${nexusproxy}${snapshotNexusPath} + + + ecomp-site + dav:${nexusproxy}${sitePath} + + diff --git a/auth/auth-deforg/pom.xml b/auth/auth-deforg/pom.xml index a4bf5e7b..353d4b91 100644 --- a/auth/auth-deforg/pom.xml +++ b/auth/auth-deforg/pom.xml @@ -20,198 +20,191 @@ * --> - 4.0.0 - - authparent - ../pom.xml - org.onap.aaf.authz - 2.1.15-SNAPSHOT - + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> + 4.0.0 + + authparent + ../pom.xml + org.onap.aaf.authz + 2.1.16-SNAPSHOT + - aaf-auth-deforg - AAF Auth Default Organization - Example Organization Module - jar + aaf-auth-deforg + AAF Auth Default Organization + Example Organization Module + jar - - - Jonathan Gathman - jonathan.gathman@att.com - ATT - - Architect - Lead Developer - - - - Gabe Maurer - gabe.maurer@att.com - ATT - - Developer - - - - Ian Howell - ian.howell@att.com - ATT - - Developer - - - - Sai Gandham - sai.gandham@att.com - ATT - - Developer - - - + + + Jonathan Gathman + jonathan.gathman@att.com + ATT + + Architect + Lead Developer + + + + Gabe Maurer + gabe.maurer@att.com + ATT + + Developer + + + + Ian Howell + ian.howell@att.com + ATT + + Developer + + + + Sai Gandham + sai.gandham@att.com + ATT + + Developer + + + - - false - - - 0.7.7.201606060606 - 3.2 - jacoco - - target/code-coverage/jacoco-ut.exec - target/code-coverage/jacoco-it.exec - - **/gen/**,**/generated-sources/**,**/yang-gen**,**/pax/** - https://nexus.onap.org - /content/repositories/snapshots/ - /content/repositories/releases/ - /content/repositories/staging/ - /content/sites/site/org/onap/aaf/authz/${project.artifactId}/${project.version} - + + false + + + 0.7.7.201606060606 + 3.2 + jacoco + + target/code-coverage/jacoco-ut.exec + target/code-coverage/jacoco-it.exec + + **/gen/**,**/generated-sources/**,**/yang-gen**,**/pax/** + https://nexus.onap.org + /content/repositories/snapshots/ + /content/repositories/releases/ + /content/repositories/staging/ + /content/sites/site/org/onap/aaf/authz/${project.artifactId}/${project.version} + - - - org.onap.aaf.authz - aaf-cadi-core - + + + org.onap.aaf.authz + aaf-cadi-core + - - org.onap.aaf.authz - aaf-auth-core - + + org.onap.aaf.authz + aaf-auth-core + - + - - - - - org.apache.maven.plugins - maven-deploy-plugin - - false - - - - org.apache.maven.plugins - maven-javadoc-plugin - 2.10.4 - - false - - - - attach-javadocs - - jar - - - - - - org.jacoco - jacoco-maven-plugin - ${jacoco.version} - - - **/gen/** - **/generated-sources/** - **/yang-gen/** - **/pax/** - - - - - pre-unit-test - - prepare-agent - - - ${project.build.directory}/code-coverage/jacoco-ut.exec - surefireArgLine - - - - post-unit-test - test - - report - - - ${project.build.directory}/code-coverage/jacoco-ut.exec - ${project.reporting.outputDirectory}/jacoco-ut - - ** - - - - - pre-integration-test - pre-integration-test - - prepare-agent - - - ${project.build.directory}/code-coverage/jacoco-it.exec - - ** - - failsafeArgLine - - - - post-integration-test - post-integration-test - - report - - - ${project.build.directory}/code-coverage/jacoco-it.exec - ${project.reporting.outputDirectory}/jacoco-it - - - - - - - + + + + + org.apache.maven.plugins + maven-javadoc-plugin + 2.10.4 + + false + + + + attach-javadocs + + jar + + + + + + org.jacoco + jacoco-maven-plugin + ${jacoco.version} + + + **/gen/** + **/generated-sources/** + **/yang-gen/** + **/pax/** + + + + + pre-unit-test + + prepare-agent + + + ${project.build.directory}/code-coverage/jacoco-ut.exec + surefireArgLine + + + + post-unit-test + test + + report + + + ${project.build.directory}/code-coverage/jacoco-ut.exec + ${project.reporting.outputDirectory}/jacoco-ut + + ** + + + + + pre-integration-test + pre-integration-test + + prepare-agent + + + ${project.build.directory}/code-coverage/jacoco-it.exec + + ** + + failsafeArgLine + + + + post-integration-test + post-integration-test + + report + + + ${project.build.directory}/code-coverage/jacoco-it.exec + ${project.reporting.outputDirectory}/jacoco-it + + + + + + + - - - ecomp-releases - AAF Release Repository - ${nexusproxy}${releaseNexusPath} - - - ecomp-snapshots - AAF Snapshot Repository - ${nexusproxy}${snapshotNexusPath} - - - ecomp-site - dav:${nexusproxy}${sitePath} - - + + + ecomp-releases + AAF Release Repository + ${nexusproxy}${releaseNexusPath} + + + ecomp-snapshots + AAF Snapshot Repository + ${nexusproxy}${snapshotNexusPath} + + + ecomp-site + dav:${nexusproxy}${sitePath} + + diff --git a/auth/auth-fs/pom.xml b/auth/auth-fs/pom.xml index fc86d4a9..7b871267 100644 --- a/auth/auth-fs/pom.xml +++ b/auth/auth-fs/pom.xml @@ -1,206 +1,199 @@ + * org.onap.aaf * =========================================================================== + * Copyright (c) 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==================================================== + * --> - 4.0.0 - - org.onap.aaf.authz - authparent - 2.1.15-SNAPSHOT - ../pom.xml - + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> + 4.0.0 + + org.onap.aaf.authz + authparent + 2.1.16-SNAPSHOT + ../pom.xml + - aaf-auth-fs - AAF Auth File Server (http) - Independent FileServer Component via HTTP (not S) for Public Files (i.e. CRLs) for AAF Auth + aaf-auth-fs + AAF Auth File Server (http) + Independent FileServer Component via HTTP (not S) for Public Files (i.e. CRLs) for AAF Auth - - true - - - 0.7.7.201606060606 - 3.2 - jacoco - - target/code-coverage/jacoco-ut.exec - target/code-coverage/jacoco-it.exec - - **/gen/**,**/generated-sources/**,**/yang-gen**,**/pax/** - https://nexus.onap.org - /content/repositories/snapshots/ - /content/repositories/releases/ - /content/repositories/staging/ - /content/sites/site/org/onap/aaf/authz/${project.artifactId}/${project.version} + + true + + + 0.7.7.201606060606 + 3.2 + jacoco + + target/code-coverage/jacoco-ut.exec + target/code-coverage/jacoco-it.exec + + **/gen/**,**/generated-sources/**,**/yang-gen**,**/pax/** + https://nexus.onap.org + /content/repositories/snapshots/ + /content/repositories/releases/ + /content/repositories/staging/ + /content/sites/site/org/onap/aaf/authz/${project.artifactId}/${project.version} - + - - - Jonathan Gathman - jonathan.gathman@att.com - ATT - - Architect - Lead Developer - - - - Gabe Maurer - gabe.maurer@att.com - ATT - - Developer - - - - Ian Howell - ian.howell@att.com - ATT - - Developer - - - - Sai Gandham - sai.gandham@att.com - ATT - - Developer - - - + + + Jonathan Gathman + jonathan.gathman@att.com + ATT + + Architect + Lead Developer + + + + Gabe Maurer + gabe.maurer@att.com + ATT + + Developer + + + + Ian Howell + ian.howell@att.com + ATT + + Developer + + + + Sai Gandham + sai.gandham@att.com + ATT + + Developer + + + - - - org.onap.aaf.authz - aaf-auth-core - + + + org.onap.aaf.authz + aaf-auth-core + - - org.onap.aaf.authz - aaf-cadi-core - - + + org.onap.aaf.authz + aaf-cadi-core + + - - - - org.apache.maven.plugins - maven-deploy-plugin - - false - - - - org.codehaus.mojo - appassembler-maven-plugin - - - - org.onap.aaf.auth.fs.AAF_FS - fs - - cadi_prop_files=${project.ext_root_dir}/etc/org.osaaf.aaf.fs.props - cadi_log_dir=${project.ext_root_dir}/logs/fs - cadi_etc_dir=${project.ext_root_dir}/etc - - - - - - - org.jacoco - jacoco-maven-plugin - - - **/gen/** - **/generated-sources/** - **/yang-gen/** - **/pax/** - - - + + + + org.codehaus.mojo + appassembler-maven-plugin + + + + org.onap.aaf.auth.fs.AAF_FS + fs + + cadi_prop_files=${project.ext_root_dir}/etc/org.osaaf.aaf.fs.props + cadi_log_dir=${project.ext_root_dir}/logs/fs + cadi_etc_dir=${project.ext_root_dir}/etc + + + + + + + org.jacoco + jacoco-maven-plugin + + + **/gen/** + **/generated-sources/** + **/yang-gen/** + **/pax/** + + + - - pre-unit-test - - prepare-agent - - - ${project.build.directory}/code-coverage/jacoco-ut.exec - surefireArgLine - - + + pre-unit-test + + prepare-agent + + + ${project.build.directory}/code-coverage/jacoco-ut.exec + surefireArgLine + + - - post-unit-test - test - - report - - - ${project.build.directory}/code-coverage/jacoco-ut.exec - ${project.reporting.outputDirectory}/jacoco-ut - - - - pre-integration-test - pre-integration-test - - prepare-agent - - - ${project.build.directory}/code-coverage/jacoco-it.exec - failsafeArgLine - - + + post-unit-test + test + + report + + + ${project.build.directory}/code-coverage/jacoco-ut.exec + ${project.reporting.outputDirectory}/jacoco-ut + + + + pre-integration-test + pre-integration-test + + prepare-agent + + + ${project.build.directory}/code-coverage/jacoco-it.exec + failsafeArgLine + + - - post-integration-test - post-integration-test - - report - - - ${project.build.directory}/code-coverage/jacoco-it.exec - ${project.reporting.outputDirectory}/jacoco-it - - - - - - - - - + + post-integration-test + post-integration-test + + report + + + ${project.build.directory}/code-coverage/jacoco-it.exec + ${project.reporting.outputDirectory}/jacoco-it + + + + + + + + + - - - ecomp-releases - AAF Release Repository - ${nexusproxy}${releaseNexusPath} - - - ecomp-snapshots - AAF Snapshot Repository - ${nexusproxy}${snapshotNexusPath} - - - ecomp-site - dav:${nexusproxy}${sitePath} - - + + + ecomp-releases + AAF Release Repository + ${nexusproxy}${releaseNexusPath} + + + ecomp-snapshots + AAF Snapshot Repository + ${nexusproxy}${snapshotNexusPath} + + + ecomp-site + dav:${nexusproxy}${sitePath} + + diff --git a/auth/auth-gui/pom.xml b/auth/auth-gui/pom.xml index 8dc9551a..6b003051 100644 --- a/auth/auth-gui/pom.xml +++ b/auth/auth-gui/pom.xml @@ -1,218 +1,211 @@ + * org.onap.aaf * =========================================================================== + * Copyright (c) 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==================================================== + * --> - 4.0.0 - - org.onap.aaf.authz - authparent - 2.1.15-SNAPSHOT - ../pom.xml - - - aaf-auth-gui - AAF Auth GUI - GUI Component for AAF Auth Management - - - true - - - 0.7.7.201606060606 - 3.2 - jacoco - - target/code-coverage/jacoco-ut.exec - target/code-coverage/jacoco-it.exec - - **/gen/**,**/generated-sources/**,**/yang-gen**,**/pax/** - https://nexus.onap.org - /content/repositories/snapshots/ - /content/repositories/releases/ - /content/repositories/staging/ - /content/sites/site/org/onap/aaf/authz/${project.artifactId}/${project.version} - - - - - - org.onap.aaf.authz - aaf-auth-core - - - - org.onap.aaf.authz - aaf-auth-client - - - - org.onap.aaf.authz - aaf-auth-cmd - - - - - org.onap.aaf.authz - aaf-auth-deforg - - - - org.onap.aaf.authz - aaf-cadi-aaf - - - - org.onap.aaf.authz - aaf-cadi-client - - - - org.onap.aaf.authz - aaf-misc-xgen - - - - - - - - - - org.apache.maven.plugins - maven-jar-plugin - - - **/*.class - - - 2.3.1 - - - org.apache.maven.plugins - maven-deploy-plugin - - false - - - - org.codehaus.mojo - appassembler-maven-plugin - - - - org.onap.aaf.auth.gui.AAF_GUI - gui - - cadi_prop_files=${project.ext_root_dir}/etc/org.osaaf.aaf.gui.props - cadi_log_dir=${project.ext_root_dir}/logs/gui - cadi_etc_dir=${project.ext_root_dir}/etc - - - - -Daaf_cfa_web_path=$BASEDIR/theme/onap - - - - - true - theme - theme - - - - - org.jacoco - jacoco-maven-plugin - - - **/gen/** - **/generated-sources/** - **/yang-gen/** - **/pax/** - - - - - - pre-unit-test - - prepare-agent - - - ${project.build.directory}/code-coverage/jacoco-ut.exec - surefireArgLine - - - - - - post-unit-test - test - - report - - - ${project.build.directory}/code-coverage/jacoco-ut.exec - ${project.reporting.outputDirectory}/jacoco-ut - - - - pre-integration-test - pre-integration-test - - prepare-agent - - - ${project.build.directory}/code-coverage/jacoco-it.exec - failsafeArgLine - - - - - post-integration-test - post-integration-test - - report - - - ${project.build.directory}/code-coverage/jacoco-it.exec - ${project.reporting.outputDirectory}/jacoco-it - - - - - - - - - - ecomp-releases - AAF Release Repository - ${nexusproxy}${releaseNexusPath} - - - ecomp-snapshots - AAF Snapshot Repository - ${nexusproxy}${snapshotNexusPath} - - - ecomp-site - dav:${nexusproxy}${sitePath} - - + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> + 4.0.0 + + org.onap.aaf.authz + authparent + 2.1.16-SNAPSHOT + ../pom.xml + + + aaf-auth-gui + AAF Auth GUI + GUI Component for AAF Auth Management + + + true + + + 0.7.7.201606060606 + 3.2 + jacoco + + target/code-coverage/jacoco-ut.exec + target/code-coverage/jacoco-it.exec + + **/gen/**,**/generated-sources/**,**/yang-gen**,**/pax/** + https://nexus.onap.org + /content/repositories/snapshots/ + /content/repositories/releases/ + /content/repositories/staging/ + /content/sites/site/org/onap/aaf/authz/${project.artifactId}/${project.version} + + + + + + org.onap.aaf.authz + aaf-auth-core + + + + org.onap.aaf.authz + aaf-auth-client + + + + org.onap.aaf.authz + aaf-auth-cmd + + + + + org.onap.aaf.authz + aaf-auth-deforg + + + + org.onap.aaf.authz + aaf-cadi-aaf + + + + org.onap.aaf.authz + aaf-cadi-client + + + + org.onap.aaf.authz + aaf-misc-xgen + + + + + + + + + + org.apache.maven.plugins + maven-jar-plugin + + + **/*.class + + + 2.3.1 + + + org.codehaus.mojo + appassembler-maven-plugin + + + + org.onap.aaf.auth.gui.AAF_GUI + gui + + cadi_prop_files=${project.ext_root_dir}/etc/org.osaaf.aaf.gui.props + cadi_log_dir=${project.ext_root_dir}/logs/gui + cadi_etc_dir=${project.ext_root_dir}/etc + + + + -Daaf_cfa_web_path=$BASEDIR/theme/onap + + + + + true + theme + theme + + + + + org.jacoco + jacoco-maven-plugin + + + **/gen/** + **/generated-sources/** + **/yang-gen/** + **/pax/** + + + + + + pre-unit-test + + prepare-agent + + + ${project.build.directory}/code-coverage/jacoco-ut.exec + surefireArgLine + + + + + + post-unit-test + test + + report + + + ${project.build.directory}/code-coverage/jacoco-ut.exec + ${project.reporting.outputDirectory}/jacoco-ut + + + + pre-integration-test + pre-integration-test + + prepare-agent + + + ${project.build.directory}/code-coverage/jacoco-it.exec + failsafeArgLine + + + + + post-integration-test + post-integration-test + + report + + + ${project.build.directory}/code-coverage/jacoco-it.exec + ${project.reporting.outputDirectory}/jacoco-it + + + + + + + + + + ecomp-releases + AAF Release Repository + ${nexusproxy}${releaseNexusPath} + + + ecomp-snapshots + AAF Snapshot Repository + ${nexusproxy}${snapshotNexusPath} + + + ecomp-site + dav:${nexusproxy}${sitePath} + + diff --git a/auth/auth-gui/theme/onap/images/ONAP_LOGO.png b/auth/auth-gui/theme/onap/images/ONAP_LOGO.png index 458e320c..55e37188 100644 Binary files a/auth/auth-gui/theme/onap/images/ONAP_LOGO.png and b/auth/auth-gui/theme/onap/images/ONAP_LOGO.png differ diff --git a/auth/auth-gui/theme/onap/images/logo_onap.png b/auth/auth-gui/theme/onap/images/logo_onap.png new file mode 100644 index 00000000..458e320c Binary files /dev/null and b/auth/auth-gui/theme/onap/images/logo_onap.png differ diff --git a/auth/auth-hello/pom.xml b/auth/auth-hello/pom.xml index 665d724f..2cb8f571 100644 --- a/auth/auth-hello/pom.xml +++ b/auth/auth-hello/pom.xml @@ -1,180 +1,170 @@ + * org.onap.aaf * =========================================================================== + * Copyright (c) 2018 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==================================================== + * --> - 4.0.0 - - org.onap.aaf.authz - authparent - 2.1.15-SNAPSHOT - ../pom.xml - + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> + 4.0.0 + + org.onap.aaf.authz + authparent + 2.1.16-SNAPSHOT + ../pom.xml + - aaf-auth-hello - AAF Auth Hello Service - Hello Service Component for testing AAF Auth Access + aaf-auth-hello + AAF Auth Hello Service + Hello Service Component for testing AAF Auth Access - - false - - - 0.7.7.201606060606 - 3.2 - jacoco - - target/code-coverage/jacoco-ut.exec - target/code-coverage/jacoco-it.exec - - **/gen/**,**/generated-sources/**,**/yang-gen**,**/pax/** - https://nexus.onap.org - /content/repositories/snapshots/ - /content/repositories/releases/ - /content/repositories/staging/ - /content/sites/site/org/onap/aaf/authz/${project.artifactId}/${project.version} - + + false + + + 0.7.7.201606060606 + 3.2 + jacoco + + target/code-coverage/jacoco-ut.exec + target/code-coverage/jacoco-it.exec + + **/gen/**,**/generated-sources/**,**/yang-gen**,**/pax/** + https://nexus.onap.org + /content/repositories/snapshots/ + /content/repositories/releases/ + /content/repositories/staging/ + /content/sites/site/org/onap/aaf/authz/${project.artifactId}/${project.version} + - - - org.onap.aaf.authz - aaf-auth-core - + + + org.onap.aaf.authz + aaf-auth-core + - - org.onap.aaf.authz - aaf-cadi-aaf - + + org.onap.aaf.authz + aaf-cadi-aaf + - + - - - - org.apache.maven.plugins - maven-jar-plugin - - - **/*.class - - - 2.3.1 - + + + + org.apache.maven.plugins + maven-jar-plugin + + + **/*.class + + + 2.3.1 + + + org.codehaus.mojo + appassembler-maven-plugin + + + + org.onap.aaf.auth.hello.AAF_Hello + hello + + cadi_prop_files=${project.ext_root_dir}/etc/org.osaaf.aaf.hello.props + cadi_log_dir=${project.ext_root_dir}/logs/hello + cadi_etc_dir=${project.ext_root_dir}/etc + + + + + + + org.jacoco + jacoco-maven-plugin + + + **/gen/** + **/generated-sources/** + **/yang-gen/** + **/pax/** + + + - - - org.apache.maven.plugins - maven-deploy-plugin - - false - - - - org.codehaus.mojo - appassembler-maven-plugin - - - - org.onap.aaf.auth.hello.AAF_Hello - hello - - cadi_prop_files=${project.ext_root_dir}/etc/org.osaaf.aaf.hello.props - cadi_log_dir=${project.ext_root_dir}/logs/hello - cadi_etc_dir=${project.ext_root_dir}/etc - - - - - - - org.jacoco - jacoco-maven-plugin - - - **/gen/** - **/generated-sources/** - **/yang-gen/** - **/pax/** - - - + + pre-unit-test + + prepare-agent + + + ${project.build.directory}/code-coverage/jacoco-ut.exec + surefireArgLine + + - - pre-unit-test - - prepare-agent - - - ${project.build.directory}/code-coverage/jacoco-ut.exec - surefireArgLine - - + + post-unit-test + test + + report + + + ${project.build.directory}/code-coverage/jacoco-ut.exec + ${project.reporting.outputDirectory}/jacoco-ut + + + + pre-integration-test + pre-integration-test + + prepare-agent + + + ${project.build.directory}/code-coverage/jacoco-it.exec + failsafeArgLine + + - - post-unit-test - test - - report - - - ${project.build.directory}/code-coverage/jacoco-ut.exec - ${project.reporting.outputDirectory}/jacoco-ut - - - - pre-integration-test - pre-integration-test - - prepare-agent - - - ${project.build.directory}/code-coverage/jacoco-it.exec - failsafeArgLine - - + + post-integration-test + post-integration-test + + report + + + ${project.build.directory}/code-coverage/jacoco-it.exec + ${project.reporting.outputDirectory}/jacoco-it + + + + + + - - post-integration-test - post-integration-test - - report - - - ${project.build.directory}/code-coverage/jacoco-it.exec - ${project.reporting.outputDirectory}/jacoco-it - - - - - - - - - - ecomp-releases - AAF Release Repository - ${nexusproxy}${releaseNexusPath} - - - ecomp-snapshots - AAF Snapshot Repository - ${nexusproxy}${snapshotNexusPath} - - - ecomp-site - dav:${nexusproxy}${sitePath} - - + + + ecomp-releases + AAF Release Repository + ${nexusproxy}${releaseNexusPath} + + + ecomp-snapshots + AAF Snapshot Repository + ${nexusproxy}${snapshotNexusPath} + + + ecomp-site + dav:${nexusproxy}${sitePath} + + diff --git a/auth/auth-locate/pom.xml b/auth/auth-locate/pom.xml index 8ca9c892..3ea432b8 100644 --- a/auth/auth-locate/pom.xml +++ b/auth/auth-locate/pom.xml @@ -1,65 +1,65 @@ + * org.onap.aaf * =========================================================================== + * Copyright (c) 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==================================================== + * --> - 4.0.0 - - org.onap.aaf.authz - authparent - 2.1.15-SNAPSHOT - ../pom.xml - + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> + 4.0.0 + + org.onap.aaf.authz + authparent + 2.1.16-SNAPSHOT + ../pom.xml + - aaf-auth-locate - AAF Auth Locate - Location Service for AAF Auth Components + aaf-auth-locate + AAF Auth Locate + Location Service for AAF Auth Components - - true - - - 0.7.7.201606060606 - 3.2 - jacoco - - target/code-coverage/jacoco-ut.exec - target/code-coverage/jacoco-it.exec - - **/gen/**,**/generated-sources/**,**/yang-gen**,**/pax/** - https://nexus.onap.org - /content/repositories/snapshots/ - /content/repositories/releases/ - /content/repositories/staging/ - /content/sites/site/org/onap/aaf/authz/${project.artifactId}/${project.version} - + + true + + + 0.7.7.201606060606 + 3.2 + jacoco + + target/code-coverage/jacoco-ut.exec + target/code-coverage/jacoco-it.exec + + **/gen/**,**/generated-sources/**,**/yang-gen**,**/pax/** + https://nexus.onap.org + /content/repositories/snapshots/ + /content/repositories/releases/ + /content/repositories/staging/ + /content/sites/site/org/onap/aaf/authz/${project.artifactId}/${project.version} + - - - org.onap.aaf.authz - aaf-auth-client - - - - org.onap.aaf.authz - aaf-auth-core - + + + org.onap.aaf.authz + aaf-auth-client + + + + org.onap.aaf.authz + aaf-auth-core + - - org.onap.aaf.authz - aaf-auth-cass - + + org.onap.aaf.authz + aaf-auth-cass + + * org.onap.aaf * =========================================================================== + * Copyright (c) 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==================================================== + * --> - 4.0.0 - - org.onap.aaf.authz - authparent - 2.1.15-SNAPSHOT - ../pom.xml - + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> + 4.0.0 + + org.onap.aaf.authz + authparent + 2.1.16-SNAPSHOT + ../pom.xml + - aaf-auth-oauth - AAF Auth OAuth Service - OAuth Component for AAF Auth + aaf-auth-oauth + AAF Auth OAuth Service + OAuth Component for AAF Auth - - 25 - - - 0.7.7.201606060606 - 3.2 - jacoco - - target/code-coverage/jacoco-ut.exec - target/code-coverage/jacoco-it.exec - - **/gen/**,**/generated-sources/**,**/yang-gen**,**/pax/** - https://nexus.onap.org - /content/repositories/snapshots/ - /content/repositories/releases/ - /content/repositories/staging/ - /content/sites/site/org/onap/aaf/authz/${project.artifactId}/${project.version} - + + 25 + + + 0.7.7.201606060606 + 3.2 + jacoco + + target/code-coverage/jacoco-ut.exec + target/code-coverage/jacoco-it.exec + + **/gen/**,**/generated-sources/**,**/yang-gen**,**/pax/** + https://nexus.onap.org + /content/repositories/snapshots/ + /content/repositories/releases/ + /content/repositories/staging/ + /content/sites/site/org/onap/aaf/authz/${project.artifactId}/${project.version} + - - - org.onap.aaf.authz - aaf-auth-core - + + + org.onap.aaf.authz + aaf-auth-core + - - org.onap.aaf.authz - aaf-auth-cass - + + org.onap.aaf.authz + aaf-auth-cass + - - org.onap.aaf.authz - aaf-cadi-aaf - - + + org.onap.aaf.authz + aaf-cadi-aaf + + - - - - org.apache.maven.plugins - maven-jar-plugin - - - **/*.class - - - 2.3.1 - - - - org.apache.maven.plugins - maven-deploy-plugin - - false - - - - org.codehaus.mojo - appassembler-maven-plugin - - - - org.onap.aaf.auth.oauth.AAF_OAuth - oauth - - cadi_prop_files=${project.ext_root_dir}/etc/org.osaaf.aaf.oauth.props - cadi_log_dir=${project.ext_root_dir}/logs/oauth - cadi_etc_dir=${project.ext_root_dir}/etc - - - - - - - org.jacoco - jacoco-maven-plugin - - - **/gen/** - **/generated-sources/** - **/yang-gen/** - **/pax/** - - - + + + + org.apache.maven.plugins + maven-jar-plugin + + + **/*.class + + + 2.3.1 + + + org.codehaus.mojo + appassembler-maven-plugin + + + + org.onap.aaf.auth.oauth.AAF_OAuth + oauth + + cadi_prop_files=${project.ext_root_dir}/etc/org.osaaf.aaf.oauth.props + cadi_log_dir=${project.ext_root_dir}/logs/oauth + cadi_etc_dir=${project.ext_root_dir}/etc + + + + + + + org.jacoco + jacoco-maven-plugin + + + **/gen/** + **/generated-sources/** + **/yang-gen/** + **/pax/** + + + - - pre-unit-test - - prepare-agent - - - ${project.build.directory}/code-coverage/jacoco-ut.exec - surefireArgLine - - + + pre-unit-test + + prepare-agent + + + ${project.build.directory}/code-coverage/jacoco-ut.exec + surefireArgLine + + - - post-unit-test - test - - report - - - ${project.build.directory}/code-coverage/jacoco-ut.exec - ${project.reporting.outputDirectory}/jacoco-ut - - - - pre-integration-test - pre-integration-test - - prepare-agent - - - ${project.build.directory}/code-coverage/jacoco-it.exec - failsafeArgLine - - + + post-unit-test + test + + report + + + ${project.build.directory}/code-coverage/jacoco-ut.exec + ${project.reporting.outputDirectory}/jacoco-ut + + + + pre-integration-test + pre-integration-test + + prepare-agent + + + ${project.build.directory}/code-coverage/jacoco-it.exec + failsafeArgLine + + - - post-integration-test - post-integration-test - - report - - - ${project.build.directory}/code-coverage/jacoco-it.exec - ${project.reporting.outputDirectory}/jacoco-it - - - - - - + + post-integration-test + post-integration-test + + report + + + ${project.build.directory}/code-coverage/jacoco-it.exec + ${project.reporting.outputDirectory}/jacoco-it + + + + + + - - - ecomp-releases - AAF Release Repository - ${nexusproxy}${releaseNexusPath} - - - ecomp-snapshots - AAF Snapshot Repository - ${nexusproxy}${snapshotNexusPath} - - - ecomp-site - dav:${nexusproxy}${sitePath} - - + + + ecomp-releases + AAF Release Repository + ${nexusproxy}${releaseNexusPath} + + + ecomp-snapshots + AAF Snapshot Repository + ${nexusproxy}${snapshotNexusPath} + + + ecomp-site + dav:${nexusproxy}${sitePath} + + diff --git a/auth/auth-service/pom.xml b/auth/auth-service/pom.xml index 72713dd3..63585f94 100644 --- a/auth/auth-service/pom.xml +++ b/auth/auth-service/pom.xml @@ -1,214 +1,207 @@ + * org.onap.aaf * =========================================================================== + * Copyright (c) 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==================================================== + * --> - 4.0.0 - - org.onap.aaf.authz - authparent - 2.1.15-SNAPSHOT - ../pom.xml - - - aaf-auth-service - AAF Auth Service - Core API Component for AAF Auth - - - true - - - 0.7.7.201606060606 - 3.2 - jacoco - - target/code-coverage/jacoco-ut.exec - target/code-coverage/jacoco-it.exec - - **/gen/**,**/generated-sources/**,**/yang-gen**,**/pax/** - https://nexus.onap.org - /content/repositories/snapshots/ - /content/repositories/releases/ - /content/repositories/staging/ - /content/sites/site/org/onap/aaf/authz/${project.artifactId}/${project.version} - - - - - - org.onap.aaf.authz - aaf-auth-client - - - - org.onap.aaf.authz - aaf-auth-core - - - - - org.onap.aaf.authz - aaf-auth-deforg - - - - org.onap.aaf.authz - aaf-auth-cass - - - - org.onap.aaf.authz - aaf-auth-oauth - - - - org.onap.aaf.authz - aaf-misc-rosetta - - - - org.onap.aaf.authz - aaf-cadi-aaf - - - - org.eclipse.jetty - jetty-servlet - - - - - - - - org.apache.maven.plugins - maven-jar-plugin - - - *.properties - - - 2.3.1 - - - org.apache.maven.plugins - maven-deploy-plugin - - false - - - - org.codehaus.mojo - appassembler-maven-plugin - - - - org.onap.aaf.auth.service.AAF_Service - service - - cadi_prop_files=${project.ext_root_dir}/etc/org.osaaf.aaf.service.props - cadi_log_dir=${project.ext_root_dir}/logs/service - cadi_etc_dir=${project.ext_root_dir}/etc - - - - - - - org.jacoco - jacoco-maven-plugin - - - **/gen/** - **/generated-sources/** - **/yang-gen/** - **/pax/** - - - - - - pre-unit-test - - prepare-agent - - - ${project.build.directory}/code-coverage/jacoco-ut.exec - surefireArgLine - - - - - - post-unit-test - test - - report - - - ${project.build.directory}/code-coverage/jacoco-ut.exec - ${project.reporting.outputDirectory}/jacoco-ut - - - - pre-integration-test - pre-integration-test - - prepare-agent - - - ${project.build.directory}/code-coverage/jacoco-it.exec - failsafeArgLine - - - - - post-integration-test - post-integration-test - - report - - - ${project.build.directory}/code-coverage/jacoco-it.exec - ${project.reporting.outputDirectory}/jacoco-it - - - - - - - - - - - ecomp-releases - AAF Release Repository - ${nexusproxy}${releaseNexusPath} - - - ecomp-snapshots - AAF Snapshot Repository - ${nexusproxy}${snapshotNexusPath} - - - ecomp-site - dav:${nexusproxy}${sitePath} - - + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> + 4.0.0 + + org.onap.aaf.authz + authparent + 2.1.16-SNAPSHOT + ../pom.xml + + + aaf-auth-service + AAF Auth Service + Core API Component for AAF Auth + + + true + + + 0.7.7.201606060606 + 3.2 + jacoco + + target/code-coverage/jacoco-ut.exec + target/code-coverage/jacoco-it.exec + + **/gen/**,**/generated-sources/**,**/yang-gen**,**/pax/** + https://nexus.onap.org + /content/repositories/snapshots/ + /content/repositories/releases/ + /content/repositories/staging/ + /content/sites/site/org/onap/aaf/authz/${project.artifactId}/${project.version} + + + + + + org.onap.aaf.authz + aaf-auth-client + + + + org.onap.aaf.authz + aaf-auth-core + + + + + org.onap.aaf.authz + aaf-auth-deforg + + + + org.onap.aaf.authz + aaf-auth-cass + + + + org.onap.aaf.authz + aaf-auth-oauth + + + + org.onap.aaf.authz + aaf-misc-rosetta + + + + org.onap.aaf.authz + aaf-cadi-aaf + + + + org.eclipse.jetty + jetty-servlet + + + + + + + + org.apache.maven.plugins + maven-jar-plugin + + + *.properties + + + 2.3.1 + + + org.codehaus.mojo + appassembler-maven-plugin + + + + org.onap.aaf.auth.service.AAF_Service + service + + cadi_prop_files=${project.ext_root_dir}/etc/org.osaaf.aaf.service.props + cadi_log_dir=${project.ext_root_dir}/logs/service + cadi_etc_dir=${project.ext_root_dir}/etc + + + + + + + org.jacoco + jacoco-maven-plugin + + + **/gen/** + **/generated-sources/** + **/yang-gen/** + **/pax/** + + + + + + pre-unit-test + + prepare-agent + + + ${project.build.directory}/code-coverage/jacoco-ut.exec + surefireArgLine + + + + + + post-unit-test + test + + report + + + ${project.build.directory}/code-coverage/jacoco-ut.exec + ${project.reporting.outputDirectory}/jacoco-ut + + + + pre-integration-test + pre-integration-test + + prepare-agent + + + ${project.build.directory}/code-coverage/jacoco-it.exec + failsafeArgLine + + + + + post-integration-test + post-integration-test + + report + + + ${project.build.directory}/code-coverage/jacoco-it.exec + ${project.reporting.outputDirectory}/jacoco-it + + + + + + + + + + + ecomp-releases + AAF Release Repository + ${nexusproxy}${releaseNexusPath} + + + ecomp-snapshots + AAF Snapshot Repository + ${nexusproxy}${snapshotNexusPath} + + + ecomp-site + dav:${nexusproxy}${sitePath} + + diff --git a/auth/auth-service/src/main/java/org/onap/aaf/auth/service/AuthzCassServiceImpl.java b/auth/auth-service/src/main/java/org/onap/aaf/auth/service/AuthzCassServiceImpl.java index 295db4ac..d102b045 100644 --- a/auth/auth-service/src/main/java/org/onap/aaf/auth/service/AuthzCassServiceImpl.java +++ b/auth/auth-service/src/main/java/org/onap/aaf/auth/service/AuthzCassServiceImpl.java @@ -42,6 +42,7 @@ import java.util.Map; import java.util.Set; import java.util.TreeMap; import java.util.UUID; +import java.util.concurrent.TimeUnit; import javax.servlet.http.HttpServletRequest; @@ -2442,8 +2443,14 @@ public class AuthzCassServiceImpl TimeUnit.DAYS.toMillis(1)) { + return Result.err(Status.ERR_ConflictAlreadyExists, "Credential with same Expiration Date exists"); + } } } } @@ -2501,13 +2508,20 @@ public class AuthzCassServiceImpl > admins = func.getAdmins(trans, nsr.value.get(0).name, false); - // OK, it's a first ID, and not by NS Admin, so let's set TempPassword length - // Note, we only do this on First time, because of possibility of - // prematurely expiring a production id - if (admins.isOKhasData() && !admins.value.contains(trans.user())) { - rcred.value.expires = org.expiration(null, Expiration.TempPassword).getTime(); + // OK, it's a first ID, and not by NS Owner + if(!ques.isOwner(trans,trans.user(),cdd.ns)) { + // Admins are not allowed to set first Cred, but Org has already + // said entity MAY create, typically by Permission + // We can't know which reason they are allowed here, so we + // have to assume that any with Special Permission would not be + // an Admin. + if(ques.isAdmin(trans, trans.user(), cdd.ns)) { + return Result.err(Result.ERR_Denied, + "Only Owners may create first passwords in their Namespace. Admins may modify after one exists" ); + } else { + // Allow IDs that AREN'T part of NS with Org Onboarding Permission (see Org object) to create Temp Passwords. + rcred.value.expires = org.expiration(null, Expiration.TempPassword).getTime(); + } } } } catch (Exception e) { @@ -2948,7 +2962,7 @@ public class AuthzCassServiceImpl + acsi; + protected Mapper_2_0 mapper; + + @Mock + protected DefaultOrg org; + @Mock + protected DefaultOrgIdentity orgIdentity; + +// +// NOTE: Annotation format (@Mock and @Spy) do NOT seem to always work as a Base Class, +// so we construct manually. +// +// Mock Objects + protected HistoryDAO historyDAO = mock(HistoryDAO.class); + protected CacheInfoDAO cacheInfoDAO = mock(CacheInfoDAO.class); + protected CachedNSDAO nsDAO = mock(CachedNSDAO.class); + protected CachedPermDAO permDAO = mock(CachedPermDAO.class); + protected CachedRoleDAO roleDAO = mock(CachedRoleDAO.class); + protected CachedUserRoleDAO userRoleDAO = mock(CachedUserRoleDAO.class); + protected CachedCredDAO credDAO = mock(CachedCredDAO.class); + protected CachedCertDAO certDAO = mock(CachedCertDAO.class); + protected LocateDAO locateDAO = mock(LocateDAO.class); + protected FutureDAO futureDAO = mock(FutureDAO.class); + protected DelegateDAO delegateDAO = mock(DelegateDAO.class); + protected ApprovalDAO approvalDAO = mock(ApprovalDAO.class); + + // Spy Objects + @Spy + protected static PropAccess access = new PropAccess(); + @Spy + protected static AuthzEnv env = new AuthzEnv(access); + @Spy + protected static AuthzTrans trans = env.newTransNoAvg(); + + // @Spy doesn't seem to work on Question. + @Spy + protected Question question = spy(new Question(trans, + historyDAO,cacheInfoDAO,nsDAO,permDAO, + roleDAO,userRoleDAO,credDAO,certDAO, + locateDAO,futureDAO,delegateDAO,approvalDAO)); + + public void setUp() throws Exception { + when(trans.org()).thenReturn(org); + when(org.getDomain()).thenReturn("org.onap"); + Define.set(access); + access.setProperty(Config.CADI_LATITUDE, "38.0"); + access.setProperty(Config.CADI_LONGITUDE, "-72.0"); + + mapper = new Mapper_2_0(question); + acsi = new AuthzCassServiceImpl<>(trans, mapper, question); + } + + ////////// + // Common Data Objects + ///////// + protected List nsData(String name) { + NsDAO.Data ndd = new NsDAO.Data(); + ndd.name=name; + int dot = name.lastIndexOf('.'); + if(dot<0) { + ndd.parent="."; + } else { + ndd.parent=name.substring(0,dot); + } + List rv = new ArrayList(); + rv.add(ndd); + return rv; + } + + /** + * Setup Role Data for Mock Usages + * @param trans + * @param user + * @param ns + * @param role + * @param exists + * @param days + */ + protected void whenRole(AuthzTrans trans, String user, String ns, String role, boolean exists, int days) { + Result> result; + if(exists) { + result = Result.ok(listOf(urData(user,ns,role,days))); + } else { + result = Result.ok(emptyList(UserRoleDAO.Data.class)); + } + when(question.userRoleDAO().read(trans, user, ns+'.'+role)).thenReturn(result); + } + + protected UserRoleDAO.Data urData(String user, String ns, String rname, int days) { + UserRoleDAO.Data urdd = new UserRoleDAO.Data(); + urdd.user = user; + urdd.ns = ns; + urdd.rname = rname; + urdd.role = ns + '.' + rname; + GregorianCalendar gc = new GregorianCalendar(); + gc.add(GregorianCalendar.DAY_OF_YEAR, days); + urdd.expires = gc.getTime(); + return urdd; + } + + + protected List listOf(T t) { + List list = new ArrayList<>(); + list.add(t); + return list; + } + + protected List emptyList(Class cls) { + return new ArrayList<>(); + } + +} diff --git a/auth/auth-service/src/test/java/org/onap/aaf/auth/service/test/JU_ServiceImpl_createUserCred.java b/auth/auth-service/src/test/java/org/onap/aaf/auth/service/test/JU_ServiceImpl_createUserCred.java new file mode 100644 index 00000000..00da6b4c --- /dev/null +++ b/auth/auth-service/src/test/java/org/onap/aaf/auth/service/test/JU_ServiceImpl_createUserCred.java @@ -0,0 +1,148 @@ +/** + * ============LICENSE_START==================================================== + * org.onap.aaf + * =========================================================================== + * Copyright (c) 2018 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==================================================== + * + */ + +package org.onap.aaf.auth.service.test; + +import static org.mockito.Mockito.*; + +import java.nio.ByteBuffer; +import java.security.NoSuchAlgorithmException; +import java.util.GregorianCalendar; +import java.util.List; + +import org.junit.Before; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.mockito.Mock; +import org.mockito.Spy; +import org.mockito.runners.MockitoJUnitRunner; +import org.onap.aaf.auth.dao.cass.CredDAO; +import org.onap.aaf.auth.dao.cass.UserRoleDAO; + +import org.onap.aaf.auth.dao.hl.Question; +import org.onap.aaf.auth.env.AuthzTrans; +import org.onap.aaf.auth.layer.Result; +import org.onap.aaf.auth.org.OrganizationException; +import org.onap.aaf.cadi.Hash; +import org.onap.aaf.cadi.util.FQI; + +import aaf.v2_0.CredRequest; +import junit.framework.Assert; + +@RunWith(MockitoJUnitRunner.class) +public class JU_ServiceImpl_createUserCred extends JU_BaseServiceImpl { + @Mock + private Result rcdd; + + @Before + public void setUp() throws Exception { + super.setUp(); + } + + @Test + public void validCreateNewIsOwner() throws OrganizationException { + CredRequest cr = credRequest1(); + final String fqi = "bob@people.onap.org"; + when(trans.user()).thenReturn(fqi); + when(org.isValidPassword(trans, cr.getId(),cr.getPassword())).thenReturn(""); + when(org.isValidCred(trans, cr.getId())).thenReturn(true); + when(org.canHaveMultipleCreds(cr.getId())).thenReturn(true); + when(org.getIdentity(trans, cr.getId())).thenReturn(orgIdentity); + when(orgIdentity.isFound()).thenReturn(true); + final String ns = "org.onap.sample"; + whenRole(trans, fqi, ns, "owner", false, 100); + when(question.nsDAO().read(trans, ns)).thenReturn(Result.ok(nsData(ns))); + when(question.credDAO().readID(trans, cr.getId())).thenReturn(Result.ok(emptyList(CredDAO.Data.class))); + when(question.credDAO().create(any(AuthzTrans.class), any(CredDAO.Data.class) )).thenReturn(Result.ok(credDataFound(cr,100))); + when(question.credDAO().readNS(trans, ns)).thenReturn(Result.ok(listOf(credDataFound(cr,100)))); + Result result = acsi.createUserCred(trans,cr); + // Owner may do FIRST Creds + Assert.assertEquals(Result.OK,result.status); + } + + @Test + public void validCreateNewOnlyAdmin() throws OrganizationException { + CredRequest cr = credRequest1(); + final String fqi = "bob@people.onap.org"; + when(trans.user()).thenReturn(fqi); + when(org.isValidPassword(trans, cr.getId(),cr.getPassword())).thenReturn(""); + when(org.isValidCred(trans, cr.getId())).thenReturn(true); + when(org.canHaveMultipleCreds(cr.getId())).thenReturn(true); + when(org.getIdentity(trans, cr.getId())).thenReturn(orgIdentity); + when(orgIdentity.isFound()).thenReturn(true); + final String ns = "org.onap.sample"; + whenRole(trans,fqi,ns,"owner",false, 100); + whenRole(trans,fqi,ns,"admin",true, 100); + when(question.nsDAO().read(trans, ns)).thenReturn(Result.ok(nsData(ns))); + when(question.credDAO().readID(trans, cr.getId())).thenReturn(Result.ok(emptyList(CredDAO.Data.class))); + when(question.credDAO().create(any(AuthzTrans.class), any(CredDAO.Data.class) )).thenReturn(Result.ok(credDataFound(cr,100))); + when(question.credDAO().readNS(trans, ns)).thenReturn(Result.ok(listOf(credDataFound(cr,100)))); + Result result = acsi.createUserCred(trans,cr); + // Admins may not do FIRST Creds + Assert.assertEquals(Result.ERR_Denied,result.status); + } + + @Test + public void validCreateExisting() throws OrganizationException { + CredRequest cr = credRequest1(); + when(org.isValidPassword(trans, cr.getId(),cr.getPassword())).thenReturn(""); + when(org.isValidCred(trans, cr.getId())).thenReturn(true); + when(org.canHaveMultipleCreds(cr.getId())).thenReturn(true); + when(org.getIdentity(trans, cr.getId())).thenReturn(orgIdentity); + when(orgIdentity.isFound()).thenReturn(true); + String ns = "org.onap.sample"; + when(question.nsDAO().read(trans, ns)).thenReturn(Result.ok(nsData(ns))); + + CredDAO.Data cdd = credDataFound(cr,100); + when(question.credDAO().create(any(AuthzTrans.class), any(CredDAO.Data.class) )).thenReturn(Result.ok(cdd)); + when(question.credDAO().readID(trans, cr.getId())).thenReturn(Result.ok(listOf(cdd))); + + Result result = acsi.createUserCred(trans,cr); + Assert.assertEquals(Result.OK,result.status); + } + + private CredRequest credRequest1() { + CredRequest cr = new CredRequest(); + cr.setId("m12345@sample.onap.org"); + cr.setPassword("BobAndWeave"); + cr.setType(CredDAO.RAW); + return cr; + } + + private CredDAO.Data credDataFound(CredRequest cr, int days) { + CredDAO.Data cdd = new CredDAO.Data(); + cdd.id = cr.getId(); + cdd.ns = FQI.reverseDomain(cr.getId()); + cdd.other = 12345; + cdd.tag = "1355434"; + cdd.type = CredDAO.BASIC_AUTH_SHA256; + try { + cdd.cred = ByteBuffer.wrap(Hash.hashSHA256(cr.getPassword().getBytes())); + } catch (NoSuchAlgorithmException e) { + Assert.fail(e.getMessage()); + } + GregorianCalendar gc = new GregorianCalendar(); + gc.add(GregorianCalendar.DAY_OF_YEAR, days); + cdd.expires = gc.getTime(); + return cdd; + } + +} \ No newline at end of file diff --git a/auth/docker/.gitignore b/auth/docker/.gitignore index fb1f79ea..51bfecd8 100644 --- a/auth/docker/.gitignore +++ b/auth/docker/.gitignore @@ -13,3 +13,4 @@ /*.jks /sdnc /working +/target diff --git a/auth/docker/Dockerfile.agent b/auth/docker/Dockerfile.agent index 20406a46..ec5f24ea 100644 --- a/auth/docker/Dockerfile.agent +++ b/auth/docker/Dockerfile.agent @@ -26,7 +26,7 @@ LABEL version=${AAF_VERSION} COPY bin/client.sh /opt/app/aaf_config/bin/agent.sh COPY bin/pod_wait.sh /opt/app/aaf_config/bin/pod_wait.sh -COPY bin/aaf-cadi-aaf-${AAF_VERSION}-full.jar /opt/app/aaf_config/bin/ +COPY bin/aaf-cadi-aaf-${JAR_VERSION}-full.jar /opt/app/aaf_config/bin/ COPY bin/aaf-cadi-servlet-sample-*-sample.jar /opt/app/aaf_config/bin/ COPY cert/*trust*.b64 /opt/app/aaf_config/cert/ RUN chmod 755 /opt/app/aaf_config/bin/* &&\ diff --git a/auth/docker/Dockerfile.config b/auth/docker/Dockerfile.config index 7b159d7c..4bb7a940 100644 --- a/auth/docker/Dockerfile.config +++ b/auth/docker/Dockerfile.config @@ -33,8 +33,8 @@ COPY public /opt/app/aaf_config/public COPY CA /opt/app/aaf_config/CA COPY bin/service.sh /opt/app/aaf_config/bin/agent.sh COPY bin/pod_wait.sh /opt/app/aaf_config/bin/pod_wait.sh -COPY bin/aaf-auth-cmd-${AAF_VERSION}-full.jar /opt/app/aaf_config/bin/ -COPY bin/aaf-auth-batch-${AAF_VERSION}-full.jar /opt/app/aaf_config/bin/ +COPY bin/aaf-auth-cmd-${JAR_VERSION}-full.jar /opt/app/aaf_config/bin/ +COPY bin/aaf-auth-batch-${JAR_VERSION}-full.jar /opt/app/aaf_config/bin/ RUN mkdir -p /opt/app/osaaf &&\ chmod 755 /opt/app/aaf_config/bin/*.sh &&\ diff --git a/auth/docker/Dockerfile.ms b/auth/docker/Dockerfile.ms deleted file mode 100644 index 351c3798..00000000 --- a/auth/docker/Dockerfile.ms +++ /dev/null @@ -1,47 +0,0 @@ -######### -# ============LICENSE_START==================================================== -# org.onap.aaf -# =========================================================================== -# Copyright (c) 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==================================================== -# -FROM ${DOCKER_REPOSITORY}/onap/aaf/aaf_core:${AAF_VERSION} -MAINTAINER AAF Team, AT&T 2018 -ENV VERSION=${AAF_VERSION} - -LABEL description="aaf_${AAF_COMPONENT}" -LABEL version=${AAF_VERSION} - -COPY bin/pod_wait.sh /opt/app/aaf/bin/ -RUN mkdir -p /opt/app/osaaf &&\ - mkdir -p /opt/app/aaf/status &&\ - chmod 755 /opt/app/aaf/bin/* &&\ - if [ -n "${DUSER}" ]; then chown ${DUSER}:${DUSER} /opt/app/aaf/status \ - && chown ${DUSER}:${DUSER} /opt/app/osaaf \ - && chown -R ${DUSER}:${DUSER} /opt/app/aaf; fi - -#CMD ["bash","-c","cd /opt/app/aaf;bin/${AAF_COMPONENT}"] -CMD [] - -# For Debugging installation -# CMD ["/bin/bash","-c","pwd;cd /opt/app/osaaf;find /opt/app/osaaf -depth;df -k; cat /opt/app/aaf/${AAF_COMPONENT}/bin/${AAF_COMPONENT};cat /etc/hosts;/opt/app/aaf/${AAF_COMPONENT}/bin/${AAF_COMPONENT}"] -# Java Debugging VM Args -# "-Xdebug",\ -# "-Xnoagent",\ -# "-Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=8000",\ - -# TLS Debugging VM Args -# "-Djavax.net.debug","ssl", \ - diff --git a/auth/docker/agent.sh b/auth/docker/agent.sh index 32910874..575e21f9 100644 --- a/auth/docker/agent.sh +++ b/auth/docker/agent.sh @@ -28,7 +28,7 @@ fi . ./aaf.props DOCKER=${DOCKER:=docker} -CADI_VERSION=${CADI_VERSION:=2.1.15-SNAPSHOT} +CADI_VERSION=${CADI_VERSION:=2.1.16} for V in VERSION DOCKER_REPOSITORY HOSTNAME CONTAINER_NS AAF_FQDN AAF_FQDN_IP DEPLOY_FQI APP_FQDN APP_FQI VOLUME DRIVER LATITUDE LONGITUDE; do if [ "$(grep $V ./aaf.props)" = "" ]; then diff --git a/auth/docker/dbuild.sh b/auth/docker/dbuild.sh old mode 100755 new mode 100644 index 3094eab9..0a816461 --- a/auth/docker/dbuild.sh +++ b/auth/docker/dbuild.sh @@ -1,4 +1,4 @@ -#!/bin/bash + ######### # ============LICENSE_START==================================================== # org.onap.aaf @@ -28,6 +28,9 @@ fi . ./d.props +# Remove "SNAPSHOT" from AAF Jars in Containers +JAR_VERSION=${VERSION/-SNAPSHOT/} + # process input. originally, an optional positional parameter is used to designate a component. # A flagged parameter has been added to optionally indicate docker pull registry. Ideally, options # would be flagged but we're avoiding ripple effect of changing original usage @@ -47,20 +50,23 @@ if [ $# -gt 0 ]; then fi fi -echo "$0: AAF_COMPONENTS=$AAF_COMPONENTS DOCKER_PULL_REGISTRY=$DOCKER_PULL_REGISTRY" +grep -v '#' d.props | grep '=' | grep -v -e "=$" DOCKER=${DOCKER:=docker} echo "Building Containers for aaf components, version $VERSION" - # AAF_cass now needs a version... +echo "### Build Cass" cd ../auth-cass/docker +pwd bash ./dbuild.sh $DOCKER_PULL_REGISTRY cd - ######## # First, build a AAF Base version - set the core image, etc +echo "### Build Base" sed -e 's/${AAF_VERSION}/'${VERSION}'/g' \ + -e 's/${JAR_VERSION}/'${JAR_VERSION}'/g' \ -e 's/${DUSER}/'${DUSER}'/g' \ -e 's/${REGISTRY}/'${DOCKER_PULL_REGISTRY}'/g' \ Dockerfile.base > Dockerfile @@ -69,18 +75,33 @@ $DOCKER tag ${ORG}/${PROJECT}/aaf_base:${VERSION} ${DOCKER_REPOSITORY}/${ORG}/${ $DOCKER tag ${ORG}/${PROJECT}/aaf_base:${VERSION} ${DOCKER_REPOSITORY}/${ORG}/${PROJECT}/aaf_base:latest rm Dockerfile +function SCP() { + SANS=${1/-SNAPSHOT/} + echo $1 = $SANS + if [ -e $SANS ]; then + cp $SANS $2 + else + + ln $1 $SANS + cp $SANS $2 + rm $SANS + fi +} + ######## # Second, Create the AAF Config (Security) Images cd .. # Note: only 2 jars each in Agent/Config -cp auth-cmd/target/aaf-auth-cmd-$VERSION-full.jar sample/bin -cp auth-batch/target/aaf-auth-batch-$VERSION-full.jar sample/bin -cp ../cadi/aaf/target/aaf-cadi-aaf-${VERSION}-full.jar sample/bin -cp ../cadi/servlet-sample/target/aaf-cadi-servlet-sample-${VERSION}-sample.jar sample/bin +SCP auth-cmd/target/aaf-auth-cmd-$VERSION-full.jar sample/bin +SCP auth-batch/target/aaf-auth-batch-$VERSION-full.jar sample/bin +SCP ../cadi/aaf/target/aaf-cadi-aaf-${VERSION}-full.jar sample/bin +SCP ../cadi/servlet-sample/target/aaf-cadi-servlet-sample-${VERSION}-sample.jar sample/bin cp -Rf ../conf/CA sample # AAF Config image (for AAF itself) +echo "### Build Config" sed -e 's/${AAF_VERSION}/'${VERSION}'/g' \ + -e 's/${JAR_VERSION}/'${JAR_VERSION}'/g' \ -e 's/${AAF_COMPONENT}/'${AAF_COMPONENT}'/g' \ -e 's/${DOCKER_REPOSITORY}/'${DOCKER_REPOSITORY}'/g' \ -e 's/${DUSER}/'${DUSER}'/g' \ @@ -91,7 +112,9 @@ $DOCKER tag ${ORG}/${PROJECT}/aaf_config:${VERSION} ${DOCKER_REPOSITORY}/${ORG}/ # AAF Agent Image (for Clients) +echo "### Build Agent" sed -e 's/${AAF_VERSION}/'${VERSION}'/g' \ + -e 's/${JAR_VERSION}/'${JAR_VERSION}'/g' \ -e 's/${AAF_COMPONENT}/'${AAF_COMPONENT}'/g' \ -e 's/${DOCKER_REPOSITORY}/'${DOCKER_REPOSITORY}'/g' \ -e 's/${DUSER}/'${DUSER}'/g' \ @@ -101,49 +124,84 @@ $DOCKER tag ${ORG}/${PROJECT}/aaf_agent:${VERSION} ${DOCKER_REPOSITORY}/${ORG}/$ $DOCKER tag ${ORG}/${PROJECT}/aaf_agent:${VERSION} ${DOCKER_REPOSITORY}/${ORG}/${PROJECT}/aaf_agent:latest # Clean up -rm sample/Dockerfile sample/bin/aaf-*-${VERSION}*.jar +rm sample/Dockerfile sample/bin/aaf-*-*.jar rm -Rf sample/CA cd - + +######## +# Third Copy AAF Executables to a BUILD Directory, for easy Cleanup +echo "### Copy to aaf_DBUILD" +if [ -e "../aaf_$VERSION" ]; then + cp -Rf ../aaf_$VERSION ../aaf_DBUILD +elif [ -e "../aaf_$JAR_VERSION" ]; then + cp -Rf ../aaf_$JAR_VERSION ../aaf_DBUILD +else + echo "ERROR: No AAF Built. use Maven" + exit +fi +if [ ! "$VERSION" = "$JAR_VERSION" ]; then + START_DIR=$(pwd) + # Convert SNAPSHOT issues + cp -Rf ../aaf_$VERSION ../aaf_DBUILD + cd ../aaf_DBUILD/lib + # If Built Jars are "SNAPSHOT", convert to NON SNAPSHOT + for J in $(ls *-SNAPSHOT*); do mv $J ${J/-SNAPSHOT/}; done + cd ../bin + rm *.bat + for S in $(ls); do + sed -e "/$VERSION/s/$VERSION/$JAR_VERSION/g" $S > tmp + mv tmp $S + done + cd ${START_DIR} +fi + ######## # Third, build a core Docker Image to be used for all AAF Components -echo Building aaf_$AAF_COMPONENT... -cp ../sample/bin/pod_wait.sh ../aaf_${VERSION}/bin +cp ../sample/bin/pod_wait.sh ../aaf_DBUILD/bin # Apply currrent Properties to Docker file, and put in place. sed -e 's/${AAF_VERSION}/'${VERSION}'/g' \ + -e 's/${JAR_VERSION}/'${JAR_VERSION}'/g' \ -e 's/${AAF_COMPONENT}/'${AAF_COMPONENT}'/g' \ -e 's/${DOCKER_REPOSITORY}/'${DOCKER_REPOSITORY}'/g' \ -e 's/${DUSER}/'${DUSER}'/g' \ - Dockerfile.core >../aaf_${VERSION}/Dockerfile + Dockerfile.core >../aaf_DBUILD/Dockerfile cd .. -echo "#######" -pwd -echo "#######" -$DOCKER build -t ${ORG}/${PROJECT}/aaf_core:${VERSION} aaf_${VERSION} + +echo "### Building Core" +# Don't need "Hello" App in core +mv aaf_DBUILD/lib/aaf-auth-hello-${JAR_VERSION}* /tmp + +$DOCKER build -t ${ORG}/${PROJECT}/aaf_core:${VERSION} aaf_DBUILD $DOCKER tag ${ORG}/${PROJECT}/aaf_core:${VERSION} ${DOCKER_REPOSITORY}/${ORG}/${PROJECT}/aaf_core:${VERSION} $DOCKER tag ${ORG}/${PROJECT}/aaf_core:${VERSION} ${DOCKER_REPOSITORY}/${ORG}/${PROJECT}/aaf_core:latest -rm aaf_${VERSION}/Dockerfile +rm aaf_DBUILD/Dockerfile +mv /tmp/aaf-auth-hello-${JAR_VERSION}* aaf_DBUILD/lib ######## # Fourth, do Hello # Apply currrent Properties to Docker file, and put in place. +echo "### Building Hello" cd - sed -e 's/${AAF_VERSION}/'${VERSION}'/g' \ + -e 's/${JAR_VERSION}/'${JAR_VERSION}'/g' \ -e 's/${DOCKER_REPOSITORY}/'${DOCKER_REPOSITORY}'/g' \ -e 's/${DUSER}/'${DUSER}'/g' \ - Dockerfile.hello >../aaf_${VERSION}/Dockerfile + Dockerfile.hello >../aaf_DBUILD/Dockerfile cd .. -echo "#######" -pwd -echo "#######" -cp -Rf sample/etc aaf_${VERSION} -cp -Rf sample/logs aaf_${VERSION} -$DOCKER build -t ${ORG}/${PROJECT}/aaf_hello:${VERSION} aaf_${VERSION} + +cp -Rf sample/etc aaf_DBUILD +cp -Rf sample/logs aaf_DBUILD + +for C in cass certman cmd deforg fs gui locate oauth service; do + rm aaf_DBUILD/lib/aaf-auth-$C-* +done + +$DOCKER build -t ${ORG}/${PROJECT}/aaf_hello:${VERSION} aaf_DBUILD $DOCKER tag ${ORG}/${PROJECT}/aaf_hello:${VERSION} ${DOCKER_REPOSITORY}/${ORG}/${PROJECT}/aaf_hello:${VERSION} $DOCKER tag ${ORG}/${PROJECT}/aaf_hello:${VERSION} ${DOCKER_REPOSITORY}/${ORG}/${PROJECT}/aaf_hello:latest -rm -Rf aaf_${VERSION}/Dockerfile aaf_${VERSION}/etc # Final cleanup -rm aaf_${VERSION}/bin/pod_wait.sh +rm -Rf aaf_DBUILD cd - diff --git a/auth/docker/dstage.sh b/auth/docker/dstage.sh new file mode 100644 index 00000000..b57a2cec --- /dev/null +++ b/auth/docker/dstage.sh @@ -0,0 +1,31 @@ +#!/bin/bash +######### +# ============LICENSE_START==================================================== +# org.onap.aaf +# =========================================================================== +# Copyright (c) 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==================================================== +# +# Docker push Script. Reads all the components generated by install, on per-version basis +# +# Pull in Variables from d.props +. ./d.props +DOCKER=${DOCKER:=docker} + +AAF_COMPONENTS="config agent base core cass hello " + +for AAF_COMPONENT in ${AAF_COMPONENTS}; do + $DOCKER push ${DOCKER_REPOSITORY}/${ORG}/${PROJECT}/aaf_${AAF_COMPONENT}:${VERSION} +done diff --git a/auth/docker/pom.xml b/auth/docker/pom.xml new file mode 100644 index 00000000..b4d3545c --- /dev/null +++ b/auth/docker/pom.xml @@ -0,0 +1,65 @@ + + + + 4.0.0 + + org.onap.aaf.authz + authparent + 2.1.16 + ../pom.xml + + + aaf-auth-docker + AAF Docker Build + Docker Build + + + + build-docker + + + + org.codehaus.mojo + exec-maven-plugin + 1.6.0 + + + Docker Build + + exec + + + + + false + bash + -c "pwd; bash dbuild.sh;bash dstage.sh" + + + + + + + + + diff --git a/auth/helm/aaf-hello/agent.sh b/auth/helm/aaf-hello/agent.sh new file mode 100644 index 00000000..a622686a --- /dev/null +++ b/auth/helm/aaf-hello/agent.sh @@ -0,0 +1,103 @@ +function prop () { + echo $(grep " $1" values.yaml | grep -v "#"| sed -e "s/.*$1: *//") +} + +REPO=$(prop repository) +if [ -z "$REPO" ]; then + REPO="nexus3.onap.org:10001" +fi + +if [ "\"\"" = "$REPO" ]; then + IMAGE="$(prop agentImage)" +else + IMAGE="$REPO/$(prop agentImage)" +fi + +APP_FQI=$(prop fqi) +FQDN=$(prop fqdn) +LATITUDE=$(prop cadi_latitude) +LONGITUDE=$(prop cadi_longitude) +DEPLOY_FQI=$(prop deploy_fqi) +echo "Enter Password for Deployer: $DEPLOY_FQI" +#read DEPLOY_PASSWORD +#if [ -z "$DEPLOY_PASSWORD" ]; then + # ONAP TEST Password. DO NOT PUT REAL PASSWORDS HERE!!! + DEPLOY_PASSWORD='"demo123456!"' +#fi +DEPLOYMENT=$(kubectl -n onap get deployments | grep ${FQDN//\"} | cut -f1 -d' ') +if [ -z "$DEPLOYMENT" ]; then + DEPLOYMENT=$FQDN +fi +echo Running from $IMAGE for Deployment $DEPLOYMENT + +kubectl -n onap run -it --rm aaf-agent-$USER --image=$IMAGE --overrides=' +{ + "spec": { + "containers": [ + { + "name": "aaf-agent-'$USER'", + "image": "'$IMAGE'", + "imagePullPolicy": "IfNotPresent", + "command": [ + "bash", + "-c", + "/opt/app/aaf_config/bin/agent.sh && cd /opt/app/osaaf/local && exec bash" + ], + "env": [ + { + "name": "APP_FQI", + "value": '$APP_FQI' + },{ + "name": "APP_FQDN", + "value": '$FQDN' + },{ + "name": "DEPLOY_FQI", + "value": '$DEPLOY_FQI' + },{ + "name": "DEPLOY_PASSWORD", + "value": '$DEPLOY_PASSWORD' + },{ + "name": "aaf_locate_url", + "value": "https://aaf-locate.onap:8095" + },{ + "name": "aaf_locator_container", + "value": "helm" + },{ + "name": "aaf_locator_container_ns", + "value": "onap" + },{ + "name": "aaf_locator_public_fqdn", + "value": "aaf.osaaf.org" + },{ + "name": "aaf_locator_fqdn", + "value": '$FQDN' + },{ + "name": "cadi_latitude", + "value": '$LATITUDE' + },{ + "name": "cadi_longitude", + "value": '$LONGITUDE' + } + ], + "stdin": true, + "stdinOnce": true, + "tty": true, + "volumeMounts": [ + { + "mountPath": "/opt/app/osaaf", + "name": "'${FQDN//\"}'-vol" + } + ] + } + ], + "volumes": [ + { + "name": "'${FQDN//\"}'-vol", + "persistentVolumeClaim": { + "claimName": "'${DEPLOYMENT//\"}'-pvc" + } + } + ] + } +} +' --restart=Never -- bash diff --git a/auth/helm/aaf-hello/templates/aaf-hello.yaml b/auth/helm/aaf-hello/templates/aaf-hello.yaml index 7bf35cde..3ff9a576 100644 --- a/auth/helm/aaf-hello/templates/aaf-hello.yaml +++ b/auth/helm/aaf-hello/templates/aaf-hello.yaml @@ -57,7 +57,7 @@ spec: claimName: aaf-hello-pvc initContainers: - name: aaf-hello-config - image: "{{ .Values.image.repository }}{{ .Values.service.initImage }}" + image: "{{ .Values.image.repository }}{{ .Values.service.agentImage }}" imagePullPolicy: IfNotPresent volumeMounts: - mountPath: "/opt/app/osaaf" diff --git a/auth/helm/aaf-hello/values.yaml b/auth/helm/aaf-hello/values.yaml index da37ff63..5a3931c2 100644 --- a/auth/helm/aaf-hello/values.yaml +++ b/auth/helm/aaf-hello/values.yaml @@ -37,8 +37,8 @@ image: # repository: localhost:5000/ service: - initImage: onap/aaf/aaf_agent:2.1.15-SNAPSHOT - image: onap/aaf/aaf_hello:2.1.15-SNAPSHOT + agentImage: onap/aaf/aaf_agent:2.1.16-SNAPSHOT + image: onap/aaf/aaf_hello:2.1.16-SNAPSHOT app_ns: "org.osaaf.aaf" fqi: "aaf@aaf.osaaf.org" fqdn: "aaf-hello" @@ -47,6 +47,7 @@ service: public_port: "30086" cadi_latitude: "38.0" cadi_longitude: "-72.0" + deploy_fqi: "deployer@people.osaaf.org" persistence: # Where on local disk to store diff --git a/auth/helm/aaf/Chart.yaml b/auth/helm/aaf/Chart.yaml index 3f370a55..f83041e9 100644 --- a/auth/helm/aaf/Chart.yaml +++ b/auth/helm/aaf/Chart.yaml @@ -22,4 +22,4 @@ apiVersion: v1 appVersion: "1.0" description: AAF Helm Chart name: aaf -version: 2.1.15-SNAPSHOT +version: 2.1.16-SNAPSHOT diff --git a/auth/helm/aaf/values.yaml b/auth/helm/aaf/values.yaml index 4bb2037f..b320d9c8 100644 --- a/auth/helm/aaf/values.yaml +++ b/auth/helm/aaf/values.yaml @@ -104,7 +104,7 @@ image: # When using Docker Repo, add, and include trailing "/" # repository: nexus3.onap.org:10003/ # repository: localhost:5000/ - version: 2.1.15-SNAPSHOT + version: 2.1.16-SNAPSHOT resources: {} # We usually recommend not to specify default resources and to leave this as a conscious diff --git a/auth/pom.xml b/auth/pom.xml index 071c1841..27abccdb 100644 --- a/auth/pom.xml +++ b/auth/pom.xml @@ -20,283 +20,274 @@ * --> + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> - 4.0.0 - + 4.0.0 + org.onap.aaf.authz parent - 2.1.15-SNAPSHOT + 2.1.16-SNAPSHOT - authparent - AAF Auth Parent - pom + authparent + AAF Auth Parent + pom - - - UTF-8 - /opt/app/osaaf - - 0.7.7.201606060606 - 3.2 - jacoco - - target/code-coverage/jacoco-ut.exec - target/code-coverage/jacoco-it.exec - - **/gen/**,**/generated-sources/**,**/yang-gen**,**/pax/** - https://nexus.onap.org - /content/repositories/snapshots/ - /content/repositories/releases/ - /content/repositories/staging/ - /content/sites/site/org/onap/aaf/authz/${project.artifactId}/${project.version} - - 4.1.22.Final - /opt/app/osaaf - + + + UTF-8 + /opt/app/osaaf + + 0.7.7.201606060606 + 3.2 + jacoco + + target/code-coverage/jacoco-ut.exec + target/code-coverage/jacoco-it.exec + + **/gen/**,**/generated-sources/**,**/yang-gen**,**/pax/** + https://nexus.onap.org + /content/repositories/snapshots/ + /content/repositories/releases/ + /content/repositories/staging/ + /content/sites/site/org/onap/aaf/authz/${project.artifactId}/${project.version} + + 4.1.22.Final + /opt/app/osaaf + - - - Jonathan Gathman - jonathan.gathman@att.com - ATT - - Architect - Lead Developer - - - - Gabe Maurer - gabe.maurer@att.com - ATT - - Developer - - - - Ian Howell - ian.howell@att.com - ATT - - Developer - - - - Sai Gandham - sai.gandham@att.com - ATT - - Developer - - - + + + Jonathan Gathman + jonathan.gathman@att.com + ATT + + Architect + Lead Developer + + + + Gabe Maurer + gabe.maurer@att.com + ATT + + Developer + + + + Ian Howell + ian.howell@att.com + ATT + + Developer + + + + Sai Gandham + sai.gandham@att.com + ATT + + Developer + + + - - - - - org.apache.maven.plugins - maven-compiler-plugin - 2.3.2 - - 1.8 - 1.8 - - - - org.apache.maven.plugins - maven-deploy-plugin - 2.6 - - false - - + + + + + org.apache.maven.plugins + maven-compiler-plugin + 2.3.2 + + 1.8 + 1.8 + + + + org.apache.maven.plugins + maven-surefire-plugin + 2.17 + + false - - org.apache.maven.plugins - maven-surefire-plugin - 2.17 - - false + + **/JU*.java + + + + false + + - - **/JU*.java - - - - false - - - - - org.apache.maven.plugins - maven-failsafe-plugin - 2.17 - - false - - - - integration-test - - integration-test - verify - - - - - - - - org.codehaus.mojo - appassembler-maven-plugin - 1.10 - - - - assemble - - install - - - - - ../aaf_${project.version} - true - etc - lib - false - flat - - - - - - com.spotify - docker-maven-plugin - 1.0.0 - - onap/osaaf/${project.artifactId} - - ${basedir}/src/main/resources/docker - - latest - ${project.docker.latesttagtimestamp.version} - ${project.docker.latesttag.version} - - true - - - - / - ${project.build.directory}/opt - ${project.build.finalName}.jar - - - / - ${project.build.directory} - **/** - - - - - - build-image - package - - build - - - ${skip.docker.build} - - - - - tag-image-project-version - package - - tag - - - onap/osaaf/${project.artifactId} - ${docker.push.registry}/onap/osaaf/${project.artifactId}:${project.version} - ${skip.docker.push} - - - - - tag-image-latest - package - - tag - - - onap/aaf/authz-service - ${docker.push.registry}/onap/osaaf/${project.artifactId}:latest - ${skip.docker.push} - - - - - push-image-latest - deploy - - push - - - ${docker.push.registry}/onap/osaaf/${project.artifactId}:${project.version} - ${skip.docker.push} - - - - - push-image - deploy - - push - - - ${docker.push.registry}/onap/osaaf/${project.artifactId}:latest - ${skip.docker.push} - - - - - - org.jacoco - jacoco-maven-plugin - 0.7.7.201606060606 - - true - - org.onap.aaf.* - - - - - pre-unit-test - - prepare-agent - - - ${project.build.directory}/coverage-reports/jacoco.exec - - - - - pre-integration-test - pre-integration-test - - prepare-agent - - - ${project.build.directory}/coverage-reports/jacoco-it.exec - - - - + + org.apache.maven.plugins + maven-failsafe-plugin + 2.17 + + false + + + + integration-test + + integration-test + verify + + + + + + + + org.codehaus.mojo + appassembler-maven-plugin + 1.10 + + + + assemble + + install + + + + + ../aaf_${project.version} + true + etc + lib + false + flat + + + + + + com.spotify + docker-maven-plugin + 1.0.0 + + onap/osaaf/${project.artifactId} + + ${basedir}/src/main/resources/docker + + latest + ${project.docker.latesttagtimestamp.version} + ${project.docker.latesttag.version} + + true + + + + / + ${project.build.directory}/opt + ${project.build.finalName}.jar + + + / + ${project.build.directory} + **/** + + + + + + build-image + package + + build + + + ${skip.docker.build} + + + + + tag-image-project-version + package + + tag + + + onap/osaaf/${project.artifactId} + ${docker.push.registry}/onap/osaaf/${project.artifactId}:${project.version} + ${skip.docker.push} + + + + + tag-image-latest + package + + tag + + + onap/aaf/authz-service + ${docker.push.registry}/onap/osaaf/${project.artifactId}:latest + ${skip.docker.push} + + + + + push-image-latest + deploy + + push + + + ${docker.push.registry}/onap/osaaf/${project.artifactId}:${project.version} + ${skip.docker.push} + + + + + push-image + deploy + + push + + + ${docker.push.registry}/onap/osaaf/${project.artifactId}:latest + ${skip.docker.push} + + + + + + org.jacoco + jacoco-maven-plugin + 0.7.7.201606060606 + + true + + org.onap.aaf.* + + + + + pre-unit-test + + prepare-agent + + + ${project.build.directory}/coverage-reports/jacoco.exec + + + + + pre-integration-test + pre-integration-test + + prepare-agent + + + ${project.build.directory}/coverage-reports/jacoco-it.exec + + + + merge @@ -313,53 +304,53 @@ ${project.build.directory}/jacoco-dev.exec - - - - - + + + + + - - - org.mockito - mockito-all - test - - - org.powermock - powermock-module-junit4 - test - - - org.powermock - powermock-api-mockito - test - - - junit - junit - test - + + + org.mockito + mockito-all + test + + + org.powermock + powermock-module-junit4 + test + + + org.powermock + powermock-api-mockito + test + + + junit + junit + test + - + - - - auth-core - auth-cass - auth-deforg + + + auth-core + auth-cass + auth-deforg - auth-service - auth-cmd - auth-batch + auth-service + auth-cmd + auth-batch - auth-gui - auth-locate - auth-oauth - auth-certman - auth-fs - auth-hello - + auth-gui + auth-locate + auth-oauth + auth-certman + auth-fs + auth-hello + - + diff --git a/auth/sample/bin/client.sh b/auth/sample/bin/client.sh index 0c0d97cb..4768d81c 100755 --- a/auth/sample/bin/client.sh +++ b/auth/sample/bin/client.sh @@ -70,10 +70,11 @@ fi if [ ! -e "$DOT_AAF/keyfile" ]; then $JAVA_AGENT cadi keygen $DOT_AAF/keyfile chmod 400 $DOT_AAF/keyfile + echo "cadi_keyfile=$DOT_AAF/keyfile" > ${SSO} # Add Deployer Creds to Root's SSO DEPLOY_FQI="${DEPLOY_FQI:=$app_id}" - echo "aaf_id=${DEPLOY_FQI}" > ${SSO} + echo "aaf_id=${DEPLOY_FQI}" >> ${SSO} if [ ! "${DEPLOY_PASSWORD}" = "" ]; then echo aaf_password=enc:$(sso_encrypt ${DEPLOY_PASSWORD}) >> ${SSO} fi @@ -197,9 +198,13 @@ else fi fi ;; + read) + echo "## Read Artifacts" + $JAVA_AGENT read $APP_FQI $APP_FQDN cadi_prop_files=${SSO} cadi_loglevel=INFO + ;; showpass) echo "## Show Passwords" - $JAVA_AGENT showpass $APP_FQI $APP_FQDN cadi_prop_files=${SSO} + $JAVA_AGENT showpass $APP_FQI $APP_FQDN cadi_prop_files=${SSO} cadi_loglevel=ERROR ;; check) echo "## Check Certificate" diff --git a/cadi/aaf/jenkins-pom.xml b/cadi/aaf/jenkins-pom.xml index 026f9ee5..44710d95 100644 --- a/cadi/aaf/jenkins-pom.xml +++ b/cadi/aaf/jenkins-pom.xml @@ -19,227 +19,227 @@ * --> - - com.att.cadi - parent - 1.2.2 - .. - + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> + + com.att.cadi + parent + 1.2.2 + .. + - 4.0.0 - CADI AAF (Application Authorization Framework) LUR - jar - cadi-aaf + 4.0.0 + CADI AAF (Application Authorization Framework) LUR + jar + cadi-aaf - - - com.att.authz - authz-client - + + + com.att.authz + authz-client + - - com.att.cadi - cadi-client - - - - com.att.aft - dme2 - - - org.slf4j - slf4j-log4j12 - - - log4j - log4j - + + com.att.cadi + cadi-client + + + + com.att.aft + dme2 + + + org.slf4j + slf4j-log4j12 + + + log4j + log4j + - + - - - - - - - org.codehaus.mojo - jaxb2-maven-plugin - 1.3 - - - generate-sources - - xjc - - - - - src/main/xsd - - - - org.apache.maven.plugins - maven-jar-plugin - - - - true - - + + + + + + + org.codehaus.mojo + jaxb2-maven-plugin + 1.3 + + + generate-sources + + xjc + + + + + src/main/xsd + + + + org.apache.maven.plugins + maven-jar-plugin + + + + true + + - - - - test-jar - package - - test-jar - - - - - + + + + test-jar + package + + test-jar + + + + + - - - maven-assembly-plugin - 2.4 - - tests - - - true - - - - - - full - package - - single - - - - src/assemble/cadi-aaf.xml - - - - - + + + maven-assembly-plugin + 2.4 + + tests + + + true + + + + + + full + package + + single + + + + src/assemble/cadi-aaf.xml + + + + + - - - org.apache.maven.plugins - maven-jarsigner-plugin - - false - - - - sign-full - - sign - - - target/${project.artifactId}-${project.version}-full.jar - - - - verify-full - - verify - - - target/${project.artifactId}-${project.version}-full.jar - - - - + + + org.apache.maven.plugins + maven-jarsigner-plugin + + false + + + + sign-full + + sign + + + target/${project.artifactId}-${project.version}-full.jar + + + + verify-full + + verify + + + target/${project.artifactId}-${project.version}-full.jar + + + + - - org.codehaus.mojo - jaxb2-maven-plugin - 1.3 - - - generate-sources - - xjc - - - - - src/main/xsd - - - - org.apache.maven.plugins - maven-deploy-plugin - 2.6 - - false - - - + + org.codehaus.mojo + jaxb2-maven-plugin + 1.3 + + + generate-sources + + xjc + + + + + src/main/xsd + + + + org.apache.maven.plugins + maven-deploy-plugin + 2.6 + + false + + + - - - - - org.eclipse.m2e - lifecycle-mapping - 1.0.0 - - - - - - - org.codehaus.mojo - - - jaxb2-maven-plugin - - - [1.3,) - - - xjc - - - - - - - - - - - - - + + + + + org.eclipse.m2e + lifecycle-mapping + 1.0.0 + + + + + + + org.codehaus.mojo + + + jaxb2-maven-plugin + + + [1.3,) + + + xjc + + + + + + + + + + + + + diff --git a/cadi/aaf/pom.xml b/cadi/aaf/pom.xml index b5767b26..1fa4ab59 100644 --- a/cadi/aaf/pom.xml +++ b/cadi/aaf/pom.xml @@ -20,209 +20,209 @@ * --> - - org.onap.aaf.authz - cadiparent - 2.1.15-SNAPSHOT - .. - + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> + + org.onap.aaf.authz + cadiparent + 2.1.16-SNAPSHOT + .. + - 4.0.0 - aaf-cadi-aaf - AAF CADI AAF Connection Library - jar + 4.0.0 + aaf-cadi-aaf + AAF CADI AAF Connection Library + jar - - - - 0.7.7.201606060606 - 3.2 - jacoco - - target/code-coverage/jacoco-ut.exec - target/code-coverage/jacoco-it.exec - - **/gen/**,**/generated-sources/**,**/yang-gen**,**/pax/** - https://nexus.onap.org - /content/repositories/snapshots/ - /content/repositories/releases/ - /content/repositories/staging/ - /content/sites/site/org/onap/aaf/authz/${project.artifactId}/${project.version} - - - - Jonathan Gathman - jonathan.gathman@att.com - ATT - - Architect - Lead Developer - - - - Gabe Maurer - gabe.maurer@att.com - ATT - - Developer - - - - Ian Howell - ian.howell@att.com - ATT - - Developer - - - - Sai Gandham - sai.gandham@att.com - ATT - - Developer - - - + + + + 0.7.7.201606060606 + 3.2 + jacoco + + target/code-coverage/jacoco-ut.exec + target/code-coverage/jacoco-it.exec + + **/gen/**,**/generated-sources/**,**/yang-gen**,**/pax/** + https://nexus.onap.org + /content/repositories/snapshots/ + /content/repositories/releases/ + /content/repositories/staging/ + /content/sites/site/org/onap/aaf/authz/${project.artifactId}/${project.version} + + + + Jonathan Gathman + jonathan.gathman@att.com + ATT + + Architect + Lead Developer + + + + Gabe Maurer + gabe.maurer@att.com + ATT + + Developer + + + + Ian Howell + ian.howell@att.com + ATT + + Developer + + + + Sai Gandham + sai.gandham@att.com + ATT + + Developer + + + - - - org.onap.aaf.authz - aaf-auth-client - + + + org.onap.aaf.authz + aaf-auth-client + - - org.onap.aaf.authz - aaf-cadi-client - + + org.onap.aaf.authz + aaf-cadi-client + - - org.onap.aaf.authz - aaf-misc-env - + + org.onap.aaf.authz + aaf-misc-env + - - org.onap.aaf.authz - aaf-cadi-core - + + org.onap.aaf.authz + aaf-cadi-core + - - javax.servlet - javax.servlet-api - provided - - - - - - org.apache.maven.plugins - maven-compiler-plugin - - - org.jacoco - jacoco-maven-plugin - - - **/gen/** - **/generated-sources/** - **/yang-gen/** - **/pax/** - - - - - pre-unit-test - - prepare-agent - - - ${project.build.directory}/code-coverage/jacoco-ut.exec - surefireArgLine - - - - post-unit-test - test - - report - - - ${project.build.directory}/code-coverage/jacoco-ut.exec - ${project.reporting.outputDirectory}/jacoco-ut - - - - pre-integration-test - pre-integration-test - - prepare-agent - - - ${project.build.directory}/code-coverage/jacoco-it.exec - failsafeArgLine - - - - post-integration-test - post-integration-test - - report - - - ${project.build.directory}/code-coverage/jacoco-it.exec - ${project.reporting.outputDirectory}/jacoco-it - - - - + + javax.servlet + javax.servlet-api + provided + + + + + + org.apache.maven.plugins + maven-compiler-plugin + + + org.jacoco + jacoco-maven-plugin + + + **/gen/** + **/generated-sources/** + **/yang-gen/** + **/pax/** + + + + + pre-unit-test + + prepare-agent + + + ${project.build.directory}/code-coverage/jacoco-ut.exec + surefireArgLine + + + + post-unit-test + test + + report + + + ${project.build.directory}/code-coverage/jacoco-ut.exec + ${project.reporting.outputDirectory}/jacoco-ut + + + + pre-integration-test + pre-integration-test + + prepare-agent + + + ${project.build.directory}/code-coverage/jacoco-it.exec + failsafeArgLine + + + + post-integration-test + post-integration-test + + report + + + ${project.build.directory}/code-coverage/jacoco-it.exec + ${project.reporting.outputDirectory}/jacoco-it + + + + - - maven-assembly-plugin - - tests - - - org.onap.aaf.cadi.configure.Agent - - - true - - - - - - full - package - - single - - - - src/assemble/cadi-aaf.xml - - - - - - - + + maven-assembly-plugin + + tests + + + org.onap.aaf.cadi.configure.Agent + + + true + + + + + + full + package + + single + + + + src/assemble/cadi-aaf.xml + + + + + + + - - - ecomp-releases - AAF Release Repository - ${nexusproxy}${releaseNexusPath} - - - ecomp-snapshots - AAF Snapshot Repository - ${nexusproxy}${snapshotNexusPath} - - - ecomp-site - dav:${nexusproxy}${sitePath} - - + + + ecomp-releases + AAF Release Repository + ${nexusproxy}${releaseNexusPath} + + + ecomp-snapshots + AAF Snapshot Repository + ${nexusproxy}${snapshotNexusPath} + + + ecomp-site + dav:${nexusproxy}${sitePath} + + diff --git a/cadi/client/pom.xml b/cadi/client/pom.xml index 38bee291..38d50820 100644 --- a/cadi/client/pom.xml +++ b/cadi/client/pom.xml @@ -19,171 +19,171 @@ * --> - - org.onap.aaf.authz - cadiparent - 2.1.15-SNAPSHOT - .. - + + org.onap.aaf.authz + cadiparent + 2.1.16-SNAPSHOT + .. + - aaf-cadi-client - AAF CADI Client - jar - 4.0.0 + aaf-cadi-client + AAF CADI Client + jar + 4.0.0 - - 1.8 - - - 0.7.7.201606060606 - 3.2 - jacoco - - target/code-coverage/jacoco-ut.exec - target/code-coverage/jacoco-it.exec - - **/gen/**,**/generated-sources/**,**/yang-gen**,**/pax/** - https://nexus.onap.org - /content/repositories/snapshots/ - /content/repositories/releases/ - /content/repositories/staging/ - /content/sites/site/org/onap/aaf/authz/${project.artifactId}/${project.version} - + + 1.8 + + + 0.7.7.201606060606 + 3.2 + jacoco + + target/code-coverage/jacoco-ut.exec + target/code-coverage/jacoco-it.exec + + **/gen/**,**/generated-sources/**,**/yang-gen**,**/pax/** + https://nexus.onap.org + /content/repositories/snapshots/ + /content/repositories/releases/ + /content/repositories/staging/ + /content/sites/site/org/onap/aaf/authz/${project.artifactId}/${project.version} + - - - Jonathan Gathman - jonathan.gathman@att.com - ATT - - Architect - Lead Developer - - - - Gabe Maurer - gabe.maurer@att.com - ATT - - Developer - - - - Ian Howell - ian.howell@att.com - ATT - - Developer - - - - Sai Gandham - sai.gandham@att.com - ATT - - Developer - - - + + + Jonathan Gathman + jonathan.gathman@att.com + ATT + + Architect + Lead Developer + + + + Gabe Maurer + gabe.maurer@att.com + ATT + + Developer + + + + Ian Howell + ian.howell@att.com + ATT + + Developer + + + + Sai Gandham + sai.gandham@att.com + ATT + + Developer + + + - - - org.onap.aaf.authz - aaf-misc-rosetta - - - org.onap.aaf.authz - aaf-cadi-core - + + + org.onap.aaf.authz + aaf-misc-rosetta + + + org.onap.aaf.authz + aaf-cadi-core + - - javax.servlet - javax.servlet-api - compile - - + + javax.servlet + javax.servlet-api + compile + + - - - - org.apache.maven.plugins - maven-jarsigner-plugin - 1.4 - - - org.jacoco - jacoco-maven-plugin - - - **/gen/** - **/generated-sources/** - **/yang-gen/** - **/pax/** - - - - - pre-unit-test - - prepare-agent - - - ${project.build.directory}/code-coverage/jacoco-ut.exec - surefireArgLine - - - - post-unit-test - test - - report - - - ${project.build.directory}/code-coverage/jacoco-ut.exec - ${project.reporting.outputDirectory}/jacoco-ut - - - - pre-integration-test - pre-integration-test - - prepare-agent - - - ${project.build.directory}/code-coverage/jacoco-it.exec - failsafeArgLine - - - - post-integration-test - post-integration-test - - report - - - ${project.build.directory}/code-coverage/jacoco-it.exec - ${project.reporting.outputDirectory}/jacoco-it - - - - - - + + + + org.apache.maven.plugins + maven-jarsigner-plugin + 1.4 + + + org.jacoco + jacoco-maven-plugin + + + **/gen/** + **/generated-sources/** + **/yang-gen/** + **/pax/** + + + + + pre-unit-test + + prepare-agent + + + ${project.build.directory}/code-coverage/jacoco-ut.exec + surefireArgLine + + + + post-unit-test + test + + report + + + ${project.build.directory}/code-coverage/jacoco-ut.exec + ${project.reporting.outputDirectory}/jacoco-ut + + + + pre-integration-test + pre-integration-test + + prepare-agent + + + ${project.build.directory}/code-coverage/jacoco-it.exec + failsafeArgLine + + + + post-integration-test + post-integration-test + + report + + + ${project.build.directory}/code-coverage/jacoco-it.exec + ${project.reporting.outputDirectory}/jacoco-it + + + + + + - - - ecomp-releases - AAF Release Repository - ${nexusproxy}${releaseNexusPath} - - - ecomp-snapshots - AAF Snapshot Repository - ${nexusproxy}${snapshotNexusPath} - - - ecomp-site - dav:${nexusproxy}${sitePath} - - + + + ecomp-releases + AAF Release Repository + ${nexusproxy}${releaseNexusPath} + + + ecomp-snapshots + AAF Snapshot Repository + ${nexusproxy}${snapshotNexusPath} + + + ecomp-site + dav:${nexusproxy}${sitePath} + + diff --git a/cadi/core/pom.xml b/cadi/core/pom.xml index 337262da..aa50090b 100644 --- a/cadi/core/pom.xml +++ b/cadi/core/pom.xml @@ -1,194 +1,194 @@ + * org.onap.aaf * =========================================================================== + * Copyright (c) 2018 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==================================================== + * --> - - org.onap.aaf.authz - cadiparent - .. - 2.1.15-SNAPSHOT - + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> + + org.onap.aaf.authz + cadiparent + .. + 2.1.16-SNAPSHOT + - 4.0.0 - AAF CADI Core Framework - aaf-cadi-core - jar + 4.0.0 + AAF CADI Core Framework + aaf-cadi-core + jar - - - 0.7.7.201606060606 - 3.2 - jacoco - - target/code-coverage/jacoco-ut.exec - target/code-coverage/jacoco-it.exec - - **/gen/**,**/generated-sources/**,**/yang-gen**,**/pax/** - https://nexus.onap.org - /content/repositories/snapshots/ - /content/repositories/releases/ - /content/repositories/staging/ - /content/sites/site/org/onap/aaf/authz/${project.artifactId}/${project.version} - + + + 0.7.7.201606060606 + 3.2 + jacoco + + target/code-coverage/jacoco-ut.exec + target/code-coverage/jacoco-it.exec + + **/gen/**,**/generated-sources/**,**/yang-gen**,**/pax/** + https://nexus.onap.org + /content/repositories/snapshots/ + /content/repositories/releases/ + /content/repositories/staging/ + /content/sites/site/org/onap/aaf/authz/${project.artifactId}/${project.version} + - - - Jonathan Gathman - jonathan.gathman@att.com - ATT - - Architect - Lead Developer - - - - Gabe Maurer - gabe.maurer@att.com - ATT - - Developer - - - - Ian Howell - ian.howell@att.com - ATT - - Developer - - - - Sai Gandham - sai.gandham@att.com - ATT - - Developer - - - - - - javax.servlet - javax.servlet-api - provided - - - - - - - org.apache.maven.plugins - maven-jarsigner-plugin - 1.4 - - - org.apache.maven.plugins - maven-jar-plugin - - - - org.onap.aaf.cadi.CmdLine - - - true - - - - - - test-jar - package - - test-jar - - - - - - org.jacoco - jacoco-maven-plugin - - - **/gen/** - **/generated-sources/** - **/yang-gen/** - **/pax/** - - - - - pre-unit-test - - prepare-agent - - - ${project.build.directory}/code-coverage/jacoco-ut.exec - surefireArgLine - - - - post-unit-test - test - - report - - - ${project.build.directory}/code-coverage/jacoco-ut.exec - ${project.reporting.outputDirectory}/jacoco-ut - - - - pre-integration-test - pre-integration-test - - prepare-agent - - - ${project.build.directory}/code-coverage/jacoco-it.exec - failsafeArgLine - - - - post-integration-test - post-integration-test - - report - - - ${project.build.directory}/code-coverage/jacoco-it.exec - ${project.reporting.outputDirectory}/jacoco-it - - - - - - + + + Jonathan Gathman + jonathan.gathman@att.com + ATT + + Architect + Lead Developer + + + + Gabe Maurer + gabe.maurer@att.com + ATT + + Developer + + + + Ian Howell + ian.howell@att.com + ATT + + Developer + + + + Sai Gandham + sai.gandham@att.com + ATT + + Developer + + + + + + javax.servlet + javax.servlet-api + provided + + + + + + + org.apache.maven.plugins + maven-jarsigner-plugin + 1.4 + + + org.apache.maven.plugins + maven-jar-plugin + + + + org.onap.aaf.cadi.CmdLine + + + true + + + + + + test-jar + package + + test-jar + + + + + + org.jacoco + jacoco-maven-plugin + + + **/gen/** + **/generated-sources/** + **/yang-gen/** + **/pax/** + + + + + pre-unit-test + + prepare-agent + + + ${project.build.directory}/code-coverage/jacoco-ut.exec + surefireArgLine + + + + post-unit-test + test + + report + + + ${project.build.directory}/code-coverage/jacoco-ut.exec + ${project.reporting.outputDirectory}/jacoco-ut + + + + pre-integration-test + pre-integration-test + + prepare-agent + + + ${project.build.directory}/code-coverage/jacoco-it.exec + failsafeArgLine + + + + post-integration-test + post-integration-test + + report + + + ${project.build.directory}/code-coverage/jacoco-it.exec + ${project.reporting.outputDirectory}/jacoco-it + + + + + + - - - ecomp-releases - AAF Release Repository - ${nexusproxy}${releaseNexusPath} - - - ecomp-snapshots - AAF Snapshot Repository - ${nexusproxy}${snapshotNexusPath} - - - ecomp-site - dav:${nexusproxy}${sitePath} - - + + + ecomp-releases + AAF Release Repository + ${nexusproxy}${releaseNexusPath} + + + ecomp-snapshots + AAF Snapshot Repository + ${nexusproxy}${snapshotNexusPath} + + + ecomp-site + dav:${nexusproxy}${sitePath} + + diff --git a/cadi/core/src/main/java/org/onap/aaf/cadi/PropAccess.java b/cadi/core/src/main/java/org/onap/aaf/cadi/PropAccess.java index 26aa98cb..9f4b4b9f 100644 --- a/cadi/core/src/main/java/org/onap/aaf/cadi/PropAccess.java +++ b/cadi/core/src/main/java/org/onap/aaf/cadi/PropAccess.java @@ -3,6 +3,8 @@ * org.onap.aaf * =========================================================================== * Copyright (c) 2018 AT&T Intellectual Property. All rights reserved. + * + * Modifications Copyright (C) 2018 IBM. * =========================================================================== * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -45,6 +47,7 @@ import org.onap.aaf.cadi.util.Split; public class PropAccess implements Access { // Sonar says cannot be static... it's ok. not too many PropAccesses created. private final SimpleDateFormat iso8601 = newISO8601(); + private Symm symm; public static SimpleDateFormat newISO8601() { return new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSSZ"); @@ -52,7 +55,7 @@ public class PropAccess implements Access { public static final Level DEFAULT = Level.AUDIT; - private Symm symm; + private int level; private Properties props; private List recursionProtection = null; diff --git a/cadi/oauth-enduser/pom.xml b/cadi/oauth-enduser/pom.xml index 14d3f77e..efc32dd4 100644 --- a/cadi/oauth-enduser/pom.xml +++ b/cadi/oauth-enduser/pom.xml @@ -20,198 +20,198 @@ * --> - 4.0.0 - - org.onap.aaf.authz - cadiparent - 2.1.15-SNAPSHOT - .. - - - AAF CADI Sample OAuth EndUser - aaf-cadi-oauth-enduser - jar + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> + 4.0.0 + + org.onap.aaf.authz + cadiparent + 2.1.16-SNAPSHOT + .. + + + AAF CADI Sample OAuth EndUser + aaf-cadi-oauth-enduser + jar - - - true - 0.7.7.201606060606 - 3.2 - jacoco - - target/code-coverage/jacoco-ut.exec - target/code-coverage/jacoco-it.exec - - **/gen/**,**/generated-sources/**,**/yang-gen**,**/pax/** - https://nexus.onap.org - /content/repositories/snapshots/ - /content/repositories/releases/ - /content/repositories/staging/ - /content/sites/site/org/onap/aaf/authz/${project.artifactId}/${project.version} - - - - - Jonathan Gathman - jonathan.gathman@att.com - ATT - - Architect - Lead Developer - - - - Gabe Maurer - gabe.maurer@att.com - ATT - - Developer - - - - Ian Howell - ian.howell@att.com - ATT - - Developer - - - - - - - org.onap.aaf.authz - aaf-cadi-core - - - org.onap.aaf.authz - aaf-cadi-aaf - - + + + true + 0.7.7.201606060606 + 3.2 + jacoco + + target/code-coverage/jacoco-ut.exec + target/code-coverage/jacoco-it.exec + + **/gen/**,**/generated-sources/**,**/yang-gen**,**/pax/** + https://nexus.onap.org + /content/repositories/snapshots/ + /content/repositories/releases/ + /content/repositories/staging/ + /content/sites/site/org/onap/aaf/authz/${project.artifactId}/${project.version} + + + + + Jonathan Gathman + jonathan.gathman@att.com + ATT + + Architect + Lead Developer + + + + Gabe Maurer + gabe.maurer@att.com + ATT + + Developer + + + + Ian Howell + ian.howell@att.com + ATT + + Developer + + + + + + + org.onap.aaf.authz + aaf-cadi-core + + + org.onap.aaf.authz + aaf-cadi-aaf + + - - - - - org.apache.maven.plugins - maven-compiler-plugin - 2.3.2 - - 1.8 - 1.8 - - + + + + + org.apache.maven.plugins + maven-compiler-plugin + 2.3.2 + + 1.8 + 1.8 + + - - org.apache.maven.plugins - 2.4 - maven-jar-plugin - - target - - - - maven-assembly-plugin - 2.4 - - - - org.onap.aaf.cadi.enduser.OAuthExample - - - - src/main/assemble/cadi-oauth-enduser-assemble.xml - - - - - org.jacoco - jacoco-maven-plugin - ${jacoco.version} - - - **/gen/** - **/generated-sources/** - **/yang-gen/** - **/pax/** - - - - - pre-unit-test - - prepare-agent - - - ${project.build.directory}/code-coverage/jacoco-ut.exec - surefireArgLine - - - - post-unit-test - test - - report - - - ${project.build.directory}/code-coverage/jacoco-ut.exec - ${project.reporting.outputDirectory}/jacoco-ut - - - - pre-integration-test - pre-integration-test - - prepare-agent - - - ${project.build.directory}/code-coverage/jacoco-it.exec + + org.apache.maven.plugins + 2.4 + maven-jar-plugin + + target + + + + maven-assembly-plugin + 2.4 + + + + org.onap.aaf.cadi.enduser.OAuthExample + + + + src/main/assemble/cadi-oauth-enduser-assemble.xml + + + + + org.jacoco + jacoco-maven-plugin + ${jacoco.version} + + + **/gen/** + **/generated-sources/** + **/yang-gen/** + **/pax/** + + + + + pre-unit-test + + prepare-agent + + + ${project.build.directory}/code-coverage/jacoco-ut.exec + surefireArgLine + + + + post-unit-test + test + + report + + + ${project.build.directory}/code-coverage/jacoco-ut.exec + ${project.reporting.outputDirectory}/jacoco-ut + + + + pre-integration-test + pre-integration-test + + prepare-agent + + + ${project.build.directory}/code-coverage/jacoco-it.exec - failsafeArgLine - - - - post-integration-test - post-integration-test - - report - - - ${project.build.directory}/code-coverage/jacoco-it.exec - ${project.reporting.outputDirectory}/jacoco-it - - - - - - org.apache.maven.plugins - maven-deploy-plugin - 2.8.1 - - false - - - - - - + failsafeArgLine + + + + post-integration-test + post-integration-test + + report + + + ${project.build.directory}/code-coverage/jacoco-it.exec + ${project.reporting.outputDirectory}/jacoco-it + + + + + + org.apache.maven.plugins + maven-deploy-plugin + 2.8.1 + + false + + + + + + - - - - ecomp-releases - AAF Release Repository - ${nexusproxy}${releaseNexusPath} - - - ecomp-snapshots - AAF Snapshot Repository - ${nexusproxy}${snapshotNexusPath} - - - ecomp-site - dav:${nexusproxy}${sitePath} - - + + + + ecomp-releases + AAF Release Repository + ${nexusproxy}${releaseNexusPath} + + + ecomp-snapshots + AAF Snapshot Repository + ${nexusproxy}${snapshotNexusPath} + + + ecomp-site + dav:${nexusproxy}${sitePath} + + diff --git a/cadi/pom.xml b/cadi/pom.xml index fa1dd0f1..9075385a 100644 --- a/cadi/pom.xml +++ b/cadi/pom.xml @@ -20,314 +20,314 @@ * --> - 4.0.0 - - org.onap.aaf.authz - parent - 2.1.15-SNAPSHOT + 4.0.0 + + org.onap.aaf.authz + parent + 2.1.16-SNAPSHOT - cadiparent - AAF CADI Parent (Code, Access, Data, Identity) - 2015-07-20 - - ONAP - - pom - - - - - 0.7.7.201606060606 - 3.2 - jacoco - - target/code-coverage/jacoco-ut.exec - target/code-coverage/jacoco-it.exec - - **/gen/**,**/generated-sources/**,**/yang-gen**,**/pax/** - https://nexus.onap.org - /content/repositories/snapshots/ - /content/repositories/releases/ - /content/repositories/staging/ - /content/sites/site/org/onap/aaf/authz/${project.artifactId}/${project.version} - - + cadiparent + AAF CADI Parent (Code, Access, Data, Identity) + 2015-07-20 + + ONAP + + pom + + + + + 0.7.7.201606060606 + 3.2 + jacoco + + target/code-coverage/jacoco-ut.exec + target/code-coverage/jacoco-it.exec + + **/gen/**,**/generated-sources/**,**/yang-gen**,**/pax/** + https://nexus.onap.org + /content/repositories/snapshots/ + /content/repositories/releases/ + /content/repositories/staging/ + /content/sites/site/org/onap/aaf/authz/${project.artifactId}/${project.version} + + - - - - - - Jonathan Gathman - jonathan.gathman@att.com - ATT - - Architect - Lead Developer - - - - Gabe Maurer - gabe.maurer@att.com - ATT - - Developer - - - - Ian Howell - ian.howell@att.com - ATT - - Developer - - - - Sai Gandham - sai.gandham@att.com - ATT - - Developer - - - + + + + + + Jonathan Gathman + jonathan.gathman@att.com + ATT + + Architect + Lead Developer + + + + Gabe Maurer + gabe.maurer@att.com + ATT + + Developer + + + + Ian Howell + ian.howell@att.com + ATT + + Developer + + + + Sai Gandham + sai.gandham@att.com + ATT + + Developer + + + - - - org.mockito - mockito-all - test - + + + org.mockito + mockito-all + test + - - org.powermock - powermock-module-junit4 - test - - - org.powermock - powermock-api-mockito - test - + + org.powermock + powermock-module-junit4 + test + + + org.powermock + powermock-api-mockito + test + - - junit - junit - test - - + + junit + junit + test + + - - - - - core - client - aaf - oauth-enduser - servlet-sample - + + + + + core + client + aaf + oauth-enduser + servlet-sample + - - - - - src/test/java - - - - - - true - org.apache.maven.plugins - maven-compiler-plugin - 2.3.2 - - 1.7 - 1.7 - - + + + + + src/test/java + + + + + + true + org.apache.maven.plugins + maven-compiler-plugin + 2.3.2 + + 1.7 + 1.7 + + - - org.apache.maven.plugins - 2.4 - maven-jar-plugin - - target - - - true - - - - + + org.apache.maven.plugins + 2.4 + maven-jar-plugin + + target + + + true + + + + - - - org.apache.maven.plugins - maven-javadoc-plugin - 2.10 - - org.opendaylight.* - - + + + org.apache.maven.plugins + maven-javadoc-plugin + 2.10 + + org.opendaylight.* + + - - maven-release-plugin - 2.5.2 - - -s ${mvn.settings} deploy - - + + maven-release-plugin + 2.5.2 + + -s ${mvn.settings} deploy + + - - maven-assembly-plugin - 2.5.5 - + + maven-assembly-plugin + 2.5.5 + - - org.apache.maven.plugins - maven-deploy-plugin - 2.8.1 - - false - + + org.apache.maven.plugins + maven-deploy-plugin + 2.8.1 + + false + - + - - org.apache.maven.plugins - maven-dependency-plugin - 2.10 - + + org.apache.maven.plugins + maven-dependency-plugin + 2.10 + - - - maven-surefire-plugin - 2.17 - - false - - **/JU*.java - - - - false - - + + + maven-surefire-plugin + 2.17 + + false + + **/JU*.java + + + + false + + - - - org.eclipse.m2e - lifecycle-mapping - 1.0.0 - - - - - - - org.codehaus.mojo - - - jaxb2-maven-plugin - - - [1.3,) - - - xjc - - - - - - - - - - - - org.jacoco - jacoco-maven-plugin - ${jacoco.version} - - - **/gen/** - **/generated-sources/** - **/yang-gen/** - **/pax/** - - - - - pre-unit-test - - prepare-agent - - - ${project.build.directory}/code-coverage/jacoco-ut.exec - surefireArgLine - - - - post-unit-test - test - - report - - - ${project.build.directory}/code-coverage/jacoco-ut.exec - ${project.reporting.outputDirectory}/jacoco-ut - - - - pre-integration-test - pre-integration-test - - prepare-agent - - - ${project.build.directory}/code-coverage/jacoco-it.exec - failsafeArgLine - - - - post-integration-test - post-integration-test - - report - - - ${project.build.directory}/code-coverage/jacoco-it.exec - ${project.reporting.outputDirectory}/jacoco-it - - - - - - - + + + org.eclipse.m2e + lifecycle-mapping + 1.0.0 + + + + + + + org.codehaus.mojo + + + jaxb2-maven-plugin + + + [1.3,) + + + xjc + + + + + + + + + + + + org.jacoco + jacoco-maven-plugin + ${jacoco.version} + + + **/gen/** + **/generated-sources/** + **/yang-gen/** + **/pax/** + + + + + pre-unit-test + + prepare-agent + + + ${project.build.directory}/code-coverage/jacoco-ut.exec + surefireArgLine + + + + post-unit-test + test + + report + + + ${project.build.directory}/code-coverage/jacoco-ut.exec + ${project.reporting.outputDirectory}/jacoco-ut + + + + pre-integration-test + pre-integration-test + + prepare-agent + + + ${project.build.directory}/code-coverage/jacoco-it.exec + failsafeArgLine + + + + post-integration-test + post-integration-test + + report + + + ${project.build.directory}/code-coverage/jacoco-it.exec + ${project.reporting.outputDirectory}/jacoco-it + + + + + + + - - - ecomp-releases - AAF Release Repository - ${nexusproxy}${releaseNexusPath} - - - ecomp-snapshots - AAF Snapshot Repository - ${nexusproxy}${snapshotNexusPath} - - - ecomp-site - dav:${nexusproxy}${sitePath} - - + + + ecomp-releases + AAF Release Repository + ${nexusproxy}${releaseNexusPath} + + + ecomp-snapshots + AAF Snapshot Repository + ${nexusproxy}${snapshotNexusPath} + + + ecomp-site + dav:${nexusproxy}${sitePath} + + diff --git a/cadi/servlet-sample/pom.xml b/cadi/servlet-sample/pom.xml index 1533ad91..7ca8aa4b 100644 --- a/cadi/servlet-sample/pom.xml +++ b/cadi/servlet-sample/pom.xml @@ -1,95 +1,95 @@ - - org.onap.aaf.authz - cadiparent - .. - 2.1.15-SNAPSHOT - - 4.0.0 - CADI Servlet Sample (Test Only) - aaf-cadi-servlet-sample - jar - - - - true - 0.7.7.201606060606 - 3.2 - jacoco - - target/code-coverage/jacoco-ut.exec - target/code-coverage/jacoco-it.exec - - **/gen/**,**/generated-sources/**,**/yang-gen**,**/pax/** - https://nexus.onap.org - /content/repositories/snapshots/ - /content/repositories/releases/ - /content/repositories/staging/ - /content/sites/site/org/onap/aaf/authz/${project.artifactId}/${project.version} - 1.60 - - - - - org.eclipse.jetty - jetty-webapp - ${project.jettyVersion} - + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> + + org.onap.aaf.authz + cadiparent + .. + 2.1.16-SNAPSHOT + + 4.0.0 + CADI Servlet Sample (Test Only) + aaf-cadi-servlet-sample + jar + + + + true + 0.7.7.201606060606 + 3.2 + jacoco + + target/code-coverage/jacoco-ut.exec + target/code-coverage/jacoco-it.exec + + **/gen/**,**/generated-sources/**,**/yang-gen**,**/pax/** + https://nexus.onap.org + /content/repositories/snapshots/ + /content/repositories/releases/ + /content/repositories/staging/ + /content/sites/site/org/onap/aaf/authz/${project.artifactId}/${project.version} + 1.60 + + + + + org.eclipse.jetty + jetty-webapp + ${project.jettyVersion} + - - org.onap.aaf.authz - aaf-cadi-aaf - + + org.onap.aaf.authz + aaf-cadi-aaf + - - - - - maven-assembly-plugin - - - sample - package - - single - - - - src/assemble/servlet_sample.xml - - - - - - - - - - org.apache.maven.plugins - 2.4 - maven-jar-plugin - - target - - - true - - - - - - true - org.apache.maven.plugins - maven-compiler-plugin - 3.1 - - 1.7 - 1.7 - - - - - + + + + + maven-assembly-plugin + + + sample + package + + single + + + + src/assemble/servlet_sample.xml + + + + + + + + + + org.apache.maven.plugins + 2.4 + maven-jar-plugin + + target + + + true + + + + + + true + org.apache.maven.plugins + maven-compiler-plugin + 3.1 + + 1.7 + 1.7 + + + + + diff --git a/misc/env/pom.xml b/misc/env/pom.xml index a0c6e4b7..360b920c 100644 --- a/misc/env/pom.xml +++ b/misc/env/pom.xml @@ -20,310 +20,310 @@ * --> - - org.onap.aaf.authz - miscparent - 2.1.15-SNAPSHOT - .. - + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> + + org.onap.aaf.authz + miscparent + 2.1.16-SNAPSHOT + .. + - 4.0.0 - aaf-misc-env - AAF Misc Env - jar + 4.0.0 + aaf-misc-env + AAF Misc Env + jar - - - - 0.7.7.201606060606 - 3.2 - jacoco - - target/code-coverage/jacoco-ut.exec - target/code-coverage/jacoco-it.exec - - **/gen/**,**/generated-sources/**,**/yang-gen**,**/pax/** - https://nexus.onap.org - /content/repositories/snapshots/ - /content/repositories/releases/ - /content/repositories/staging/ - /content/sites/site/org/onap/aaf/authz/${project.artifactId}/${project.version} - + + + + 0.7.7.201606060606 + 3.2 + jacoco + + target/code-coverage/jacoco-ut.exec + target/code-coverage/jacoco-it.exec + + **/gen/**,**/generated-sources/**,**/yang-gen**,**/pax/** + https://nexus.onap.org + /content/repositories/snapshots/ + /content/repositories/releases/ + /content/repositories/staging/ + /content/sites/site/org/onap/aaf/authz/${project.artifactId}/${project.version} + - - - Jonathan Gathman - jonathan.gathman@att.com - ATT - - Architect - Lead Developer - - - - Gabe Maurer - gabe.maurer@att.com - ATT - - Developer - - - - Ian Howell - ian.howell@att.com - ATT - - Developer - - - - Sai Gandham - sai.gandham@att.com - ATT - - Developer - - - + + + Jonathan Gathman + jonathan.gathman@att.com + ATT + + Architect + Lead Developer + + + + Gabe Maurer + gabe.maurer@att.com + ATT + + Developer + + + + Ian Howell + ian.howell@att.com + ATT + + Developer + + + + Sai Gandham + sai.gandham@att.com + ATT + + Developer + + + - - - - - src/test/java - - - - - - true - org.apache.maven.plugins - maven-compiler-plugin - 2.3.2 - - 1.7 - 1.7 - - + + + + + src/test/java + + + + + + true + org.apache.maven.plugins + maven-compiler-plugin + 2.3.2 + + 1.7 + 1.7 + + - - org.apache.maven.plugins - 2.4 - maven-jar-plugin - - target - - - true - - - - + + org.apache.maven.plugins + 2.4 + maven-jar-plugin + + target + + + true + + + + - - - org.apache.maven.plugins - maven-javadoc-plugin - 2.10 - - org.opendaylight.* - - + + + org.apache.maven.plugins + maven-javadoc-plugin + 2.10 + + org.opendaylight.* + + - - maven-release-plugin - 2.5.2 - - -s ${mvn.settings} deploy - false - - **/JU*.java - - - - ${project.build.directory}/code-coverage/jacoco-ut.exec - surefireArgLine - - + + maven-release-plugin + 2.5.2 + + -s ${mvn.settings} deploy + false + + **/JU*.java + + + + ${project.build.directory}/code-coverage/jacoco-ut.exec + surefireArgLine + + - - maven-assembly-plugin - 2.5.5 - + + maven-assembly-plugin + 2.5.5 + - - org.apache.maven.plugins - maven-deploy-plugin - 2.8.1 - - false - + + org.apache.maven.plugins + maven-deploy-plugin + 2.8.1 + + false + - + - - org.apache.maven.plugins - maven-dependency-plugin - 2.10 - + + org.apache.maven.plugins + maven-dependency-plugin + 2.10 + - - - maven-surefire-plugin - 2.17 - - false - - **/JU*.java - - - - - + + + maven-surefire-plugin + 2.17 + + false + + **/JU*.java + + + + + - - - org.eclipse.m2e - lifecycle-mapping - 1.0.0 - - - - - - - org.codehaus.mojo - - - jaxb2-maven-plugin - - - [1.3,) - - - xjc - - - - - - - - - - - - org.jacoco - jacoco-maven-plugin - ${jacoco.version} - - - **/gen/** - **/generated-sources/** - **/yang-gen/** - **/pax/** - - - - - pre-unit-test - - prepare-agent - - - ${project.build.directory}/code-coverage/jacoco-ut.exec - surefireArgLine - - - - post-unit-test - test - - report - - - ${project.build.directory}/code-coverage/jacoco-ut.exec - ${project.reporting.outputDirectory}/jacoco-ut - - - - pre-integration-test - pre-integration-test - - prepare-agent - - - ${project.build.directory}/code-coverage/jacoco-it.exec - failsafeArgLine - - - - post-integration-test - post-integration-test - - report - - - ${project.build.directory}/code-coverage/jacoco-it.exec - ${project.reporting.outputDirectory}/jacoco-it - - - - - - - + + + org.eclipse.m2e + lifecycle-mapping + 1.0.0 + + + + + + + org.codehaus.mojo + + + jaxb2-maven-plugin + + + [1.3,) + + + xjc + + + + + + + + + + + + org.jacoco + jacoco-maven-plugin + ${jacoco.version} + + + **/gen/** + **/generated-sources/** + **/yang-gen/** + **/pax/** + + + + + pre-unit-test + + prepare-agent + + + ${project.build.directory}/code-coverage/jacoco-ut.exec + surefireArgLine + + + + post-unit-test + test + + report + + + ${project.build.directory}/code-coverage/jacoco-ut.exec + ${project.reporting.outputDirectory}/jacoco-ut + + + + pre-integration-test + pre-integration-test + + prepare-agent + + + ${project.build.directory}/code-coverage/jacoco-it.exec + failsafeArgLine + + + + post-integration-test + post-integration-test + + report + + + ${project.build.directory}/code-coverage/jacoco-it.exec + ${project.reporting.outputDirectory}/jacoco-it + + + + + + + - - - log4j - log4j - compile - - - - org.mockito - mockito-all - test - + + + log4j + log4j + compile + + + + org.mockito + mockito-all + test + - - org.powermock - powermock-module-junit4 - test - - - org.powermock - powermock-api-mockito - test - + + org.powermock + powermock-module-junit4 + test + + + org.powermock + powermock-api-mockito + test + - - junit - junit - test - - + + junit + junit + test + + - - - ecomp-releases - AAF Release Repository - ${nexusproxy}${releaseNexusPath} - - - ecomp-snapshots - AAF Snapshot Repository - ${nexusproxy}${snapshotNexusPath} - - - ecomp-site - dav:${nexusproxy}${sitePath} - - + + + ecomp-releases + AAF Release Repository + ${nexusproxy}${releaseNexusPath} + + + ecomp-snapshots + AAF Snapshot Repository + ${nexusproxy}${snapshotNexusPath} + + + ecomp-site + dav:${nexusproxy}${sitePath} + + diff --git a/misc/log4j/pom.xml b/misc/log4j/pom.xml index 214805c8..7bfc1bce 100644 --- a/misc/log4j/pom.xml +++ b/misc/log4j/pom.xml @@ -20,277 +20,277 @@ * --> - - org.onap.aaf.authz - miscparent - 2.1.15-SNAPSHOT - .. - + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> + + org.onap.aaf.authz + miscparent + 2.1.16-SNAPSHOT + .. + - 4.0.0 - aaf-misc-log4j - AAF Misc Log4J - jar + 4.0.0 + aaf-misc-log4j + AAF Misc Log4J + jar - - - Jonathan Gathman - jonathan.gathman@att.com - ATT - - Architect - Lead Developer - - - - Gabe Maurer - gabe.maurer@att.com - ATT - - Developer - - - - Ian Howell - ian.howell@att.com - ATT - - Developer - - - - Sai Gandham - sai.gandham@att.com - ATT - - Developer - - - + + + Jonathan Gathman + jonathan.gathman@att.com + ATT + + Architect + Lead Developer + + + + Gabe Maurer + gabe.maurer@att.com + ATT + + Developer + + + + Ian Howell + ian.howell@att.com + ATT + + Developer + + + + Sai Gandham + sai.gandham@att.com + ATT + + Developer + + + - - - - 0.7.7.201606060606 - 3.2 - jacoco - - target/code-coverage/jacoco-ut.exec - target/code-coverage/jacoco-it.exec - - **/gen/**,**/generated-sources/**,**/yang-gen**,**/pax/** + + + + 0.7.7.201606060606 + 3.2 + jacoco + + target/code-coverage/jacoco-ut.exec + target/code-coverage/jacoco-it.exec + + **/gen/**,**/generated-sources/**,**/yang-gen**,**/pax/** - https://nexus.onap.org - /content/repositories/snapshots/ - /content/repositories/releases/ - /content/repositories/staging/ - /content/sites/site/org/onap/aaf/authz/${project.artifactId}/${project.version} - + https://nexus.onap.org + /content/repositories/snapshots/ + /content/repositories/releases/ + /content/repositories/staging/ + /content/sites/site/org/onap/aaf/authz/${project.artifactId}/${project.version} + - - - org.onap.aaf.authz - aaf-misc-env - ${project.version} - - + + + org.onap.aaf.authz + aaf-misc-env + ${project.version} + + - - - - src/test/java - - - - - - true - org.apache.maven.plugins - maven-compiler-plugin - 2.3.2 - - 1.7 - 1.7 - - + + + + src/test/java + + + + + + true + org.apache.maven.plugins + maven-compiler-plugin + 2.3.2 + + 1.7 + 1.7 + + - - org.apache.maven.plugins - 2.4 - maven-jar-plugin - - target - - - true - - - - + + org.apache.maven.plugins + 2.4 + maven-jar-plugin + + target + + + true + + + + - - - org.apache.maven.plugins - maven-javadoc-plugin - 2.10 - - org.opendaylight.* - - + + + org.apache.maven.plugins + maven-javadoc-plugin + 2.10 + + org.opendaylight.* + + - - maven-release-plugin - 2.5.2 - - -s ${mvn.settings} deploy - - + + maven-release-plugin + 2.5.2 + + -s ${mvn.settings} deploy + + - - maven-assembly-plugin - 2.5.5 - + + maven-assembly-plugin + 2.5.5 + - - org.apache.maven.plugins - maven-deploy-plugin - 2.8.1 - - false - + + org.apache.maven.plugins + maven-deploy-plugin + 2.8.1 + + false + - + - - org.apache.maven.plugins - maven-dependency-plugin - 2.10 - + + org.apache.maven.plugins + maven-dependency-plugin + 2.10 + - - - maven-surefire-plugin - 2.17 - - false - - **/JU*.java - - - - - + + + maven-surefire-plugin + 2.17 + + false + + **/JU*.java + + + + + - - - org.eclipse.m2e - lifecycle-mapping - 1.0.0 - - - - - - - org.codehaus.mojo - - - jaxb2-maven-plugin - - - [1.3,) - - - xjc - - - - - - - - - - - - org.jacoco - jacoco-maven-plugin - ${jacoco.version} - - - **/gen/** - **/generated-sources/** - **/yang-gen/** - **/pax/** - - - - - pre-unit-test - - prepare-agent - - - ${project.build.directory}/code-coverage/jacoco-ut.exec - surefireArgLine - - - - post-unit-test - test - - report - - - ${project.build.directory}/code-coverage/jacoco-ut.exec - ${project.reporting.outputDirectory}/jacoco-ut - - - - pre-integration-test - pre-integration-test - - prepare-agent - - - ${project.build.directory}/code-coverage/jacoco-it.exec - failsafeArgLine - - - - post-integration-test - post-integration-test - - report - - - ${project.build.directory}/code-coverage/jacoco-it.exec - ${project.reporting.outputDirectory}/jacoco-it - - - - - - - + + + org.eclipse.m2e + lifecycle-mapping + 1.0.0 + + + + + + + org.codehaus.mojo + + + jaxb2-maven-plugin + + + [1.3,) + + + xjc + + + + + + + + + + + + org.jacoco + jacoco-maven-plugin + ${jacoco.version} + + + **/gen/** + **/generated-sources/** + **/yang-gen/** + **/pax/** + + + + + pre-unit-test + + prepare-agent + + + ${project.build.directory}/code-coverage/jacoco-ut.exec + surefireArgLine + + + + post-unit-test + test + + report + + + ${project.build.directory}/code-coverage/jacoco-ut.exec + ${project.reporting.outputDirectory}/jacoco-ut + + + + pre-integration-test + pre-integration-test + + prepare-agent + + + ${project.build.directory}/code-coverage/jacoco-it.exec + failsafeArgLine + + + + post-integration-test + post-integration-test + + report + + + ${project.build.directory}/code-coverage/jacoco-it.exec + ${project.reporting.outputDirectory}/jacoco-it + + + + + + + - - - ecomp-releases - AAF Release Repository - ${nexusproxy}${releaseNexusPath} - - - ecomp-snapshots - AAF Snapshot Repository - ${nexusproxy}${snapshotNexusPath} - - - ecomp-site - dav:${nexusproxy}${sitePath} - - + + + ecomp-releases + AAF Release Repository + ${nexusproxy}${releaseNexusPath} + + + ecomp-snapshots + AAF Snapshot Repository + ${nexusproxy}${snapshotNexusPath} + + + ecomp-site + dav:${nexusproxy}${sitePath} + + diff --git a/misc/pom.xml b/misc/pom.xml index 47ec26cf..68e3c4b1 100644 --- a/misc/pom.xml +++ b/misc/pom.xml @@ -20,281 +20,281 @@ * --> - 4.0.0 - + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> + 4.0.0 + org.onap.aaf.authz parent - 2.1.15-SNAPSHOT + 2.1.16-SNAPSHOT - miscparent - AAF Misc Parent - pom + miscparent + AAF Misc Parent + pom - - - Jonathan Gathman - jonathan.gathman@att.com - ATT - - Architect - Lead Developer - - - - Gabe Maurer - gabe.maurer@att.com - ATT - - Developer - - - - Ian Howell - ian.howell@att.com - ATT - - Developer - - - - Sai Gandham - sai.gandham@att.com - ATT - - Developer - - - + + + Jonathan Gathman + jonathan.gathman@att.com + ATT + + Architect + Lead Developer + + + + Gabe Maurer + gabe.maurer@att.com + ATT + + Developer + + + + Ian Howell + ian.howell@att.com + ATT + + Developer + + + + Sai Gandham + sai.gandham@att.com + ATT + + Developer + + + - - - org.mockito - mockito-all - test - + + + org.mockito + mockito-all + test + - - org.powermock - powermock-module-junit4 - test - - - org.powermock - powermock-api-mockito - test - - - junit - junit - test - - + + org.powermock + powermock-module-junit4 + test + + + org.powermock + powermock-api-mockito + test + + + junit + junit + test + + - - env - xgen - rosetta - log4j - - - - - - - src/test/java - - - - - - true - org.apache.maven.plugins - maven-compiler-plugin - 2.3.2 - - 1.7 - 1.7 - - + + env + xgen + rosetta + log4j + + + + + + + src/test/java + + + + + + true + org.apache.maven.plugins + maven-compiler-plugin + 2.3.2 + + 1.7 + 1.7 + + - - org.apache.maven.plugins - 2.4 - maven-jar-plugin - - target - - - true - - - - + + org.apache.maven.plugins + 2.4 + maven-jar-plugin + + target + + + true + + + + - - - org.apache.maven.plugins - maven-javadoc-plugin - 2.10 - - org.opendaylight.* - - + + + org.apache.maven.plugins + maven-javadoc-plugin + 2.10 + + org.opendaylight.* + + - - maven-release-plugin - 2.5.2 - - -s ${mvn.settings} deploy - - + + maven-release-plugin + 2.5.2 + + -s ${mvn.settings} deploy + + - - maven-assembly-plugin - 2.5.5 - + + maven-assembly-plugin + 2.5.5 + - - org.apache.maven.plugins - maven-deploy-plugin - 2.8.1 - - false - + + org.apache.maven.plugins + maven-deploy-plugin + 2.8.1 + + false + - + - - org.apache.maven.plugins - maven-dependency-plugin - 2.10 - + + org.apache.maven.plugins + maven-dependency-plugin + 2.10 + - - - maven-surefire-plugin - 2.17 - - false - - **/JU*.java - - - - false - - + + + maven-surefire-plugin + 2.17 + + false + + **/JU*.java + + + + false + + - - - org.eclipse.m2e - lifecycle-mapping - 1.0.0 - - - - - - - org.codehaus.mojo - - - jaxb2-maven-plugin - - - [1.3,) - - - xjc - - - - - - - - - - - - org.jacoco - jacoco-maven-plugin - ${jacoco.version} - - - **/gen/** - **/generated-sources/** - **/yang-gen/** - **/pax/** - - - - - pre-unit-test - - prepare-agent - - - ${project.build.directory}/code-coverage/jacoco-ut.exec - surefireArgLine - - - - post-unit-test - test - - report - - - ${project.build.directory}/code-coverage/jacoco-ut.exec - ${project.reporting.outputDirectory}/jacoco-ut - - - - pre-integration-test - pre-integration-test - - prepare-agent - - - ${project.build.directory}/code-coverage/jacoco-it.exec - failsafeArgLine - - - - post-integration-test - post-integration-test - - report - - - ${project.build.directory}/code-coverage/jacoco-it.exec - ${project.reporting.outputDirectory}/jacoco-it - - - - - - - + + + org.eclipse.m2e + lifecycle-mapping + 1.0.0 + + + + + + + org.codehaus.mojo + + + jaxb2-maven-plugin + + + [1.3,) + + + xjc + + + + + + + + + + + + org.jacoco + jacoco-maven-plugin + ${jacoco.version} + + + **/gen/** + **/generated-sources/** + **/yang-gen/** + **/pax/** + + + + + pre-unit-test + + prepare-agent + + + ${project.build.directory}/code-coverage/jacoco-ut.exec + surefireArgLine + + + + post-unit-test + test + + report + + + ${project.build.directory}/code-coverage/jacoco-ut.exec + ${project.reporting.outputDirectory}/jacoco-ut + + + + pre-integration-test + pre-integration-test + + prepare-agent + + + ${project.build.directory}/code-coverage/jacoco-it.exec + failsafeArgLine + + + + post-integration-test + post-integration-test + + report + + + ${project.build.directory}/code-coverage/jacoco-it.exec + ${project.reporting.outputDirectory}/jacoco-it + + + + + + + - - - ecomp-releases - AAF Release Repository - ${nexusproxy}${releaseNexusPath} - - - ecomp-snapshots - AAF Snapshot Repository - ${nexusproxy}${snapshotNexusPath} - - - ecomp-site - dav:${nexusproxy}${sitePath} - - + + + ecomp-releases + AAF Release Repository + ${nexusproxy}${releaseNexusPath} + + + ecomp-snapshots + AAF Snapshot Repository + ${nexusproxy}${snapshotNexusPath} + + + ecomp-site + dav:${nexusproxy}${sitePath} + + diff --git a/misc/rosetta/pom.xml b/misc/rosetta/pom.xml index 53295ab1..9c6d003a 100644 --- a/misc/rosetta/pom.xml +++ b/misc/rosetta/pom.xml @@ -20,284 +20,284 @@ * --> - - org.onap.aaf.authz - miscparent - 2.1.15-SNAPSHOT - .. - + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> + + org.onap.aaf.authz + miscparent + 2.1.16-SNAPSHOT + .. + - 4.0.0 - aaf-misc-rosetta - AAF Misc Rosetta - jar + 4.0.0 + aaf-misc-rosetta + AAF Misc Rosetta + jar - - - Jonathan Gathman - jonathan.gathman@att.com - ATT - - Architect - Lead Developer - - - - Gabe Maurer - gabe.maurer@att.com - ATT - - Developer - - - - Ian Howell - ian.howell@att.com - ATT - - Developer - - - - Sai Gandham - sai.gandham@att.com - ATT - - Developer - - - + + + Jonathan Gathman + jonathan.gathman@att.com + ATT + + Architect + Lead Developer + + + + Gabe Maurer + gabe.maurer@att.com + ATT + + Developer + + + + Ian Howell + ian.howell@att.com + ATT + + Developer + + + + Sai Gandham + sai.gandham@att.com + ATT + + Developer + + + - - - 1.8 - - 0.7.7.201606060606 - 3.2 - jacoco - - target/code-coverage/jacoco-ut.exec - target/code-coverage/jacoco-it.exec - - **/gen/**,**/generated-sources/**,**/yang-gen**,**/pax/** + + + 1.8 + + 0.7.7.201606060606 + 3.2 + jacoco + + target/code-coverage/jacoco-ut.exec + target/code-coverage/jacoco-it.exec + + **/gen/**,**/generated-sources/**,**/yang-gen**,**/pax/** - https://nexus.onap.org - /content/repositories/snapshots/ - /content/repositories/releases/ - /content/repositories/staging/ - /content/sites/site/org/onap/aaf/authz/${project.artifactId}/${project.version} - + https://nexus.onap.org + /content/repositories/snapshots/ + /content/repositories/releases/ + /content/repositories/staging/ + /content/sites/site/org/onap/aaf/authz/${project.artifactId}/${project.version} + - - - org.onap.aaf.authz - aaf-misc-env - ${project.version} - - + + + org.onap.aaf.authz + aaf-misc-env + ${project.version} + + - + - - - - - src/test/java - - - - true - org.apache.maven.plugins - maven-compiler-plugin - - 1.7 - 1.7 - - + + + + + src/test/java + + + + true + org.apache.maven.plugins + maven-compiler-plugin + + 1.7 + 1.7 + + - - org.jvnet.jaxb2.maven2 - maven-jaxb2-plugin - 0.8.2 - - - - generate - - - - - src/main/xsd - - - - - org.apache.maven.plugins - maven-jar-plugin - - target - - - true - - - - + + org.jvnet.jaxb2.maven2 + maven-jaxb2-plugin + 0.8.2 + + + + generate + + + + + src/main/xsd + + + + + org.apache.maven.plugins + maven-jar-plugin + + target + + + true + + + + - - - org.apache.maven.plugins - maven-javadoc-plugin - - org.opendaylight.* - - + + + org.apache.maven.plugins + maven-javadoc-plugin + + org.opendaylight.* + + - - maven-release-plugin - - -s ${mvn.settings} deploy - - + + maven-release-plugin + + -s ${mvn.settings} deploy + + - - maven-assembly-plugin - + + maven-assembly-plugin + - - org.apache.maven.plugins - maven-deploy-plugin - - false - + + org.apache.maven.plugins + maven-deploy-plugin + + false + - + - - org.apache.maven.plugins - maven-dependency-plugin - + + org.apache.maven.plugins + maven-dependency-plugin + - - - maven-surefire-plugin - - false - - **/JU*.java - - - - - + + + maven-surefire-plugin + + false + + **/JU*.java + + + + + - - - org.eclipse.m2e - lifecycle-mapping - - - - - - - org.codehaus.mojo - - - jaxb2-maven-plugin - - - [1.3,) - - - xjc - - - - - - - - - - - - org.jacoco - jacoco-maven-plugin - - - **/gen/** - **/generated-sources/** - **/yang-gen/** - **/pax/** - - - - - pre-unit-test - - prepare-agent - - - ${project.build.directory}/code-coverage/jacoco-ut.exec - surefireArgLine - - - - post-unit-test - test - - report - - - ${project.build.directory}/code-coverage/jacoco-ut.exec - ${project.reporting.outputDirectory}/jacoco-ut - - - - pre-integration-test - pre-integration-test - - prepare-agent - - - ${project.build.directory}/code-coverage/jacoco-it.exec - failsafeArgLine - - - - post-integration-test - post-integration-test - - report - - - ${project.build.directory}/code-coverage/jacoco-it.exec - ${project.reporting.outputDirectory}/jacoco-it - - - - - - + + + org.eclipse.m2e + lifecycle-mapping + + + + + + + org.codehaus.mojo + + + jaxb2-maven-plugin + + + [1.3,) + + + xjc + + + + + + + + + + + + org.jacoco + jacoco-maven-plugin + + + **/gen/** + **/generated-sources/** + **/yang-gen/** + **/pax/** + + + + + pre-unit-test + + prepare-agent + + + ${project.build.directory}/code-coverage/jacoco-ut.exec + surefireArgLine + + + + post-unit-test + test + + report + + + ${project.build.directory}/code-coverage/jacoco-ut.exec + ${project.reporting.outputDirectory}/jacoco-ut + + + + pre-integration-test + pre-integration-test + + prepare-agent + + + ${project.build.directory}/code-coverage/jacoco-it.exec + failsafeArgLine + + + + post-integration-test + post-integration-test + + report + + + ${project.build.directory}/code-coverage/jacoco-it.exec + ${project.reporting.outputDirectory}/jacoco-it + + + + + + - - - ecomp-releases - AAF Release Repository - ${nexusproxy}${releaseNexusPath} - - - ecomp-snapshots - AAF Snapshot Repository - ${nexusproxy}${snapshotNexusPath} - - - ecomp-site - dav:${nexusproxy}${sitePath} - - + + + ecomp-releases + AAF Release Repository + ${nexusproxy}${releaseNexusPath} + + + ecomp-snapshots + AAF Snapshot Repository + ${nexusproxy}${snapshotNexusPath} + + + ecomp-site + dav:${nexusproxy}${sitePath} + + diff --git a/misc/rosetta/src/test/java/org/onap/aaf/misc/rosetta/JU_ParseException.java b/misc/rosetta/src/test/java/org/onap/aaf/misc/rosetta/JU_ParseException.java new file mode 100644 index 00000000..1eb55916 --- /dev/null +++ b/misc/rosetta/src/test/java/org/onap/aaf/misc/rosetta/JU_ParseException.java @@ -0,0 +1,49 @@ +/** + * ============LICENSE_START==================================================== + * org.onap.aaf + * =========================================================================== + * Copyright (c) 2019 IBM 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==================================================== + * + */ +package org.onap.aaf.misc.rosetta; + +import static org.junit.Assert.*; + +import org.junit.Test; + +public class JU_ParseException { + + @Test + public void test() { + ParseException pe = new ParseException(); + } + @Test + public void test1() { + ParseException pe = new ParseException("exception"); + } + @Test + public void test2() { + ParseException pe = new ParseException(new NullPointerException("exception")); + } + @Test + public void test3() { + ParseException pe = new ParseException("exception",new NullPointerException("exception")); + } + + + + +} diff --git a/misc/xgen/pom.xml b/misc/xgen/pom.xml index 8a08d5ba..83153890 100644 --- a/misc/xgen/pom.xml +++ b/misc/xgen/pom.xml @@ -20,277 +20,277 @@ * --> - - org.onap.aaf.authz - miscparent - 2.1.15-SNAPSHOT - .. - + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> + + org.onap.aaf.authz + miscparent + 2.1.16-SNAPSHOT + .. + - 4.0.0 - aaf-misc-xgen - AAF Misc XGen - jar + 4.0.0 + aaf-misc-xgen + AAF Misc XGen + jar - - - Jonathan Gathman - jonathan.gathman@att.com - ATT - - Architect - Lead Developer - - - - Gabe Maurer - gabe.maurer@att.com - ATT - - Developer - - - - Ian Howell - ian.howell@att.com - ATT - - Developer - - - - Sai Gandham - sai.gandham@att.com - ATT - - Developer - - - + + + Jonathan Gathman + jonathan.gathman@att.com + ATT + + Architect + Lead Developer + + + + Gabe Maurer + gabe.maurer@att.com + ATT + + Developer + + + + Ian Howell + ian.howell@att.com + ATT + + Developer + + + + Sai Gandham + sai.gandham@att.com + ATT + + Developer + + + - - - - 0.7.7.201606060606 - 3.2 - jacoco - - target/code-coverage/jacoco-ut.exec - target/code-coverage/jacoco-it.exec - - **/gen/**,**/generated-sources/**,**/yang-gen**,**/pax/** - - https://nexus.onap.org - /content/repositories/snapshots/ - /content/repositories/releases/ - /content/repositories/staging/ - /content/sites/site/org/onap/aaf/authz/${project.artifactId}/${project.version} - - - - - org.onap.aaf.authz - aaf-misc-env - ${project.version} - - - - - - - - src/test/java - - - - - - true - org.apache.maven.plugins - maven-compiler-plugin - 2.3.2 - - 1.7 - 1.7 - - - - org.apache.maven.plugins - 2.4 - maven-jar-plugin - - target - - - true - - - - + + + + 0.7.7.201606060606 + 3.2 + jacoco + + target/code-coverage/jacoco-ut.exec + target/code-coverage/jacoco-it.exec + + **/gen/**,**/generated-sources/**,**/yang-gen**,**/pax/** + + https://nexus.onap.org + /content/repositories/snapshots/ + /content/repositories/releases/ + /content/repositories/staging/ + /content/sites/site/org/onap/aaf/authz/${project.artifactId}/${project.version} + + + + + org.onap.aaf.authz + aaf-misc-env + ${project.version} + + + + + + + + src/test/java + + + + + + true + org.apache.maven.plugins + maven-compiler-plugin + 2.3.2 + + 1.7 + 1.7 + + + + org.apache.maven.plugins + 2.4 + maven-jar-plugin + + target + + + true + + + + - - - org.apache.maven.plugins - maven-javadoc-plugin - 2.10 - - org.opendaylight.* - - + + + org.apache.maven.plugins + maven-javadoc-plugin + 2.10 + + org.opendaylight.* + + - - maven-release-plugin - 2.5.2 - - -s ${mvn.settings} deploy - - + + maven-release-plugin + 2.5.2 + + -s ${mvn.settings} deploy + + - - maven-assembly-plugin - 2.5.5 - + + maven-assembly-plugin + 2.5.5 + - - org.apache.maven.plugins - maven-deploy-plugin - 2.8.1 - - false - - + + org.apache.maven.plugins + maven-deploy-plugin + 2.8.1 + + false + + - - org.apache.maven.plugins - maven-dependency-plugin - 2.10 - + + org.apache.maven.plugins + maven-dependency-plugin + 2.10 + - - - maven-surefire-plugin - 2.17 - - false - - **/JU*.java - - - - - + + + maven-surefire-plugin + 2.17 + + false + + **/JU*.java + + + + + - - - org.eclipse.m2e - lifecycle-mapping - 1.0.0 - - - - - - - org.codehaus.mojo - - - jaxb2-maven-plugin - - - [1.3,) - - - xjc - - - - - - - - - - - - org.jacoco - jacoco-maven-plugin - ${jacoco.version} - - - **/gen/** - **/generated-sources/** - **/yang-gen/** - **/pax/** - - - - - pre-unit-test - - prepare-agent - - - ${project.build.directory}/code-coverage/jacoco-ut.exec - surefireArgLine - - - - post-unit-test - test - - report - - - ${project.build.directory}/code-coverage/jacoco-ut.exec - ${project.reporting.outputDirectory}/jacoco-ut - - - - pre-integration-test - pre-integration-test - - prepare-agent - - - ${project.build.directory}/code-coverage/jacoco-it.exec - failsafeArgLine - - - - post-integration-test - post-integration-test - - report - - - ${project.build.directory}/code-coverage/jacoco-it.exec - ${project.reporting.outputDirectory}/jacoco-it - - - - - - - - - - - ecomp-releases - AAF Release Repository - ${nexusproxy}${releaseNexusPath} - - - ecomp-snapshots - AAF Snapshot Repository - ${nexusproxy}${snapshotNexusPath} - - - ecomp-site - dav:${nexusproxy}${sitePath} - - - - + + + org.eclipse.m2e + lifecycle-mapping + 1.0.0 + + + + + + + org.codehaus.mojo + + + jaxb2-maven-plugin + + + [1.3,) + + + xjc + + + + + + + + + + + + org.jacoco + jacoco-maven-plugin + ${jacoco.version} + + + **/gen/** + **/generated-sources/** + **/yang-gen/** + **/pax/** + + + + + pre-unit-test + + prepare-agent + + + ${project.build.directory}/code-coverage/jacoco-ut.exec + surefireArgLine + + + + post-unit-test + test + + report + + + ${project.build.directory}/code-coverage/jacoco-ut.exec + ${project.reporting.outputDirectory}/jacoco-ut + + + + pre-integration-test + pre-integration-test + + prepare-agent + + + ${project.build.directory}/code-coverage/jacoco-it.exec + failsafeArgLine + + + + post-integration-test + post-integration-test + + report + + + ${project.build.directory}/code-coverage/jacoco-it.exec + ${project.reporting.outputDirectory}/jacoco-it + + + + + + + + + + + ecomp-releases + AAF Release Repository + ${nexusproxy}${releaseNexusPath} + + + ecomp-snapshots + AAF Snapshot Repository + ${nexusproxy}${snapshotNexusPath} + + + ecomp-site + dav:${nexusproxy}${sitePath} + + + + diff --git a/pom.xml b/pom.xml index ea732586..1926eb0e 100644 --- a/pom.xml +++ b/pom.xml @@ -22,7 +22,7 @@ 4.0.0 org.onap.aaf.authz parent - 2.1.15-SNAPSHOT + 2.1.16-SNAPSHOT aaf-authz pom @@ -66,7 +66,7 @@ org.apache.maven.plugins maven-deploy-plugin - false + true @@ -131,6 +131,7 @@ + @@ -207,13 +208,13 @@ aaf-cadi-core ${project.version} - + org.onap.aaf.authz aaf-cadi-client ${project.version} - + org.onap.aaf.authz aaf-cadi-aaf @@ -236,48 +237,23 @@ org.onap.aaf.authz aaf-cadi-cass ${project.version} - + + javax.servlet javax.servlet-api 3.0.1 - - + org.slf4j @@ -338,7 +314,7 @@ mail 1.4.7 - + org.mockito mockito-all @@ -352,34 +328,30 @@ ${powermock.version} test - + org.powermock powermock-api-mockito ${powermock.version} test - + log4j log4j 1.2.17 - + junit junit 4.10 test - + - - - - ecomp-releases @@ -397,4 +369,46 @@ + + + build-docker + + + + org.codehaus.mojo + exec-maven-plugin + 1.6.0 + + + Docker Build + + exec + + + + + true + bash + echo "No Docker Here" + + + + org.sonarsource.scanner.maven + sonar-maven-plugin + + true + + + + + + + auth-client + misc + cadi + auth + auth/docker + + + diff --git a/releases/2.1.15.yaml b/releases/2.1.15.yaml new file mode 100644 index 00000000..c4dbc213 --- /dev/null +++ b/releases/2.1.15.yaml @@ -0,0 +1,4 @@ +distribution_type: 'maven' +version: '2.1.15' +project: 'aaf-authz' +log_dir: 'aaf-authz-maven-stage-master/63/' diff --git a/version.properties b/version.properties index e341f3e4..564f55f4 100644 --- a/version.properties +++ b/version.properties @@ -24,10 +24,10 @@ # Note that these variables cannot be structured (e.g. : version.release or version.snapshot etc... ) # because they are used in Jenkins, whose plug-in doesn't support -# This TAG 2.1.15-SNAPSHOT is here to help remember to change this file. Keep it up to date with the following "real" entries: +# This TAG 2.1.16-SNAPSHOT is here to help remember to change this file. Keep it up to date with the following "real" entries: major=2 minor=1 -patch=15 +patch=16 base_version=${major}.${minor}.${patch}