public interface KeyStoreService extends OpssServiceInstance
Modifier and Type | Interface and Description |
---|---|
static class |
KeyStoreService.KEYSTORE_ATTRIBUTE |
OpssServiceInstance.State
JpsPersistable.Mode
Modifier and Type | Method and Description |
---|---|
void |
createKeyStore(java.lang.String stripeName, java.lang.String keystoreName, java.security.KeyStore.ProtectionParameter protParam, KeyStoreProperties props)
This method creates a key store using the given keystore name, within the stripe name.
|
void |
deleteKeyStore(java.lang.String stripeName, java.lang.String keystoreName, java.security.KeyStore.ProtectionParameter protParam)
This method deletes an existing keystore.
|
java.security.KeyStore |
getDomainTrustStore()
This method gets a handle to the domain level trust store stored in FKS.
|
java.security.KeyStore |
getKeyStore(java.lang.String kssUri, java.security.KeyStore.ProtectionParameter protParam)
This method gets a handle to a given keystore stored in KSS.
|
java.security.KeyStore |
getKeyStore(java.lang.String stripeName, java.lang.String keystoreName, java.security.KeyStore.ProtectionParameter protParam)
This method gets a handle to a given keystore stored in FKS.
|
java.lang.Object |
getKeyStoreAttribute(java.lang.String kssUri, KeyStoreService.KEYSTORE_ATTRIBUTE attr)
This method returns the specific attribute of a given key store within a stripe
|
java.lang.Object |
getKeyStoreAttribute(java.lang.String stripeName, java.lang.String keystoreName, KeyStoreService.KEYSTORE_ATTRIBUTE attr)
This method returns the specific attribute of a given key store within a stripe
|
java.util.Map<java.lang.String,java.lang.String> |
getProperties()
Returns the configured properties for this instance
|
java.lang.String[] |
listKeyStores(java.lang.String stripeName)
This method lists all the keystores within the given stripe.
|
getState
accept, getName, getServiceProvider
persist, refresh
java.util.Map<java.lang.String,java.lang.String> getProperties()
void createKeyStore(java.lang.String stripeName, java.lang.String keystoreName, java.security.KeyStore.ProtectionParameter protParam, KeyStoreProperties props) throws KeyStoreServiceException, java.security.AccessControlException
stripeName
- Name of the stripe within which keystore is createdkeystoreName
- name of the keystore. Must be unique within this stripeprotParam
- Protection parameter for this keystore. Usually a password.props
- Additional keystore properties. eg. if permission protected is set to false, the keystore is also protected by password. The HSM property is ignored.KeyStoreServiceException
- if invalid stripe/keystore name or invalid password is passed.java.security.AccessControlException
void deleteKeyStore(java.lang.String stripeName, java.lang.String keystoreName, java.security.KeyStore.ProtectionParameter protParam) throws KeyStoreServiceException, java.security.AccessControlException
stripeName
- Name of the stripe within which keystore is deletedkeystoreName
- Name of the keystore to be deletedprotParam
- Protection parameter for this keystore to be used for verification. Usually a password. This parameter is ignored if the keystore is only permission protectedKeyStoreServiceException
- if invalid stripe/keystore name is passed, if protParam is incorrect, if keystore does not exist.java.security.AccessControlException
java.lang.String[] listKeyStores(java.lang.String stripeName) throws KeyStoreServiceException, java.security.AccessControlException
stripeName
- name of the stripe whose keystores need to be listed. Use "*" as wildcard to specify all stripesKeyStoreServiceException
- if invalid or non-existent stripe is passed.java.security.AccessControlException
java.security.KeyStore getDomainTrustStore() throws KeyStoreServiceException, java.security.AccessControlException
KeyStoreServiceException
- if domain trust store does not exist in the Farm Key Store.java.security.AccessControlException
java.security.KeyStore getKeyStore(java.lang.String stripeName, java.lang.String keystoreName, java.security.KeyStore.ProtectionParameter protParam) throws KeyStoreServiceException, java.security.AccessControlException
stripeName
- Name of the stripekeystoreName
- Name of the keystore to be loadedprotParam
- Protection parameter for this keystore (usually a password). This parameter is ignored for keystore that is only permission protectedKeyStoreServiceException
- if invalid stripe/keystore name is passed, if invalid protParam is passed, if the keystore does not exist.java.security.AccessControlException
java.security.KeyStore getKeyStore(java.lang.String kssUri, java.security.KeyStore.ProtectionParameter protParam) throws KeyStoreServiceException, java.security.AccessControlException
kssUri
- KSS URI indicating the stripe and key store to be loaded. The URI format is "kss://<stripe>/<keystore>" kss://system/trust - valid URI kss:/system/trust - invalid URI kss://systemtrust - invalid URIprotParam
- Protection parameter for this keystore (usually a password). This parameter is ignored for keystore that is only permission protectedKeyStoreServiceException
- if invalid kss URI is passed, if invalid protParam is passed, if the keystore does not exist.java.security.AccessControlException
java.lang.Object getKeyStoreAttribute(java.lang.String stripeName, java.lang.String keystoreName, KeyStoreService.KEYSTORE_ATTRIBUTE attr) throws KeyStoreServiceException, java.security.AccessControlException
stripeName
- Name of the stripekeystoreName
- Name of the keystoreattr
- Keystore attribute to be returnedKeyStoreServiceException
- if invalid stripe/keystore name is passed, if the keystore does not exist.java.security.AccessControlException
java.lang.Object getKeyStoreAttribute(java.lang.String kssUri, KeyStoreService.KEYSTORE_ATTRIBUTE attr) throws KeyStoreServiceException, java.security.AccessControlException
kssUri
- KSS URI indicating the stripe and key store to be loaded. The URI format is "kss://<stripe>/<keystore>" kss://system/trust - valid URI kss:/system/trust - invalid URI kss://systemtrust - invalid URIattr
- Keystore attribute to be returnedKeyStoreServiceException
- if invalid kss URI is passed, if the keystore does not exist.java.security.AccessControlException