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

Aws::CloudFront::CookieSigner does not work with private_key as string #1698

Closed
johan-smits opened this issue Jan 29, 2018 · 2 comments
Closed
Labels
guidance Question that needs advice or information.

Comments

@johan-smits
Copy link

Please fill out the sections below to help us address your issue

Issue description

When creating a new cookiesiger with the private key as a text input it raises a error.

Gem name ('aws-sdk', 'aws-sdk-resources' or service gems like 'aws-sdk-s3') and its version

aws-sdk-cloudfront (1.1.0)

Version of Ruby, OS environment

ruby 2.3.1p112 (2016-04-26) [x86_64-linux-gnu]
Ubuntu 16.04 (64 bits)

Code snippets / steps to reproduce

cookie = Aws::CloudFront::CookieSigner.new(
      key_pair_id: 'pair_id',
      private_key: '-----BEGIN RSA PRIVATE KEY-----'
  )
location = "http://abc.cloudfront.net/images/image.jpg"
    policy =  {
        'Statement' => [
            'Resource' => 'images/image.jpg',
            'Condition' => {
                'IpAddress' => {'AWS:SourceIp' => '10.52.176.0/24'},
                'DateLessThan' => {'AWS:EpochTime' => (Time.now.utc + 2.days)}
            }
        ]
    }
cookie.signed_cookie(location, policy: policy.to_json)

The error:

no implicit conversion of Seahorse::Client::Response into String

The documentation says the private_key can accept a string?

@cjyclaire
Copy link
Contributor

Thanks for the info! Could you share a full trace of the error log? The private_key can accept a string, and from your code snippet, I couldn't find where the response object is introduced?

@cjyclaire cjyclaire added closing-soon This issue will automatically close in 4 days unless further comments are made. and removed information requested labels Feb 9, 2018
@awood45
Copy link
Member

awood45 commented Feb 26, 2018

Closing due to inactivity, feel free to reopen when you have more information.

@awood45 awood45 closed this as completed Feb 26, 2018
@awood45 awood45 removed the closing-soon This issue will automatically close in 4 days unless further comments are made. label Feb 26, 2018
@diehlaws diehlaws added guidance Question that needs advice or information. and removed usage-question labels Jan 4, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
guidance Question that needs advice or information.
Projects
None yet
Development

No branches or pull requests

4 participants