Skip to content
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

Adding Signing key path to gemspec #101

Conversation

naveentatikonda
Copy link
Member

Signed-off-by: Naveen Tatikonda navtat@amazon.com

Description

Adding signing key path to gemspec

Issues Resolved

#100

Check List

  • 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.

@naveentatikonda naveentatikonda added the 1.2.0 latest release label Dec 3, 2021
@naveentatikonda naveentatikonda self-assigned this Dec 3, 2021
@naveentatikonda naveentatikonda requested a review from a team as a code owner December 3, 2021 23:46
@naveentatikonda naveentatikonda linked an issue Dec 3, 2021 that may be closed by this pull request
.gitignore Outdated Show resolved Hide resolved
@VijayanB VijayanB added the Infrastructure Changes to infrastructure, testing, CI/CD, pipelines, etc. label Dec 3, 2021
@naveentatikonda naveentatikonda force-pushed the add_signing_key_path branch 2 times, most recently from e9f6e60 to 46b5dcb Compare December 6, 2021 23:06
@@ -18,7 +20,10 @@ Gem::Specification.new do |s|
# Tests
s.test_files = s.files.grep(%r{^(test|spec|features)/})

s.cert_chain = ['certs/opensearch-rubygems.pem']
if $PROGRAM_NAME.end_with?("gem") && ARGV == ["build", __FILE__] && File.exist?(signing_key_path)
Copy link
Member

Choose a reason for hiding this comment

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

@naveentatikonda Could you explain what this is doing? Im not very familiar with gem signing.

Copy link
Member Author

Choose a reason for hiding this comment

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

To avoid security issues while installing gems where if we install any malicious gem without knowing its credibility, the gem author can penetrate into that server. To avoid this, the RubyGems has an ability to sign the gems where the signing data is included as part of the gem. So that the end user can verify the signing key before installing the gem.

Copy link
Member

Choose a reason for hiding this comment

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

I am still confused by this is going from being not conditional to conditional on who's calling.

Copy link
Member

@VijayanB VijayanB Dec 7, 2021

Choose a reason for hiding this comment

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

Certificate is useful only if we are signing the gems. Hence, we moved this attribute to be added only if signing key exists and is being called by gem build command.

Copy link
Member

@VijayanB VijayanB left a comment

Choose a reason for hiding this comment

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

LGTM. Thanks!

@VijayanB
Copy link
Member

VijayanB commented Dec 7, 2021

@naveentatikonda can you rebase this change? Link checker should succeed.

@VijayanB VijayanB requested a review from dblock December 7, 2021 19:34
Signed-off-by: Naveen Tatikonda <navtat@amazon.com>
@naveentatikonda naveentatikonda merged commit f13a16a into opensearch-project:main Dec 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1.2.0 latest release Infrastructure Changes to infrastructure, testing, CI/CD, pipelines, etc.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Update gemspec to include signing key path
4 participants