[Certificate Fundamentals Part 11] Certificate Design Exercises: LB Termination, 47-Day Certificates, Private CA, Partial Errors, and vSphere

Certificate Fundamentals Part 11 Certificate Design Exercises: LB Termination, 47-Day Certificates, Private CA, Partial Errors, and vSphere Certificates and PKI

“I understand how it works, but how do I think about it in a real design?”

The series Certificate Fundamentals has finally reached its last part. From Part 1 through Part 10, we covered everything from cryptography basics to the contents of a certificate, PKI, TLS, issuance and automation, private PKI and the cloud, and troubleshooting. This final part is a set of design exercises for using all of that in real situations.

There are five problems. Each is based on a situation you really do run into at work. Before you look at the sample answer, please try thinking it through yourself.


How to work through the exercises

Diagram of four steps: read the problem, underline the requirements, and assume the conditions that are missing; alone for 5 minutes, write the option, the reason, and the commands to check; in a group, share and compare with others' options; then read the sample answer and explanation and check which requirement was decisive
  1. Read the problem: Underline the requirements, and assume the conditions that are not stated (team, budget, policy, future expansion)
  2. Think for 5 minutes: Write down the option you choose, your reason, and the commands to check
  3. Compare: If you can share with colleagues or your team, compare your option with the others’
  4. Read the sample answer and explanation: Check which requirement was decisive

There is no single correct answer. What matters is comparing the reasoning more than which option is better.


Problem 1: Certificates for two web servers and a load balancer

Diagram of the situation: users reach www.example.com and example.com; a redundant pair of load balancers sends /api/ to a separate server group and everything else to the same web server by cookie; policy requires encryption everywhere on the path; and next year shop.example.com will be published on the same LB
  • Situation: You publish a members-only site with a load balancer (a redundant pair) and two web servers (web01 and web02). Users reach it at both https://www.example.com/ and https://example.com/
  • Requirement 1: Only access to /api/ is routed to a separate group of servers. A signed-in user is sent to the same server by cookie
  • Requirement 2: The information security policy states that “everything on the path from the user to the web server must be encrypted“
  • Requirement 3: Next year, shop.example.com will be published on the same load balancer

Points to consider: Where to terminate TLS, the number of certificates and their names (SAN), the number of places holding private keys, and the effort of renewal

Problem 1: Sample answer

Diagram comparing three options: A terminates at the LB with LB to Web over HTTP, which does not meet Requirement 2; B terminates at the LB and re-encrypts LB to Web with private CA certificates, which meets Requirements 1 and 2; C is passthrough with termination at the web servers, which cannot see the content so does not meet Requirement 1 and leaves keys in two places
OptionConfigurationProsCons
ATerminate at the LB, with LB→Web over HTTP. One public certificate (SAN: example.com, www.example.com) on the LBSupports L7 routing and session persistence. One place for the key and for renewalDoes not meet Requirement 2 (encrypt everything on the path)
BTerminate at the LB and re-encrypt LB→Web. One public certificate on the LB, and one private CA certificate on each web serverMeets Requirements 1 and 2 together. The public certificate’s key is in only one place, the LBIssuing and renewing the web servers’ certificates, and configuring verification on the LB, are extra work
CPass TCP through (passthrough) and terminate at the web servers. The same public certificate and key on web01 and web02Never plaintext anywhere on the pathThe LB cannot see the content, so Requirement 1 is not met. The key lives in two places, and renewal work doubles

Given Requirements 1 and 2, Option B looks best. Users see one site name, so one public certificate is enough (count by names, not by number of servers). Put example.com and www.example.com in the SAN, and avoid a wildcard.

Problem 1: Explanation

Diagram showing that the LB terminates TLS and switches between the certificate for example.com and www.example.com and the certificate for shop.example.com, to be added next year, by SNI; that web01 and web02 use private CA certificates for re-encryption; that if the LB verifies them the private CA root is registered on the LB; and that *.example.com does not include example.com and has a wide key blast radius

The number of certificates is decided by “the names users use,” and where they live is decided by “where TLS is terminated” (Part 9).

  • In Option B, the only user-facing public certificate is the one on the LB, and the web servers’ certificates are internal ones that only the LB sees
  • For the re-encrypted segment, you also have to decide whether the LB verifies the web server’s certificate. AWS’s ALB does not verify the target’s certificate, so it can communicate even with a self-signed one, but if you enable verification on an on-premises LB, you register the private CA’s root on the LB (ALB is in Part 4 of Cloud Fundamentals, and ACM is in Part 9 of Cloud Fundamentals)
  • For Requirement 3, shop.example.com, the LB can switch certificates by SNI, so you just add a second certificate to the same LB. The web servers are not touched
  • If you consolidate into a wildcard (*.example.com), a leaked key affects every subdomain, and example.com itself is not included (Part 6)

Problem 2: Rethinking operations for 47-day certificates

Diagram of the situation: an inventory kept in a spreadsheet whose last person in charge was reassigned, about 40 public certificates (8 on ALBs, 15 on on-premises web servers, 3 for mail, 10 on devices, 4 of unknown purpose) bought as OV every year and replaced by hand, and a schedule in which the maximum validity period drops from 398 days to 47 days
  • Situation: About 40 public certificates are managed in-house. The inventory is kept in a spreadsheet, and the last person who updated it has been reassigned. Most are OV certificates purchased every year and replaced by hand
  • Breakdown: 8 on AWS ALBs (using ACM), 15 on on-premises web servers (Apache, IIS), 3 on mail servers (SMTP, IMAP), 10 on devices such as VPN appliances, WAFs, and load balancers, and 4 with unknown purpose
  • Background: The validity period of public certificates is at most 200 days from March 2026, becomes 100 days in March 2027, and 47 days in March 2029 (Part 6)
  • Requirement: Eliminate service outages caused by expiration, without increasing the work per person

Points to consider: What to do first, how to divide what can be automated from what cannot, and how to monitor expiry

Problem 2: Sample answer

Graph of human workload (illustrative): A, staying manual, grows each time the period shrinks and passes 300 operations in 2029; B, automation, rises only in the migration year and then stays low and flat; C, private CA only, is low but not trusted on outside devices
OptionApproachProsCons
AAdd staff and keep doing it by hand with runbooks and a renewal calendarCan start right away. No need to change devicesAt 47 days it is about 8 renewals a year, over 300 operations for 40 certificates. Mistakes do not decrease
BInventory → automate with ACM and ACME → for devices that cannot be automated, consolidate termination or replace them → monitor expiry and CTWork does not grow even as renewals increase. Fewer causes of outages through the systemInventory and migration take months. Replacing devices can cost money
CDrop public certificates and use private CA certificates for everythingYou can choose validity periods freelyNot trusted by outside users and partners’ devices, so it cannot be used for public services

Option B looks best. Option C applies only to names used only inside the organization (Problem 3). Because you renew with time to spare rather than right before expiry, the actual number of renewals at 47 days is more than 8 a year. The difference is that A grows in proportion to the count, while B pays the work up front.

Problem 2: Explanation, how to proceed with the migration

Diagram of six stages that reduce manual work by people and leave a form in which you are notified only on failure: inventory (match crt.sh against real devices), AWS (DNS validation in ACM), on-premises (ACME clients), devices (update, or consolidate on an LB), validation automation (10-day reuse in 2029), and monitoring (expiry, CT, CAA)
StageTaskPoint
1 InventoryFind the issuance history for your own domains in CT logs (such as crt.sh) and match it against the real devicesFind the 4 certificates of unknown purpose. The inventory has four fields: name, location, owner, renewal method
2 AWSFor ACM, keep the CNAME for DNS validation. For certificates placed on an EC2 OS, use ACM’s ACME or exportAuto-renewal at 198 days / 45 days before expiry (Part 9)
3 On-premises serversRenew automatically with an ACME client such as certbot or win-acme (Part 8)For DNS-01, delegate _acme-challenge by CNAME, so DNS API keys are not distributed to every server
4 DevicesUpgrade to a version that supports ACME or an API. If that is impossible, consolidate termination on a front-end LBThe goal is to reduce places that cannot be automated
5 Validation reuse periodThe reuse period for domain validation also shrinks to 10 days in March 2029Without automating validation at each issuance, you cannot keep up
6 MonitoringMonitor expiry (alert at 30 days left), monitor CT, and limit which CAs may issue with CAADetect failures of automatic renewal. Also receive renewal timing guidance through ARI (RFC 9773)

The real purpose of automation is to change renewal from “work that people remember to do” into “a system that calls a person only when it fails.” And you cannot automate certificates you don’t know about, which is why inventory is step 1. For how to write CAA records, see Part 6 of DNS Fundamentals.


Problem 3: How to prepare certificates for internal systems

Diagram of the situation: in the internal network corp.example.com, which resolves only in the internal DNS, there are 50 web systems using self-signed certificates with warnings bypassed; the devices are 800 domain-joined Windows PCs, 50 Macs and 300 iPhones managed by MDM, and 40 Linux servers; and internal host names must not be known outside
  • Situation: The AD domain is corp.example.com, and there are about 50 internal web systems (such as app01.corp.example.com). corp.example.com resolves only in the internal DNS and is not published externally (Part 2 of DNS Fundamentals)
  • Devices: 800 domain-joined Windows PCs, 50 Macs and 300 iPhones (managed by MDM), and 40 Linux servers
  • Current state: Each system uses a self-signed certificate, and users get around the certificate warning with “Advanced → Proceed”
  • Requirement: Eliminate the warnings, and be able to issue certificates for future systems without extra effort. The list of internal host names must not be known outside

Points to consider: Public CA or private CA, how to distribute the root certificate, automating renewal, and why you must not keep using self-signed certificates

Problem 3: Sample answer and explanation

OptionMethodProsCons
AGet public CA certificates with ACME (DNS-01)No need to distribute a root, and every device trusts themInternal host names are published in CT logs. A validation name is needed in external DNS. Affected by the shorter validity periods
BIssue from a private CA (AD CS two-tier, or AWS Private CA) and distribute the rootNames do not leave the organization. Windows can issue and renew by auto-enrollmentNeed to distribute the root (MDM for Mac and iPhone, Linux, and the separate stores of Firefox and Java) and to operate and protect the CA
CStay self-signed and have each device trust each certificate individuallyNo costDistribution is needed per system, and expiry and key management break down. The habit of bypassing warnings remains
Diagram of an offline root CA and an issuing CA issuing to 50 web systems with templates and auto-enrollment; the root certificate is distributed to Windows automatically from AD (GPO), to Mac and iPhone by an MDM configuration profile, to Linux through ca-certificates, and registered separately in the own stores of Firefox and Java; and only names also used from outside get public CA certificates

Given the requirements, Option B looks best. The requirement that “internal host names must not be known outside” is what rules out Option A (public CA certificates appear in CT logs).

  • Domain-joined Windows automatically trusts an enterprise CA’s root, but other devices must be given it explicitly
  • Use Option A only for systems that are also used from outside
  • With a public CA wildcard (*.corp.example.com), individual names do not appear in CT, but you would distribute the same key to 50 systems

The number of places you distribute the root to, not the effort of building the CA, decides the workload. If you keep using Option C’s self-signed certificates, then as we saw in Parts 1 and 6, the habit of bypassing warnings remains and becomes a reason to overlook a real attack.


Problem 4: “Only some devices show certificate errors”

Diagram of the situation: for portal.corp.example.com, migrated from the old issuing CA to a new issuing CA last weekend, Monday morning brings reports of AUTHORITY_INVALID on 10 newly deployed Macs, curl (60) on a Linux batch server, and DATE_INVALID on one factory Windows PC, while other Windows PCs open it normally
  • Situation: A report of “certificate errors” came in on Monday morning about the internal portal portal.corp.example.com (IIS, private CA certificate). Over the weekend, the issuing CA was migrated to a new server, and the portal’s certificate was replaced with one from the new issuing CA
  • Report 1: On 10 newly deployed Macs, Chrome shows NET::ERR_CERT_AUTHORITY_INVALID
  • Report 2: Calling the API from a Linux batch server fails with curl: (60) ... unable to get local issuer certificate (20)
  • Report 3: Only one Windows PC at the factory shows NET::ERR_CERT_DATE_INVALID. Other Windows PCs (domain-joined) open it normally

Points to consider: Is the cause the same for each report, what to check and in what order, and what to fix

Problem 4: Sample answer and explanation

OptionResponseProsCons
AHave each device bypass the warning (click “Proceed”, add -k to curl)Work can resume immediatelyThe cause remains, and devices are exposed to man-in-the-middle attacks. -k stays in the integration settings
BFor each report, check in order the chain the server sends, the device’s trust store, and the clock, and fix the server and distribution settingsEach cause is fixed properly, and recurrence is preventedNeeds isolation skills and time
CSwitch the certificate back to the old issuing CA’sReturns to the state before the migrationThe Mac and factory PC problems remain. The migration also stops
Diagram of the procedure of checking from the server side, sorting reports by device type: for Linux, openssl s_client -showcerts shows only 0, so the intermediate certificate was not installed and is added to IIS; for Mac, the root is missing from the trust store, so it is distributed by an MDM configuration profile; for the factory PC, check the clock with w32tm and sync it to NTP

The answer is Option B. The same certificate gives different results on different devices because there are three separate causes (Part 10).

  1. Sort the reports by device type (Mac / Linux / factory PC)
  2. Report 2 (Linux): If openssl s_client -showcerts shows only number 0, the new intermediate certificate was not installed on IIS (Windows and Chrome fill it in through AIA, so they don’t notice) → add it to Cert:\LocalMachine\CA on the IIS server
  3. Report 1 (Mac): The new private root is not in the MDM configuration profile → distribute it with MDM
  4. Report 3 (factory PC): Check the clock with w32tm /query /status → sync it to NTP

Checking from the server side clears the widest-impact causes first. Option A’s “bypass” is avoided because, as we saw in Part 10, it leaves just that device defenseless.


Problem 5: Moving vCenter and ESXi to private CA certificates

Diagram of the situation: two administrator PCs see warnings in the management UI; vCenter (vcsa01) and 8 ESXi hosts, with more to come, use the VMCA default certificates; the PKI team (AD CS) policy does not allow creating a CA under an issuing CA in principle; and an audit finding
  • Situation: One vCenter Server (vcsa01.corp.example.com, vSphere 8.0 Update 3) and eight ESXi hosts, with more ESXi hosts to come. The certificates are as built (the VMCA default)
  • Audit finding: “When an administrator opens the vSphere Client, a certificate warning appears. Use certificates from the private CA.”
  • PKI team (AD CS two-tier) policy: “Creating a CA under an issuing CA is not allowed in principle (exceptions require an application and review)”
  • Operations: There are two vSphere administrators, and ESXi hosts are added or replaced a few times a year. The ESXi Host Client is opened directly only during incidents

Points to consider: How to use VMCA, what and how many certificates to get from the private CA, and the effort of renewal and of adding hosts

Problem 5: Sample answer

Diagram comparing three options: A makes VMCA an intermediate CA so everything is in the private chain and adding and renewing are automatic but the PKI exception review is needed; B, hybrid, uses a private CA certificate only for vCenter's Machine SSL, one certificate, which follows the PKI policy; C, custom, needs 9 certificates for vCenter and 8 ESXi hosts and an issuance each time ESXi is added
OptionMethodProsCons
AMake VMCA an intermediate CA (get one “subordinate certification authority” certificate from the private CA and replace the VMCA root)ESXi certificates also chain to the private CA from then on, and adding and renewing are automaticNeeds the PKI team’s exception review. ESXi certificates must be renewed after the replacement
BHybrid (only vCenter’s Machine SSL becomes a private CA web server certificate; ESXi stays on VMCA)Follows the PKI policy, and only one certificate comes from the private CA. Resolves the audit findingThe Host Client still shows warnings, so distribute the VMCA root to administrators’ PCs. Machine SSL is renewed manually
CCustom (one private CA certificate each for vCenter and the 8 ESXi hosts)Everything chains to the private CA9 or more certificates to issue, and manual work every time ESXi is added. Renewal is per host

Given the policy and the number of hosts, Option B looks best first. The policy of “not creating a CA under an issuing CA” rules out Option A, and the operational reality that “ESXi hosts will keep increasing” rules out Option C. If it becomes necessary to align the ESXi certificates with the private CA too, you agree with the PKI team and move to Option A. Option C is the choice when policy does not allow VMCA to be used (Part 9).

Problem 5: Explanation, cautions for the replacement

ItemContentCaution
Certificate nameThe subject is an FQDN that matches the PTR record (vcsa01.corp.example.com). Put alternative names in the SAN, with the subject’s name first in the SANWildcards cannot be used. If you also open it by IP address, put the IP address in the SAN
UsageOption A uses a “subordinate certification authority” certificate (Basic Constraints is CA); Option B uses a web server certificateWith a web server certificate, VMCA cannot operate as an intermediate CA
ChainAt replacement, register the issuing CA and root CA certificates togetherIf they are missing, services fail to start or connections from integrated products fail
ProcedureCertificate management in the vSphere Client, or vCenter’s certificate-managerTake a powered-off snapshot and a backup beforehand
Integrated productsNSX, VCF Operations, backup products, and so on must re-register vCenter’s certificateAfter the replacement, confirm each product’s connection
Expiry monitoringvCenter raises expiry alerts (by default a red alert at 30 days left)Private CA certificates are outside the CA/B Forum 200-day limit, but decide the period in your internal policy

From vCenter 8.0 Update 3h onward, a Machine SSL certificate issued by VMCA is renewed automatically 5 days before expiry (the part you moved to a private CA certificate in Option B is not covered). Procedures differ by version, so check the relevant version of Broadcom TechDocs (vSphere 8.0 / 9.0 “vSphere Authentication”).


Wrapping up the series

How were the five problems? In every problem, what mattered was less whether you knew the answer and more whether you could say “which requirement was decisive” and “who trusts which key, for which name, on whose signature.”

Over 11 parts, we have looked at everything from cryptography basics to the contents of a certificate, PKI, TLS, issuance and automation, private PKI and the cloud, and troubleshooting. Certificates tend to be thought of as “something you renew when the expiry comes,” but behind them is a dense set of mechanisms that support the safety of communication. And now that validity periods are shrinking to 47 days, certificate operations are about to change from “work that people remember to do” into “a system.”

I hope this series helps you do something other than “ignore the warning and proceed” when a certificate error appears, and helps you take a step toward automation. To start, run openssl s_client -showcerts against a site you manage and check the chain sent and its expiry.

Design exercises in the same format also appear in Part 12 of DNS Fundamentals and Part 12 of Email Fundamentals.

Thank you for reading to the end.


The Certificate Fundamentals series (11 parts)

All 11 parts with a reading guide: Certificate Fundamentals

  1. Why Do We Need Certificates?
  2. Cryptography basics
  3. Trying it with openssl and PowerShell
  4. Inside an X.509 certificate
  5. PKI and how trust works
  6. Certificate types and issuance
  7. How TLS works
  8. Lifecycle and automation
  9. Private PKI and the cloud
  10. Certificate troubleshooting
  11. Certificate design exercises (this article)

This series is the English edition of 【証明書入門】, originally written in Japanese.

コメント

Copied title and URL