Files
Philip Conrad 1559c39d42 providers/aws: Refactor + Fix 2x Authorization header append issue. (#5475)
This commit refactors the shared AWS Sig v4 signing code, specifically
to prevent the issue behind #5472. The underlying problem for was
that the `"Authorization"` header was being appended *twice* to the
request, but only for the AWS REST plugin, because the value was pulled
twice from the signed headers map.

This was not caught by the unit tests, because the REST plugin's unit
tests all assumed the header was single-valued and canonicalized.

We now explicitly test for that condition in the unit tests, and the
signing code now returns the AWS headers map separately from the value
for the `"Authorization"` header, reducing the potential for this
mistake to happen in the future.

Fixes: #5472

Signed-off-by: Philip Conrad <philipaconrad@gmail.com>
(cherry picked from commit 1d1cb357ae)
2022-12-12 11:31:20 -05:00
..
2022-10-27 13:35:39 +02:00