Class OracleCloudCertificateFetcher

java.lang.Object
io.micronaut.oraclecloud.certificates.services.OracleCloudCertificateFetcher

@Internal @Singleton @Requires(classes=com.oracle.bmc.certificates.Certificates.class) @Requires(beans=com.oracle.bmc.certificates.Certificates.class) public class OracleCloudCertificateFetcher extends Object
Fetches certificates and private keys from Oracle Cloud Infrastructure (OCI) Certificates service and converts them into CertificateEvent instances consumable by Micronaut SSL infrastructure.

This component is intended for internal use and is compatible with the bootstrap context.

  • Constructor Details

    • OracleCloudCertificateFetcher

      public OracleCloudCertificateFetcher(com.oracle.bmc.certificates.Certificates certificates)
      Creates a new fetcher that uses the provided OCI Certificates client.
      Parameters:
      certificates - OCI Certificates client builder.
  • Method Details

    • retrieveCertificate

      public CertificateEvent retrieveCertificate(String certificateId, Long versionNumber, String certificateVersionName) throws CertificateException
      Retrieves a certificate bundle (including private key) from OCI and converts it into a CertificateEvent.
      Parameters:
      certificateId - The OCID of the certificate to retrieve. Required.
      versionNumber - The specific version number of the certificate to retrieve. Optional; may be null.
      certificateVersionName - The named version of the certificate to retrieve. Optional; may be null.
      Returns:
      An Optional containing the resulting CertificateEvent if retrieval succeeds; otherwise empty.
      Throws:
      CertificateException - If the certificate content cannot be parsed.