Skip to content

Secure Service Communication: CNPA practice questions

Secure service communication means that when one workload calls another, both sides can be sure who they are talking to, the traffic cannot be read or altered in transit, and only permitted calls get through.

By Ibrahim Yesilay · Published · Updated

Independent community practice, not affiliated with or endorsed by CNCF or The Linux Foundation.

What Secure Service Communication covers in CNPA

Secure service communication means that when one workload calls another, both sides can be sure who they are talking to, the traffic cannot be read or altered in transit, and only permitted calls get through. In a cluster where Pods come and go and IP addresses are reused, network location is a weak identity, so cloud-native platforms move toward cryptographic workload identity and mutual TLS, in which both client and server present certificates.

SPIFFE is a set of open-source standards for that identity. A SPIFFE ID is a URI of the form spiffe://trust-domain/workload-identifier, for example spiffe://acme.com/billing/payments. The trust domain corresponds to the trust root of a system, and SPIFFE advises keeping workloads in different locations or with different security practices, such as staging and production, in distinct trust domains. A workload proves its identity with an SVID, a SPIFFE Verifiable Identity Document, which is either an X.509 certificate or a JWT. Because tokens can be replayed if intercepted, SPIFFE recommends X.509-SVIDs wherever possible. Through the Workload API a workload receives its identity, a private key and a short-lived certificate, plus a trust bundle for verifying other workloads. SPIRE is a production-ready implementation of the SPIFFE APIs that attests nodes and workloads before issuing SVIDs.

Service meshes apply the same ideas without changing application code. Istio gives every workload a strong identity, which on Kubernetes is its service account, and its control plane, istiod, acts as the certificate authority that signs certificates for the proxies and repeats the process periodically for rotation. Proxies then establish mutual TLS between workloads and act as policy enforcement points. A PeerAuthentication policy sets the mode: PERMISSIVE accepts both mutual TLS and plain text, which helps during a migration while some clients still lack a sidecar, and STRICT accepts only mutual TLS. Istio's documentation recommends switching to STRICT once workloads are migrated. Authorization policies then control which identities may reach which workloads.

Kubernetes NetworkPolicy works at a different layer. It controls traffic at the IP address or port level, layer 3 or 4, and is only enforced if the cluster's network plugin supports it. By default Pods are non-isolated and all connections are allowed; once a policy selects a Pod for a direction, only the traffic that policies allow gets through. Network policies and mTLS complement each other: one limits which connections can be made, the other proves identity and encrypts what flows over them.

The Platforms White Paper lists identity and secret services, with SPIFFE/SPIRE and cert-manager among the examples, as a platform capability, so application teams do not have to manage certificates themselves.

Misconceptions include treating TLS at the ingress as enough for traffic inside the cluster, believing NetworkPolicies encrypt traffic, and leaving a mesh in permissive mode for good.

At associate level, expect questions on what mTLS adds over one-way TLS, how SPIFFE IDs and SVIDs work, the difference between permissive and strict modes, and when to use network policies versus mesh authorization.

Key points

  • A SPIFFE ID is a URI, spiffe://trust-domain/path; an SVID is an X.509 certificate or a JWT that proves it.
  • SPIFFE prefers X.509-SVIDs because JWTs can be replayed if intercepted.
  • Istio PERMISSIVE mode accepts mTLS and plain text; STRICT accepts only mTLS.
  • NetworkPolicy filters at layer 3/4 and needs a network plugin that enforces it; it does not encrypt.

Three sample questions

8 CNPA questions on Secure Service Communication, 8 with explanations. How practice works

Question 1

A team is enabling Istio mutual TLS while some clients outside the mesh still send plaintext. Which Istio feature lets a service accept both kinds of traffic during the migration?
  1. A.Strict mode
  2. B.Permissive mode
  3. C.A Kubernetes NetworkPolicy
  4. D.Disabling the sidecar on the service

Correct answer: B

Istio's security concepts describe a permissive mode that allows a service to accept both plaintext traffic and mutual TLS traffic at the same time, which the docs say greatly improves the mutual TLS onboarding experience. Why the other options are wrong. "Strict mode": Strict mode accepts only mutual TLS, so the plaintext clients would be rejected. "A Kubernetes NetworkPolicy": NetworkPolicy filters traffic at layer 3/4; it does not negotiate or accept TLS modes. "Disabling the sidecar on the service": Removing the proxy removes mutual TLS for that workload instead of migrating to it.

Sources: CNCF CNPA curriculum (CNPA_Curriculum.pdf), Istio: Security concepts

Question 2

In SPIFFE, what is an SVID?
  1. A.A trust bundle of CA certificates used to check other workloads' identities
  2. B.A string such as spiffe://acme.com/billing/payments that uniquely names the workload
  3. C.A Kubernetes ServiceAccount token that the kubelet mounts into the Pod
  4. D.A signed document a workload presents to prove its identity within a trust domain

Correct answer: D

SPIFFE concepts define an SVID (SPIFFE Verifiable Identity Document) as the document with which a workload proves its identity to a resource or caller; it is valid if it has been signed by an authority within the SPIFFE ID's trust domain. X.509 and JWT forms exist. Why the other options are wrong. "A trust bundle of CA certificates used to check other workloads' identities": A trust bundle is used to verify SVIDs presented by others; it is not the workload's own identity document. "A string such as spiffe://acme.com/billing/payments that uniquely names the ...": That string is a SPIFFE ID, the name of the workload; the SVID is the signed document that carries it. "A Kubernetes ServiceAccount token that the kubelet mounts into the Pod": A ServiceAccount is a Kubernetes identity; an SVID is the SPIFFE identity document, which can be an X.509 certificate or a JWT.

Sources: CNCF CNPA curriculum (CNPA_Curriculum.pdf), SPIFFE concepts

Question 3

Why are the private keys and X.509-SVIDs delivered by the SPIFFE Workload API short-lived?
  1. A.Because the TLS protocol does not allow certificates that are valid for long periods.
  2. B.To limit the damage if a key leaks; keys rotate automatically before they expire.
  3. C.To force operators to reissue every certificate by hand once a day as a security check.
  4. D.Because an SVID can be used for only a single connection and must then be replaced.

Correct answer: B

The SPIFFE concepts page states that to minimize exposure from a key being leaked or compromised, all private keys and certificates are short-lived and rotated frequently and automatically, and workloads can request new keys and trust bundles from the Workload API before the current ones expire. Why the other options are wrong. "Because the TLS protocol does not allow certificates that ...": TLS itself permits long-lived certificates; the short lifetime is a SPIFFE design choice for security. "To force operators to reissue every certificate by hand ...": Rotation is automatic; avoiding manual handling is part of the design. "Because an SVID can be used for only a ...": An SVID is valid until it expires and can be used for many connections.

Sources: CNCF CNPA curriculum (CNPA_Curriculum.pdf), SPIFFE concepts

Practice this topic

Focus mode keeps every question on Secure Service Communication until you leave it. 10 free guest answers, then a free account; no credit card.

Or open CNPA practice across all topics.

Sources

The explanation above was checked against these official documents.