You cannot automate, renew or revoke a certificate you do not know exists, so a TLS certificate inventory is the first step of any certificate programme. Most organisations hold certificates in many places at once: on public web servers, on load balancers, in cloud certificate services, in key vaults, in Java and PKCS#12 keystores inside applications, and on internal services that no scanner has ever reached. Each of those certificates is a machine identity with a private key and an expiry date. This guide sets out a practical method for finding them through four complementary sources, network scans, Certificate Transparency logs, cloud APIs and keystores, and for merging the results into one register with an owner for every entry.
The guide covers the method. For the register's columns and review cadence, use the Certificate Inventory Register Template, and for the wider lifecycle, see the Machine Identity, PKI and Certificate Lifecycle Guide.
Key takeaways
- No single discovery source finds every certificate. Network scans see what is served, CT logs see what public CAs issued, cloud APIs see what is stored and keystores see what applications carry.
- Use a stable key to merge sources. The SHA-256 fingerprint of the certificate identifies an exact certificate; the serial number and issuer together identify it within a CA.
- Record where each certificate is deployed, not just that it exists. One certificate on five listeners is five renewal tasks.
- Every entry needs an accountable owner. A certificate without an owner is the one most likely to expire unnoticed.
- Treat the inventory as a running process with scheduled rescans and reconciliation, not a one-off spreadsheet.
- Run discovery with scoped, read-only identities. Discovery tooling that holds keystore passwords or broad cloud read rights is itself a sensitive non-human identity.
What the inventory must answer
Before collecting anything, agree the questions the register exists to answer. A useful inventory answers, for every certificate:
- What is it? Subject, subject alternative names, issuer, serial number, fingerprint, key type and size, signature algorithm.
- When does it expire? Not-before and not-after dates, and whether renewal is managed or manual.
- Where is it used? Every host, port, listener, keystore or secret that holds or serves it.
- Who owns it? A named team and an escalation contact, plus the application or service it protects.
- How is it renewed? Managed service, ACME client, enterprise certificate platform or a person.
- Where is the private key? Cloud managed, hardware-protected, software keystore or file on disk.
Those questions drive which fields each discovery source must supply. The template linked above sets out the full field list. NIST SP 1800-16 describes TLS server certificate management practice, including inventory, and NIST SP 800-53 control CM-8 (System Component Inventory) gives a control anchor for auditors.
Step 1: Set scope and seed lists
Discovery is only as complete as its starting lists. Build these seeds first:
- Registered domains. Export every domain your organisation holds from the registrar and DNS providers. These drive CT log searches.
- IP ranges. Collect public and internal address ranges from network teams and cloud accounts. These drive network scans.
- Cloud accounts, subscriptions and projects. List every one, including those owned by subsidiaries. These drive cloud API discovery.
- Application catalogue. Use the CMDB or service catalogue to list applications and their owners. This drives keystore discovery and ownership assignment.
- Known CAs. List the public CAs you buy from and every internal CA. Unknown issuers found later are a finding in their own right.
Agree in writing which networks may be scanned, at what rate and from where. Scanning without that agreement creates noise for the SOC and risk for fragile systems.
Step 2: Scan the network for served certificates
Network scanning finds the certificates that services actually present. It is the only source that sees certificates on appliances, embedded devices and forgotten servers that never registered anywhere.
The Nmap ssl-cert script is a common starting point. Its documentation states that by default it reports the validity period and the subject's common name and organisation fields, with subject alternative names where present. With -v it adds the issuer, the public key type and size, the signature algorithm and MD5, SHA-1 and SHA-256 fingerprints, and with -vv it outputs the full PEM certificate. The script also accepts a tls.servername argument for setting SNI.
Practical points for scanning:
- Scan more than port 443. TLS runs on mail, directory, database, message broker, management and custom application ports. Use a service detection scan rather than a fixed port list.
- Send SNI. A host serving many names presents different certificates per name. A scan by IP address alone sees only the default certificate. Use the domain seeds to scan by name as well.
- Scan from inside. Internal CAs and private services are invisible from the internet. Run scanners in each major network segment and cloud VPC or virtual network.
- Keep the full certificate. Store the PEM, not just the parsed fields. It lets you recompute fingerprints and re-parse fields later without rescanning.
- Record the observation. Each finding is a tuple of certificate, host, port, server name and time. The same certificate seen on many hosts is one certificate with many deployments.
Treat the scanner itself with care. It needs network reach into sensitive segments, and its results map exactly where your TLS services and their weaknesses are. Run it from a dedicated host with its own identity, restrict who can read the raw results, and tell the SOC the source addresses and schedule so that scans are not mistaken for reconnaissance by an attacker. Expired, self-signed and weak-key certificates found during scans should be raised as findings straight away rather than waiting for the register to be complete.
Step 3: Search Certificate Transparency logs
Publicly trusted CAs log the certificates they issue to Certificate Transparency (CT) logs, defined in RFC 9162 for version 2.0. Searching CT logs for your domains shows every public certificate issued for them, wherever it ended up.
CT search finds three things that scans miss:
- Certificates issued to cloud services, content delivery networks or SaaS platforms on your behalf, which may never appear on your own address ranges.
- Certificates issued but not yet deployed, or deployed on systems outside your scan scope.
- Certificates you did not request, which may indicate shadow IT, a vendor acting without approval or misissuance.
Search for each registered domain and its subdomains, de-duplicate precertificates against final certificates, and match results to scan and cloud findings by fingerprint or by serial number and issuer. CT logs show only publicly trusted certificates, so they say nothing about internal CAs. For background on how CT works, see the Certificate Transparency Guide; for ongoing alerting rather than inventory, see the Certificate Transparency Monitoring Guide for Web Teams.
Step 4: Pull certificates from cloud APIs
Cloud certificate services and key vaults hold many certificates that are deployed to managed load balancers and content delivery endpoints. Their APIs give rich metadata, including whether the certificate is in use and how it is renewed.
AWS Certificate Manager
The ACM ListCertificates API returns certificate summaries including the ARN, domain name, not-before and not-after dates, key algorithm, status, type, an InUse flag, a RenewalEligibility field and subject alternative name summaries. Two defaults catch people out. AWS documents that, unless you change the key-type filter, only RSA 2048 certificates are returned, and that ACME-issued certificates are excluded unless you include ACME in the key pair origin filter. Set both filters explicitly so ECDSA, larger RSA and ACME certificates are not missed. The example request uses a regional endpoint, so call the API in every Region in use and page through results with NextToken.
Azure Key Vault
The Azure CLI command az keyvault certificate list lists the certificates in a vault and needs the certificates/list permission. Microsoft documents an --include-pending option for certificates that are not completely provisioned, and notes that the service returns up to 25 results per page by default unless --maxresults is set. Use az keyvault certificate show for details of a single certificate. Enumerate every vault in every subscription; a vault per application is common, so the vault list is itself an inventory task.
Other platforms
Apply the same approach to every other cloud and platform you run: list certificates in each region or project, capture expiry and in-use data, and record which resource references each certificate. In Kubernetes, certificates usually live in TLS secrets, often created by cert-manager; see the cert-manager security guide for that controller.
Run cloud discovery with a dedicated read-only identity that can list certificate metadata but cannot export private keys. Metadata is enough for an inventory.
Step 5: Read application keystores and trust stores
Applications often carry certificates that no network scan sees: client certificates for mutual TLS, signing certificates, and server certificates for services that only listen internally. They also carry trust stores, which decide which CAs the application accepts.
For Java, the keytool -list command prints the contents of a keystore. Oracle documents that without -v it prints the SHA-256 fingerprint of each certificate, that -v shows the certificate in human-readable form with details such as owner, issuer, serial number and extensions, and that -rfc prints it in PEM form. The two options cannot be combined. The default keystore type is PKCS12 from JDK 9 onwards, and keytool -list -cacerts lists the default trusted CA certificates.
Keystore discovery needs care:
- Find the files first. Search build artefacts, container images and hosts for keystore and certificate file types, such as
.jks,.p12,.pfx,.pemand.crt. - Prefer metadata over secrets. Certificate entries can often be listed without exposing private keys. Do not copy keystores or their passwords into the discovery tool's storage.
- Record trust stores separately. A trusted CA certificate is not a certificate to renew in the same way, but its expiry and its removal both break applications.
- Look in images and repositories. Certificates and keys baked into container images or committed to source control are both an inventory entry and a secrets finding.
Step 6: Reconcile into one register
With four sources collected, merge them. Reconciliation is where the inventory becomes useful.
- Normalise. Parse every certificate into the same fields, with dates in UTC and names in lower case.
- Deduplicate by fingerprint. One SHA-256 fingerprint is one certificate. Attach every observation, whether a scan hit, a cloud resource or a keystore path, to it as a deployment.
- Link renewals. Group certificates with the same subject and names from the same issuer as successive versions, so that the register shows the current certificate and its history.
- Classify. Mark each certificate as public or private, server or client, managed or manual renewal, and in use or idle.
- Flag gaps. Certificates seen in CT but in no other source, certificates served but absent from any cloud store, certificates from unknown issuers and expired certificates still served all become work items.
The same reconciliation logic applies to other non-human identities. The NHI Inventory Reconciliation guide covers the wider method.
Step 7: Assign owners and keep it current
Ownership is where most inventories stall. Use the application catalogue to propose an owner from the host, cloud account or keystore path, then ask that team to confirm. Escalate unconfirmed certificates on a fixed timetable, and record a default owner, usually the platform team for the device, when no application owner can be found.
Keep the register current with scheduled jobs rather than projects:
- Rescan networks and re-query cloud APIs on a regular schedule, and after major changes.
- Search CT logs for your domains continuously or daily.
- Feed issuance events from your CAs and certificate platforms straight into the register so new certificates appear before they are deployed.
- Review expiry, unowned entries and unknown issuers at a set cadence, with the alert thresholds defined in the register template.
Once the inventory is in place, automation becomes possible. For load balancers, see How to automate certificates on load balancers, and for the protocol side, the ACME and Automated Certificate Management Guide.
Common failure patterns
- Scanning by IP only. Without SNI, a scan records the default certificate and misses every other name on the host.
- Accepting API defaults. Listing ACM certificates without setting key-type and origin filters silently drops ECDSA, larger RSA and ACME-issued certificates.
- One Region or one subscription. Cloud discovery run in the home Region or a single subscription misses everything else.
- Public only. Relying on CT logs and internet scans leaves internal CAs, mTLS client certificates and internal services out of scope.
- Counting certificates, not deployments. A register with one row per certificate but no deployment list cannot drive renewal work.
- Owner field left blank. Entries with no owner are the ones that expire.
- Discovery tool as a key store. Copying keystores and passwords into the inventory tool creates a new concentration of secrets.
- One-off exercise. An inventory built once for an audit is out of date within weeks.
Practitioner checklist
- Agree scope, scanning rules and the register template before any discovery starts.
- Build seed lists of domains, IP ranges, cloud accounts, applications and known CAs.
- Run service-detection TLS scans with SNI from inside and outside the network, and store full PEM certificates.
- Search CT logs for every registered domain and subdomain, and flag unrequested certificates.
- Query every cloud Region, subscription and vault with explicit filters, using read-only identities.
- Locate and list application keystores and trust stores without copying private keys or passwords.
- Deduplicate by SHA-256 fingerprint and record every deployment of each certificate.
- Assign and confirm an owner for every certificate, with a fallback owner and an escalation timetable.
- Schedule rescans, CT searches and reviews, and feed CA issuance events into the register.
Standards and references
- NIST: SP 1800-16, Securing Web Transactions: TLS Server Certificate Management
- NIST: SP 800-53 Rev. 5 (CM-8 System Component Inventory, SC-17 Public Key Infrastructure Certificates)
- IETF: RFC 9162 Certificate Transparency Version 2.0
- Nmap: ssl-cert NSE script documentation
- AWS: ACM ListCertificates API reference
- Microsoft Learn: az keyvault certificate
- Oracle: keytool command reference (Java SE 21)
Related NHI Mgmt Group resources: Certificate Inventory Register Template · Certificate Transparency Monitoring Guide for Web Teams · Machine Identity, PKI and Certificate Lifecycle Guide · NHI Inventory Reconciliation