Add "service" authMode to jolokia-osgi #358
Provides the capability to enable "authMode=service" in
If "authMode=service" is enabled, authentication only succeeds if
The initial idea was presented here:
Signed-off-by: Ryan Goulding email@example.com
Provides the capability to enable "authMode=service" in org.jolokia.osgi.cfg. This authentication mode provides the ability to monitor the OSGi service registry for custom implementations of the Authenticator interface, resulting in delegation of authentication to third party implementations. This is particularly useful for integrating jolokia into an existing OSGi project. If "authMode=service" is enabled, authentication only succeeds if every implementation of Authenticator.authenticate(...) returns true. If no implementations are provided, then authentication fails (i.e., the system defaults to fail-closed). The initial idea was presented here: #225 Signed-off-by: Ryan Goulding <firstname.lastname@example.org>
…rvice-all" service-any: A single Authenticator is enough to succeed service-all: All Authenticator services need to be positive Also, switched "Authenticator" from an abstract base class to an interface. So existing code might need a recompile, not sure. But since the security package was not exposed previously, I don't think this is an issue.
@ryandgoulding I updated the PR a bit to support the authmodes "service-all" and "service-any" and switched to Authenticator to be an interface. I hope that's ok and doesnt imply to many changes on your side.
Thanks again for all your patience and sorry for the so long delay. I'm going to make a release today or tomorrow, so stay tuned ;-)