Parallec Plugin: Single Line of Code to Enable SSL Client (Mutual) Authentication.
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.


Parallec Plugins


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



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


  • The latest production-ready version is 0.9.x, where we use in production.
  • On async-http-client 2.x The Parallec plugin version using more up-to-date async-http-client (currently using AHC version 2.0.15) is 0.20.0-SNAPSHOT. This version requires JDK8 due to AHC 2.x and should be used with the parallec-core with the same version 0.20.0-SNAPSHOT, details please check #37.

##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();

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();
	    		); // 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


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

Author and Contributors

Original Author

Yuanteng (Jeff) Pei


Your name here

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


Code licensed under Apache License v2.0

© 2015 eBay Software Foundation