API Security, Authentication and Authorization Questions
Controlling who can call an API, what they may do, and defending it against abuse. Covers the access-control mechanics: API keys, OAuth 2.0 flows, OpenID Connect, JWT issuance/validation, session vs. token auth, scopes/roles for fine-grained authorization, token lifetime and refresh, mutual TLS, and machine-to-machine vs. user-delegated access. Also covers the adversarial hardening view: input validation, injection and deserialization risks, broken object-level authorization (BOLA), mass assignment, secrets handling, and the OWASP API Security Top 10, plus securing data in transit, preventing enumeration/scraping, and testing APIs for vulnerabilities.
Compare opaque tokens versus self-contained JWTs for service-to-service authentication in a distributed microservices environment. Discuss performance (validation latency), revocation complexity, payload confidentiality, token size, caching implications, and give recommendations for hybrid approaches that balance stateless validation with revocation needs.
Sample Answer
Direct answer
Opaque tokens trade a network round trip (an introspection call to the issuer) for instant, centralized revocation. Self-contained JSON Web Tokens (JWTs) trade that centralized control for fast, local, offline validation. In a distributed machine-to-machine (M2M) environment at real scale, most teams land on a hybrid: short-lived signed JWTs as the default, since the overwhelming majority of calls should need zero network hop to validate, backed by a narrow, fast-path mechanism for the rare "kill this credential right now" case.
Structured elaboration
| Dimension | Opaque token | Self-contained JWT |
|---|---|---|
| Validation latency | Every validating service calls the issuer's introspection endpoint, adding a network hop and making the issuer a shared, latency-sensitive dependency at scale | Local signature check only, using a cached public key, no network call, scales horizontally with the caller itself |
| Revocation | Trivial: the issuer marks the token invalid, the very next introspection call reflects it | Hard: the token is valid until its exp claim regardless of what the issuer now wants, unless you add an auxiliary mechanism |
| Payload confidentiality | The token itself carries no information; a captured token reveals nothing without querying the issuer | Claims are base64url-encoded, not encrypted, by default, readable by anyone holding the token, including any intermediary that logs or proxies it |
| Token size | Small and fixed, often just an opaque identifier | Grows with claim count, adding real header overhead on every call at high queries-per-second (QPS) if claims bloat |
| Caching implications | Services cache introspection results, reintroducing a staleness-versus-load trade-off on top of the revocation problem itself | Services cache the issuer's signing keys (via a JWKS, JSON Web Key Set, endpoint), which change rarely, so this cache is cheap and carries no correctness trade-off |
Why revocation is the real fork in the road: because a JWT is self-contained, "revoking" it does not mean anything to the token itself, the signature still verifies and the claims are still readable. Real revocation for JWTs requires bolting on state: short time-to-live (TTL) values as the default mitigation (bounding the exposure window), a deny-list checked at validation time (which reintroduces a lookup, partially undoing the statelessness benefit you adopted JWTs for), or issuer-side generation/versioning per client.
Worked example
Consider a service mesh where an order service calls an inventory service, which calls a pricing service, on every checkout request. With opaque tokens, each of those two internal hops adds a full round trip to the issuer's introspection endpoint before the call is even allowed to proceed, meaning a single external request now pays for multiple serial introspection calls stacked on top of its own logic. With signed JWTs, each hop verifies the caller's token locally against a cached public key, no extra network dependency introduced by authentication itself. This qualitative difference, not a specific millisecond figure, is why introspection-per-call does not scale cleanly as call chains get deeper.
Recommendations for a hybrid approach
- Default to short-lived signed JWTs (minutes, not hours, since machine-to-machine calls do not need a human to reauthenticate) so the common case stays local and fast.
- Pair that with a lightweight, narrow deny-list checked only for the rare case that actually needs it (a compromised service account, a discovered key leak), not on every single request; expire each deny-list entry once the underlying JWT would have expired anyway, so the extra state stays bounded rather than growing forever.
- Support issuer-side token-family versioning (bumping a minimum-issued-at cursor per client) so you can cheaply invalidate every future token for a specific caller, checked at the same low frequency as the JWKS cache refresh, without a per-request lookup.
- Reserve opaque tokens plus introspection for genuinely high-stakes, low-volume paths, such as issuing a brand-new elevated-privilege credential, where the extra round trip is an acceptable cost for tighter control.
Trade-offs & pitfalls
Choosing JWTs everywhere and ignoring the revocation gap is a common answer that sounds clean but quietly assumes a compromised credential is an acceptable risk for its full remaining lifetime. Choosing opaque tokens everywhere under-appreciates that introspection becomes the single most-called, most latency-sensitive endpoint in the whole system as call volume grows. A subtler pitfall: forgetting that JWT claims are readable, not encrypted, and putting anything genuinely secret into a claim, where it is visible to every intermediary that ever sees the token.
Propose a policy and system to rotate and revoke long-lived API keys across 10,000 services and 1,000,000 keys with minimal client disruption. Describe centralized vs decentralized rotation, key versioning in the backend, publish/subscribe propagation of revocations, client notification strategies, and emergency revocation mechanisms.
Sample Answer
At this scale, rotation and revocation need two separate paths. A slow, scheduled, centrally-governed rotation path spreads renewal load evenly so no client hits a re-provisioning cliff, and a fast, decentralized emergency-revocation path propagates a deny-list to every enforcement point in well under a minute, independent of the normal rotation cadence.
Architecture
- Central Key Management Service (KMS) / policy plane: owns key metadata, versioning, audit trail, and issues new key versions.
- Publish/subscribe event bus (a durable, replicated event log such as Kafka): carries
KEY_CREATED,KEY_DEPRECATED, andKEY_REVOKEDevents. - Distributed enforcement: API gateways or sidecars at each of the 10,000 services keep a locally-cached deny-list refreshed via the event bus, so the request hot path never makes a synchronous call to the central KMS.
flowchart LR
KMS[Central Key Management Service] -- publishes --> Bus[(Pub/Sub Event Bus)]
Bus -- KEY_REVOKED event --> GW1[Gateway A]
Bus -- KEY_REVOKED event --> GW2[Gateway B]
GW1 -- local deny-list lookup --> SvcA[Services Group A]
GW2 -- local deny-list lookup --> SvcB[Services Group B]
GW1 -. periodic reconciliation poll .-> KMS
Key versioning
Every logical key has immutable versions, key_id:v1, key_id:v2, and so on. Metadata tracks status (ACTIVE, DEPRECATED, REVOKED), creation time, and a grace-period expiry. Rotation creates vN+1 as ACTIVE, marks vN DEPRECATED with an overlap window, then flips vN to REVOKED once that window closes.
Centralized vs decentralized rotation
Central, scheduled rotation is predictable and easy to audit, but the control plane must stay highly available at this scale. Decentralized, delegated rotation, where a service requests its own rotation via a signed delegation token, reacts faster to local conditions but needs strict policy bounds so a compromised service can't mint arbitrary keys. In practice, a hybrid works best: a central schedule for routine rotation, plus delegation tokens for services that need to self-rotate within policy limits.
Propagation
Each event carries key_id, new_version, action, a sequence_number, and a signature, so gateways can apply updates idempotently and reject replayed or spoofed events. Because pub/sub delivery is only "eventually" reliable in practice, a periodic reconciliation poll against the central store (for example, every 30 seconds) acts as a safety net for any gateway that missed an event.
Client notification
Passive: SDKs read the active and previous key version at startup and accept both during the grace window. Active: a webhook or push notification to registered service owners at rotation time, and again shortly before the grace window closes. Fallback: sidecars poll the KMS on a backoff schedule if their event-bus connection drops.
Emergency revocation
An admin or automated detector triggers a REVOKE, published on a high-priority channel ahead of routine rotation traffic. Gateways apply it to their local deny-list immediately on receipt, a hash-set or Bloom filter lookup (a compact, probabilistic structure that can quickly say "definitely not revoked" or "maybe revoked," trading a small false-positive rate for speed and low memory), so no round trip is added to the request path. Any client not currently connected to the bus is still caught by the periodic reconciliation poll, which bounds the worst-case exposure window to the poll interval rather than to the routine rotation cadence.
Worked example
Fleet size: 1,000,000 keys across 10,000 services, an average of 100 keys per service. Under a 90-day max-age rotation policy, spreading rotations evenly means rotating 1,000,000 / 90 ≈ 11,112 keys per day, avoiding the rotation storm a naive "rotate everything on day 90" policy would cause. The grace window is 72 hours, so a service that only reads its key at deploy time still has three days to pick up the new version before the old one is revoked. On the emergency path, if the reconciliation poll runs every 30 seconds, the worst-case time from "revoke pressed" to "rejected at every one of the 10,000 gateways" is bounded by that 30-second interval, completely independent of the 72-hour grace window used for routine rotation.
Trade-offs and pitfalls
Rotating too aggressively burns client engineering time on re-provisioning; too rarely widens the compromise blast radius, the 90-day and 72-hour figures above are a starting policy to tune against your own data sensitivity, not a fixed rule. A fully centralized design is simple to audit but makes the KMS a single point of failure at 1,000,000-key scale, hence the pub/sub fan-out to cached edge deny-lists instead of a synchronous per-request call. Bloom filters give O(1) local revocation checks with a tunable false-positive rate, but that rate must be sized (or backed by a periodic exact-set refresh) so it never wrongly allows a revoked key, only, at worst, wrongly flags a small number of valid ones for a slower fallback check. A common wrong turn is relying on pub/sub alone with no polling backstop, a single dropped message then leaves a revoked key valid indefinitely at that node.
Sketch out a zero-trust authentication model for internal microservices spanning multiple clusters: include mutual TLS for service identity, short-lived JWTs for delegated downstream requests, an automated certificate/key rotation plan, and how to perform token exchange when cross-account or cross-tenant permissions are needed.
Sample Answer
Direct answer
Layer two distinct credentials that answer two distinct questions. Mutual TLS (mTLS) proves which service is calling, a machine identity established at the transport layer via a cluster-local certificate authority. A short-lived JSON Web Token (JWT) proves on whose behalf, and with what permissions, an application-layer, delegated credential. Crossing a cluster or tenant boundary adds a third step, token exchange, where a service presents both its own mTLS identity and the inbound JWT to receive back a new, narrower-scoped token valid only for the target boundary.
Structured elaboration
Mutual TLS for service identity
Every service gets a short-lived X.509 certificate issued by an internal certificate authority (CA), typically via a service mesh sidecar or a workload-identity system. The TLS handshake becomes mutual, the server verifies the client's certificate too, so "which service is this" is answered cryptographically at the connection level, before any application logic runs, and does not depend on a bearer credential that could simply be copied out of a running process.
Short-lived JWTs for delegated requests
Once mTLS establishes that service B is really service B, service B still needs to prove it is acting on behalf of a specific end user or upstream caller when it calls service C. That is carried as a short-lived JWT, minutes, not hours, issued at the edge from the original authentication event and propagated down the call chain, so service C can authorize based on the original caller's identity and scopes, not just "some internal service asked for this."
Automated rotation plan
Certificates rotate frequently and automatically, often on the order of hours, managed entirely by the mesh or CA infrastructure, never manually copied files, so a compromised certificate has a short useful life and rotation is a routine non-event rather than an outage. JWT signing keys rotate on a separate, slower cadence using a kid (key ID) header plus JSON Web Key Set (JWKS) caching: publish the new key alongside the old one, sign new tokens with the new key, and retire the old key only after every token signed with it has naturally expired.
Token exchange for cross-account or cross-tenant permissions
When a call needs to cross a boundary the original token was not scoped for, a different cluster, a different tenant's data, the calling service presents its own mTLS identity plus the inbound token to a token-exchange endpoint (the pattern standardized as OAuth 2.0 Token Exchange, RFC 8693) and receives back a new, narrowly scoped token valid only for the target boundary and the specific downstream call being made. This avoids two worse alternatives: minting one all-clusters "god token" up front, or having the receiving cluster simply trust whatever claims arrive without independently verifying that the calling service is who it claims to be and is actually allowed to ask on the original caller's behalf.
Worked example
sequenceDiagram
participant U as User
participant GW as Gateway (cluster 1)
participant A as Service A (cluster 1)
participant TX as Token Exchange
participant C as Service C (cluster 2)
U->>GW: Request (authenticates)
GW-->>U: Short-lived JWT
GW->>A: Forward request + JWT (mTLS)
A->>TX: Present own mTLS identity + inbound JWT
TX-->>A: New, narrowly scoped cluster-2 token
A->>C: Call service C (mTLS + exchanged token)
Service A never forwards the user's original token as-is into cluster 2. It exchanges it for a new token scoped only to the specific downstream call it needs to make, so service C sees exactly the permission it needs to check and nothing broader.
Trade-offs & pitfalls
Operating an internal CA and rotation infrastructure is a real ongoing cost, which is why most teams adopt an existing service mesh to get this largely for free rather than hand-rolling it. Propagating the original user's JWT unchanged through a long call chain leaks the full token to every hop along the way, each service sees everything, token exchange also solves this by minting a narrower token per hop instead of forwarding one token everywhere. A common production mistake is trusting mTLS identity alone as authorization, "service B connected, so it must be allowed to do this", when mTLS answers identity, not permission; the JWT and token-exchange layer is what actually carries the authorization decision, and conflating the two is a real, exploitable design flaw.
You're asked to architect a zero-trust setup for a hybrid environment exposing APIs to internal services, external partners, and mobile clients. Cover identity and access management, device posture checks, short-lived credentials, conditional access policies, service identity, TLS/mTLS, API gateway and enforcement points, and how to support clients in intermittent connectivity scenarios.
Sample Answer
Direct answer
A zero-trust design for a hybrid environment treats every caller, whether it is an internal
service, an external partner, or a mobile client, as untrusted by default and re-verifies
identity and context on every request, rather than granting broad access once a caller is
"inside the network." The core building blocks are strong identity for both users and services
(short-lived credentials instead of static secrets), device and context signals evaluated at
request time (conditional access), and a small number of well-defined enforcement points (an API
gateway plus per-service checks) that consistently apply policy across on-prem, multiple clouds,
and partner networks rather than each environment inventing its own rules.
Structured elaboration
Identity and access management. Every principal (human user, service, and partner
integration) needs a durable, centrally-managed identity, issued by a single identity provider
(or federated set of providers) rather than per-environment local accounts. Users authenticate
via OpenID Connect (OIDC, an identity layer built on OAuth 2.0) with the resulting token carrying
verified claims about who they are; services authenticate to each other using workload identity
(certificates or signed tokens tied to what the service is, not a shared secret it holds).
Device posture checks. For flows that originate from a device (a partner's engineer, a
mobile client), the access decision should factor in device state; whether it is managed,
patched, has disk encryption enabled, is not jailbroken/rooted, rather than trusting the network
location it is calling from. A request from a fully-patched, managed corporate laptop and one
from an unknown personal device should not receive the same default trust even if both present a
technically valid user token.
Short-lived credentials. Replace long-lived static API keys and passwords with
short-lived, automatically renewed tokens wherever the calling pattern allows it: OAuth access
tokens with lifetimes of minutes to a couple of hours, backed by refresh flows, and short-lived
certificates for service identity (paired with automated rotation, discussed further under
mTLS). A short lifetime bounds how long a leaked credential remains useful even if revocation is
delayed.
Conditional access policies. Access decisions combine identity, device posture, and context
(is this request from a location or pattern consistent with the user's history, is it during a
plausible time window, is the requested action unusually sensitive) into a policy evaluated at
request time, not just at login time; a session that started low-risk can be required to
step up (re-authenticate, add MFA) if its behavior later looks anomalous.
Service identity and enforcement points. Between services, mTLS (mutual TLS, where each side
proves its identity with a certificate) paired with a workload-identity standard like SPIFFE (Secure Production Identity Framework For Everyone, a standard for automatically issuing short-lived, verifiable identities to services)
gives every service a verifiable identity independent of network location, which matters
specifically because "hybrid" means you cannot rely on network topology (a private subnet, a VPN
tunnel) as a trust signal the way a single-cloud, single-network design sometimes does. An API
gateway sits at the edge for external and partner traffic as the primary enforcement point for
coarse-grained checks (authentication, rate limiting, gross authorization); internal
service-to-service calls enforce their own finer-grained authorization at each service, since a
single central gateway cannot see or safely encode every service's specific business rules.
Trust boundaries across on-prem, multi-cloud, and partner networks. Segment the environment
into explicit trust zones rather than assuming one flat network, and make every crossing between
zones go through an identity-checked enforcement point instead of being implicitly allowed by
network routing. For the cloud-side permissions surface specifically, CIEM (cloud infrastructure
entitlement management, tooling that inventories and right-sizes the often-sprawling permissions
granted to cloud identities and roles) is the practical mechanism for keeping the
identity-to-permission mapping from drifting into over-privilege as the environment spans
multiple cloud providers, each with its own IAM (Identity and Access Management, the system that governs who or what can access cloud resources) model; operationalize boundary changes with
automated testing (a policy change is deployed through the same CI/CD pipeline as code, with
automated checks that a proposed change does not accidentally widen an existing trust boundary)
rather than manual firewall-rule edits.
Supporting intermittent connectivity. Mobile and some partner clients cannot always reach the
identity provider or policy decision point in real time. Support this with short-lived cached
decisions (a token that remains valid, and whose validity can be checked locally via signature,
for a bounded window even if the issuer is briefly unreachable) rather than a hard requirement
that every single request round-trip to a live policy check; balance that against the same
short-lived-credential principle by keeping the cached window short enough that a revoked
credential is not usable for long after revocation.
Worked example
graph TD
C1[Internal Service] -->|mTLS plus SPIFFE identity| GW[API Gateway - PEP]
C2[External Partner] -->|OAuth token plus mTLS| GW
C3[Mobile Client] -->|short lived token plus device posture| GW
GW --> PDP[Policy Decision Point]
PDP -->|check identity, posture, context| IAM[Identity Provider]
IAM --> PDP
PDP -->|allow or deny| GW
GW --> BE[Backend Services]
The gateway is the policy enforcement point (PEP): it never decides trust on its own, it forwards
the identity and context signals it collected (which credential type, what device posture, what
network origin) to the policy decision point (PDP), which consults the identity provider and
returns an allow or deny. This separation is what lets the same enforcement logic apply
consistently whether the caller is an internal service crossing a cloud boundary, an external
partner, or a mobile client on an unreliable connection: the PEP's job (collect signals, forward,
enforce the verdict) does not change per caller type, only the specific signals available do.
Trade-offs and pitfalls
- A central policy decision point can become a latency and availability bottleneck. Cache
decisions locally at the enforcement point for a short, explicitly bounded window to absorb
brief PDP unavailability and reduce round-trip latency, rather than either making every request
block on a live PDP call or letting enforcement points make their own independent (and
potentially inconsistent) decisions. - Zero trust does not mean zero trust in the credential's assertions once verified, it means
not trusting network location as a substitute for verification; conflating the two leads teams
to over-engineer per-request re-verification for signals (like a properly-scoped, freshly-issued
short-lived token) that were already strongly verified moments earlier. - Common wrong turn: building the identity and policy layer first and treating multi-cloud
CIEM as a later cleanup task. Cloud IAM permissions sprawl quickly and independently of your
application-level zero-trust design; without CIEM-driven visibility from early on, the
"authorized" answer your policy layer gives can still be sitting on top of drastically
over-permissioned cloud roles underneath it. - Common wrong turn: applying identical policy rigor to every zone. A partner integration
handling low-sensitivity data does not need the same conditional-access strictness as an
internal service touching customer financial records; uniform maximum strictness everywhere
usually just produces friction that teams route around, rather than better security.
Architect a security model for a large-scale microservices platform (~1000 services) that uses a service mesh (e.g., Envoy/Istio) and an API gateway. Goals: enforce strong service-to-service authentication and authorization, minimize blast radius, centralize policy where sensible but avoid bottlenecks, ensure observability and incident response. Provide key components, identity model, policy enforcement points, rollout plan and scaling considerations.
Sample Answer
Direct answer
At roughly 1,000 services, service-to-service authentication and authorization has to be
enforced by infrastructure (a service mesh sidecar, such as Envoy, paired with a control plane
like Istio) rather than by each service's own application code, because you cannot reliably
audit or update security logic duplicated across a thousand codebases owned by many different
teams. The mesh's sidecar proxies handle mutual TLS (mTLS) and per-request authorization
uniformly, the control plane distributes identity and policy to every sidecar, and the API
gateway stays a separate, thinner layer that only handles edge concerns (external traffic
authentication, coarse rate limiting) rather than trying to be the single point enforcing every
internal rule.
Structured elaboration
Identity model. Every service instance gets a workload identity, most commonly a SPIFFE
(Secure Production Identity Framework For Everyone) identity encoded into a short-lived X.509
certificate, tied to what the workload is (its Kubernetes service account and namespace, for
example) rather than a static shared secret. The mesh's control plane (Istio's istiod, for
example) issues and continuously rotates these certificates automatically; no individual service
team manages its own certificate lifecycle.
Enforcing service-to-service auth and authorization. The sidecar proxy next to each service
terminates and originates mTLS transparently, so two services communicate over an encrypted,
mutually-authenticated channel without either one's application code implementing TLS itself.
Authorization (which services may call which other services, and for which operations) is
expressed as policy (Istio's AuthorizationPolicy resources, for example) and enforced by the
sidecar before a request ever reaches the application, giving every service the same
authorization enforcement mechanism regardless of what language or framework it is written in.
Policy enforcement points. At this scale there are exactly two places policy actually gets
enforced, and each has a distinct job: the API gateway is the enforcement point for traffic
entering the mesh from outside (external clients, partners), handling coarse checks like
authentication and rate limiting once at the edge; each service's own sidecar is the enforcement
point for everything after that, deciding, per call, whether one internal service may reach
another. Keeping these two enforcement points separate, rather than routing all internal traffic
back through the gateway, is what keeps the gateway from becoming a bottleneck for traffic that
never needed to leave the mesh.
Minimizing blast radius. Default-deny between services (a service can only call, or be
called by, the specific services its policy explicitly allows) turns a compromised service into
a contained incident instead of a pivot point to the rest of the fleet; without this, one
compromised service with network reachability to everything else effectively compromises the
whole mesh.
Centralizing policy without creating a bottleneck. Policy is authored and versioned
centrally (so the security posture is auditable in one place, as code) but distributed to
every sidecar so each one can make allow/deny decisions locally, at line rate, without a
synchronous call back to a central decision service on every request. This is the key design
move for enforcing at 1,000-service scale: centralize the authoring and distribution of
policy, not the evaluation of it.
Observability and incident response. Every sidecar can emit consistent access logs, metrics,
and distributed traces for the traffic passing through it, giving uniform visibility across all
1,000 services without depending on each service team to instrument request-level auth logging
themselves. This uniformity is what makes incident response at this scale tractable: a security
team traces a suspicious request across service boundaries using the mesh's own telemetry rather
than reconciling a thousand different logging formats.
Rollout plan. Introduce the mesh incrementally rather than flipping mTLS enforcement on
everywhere at once: start in permissive mode (the sidecar accepts both plaintext and mTLS
traffic while metrics show which callers have and have not migrated), onboard services namespace
by namespace or team by team, and only flip to strict mTLS enforcement for a given service once
its traffic is confirmed fully migrated. A big-bang cutover at 1,000 services risks a
simultaneous outage across the fleet if any meaningful fraction of callers have not yet adopted
the sidecar.
Scaling considerations. The sidecar's own resource footprint (CPU and memory per pod) and the
control plane's config-push fan-out both need capacity planning at this scale; a control-plane
change that pushes new policy to 1,000 sidecars simultaneously needs to be paced (canaried,
rate-limited) rather than broadcast all at once, since a bad policy pushed everywhere
simultaneously turns a policy bug into a fleet-wide outage instead of a contained one.
Worked example
graph TD
Ext[External Traffic] --> GW[API Gateway - Edge AuthN and AuthZ]
GW --> SM[Service Mesh Ingress]
SM --> SVA[Service A plus Envoy Sidecar]
SM --> SVB[Service B plus Envoy Sidecar]
SVA -->|mTLS plus SPIFFE ID| SVB
CP[Istio Control Plane] -.->|distributes policy and certs| SVA
CP -.-> SVB
SVA --> OBS[Telemetry: access logs, traces]
SVB --> OBS
The gateway handles only the edge boundary (authenticating and rate-limiting external traffic
before it enters the mesh at all); everything after that, service A calling service B, for
example, goes sidecar-to-sidecar over mTLS with an authorization decision made locally by
service B's own sidecar, based on policy the control plane already pushed to it. If the control
plane is briefly unavailable, existing sidecars keep enforcing their last-known policy and
certificates until they expire, since evaluation never depended on a live call to the control
plane; only new certificate issuance and policy updates pause during that window, which is
the direct payoff of "centralize distribution, not evaluation."
Trade-offs and pitfalls
- A service mesh adds real operational complexity and per-request latency overhead (an extra
network hop through the sidecar in each direction); this is a deliberate trade against the
alternative of every service reimplementing TLS and authorization independently, which does not
scale to 1,000 services being maintained correctly and consistently over time. The trade-off
is worth stating explicitly rather than presenting the mesh as free. - Permissive mode during rollout is a temporary state, not a target state. Leaving services
in permissive mode indefinitely (common when a migration stalls) means mTLS is not actually
being enforced for those services even though the infrastructure exists, which is easy to miss
in metrics that only measure "sidecar deployed" rather than "strict mode enforced." - Common wrong turn: routing all internal traffic back through the central API gateway to
reuse its authorization logic. This defeats the scaling argument for a mesh in the first place
and turns the gateway into both a latency bottleneck and a single point of failure for traffic
that never needed to leave the mesh's own service-to-service path. - Common wrong turn: pushing a policy change to all 1,000 sidecars simultaneously without a
canary. A syntactically valid but logically wrong authorization policy (an overly broad deny
rule, for example) pushed everywhere at once can cause a fleet-wide outage in the time it takes
the control plane to distribute the update, which is why staged rollout applies to policy
changes, not just to the initial mesh adoption.
Unlock Full Question Bank
Get access to all 7 API Security, Authentication and Authorization interview questions and detailed answers.
Sign in to ContinueJoin thousands of developers preparing for their dream job.