Skip to content

Fix assume_role_with_web_identity not using botocore config for STS c… - #64216

Merged
vincbeck merged 4 commits into
apache:mainfrom
piotrlinski:fix/web-identity-proxy-config
Mar 26, 2026
Merged

Fix assume_role_with_web_identity not using botocore config for STS c…#64216
vincbeck merged 4 commits into
apache:mainfrom
piotrlinski:fix/web-identity-proxy-config

Conversation

@piotrlinski

Copy link
Copy Markdown
Contributor

When assume_role_method is set to assume_role_with_web_identity, the STS client used to fetch credentials was created without the connection's botocore config. This meant proxy settings, timeouts, and other config from config_kwargs in the connection extra were silently ignored.

The assume_role and assume_role_with_saml paths correctly pass self.config to the STS client, but the web identity path passed a raw base_session.create_client as client_creator to botocore's AssumeRoleWithWebIdentityCredentialFetcher, which never received the connection config.

This wraps client_creator to merge the connection's botocore config into any config that botocore passes when creating the STS client, ensuring proxy and other settings are respected.

@piotrlinski
piotrlinski requested a review from o-nikolas as a code owner March 25, 2026 12:19
@boring-cyborg boring-cyborg Bot added area:providers provider:amazon AWS/Amazon - related issues labels Mar 25, 2026
@eladkal
eladkal requested a review from vincbeck March 25, 2026 12:48

@vincbeck vincbeck left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Static checks are failing

…alls

When `assume_role_method` is set to `assume_role_with_web_identity`, the
STS client used to fetch credentials was created without the connection's
botocore config. This meant proxy settings, timeouts, and other config
from `config_kwargs` in the connection extra were silently ignored.

The `assume_role` and `assume_role_with_saml` paths correctly pass
`self.config` to the STS client, but the web identity path passed a raw
`base_session.create_client` as `client_creator` to botocore's
`AssumeRoleWithWebIdentityCredentialFetcher`, which never received the
connection config.

This wraps `client_creator` to merge the connection's botocore config
into any config that botocore passes when creating the STS client,
ensuring proxy and other settings are respected.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@piotrlinski
piotrlinski force-pushed the fix/web-identity-proxy-config branch from c0e4e49 to 7bf45ba Compare March 25, 2026 13:58
@vincbeck
vincbeck merged commit 853028b into apache:main Mar 26, 2026
93 checks passed
aaron-y-chen pushed a commit to aaron-y-chen/airflow that referenced this pull request Mar 30, 2026
…alls (apache#64216)

When `assume_role_method` is set to `assume_role_with_web_identity`, the
STS client used to fetch credentials was created without the connection's
botocore config. This meant proxy settings, timeouts, and other config
from `config_kwargs` in the connection extra were silently ignored.

The `assume_role` and `assume_role_with_saml` paths correctly pass
`self.config` to the STS client, but the web identity path passed a raw
`base_session.create_client` as `client_creator` to botocore's
`AssumeRoleWithWebIdentityCredentialFetcher`, which never received the
connection config.

This wraps `client_creator` to merge the connection's botocore config
into any config that botocore passes when creating the STS client,
ensuring proxy and other settings are respected.
Suraj-kumar00 pushed a commit to Suraj-kumar00/airflow that referenced this pull request Apr 7, 2026
…alls (apache#64216)

When `assume_role_method` is set to `assume_role_with_web_identity`, the
STS client used to fetch credentials was created without the connection's
botocore config. This meant proxy settings, timeouts, and other config
from `config_kwargs` in the connection extra were silently ignored.

The `assume_role` and `assume_role_with_saml` paths correctly pass
`self.config` to the STS client, but the web identity path passed a raw
`base_session.create_client` as `client_creator` to botocore's
`AssumeRoleWithWebIdentityCredentialFetcher`, which never received the
connection config.

This wraps `client_creator` to merge the connection's botocore config
into any config that botocore passes when creating the STS client,
ensuring proxy and other settings are respected.
@piotrlinski
piotrlinski deleted the fix/web-identity-proxy-config branch August 17, 2026 07:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:providers provider:amazon AWS/Amazon - related issues

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants