You are viewing an old version of this page. View the current version.
Compare with Current
View Page History
« Previous
Version 8
Next »
This article describes a configuration example of the ACME protocol in Protocol Gateway. For more information, see ACME support in Certificate Manager.
Prerequisites
The following prerequisites apply:
For demo use cases: Add CM domain to Windows hosts file
For demo use cases, when there is no real DNS set up, follow these steps to point out the CM domain:
- Open the file C:\Windows\System32\drivers\etc\hosts for editing.
Add the Certificate Manager domain and machine to point to 127.0.0.1 (or to be resolvable via DNS).
127.0.0.1 cm.local test.cm.local
Create TLS server certificate procedure
Create a certificate procedure for TLS server certificates, see Create certificate procedure in Certificate Manager:
- Set Procedure name to TLS Web Server Certificate.
- In Issuing CA, select Device Issuing CA.
- In Certificate format, select server certificate.
- In Authority information access, add ad-ocsp = <URL to OCSP Responder>.
- In Extended key usage, add TLS Server Authentication.
Create token procedures
Create token procedures, see Create token procedure in Certificate Manager:
- Create a token procedure for ACME preregistration:
- Set Procedure name to ACME preregistration.
- In Storage profile, select PKCS10.
- In Certificate procedures, select the certificate procedure you just created, that is TLS Web Server Certificate.
- In Input view, select GPIV 13 - Save and Search ACME Pre-Registrations.
- Create a token procedure for ACME TLS web servers:
- Set Procedure name to ACME TLS Web Server Token.
- In Storage profile, select PKCS10.
- In Certificate procedures, select the certificate procedure you just created, that is TLS Web Server Certificate.
- In Input view, select GPIV 14 - Save and Search ACME Accounts.
Configure ACME in Protocol Gateway
To set the properties for the ACME protocols:
- Open \Nexus\cm-gateway\conf\ACME.properties for editing. For more information, see acme.properties.
- Modify the following properties:
- Enable ACME by setting
start
to true
. - Set
handler.0.tokenProcedure
to ACME TLS Web Server Token
. - Set
handler.0.baseUrl
to https://cm.local:8443/pgwy/acme
. Set handler.0.externalAccountRequired
to true
.
If needed, scramble sensitive parameters in the configuration file. See Scramble sensitive data in configuration files in Protocol Gateway.
- Save the file.
start = true
handler.0.tokenProcedure = ACME TLS Web Server Token
handler.0.baseUrl = https://cm.local:8443/pgwy/acme
handler.0.externalAccountRequired = true
Restart Tomcat
- Restart the Tomcat service.
Set up Certbot ACME client
This example shows how to use Certbot as the ACME client. For more information and examples with Kubernetes and Cert-manager, see Examples - Use ACME clients with Certificate Manager.
Set up TLS
To set up TLS communication:
Convert the SystemCA certificate to .pem format:
C:\Nexus\cm\server\certs>certutil -encode SystemCA.cer cacert.pem
Input length = 822
Output length = 1188
CertUtil: -encode command completed successfully.
- For Certbot to trust the Officer and System CA, move the new .pem file to C:\Program Files (x86)\Certbot\pkgs\certifi\cacert.pem. to replace the default cacert.pem file.
Preregister ACME device
In Registration Authority (RA) in Certificate Manager, preregister an ACME device:
- Go to the Order tab.
- In the Input view drop-down list, select the token procedure ACME preregistration, that is configured to use the input view GPIV 13 - Save and Search ACME Pre-Registrations.
- Enter the following:
- Enter a KeyID, a unique number to identify the device.
- By HMAC key, click Generate to get an HMAC key.
- In Allowed domains, enter cm.local.
For more information, see Allowed domain names for preregistration in Certificate Manager. - In State, select Open.
- Copy the KeyID and HMAC key to use them in a Certbot command in the next task.
Test the ACME setup via Certbot
Request certificate via Certbot
To test the ACME setup, request a certificate via Certbot:
With Certbot, run the certonly
command to request a certificate for the registered device:
- In
--eab-kid
, enter the KeyID that you copied from the registered device. In --eab-hmac-key
, enter the HMAC key that you copied from the registered device.
C:\Program Files (x86)\Certbot\bin>certbot certonly --agree-tos --email test@cm.local --domain test.cm.local --server https://cm.local:8443/pgwy/acme/directory --eab-kid 2 --eab-hmac-key UGmAUMn3yWlPev1ahn-Hi3b9Qg-C1c_4jf-IQGkNa-E --preferred-challenges http
For a certbot example without preregistration, see Examples - Use ACME clients with Certificate Manager.
Revoke certificate
To test revocation using Certbot:
- With Certbot, run the
revoke
command to revoke the certficate test.cm.local
:
C:\Program Files (x86)\Certbot\bin>certbot revoke --cert-name test.cm.local --email test@cm.local --server https://cm.local:8443/pgwy/acme/directory
Saving debug log to C:\Certbot\log\letsencrypt.log
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Would you like to delete the cert(s) you just revoked, along with all earlier
and later versions of the cert?
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
(Y)es (recommended)/(N)o: y
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Deleted all files relating to certificate test.cm.local.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Congratulations! You have successfully revoked the certificate that was located
at C:\Certbot\live\test.cm.local\fullchain.pem
For more information, see Requirements to revoke certificates issued by ACME account.