public KeyManagementService
The KMS is responsible for storing and using private keys to sign things. An implementation of this may, for example, call out to a hardware security module that enforces various auditing and frequency-of-use requirements.
The current interface is obviously not usable for those use cases: this is just where we'd put a real signing interface if/when one is developed.
Modifier and Type | Interface and Description |
---|---|
static class |
KeyManagementService.DefaultImpls
The KMS is responsible for storing and using private keys to sign things. An implementation of this may, for example,
call out to a hardware security module that enforces various auditing and frequency-of-use requirements.
|
Modifier and Type | Method and Description |
---|---|
java.security.KeyPair |
freshKey()
Generates a new random key and adds it to the exposed map.
|
java.util.Map<java.security.PublicKey,java.security.PrivateKey> |
getKeys()
Returns a snapshot of the current pubkey->privkey mapping.
|
java.security.KeyPair |
toKeyPair(java.security.PublicKey publicKey) |
java.security.KeyPair |
toKeyPair(java.lang.Iterable<? extends java.security.PublicKey> publicKeys)
Returns the first KeyPair matching any of the publicKeys
|
java.security.PrivateKey |
toPrivate(java.security.PublicKey publicKey) |
java.util.Map<java.security.PublicKey,java.security.PrivateKey> getKeys()
Returns a snapshot of the current pubkey->privkey mapping.
java.security.PrivateKey toPrivate(java.security.PublicKey publicKey)
java.security.KeyPair toKeyPair(java.security.PublicKey publicKey)
java.security.KeyPair toKeyPair(java.lang.Iterable<? extends java.security.PublicKey> publicKeys)
Returns the first KeyPair matching any of the publicKeys
java.security.KeyPair freshKey()
Generates a new random key and adds it to the exposed map.