PKI Platform Integration

Cryptographic Asset Management Platform (CAMP) — discover and assess CA trust anchors and HSMs across your entire PKI estate

What is PKI Platform Integration?

The Root CA Blind Spot

The TYCHON PQC Scanner's port scanning and filesystem walking discover leaf certificates — what endpoints present. But the single highest-priority migration target in any PQC program is the root CA, which is never presented on a TLS handshake. An RSA-2048 root CA issuing all endpoint certificates is critical priority — yet standard port scans never see it.

PKI Platform Integration closes this gap by querying PKI platform APIs directly to enumerate every CA certificate in your forest, assess its quantum readiness, and link CA private keys back to the HSMs that protect them.

🏛️

CA Trust Anchor Discovery

Enumerate root and intermediate CAs from ADCS, Venafi, DigiCert, AWS PCA, and Vault PKI. Keyfactor and Entrust are planned for 2.1.0. Every CA receives a full PQC assessment: key algorithm, quantum readiness, migration priority.

🔒

HSM Hardware Inventory

Detect Thales Luna, Entrust nShield, IBM Crypto Express, AWS CloudHSM, and Vault Transit via filesystem paths, PKCS#11 library detection, and REST APIs. Capture FIPS level, firmware, and PQC algorithm support.

🔗

Certificate Enrichment

When a port-scanned or filesystem-discovered certificate matches a PKI-managed cert by SHA-256 fingerprint, the scan event is automatically enriched with: issuing CA name, template, enrollment URL, renewal days, and revocation status.

CLI Flags

Scan Flags

Flag Type Description
-scan-pki bool Enable PKI platform scanning. Activates all configured platforms in config.enc. Platforms without a config entry are silently skipped.
-scan-hsm bool Enable HSM detection and inventory via filesystem paths, PKCS#11 library enumeration, process scanning, and Vault Transit API.
-pki-enrich bool Enrich port and filesystem cert events with PKI provenance metadata. Default: true when -scan-pki is set. Disable with -pki-enrich=false.
-adcs-cacert string Path to a PEM CA certificate for verifying the ADCS LDAP server's TLS certificate. Use when the DC cert is signed by an internal CA not in the OS trust store.
-adcs-basedn string Override the auto-discovered LDAP base DN. Useful when RootDSE query is blocked by AD policy.

Configuration Flags (write to config.enc — use with -config)

Security note: These flags write credentials into the encrypted config.enc file (AES-256-GCM, PBKDF2-SHA256, 600,000 rounds). They are one-time setup operations. Credentials are never accepted as runtime scan flags.

Flag Platform Description
-config-adcs-user ADCS LDAP bind username (UPN: user@domain.com or DN format). Required on Windows — GSSAPI/Kerberos auto-authentication is only available on Linux and macOS.
-config-adcs-pass ADCS LDAP bind password. Stored encrypted. Refused if -config-adcs-tls none.
-config-adcs-host ADCS LDAP server hostname or IP. Auto-detected via DNS SRV on domain-joined hosts.
-config-adcs-port ADCS LDAP port. Default: 636 (LDAPS). Use 389 with -config-adcs-tls starttls.
-config-adcs-tls ADCS TLS mode: ldaps (default, port 636), starttls (port 389), none (anonymous only — credentials refused).
-config-venafi-apikey Venafi VaaS CyberArk Certificate Manager SaaS API key (UUID format). Activates VaaS mode when set.
-config-venafi-url Venafi TPP Venafi TPP base URL, e.g. https://tpp.corp.com. Activates on-prem TPP mode when set.
-config-venafi-user Venafi TPP TPP service account username (UPN: svc_tychon@corp.com). TPP mode only.
-config-venafi-pass Venafi TPP TPP service account password. Token exchange via /vedauth/authorize at scan time. TPP mode only.
-config-venafi-zone Venafi TPP TPP policy folder scope (e.g. \VED\Policy\Certificates). Defaults to \VED\Policy (all certs). TPP mode only.
-config-keyfactor-url Keyfactor Coming soon Keyfactor Command base URL, e.g. https://keyfactor.corp.com
-config-keyfactor-user / -pass Keyfactor Coming soon Keyfactor API username and password (Basic auth over HTTPS)
-config-digicert-apikey CertCentral CertCentral order key (X-DC-DEVKEY). DigiCert ONE Private CAs require a separate TYCHON_DIGICERT_ONE_API_KEY token and optional TYCHON_DIGICERT_ONE_URL; see the DigiCert guide.
-config-awspca-region AWS PCA AWS region, e.g. us-east-1. Auto-detected from AWS_DEFAULT_REGION env or IMDSv2.
-config-awspca-key / -secret AWS PCA IAM access key and secret (fallback; env vars and instance role checked first).
-config-vault-addr Vault PKI Vault server address, e.g. https://vault.corp.com:8200. Auto-detected via VAULT_ADDR env or local port probe.
-config-vault-token Vault PKI Vault token with read on pki/ca/pem and pki/certs. Also read from VAULT_TOKEN env.

Supported Platforms

PKI Platforms

HSM Platforms

Vendor / Product Detection Method FIPS Level PQC Capable
Thales Luna Network HSM 7 Filesystem paths + PKCS#11 lib 140-3 Level 3 Yes (fw 7.7.1+)
IBM CEX8S (4770 PCIe) Filesystem + CCA/EP11 lib + cssd process 140-3 Level 4 Yes (fw 7.15+)
IBM CEX7S (4769 PCIe) Filesystem + CCA/EP11 lib + cssd process 140-2 Level 4 Limited
Entrust nShield Connect XC Filesystem /opt/nfast + PKCS#11 140-2 Level 3 No
Amazon CloudHSM Gen3 CloudHSM CLI + PKCS#11 lib detection 140-3 Level 3 No
HashiCorp Vault (Transit) Vault API /v1/transit/keys Software Limited
Generic PKCS#11 Device /dev/crypto, /usr/lib/pkcs11/ enumeration Unknown Unknown

Platform Auto-Detection

Each PKI platform connector uses a four-tier priority strategy. In common deployments, you do not need to specify platform URLs — the scanner finds them automatically.

Four-Tier Priority (highest → lowest)

  1. 1
    CLI flag override — always wins. Use -adcs-basedn, -adcs-cacert etc. for one-time overrides without changing stored config.
  2. 2
    config.enc stored value — set once with -config -config-adcs-host dc01.corp.com, used on every subsequent scan.
  3. 3
    Environment variables — VAULT_ADDR, AWS_DEFAULT_REGION, USERDNSDOMAIN, etc.
  4. 4
    Platform-specific probe — DNS SRV, registry keys, filesystem paths, or local port probes. See platform-specific docs for details.

ADCS Auto-Detection

  1. 1. USERDNSDOMAIN env → DNS SRV _ldap._tcp.dc._msdcs.{domain}
  2. 2. Registry HKLM\SYSTEM\...\Netlogon\Parameters\DnsDomainName
  3. 3. Fallback: AdcsHost from config.enc

Vault PKI Auto-Detection

  1. 1. VAULT_ADDR environment variable
  2. 2. gopsutil: vault process running locally
  3. 3. GET http://127.0.0.1:8200/v1/sys/health (1-second timeout)
  4. 4. Fallback: VaultAddress from config.enc

AWS PCA Auto-Detection

  1. 1. AWS_DEFAULT_REGION environment variable
  2. 2. AWS_ACCESS_KEY_ID + AWS_SECRET_ACCESS_KEY env
  3. 3. ~/.aws/credentials INI parse (stdlib)
  4. 4. IMDSv2 PUT/GET (1-second timeout, EC2/ECS only)

Venafi TPP Auto-Detection

  1. 1. VenafiURL from config.enc
  2. 2. Registry HKLM\SOFTWARE\Venafi\Platform\TPPServer

Registry auto-detection only works on the TPP server itself. Set VenafiURL in config.enc for remote scans.

Certificate Enrichment

When -pki-enrich is active (default when -scan-pki is set), the scanner correlates every port-scan and filesystem-discovered certificate against PKI platform records by SHA-256 fingerprint. On match, additional fields are added to the existing scan event — no new events are emitted.

Enrichment Fields Added to port_scan_result / filesystem_certificate_discovered Events

Field Type Description
certificate.pki_managed_bykeywordadcs | venafi_vaas | venafi_tpp | digicert | aws_pca | vault_pki | keyfactor* | entrust* (*planned 2.1.0)
certificate.pki_platform_hostkeywordPKI platform server hostname
certificate.pki_issuing_cakeywordName of the issuing CA in the PKI platform
certificate.pki_templatekeywordCertificate template name (ADCS) or equivalent profile
certificate.pki_enrollment_urlkeywordEnrollment URL used to issue this certificate
certificate.pki_renewal_daysintegerDays until certificate renewal (from PKI lifecycle record)
certificate.pki_revocation_statuskeywordvalid | revoked | suspended

Highest value in remote mode: One PKI platform query enriches thousands of port-scan cert discoveries fleet-wide. Run -scan-pki -mode remote -host targets.txt against 500 servers — every TLS cert found on every remote target gets enriched from a single ADCS or Venafi query.

Output Event Schema

pki_ca_discovered — CA certificate found via PKI API

{
  "event": {
    "action": "pki_ca_discovered",
    "category": ["configuration"],
    "dataset": "pki_certificate",
    "type": ["info"]
  },
  "tychon": {
    "pki": {
      "platform": {
        "type": "adcs",
        "vendor": "Microsoft",
        "product": "Active Directory Certificate Services",
        "host": "dc01.corp.example.com",
        "source_proto": "ldap"
      },
      "ca": {
        "name": "Corp-Root-CA",
        "type": "root",
        "status": "active",
        "hsm_backed": true,      // heuristic: set when an HSM is detected on the same host as the CA process — not cryptographic proof
        "hsm_vendor": "Thales",
        "quantum_ready": false,
        "pqc_vulnerable": true,
        "migration_priority": "critical",
        "enrollment_url": "https://dc01.corp.com/certsrv/mscep/mscep.dll"
      }
    }
  },
  "x509": {
    "serial_number": "...",
    "subject": { "distinguished_name": "CN=Corp-Root-CA,DC=corp,DC=example,DC=com" },
    "public_key_algorithm": "RSA",
    "public_key_size": 2048
  },
  "certificate": {
    "sha256_fingerprint": "...",
    "is_ca": true,
    "source_file_path": "ldap://dc01.corp.example.com/CN=Corp-Root-CA,..."
  },
  "pqc": {
    "vulnerable": true,
    "quantum_risk": "high",
    "migration_priority": "critical"
  }
}

hsm_discovered — HSM device found

{
  "event": {
    "action": "hsm_discovered",
    "category": ["configuration", "host"],
    "dataset": "hsm",
    "type": ["info"]
  },
  "tychon": {
    "hsm": {
      "vendor": "Thales",
      "product": "Luna Network HSM 7",
      "model": "A790",
      "firmware_version": "7.7.1",
      "fips_level": "140-3",
      "fips_level_number": 3,
      "quantum_capable": true,
      "pqc_algorithms": ["ML-DSA-65", "ML-KEM-768"],
      "integration_type": "pkcs11",
      "detection_method": "filesystem_path"
    }
  }
}

Integration Notes

PKI scan runs independently of scan mode

-scan-pki is independent of the port-scan mode (-mode local or -mode remote). The ADCS LDAP query, Vault REST calls, and AWS PCA API calls run regardless of which mode the port scanner is in. This means you can use -mode remote -scan-pki to enumerate a PKI platform without running a full local scan:

# Fast PKI-only scan — skip local filesystem/process overhead
./build/certscanner -mode remote -host dc01.corp.com -ports 636,443 -scan-pki -insecure \
  -outputformat flatndjson -posttoelastic

This runs in seconds and emits only the PKI platform events — useful for validation and scheduled PKI-only inventory jobs.

Cross-scanner PKI certificate deduplication

PKI platform certificate IDs are anchored to the certificate, not to the scanner host. Scanning the same ADCS domain, Vault instance, or AWS PCA CA from two different machines produces the same event.id for the same certificate. Subsequent scans upsert the existing Elasticsearch document rather than creating duplicates.

// event.id = SHA-256( "pki_certificate" | sha256_fingerprint | serial_number | source_path )
— observer host ID intentionally excluded
— source path encodes the PKI server address (prevents cross-server collisions)

This differs from filesystem certificate events, which include the observer host ID so the same file on two different endpoints produces distinct records.

PKI certificate quantum grade

Every PKI platform certificate event receives a quantum readiness grade using a cert-intrinsic 100-point formula. Two fields are emitted on all pki_certificate events:

Field Type Example Description
tychon.crypto.gradekeywordCLetter grade A+/A/B/C/D/F
tychon.crypto.grade_scoreinteger57Numeric score 0–100
4-component formula (100 pts total):
Key Algorithm
60 pts — PQC level, curve, RSA bit size
Signature Hash
15 pts — SHA-256/384/PQC/SHA-1/MD5
Lifetime & Validity
15 pts — expiry timeline + shelf-life deductions
Chain Trust
10 pts — self-signed = 5, signed = 10

An A grade is unreachable without a PQC key. RSA-2048 + SHA-256 + valid ≈ 57 → C. See Quantum Readiness Scoring — PKI Certificate Grade for the full formula and examples.

Certificate date field standard

All certificate event types emit a common set of date fields so Kibana / Splunk queries work consistently across TLS port-scan, filesystem, PKI, keystore, and app cert events:

Field Format Status Present On
x509.not_beforeRFC 3339PrimaryAll cert event types
x509.not_afterRFC 3339PrimaryAll cert event types
certificate.not_beforeRFC 3339PrimaryAll cert event types
certificate.not_afterRFC 3339PrimaryAll cert event types
x509.validity.not_beforeRFC 3339DeprecatedTLS port-scan certs only
x509.validity.not_afterRFC 3339DeprecatedTLS port-scan certs only
tls.certificate.not_afterRFC 3339DeprecatedKeystore certs only

Deprecated fields are retained for backwards compatibility with existing dashboards and will not be removed. Build new Kibana / Splunk queries using x509.not_after and certificate.not_after.

Quick Start

1. Domain-joined Windows host

On Windows, ADCS auto-detects via DNS SRV but GSSAPI/Kerberos is not available — store credentials once with -config-adcs-user, then scan with no extra flags:

# One-time credential setup
tychon-certscanner.exe -config -config-adcs-user "user@DOMAIN.COM" -config-adcs-pass "password"

# Subsequent scans (credentials loaded from config.enc)
tychon-certscanner.exe -scan-pki -outputformat flatndjson

2. Domain-joined Linux/macOS host (zero config)

On a domain-joined Linux or macOS host with an active Kerberos credential cache, ADCS auto-detects via DNS SRV and authenticates via GSSAPI — no credentials required:

./tychon-certscanner -scan-pki -outputformat flatndjson

3. Non-domain host with stored credentials

First, store credentials once (this writes to config.enc):

tychon-certscanner -config \
  -config-adcs-host dc01.corp.example.com \
  -config-adcs-user scanner@corp.example.com \
  -config-adcs-pass "secure-password"

Then scan — credentials loaded automatically:

tychon-certscanner -scan-pki -outputformat flatndjson

3. ADCS + filesystem scan + enrichment

Scan filesystem, port scan, enumerate ADCS CAs, and enrich all cert discoveries with PKI provenance:

tychon-certscanner \
  -scanfilesystem \
  -scan-pki \
  -outputformat flatndjson \
  -output /tmp/scan-results.ndjson

4. Internal CA cert for LDAP TLS verification

When the DC's TLS certificate is signed by an internal CA not in the OS trust store:

tychon-certscanner -scan-pki \
  -adcs-cacert /etc/ssl/certs/corp-root-ca.pem \
  -outputformat flatndjson