Package pl.edu.icm.unity.engine.api
Interface PKIManagement
-
public interface PKIManagementProvides access to PKI related stores: credentials, certificates and truststores (validators).Currently it is read only and implementation is based on FS stored data. In future it will be enhanced to support DB-stored data with possibility to add/remove contents.
Single exception are certificates. It is possible to managed (add/remove) them at runtime, however the current implementation is in memory only, i.e. all changes are lost after restart. Again this will be refactored in future.
- Author:
- K. Benedyczak
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidaddPersistedCertificate(NamedCertificate toAdd)Adds a new persisted certificatevoidaddVolatileCertificate(String name, X509Certificate updated)Adds a new volatile certificateSet<String>getAllCertificateNames()NamedCertificategetCertificate(String name)eu.emi.security.authn.x509.X509CredentialgetCredential(String name)Set<String>getCredentialNames()eu.unicore.security.canl.IAuthnAndTrustConfigurationgetMainAuthnAndTrust()List<NamedCertificate>getPersistedCertificates()eu.emi.security.authn.x509.X509CertChainValidatorExtgetValidator(String name)Set<String>getValidatorNames()List<NamedCertificate>getVolatileCertificates()voidloadCertificatesFromConfigFile()voidremoveCertificate(String toRemove)Removes a given certificatevoidupdateCertificate(NamedCertificate toUpdate)Updates a given certificate
-
-
-
Method Detail
-
getCredentialNames
Set<String> getCredentialNames() throws EngineException
- Returns:
- set with available credential names
- Throws:
EngineException
-
getCredential
eu.emi.security.authn.x509.X509Credential getCredential(String name) throws EngineException
- Parameters:
name-- Returns:
- credential by name
- Throws:
EngineException
-
getValidatorNames
Set<String> getValidatorNames() throws EngineException
- Returns:
- set of available validators
- Throws:
EngineException
-
getValidator
eu.emi.security.authn.x509.X509CertChainValidatorExt getValidator(String name) throws EngineException
- Parameters:
name-- Returns:
- validator by name
- Throws:
EngineException
-
getMainAuthnAndTrust
eu.unicore.security.canl.IAuthnAndTrustConfiguration getMainAuthnAndTrust()
- Returns:
- method allows to quickly get
IAuthnAndTrustConfigurationof the main server.
-
getAllCertificateNames
Set<String> getAllCertificateNames() throws EngineException
- Returns:
- set with available certificate names
- Throws:
EngineException
-
getCertificate
NamedCertificate getCertificate(String name) throws EngineException
- Parameters:
name-- Returns:
- certificate by name
- Throws:
EngineException
-
addVolatileCertificate
void addVolatileCertificate(String name, X509Certificate updated) throws EngineException
Adds a new volatile certificate- Parameters:
name-updated-- Throws:
EngineException
-
getVolatileCertificates
List<NamedCertificate> getVolatileCertificates() throws EngineException
- Returns:
- set with available volatile certificates
- Throws:
EngineException
-
addPersistedCertificate
void addPersistedCertificate(NamedCertificate toAdd) throws EngineException
Adds a new persisted certificate- Parameters:
toAdd-- Throws:
EngineException
-
getPersistedCertificates
List<NamedCertificate> getPersistedCertificates() throws EngineException
- Returns:
- set with available persisted certificates
- Throws:
EngineException
-
removeCertificate
void removeCertificate(String toRemove) throws EngineException
Removes a given certificate- Parameters:
toRemove-- Throws:
EngineException
-
updateCertificate
void updateCertificate(NamedCertificate toUpdate) throws EngineException
Updates a given certificate- Parameters:
toRemove-- Throws:
EngineException
-
loadCertificatesFromConfigFile
void loadCertificatesFromConfigFile()
-
-