-
Notifications
You must be signed in to change notification settings - Fork 10
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
fix(tls): use TLS by default in the Agent Client #747
fix(tls): use TLS by default in the Agent Client #747
Conversation
This doesn't perform the TLS check until Cryostat is going to initiate a connection to the Agent. Would it make sense to do an |
I think this still isn't blocking Agent registrations early enough:
I set this up by:
I think what I'd like to see in this scenario is that Cryostat refuses the Agent's attempts to register itself in the first place. This would happen in |
The Agent registration is "blocked" now, but I think not in the intended way:
I think this is because the check in This would mean that actually all Agent registrations are now blocked (broken), not only ones that fail the TLS assertion. |
c9ec5b8
to
33642fa
Compare
/build_test |
Workflow started at 12/20/2024, 2:52:43 PM. View Actions Run. |
No OpenAPI schema changes detected. |
No GraphQL schema changes detected. |
manual test not working as expected
CI build and push: All tests pass ✅ |
When I run the However, when I do
I suspect the problem is Agent dual-registration. Since this Agent instance in the smoketest has JMX enabled as well, after the Agent registers itself it actually publishes two Target definitions - one for itself using HTTP(S), and the other for itself via JMX. The Discovery.java line 344 referenced in the stacktrace points to the new So I guess when we're checking for the target connection URLs in that publish method, we need to check whether it's a JMX or HTTP URL, and if it's HTTP then check if we're enforcing HTTPS. So something roughly like:
|
Hi,
This is the other half to cryostatio/cryostat-agent#554 , enforcing TLS by default on the server side for agent communication. Controlled by a configuration option cryostat.agent.tls.enabled
Addresses #686