Home

Awesome

<a href="http://www.parallec.io"><img alt="Parallec-logo" src="http://www.parallec.io/images/parallec-logo.png" width="325"></a>

Parallec Plugins

parallec-clientauth

SSL Client Authentication Plug-in for Parallec. One line to help you set the SSL context for Client Authentication. Import it and add the jks file and the text file containing the private key pass to userdata folder. You will be good to go with. You may also provide customized absolute or relative path to load the keystore.

###Maven/Gradle Import Along with your parallec import, also add: #####Maven

<dependency>
	<groupId>io.parallec</groupId>
	<artifactId>parallec-plugin-http-clientauth</artifactId>
	<version>0.9.0</version>
</dependency>

#####Gradle

compile 'io.parallec:parallec-plugin-http-clientauth:0.9.0'

###Versions

##How to use

  1. Add the .jks file and rename it to "keystore.jks" ; Add a text file only containing the passphrase for the private key and rename it to "keypass"; Put both file under userdata folder in your project directory

  2. Insert this line after initializing the ParallelClient instance before using it:

ParallelClient pc= new ParallelClient();
ClientAuthAdaptor.getInstance().enableClientAuth(pc);

If need to overload the path, please call the same function with additional path parameters (absolute or relative path to project).

ParallelClient pc= new ParallelClient();
ClientAuthAdaptor.getInstance().enableClientAuth(parallec,
	    		"/Users/yourname/git/parallec/userdata/keypass",
	    		"/Users/yourname/git/parallec/userdata/keystore.jks"
	    		); // mutual auth with customized path

####Change Algorithm

Default algorithm is "TLS". Review available algorithms here.

The same API with different arguments can change the algorithm too. Details please refer to the javadoc.

enableClientAuth(ParallelClient pc, String algorithm) 


enableClientAuth(ParallelClient pc,
            String privKeyPasshraseFilePath, String keystoreFilePath,
            String algorithm, boolean verifyServerCert)

###Shutdown HttpClientFactory

The enableClientAuth will automatic create the Async HTTP Client factory which loads the key pairs. If need to close the clients, call

ClientAuthAdaptor.getInstance().shutdown();

For more details please check: src/main/java/io/parallec/plugin/http/clientauth/ClientAuthAdaptor.java

Author and Contributors

Original Author

Yuanteng (Jeff) Pei

Contributors

Your name here

Thanks for trying Parallec.io. Please submit a git issue for any questions you have.

Licenses

Code licensed under Apache License v2.0

© 2015 eBay Software Foundation