Package io.micronaut.acme
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.
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
Base class for configuration classes.static class
Allows the configuration of the Acme certificate authentication process.static enum
Defines the type of valid challenges.static class
Allows the configuration of the Acme certificate ordering process. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescription@NonNull @NotBlank @NotNull String
Account key used to authenticate with the ACME server.@NonNull @NotBlank @NotNull String
Gets the acme server to authenticate and order the certificate from.getAuth()
Get authentication configuration.@NonNull File
Gets the location to save the certificate on disk to.Get the challenge type to be used to validate the account.@NonNull @NotBlank @NotNull String
Key in which to be used to generate the CSR which will be used to order the certificate from the ACME server.Gets the domain(s) in which the certificate will be ordered for.Gets the current http challenge server port.getOrder()
Get order configuration.@NonNull Duration
Get the duration in which you would like to renew the certificate within.Gets the timeout that has been set when calling an acme server.boolean
If acme certificate background and setup process should be enabled.boolean
Get whether or not you agree to the terms of service for ACME services to work.void
setAccountKey
(@NonNull String accountKey) Sets the account key used for authentication.void
setAcmeServer
(@NonNull String acmeServer) Sets the acme server to authenticate and order the certificate from.void
Set authentication configuration.void
setCertLocation
(@NonNull File certLocation) Sets the location to save the certificate on disk to.void
setChallengeType
(AcmeConfiguration.ChallengeType challengeType) Set the challenge type to be used to validate the account.void
setDomainKey
(@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.void
setDomains
(List<String> domains) Sets the domain(s) in which to order the certificate for.void
setEnabled
(boolean enabled) Sets if acme certificate backgroun and setup process is enabled.void
setHttpChallengeServerPort
(Integer httpChallengeServerPort) Sets the port to start the http challenge server on.void
Set the order configuration.void
setRenewWitin
(@NonNull Duration renewWitin) Sets the duration in which the application will trigger the renew process to get a new certificate.void
setTimeout
(Duration timeout) Sets the timeout for requests made to the acme server.void
setTosAgree
(boolean tosAgree) Sets whether or not you agree to the terms of service.
-
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 interfaceio.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
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
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
Get the duration in which you would like to renew the certificate within. Default 30 days.- Returns:
- the renew within duration
-
setRenewWitin
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
Set the order configuration.- Parameters:
order
- order configuration
-
getAuth
Get authentication configuration.- Returns:
- auth configuration
-
setAuth
Set authentication configuration.- Parameters:
auth
- authentication configuration
-
getAccountKey
Account key used to authenticate with the ACME server.- Returns:
- the account key string
-
setAccountKey
Sets the account key used for authentication.- Parameters:
accountKey
- account key 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
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
Gets the location to save the certificate on disk to.- Returns:
- location to certificate
-
setCertLocation
Sets the location to save the certificate on disk to.- Parameters:
certLocation
- location to certificate
-
getAcmeServer
Gets the acme server to authenticate and order the certificate from.- Returns:
- url of the acme server
-
setAcmeServer
Sets the acme server to authenticate and order the certificate from.- Parameters:
acmeServer
- url of acme server
-
getChallengeType
Get the challenge type to be used to validate the account. DefaultDEFAULT_CHALLENGE_TYPE
.- Returns:
- the challenge type
-
setChallengeType
Set the challenge type to be used to validate the account.- Parameters:
challengeType
- challenge type to be used
-
getHttpChallengeServerPort
Gets the current http challenge server port.- Returns:
- http challenge server port
-
setHttpChallengeServerPort
Sets the port to start the http challenge server on.- Parameters:
httpChallengeServerPort
- expected http challenge server port
-
getTimeout
Gets the timeout that has been set when calling an acme server. Default- Returns:
- timeout
-
setTimeout
Sets the timeout for requests made to the acme server.- Parameters:
timeout
- http request timeout
-