Skip to content
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

Add Jose4j static init recording to OIDC #42765

Merged
merged 1 commit into from
Aug 27, 2024

Conversation

sberyozkin
Copy link
Member

@sberyozkin sberyozkin commented Aug 26, 2024

This comment has been minimized.

@sberyozkin
Copy link
Member Author

Hi @gsmet @aloubyansky, I've seen this Gradle build failure a few times before, it looked transient, I meant to open a separate issue

@sberyozkin sberyozkin force-pushed the oidc_jose4j_recorder branch from 51cef22 to 24d15c2 Compare August 26, 2024 18:24
Copy link

quarkus-bot bot commented Aug 26, 2024

Status for workflow Quarkus CI

This is the status report for running Quarkus CI on commit 24d15c2.

✅ The latest workflow run for the pull request has completed successfully.

It should be safe to merge provided you have a look at the other checks in the summary.

You can consult the Develocity build scans.

public class Jose4jRecorder {

public void initialize() {
AlgorithmFactoryFactory.getInstance();
Copy link
Contributor

Choose a reason for hiding this comment

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

This uses System.getProperty which should never be used to configure behavior at native-image build time.

To be fair, it seems to use it only for logging, but it makes suspicious of what else this method does and it absolutely needs to be checked thoroughly

Copy link
Member Author

Choose a reason for hiding this comment

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

Hi @geoand, sure, https://bitbucket.org/b_c/jose4j/src/756257eb92352600d5dde08c2b8ed25db13a8952/src/main/java/org/jose4j/jwa/AlgorithmFactoryFactory.java#lines-56 is indeed about logging only...
The rest of the method is sound, these properties are not having any impact.
Are you OK with that ? I can suggest to move those System.getProperty() calls directly into log.debug(...) if it can make any difference

Copy link
Contributor

Choose a reason for hiding this comment

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

The rest of the method is sound, these properties are not having any impact.

If you have checked it thoroughly, that's fine with me.

Copy link
Member Author

@sberyozkin sberyozkin Aug 27, 2024

Choose a reason for hiding this comment

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

@geoand Yeah, I searched if any of those properties can be seen somewhere else in that code :-). The rest is just loading supported algorithms, none of them would need a version/vendor/javahome property. I suppose, purely for debugging purposes, seeing Java version and vendor can be useful in context of the Jose4j initialization as a support for various algorithms may vary...
Agreed it was not really essential though

@sberyozkin
Copy link
Member Author

Let me merge now that we've discussed Georgios's comment

@sberyozkin sberyozkin merged commit d815152 into quarkusio:main Aug 27, 2024
23 checks passed
@quarkus-bot quarkus-bot bot added this to the 3.16 - main milestone Aug 27, 2024
@sberyozkin sberyozkin deleted the oidc_jose4j_recorder branch August 27, 2024 10:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Quarkus OIDC makes first request very slow
3 participants