-
Notifications
You must be signed in to change notification settings - Fork 123
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test: Run ESDK .NET v4.0.1 Test Vectors in CI (#1979)
Co-authored-by: Tony Knapp <[email protected]> Co-authored-by: seebees <[email protected]>
- Loading branch information
1 parent
713ca11
commit 19975b9
Showing
6 changed files
with
329 additions
and
56 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
version: 0.2 | ||
# Runs Only the ESDK-NET v4.0.1 Decryption Vectors, testing Required EC CMM | ||
phases: | ||
install: | ||
runtime-versions: | ||
java: $JAVA_ENV_VERSION | ||
commands: | ||
- git submodule update --init submodules/MaterialProviders | ||
# Get Dafny | ||
- curl https://github.com/dafny-lang/dafny/releases/download/v4.2.0/dafny-4.2.0-x64-ubuntu-20.04.zip -L -o dafny.zip | ||
- unzip -qq dafny.zip && rm dafny.zip | ||
- export PATH="$PWD/dafny:$PATH" | ||
# Get Gradle 7.6 | ||
- curl https://services.gradle.org/distributions/gradle-7.6-all.zip -L -o gradle.zip | ||
- unzip -qq gradle.zip && rm gradle.zip | ||
- export PATH="$PWD/gradle-7.6/bin:$PATH" | ||
pre_build: | ||
commands: | ||
# Assume Role to access non-prod resources | ||
- TMP_ROLE=$(aws sts assume-role --role-arn "arn:aws:iam::370957321024:role/GitHub-CI-Public-ESDK-Java-Role-us-west-2" --role-session-name "CB-TestVectorResources") | ||
- export TMP_ROLE | ||
- export AWS_ACCESS_KEY_ID=$(echo "${TMP_ROLE}" | jq -r '.Credentials.AccessKeyId') | ||
- export AWS_SECRET_ACCESS_KEY=$(echo "${TMP_ROLE}" | jq -r '.Credentials.SecretAccessKey') | ||
- export AWS_SESSION_TOKEN=$(echo "${TMP_ROLE}" | jq -r '.Credentials.SessionToken') | ||
- aws sts get-caller-identity | ||
|
||
# Build and deploy TestVectors to maven local | ||
- cd submodules/MaterialProviders/TestVectorsAwsCryptographicMaterialProviders/ | ||
- make build_java && make mvn_local_deploy | ||
- cd $CODEBUILD_SRC_DIR | ||
|
||
# Fetch ESDK .NET v4.0.1 Test Vectors | ||
- VECTOR_ZIP=$CODEBUILD_SRC_DIR/v4-Net-4.0.1.zip | ||
- VECTORS_URL=https://github.com/aws/aws-encryption-sdk-dafny/raw/mainline/AwsEncryptionSDK/runtimes/net/TestVectorsNative/TestVectors/resources/v4-Net-4.0.1.zip | ||
- curl -s --output $VECTOR_ZIP --location $VECTORS_URL | ||
build: | ||
commands: | ||
# NOTE: We need to pass the absolute path of the vectors | ||
- mvn -B -ntp install -Dgpg.skip=true -Djacoco.skip=true "-Dtest=TestVectorRunner" "-DtestVectorZip=file://$VECTOR_ZIP" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
version: 0.2 | ||
# Runs "Golden Manifest" against legacy Master Key Providers | ||
phases: | ||
install: | ||
runtime-versions: | ||
java: $JAVA_ENV_VERSION | ||
commands: | ||
- git submodule update --init submodules/MaterialProviders | ||
# Get Dafny | ||
- curl https://github.com/dafny-lang/dafny/releases/download/v4.2.0/dafny-4.2.0-x64-ubuntu-20.04.zip -L -o dafny.zip | ||
- unzip -qq dafny.zip && rm dafny.zip | ||
- export PATH="$PWD/dafny:$PATH" | ||
# Get Gradle 7.6 | ||
- curl https://services.gradle.org/distributions/gradle-7.6-all.zip -L -o gradle.zip | ||
- unzip -qq gradle.zip && rm gradle.zip | ||
- export PATH="$PWD/gradle-7.6/bin:$PATH" | ||
pre_build: | ||
commands: | ||
# Assume Role to access non-prod resources | ||
- TMP_ROLE=$(aws sts assume-role --role-arn "arn:aws:iam::370957321024:role/GitHub-CI-Public-ESDK-Java-Role-us-west-2" --role-session-name "CB-TestVectorResources") | ||
- export TMP_ROLE | ||
- export AWS_ACCESS_KEY_ID=$(echo "${TMP_ROLE}" | jq -r '.Credentials.AccessKeyId') | ||
- export AWS_SECRET_ACCESS_KEY=$(echo "${TMP_ROLE}" | jq -r '.Credentials.SecretAccessKey') | ||
- export AWS_SESSION_TOKEN=$(echo "${TMP_ROLE}" | jq -r '.Credentials.SessionToken') | ||
- aws sts get-caller-identity | ||
|
||
# Build and deploy TestVectors to maven local | ||
- cd submodules/MaterialProviders/TestVectorsAwsCryptographicMaterialProviders/ | ||
- make build_java && make mvn_local_deploy | ||
- cd $CODEBUILD_SRC_DIR | ||
build: | ||
commands: | ||
# Enable masterKey to run Test Vectors against MasterKeyProvider | ||
# NOTE: We need to pass the absolute path of the vectors | ||
- mvn -B -ntp install -Dgpg.skip=true -Djacoco.skip=true "-Dtest=TestVectorRunner" "-Dmasterkey=true" "-DtestVectorZip=file://$CODEBUILD_SRC_DIR/src/test/resources/aws-encryption-sdk-test-vectors/vectors/awses-decrypt/python-2.3.0.zip" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.