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
Allow custom authenticator to be added via configuration #115
Conversation
…t required config parameters can be passed to custom authenticator
Any chance this can make next minor release :)? How can I help this to get integrated? |
Looks fine, thanks a lot ! I'll apply the pull request ASAP, assuming that APL as license is ok for you. BTW, in the initial description it is mentioned, that a customer authenticator gets a |
BTW, sorry for the delay, I'm super busy nowadays. But I will push out a 1.1.4-SNAPSHOT this week with this change applied. |
No worries, just checking in :). Re Configuration: Implementation will try two constructors, first it will try to find constructor that takes Configuration, if there is none it will fall back to default (no-arg) constructor. |
Ah, ok. Overlooked this. Could you do me a favor and add this configuration parameter to |
Sure thing, I will add this in couple of hours |
Done |
Thanks a lot, I will apply the pull request ASAP. You can expect a 1.1.4 release this weekend probably, worst case is end of next week. |
Cool, thanks |
Allow custom authenticator to be added via configuration
Thanks again. Hopefully this weekend I've more time in order to prepare a release. |
FYI, I'm about to release 1.3.1 today and for consistencies sake I renamed 'authenticationClass' to 'authClass' as parameter. I hope this does not provide you any issues when doing upgrades. If this is a stumbling block, though, I can introduce this parameter back as a fallback (but would like to avoid this to keep the code base clean). |
Introduce new configuration parameter (authenticatorClass) that is used to specify custom authenticator class. This authenticator class will be found, instance will be created (if class has a constructor that takes Configuration as parameter, jolokia runtime configuration will be provided, allowing authenticator to take it into account). Newly created instance of authenticator will be set for Jolokia server to use. If authenticatorClass config parameter was not provided, code will fall back to old logic (i.e. check if user/password is set and create default authenticator).
This pull request also adds a ugly looking code into copyResourceToTemp method of JvmAgentConfigTest with the main goal of properly escaping paths used in tests when they are run win (tested on win7).