diff --git a/.gitignore b/.gitignore index 64899ba..f0522dd 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,5 @@ Gemfile.lock .bundle vendor /.idea/ +gem-private_key.pem + diff --git a/certs/opensearch-rubygems.pem b/certs/opensearch-rubygems.pem new file mode 100644 index 0000000..691f7d0 --- /dev/null +++ b/certs/opensearch-rubygems.pem @@ -0,0 +1,21 @@ +-----BEGIN CERTIFICATE----- +MIIDfDCCAmSgAwIBAgIBATANBgkqhkiG9w0BAQUFADBCMRMwEQYDVQQDDApvcGVu +c2VhcmNoMRYwFAYKCZImiZPyLGQBGRYGYW1hem9uMRMwEQYKCZImiZPyLGQBGRYD +Y29tMB4XDTIxMDgwMjIxMDQwM1oXDTIyMDgwMjIxMDQwM1owQjETMBEGA1UEAwwK +b3BlbnNlYXJjaDEWMBQGCgmSJomT8ixkARkWBmFtYXpvbjETMBEGCgmSJomT8ixk +ARkWA2NvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAM1z3/jcitjV +umXwRFn+JSBBd36qZB54Dtucf6+E2fmNPzBRhgYN5XJy/+clQJ9NIJV7C8H52P3V +dsce/VXcNAcgfUdlN57nM0ksjFFNlnHWXea8Ub9/6R1K0p1RBizEINzUneoJLvqe +7w/KfvBJStj7AmJgZmzCiu98j75YLcdLhZQykRyJdB03wZsMQUvxPFkhTZn+Qi8k +0U909l9JD0i1PC0xVukYlskUA2xeo36kMMllABJGN536Z0aIT2KX2XTiKK7hILoP ++flNmgA4eyXa5Ki9q4HBN6QhsTKdEinqGngQnUI35YTu2AHsvfjn1wP/nUa9aRVH +zfR37/NQFkECAwEAAaN9MHswCQYDVR0TBAIwADALBgNVHQ8EBAMCBLAwHQYDVR0O +BBYEFJJ2myhLXK742btavNbG0IWrMNBIMCAGA1UdEQQZMBeBFW9wZW5zZWFyY2hA +YW1hem9uLmNvbTAgBgNVHRIEGTAXgRVvcGVuc2VhcmNoQGFtYXpvbi5jb20wDQYJ +KoZIhvcNAQEFBQADggEBAE7gBP5ecTtKb04qmEsnbJ6+yn0LUSmxPabFBnB6h1+T +XW8BvBw9MpE//5fQf4HSia3m9XjRpl4WxBcJiyfLER64tk/c1JLhV2+rq3CCV/be +DFSP6gY93kK7jwauajGQvyHzORaW1TBM6diIRYCMLY7Isf+PTHl0xhZZBSVm8wl6 +IstV+mTP2KC1l7hSzUDb4rrOSnpRB7AEczcDdkjwzHKIlw8rcL+PLLnFTOgqKyq3 +yXikuH6LEVykA8pgOcB9gKsB2/zMd2ZlSj2monM8Qw9EfB14ZSDTYS8VYuwWCeF0 +eFmXXk0ufQFKl1Yll7quHkmQ0PzKkvXTpONBT6qPkXE= +-----END CERTIFICATE----- diff --git a/logstash-input-opensearch.gemspec b/logstash-input-opensearch.gemspec index fb573f4..96df14e 100644 --- a/logstash-input-opensearch.gemspec +++ b/logstash-input-opensearch.gemspec @@ -1,6 +1,8 @@ # Copyright OpenSearch Contributors # SPDX-License-Identifier: Apache-2.0 +signing_key_path = "gem-private_key.pem" + Gem::Specification.new do |s| s.name = 'logstash-input-opensearch' @@ -19,6 +21,11 @@ Gem::Specification.new do |s| # Tests s.test_files = s.files.grep(%r{^(test|spec|features)/}) + if $PROGRAM_NAME.end_with?("gem") && ARGV == ["build", __FILE__] && File.exist?(signing_key_path) + s.signing_key = signing_key_path + s.cert_chain = ['certs/opensearch-rubygems.pem'] + end + # Special flag to let us know this is actually a logstash plugin s.metadata = { "logstash_plugin" => "true", "logstash_group" => "input" }