public class HashiCorpVaultSigningService extends Object implements SigningService
| Constructor and Description |
|---|
HashiCorpVaultSigningService(String engineURL,
String token,
Function<String,Certificate[]> certificateStore)
Creates a new HashiCorp Vault signing service.
|
| Modifier and Type | Method and Description |
|---|---|
List<String> |
aliases()
Returns the list of key names available in the secrets engine.
|
Certificate[] |
getCertificateChain(String alias)
Returns the certificate chain for the alias specified.
|
String |
getName()
Returns the name of the service.
|
SigningServicePrivateKey |
getPrivateKey(String alias,
char[] password)
Returns the private key for the certificate alias specified.
|
byte[] |
sign(SigningServicePrivateKey privateKey,
String algorithm,
byte[] data)
Sign the data with the private key specified.
|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetPrivateKeypublic HashiCorpVaultSigningService(String engineURL, String token, Function<String,Certificate[]> certificateStore)
engineURL - the URL of the HashiCorp Vault secrets enginetoken - the HashiCorp Vault tokencertificateStore - provides the certificate chain for the keyspublic List<String> aliases() throws KeyStoreException
aliases in interface SigningServiceKeyStoreExceptionpublic Certificate[] getCertificateChain(String alias) throws KeyStoreException
SigningServicegetCertificateChain in interface SigningServicealias - the name of the certificateKeyStoreExceptionpublic String getName()
SigningServicegetName in interface SigningServicepublic SigningServicePrivateKey getPrivateKey(String alias, char[] password) throws UnrecoverableKeyException
SigningServicegetPrivateKey in interface SigningServicealias - the name of the certificatepassword - the secret required to access the keyUnrecoverableKeyExceptionpublic byte[] sign(SigningServicePrivateKey privateKey, String algorithm, byte[] data) throws GeneralSecurityException
SigningServicesign in interface SigningServiceprivateKey - the private keyalgorithm - the signing algorithm (for example SHA256withRSA)data - the data to be signedGeneralSecurityExceptionCopyright © 2012–2025. All rights reserved.