8000 bug: LocalStack authentication expects a space after commas in Authorization header parameters · Issue #7358 · localstack/localstack · GitHub
[go: up one dir, main page]

Skip to content
bug: LocalStack authentication expects a space after commas in Authorization header parameters #7358
Closed
@paulo-ferraz-oliveira

Description

@paulo-ferraz-oliveira

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

I'm using LocalStack - the Docker container - to perform local tests on top of ex_aws, an Elixir library.

I'm getting the following error

Authorization header requires \\Signature\\ parameter. Authorization header requires \\SignedHeaders\\ parameter.

The Authorization header does have those parameters, but... they're written like this

AWS4-HMAC-SHA256 Credential=<cred>,SignedHeaders=<sign_head>,Signature=<sign>

instead of

AWS4-HMAC-SHA256 Credential=<cred>, SignedHeaders=<sign_head>, Signature=<sign>
                                   ^ notice the extra space

which seemingly LocalStack expects, but shouldn't (?)

AWS' Authenticating Requests (AWS Signature Version 4) > Using an Authorization Header > Overview is not very clear either since in the example they post, we find

Authorization: AWS4-HMAC-SHA256 
Credential=AKIAIOSFODNN7EXAMPLE/20130524/us-east-1/s3/aws4_request, 
                                                                   ^ a space here
SignedHeaders=host;range;x-amz-date,
                                    ^ no space here
Signature=fe5f80f77d5fa3beca038a248ff027d0445342fe2855ddc963176630326f1024

Expected Behavior

LocalStack should consume both forms of the Authorization header made explicit in section "Current Behavior"

How are you starting LocalStack?

With a docker run command

Steps To Reproduce

How are you starting localstack (e.g., bin/localstack command, arguments, or docker-compose.yml)

docker run localstack/localstack

Client commands (e.g., AWS SDK code snippet, or sequence of "awslocal" commands)

using an Elixir library, as explained above

Environment

- OS: MacOS 12.6
- LocalStack: 1.3.0

Anything else?

I initially posted about this in discuss.localstack.cloud:
Authorization header potentially not parsed right
.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

    0