Skip to content

Programatically retrieve NuGet API Key #29

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 26 commits into from
Aug 12, 2022
Merged

Conversation

gordonpn
Copy link
Member

@gordonpn gordonpn commented Aug 8, 2022

Issue #, if available:
N/A

Description of changes:
Use the secrets manager instead of parameter store to pull the API key for publishing.
Reasoning: the key gets rotated, and it is a dev pain to update our parameter store manually every so often.

How this was tested
First, the utils.sh script location needed to be fixed in scripts/publish-package.sh line 11-12.
Previously, we could see it was not able to source the script

./scripts/publish-package.sh: line 11: ./utils.sh: No such file or directory
./scripts/publish-package.sh: line 29: validate: command not found
./scripts/publish-package.sh: line 30: validate: command not found

https://us-west-2.console.aws.amazon.com/codesuite/codebuild/863722843142/projects/dotnet-release/build/dotnet-release%3A4fd7a514-dddb-4a9d-8291-44d8dcdb5310/?region=us-west-2
Line 82-84

Finally, scripts/publish-package.sh script was modified to assume the cross-account role we were given. We use the newly assumed role to retrieve the shared secret.

Assuming role arn:aws:iam::582595803497:role/CloudWatch-Logs-EMF-build-role
Credentials stored in the profile named publishing-profile

https://us-west-2.console.aws.amazon.com/codesuite/codebuild/863722843142/projects/aws-embedded-metrics-dotnet/build/aws-embedded-metrics-dotnet%3A575f2e19-bbe5-4ea8-87d5-66bbd5507301?region=us-west-2
Line 146-147

We can see that there were no errors in pulling the secrets from secrets manager and that the validation test passed.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@gordonpn gordonpn requested review from evanuk, giancarlokc and Himtanaya and removed request for evanuk, giancarlokc and Himtanaya August 8, 2022 18:47
…EMF (awslabs#26)

Bumps [Newtonsoft.Json](https://github.com/JamesNK/Newtonsoft.Json) from 12.0.3 to 13.0.1.
- [Release notes](https://github.com/JamesNK/Newtonsoft.Json/releases)
- [Commits](JamesNK/Newtonsoft.Json@12.0.3...13.0.1)

---
updated-dependencies:
- dependency-name: Newtonsoft.Json
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <[email protected]>

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Mark Kuhn <[email protected]>
@gordonpn gordonpn merged commit 2b07c2d into awslabs:main Aug 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants