Skip to content

feat(awsauth): accept an optional session_token for static credentials - #285

Open
MBrassey wants to merge 1 commit into
paradigmxyz:mainfrom
MBrassey:awsauth-static-session-token
Open

MBrassey wants to merge 1 commit into
paradigmxyz:mainfrom
MBrassey:awsauth-static-session-token

Conversation

@MBrassey

Copy link
Copy Markdown

Static aws_auth credentials take an access key and a secret only, so temporary (STS) credentials cannot be used with them: the session token has nowhere to go, and AWS rejects a request signed with a temporary key and no token.

This adds an optional session_token source beside access_key_id and secret_access_key. When it is set, the token is carried into the credentials and the request is signed with X-Amz-Security-Token (so it is also in SignedHeaders), as already happens for credentials_provider: workload_identity. It is refused unless both static fields are set, and nothing changes for a config without it.

Tests:

  • credentials carry the token when it is configured, and none when it is not;
  • a request signed with static temporary credentials carries X-Amz-Security-Token and signs it;
  • session_token without the static fields is refused.

iron-proxy.example.yaml documents the new field.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant