Class SelfSignedCertificateProvider.Config

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

@EachProperty("micronaut.certificate.self-signed") public static final class SelfSignedCertificateProvider.Config extends Object implements Named
Certificate provider that creates self-signed certificates using netty-pkitesting.
  • Constructor Details

  • Method Details

    • getName

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

      @NonNull public io.netty.pkitesting.CertificateBuilder.Algorithm getAlgorithm()
      Algorithm used to generate the self-signed key pair and certificate (e.g. RSA, EC). Controls the cryptographic parameters used by CertificateBuilder. Defaults to rsa4096.
      Returns:
      the certificate generation algorithm
    • setAlgorithm

      public void setAlgorithm(@NonNull io.netty.pkitesting.CertificateBuilder.Algorithm algorithm)
      Algorithm used to generate the self-signed key pair and certificate (e.g. RSA, EC). Controls the cryptographic parameters used by CertificateBuilder. Defaults to rsa4096.
      Parameters:
      algorithm - the certificate generation algorithm
    • getSubject

      @NonNull public @NonNull String getSubject()
      X.500 subject distinguished name for the generated certificate, for example CN=localhost. This value is passed to the certificate builder and becomes the certificate's subject. Defaults to CN=localhost.
      Returns:
      the subject DN for the certificate
    • setSubject

      public void setSubject(@NonNull @NonNull String subject)
      X.500 subject distinguished name for the generated certificate, for example CN=localhost. This value is passed to the certificate builder and becomes the certificate's subject. Defaults to CN=localhost.
      Parameters:
      subject - the subject DN for the certificate
    • getUpdateInterval

      @NonNull public @NonNull Duration getUpdateInterval()
      Interval at which a new self-signed certificate is generated and emitted. Used to schedule periodic regeneration via a fixed-rate task so updated material is picked up automatically. Defaults to 1 day.
      Returns:
      the certificate regeneration interval
    • setUpdateInterval

      public void setUpdateInterval(@NonNull @NonNull Duration updateInterval)
      Interval at which a new self-signed certificate is generated and emitted. Used to schedule periodic regeneration via a fixed-rate task so updated material is picked up automatically. Defaults to 1 day.
      Parameters:
      updateInterval - the certificate regeneration interval
    • getLifetime

      @NonNull public @NonNull Duration getLifetime()
      Validity period of the generated certificate. The certificate's notAfter is set to now plus this duration when building the self-signed certificate. Defaults to 7 days.
      Returns:
      the certificate lifetime
    • setLifetime

      public void setLifetime(@NonNull @NonNull Duration lifetime)
      Validity period of the generated certificate. The certificate's notAfter is set to now plus this duration when building the self-signed certificate. Defaults to 7 days.
      Parameters:
      lifetime - the certificate lifetime