Skip to content

Add graalvm reachability metadata to sso service #5840

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

Open
1 of 2 tasks
gbaso opened this issue Jan 29, 2025 · 4 comments · May be fixed by #5852
Open
1 of 2 tasks

Add graalvm reachability metadata to sso service #5840

gbaso opened this issue Jan 29, 2025 · 4 comments · May be fixed by #5852
Assignees
Labels
feature-request A feature should be added or improved. graalvm p2 This is a standard priority issue

Comments

@gbaso
Copy link

gbaso commented Jan 29, 2025

Describe the feature

Add reachability metadata for service sso, namely for the constructor of SsoProfileCredentialsProviderFactory.

Use Case

GraalVM native image requires reflection hints for code that is only used by reflection.

Proposed Solution

Add a file reflect-config.json under src/main/resources/META-INF/native-image/software.amazon.awssdk/sso with:

[
  {
    "name": "software.amazon.awssdk.services.sso.auth.SsoProfileCredentialsProviderFactory",
    "methods": [
      {
        "name": "<init>",
        "parameterTypes": []
      }
    ]
  }
]

Other Information

Native hints can be provided by the application (e.g., for spring applications, via @ImportRuntimeHints), but it's mostly a try-and-error process. Libraries providing metadata simplify the operation of building a native image considerably.

Other aws services already provide metadata, see ssooidc.

Acknowledgements

  • I may be able to implement this feature request
  • This feature might incur a breaking change

AWS Java SDK version used

2.29.52

JDK version used

21.0.5

Operating System and version

MacOS 15.2

@gbaso gbaso added feature-request A feature should be added or improved. needs-triage This issue or PR still needs to be triaged. labels Jan 29, 2025
gbaso added a commit to gbaso/aws-sdk-java-v2 that referenced this issue Feb 3, 2025
@gbaso gbaso linked a pull request Feb 3, 2025 that will close this issue
12 tasks
@debora-ito debora-ito added graalvm p2 This is a standard priority issue and removed needs-triage This issue or PR still needs to be triaged. labels May 2, 2025
@debora-ito debora-ito self-assigned this May 2, 2025
@debora-ito
Copy link
Member

@gbaso Sorry for the long delay in replying. Taking a look at the PR.

@scrocquesel
Copy link
Contributor

@debora-ito not related to the OP PR, but he mentions that sso oidc reachability was done long ago. The issue is that the referenced class software.amazon.awssdk.services.ssooidc.SsoOidcTokenProviderFactory has never existed. I think there is a typo with SsoOidcProfileTokenProviderFactory.

@debora-ito
Copy link
Member

debora-ito commented May 3, 2025

@scrocquesel good catch 🤦🏻‍♀️ thank you!

@gbaso would you mind fixing ssooidc/reflect-config.json in your PR?

@gbaso
Copy link
Author

gbaso commented May 6, 2025

@debora-ito sure, I'll fix it now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request A feature should be added or improved. graalvm p2 This is a standard priority issue
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants