DEV Community

Cover image for Subscribers in PKI: Who Actually Uses the Certificates
Divyanshu Soni
Divyanshu Soni

Posted on

Subscribers in PKI: Who Actually Uses the Certificates

Imagine this scenario:

You've just set up a Private CA for your organization following best practices. You've got your root CA secured offline, intermediate CAs issuing certificates, and your policies are locked down. Everything looks perfect on paper.

Then reality hits:

  • Your microservices can't talk to each other because certificate SANs don't match the internal DNS names.
  • A certificate expires at 2 AM on a Saturday, taking down your entire API gateway.
  • Your IoT devices can't authenticate because someone forgot to provision certificates during manufacturing.
  • An engineer leaves the company, but their client certificate still grants VPN access two months later.

Here's the thing: you can have the most sophisticated PKI setup in the world, but if you don't understand subscribers, you'll still face production incidents.

When most developers learn about PKI, they focus on Certificate Authorities, trust chains, and cryptographic algorithms. These are important, but they're just infrastructure. The real question is:

  • Who actually uses these certificates?
  • Where do they get deployed?
  • How do they prove identity in real systems?

That's where subscribers come in. They're not theoretical concepts, they're the real-world actors in your PKI system: the web server presenting a certificate when a browser connects, the microservice authenticating itself to another service, the IoT device proving its identity to your cloud backend, and the employee using a certificate to access your VPN.

Understanding subscribers means understanding how PKI actually works in production. It's the difference between having a certificate infrastructure and having one that actually secures your systems without breaking them.

List of Subscribers


What Exactly Is a Subscriber in PKI?

A subscriber is any entity (human, service, device, or application) that has been issued a digital certificate and actually uses it for cryptographic operations.

This could be:

  • A web server using a certificate to enable HTTPS connections.
  • A microservice presenting a client certificate for mutual TLS (mTLS).
  • An IoT device authenticating itself with an embedded certificate.
  • An employee using a certificate stored on a smart card to access company resources.

Here's the key part: the subscriber doesn't just have a certificate. They actively use it to prove their identity, encrypt communications, and sign data.

Think of it like this: if a Certificate Authority is like a passport office that issues passports, then subscribers are the people who actually use those passports when they travel. The passport (certificate) only becomes useful when someone presents it at border control (authentication).

How Subscribers Fit Into the PKI Ecosystem

The certificate binds identity to cryptography:

  • The subscriber gets a certificate that contains their identity information (like a domain name or service name) and a public key.
  • The subscriber keeps the corresponding private key secret and secure.
  • When the subscriber needs to prove who they are, they present the certificate and use the private key to perform cryptographic operations.

Subscribers interact with relying parties:

  • A relying party is anyone who needs to verify a subscriber's identity (like a browser verifying a website's certificate).
  • The relying party checks: Is this certificate signed by a CA I trust? Does the identity match? Is it still valid?

The trust chain connects everything:

  • The subscriber's certificate is signed by an intermediate CA, which is signed by a root CA.
  • The relying party trusts the root CA, so they can trust the entire chain down to the subscriber.

Roles in PKI: A Simple Breakdown

Role What They Do
CA / Issuer Issues and signs certificates; establishes the trust root.
Subscriber Holds certificate + private key; uses the cert to prove identity or encrypt traffic.
Relying Party Verifies the subscriber's certificate; decides whether to trust it based on CA rules.

Types of Subscribers: Who Actually Uses Certificates?

Not all subscribers are created equal. Different types have different needs, challenges, and configurations.

1. Servers, Applications, and Websites

Examples: Web servers, API endpoints, load balancers

What they need:

  • Domain names correctly listed in the certificate's SANs.
  • Certificate chains to a trusted CA.
  • Ability to renew certificates without causing downtime.

Common challenges:

  • Expired certificates taking entire sites offline.
  • Misconfigured domains causing browser warnings.
  • Downtime during certificate renewal.

2. Internal Services and Microservices

Examples: Kubernetes pods, service mesh sidecars, backend APIs

What they need:

  • Both client and server certificates for mutual TLS (mTLS).
  • Short-lived certificates (hours or days).
  • Service identities in SANs matching internal DNS.
  • Automated certificate rotation.

Common challenges:

  • SAN mismatches causing TLS handshake failures.
  • Manual renewal becoming impossible at scale.

This creates a zero-trust network where every service must prove its identity on every request.

3. Devices: IoT and Edge Computing

Examples: Smart sensors, cameras, industrial equipment

What they need:

  • Secure provisioning of keys and certificates during manufacturing.
  • Lightweight certificates for constrained devices.
  • Ability to work offline or with intermittent connectivity.

Common challenges:

  • Securely provisioning certificates into millions of devices.
  • Revoking certificates for offline devices.
  • Resource constraints requiring lightweight crypto (ECC over RSA).

4. Users and People

Examples: Employees using client certs for VPN, S/MIME for email, smart cards

What they need:

  • Identity proofing before certificate issuance.
  • Secure private key storage (smart cards, hardware tokens).
  • User-friendly enrollment and renewal processes.

Common challenges:

  • Lost or stolen credentials requiring fast revocation.
  • Difficult certificate installation for non-technical users.
  • Multi-device complexity.

Real-World Subscriber Use Cases

Use Case 1: Securing a Public Website with TLS

The scenario: You run https://shop.example.com and customers need to trust they're connecting to your real site.

How it works:

  1. Customer connects to your web server.
  2. Server presents its TLS certificate.
  3. Browser validates: signed by trusted CA, correct domain in SAN, not expired.
  4. If valid, encrypted connection established.

Why it matters: Without this, customers see "Your connection is not private" warnings and leave.

Use Case 2: Microservices with Mutual TLS (Zero Trust)

The scenario: Dozens of microservices in Kubernetes need to authenticate each other.

How it works:

  1. Service A presents a client certificate to Service B.
  2. Service B presents its server certificate to Service A.
  3. Both verify each other's certificates against the internal CA.
  4. Communication proceeds only if both are valid.

Tools that help: cert-manager (Kubernetes), service meshes (Istio, Linkerd)

Use Case 3: IoT Device Authentication

The scenario: Smart temperature sensors need to securely send data to your cloud backend.

How it works:

  1. Device provisioned with certificate during manufacturing.
  2. Device presents certificate when connecting to cloud.
  3. Backend verifies certificate to confirm legitimate device.
  4. Encrypted sensor data flows securely.

Why it matters: Prevents hackers from injecting false data.

Use Case 4: Employee VPN Access

The scenario: Employees access internal resources remotely using certificates instead of just passwords.

How it works:

  1. VPN server requests client certificate.
  2. Employee's device presents certificate.
  3. VPN verifies certificate is signed by company CA and not revoked.
  4. Access granted.

Why it matters: Much harder to phish than passwords alone.


The Certificate Lifecycle: From a Subscriber's Perspective

Understanding the complete lifecycle helps you manage subscribers effectively:

  1. Key Generation → Subscriber creates a private/public key pair. Private key must stay secret.

  2. Certificate Signing Request (CSR) → Subscriber creates CSR containing public key and identity info.

  3. Issuance → CA validates identity and signs the certificate.

  4. Deployment and Use → Subscriber installs cert + key and uses it for TLS, signing, or encryption.

  5. Validation → Relying parties check: signed by trusted CA? Identity matches? Valid and not revoked?

  6. Renewal and Rotation → Before expiry, subscriber gets a new certificate (automate this!).

  7. Revocation → If compromised or decommissioned, CA revokes the certificate via CRL/OCSP.

  8. Monitoring → Track expiry dates, handshake failures, and certificate usage.


Configuration Example: Kubernetes with cert-manager

Let's look at how subscribers work in Kubernetes using cert-manager.

Scenario: Microservice service-a needs a certificate for mTLS.

Step 1: Set Up an Issuer

apiVersion: cert-manager.io/v1
kind: Issuer
metadata:
  name: internal-ca-issuer
  namespace: default
spec:
  ca:
    secretName: internal-ca-secret
Enter fullscreen mode Exit fullscreen mode

Step 2: Request a Certificate

apiVersion: cert-manager.io/v1
kind: Certificate
metadata:
  name: service-a-cert
spec:
  secretName: service-a-tls
  issuerRef:
    name: internal-ca-issuer
  commonName: service-a.default.svc.cluster.local
  dnsNames:
    - service-a.default.svc.cluster.local
  duration: 24h
  renewBefore: 6h
  privateKey:
    algorithm: ECDSA
    size: 256
Enter fullscreen mode Exit fullscreen mode

What happens automatically:

  1. cert-manager generates key pair and CSR.
  2. Submits CSR to internal CA.
  3. CA signs certificate.
  4. cert-manager stores cert and key in Kubernetes Secret.
  5. After 18 hours, automatically renews.

Result: No manual intervention. No outages from expired certificates.


Common Pitfalls and How to Avoid Them

Pitfall 1: Identity Mismatches (CN/SAN Errors)

Problem: Certificate SANs don't match the hostname clients connect to.

Solution:

  • Always use Subject Alternative Names (SANs).
  • List all possible names in the SANs.
  • Test handshakes in staging.

Pitfall 2: Forgotten Renewals

Problem: Certificates expire and services break.

Solution:

  • Use short-lived certificates.
  • Automate renewal (ACME, cert-manager).
  • Set up expiry alerts.

Pitfall 3: Revocation Issues

Problem: Revoked certificates still trusted because relying parties don't check.

Solution:

  • Configure CRL/OCSP checking.
  • Use short-lived certs to reduce revocation window.
  • Test revocation process.

Pitfall 4: Private Key Leaks

Problem: Keys stored insecurely, attackers can impersonate subscribers.

Solution:

  • Never store keys in source code or container images.
  • Use HSMs, TPMs, or Kubernetes Secrets with RBAC.
  • Rotate keys regularly.

Pitfall 5: Trust Misconfigurations

Problem: Relying parties don't have correct root CA installed.

Solution:

  • Standardize CA trust roots across environments.
  • Use configuration management tools.
  • Test validation in each environment.

Pitfall 6: Scaling Problems

Problem: Manual certificate management breaks down at scale.

Solution:

  • Automate everything from day one.
  • Use cert-manager, Vault, or cloud PKI services.
  • Enforce short-lived certificates.

Modern Trends in Subscriber Management

1. Zero Trust Architecture

  • Every service, device, and user must prove identity on every request.
  • mTLS becomes standard.
  • Tools: Istio, Linkerd, SPIFFE/SPIRE.

2. Passwordless Authentication

  • Replace passwords with certificates on hardware tokens.
  • Tools: WebAuthn, FIDO2, smart cards.

3. IoT Fleet Management

  • Managing certificates for millions of devices.
  • Tools: AWS IoT Core, Azure IoT Hub, Google Cloud IoT.

4. Managed PKI Services

  • Cloud-managed instead of running your own CA.
  • Examples: AWS Private CA, Azure Key Vault, Infisical PKI.

5. Code and Container Signing

  • Developers and CI/CD pipelines become subscribers.
  • Tools: Sigstore, Docker Content Trust.

Best Practices for Managing Subscribers

1. Automate the Entire Lifecycle

  • Don't rely on manual processes.
  • Tools: cert-manager, ACME, Infisical, Vault.

2. Use Short-Lived Certificates

  • Hours or days, not months or years.
  • Forces automation, reduces revocation complexity.

3. Always Use Subject Alternative Names (SANs)

  • Common Name (CN) is deprecated.
  • List all valid identities in SANs.

4. Protect Private Keys

  • Generate keys on the device that will use them.
  • Use HSMs or TPMs for high-value keys.
  • Never store in source code or public registries.

5. Monitor and Alert

  • Track certificate expiration dates.
  • Monitor TLS handshake failures.
  • Alert well before expiry.

6. Plan for Revocation

  • Publish CRLs or provide OCSP endpoints.
  • Test revocation process regularly.

7. Standardize CA Trust Across Environments

  • Distribute root CAs consistently.
  • Test validation in dev, staging, production.

8. Enforce Strong Cryptography

  • RSA: 2048-bit minimum.
  • ECC: 256-bit minimum.
  • Avoid MD5, SHA-1.

Conclusion

Subscribers are where PKI stops being theoretical and becomes practical. They're the servers proving their identity, the microservices authenticating each other, the IoT devices securing infrastructure, and the employees accessing VPNs.

Key takeaways:

  • Subscribers are the real actors in PKI - Every certificate exists to be used by a subscriber.
  • Different types have different needs – Servers, microservices, devices, and users each face unique challenges.
  • Automate the lifecycle – Manual processes don't scale. Use cert-manager, ACME, and PKI management platforms.
  • Protect private keys – If they leak, the entire infrastructure fails.
  • Monitor proactively – Track expiration, handshake failures, and revocation status.
  • Subscribers determine PKI success – Expired certificates, misconfigured SANs, and leaked keys all trace back to subscriber management.

Understanding subscribers isn't just theory. It's about keeping your systems secure, available, and trustworthy. Whether you're securing a public website, building a zero-trust microservices architecture, managing an IoT fleet, or enabling passwordless authentication, subscribers are at the heart of it all.

Now that you understand what subscribers are, how they work, and how to manage them effectively, you're equipped to build and maintain secure PKI systems that actually work in production.

Top comments (0)