Skip Menu |

This queue is for tickets about the Net-Amazon-EC2 CPAN distribution.

Report information
The Basics
Id: 77871
Status: resolved
Priority: 0/
Queue: Net-Amazon-EC2

People
Owner: Nobody in particular
Requestors: andrew [...] illywhacker.net
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: SignatureDoesNotMatch bug with UserData
Date: Sun, 17 Jun 2012 22:41:47 +0100
To: bug-Net-Amazon-EC2 [...] rt.cpan.org
From: Andrew Solomon <andrew [...] illywhacker.net>
Hi Mark (and Jeff) Firstly - thanks so much for this module. It's a nice example of making hard things possible! Now I seem to have stumbled on a bug but unfortunately not a fix. * Distribution: Net::Amazon::EC2 * Version: 0.18 * Perl version: This is perl 5, version 14, subversion 2 (v5.14.2) built for i686-linux-gnu-thread-multi-64int (with 53 registered patches, see perl -V for more detail) * Operating System vendor and version (Find this by running the command uname -a) Linux ip-10-229-77-105 3.2.0-23-virtual #36-Ubuntu SMP Tue Apr 10 23:58:38 UTC 2012 i686 i686 i386 GNU/Linux * Issue: - When I call run_instances it's fine until I add the UserData parameter. At this point I get the output below. The encode_base64 output I'm using for the UserData parameter is IyEvYmluL2Jhc2gKCnVzZXJtb2QgLXAgbXlGVExGQTJYdDMvNiBzdHVkZW50ICY+IC90bXAvdXNl cm1vZC5vdXQKCg== (is it a problem it contains a newline?) It is generated with my $user_data = encode_base64( '#!/bin/bash usermod -p myFTLFA2Xt3/6 student &> /tmp/usermod.out '); - When I paste the base64 userdata above into https://console.aws.amazon.com when creating an instance, it works fine. Kind regards, Andrew QUERY TO SIGN: ActionRunInstancesAWSAccessKeyIdAKIAJEMH4OBQC5OFJONQBlockDeviceMapping.DeviceName/dev/sdfBlockDeviceMapping.Ebs.SnapshotIdsnap-fceda597BlockDeviceMapping.Ebs.VolumeSize1ImageIdami-41faff35InstanceTypet1.microMaxCount1MinCount1SecurityGroupquicklaunch-1SignatureVersion1Timestamp2012-06-17T21:14:00.000ZUserDataIyEvYmluL2Jhc2gKCnVzZXJtb2QgLXAgbXlGVExGQTJYdDMvNiBzdHVkZW50ICY+IC90bXAvdXNl cm1vZC5vdXQKCg== Version2011-01-01 GENERATED QUERY URL: http://eu-west-1.ec2.amazonaws.com $VAR1 = { 'RequestID' => 'a2cbd386-4c91-445b-bc27-070abfb0cdc3', 'Errors' => [ { 'Error' => { 'Code' => 'SignatureDoesNotMatch', 'Message' => 'The request signature we calculated does not match the signature you provided. Check your AWS Secret Access Key and signing method. Consult the service documentation for details.' } } ] }; ERROR CODE: SignatureDoesNotMatch MESSAGE: The request signature we calculated does not match the signature you provided. Check your AWS Secret Access Key and signing method. Consult the service documentation for details. FOR REQUEST: a2cbd386-4c91-445b-bc27-070abfb0cdc3 bless({ errors => [ bless({ code => "SignatureDoesNotMatch", message => "The request signature we calculated does not match the signature you provided. Check your AWS Secret Access Key and signing method. Consult the service documentation for details.", }, "Net::Amazon::EC2::Error"), ], request_id => "a2cbd386-4c91-445b-bc27-070abfb0cdc3", }, "Net::Amazon::EC2::Errors")
Subject: Re: [rt.cpan.org #77871] AutoReply: SignatureDoesNotMatch bug with UserData
Date: Mon, 18 Jun 2012 07:55:40 +0100
To: bug-Net-Amazon-EC2 [...] rt.cpan.org
From: Andrew Solomon <andrew [...] illywhacker.net>
Ok - it turns out the bug was mine! My call to encode_base64 should have had the empty string as the second argument to avoid lines wrapping. cheers Andrew On Sun, Jun 17, 2012 at 10:41 PM, Bugs in Net-Amazon-EC2 via RT <bug-Net-Amazon-EC2@rt.cpan.org> wrote: Show quoted text
> > Greetings, > > This message has been automatically generated in response to the > creation of a trouble ticket regarding: >        "SignatureDoesNotMatch bug with UserData", > a summary of which appears below. > > There is no need to reply to this message right now.  Your ticket has been > assigned an ID of [rt.cpan.org #77871].  Your ticket is accessible > on the web at: > >    https://rt.cpan.org/Ticket/Display.html?id=77871 > > Please include the string: > >         [rt.cpan.org #77871] > > in the subject line of all future correspondence about this issue. To do so, > you may reply to this message. > >                        Thank you, >                        bug-Net-Amazon-EC2@rt.cpan.org > > ------------------------------------------------------------------------- > Hi Mark (and Jeff) > > Firstly - thanks so much for this module. It's a nice example of > making hard things possible! > > Now I seem to have stumbled on a bug but unfortunately not a fix. > > * Distribution:  Net::Amazon::EC2 > * Version: 0.18 > * Perl version: > This is perl 5, version 14, subversion 2 (v5.14.2) built for > i686-linux-gnu-thread-multi-64int > (with 53 registered patches, see perl -V for more detail) > * Operating System vendor and version (Find this by running the > command uname -a) > Linux ip-10-229-77-105 3.2.0-23-virtual #36-Ubuntu SMP Tue Apr 10 > 23:58:38 UTC 2012 i686 i686 i386 GNU/Linux > > * Issue: >  - When I call run_instances it's fine until I add the UserData > parameter. At this point I get the output below. > The encode_base64 output I'm using for the UserData parameter is > > IyEvYmluL2Jhc2gKCnVzZXJtb2QgLXAgbXlGVExGQTJYdDMvNiBzdHVkZW50ICY+IC90bXAvdXNl > cm1vZC5vdXQKCg== > > (is it a problem it contains a newline?) > It is generated with > > my $user_data = > encode_base64( > '#!/bin/bash > > usermod -p myFTLFA2Xt3/6 student &> /tmp/usermod.out > > '); > > - When I paste the base64 userdata above into > https://console.aws.amazon.com when creating an instance, it works > fine. > > Kind regards, > > Andrew > > QUERY TO SIGN: ActionRunInstancesAWSAccessKeyIdAKIAJEMH4OBQC5OFJONQBlockDeviceMapping.DeviceName/dev/sdfBlockDeviceMapping.Ebs.SnapshotIdsnap-fceda597BlockDeviceMapping.Ebs.VolumeSize1ImageIdami-41faff35InstanceTypet1.microMaxCount1MinCount1SecurityGroupquicklaunch-1SignatureVersion1Timestamp2012-06-17T21:14:00.000ZUserDataIyEvYmluL2Jhc2gKCnVzZXJtb2QgLXAgbXlGVExGQTJYdDMvNiBzdHVkZW50ICY+IC90bXAvdXNl > cm1vZC5vdXQKCg== > Version2011-01-01 > GENERATED QUERY URL: http://eu-west-1.ec2.amazonaws.com > $VAR1 = { >          'RequestID' => 'a2cbd386-4c91-445b-bc27-070abfb0cdc3', >          'Errors' => [ >                      { >                        'Error' => { >                                   'Code' => 'SignatureDoesNotMatch', >                                   'Message' => 'The request signature > we calculated does not match the signature you provided. Check your > AWS Secret Access Key and signing method. Consult the service > documentation for details.' >                                 } >                      } >                    ] >        }; > > > ERROR CODE: SignatureDoesNotMatch MESSAGE: The request signature we > calculated does not match the signature you provided. Check your AWS > Secret Access Key and signing method. Consult the service > documentation for details. FOR REQUEST: > a2cbd386-4c91-445b-bc27-070abfb0cdc3 > bless({ >  errors => [ >    bless({ >      code => "SignatureDoesNotMatch", >      message => "The request signature we calculated does not match > the signature you provided. Check your AWS Secret Access Key and > signing method. Consult the service documentation for details.", >    }, "Net::Amazon::EC2::Error"), >  ], >  request_id => "a2cbd386-4c91-445b-bc27-070abfb0cdc3", > }, "Net::Amazon::EC2::Errors") >
On Mon Jun 18 02:55:54 2012, andrew@illywhacker.net wrote: Show quoted text
> Ok - it turns out the bug was mine! My call to encode_base64 should > have had the empty string as the second argument to avoid lines > wrapping.
I was going to reply to this ticket with that suggestion but I'm glad you figured it out. Thanks. Mark