Configuring AppViewX ACME Client

This client incorporates major customizations implemented in all ACME clients provided by AppViewX, including Posh-ACME, win-acme, and Certbot.

This section explains implementation of AppViewX ACME client for Microsoft Windows and Linux.

Prerequisites

  • AppViewX ACME client has no installation steps. The binary will be provided for both Microsoft Windows and Linux and can be consumed directly.
  • For Windows, use the administrator command prompt for all the commands.
  • For Linux:
    • DNS: Does not require sudo.
    • HTTP: This first command alone will require sudo.
      sudo setcap 'cap_net_bind_service=+ep' <appviewx-acme-client-binary>
  • EAB is mandatory for AppViewX ACME plug-in.

Windows Commands

Component/Function Command
Enroll HTTP
appviewx-acme-client.exe --email= [email protected] --domains=domain.example.com
--server=https://server.example.com:port/api/appviewx_acme_client_http/acme/directory --http --tls-skip-verify run
Enroll EAB HTTP
appviewx-acme-client.exe [email protected] --domains=domain.example.com
--server=https://server.example.com:port/api/appviewx_acme_client_http/acme/directory --http --tls-skip-verify --eab 
--kid <EAB-KID> --hmac <EAB-HMAC> --eab-algorithm HS512 run
DNS enroll (AWS Route 53)
set AWS_PROPAGATION_TIMEOUT=40
set AWS_ACCESS_KEY_ID=<aws-access-key-id>
set AWS_SECRET_ACCESS_KEY=<aws-secret-access-key>
set AWS_REGION=<aws-region>
appviewx-acme-client.exe --domains <domain> --email [email protected] --dns <dns-provider>
--accept-tos=true --organization-name <organization-name> 
--organizational-unit <organizational-unit> --country <country-code> 
--province <province> --server https://<server>:<port>/avxapi/appviewx_acme_client_dns/acme/directory 
--tls-skip-verify run
Note: DNS configurations can vary depending on the DNS providers. For more information, refer to https://go-acme.github.io/lego/dns/.
DNS enroll (AppViewX)
appviewx-acme-client.exe --domains <DOMAIN-NAMES>  --email <EMAIL> 
--dns appviewx --accept-tos=true --server=<ACME-SERVER-URL> --tls-skip-verify  
--eab --kid "<EAB-KID>" --hmac "<EAB-HMAC>" --eab-algorithm <EAB Algorithm> 
--challenge-retry-count 10 --challenge-retry-interval 30 run
Note:
  • The default value for challenge-retry-count is 10; execute the command by entering a suitable value.
  • The default value for challenge-retry-interval is 30; execute the command by entering a suitable value.
Sample for custom and cert attributes
appviewx-acme-client.exe [email protected] 
--domains=domain.example.com --server=https://server.example.com:port/
api/appviewx_acme_client_http/acme/directory --http --tls-skip-verify --eab --kid <EAB-KID> 
--hmac <EAB-HMAC> --eab-algorithm HS512 --cert-emails "[email protected],[email protected]" 
--province <province> --country <country-code> --organizational-unit 
<organizational-unit> --organization-name <organization-name> --cert-attributes 
"<cert-attributes>" --custom-attributes "<custom-attributes>" run
Sample for Customer and Certificate Attributes in case of multiple values:
--cert-attributes "aa=apple,bb=ball" --custom-attributes "test=customattribute1,test2=customattribute2"
Renew all
appviewx-acme-client.exe --tls-skip-verify renew --renew-all --days <number-of-days> --no-random-sleep
Note: --days indicates that the certificates will be renewed if their remaining validity is less than the number of days specified.
Renew one
appviewx-acme-client.exe [email protected] --domains=domain.example.com 
--server=https://server.example.com:port/api/appviewx_acme_client_http/acme/directory --http 
--tls-skip-verify --eab --kid <EAB-KID> --hmac <EAB-HMAC> --eab-algorithm HS512 
--cert-attributes <cert-attributes> --custom-attributes <custom-attributes> renew 
--days <number-of-days>
DNS renew (AppViewX)
appviewx-acme-client.exe --domains <DOMAIN-NAMES>  --email <EMAIL> 
--dns appviewx --accept-tos=true --server=<ACME-SERVER-URL> --tls-skip-verify  
--eab --kid "<EAB-KID>" --hmac "<EAB-HMAC>" --eab-algorithm <EAB Algorithm> renew
Revoke
appviewx-acme-client.exe [email protected] 
--domains=domain.example.com --server=https://server.example.com:port/
api/appviewx_acme_client_http/acme/directory --http --tls-skip-verify revoke <revocation reason>
Note: Revocation reasons can include any of the following:
  • unspecified (0)
  • keyCompromise (1)
  • cACompromise (2)
  • affiliationChanged (3)
  • superseded (4)
  • cessationOfOperation (5)
  • certificateHold (6)
  • removeFromCRL (8)
  • privilegeWithdrawn (9)
  • aACompromise (10)
Reinstate
appviewx-acme-client.exe [email protected] --domains=domain.example.com 
--server=https://server.example.com:port/api/appviewx_acme_client_http/acme/directory 
--http --tls-skip-verify revoke 8
Note: It is important to include the --keep flag at the end of the reinstate command; else, the certificates will be deleted after the operation.
Windows schedule command
appviewx-acme-client.exe --tls-skip-verify renew --renew-all --days <number-of-days> 
--no-random-sleep --schedule "HH:MM" --schedule-only
Post Scripts
appviewx-acme-client.exe --email= [email protected] --domains=domain.example.com
--server=https://server.example.com:port/api/appviewx_acme_client_http/acme/directory --http --tls-skip-verify run
--run-hook <scripts file path>/script.sh

The parameter --run-hook Specifies a shell script to run after successful certificate issuance or renewal. After the run command is triggered, the --run-hook parameter is saved as metadata and used as the renewal hook to automate subsequent renewals.

Linux Commands

Component/Function Command
Enroll HTTP

./appviewx-acme-client --domains <domain> --email [email protected] --accept-tos=true 
--server https://<server>:<port>/api/appviewx_acme_client_http/acme/directory --tls-skip-verify --http run
Enroll EAB HTTP

./appviewx-acme-client --domains <domain> --email [email protected] --accept-tos=true 
--server https://<server>:<port>/api/appviewx_acme_client_http/acme/directory --tls-skip-verify 
--http --eab --kid <EAB-KID> --hmac <EAB-HMAC> --eab-algorithm HS512 run
DNS enroll (AWS Route 53)
AWS_PROPAGATION_TIMEOUT=40
AWS_ACCESS_KEY_ID=<aws-access-key-id>
AWS_SECRET_ACCESS_KEY=<aws-secret-access-key>
AWS_REGION=<aws-region> ./appviewx-acme-client --domains <domain> 
--email [email protected] --dns <your-dns-provider> --accept-tos=true 
--server https://<server>:<port>/api/appviewx_acme_client_dns/acme/directory --tls-skip-verify run
Note: DNS configurations can vary depending on the DNS providers. For more information, refer to https://go-acme.github.io/lego/dns/.
DNS enroll (AppViewX)
./appviewx-acme-client --domains <DOMAIN-NAMES>  --email <EMAIL> 
--dns appviewx --accept-tos=true --server=<ACME-SERVER-URL> --tls-skip-verify  
--eab --kid "<EAB-KID>" --hmac "<EAB-HMAC>" --eab-algorithm <EAB Algorithm> 
--challenge-retry-count 10 --challenge-retry-interval 30 run
Note:
  • The default value for challenge-retry-count is 10; execute the command by entering a suitable value.
  • The default value for challenge-retry-interval is 30; execute the command by entering a suitable value.
Custom and cert attributes
./appviewx-acme-client --domains <domain> --email [email protected] --accept-tos=true 
--server https://<server>:<port>/api/appviewx_acme_client_http/acme/directory --tls-skip-verify 
--http --eab --kid <EAB-KID> --hmac <EAB-HMAC> --eab-algorithm HS384 
--cert-attributes '<cert-attributes>' --custom-attributes '<custom-attributes>' run
Sample for Customer and Certificate Attributes in case of multiple values:
--cert-attributes 'aa=apple,bb=ball' --custom-attributes 'test=customattribute1,test2=customattribute2'
Renew all
./appviewx-acme-client --renew-all --tls-skip-verify renew --days <number-of-days> --no-random-sleep
Note: --days indicates that the certificates will be renewed if their remaining validity is less than the number of days specified.
Renew one
./appviewx-acme-client --domains <domain> --email [email protected] --accept-tos=true 
--server https://<server>:<port>/api/appviewx_acme_client_http/acme/directory --tls-skip-verify --http 
--eab --kid <EAB-KID> --hmac <EAB-HMAC> --eab-algorithm HS384 --cert-attributes '<cert-attributes' 
--custom-attributes '<custom-attributes>' renew --days 368
DNS renew (AppViewX)
./appviewx-acme-client --domains <DOMAIN-NAMES>  --email <EMAIL> --dns appviewx 
--accept-tos=true --server=<ACME-SERVER-URL> --tls-skip-verify  --eab --kid "<EAB-KID>" 
--hmac "<EAB-HMAC>" --eab-algorithm <EAB Algorithm> renew
Revoke
./appviewx-acme-client --domains <domain> --email [email protected] 
--accept-tos=true --server https://<server>:<port>/api/appviewx_acme_client_http/acme/directory 
--tls-skip-verify --http --eab --kid <EAB-KID> --hmac <EAB-HMAC> --eab-algorithm HS384 
--cert-attributes '<cert-attributes>' --custom-attributes '<custom-attributes>' 
revoke <revocation reason code>
Note: Revocation reasons can include any of the following:
  • unspecified (0)
  • keyCompromise (1)
  • cACompromise (2)
  • affiliationChanged (3)
  • superseded (4)
  • cessationOfOperation (5)
  • certificateHold (6)
  • removeFromCRL (8)
  • privilegeWithdrawn (9)
  • aACompromise (10)
Suspend
./appviewx-acme-client --domains <domain> --email [email protected] --accept-tos=true 
--server https://<server>:<port>/api/appviewx_acme_client_http/acme/directory --tls-skip-verify --http --eab 
--kid <EAB-KID> --hmac <EAB-HMAC> --eab-algorithm HS384 --cert-attributes '<cert-attributes>' 
--custom-attributes '<custom-attributes>' revoke 6
Note: It is important to include the --keep flag at the end of the suspend command; else, the certificates will be deleted after the operation.
Linux cron scheduler
appviewx-acme-client --tls-skip-verify renew --renew-all --days <number-of-days> 
--no-random-sleep --schedule "MM HH * * *" --schedule-only
Post Scripts
./appviewx-acme-client --domains <domain> --email [email protected] --accept-tos=true 
--server https://<server>:<port>/api/appviewx_acme_client_http/acme/directory --tls-skip-verify --http run 
--run-hook <scripts file path>/script.sh

The parameter --run-hook Specifies a shell script to run after successful certificate issuance or renewal. After the run command is triggered, the --run-hook parameter is saved as metadata and used as the renewal hook to automate subsequent renewals.

Config.json

A configuration file, similar to those used in other ACME tools like Certbot, is utilized to centralize certificate settings. This file includes all the required parameters for certificate enrollment and renewal.

The config.json serves as an input configuration file for the AppViewX Acme client during certificate enrollment. If provided, it overrides or complements parameters passed through the command line. The same file can be reused for certificate renewal, ensuring consistency in CSR details and external bindings.

A sample JSON is as follows:
{
  "csr_params": {
    "organization": "",
    "organization_unit": "",
    "country": "",
    "province": "",
    "locality": "",
    "emails": [""],
    "key_type": "rsa4096"
    },
  "eab": {
    "mac": "",
    "kid": "",
    "alg": "HS384"
  },
  "account_email": "[email protected]",
  "cert_attributes": {
    "attribute1": "value1",
    "attribute2": "value2"
  },
  "custom_attributes": {
    "attribute1": "value1",
    "attribute2": "value2"
  }
}
Json keys Expected Input Description
CSR Parameters (These parameters are used to generate the CSR that is sent to the ACME server during certificate enrollment.)
organization String The legal name of the organization to appear in the certificate.
organization_unit String The department or division name within the organization (e.g., “IT”, “Security”).
country String The two-letter ISO country code (e.g., US, IN).
province String The state or province name where the organization is located.
locality String The city or locality name.
emails String A list of email addresses to be included in the CSR (optional, can be used for contact or notification purposes).
key_type Possible values : [“rsa”, “ecdsa”] (String) Specifies the key algorithm and size for the private key (e.g., rsa2048, rsa4096, ec256)
eab (Contains details for External Account Binding, a mechanism used to associate an ACME account with an external identity — typically required by private or enterprise CAs.)
mac <value_of_EAB_KID> The HMAC key provided by the CA for binding the account. It ensures secure linking between the ACME account and the external system.
kid <value_of_EAB_HMAC_KEY> The Key ID associated with the external account. This uniquely identifies the external account with the CA.
alg HS256/HS384/HS512 The hashing algorithm used for the HMAC computation (e.g., HS256, HS384, HS512). In this case, HS384 is used.
account_email (I)
cert_attributes (Holds standard certificate attributes that may be required by certain CAs or internal policy configurations. These are typically metadata key-value pairs that define certificate properties beyond the CSR fields.)
"attribute1": "value1" Represents a configurable attribute used by the certificate authority.

Can store additional metadata such as certificate profile, policy OID, or usage type.

"attribute2": "value2"
custom_attributes (Defines user-specific or application-specific custom attributes to be passed during certificate enrollment.)
"attribute1": "value1" Custom key-value pair used for internal reference or integration.

Can contain additional metadata (for example, environment name, tenant ID, or service tag).

"attribute2": "value2"