fix: add STS dependency for IRSA credential resolution in EKS#98
Merged
shenxianpeng merged 1 commit intojenkinsci:mainfrom Feb 17, 2026
Merged
Conversation
The BedrockProvider uses the AWS SDK DefaultCredentialsProvider chain, which requires the STS module on the classpath to perform AssumeRoleWithWebIdentity. Without it, the credential chain silently skips IRSA and falls back to EC2 instance metadata, causing the plugin to use the EKS node role instead of the pod's service account IAM role. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
shenxianpeng
approved these changes
Feb 17, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Environment
Steps to Reproduce
explainError()on a failed buildExpected Behavior
The plugin should use the pod's IRSA credentials (via
AssumeRoleWithWebIdentity) to authenticate with AWS Bedrock, inheriting the IAM role associated with the Kubernetes service account.Actual Behavior
The
assumed-role/prod-eks-nodein the error shows the plugin is using the EC2 instance metadata (node role) instead of the IRSA credentials.Root Cause
The
langchain4j-bedrockmodule pulls insoftware.amazon.awssdk:bedrockruntimebut notsoftware.amazon.awssdk:sts. The AWS SDK v2DefaultCredentialsProviderrequires thestsmodule on the classpath to useStsAssumeRoleWithWebIdentityCredentialsProvider. Without it, the IRSA credential provider is silently skipped and the chain falls through to EC2 instance metadata.Fix
Add
software.amazon.awssdk:stsas an explicit dependency, matching the version pulled transitively by langchain4j-bedrock (2.33.5).Logs