Class AcmeConfiguration

java.lang.Object
io.micronaut.acme.AcmeConfiguration
All Implemented Interfaces:
io.micronaut.core.util.Toggleable

@ConfigurationProperties("acme") public class AcmeConfiguration extends Object implements io.micronaut.core.util.Toggleable
Allows the configuration of the Acme certificate process.
  • Constructor Details

    • AcmeConfiguration

      public AcmeConfiguration()
  • Method Details

    • isEnabled

      public boolean isEnabled()
      If acme certificate background and setup process should be enabled.
      Specified by:
      isEnabled in interface io.micronaut.core.util.Toggleable
      Returns:
      True if acme certificate process is enabled.
    • setEnabled

      public void setEnabled(boolean enabled)
      Sets if acme certificate backgroun and setup process is enabled. Default true.
      Parameters:
      enabled - The enablement flag
    • getDomains

      @NonNull @NotEmpty @NotNull public @NonNull @NotEmpty @NotNull List<String> getDomains()
      Gets the domain(s) in which the certificate will be ordered for. This can be one to many domain names or a wildcard domain.
      Returns:
      the domain(s) name configured
    • setDomains

      public void setDomains(List<String> domains)
      Sets the domain(s) in which to order the certificate for.
      Parameters:
      domains - the domain(s) name to be requested
    • isTosAgree

      public boolean isTosAgree()
      Get whether or not you agree to the terms of service for ACME services to work.
      Returns:
      the terms of service
    • setTosAgree

      public void setTosAgree(boolean tosAgree)
      Sets whether or not you agree to the terms of service.
      Parameters:
      tosAgree - true/false if you agree to the terms of service
    • getRenewWitin

      @NonNull public @NonNull Duration getRenewWitin()
      Get the duration in which you would like to renew the certificate within. Default 30 days.
      Returns:
      the renew within duration
    • setRenewWitin

      public void setRenewWitin(@NonNull @NonNull Duration renewWitin)
      Sets the duration in which the application will trigger the renew process to get a new certificate.
      Parameters:
      renewWitin - duration before rene process started
    • getOrder

      Get order configuration.
      Returns:
      order configuration
    • setOrder

      public void setOrder(AcmeConfiguration.OrderConfiguration order)
      Set the order configuration.
      Parameters:
      order - order configuration
    • getAuth

      Get authentication configuration.
      Returns:
      auth configuration
    • setAuth

      public void setAuth(AcmeConfiguration.AuthConfiguration auth)
      Set authentication configuration.
      Parameters:
      auth - authentication configuration
    • getAccountKey

      @NonNull @NotBlank @NotNull public @NonNull @NotBlank @NotNull String getAccountKey()
      Account key used to authenticate with the ACME server.
      Returns:
      the account key string
    • setAccountKey

      public void setAccountKey(@NonNull @NonNull String accountKey)
      Sets the account key used for authentication.
      Parameters:
      accountKey - account key string
    • getDomainKey

      @NonNull @NotBlank @NotNull public @NonNull @NotBlank @NotNull String getDomainKey()
      Key in which to be used to generate the CSR which will be used to order the certificate from the ACME server.
      Returns:
      domain key string value
    • setDomainKey

      public void setDomainKey(@NonNull @NonNull String domainKey)
      Sets the key string in which to be used to generate the CSR which will be used to order the certificate from the ACME server.
      Parameters:
      domainKey - key string
    • getCertLocation

      @NonNull public @NonNull File getCertLocation()
      Gets the location to save the certificate on disk to.
      Returns:
      location to certificate
    • setCertLocation

      public void setCertLocation(@NonNull @NonNull File certLocation)
      Sets the location to save the certificate on disk to.
      Parameters:
      certLocation - location to certificate
    • getAcmeServer

      @NonNull @NotBlank @NotNull public @NonNull @NotBlank @NotNull String getAcmeServer()
      Gets the acme server to authenticate and order the certificate from.
      Returns:
      url of the acme server
    • setAcmeServer

      public void setAcmeServer(@NonNull @NonNull String acmeServer)
      Sets the acme server to authenticate and order the certificate from.
      Parameters:
      acmeServer - url of acme server
    • getChallengeType

      public AcmeConfiguration.ChallengeType getChallengeType()
      Get the challenge type to be used to validate the account. Default DEFAULT_CHALLENGE_TYPE.
      Returns:
      the challenge type
    • setChallengeType

      public void setChallengeType(AcmeConfiguration.ChallengeType challengeType)
      Set the challenge type to be used to validate the account.
      Parameters:
      challengeType - challenge type to be used
    • getHttpChallengeServerPort

      public Integer getHttpChallengeServerPort()
      Gets the current http challenge server port.
      Returns:
      http challenge server port
    • setHttpChallengeServerPort

      public void setHttpChallengeServerPort(Integer httpChallengeServerPort)
      Sets the port to start the http challenge server on.
      Parameters:
      httpChallengeServerPort - expected http challenge server port
    • getTimeout

      public Duration getTimeout()
      Gets the timeout that has been set when calling an acme server. Default
      Returns:
      timeout
    • setTimeout

      public void setTimeout(Duration timeout)
      Sets the timeout for requests made to the acme server.
      Parameters:
      timeout - http request timeout