Package pl.edu.icm.unity.engine.api
Interface PKIManagement
public interface PKIManagement
Provides 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
Modifier and TypeMethodDescriptionvoid
Adds a new persisted certificatevoid
addVolatileCertificate
(String name, X509Certificate updated) Adds a new volatile certificategetCertificate
(String name) eu.emi.security.authn.x509.X509Credential
getCredential
(String name) eu.unicore.security.canl.IAuthnAndTrustConfiguration
eu.emi.security.authn.x509.X509CertChainValidatorExt
getValidator
(String name) void
void
removeCertificate
(String toRemove) Removes a given certificatevoid
updateCertificate
(NamedCertificate toUpdate) Updates a given certificate
-
Method Details
-
getCredentialNames
- Returns:
- set with available credential names
- Throws:
EngineException
-
getCredential
- Parameters:
name
-- Returns:
- credential by name
- Throws:
EngineException
-
getValidatorNames
- 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
IAuthnAndTrustConfiguration
of the main server.
-
getAllCertificateNames
- Returns:
- set with available certificate names
- Throws:
EngineException
-
getCertificate
- Parameters:
name
-- Returns:
- certificate by name
- Throws:
EngineException
-
addVolatileCertificate
Adds a new volatile certificate- Parameters:
name
-updated
-- Throws:
EngineException
-
getVolatileCertificates
- Returns:
- set with available volatile certificates
- Throws:
EngineException
-
addPersistedCertificate
Adds a new persisted certificate- Parameters:
toAdd
-- Throws:
EngineException
-
getPersistedCertificates
- Returns:
- set with available persisted certificates
- Throws:
EngineException
-
removeCertificate
Removes a given certificate- Parameters:
toRemove
-- Throws:
EngineException
-
updateCertificate
Updates a given certificate- Parameters:
toRemove
-- Throws:
EngineException
-
loadCertificatesFromConfigFile
void loadCertificatesFromConfigFile()
-