-
Notifications
You must be signed in to change notification settings - Fork 851
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
STS not supported with native builds due to missing reflect-config #2985
Comments
Original native image compilation support was added here: |
Hi @elrob thank you for calling our attention to this. Marking as a bug. |
Is it possible to get this fixed ? |
This is still an issue, here is how you can add the hint in Spring Boot 3 and Kotlin: @Configuration
@ImportRuntimeHints(StsRuntineHints::class)
class AwsStsRuntimeHints
class StsRuntineHints : RuntimeHintsRegistrar {
override fun registerHints(hints: RuntimeHints, classLoader: ClassLoader?) {
hints.reflection().registerType(StsWebIdentityCredentialsProviderFactory::class.java)
}
} |
…e52a4e14b Pull request: release <- staging/62cbbb21-44f2-4dd7-8634-7ece52a4e14b
This issue is now closed. Comments on closed issues are hard for our team to see. |
Describe the bug
With STS service included as a dependency, the default credentials provider skips STS in the chain as
StsWebIdentityCredentialsProviderFactory.class
needs to be included in reflect-config.jsonIncluding it manually fixes it. But other clients like S3 have reflect-config.json so STS should too.
Expected behavior
Within a native build, the STS credentials provider should be included as part of the default credentials provider chain if it is included as a dependency.
Current behavior
Even with STS service included as a dependency, the default credentials provider skips STS in the chain as
StsWebIdentityCredentialsProviderFactory.class
needs to be included in reflect-config.jsonSteps to Reproduce
It occurs here:
aws-sdk-java-v2/core/auth/src/main/java/software/amazon/awssdk/auth/credentials/internal/WebIdentityCredentialsUtils.java
Line 46 in 584ccb5
This use of reflection means the
software.amazon.awssdk.services.sts.internal.StsWebIdentityCredentialsProviderFactory
is not picked up in a native build unless it is explicitly included in reflect-config.json.Possible Solution
Create
reflect-config.json
for STS client package (like S3 etc) and includesoftware.amazon.awssdk.services.sts.internal.StsWebIdentityCredentialsProviderFactory
in it.Context
No response
AWS Java SDK version used
latest
JDK version used
11
Operating System and version
linux
The text was updated successfully, but these errors were encountered: