Skip to content

Using gcp-kms in Ruby 3.1 causes an error. #21

Open
@kann1020

Description

The following error occurred when using gcp-kms with Ruby3.1.
(cloudkms_v1/service.rb:867:in `decrypt_crypto_key': wrong number of arguments (given 3, expected 1..2) (ArgumentError))

google-apis-cloudkms_v1
https://github.com/googleapis/google-api-ruby-client/blob/main/generated/google-apis-cloudkms_v1/lib/google/apis/cloudkms_v1/service.rb#L867
The decrypt_crypto_key argument looks like this.

On the other hand, the yaml_vault is as follows, and the arguments do not match.

def decrypt(value)
response = @client.decrypt_crypto_key(@resource_id, {ciphertext: Base64.strict_decode64(value)}, {})
YAML.load(response.plaintext)
end

I think it will work if I delete , {} , can you fix it?

Incidentally, google-api-client is deprecate, so it would be helpful if you could migrate to google-apis-cloudkms_v1 as well

Thanks.

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions