Class CredHubCertificateTemplate
java.lang.Object
org.springframework.credhub.core.certificate.CredHubCertificateTemplate
- All Implemented Interfaces:
CredHubCertificateOperations
Implements the interactions with CredHub to retrieve, regenerate, and update
certificates.
- Author:
- Scott Frederick
-
Constructor Summary
ConstructorsConstructorDescriptionCredHubCertificateTemplate(CredHubOperations credHubOperations) Create a newCredHubCertificateTemplate. -
Method Summary
Modifier and TypeMethodDescriptiongetAll()Retrieve all certificates from CredHub.getByName(CredentialName name) Retrieve a certificate using its name.regenerate(String id, boolean setAsTransitional) Regenerate a certificate.regenerate(CredentialName certificateName) Regenerate all certificates in CredHub that were signed by the specified certificate.updateTransitionalVersion(String id, String versionId) Make the specified version of a certificate the transitional version.
-
Constructor Details
-
CredHubCertificateTemplate
Create a newCredHubCertificateTemplate.- Parameters:
credHubOperations- theCredHubOperationsto use for interactions with CredHub
-
-
Method Details
-
getAll
Description copied from interface:CredHubCertificateOperationsRetrieve all certificates from CredHub.- Specified by:
getAllin interfaceCredHubCertificateOperations- Returns:
- a collection of certificates
-
getByName
Description copied from interface:CredHubCertificateOperationsRetrieve a certificate using its name.- Specified by:
getByNamein interfaceCredHubCertificateOperations- Parameters:
name- the name of the certificate credential; must not be null- Returns:
- the details of the retrieved certificate credential
-
regenerate
Description copied from interface:CredHubCertificateOperationsRegenerate a certificate.- Specified by:
regeneratein interfaceCredHubCertificateOperations- Parameters:
id- the CredHub-generated ID of the certificate credential; must not be null and must be an ID returned byCredHubCertificateOperations.getAll()orCredHubCertificateOperations.getByName(CredentialName)setAsTransitional-trueto mark the certificate version transitional;falseotherwise- Returns:
- the details of the certificate credential
-
regenerate
Description copied from interface:CredHubCertificateOperationsRegenerate all certificates in CredHub that were signed by the specified certificate.- Specified by:
regeneratein interfaceCredHubCertificateOperations- Parameters:
certificateName- the name of the signing certificate credential; must not be null- Returns:
- the names of all regenerated certificate credentials
-
updateTransitionalVersion
Description copied from interface:CredHubCertificateOperationsMake the specified version of a certificate the transitional version.- Specified by:
updateTransitionalVersionin interfaceCredHubCertificateOperations- Parameters:
id- the CredHub-generated ID of the certificate credential; must not be null and must be an ID returned byCredHubCertificateOperations.getAll()orCredHubCertificateOperations.getByName(CredentialName)versionId- the CredHub-generated ID of the version of the certificate credential that should be marked transitional, or null to indicate that no version is transitional- Returns:
- the details of the certificate credential, including all versions
-