SSL/TLS using Let's Encrypt and GoDaddy DNS
Setting up SSL/TLS for Adams Web and Adams Admin
These steps apply to IIS 7 - 10.
Create a DNS Entry
Create a DNS entry for the web server's public IP. This is the host name. For example myserver.agency.gov.
Setup a Certificate
Get a certificate from Let's Encrypt using win-acme. Win-acme is a free program that uses Let's Encrypt to generate a certificate that expires every 90 days, configures IIS with the certificate and automatically renews the certificate.
Download and Prepare win-acme
Download win-acme
Extract the zip
From the win-acme extracted directory open
settings_default.jsonin your favorite text editorFind
PrivateKeyExportableand change the value from false to trueCopy the contents of the extracted directory to a permanent location such as
C:\Program Files\win-acme
v2.2.8 of win-acme or later is required
Download the GoDaddy plugin for win-acme
Latest release (ex: 2.2.9.1)
Expands Assets
Click “Show all XX assets”
Download the Godaddy plugin zip
Extra the zip to the same directory as win-acme such as
C:\Program Files\win-acmeUnblock both all extracted DLLs:
PKISharp.WACS.Plugins.ValidationPlugins.Godaddy.dll,Newtonsoft.Json.dllProperties → General → Unblock
Check the box if it is there
OK
Verify the plugin loads by running
.\wacs.exe --verbosefrom PowerShellYou should see something similar to:
[VERB] Loaded validation plugin GodaddyDnsValidation from C:\Program Files\win-acme\PKISharp.WACS.Plugins.ValidationPlugins.Godaddy.dll
Create GoDaddy API Key
This only needs to be done once per GoDaddy account.
Create New API Key
Name - Ex: ADAMS SaaS
Environment - Production
Next
Store the Key and Secret in a password manager
Create the Certificate from the Command Line
Replace the values in <> and run from an elevated command line.
.\wacs.exe --target manual --host "<SERVER FQDN>" --friendlyname "<SERVER FQDN>" --validation godaddy --apikey "<API KEY>" --apisecret "<API SECRET>" --store certificatestore --certificatestore "My" --installation iis --installationsiteid 1 --emailaddress "<EMAIL ADDRESS>" --accepttosThe output of the above command should end in:
Next renewal due after YYYY/MM/DD
Certificate<MY FQDN>created
Verify
.\wacs.exe --renew --baseuri "https://acme-v02.api.letsencrypt.org/" --verboseThis output should contain:
[VERB] [HTTP] Request completed with status OK
Troubleshooting
If the certificate creation fails, particularly with the following in the output:
[FQDN] Authorization result: invalid
This is likely due to the new DNS record created by win-acme having not yet propagated from the tested Go-Daddy DNS servers to the DNS servers used by Let’s Encrypt. A retry (re-run the command) may work. If not do the following:
Edit
C:\Program Files\win-acme\settings.jsonChange
PreValidateDnsRetryIntervalfrom30to300Save
Run the
wacs.execommand
Create the Certificate Manually
Run wacs.exe with admin privileges from the permanent location
M - Create certificate (full options)
2 - Manual input
Host: enter the server’s public FQDN (ex: myserver.myorg.com)
Friendly name: enter the server’s public FQDN (ex: myserver.myorg.com) The default name has “[Manual]” which will cause issues.
4 - Single certificate
6 - [dns] Create verification records in Godaddy DNS
1 - Type/paste in console paste in the API Key value
Save to the vault - No
1 - Type/paste in console paste in the API secret value
Save to the vault - No
2 - RSA
4 - Windows Certificate Store (Local Computer)
2 - [My] - General computer store (for Exchange/RDS)
5 - No (additional) store steps
1 - Create or update bindings in IIS
1 - Default Web Site
3 - No (additional) installation steps
N - Open in default application
Y - Do you agree with the terms
Enter an email address for notifications about problems and abuse
N - Do you want to specify the user the task will run as
Q - Quit
At this point, the certificate should be in the server's certificate store and an IIS binding for port 443 using the certificate and the host name should have been created. The certificate will be setup to auto renew every 30 days.
The files related to the certificate are under C:\ProgramData\win-acme
Verification
Try to access the website using HTTPS. It should succeed and there should be a lock icon.
Force Renewal - Optional
If you need to force a renewal, such as if settings.json has been changed.
Run wacs.exe with admin privileges from the permanent location
A - Manage renewals
S - Run the renewal (force) This forces the certificate to be re-created with an exportable key
Q - Quit
Q - Quit
Certificate Monitoring
Let’s Encrypt no longer provides certificate monitoring. For public facing servers a 3rd party monitoring tool can be used.
Red Sift | Creating a Fundamentally Safer Internet with Proactive Security has free monitoring for certificates
© 2023 Foray, LLC - All Rights Reserved