Class ResourceCertificateProvider.Config

java.lang.Object
io.micronaut.http.ssl.ResourceCertificateProvider.Config
All Implemented Interfaces:
Named
Enclosing class:
ResourceCertificateProvider

@EachProperty("micronaut.certificate.resource") public static final class ResourceCertificateProvider.Config extends Object
Configuration for resource-based certificate material. Supports JKS/PKCS12 and PEM.
  • Constructor Details

  • Method Details

    • getResource

      @NonNull public @NonNull String getResource()
      Micronaut resource location of the certificate material to load, for example classpath:certs/server.p12 or file:/etc/ssl/server.pem. The actual format and password handling are controlled by the common properties in AbstractCertificateFileConfig (e.g. format, password).
      Returns:
      the resource location of the certificate material
    • setResource

      public void setResource(@NonNull @NonNull String resource)
      Micronaut resource location of the certificate material to load, for example classpath:certs/server.p12 or file:/etc/ssl/server.pem. The actual format and password handling are controlled by the common properties in AbstractCertificateFileConfig (e.g. format, password).
      Parameters:
      resource - the resource location of the certificate material
    • getName

      @NonNull public @NonNull String getName()
      Specified by:
      getName in interface Named
      Returns:
      The name of the component
    • getFormat

      Explicit format of the certificate material. If not set, Micronaut will first try to load the file as a key store (JKS/PKCS12) and, if that fails, as PEM. A separate certificatePath can only be used with PEM.
      Returns:
      the certificate file format or null to auto-detect
    • setFormat

      public void setFormat(@Nullable FileCertificateProvider.Format format)
      Explicit format of the certificate material. If not set, Micronaut will first try to load the file as a key store (JKS/PKCS12) and, if that fails, as PEM. A separate certificatePath can only be used with PEM.
      Parameters:
      format - the certificate file format or null to auto-detect
    • getPassword

      @Nullable public @Nullable String getPassword()
      Password used to open the key store (JKS/PKCS12) or decrypt PEM private keys, if required.
      Returns:
      the password or null if not required
    • setPassword

      public void setPassword(@Nullable @Nullable String password)
      Password used to open the key store (JKS/PKCS12) or decrypt PEM private keys, if required.
      Parameters:
      password - the password or null if not required