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
ConstructorDescriptionCredHubCertificateTemplate
(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
- theCredHubOperations
to use for interactions with CredHub
-
-
Method Details
-
getAll
Description copied from interface:CredHubCertificateOperations
Retrieve all certificates from CredHub.- Specified by:
getAll
in interfaceCredHubCertificateOperations
- Returns:
- a collection of certificates
-
getByName
Description copied from interface:CredHubCertificateOperations
Retrieve a certificate using its name.- Specified by:
getByName
in 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:CredHubCertificateOperations
Regenerate a certificate.- Specified by:
regenerate
in 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
-true
to mark the certificate version transitional;false
otherwise- Returns:
- the details of the certificate credential
-
regenerate
Description copied from interface:CredHubCertificateOperations
Regenerate all certificates in CredHub that were signed by the specified certificate.- Specified by:
regenerate
in 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:CredHubCertificateOperations
Make the specified version of a certificate the transitional version.- Specified by:
updateTransitionalVersion
in 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
-