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 support for client-defined connection protocols #482

Merged
merged 4 commits into from
May 26, 2021

Conversation

andrewazores
Copy link
Member

@andrewazores andrewazores commented May 25, 2021

This adds a clientlib directory and handling for it, which allows end users to supply additional JARs to be added to the Cryostat classpath. This allows for various extensions to Cryostat, ex. it would allow for a reflection-based platform client or auth manager selection (again), but in this instance it is intended to allow Cryostat to communicate with targets using alternate service types than jmxrmi, such as Wildfly's remote+http.

The new Wildfly sample application in smoketest.sh listens using remote+http on port 9990, so with this jboss-client.jar in /clientlib, Cryostat can connect to the Wildfly server using the URL service:jmx:remote+http://localhost:9990. This target will need to be manually added using the Custom Targets HTTP API (#472). Example using HTTPie:

$ http --verify=false -f POST https://0.0.0.0:8181/api/v2/targets connectUrl="service:jmx:remote+http://localhost:9990" alias=Wildfly
HTTP/1.1 200 OK
content-encoding: gzip
content-length: 144

{"meta":{"type":"application/json","status":"OK"},"data":{"result":{"connectUrl":"service:jmx:remote+http://localhost:9990","alias":"Wildfly"}}}

See the below attachment for such a jboss-client library that can be used - just rename .zip to .jar (GitHub does not allow .jar uploads but does allow .zip...)

jboss-client.zip

Fixes #469

Question/TODO: support uploading client libraries through an API handler, similar to client certificates?

Allows end user to add a client library, ex. jboss-client.jar, to
support other connection protocols over JMX like Wildfly HTTP-remoting.
SaslException is thrown for auth failures on these connections
@andrewazores andrewazores force-pushed the connect-client-libs branch from f59df84 to dbe2ef6 Compare May 25, 2021 19:17
@andrewazores andrewazores force-pushed the connect-client-libs branch from dbe2ef6 to b694892 Compare May 25, 2021 21:02
@andrewazores andrewazores marked this pull request as ready for review May 25, 2021 21:25
@andrewazores andrewazores requested a review from ebaron May 25, 2021 21:25
Copy link
Member

@ebaron ebaron left a comment

Choose a reason for hiding this comment

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

Seems to work as expected

@ebaron ebaron merged commit f7dc847 into cryostatio:main May 26, 2021
@andrewazores andrewazores deleted the connect-client-libs branch May 31, 2021 14:04
aali309 pushed a commit to aali309/cryostat-legacy that referenced this pull request Jul 22, 2024
)

* build container image in CI, therefore enabling container-only itests

* enable test case in CI

* fix incorrect return of String-encoded Optional

* remove outdated event types

* update TargetConnectionManager event types

* rename and enable match expression events
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support other protocols than RMI
2 participants