diff --git a/NOTICE b/NOTICE index fd051e08964c83e83864be7d1686c3b62c29b575..61613d9f86a895365601163be7ac95aaf92bb5d7 100644 --- a/NOTICE +++ b/NOTICE @@ -320,8 +320,8 @@ The following software have components provided under the terms of this license: - Microsoft Application Insights Logback Appender (from https://github.com/Microsoft/ApplicationInsights-Java) - Mockito (from http://mockito.org) - Mockito (from http://mockito.org) -- Mockito (from http://www.mockito.org) - Mockito (from http://mockito.org) +- Mockito (from http://www.mockito.org) - Mojo's Maven plugin for Cobertura (from http://mojo.codehaus.org/cobertura-maven-plugin/) - Netty Reactive Streams Implementation (from ) - Netty/Buffer (from http://netty.io/) @@ -461,9 +461,6 @@ The following software have components provided under the terms of this license: - org.xmlunit:xmlunit-core (from http://www.xmlunit.org/) - oro (from ) - parent-join (from https://github.com/elastic/elasticsearch) -- powermock-api-mockito (from ) -- powermock-api-mockito-common (from ) -- powermock-api-support (from ) - powermock-api-support (from ) - powermock-core (from http://www.powermock.org) - powermock-module-junit4 (from http://www.powermock.org) @@ -859,9 +856,9 @@ The following software have components provided under the terms of this license: - Microsoft Azure client library for Identity (from https://github.com/Azure/azure-sdk-for-java) - Microsoft Azure client library for KeyVault Secrets (from https://github.com/Azure/azure-sdk-for-java) - Microsoft Azure common module for Storage (from https://github.com/Azure/azure-sdk-for-java) +- Mockito (from http://www.mockito.org) - Mockito (from http://mockito.org) - Mockito (from http://mockito.org) -- Mockito (from http://www.mockito.org) - Mockito (from http://mockito.org) - Netty/Codec/HTTP (from ) - Netty/Common (from ) @@ -873,7 +870,6 @@ The following software have components provided under the terms of this license: - adal4j (from https://github.com/AzureAD/azure-activedirectory-library-for-java) - azure-documentdb (from https://azure.microsoft.com/en-us/services/cosmos-db/) - msal4j (from https://github.com/AzureAD/microsoft-authentication-library-for-java) -- powermock-api-mockito (from ) - spring-security-core (from http://spring.io/spring-security) ======================================================================== diff --git a/provider/indexer-aws/build-aws/buildspec.yaml b/provider/indexer-aws/build-aws/buildspec.yaml index a7508341bffddcdf852a579df517591a320b9457..938ab8c29059ef53cdeac0ed93706ddfd16265b2 100644 --- a/provider/indexer-aws/build-aws/buildspec.yaml +++ b/provider/indexer-aws/build-aws/buildspec.yaml @@ -1,4 +1,4 @@ -# Copyright © Amazon Web Services +# Copyright © 2020 Amazon Web Services # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -20,7 +20,7 @@ version: 0.2 phases: install: runtime-versions: - java: openjdk8 + java: corretto8 commands: - if [ $(echo $CODEBUILD_SOURCE_VERSION | grep -c ^refs/heads.*) -eq 1 ]; then echo "Branch name found"; else echo "This build only supports branch builds" && exit 1; fi - apt-get update -y @@ -29,9 +29,8 @@ phases: - mvn -version - echo $JAVA_HOME #WHY - mkdir -p /root/.m2 - - aws s3 sync s3://$M2_REPO_S3_BUCKET /root/.m2 # copy previous state of the shared libraries' .m2 folder from S3 to local - cp ./provider/indexer-aws/maven/settings.xml /root/.m2/settings.xml # copy the AWS-specific settings.xml to the CodeBuild instance's .m2 folder - - cat /root/.m2/settings.xml + - export AWS_OSDU_DEV_MAVEN_AUTH_TOKEN=`aws codeartifact get-authorization-token --domain osdu-dev --domain-owner 888733619319 --query authorizationToken --output text` pre_build: commands: - echo "Logging in to Amazon ECR..." @@ -52,7 +51,8 @@ phases: - printenv - echo "Building primary service assemblies..." - - mvn -B test install -P indexer-core,indexer-aws -Ddeployment.environment=prod + - mvn -B test install -pl indexer-core,provider/indexer-aws -Ddeployment.environment=prod + # - echo "Copying assemblies to dist..." # - cp ./provider/indexer-aws/target/*spring-boot.jar ${OUTPUT_DIR}/bin # copy aws jars diff --git a/provider/indexer-aws/maven/settings.xml b/provider/indexer-aws/maven/settings.xml index 0ca9fe8103a2386f2ff0479c788306e1312faa3d..629bc28df98790e725de6fde8a67a99a38965232 100644 --- a/provider/indexer-aws/maven/settings.xml +++ b/provider/indexer-aws/maven/settings.xml @@ -1,16 +1,76 @@ <?xml version="1.0" encoding="UTF-8"?> +<!-- + Copyright © 2020 Amazon Web Services + + 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. +--> + <settings xmlns="http://maven.apache.org/SETTINGS/1.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd"> + <profiles> + <profile> + <id>aws-osdu-dev-maven</id> + <activation> + <activeByDefault>true</activeByDefault> + </activation> + <repositories> + <repository> + <id>aws-osdu-dev-maven</id> + <url>${env.AWS_OSDU_DEV_MAVEN_URL}</url> + </repository> + <repository> + <id>gitlab-os-core-common-maven</id> + <url>https://community.opengroup.org/api/v4/projects/67/packages/maven</url> + </repository> + </repositories> + </profile> + <profile> + <id>credentialsConfiguration</id> + <activation> + <activeByDefault>true</activeByDefault> + </activation> + <properties> + <deployment.environment>dev</deployment.environment> + <aws.accessKeyId>no-default</aws.accessKeyId> + <aws.secretKey>no-default</aws.secretKey> + <azure.devops.username>Another-Access-Token-2021</azure.devops.username> + <azure.devops.token>no-default</azure.devops.token> + </properties> + </profile> + </profiles> + <servers> - <!-- Azure DevOps Artifact Store --> <server> - <id>os-core</id> - <username>${azure.devops.username}</username> - <!-- The generated token was last updated on 01/13/2020 and expires on or before 01/12/2021 --> - <password>${azure.devops.token}</password> + <id>aws-osdu-dev-maven</id> + <username>aws</username> + <password>${env.AWS_OSDU_DEV_MAVEN_AUTH_TOKEN}</password> </server> </servers> -</settings> + <!-- CodeArtifact doesn't support external repos yet that aren't Maven Central. ETA Q4 2020. --> + <!-- <mirrors> --> + <!-- <mirror> --> + <!-- <id>aws-osdu-dev-maven</id> --> + <!-- <name>aws-osdu-dev-maven</name> --> + <!-- <url>https://osdu-dev-888733619319.d.codeartifact.us-east-1.amazonaws.com/maven/osdu-maven/</url> --> + <!-- <mirrorOf>*,!gitlab-os-core-common-maven</mirrorOf> --> + <!-- </mirror> --> + <!-- </mirrors> --> + + <activeProfiles> + <activeProfile>credentialsConfiguration</activeProfile> + </activeProfiles> + +</settings> \ No newline at end of file diff --git a/provider/indexer-aws/pom.xml b/provider/indexer-aws/pom.xml index b72cf5ed059e4fda2a6c25621d145ca604320f8a..cd2d16f9cd7d0d9fbc06cf05265bd6660274bbb6 100644 --- a/provider/indexer-aws/pom.xml +++ b/provider/indexer-aws/pom.xml @@ -1,6 +1,6 @@ <?xml version="1.0"?> <!-- - Copyright © Amazon Web Services + Copyright © 2020 Amazon Web Services Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -49,7 +49,7 @@ <dependency> <groupId>org.opengroup.osdu.core.aws</groupId> <artifactId>os-core-lib-aws</artifactId> - <version>0.3.5</version> + <version>0.3.7</version> </dependency> <!-- AWS managed packages --> diff --git a/provider/indexer-aws/src/main/resources/application.properties b/provider/indexer-aws/src/main/resources/application.properties index 9c856a37e29c248efccb99e4ab59e0e0b2e930c4..6e7d9c6f32304d2fb255c95e63239ec8f2964a55 100644 --- a/provider/indexer-aws/src/main/resources/application.properties +++ b/provider/indexer-aws/src/main/resources/application.properties @@ -1,6 +1,7 @@ LOG_PREFIX=indexer server.servlet.contextPath=/api/indexer/v2/ +AUTHORIZE_API=${ENTITLEMENTS_BASE_URL}/api/entitlements/v1 logging.level.org.springframework.web=${LOG_LEVEL} server.port=${APPLICATION_PORT} diff --git a/testing/indexer-test-aws/pom.xml b/testing/indexer-test-aws/pom.xml index 2a7ec46b5e6bb73c515a132d34dd1c965b3898e4..e8975829f08994dc9e34a72e6a5ab16729d19565 100644 --- a/testing/indexer-test-aws/pom.xml +++ b/testing/indexer-test-aws/pom.xml @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="UTF-8"?> <!-- - Copyright © Amazon Web Services + Copyright © 2020 Amazon Web Services Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -62,7 +62,7 @@ <dependency> <groupId>org.opengroup.osdu.core.aws</groupId> <artifactId>os-core-lib-aws</artifactId> - <version>0.3.5</version> + <version>0.3.7</version> </dependency> <!-- Testing -->