Skip to content

Remote JMX SSL bug fix and updated tests #6275

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

Merged
merged 1 commit into from
Jul 17, 2025

Conversation

roberttoyonaga
Copy link
Collaborator

This is a follow up to this pull request here: #6250

It adds a reflection configuration that was missing, but needed for a JMX client to connect using SSL. The tests have been updated to connect with SSL and password authentication.

I've included dummy password, access, and SSL files required to configure the JMX properties needed for authentication and SSL.

@oracle-contributor-agreement oracle-contributor-agreement bot added the OCA Verified All contributors have signed the Oracle Contributor Agreement. label Mar 24, 2023
@roberttoyonaga
Copy link
Collaborator Author

Hi @fniephaus here's the fix I was mentioning and also the corresponding test updates.

Copy link
Member

@fniephaus fniephaus left a comment

Choose a reason for hiding this comment

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

Thanks for the follow up PR. I left two minor comments.

Copy link
Member

Choose a reason for hiding this comment

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

Is there anything important in here that needs to be documented?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I've now added some more explanation for why the ssl files are needed and how they were created here. I also added the client.cer file (although it isn't really needed) for completeness.

Copy link
Member

Choose a reason for hiding this comment

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

Could you please document and provide instructions how the files in jmxremoteresources are created? We need to be able to recreate them. Maybe a README.md in substratevm/src/com.oracle.svm.test/src/com/oracle/svm/test/jmx/jmxremoteresources) may actually be better than a code comment (you could reference the README in the code comment).

Copy link
Collaborator Author

@roberttoyonaga roberttoyonaga Jul 9, 2025

Choose a reason for hiding this comment

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

Okay good idea. I will add that

fniephaus
fniephaus previously approved these changes Mar 27, 2023
Copy link
Member

@fniephaus fniephaus left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Member

Choose a reason for hiding this comment

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

client.cer currently uses the following information: Issuer: C = ZZ, ST = GraalVM, L = GraalVM, O = GraalVM, OU = GraalVM, CN = GraalVM.

I think we should avoid GraalVM here and use something like JmxTest instead.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

ok I've updated it to use "JmxTest" now :)

@roberttoyonaga
Copy link
Collaborator Author

Hi @fniephaus! I've added a README.md explaining the steps needed to create the supporting dummy SSL and password files. I've also rebased with master, fixed the conflicts, and added the fix from #11568 so that the tests can pass.

GraalVM Gate // compiler style,fullbuild,test JDKlatest is failing on multiple other recent PRs and seems to be related to the compiler, not this PR.

Please have another look at this PR when you have time.

@fniephaus
Copy link
Member

I went over the PR and added a commit (see #11599).

An internal reviewer mentioned we need to get rid of the binary files. Is there any way you could build on 19c02bd and make is so that the keytool is invoked in the temporary directory?

@roberttoyonaga
Copy link
Collaborator Author

I went over the PR and added a commit (see #11599).

An internal reviewer mentioned we need to get rid of the binary files. Is there any way you could build on 19c02bd and make is so that the keytool is invoked in the temporary directory?

Hi @fniephaus! Thank you for doing that. I've cherry-picked your commit and added a new commit on top of it here. The new commit uses keytool programmatically and creates the ssl files in the temporary directory.

@fniephaus
Copy link
Member

Thanks for taking care of this, @roberttoyonaga. I have refactored the test some more and now, all files are inlined into the test file and on-the-fly created in the temp directory.

if you could reset your branch to this commit and squash all commits, I think this is ready to be integrated.

@roberttoyonaga
Copy link
Collaborator Author

I have refactored the test some more and now, all files are inlined into the test file and on-the-fly created in the temp directory.
if you could reset your branch to this commit and squash all commits, I think this is ready to be integrated.

Great, thank you @fniephaus. I've reset and squashed the commits.

Copy link
Member

@fniephaus fniephaus left a comment

Choose a reason for hiding this comment

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

LGTM, thank you @roberttoyonaga!

@graalvmbot graalvmbot merged commit 732ba41 into oracle:master Jul 17, 2025
23 of 25 checks passed
@github-project-automation github-project-automation bot moved this from In progress to Done in Native Image Jul 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
OCA Verified All contributors have signed the Oracle Contributor Agreement.
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

3 participants