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

GCP kms not working it latest gems #150

Open
rcalosso opened this issue Feb 23, 2021 · 1 comment
Open

GCP kms not working it latest gems #150

rcalosso opened this issue Feb 23, 2021 · 1 comment

Comments

@rcalosso
Copy link

Environment

Provide at least:

  • Ruby Version.
  • 2.7.2
  • Symmetric Encryption Version.
  • 4.3.0
  • Application/framework names and versions (e.g. Rails, Sinatra, Puma, etc.).
  • Rails
  • Full Stack Trace, if an exception is being raised.
  • bundle exec symmetric-encryption --generate --keystore gcp --app-name Sample --environments "production"
    bundler: failed to load command: symmetric-encryption (/opt/narvar/vendor/bundle/ruby/2.7.0/bin/symmetric-encryption)
    NameError: uninitialized constant Google::Cloud::Kms::V1::KeyManagementServiceClient
    /opt/narvar/vendor/bundle/ruby/2.7.0/gems/symmetric-encryption-4.3.0/lib/symmetric_encryption/keystore/gcp.rb:67:in client' /opt/narvar/vendor/bundle/ruby/2.7.0/gems/symmetric-encryption-4.3.0/lib/symmetric_encryption/keystore/gcp.rb:59:in encrypt'
    /opt/narvar/vendor/bundle/ruby/2.7.0/gems/symmetric-encryption-4.3.0/lib/symmetric_encryption/keystore/gcp.rb:45:in write' /opt/narvar/vendor/bundle/ruby/2.7.0/gems/symmetric-encryption-4.3.0/lib/symmetric_encryption/keystore/gcp.rb:18:in generate_data_key'
    /opt/narvar/vendor/bundle/ruby/2.7.0/gems/symmetric-encryption-4.3.0/lib/symmetric_encryption/keystore.rb:24:in block in generate_data_keys' /opt/narvar/vendor/bundle/ruby/2.7.0/gems/symmetric-encryption-4.3.0/lib/symmetric_encryption/keystore.rb:18:in each'
    /opt/narvar/vendor/bundle/ruby/2.7.0/gems/symmetric-encryption-4.3.0/lib/symmetric_encryption/keystore.rb:18:in generate_data_keys' /opt/narvar/vendor/bundle/ruby/2.7.0/gems/symmetric-encryption-4.3.0/lib/symmetric_encryption/cli.rb:222:in generate_new_config'
    /opt/narvar/vendor/bundle/ruby/2.7.0/gems/symmetric-encryption-4.3.0/lib/symmetric_encryption/cli.rb:66:in run!' /opt/narvar/vendor/bundle/ruby/2.7.0/gems/symmetric-encryption-4.3.0/lib/symmetric_encryption/cli.rb:14:in run!'
    /opt/narvar/vendor/bundle/ruby/2.7.0/gems/symmetric-encryption-4.3.0/bin/symmetric-encryption:5:in <top (required)>' /opt/narvar/vendor/bundle/ruby/2.7.0/bin/symmetric-encryption:23:in load'
    /opt/narvar/vendor/bundle/ruby/2.7.0/bin/symmetric-encryption:23:in `<top (required)>'

Expected Behavior

Expect to generate config file

Actual Behavior

Stack trace, crash cause module / class name is wrong

Pull Request

Will work on PR, but looks like line 67 above is missing ::, should read

self.class::KMS::KeyManagementService::Client.new(timeout: 2, credentials: credentials)

@reidmorrison
Copy link
Owner

If Google have changed their API, when you submit the PR, please verify that the new changes are backward compatible with the previous Google API version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants