From 41ecd9c631fe80d64908152cdafaef45e7dba527 Mon Sep 17 00:00:00 2001 From: Matt Wise Date: Thu, 13 Aug 2020 21:47:32 +0000 Subject: [PATCH 1/2] Ecs impl changes commit 280439b6 Author: Matt Wise Date: Thu Aug 13 2020 13:53:41 GMT-0500 (Central Daylight Time) add copyright/license to modified files commit 23c8ef58 Author: Rucha deshpande Date: Tue Aug 11 2020 14:03:05 GMT-0500 (Central Daylight Time) Annotated @RequestScope commit 63fc7fe5 Author: Rucha deshpande Date: Tue Aug 11 2020 13:53:39 GMT-0500 (Central Daylight Time) Adding entitlements factory bean commit fe073546 Author: Rucha deshpande Date: Mon Aug 10 2020 09:01:37 GMT-0500 (Central Daylight Time) Added *.iml (intelliJ IDE files) to .gitignore commit a753e612 Author: Rucha deshpande Date: Sun Aug 09 2020 16:35:34 GMT-0500 (Central Daylight Time) entitlements update --- .gitignore | 18 ++++++ provider/search-aws/build-aws/Dockerfile | 2 +- provider/search-aws/build-aws/build-info.py | 14 +++++ provider/search-aws/build-aws/buildspec.yaml | 7 +-- provider/search-aws/maven/settings.xml | 58 ++++++++++++++++--- provider/search-aws/pom.xml | 4 +- .../aws/di/EntitlementsFactoryAws.java | 48 +++++++++++++++ .../src/main/resources/application.properties | 16 +++++ .../integration-tests/search-test-aws/pom.xml | 4 +- 9 files changed, 155 insertions(+), 16 deletions(-) create mode 100644 provider/search-aws/src/main/java/org/opengroup/osdu/search/provider/aws/di/EntitlementsFactoryAws.java diff --git a/.gitignore b/.gitignore index 78079a17..d2dd4004 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,17 @@ +# 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. + # Compiled class file *.class @@ -39,3 +53,7 @@ load-tests/*.pyc # Environment configuration *.env .sts4* + + +### IntelliJ IDEA ### +*.iml diff --git a/provider/search-aws/build-aws/Dockerfile b/provider/search-aws/build-aws/Dockerfile index dbf21ea7..bf8c0445 100644 --- a/provider/search-aws/build-aws/Dockerfile +++ b/provider/search-aws/build-aws/Dockerfile @@ -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. diff --git a/provider/search-aws/build-aws/build-info.py b/provider/search-aws/build-aws/build-info.py index 12935424..8880bfeb 100644 --- a/provider/search-aws/build-aws/build-info.py +++ b/provider/search-aws/build-aws/build-info.py @@ -1,3 +1,17 @@ +# 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. + import boto3 import json import os diff --git a/provider/search-aws/build-aws/buildspec.yaml b/provider/search-aws/build-aws/buildspec.yaml index c0d6861f..05bca04c 100644 --- a/provider/search-aws/build-aws/buildspec.yaml +++ b/provider/search-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/search-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..." diff --git a/provider/search-aws/maven/settings.xml b/provider/search-aws/maven/settings.xml index d8b2e83a..b8192246 100644 --- a/provider/search-aws/maven/settings.xml +++ b/provider/search-aws/maven/settings.xml @@ -1,9 +1,41 @@ + + + + aws-osdu-dev-maven + + true + + + + aws-osdu-dev-maven + ${env.AWS_OSDU_DEV_MAVEN_URL} + + + gitlab-os-core-common-maven + https://community.opengroup.org/api/v4/projects/67/packages/maven + + + credentialsConfiguration @@ -20,13 +52,25 @@ - - os-core - ${azure.devops.username} - - ${azure.devops.token} + aws-osdu-dev-maven + aws + ${env.AWS_OSDU_DEV_MAVEN_AUTH_TOKEN} - - + + + + + + + + + + + + + credentialsConfiguration + + + \ No newline at end of file diff --git a/provider/search-aws/pom.xml b/provider/search-aws/pom.xml index 185af0e9..3c6b2887 100644 --- a/provider/search-aws/pom.xml +++ b/provider/search-aws/pom.xml @@ -1,6 +1,6 @@ -- GitLab From 2d02993741835129de82c9090f5cbe55ab205633 Mon Sep 17 00:00:00 2001 From: Matt Wise Date: Tue, 18 Aug 2020 14:28:35 -0500 Subject: [PATCH 2/2] Update NOTICE --- NOTICE | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/NOTICE b/NOTICE index 62f6feab..2d5a7492 100644 --- a/NOTICE +++ b/NOTICE @@ -162,10 +162,10 @@ The following software have components provided under the terms of this license: - Microsoft Application Insights Java SDK Spring Boot starter (from https://github.com/Microsoft/ApplicationInsights-Java) - Microsoft Application Insights Java SDK Web Module (from https://github.com/Microsoft/ApplicationInsights-Java) - Microsoft Application Insights Log4j 2 Appender (from https://github.com/Microsoft/ApplicationInsights-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://www.mockito.org) +- Mockito (from http://mockito.org) - Netty Reactive Streams Implementation (from ) - Netty/Buffer (from http://netty.io/) - Netty/Codec (from ) @@ -310,9 +310,6 @@ The following software have components provided under the terms of this license: - org.xmlunit:xmlunit-core (from http://www.xmlunit.org/) - parent-join (from https://github.com/elastic/elasticsearch) - 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) @@ -745,9 +742,9 @@ The following software have components provided under the terms of this license: - 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://www.mockito.org) - Mockito (from http://mockito.org) +- Mockito (from http://mockito.org) - Netty/Codec/HTTP (from ) - Netty/Common (from ) - Project Lombok (from https://projectlombok.org) @@ -756,7 +753,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) ======================================================================== -- GitLab