Skip to content

Add gem's public key to repo for cert verification #44

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 1 commit into from
Aug 5, 2021

Conversation

VijayanB
Copy link
Member

@VijayanB VijayanB commented Aug 3, 2021

Signed-off-by: Vijayan Balasubramanian balasvij@amazon.com

Description

This gem is cryptographically signed. To be sure the gem you install hasn’t been tampered with:
Add certs/opensearch-rubygems.pem (if you haven’t already) as a trusted certificate

gem cert --add <(curl -Ls certs/opensearch-rubygems.pem)
gem install logstash-output-openserach -P HighSecurity

The HighSecurity trust profile will verify signed gems, and allow only if all the dependencies are signed.
This is created by following https://guides.rubygems.org/security/#building-gems

Issues Resolved

[List any issues this PR will resolve]

Check List

  • New functionality includes testing.
    • All tests pass
  • New functionality has been documented.
    • New functionality has documentation added
  • Commits are signed as per the DCO using --signoff

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

@VijayanB VijayanB requested review from jmazanec15 and vamshin August 3, 2021 03:41
@VijayanB VijayanB self-assigned this Aug 3, 2021
@VijayanB VijayanB added v1.0.0 v1.1.0 latest release labels Aug 3, 2021
@VijayanB VijayanB force-pushed the add-public-key branch 2 times, most recently from 62c897a to cd2d781 Compare August 3, 2021 03:44
Copy link
Member

@jmazanec15 jmazanec15 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@VijayanB Could you describe how the certificate was generated?

@VijayanB
Copy link
Member Author

VijayanB commented Aug 3, 2021

@VijayanB Could you describe how the certificate was generated?

@VijayanB Could you describe how the certificate was generated?

@jmazanec15 I updated the commit message but forgot to update PR description. Will update it now.

@VijayanB VijayanB requested a review from jmazanec15 August 3, 2021 18:30
Copy link
Member

@jmazanec15 jmazanec15 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@VijayanB How did you validate that this works?

@VijayanB
Copy link
Member Author

VijayanB commented Aug 3, 2021

@VijayanB How did you validate that this works?

If we don't add cert and install with HighSecurity it will fail. I tested this manually and works

gem install unsigned-gems -P HighSecurity
ERROR:  While executing gem ... (Gem::Security::Exception)
    unsigned gems are not allowed by the High Security policy

While in our case

gem install logstash-output-opensearch -P HighSecurity
Successfully installed logstash-output-opensearch-1.0.0-java
1 gem installed

@VijayanB VijayanB requested a review from jmazanec15 August 3, 2021 20:47
This gem is cryptographically signed. To be sure the gem you install hasn’t been tampered with:
Add certs/opensearch-rubygems.pem (if you haven’t already) as a trusted certificate
gem cert --add <(curl -Ls certs/opensearch-rubygems.pem)
gem install logstash-output-openserach -P HighSecurity
The HighSecurity trust profile will verify signed gems, and allow only if all the dependencies are signed.
This is created by following https://guides.rubygems.org/security/#building-gems

Signed-off-by: Vijayan Balasubramanian <balasvij@amazon.com>
@VijayanB VijayanB merged commit 8642f35 into opensearch-project:main Aug 5, 2021
@VijayanB VijayanB deleted the add-public-key branch August 5, 2021 21:25
@VijayanB VijayanB added the Infrastructure Changes to infrastructure, testing, CI/CD, pipelines, etc. label Aug 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Infrastructure Changes to infrastructure, testing, CI/CD, pipelines, etc. v1.0.0 v1.1.0 latest release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants