Skip to content

Commit 639fd4d

Browse files
authored
Merge pull request #406 from pulibrary/i11_las_recapTLS
document how to renew TLS certificate
2 parents fbdb019 + bdae99e commit 639fd4d

File tree

1 file changed

+79
-63
lines changed

1 file changed

+79
-63
lines changed

services/create_ssl_certs.md

Lines changed: 79 additions & 63 deletions
Original file line numberDiff line numberDiff line change
@@ -3,136 +3,153 @@
33
## Creating TLS Certificates
44

55
### For sites on the .princeton.edu domain
6+
67
1. You can create auto-renewing certificates and keys directly on the load balancers for sites in the .princeton.edu domain. You can create a single certificate and key with [playbooks/incommon_certbot.yml](https://github.com/pulibrary/princeton_ansible/blob/main/playbooks/incommon_certbot.yml) or create a single certificate with multiple names and keys with [playbooks/incommon_certbot_multi.yml](https://github.com/pulibrary/princeton_ansible/blob/main/playbooks/incommon_certbot_multi.yml)
78

89
1. You will need to run the above playbook on each load balancer sequentially
910
1. If the certificate already exists you will need to revoke it before running your chosen playbook
1011

1112
### For sites outside the Princeton domain
13+
1214
1. Create a new entry under [sites](https://github.com/pulibrary/princeton_ansible/blob/dac77a6c2e0f1301201c9b2a63b9ebead5f7b7ac/group_vars/nginxplus/production.yml#L16)
1315
2. Run the [nginxplus playbook](https://github.com/pulibrary/princeton_ansible/blob/main/playbooks/nginxplus.yml)
1416
3. Your TLS/SSL cert will be on the production loadbalancer
1517
4. Verify the files you get back and add them to your server configuration.
1618

1719
## Verifying certbot certificate renewals
20+
1821
To verify that a certificate on a server will auto-renew:
1922

20-
sudo certbot --standalone --non-interactive --agree-tos --email [email protected] --server https://acme.sectigo.com/v2/InCommonRSAOV --eab-kid <certbot-key-eab-kid> --eab-hmac-key <certbot-key-eab-hmac-key> renew --dry-run
23+
sudo certbot --standalone --non-interactive --agree-tos --email <[email protected]> --server <https://acme.sectigo.com/v2/InCommonRSAOV> --eab-kid <certbot-key-eab-kid> --eab-hmac-key <certbot-key-eab-hmac-key> renew --dry-run
2124

2225
This command checks all certs that certbot knows about on that server.
2326

2427
## Viewing certificates in Sectigo
28+
2529
Our certificate management system is Sectigo. Operations folks can [log into Sectigo](https://cert-manager.com/customer/InCommon) using their alias email accounts and individual passwords. We can view certificate status there, but we cannot revoke or renew certificates there.
2630

2731
## Manually managed certs list
2832

2933
These certs are not managed by our usual process. These certs cover:
34+
3035
- sites we do not serve from the load balancers
3136
- vendor-hosted sites with the '.princeton.edu' extension
37+
3238
Many of these certs must be deployed manually. Some must also be renewed manually. If a private key is kept in princeton_ansible, it is encrypted as a file in the `/keys/` directory of the repo.
3339

3440
cicognara.org
35-
Purpose: public site for the Cicognara collection (a collaborative project)
36-
Managed: [Lego](https://github.com/pulibrary/princeton_ansible/blob/main/roles/nginxplus/tasks/lego.yml)
37-
Deployed: on the load balancers
41+
* Purpose: public site for the Cicognara collection (a collaborative project)
42+
* Managed: [Lego](https://github.com/pulibrary/princeton_ansible/blob/main/roles/nginxplus/tasks/lego.yml)
43+
* Deployed: on the load balancers
3844

3945
dataspace.princeton.edu
40-
Purpose: production site for dspace
41-
Managed: Via [Lego](lego.md)
42-
Deployed: on Google cloud, on prod.pulcloud.io
46+
* Purpose: production site for dspace
47+
* Managed: Via [Lego](lego.md)
48+
* Deployed: on Google cloud, on prod.pulcloud.io
4349

4450
dataspace-dev.princeton.edu
45-
Purpose: dev/staging site for dspace
46-
Managed: Via [Lego](lego.md)
47-
Deployed: on Google cloud, on dev.pulcloud.io
51+
* Purpose: dev/staging site for dspace
52+
* Managed: Via [Lego](lego.md)
53+
* Deployed: on Google cloud, on dev.pulcloud.io
4854

4955
dataspace-staging.princeton.edu
50-
Purpose: dev/staging site for dspace
51-
Managed: Via [Lego](lego.md)
52-
Deployed: on Google cloud, on dev.pulcloud.io
56+
* Purpose: dev/staging site for dspace
57+
* Managed: Via [Lego](lego.md)
58+
* Deployed: on Google cloud, on dev.pulcloud.io
5359

5460
dss2.princeton.edu
55-
Purpose: secures dataset downloads from a separate server for DSS via a web browser
56-
Managed: in ServiceNow - John will move to letsencrypt
57-
Deployed: on the dss2 CentOS VM
58-
Notes: cannot be a SAN name for the main DSS cert, because we only want to secure this functionality on one machine - can be tricky to maintain because server access requires signing nondisclosure agreements (for protected data)
61+
* Purpose: secures dataset downloads from a separate server for DSS via a web browser
62+
* Managed: in ServiceNow - John will move to letsencrypt
63+
* Deployed: on the dss2 CentOS VM
64+
* Notes: cannot be a SAN name for the main DSS cert, because we only want to secure this functionality on one machine - can be tricky to maintain because server access requires signing nondisclosure agreements (for protected data)
5965

6066
ezproxy.princeton.edu
61-
Purpose: allows access to journals by confirming Princeton affiliation
62-
Managed: on ezproxy-prod1 by letsencrypt
63-
Deployed: in /etc/letsencrypt/live/ezproxy on the ezproxy-prod1 server
67+
* Purpose: allows access to journals by confirming Princeton affiliation
68+
* Managed: on ezproxy-prod1 by letsencrypt
69+
* Deployed: in /etc/letsencrypt/live/ezproxy on the ezproxy-prod1 server
6470

6571
imagecat2.princeton.edu
66-
Philippe will shut down the server once he has copied whatever we need from it. Once it's gone, we can revoke the cert.
72+
* Philippe will shut down the server once he has copied whatever we need from it. Once it's gone, we can revoke the cert.
6773

6874
lib-aeon.princeton.edu
69-
Purpose: redirects traffic to hosted Aeon service at https://princeton.aeon.atlas-sys.com
70-
Managed: for new site by the vendor
71-
Deployed: to new site by the vendor
72-
Notes: We would like to redirect the old URL on the load balancers and power off the old lib-aeon machine. The templates for printing Aeon call slips, which used to live on the lib-aeon machine, have been moved to a fileshare called aeonprint on lib-fileshare.
75+
* Purpose: redirects traffic to hosted Aeon service at <https://princeton.aeon.atlas-sys.com>
76+
* Managed: for new site by the vendor
77+
* Deployed: to new site by the vendor
78+
* Notes: We would like to redirect the old URL on the load balancers and power off the old lib-aeon machine. The templates for printing Aeon call slips, which used to live on the lib-aeon machine, have been moved to a fileshare called aeonprint on lib-fileshare.
7379

7480
lib-gisportal.princeton.edu
75-
Purpose: for maps (Wangyal)
76-
Managed: in ServiceNow
77-
Deployed: in IIS on a physical machine that runs MS HyperV virtualization - cluster of lib-geoserv1 and lib-geoserv2 (not the Lib-Gisportal2 VM) server
78-
Notes: windows physical machine, you must be an admin on the Windows box, expires 2024/07/30
81+
* Purpose: for maps (Wangyal)
82+
* Managed: in ServiceNow
83+
* Deployed: in IIS on a physical machine that runs MS HyperV virtualization - cluster of lib-geoserv1 and lib-geoserv2 (not the Lib-Gisportal2 VM) server
84+
* Notes: windows physical machine, you must be an admin on the Windows box, expires 2024/07/30
7985

8086
lib-illsql.princeton.edu
81-
Purpose: interlibrary loan
82-
Managed: in ServiceNow
83-
Deployed: in IIS, on the lib-illiad-new VM
84-
Notes: Windows VM; cert has a SAN name of lib-illiad.princeton.edu; we hope to migrate this to a hosted platform in 2024
87+
* Purpose: interlibrary loan
88+
* Managed: in ServiceNow
89+
* Deployed: in IIS, on the lib-illiad-new VM
90+
* Notes: Windows VM; cert has a SAN name of lib-illiad.princeton.edu; we hope to migrate this to a hosted platform in 2024
8591

8692
libserv97.princeton.edu
87-
Purpose: Philippe's test machine, may disappear in 2024
88-
Managed: in ServiceNow
89-
Deployed: directly on the libserv97 VM (dev environment)
93+
* Purpose: Philippe's test machine, may disappear in 2024
94+
* Managed: in ServiceNow
95+
* Deployed: directly on the libserv97 VM (dev environment)
9096

9197
oar.princeton.edu
92-
Purpose: production site for oar
93-
Managed: Via [Lego](lego.md)
94-
Deployed: on Google cloud, on prod.pulcloud.io
98+
* Purpose: production site for oar
99+
* Managed: Via [Lego](lego.md)
100+
* Deployed: on Google cloud, on prod.pulcloud.io
95101

96102
oar-dev.princeton.edu
97-
Purpose: production site for oar
98-
Managed: Via [Lego](lego.md)
99-
Deployed: on Google cloud, on prod.pulcloud.io
103+
* Purpose: production site for oar
104+
* Managed: Via [Lego](lego.md)
105+
* Deployed: on Google cloud, on prod.pulcloud.io
100106

101107
oar-staging.princeton.edu
102-
Purpose: production site for oar
103-
Managed: Via [Lego](lego.md)
104-
Deployed: on Google cloud, on prod.pulcloud.io
108+
* Purpose: production site for oar
109+
* Managed: Via [Lego](lego.md)
110+
* Deployed: on Google cloud, on prod.pulcloud.io
105111

106112
pcdm.org
107-
Purpose: Portland Common Data Model
108-
Managed: [Lego](https://github.com/pulibrary/princeton_ansible/blob/main/roles/nginxplus/tasks/lego.yml)
113+
* Purpose: Portland Common Data Model
114+
* Managed: [Lego](https://github.com/pulibrary/princeton_ansible/blob/main/roles/nginxplus/tasks/lego.yml)
115+
* Deployed: on the load balancers
109116

110117
pulmirror.princeton.edu
111-
Purpose: distributing Ubuntu packages
112-
Managed: Via [Lego](lego.md)
113-
Deployed: on Google cloud at pulmirror.princeton.edu
118+
* Purpose: distributing Ubuntu packages
119+
* Managed: Via [Lego](lego.md)
120+
* Deployed: on Google cloud at pulmirror.princeton.edu
114121

115122
recapgfa.princeton.edu
116-
Purpose: ReCAP inventory management system
117-
Managed: by ACME directly on the VM
118-
Deployed: N/A - it automatically renews
123+
* Purpose: ReCAP inventory management system
124+
* Managed: by ACME directly on the VM
125+
* Deployed: N/A - it automatically renews
126+
127+
scsb.recaplib.org
128+
* Purpose: external hosted service for research collections
129+
* Managed: on DNSimple and Vendor's AWS Certificate Manager
130+
* Deployed: by vendor and CNAME validation on DNSimple
119131

120132
simrisk.pulcloud.io
121-
Purpose: experimental application for CDH
122-
Managed: on staging.pulcloud.io by acme-client contacting letsencrypt CA
123-
Deployed: in /etc/ssl/simrisk.pulcloud.io.fullchain.pem on the staging.pulcloud.io server
124-
Maintained using `/etc/daily.local` as root
133+
* Purpose: experimental application for CDH
134+
* Managed: on staging.pulcloud.io by acme-client contacting letsencrypt CA
135+
* Deployed: in /etc/ssl/simrisk.pulcloud.io.fullchain.pem on the staging.pulcloud.io server
136+
* Maintained using `/etc/daily.local` as root
125137

126138
tigris.princeton.edu
127-
Purpose: hosted service for University Records management
128-
Managed: in ServiceNow, private key is in princeton_ansible
129-
Deployed: by vendor; to update, email a .pfx file of the cert to [email protected]
139+
* Purpose: hosted service for University Records management
140+
* Managed: in ServiceNow, private key is in princeton_ansible
141+
* Deployed: by vendor; to update, email a .pfx file of the cert to <[email protected]>
142+
143+
### scsb
144+
145+
If ever there is a change in the application vendor will provide CNAME which can be added to DNSimple configuration
130146

131147
#### Tigris
132148

133149
In July of every year [tigris.princeton.edu](tigris.princeton.edu) will get an automatic renewal. The following steps will be needed to ensure the certificate remains renewed.
134-
* Open a ticket with tigris (aka Gimmal) support at [email protected] and ask who should receive the new chained file.
135-
* You will need the [vaulted private key](https://github.com/pulibrary/princeton_ansible/blob/main/keys/tigris_princeton_edu_priv.key) and the certificate and intermediate certificate to generate a pfx file that you will ship to the vendor
150+
151+
- Open a ticket with tigris (aka Gimmal) support at <[email protected]> and ask who should receive the new chained file.
152+
- You will need the [vaulted private key](https://github.com/pulibrary/princeton_ansible/blob/main/keys/tigris_princeton_edu_priv.key) and the certificate and intermediate certificate to generate a pfx file that you will ship to the vendor
136153

137154
```bash
138155
cat ~/path/to/downloads/tigris_princeton_edu_cert.cer ~/path/to/downloads/tigris_princeton_edu_interm.cer > keys/tigris_princeton_edu_chained.pem
@@ -146,5 +163,4 @@ This will generate a chained file. You will be prompted for a password in the ne
146163

147164
Send the resulting file to the tigris support folks via [the Secure Send Portal](https://securesend.princeton.edu/#/) along with the password used above
148165

149-
150166
[1] Subject Alternative Names are used when multiple domains share the same certificate as shown ![SAN Example](images/san/san_example.png)

0 commit comments

Comments
 (0)