Class SpiffeKeyManagerFactory
java.lang.Object
javax.net.ssl.KeyManagerFactorySpi
io.spiffe.provider.SpiffeKeyManagerFactory
Implementation of a
KeyManagerFactorySpi to create a KeyManager that is backed by the Workload API.
The Java Security API will call engineGetKeyManagers() to get an instance of a KeyManager.
This KeyManager instance is injected with an DefaultX509Source to obtain the latest X.509 SVIDs updates
from the Workload API.
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected KeyManager[]Default method for creating the KeyManager, uses anDefaultX509Sourceinstance that is handled by the SingletonX509SourceManagerengineGetKeyManagers(@NonNull io.spiffe.svid.x509svid.X509SvidSource x509SvidSource) Creates a new key manager and initializes it with the given X.509 SVID source.protected voidengineInit(KeyStore keyStore, char[] chars) protected voidengineInit(ManagerFactoryParameters managerFactoryParameters)
-
Constructor Details
-
SpiffeKeyManagerFactory
public SpiffeKeyManagerFactory()
-
-
Method Details
-
engineGetKeyManagers
Default method for creating the KeyManager, uses anDefaultX509Sourceinstance that is handled by the SingletonX509SourceManager- Specified by:
engineGetKeyManagersin classKeyManagerFactorySpi- Throws:
SpiffeProviderException- in case there is an error setting up the X.509 source
-
engineGetKeyManagers
public KeyManager[] engineGetKeyManagers(@NonNull @NonNull io.spiffe.svid.x509svid.X509SvidSource x509SvidSource) Creates a new key manager and initializes it with the given X.509 SVID source.- Parameters:
x509SvidSource- an instance of aX509SvidSource- Returns:
- an array with an instance of a
KeyManager
-
engineInit
- Specified by:
engineInitin classKeyManagerFactorySpi
-
engineInit
- Specified by:
engineInitin classKeyManagerFactorySpi
-