This is the root of the Java HTTP Client Provider that is solving some certificate and base URI issues in our tests. Visit the Readme in the repo root for more information about the project in general.
- Either download manually the .jar from the packages or use Maven Central.
- Create a ApacheHttpClientProvider instance using the
constructor supporting host overrides:
ApacheHttpClientProvider(final String vaultUrl, final Function<URI, URI> authorityOverrideFunction)
. Example - Use your
ApacheHttpClientProvider
to obtain your key/secret/crypto clients. - Done.
In case you don't wish to use this provider, it is perfectly fine. Simply make sure to use the same steps to mimic what it does:
- Set any basic credentials (Lowkey Vault will check whether they are there but ignore the value.)
- Route your requests to the port used by your Lowkey Vault instance
- Make sure that the host headers or the actual URLs used by your client contain the host and port expected by Lowkey Vault
- Accept the self-signed certificate used by Lowkey-Vault in your HTTP client.