first, thanks for a great project.
The idea of a plugable Autheticator was proposed and considered a while back in #664 and the comment resonated then. I guess it still does.
https://github.com/prometheus/jmx_exporter/issues/664#issuecomment-995943112 My use case is in a container, where the classPath is locked down and the file system is readonly. It is a low risk classloading environment.
for some context:
my jvm running a broker has the jolokia agent with a plugable Authenticator that delegates to JAAS. ideally I would be able to use the same Authenticator with this lovely prometheus exporter, but alas not at this time.
my jolokia config has property:
authClass=[org.apache.activemq.artemis.spi.core.security.jaas.HttpServerAuthenticator](
https://github.com/apache/activemq-artemis/blob/main/artemis-server/src/main/java/org/apache/activemq/artemis/spi/core/security/jaas/HttpServerAuthenticator.java)
This allows Artemis to do the RBAC of the https endpoint based in the client cert in a convenient way. Access the jvm mbean server is restricted to authenticated users.
Is it worth working up a PR to make this possible? i.e: adding config to specify the class of Authenticator to dynamically load?