« Previous | Next » 

Revision 53b0e180

Parent 2382970d
Child 890f726f, 71fc1547

Added by Tomáš Kukrál about 5 years ago

fix parsing of Authorization header

Econe server fails with <NoMethodError: undefined method `split' for nil:NilClass>
when using some clients (ec2 Ansible modules for example). The problem
lies in parsing Authentication header format.

Euca sends:
Credential=tom/20160425/undefined-19606/ec2/aws4_request, SignedHeaders=accept;accept-encoding;connection;content-length;content-type;host;x-amz-content-sha256;x-amz-date, Signature=fsomehash8cda2

Ansible EC2 module sends:

Previous implementation fails when fields are separated with ","
(without space). Documentation [1] for AWS API says "are separated by a
comma" so there should be just comma, but I'd prefer to maintain
compatibility with euca and convert headers (remove spaces after comma).

[1] http://docs.aws.amazon.com/AmazonS3/latest/API/sigv4-auth-using-authorization-header.html


  • added
  • modified
  • copied
  • renamed
  • deleted

View differences