Skip to content

out_opensearch: keep AWS credential providers refreshable for SigV4 signing - #189

Merged
kenhys merged 1 commit into
fluent:mainfrom
Watson1978:fix_expired_sigv4_token
Sep 11, 2026
Merged

kenhys merged 1 commit into
fluent:mainfrom
Watson1978:fix_expired_sigv4_token

Conversation

@Watson1978

Copy link
Copy Markdown
Contributor

With assume_role_arn, aws_credentials collapsed the refreshable provider into a static Aws::Credentials snapshot, so SigV4 kept signing with the STS token after it expired (1 hour by default) and the cluster answered 403 The security token included in the request is expired until the plugin was restarted.
This keeps the provider object and passes it to the signer as credentials_provider, so Aws::Sigv4::Signer fetches fresh credentials for every request.
Passing refresh_credentials_interval as the STS duration_seconds (#78) was reverted in #108, so that approach is not revisited here.

Fixes #188

🤖 Generated with Claude Code

@Watson1978 Watson1978 changed the title out_opensearch: Keep AWS credential providers refreshable for SigV4 signing out_opensearch: keep AWS credential providers refreshable for SigV4 signing Sep 11, 2026
@Watson1978
Watson1978 force-pushed the fix_expired_sigv4_token branch 2 times, most recently from 2d7bae4 to b788f97 Compare September 11, 2026 04:48
@Watson1978
Watson1978 requested a review from kenhys September 11, 2026 05:02
Comment thread lib/fluent/plugin/out_opensearch.rb Outdated
…igning

aws_credentials collapsed refreshable providers into a static
Aws::Credentials snapshot, so requests kept being signed with an STS
token that expires after 1 hour by default. Passing the provider
itself as credentials_provider lets Aws::Sigv4::Signer fetch fresh
credentials for every request.

Passing refresh_credentials_interval as the STS duration_seconds (fluent#78)
was reverted in fluent#108, so it is not revisited here.

Fixes fluent#188

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Signed-off-by: Shizuo Fujita <fujita@clear-code.com>
@Watson1978
Watson1978 force-pushed the fix_expired_sigv4_token branch from b788f97 to 9f6a4a0 Compare September 11, 2026 06:18
@Watson1978
Watson1978 requested a review from kenhys September 11, 2026 06:29
@kenhys
kenhys merged commit 5ec8526 into fluent:main Sep 11, 2026
21 checks passed
@Watson1978
Watson1978 deleted the fix_expired_sigv4_token branch September 11, 2026 06:43
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.

Expired SigV4 credentials after 1 hour with assume_role_arn in 1.1.6

2 participants