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
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
addPersistedCertificate(NamedCertificate toAdd)
Adds a new persisted certificatevoid
addVolatileCertificate(java.lang.String name, java.security.cert.X509Certificate updated)
Adds a new volatile certificatejava.util.Set<java.lang.String>
getAllCertificateNames()
NamedCertificate
getCertificate(java.lang.String name)
eu.emi.security.authn.x509.X509Credential
getCredential(java.lang.String name)
java.util.Set<java.lang.String>
getCredentialNames()
eu.unicore.security.canl.IAuthnAndTrustConfiguration
getMainAuthnAndTrust()
java.util.List<NamedCertificate>
getPersistedCertificates()
eu.emi.security.authn.x509.X509CertChainValidatorExt
getValidator(java.lang.String name)
java.util.Set<java.lang.String>
getValidatorNames()
java.util.List<NamedCertificate>
getVolatileCertificates()
void
loadCertificatesFromConfigFile()
void
removeCertificate(java.lang.String toRemove)
Removes a given certificatevoid
updateCertificate(NamedCertificate toUpdate)
Updates a given certificate
-
-
-
Method Detail
-
getCredentialNames
java.util.Set<java.lang.String> getCredentialNames() throws pl.edu.icm.unity.exceptions.EngineException
- Returns:
- set with available credential names
- Throws:
pl.edu.icm.unity.exceptions.EngineException
-
getCredential
eu.emi.security.authn.x509.X509Credential getCredential(java.lang.String name) throws pl.edu.icm.unity.exceptions.EngineException
- Parameters:
name
-- Returns:
- credential by name
- Throws:
pl.edu.icm.unity.exceptions.EngineException
-
getValidatorNames
java.util.Set<java.lang.String> getValidatorNames() throws pl.edu.icm.unity.exceptions.EngineException
- Returns:
- set of available validators
- Throws:
pl.edu.icm.unity.exceptions.EngineException
-
getValidator
eu.emi.security.authn.x509.X509CertChainValidatorExt getValidator(java.lang.String name) throws pl.edu.icm.unity.exceptions.EngineException
- Parameters:
name
-- Returns:
- validator by name
- Throws:
pl.edu.icm.unity.exceptions.EngineException
-
getMainAuthnAndTrust
eu.unicore.security.canl.IAuthnAndTrustConfiguration getMainAuthnAndTrust()
- Returns:
- method allows to quickly get
IAuthnAndTrustConfiguration
of the main server.
-
getAllCertificateNames
java.util.Set<java.lang.String> getAllCertificateNames() throws pl.edu.icm.unity.exceptions.EngineException
- Returns:
- set with available certificate names
- Throws:
pl.edu.icm.unity.exceptions.EngineException
-
getCertificate
NamedCertificate getCertificate(java.lang.String name) throws pl.edu.icm.unity.exceptions.EngineException
- Parameters:
name
-- Returns:
- certificate by name
- Throws:
pl.edu.icm.unity.exceptions.EngineException
-
addVolatileCertificate
void addVolatileCertificate(java.lang.String name, java.security.cert.X509Certificate updated) throws pl.edu.icm.unity.exceptions.EngineException
Adds a new volatile certificate- Parameters:
name
-updated
-- Throws:
pl.edu.icm.unity.exceptions.EngineException
-
getVolatileCertificates
java.util.List<NamedCertificate> getVolatileCertificates() throws pl.edu.icm.unity.exceptions.EngineException
- Returns:
- set with available volatile certificates
- Throws:
pl.edu.icm.unity.exceptions.EngineException
-
addPersistedCertificate
void addPersistedCertificate(NamedCertificate toAdd) throws pl.edu.icm.unity.exceptions.EngineException
Adds a new persisted certificate- Parameters:
toAdd
-- Throws:
pl.edu.icm.unity.exceptions.EngineException
-
getPersistedCertificates
java.util.List<NamedCertificate> getPersistedCertificates() throws pl.edu.icm.unity.exceptions.EngineException
- Returns:
- set with available persisted certificates
- Throws:
pl.edu.icm.unity.exceptions.EngineException
-
removeCertificate
void removeCertificate(java.lang.String toRemove) throws pl.edu.icm.unity.exceptions.EngineException
Removes a given certificate- Parameters:
toRemove
-- Throws:
pl.edu.icm.unity.exceptions.EngineException
-
updateCertificate
void updateCertificate(NamedCertificate toUpdate) throws pl.edu.icm.unity.exceptions.EngineException
Updates a given certificate- Parameters:
toRemove
-- Throws:
pl.edu.icm.unity.exceptions.EngineException
-
loadCertificatesFromConfigFile
void loadCertificatesFromConfigFile()
-
-