mTLS with HSM in RestClient #48184
-
As discussed in #39749 setting a custom SSLContext is not supported. The only option to perform mTLS with the Quarkus RestClient seems to be to have soft keys available in a file-based keystore. I have a number of use-cases, where that is not a viable solution unfortunately because either the keys reside in some kind of HSM (e.g. via PKCS#11 or a proprietary JCE Provider) or some form of Key Management System that also does not expose private keys in plaintext. Is there any way to use the Quarkus RestClient within these requirements? Since both KeyStore lookups as well as private-key-operations (esp. sign) perform some form of IO, is there even a chance this will be supported some day? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 6 replies
-
Perhaps the I don''t know if it can work, but with enabling a specific SunPKCS11 configuration (https://quarkus.io/guides/security-customization#sun-pkcs11), and, I guess, setting a keystore provider type to May be worth creating a branch and experimenting against one of the HSMs that must be supported |
Beta Was this translation helpful? Give feedback.
Perhaps the
provider
property for a given keystore type such as https://quarkus.io/guides/tls-registry-reference#quarkus-tls-registry_quarkus-tls-key-store-p12-provider should help to get keys fetched from the external key storage but using the KeyStore API.I don''t know if it can work, but with enabling a specific SunPKCS11 configuration (https://quarkus.io/guides/security-customization#sun-pkcs11), and, I guess, setting a keystore provider type to
SunPKCS11
, it might work. But, REST Client may have to be enhanced to be able to load from anull
keystore, for example, if the key store location is set to anull
string.May be worth creating a branch and experimenting against one of the HS…