Hi folks,
Do you know if Wiremock allows to load more than one keystore (and truststore) in order to make mutual authentication for more than one service in the same Wiremock instance? If not, is it possible to implement and extension?
Alessandro
t
Tom
01/20/2023, 11:00 AM
Hi @Alessandro Bramati it's not possible to load multiple keystores, but a keystore can contain many certificates so you may find that combining them all into one will do what you need.
I'll caveat that I haven't tried this
a
Alessandro Bramati
01/20/2023, 1:49 PM
Hi @Tom, thank you for the quick reply. Yes, the other solution is "merging" different keystores/truststores into one so Wiremock can load it. Any other solution?
t
Tom
01/20/2023, 1:50 PM
I can’t think of any at the moment, except if you were happy to run your own fork and update the code to read multiple stores (or create some kind of in-memory composite
KeyStore
impl).
If you’re running WireMock from your own Java code, perhaps you could programmatically assemble a single keystore file from several others before starting the server?
a
Alessandro Bramati
01/20/2023, 1:57 PM
Thanks @Tom, yes the first solution is the better one imho but I will try to merge the configured keystores into one at runtime before starting Wiremock.