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.
Propose a policy-as-code solution (for example using Open Policy Agent - OPA) to enforce attribute-based access control across APIs. Describe where policies should evaluate (sidecar, gateway, service), policy distribution/versioning, performance strategies (caching/compile-time optimizations), CI testing of policies, and how to secure attribute sources and mitigate stale attributes.
Sample Answer
Direct answer
A policy-as-code approach to attribute-based access control (ABAC, where access decisions depend
on attributes of the user, resource, and context rather than a fixed role list) centers on Open
Policy Agent (OPA), a general-purpose policy engine, evaluating policies written in its Rego
language as close to the request as latency allows, most often colocated in a sidecar next to
each service, with policies distributed as versioned bundles from a central server and pulled
(or pushed) to every OPA instance on a schedule.
Structured elaboration
Where policies should evaluate. There are three realistic placement options, and they are
not mutually exclusive:
- Gateway: good for coarse, cross-cutting checks (is this caller authenticated at all, is
this API version deprecated) that apply uniformly regardless of which backend service handles
the request. - Sidecar (colocated with each service): the most common choice for fine-grained
authorization, since it evaluates in-process (a local network call at most) rather than
requiring a round trip to a shared service, and each service's sidecar can be configured with
only the policy bundle relevant to that service. - In-service (embedded as a library): lowest latency of all (no network hop, not even to a
sidecar) but couples the policy engine's lifecycle to the service's own deploys, which fits
latency-critical paths but loses some of the operational uniformity a sidecar gives you.
The general principle: evaluate as close to the request as the latency budget allows, and prefer
the sidecar pattern by default since it keeps policy evaluation decoupled from application code
without paying a network round trip to a remote service.
Policy distribution and versioning. Author policies as code, version them in the same way
application code is versioned (a git repository, code review, CI checks), and package them into
signed, versioned bundles that a bundle server serves to every OPA instance. Each OPA instance
polls for and pulls new bundle versions on an interval (or the server pushes them), so a policy
change rolls out without redeploying the services that consume it; the bundle's version is
itself an auditable artifact, so "which policy was in effect for this request" is answerable
after the fact.
Performance strategies. OPA compiles Rego policies before evaluation and can serve most
authorization decisions in well under a millisecond once a bundle is loaded, since the decision
is a local, in-memory evaluation, not a network call to an external service. For very
high-throughput paths, further techniques include partial evaluation (precompiling a policy
against known-at-compile-time inputs to shrink the runtime decision), and caching decisions for
identical inputs over a short, explicitly bounded window when the policy and the underlying
attributes are not expected to change within that window.
CI testing of policies. Treat Rego policies exactly like application code under test: write
unit tests (OPA's own test framework, opa test) asserting that specific input attribute
combinations produce the expected allow/deny decision, including deliberately adversarial and
edge-case inputs (a request with a missing or malformed attribute, a role that should never gain
a specific permission), and run those tests in CI before a policy bundle is built and published,
the same gate application code changes go through.
Securing attribute sources and mitigating stale attributes. ABAC decisions are only as
trustworthy as the attributes feeding them (a user's department, a resource's sensitivity
classification, a device's posture); if OPA is fed attributes forwarded from an upstream caller
without verifying their source, a caller can forge a favorable attribute directly. Attributes
should come from a trusted source the policy engine (or the service feeding it) independently
verifies, a signed token's claims, a lookup against a system of record, rather than an
unauthenticated header. Staleness is a related but separate risk: an attribute cached or fetched
minutes ago (a user's role, changed since) can produce a decision based on outdated reality;
mitigate it by keeping high-consequence attributes (role, employment status) on a short refresh
interval or fetched fresh for sensitive operations, while accepting a longer, cheaper refresh
interval for low-consequence, slow-changing attributes (a user's display name).
Worked example
graph TD
Req[API Request] --> GWEnf[Gateway - coarse policy]
Req --> Sidecar[Sidecar - per service policy]
Req --> App[In app - fine grained ABAC]
GWEnf --> OPA[OPA Engine - local decision]
Sidecar --> OPA
App --> OPA
Bundle[Policy Bundle Server] -.->|versioned push| OPA
Attr[Attribute Sources: user, resource, context] --> OPA
A concrete Rego-shaped decision (illustrative, not executed): a request to approve an expense
report carries attributes {user.department: "finance", user.role: "manager", resource.amount: 4500, resource.owner_department: "finance"}. A policy rule such as allow if input.user.role == "manager" and input.user.department == input.resource.owner_department and input.resource.amount <= 5000 evaluates entirely from attributes already present on the
request, with no network call needed at decision time, which is what keeps this pattern fast
enough to sit on the request path even at the sidecar. Changing the approval ceiling from 5000 to
a new value is a policy bundle change, published and rolled out to every sidecar, with no service
code redeployed.
Trade-offs and pitfalls
- ABAC's flexibility is also its main operational risk. Because rules combine arbitrary
attributes instead of a fixed role list, it is easy to write a policy that is logically correct
for the cases you tested and subtly wrong for a combination you did not, which is exactly why
CI testing of policies (including adversarial edge cases) is not optional here the way it might
feel optional for a small, fixed RBAC (role-based access control) rule set. - Colocated evaluation trades a small memory and CPU footprint per service for latency and
availability. A centralized policy-decision service is simpler to operate as a single thing,
but makes every authorization check depend on that service's availability and adds a network
hop to every request; the sidecar pattern avoids both costs at the price of running many small
OPA instances instead of one larger one. - Common wrong turn: trusting client-supplied or upstream-forwarded attributes without
verifying their source. A well-tested policy is still exploitable if an attacker can simply
set the attribute the policy checks; verify attribute provenance, not just the policy logic
itself. - Common wrong turn: refreshing all attributes on the same schedule. Treating a user's
display name and a user's active-employment status as equally safe to cache for, say, an hour
ignores that the second one directly gates access; calibrate refresh/staleness tolerance per
attribute by how consequential it is, not uniformly.
Design an audit logging and telemetry schema for APIs to support security investigations and compliance (e.g., GDPR, SOC2). Specify required log fields (principal, action, resource, timestamp, request/response metadata, trace-id), redaction rules, retention policies, storage backends, indexing strategies, sampling, and how to balance forensic needs with cost and privacy.
Sample Answer
Direct answer
An audit logging schema for API security investigations and compliance needs a small, consistent
set of required fields on every event (who did what, to what, and when, with enough correlation
context to reconstruct a request across services), a redaction policy that strips or masks
sensitive payload data before it is ever written to the log store, and a two-tier storage design:
a shorter-retention, fully indexed "hot" store for active investigation, and a cheaper, longer-
retention "cold" store for the multi-year retention many compliance regimes (SOC2, a common third-party audit standard for how a company handles customer data, and GDPR) actually
require.
Structured elaboration
Required log fields. At minimum, every audit event needs: principal (who or what made the
request: a user id, a service identity, or an API key id), action (what operation was
performed, ideally a stable, enumerable name rather than a raw HTTP method plus path), resource
(what was acted on, an object id or resource path), timestamp (in a single consistent timezone,
UTC, with enough precision to establish ordering), and trace_id (a correlation identifier that
ties this event to the same identifier used in distributed tracing, so a single user-visible
request can be reconstructed across every service it touched). Request/response metadata (source
IP, user agent, response status code, and which fields were affected on a write, not necessarily
their full before/after values) rounds this out without yet crossing into the redaction concerns
below.
Redaction rules. Decide, per field, whether it is safe to log at all, needs to log a masked
or hashed form (so investigators can still tell "these two events touched the same account
number" without the log storing the raw account number), or must never appear in the log under
any circumstance (a raw password, a full payment card number, an authentication token). This
decision has to be made at the schema level, before any log line is written, not left to
individual services to decide ad hoc, since an inconsistent policy across services is what turns
"we log for security investigations" into its own data-exposure incident.
Retention policies. Different investigation and compliance needs justify different retention
windows: an active-investigation window (commonly 30 to 90 days) needs to be fully indexed and
fast to query; a compliance-driven retention window (often measured in years, depending on the
framework and jurisdiction) can tolerate slower, cheaper retrieval, since it is accessed rarely,
typically only for an audit or a legal request.
Storage backends. A streaming ingestion layer (a message queue or log-streaming platform)
decouples "the API just emitted an audit event" from "the event is durably stored and queryable,"
which matters because audit logging must never become a synchronous dependency that can slow
down or fail the request it is auditing. From there, route to a hot, indexed store (built for the
security team's investigation queries) and a cold, cheap object-storage tier (built for
long-term, infrequent-access retention and legal hold).
Indexing strategies. Index the fields investigators actually query by: principal,
resource, trace_id, and timestamp range are the common ones; avoid indexing full free-text
payload fields by default, since that is expensive at volume and is exactly the kind of field
most likely to need redaction rather than indexing anyway.
Sampling. For extremely high-volume, low-sensitivity read traffic, full logging of every
single event may not be economically justified; a documented sampling policy (log 100% of
writes and authentication events, sample a smaller percentage of high-volume reads) is a
legitimate trade-off, as long as it is an explicit, reviewed decision rather than an
accidental byproduct of a storage cost optimization that nobody flagged as a compliance-relevant
change.
Balancing forensic needs with cost and privacy. More logged detail, retained longer, always
helps a future investigation; it also always costs more to store and increases the amount of
personal data the organization is responsible for protecting and eventually deleting under
frameworks like GDPR (General Data Protection Regulation, the EU's data-protection law), which
directly constrains how long personal data, including audit logs that contain it, can be
retained without a specific justified purpose. The schema's redaction rules and retention tiers
are the two levers that resolve this tension: log less of the truly sensitive data, and retain
the two tiers for different, explicitly justified lengths of time, rather than either
under-logging (a real investigation gap) or over-retaining raw sensitive data indefinitely (a
real compliance and breach-impact risk).
Worked example
graph LR
Req[API Request and Response] --> Cap[Capture: principal, action, resource, trace id]
Cap --> Red[Redaction Layer]
Red --> Buf[Streaming Buffer]
Buf --> Hot[Hot Store - indexed, 30 to 90 days]
Buf --> Cold[Cold Store - object storage, years]
Hot --> SIEM[SIEM and Investigation Queries]
Cold --> Compliance[Compliance and Legal Hold Export]
Sizing the hot tier with concrete numbers: an API sustaining roughly 10,000 requests/second, with
one structured audit log line per request averaging about 800 bytes (a realistic size for the
required fields above plus modest request metadata), produces:
raw throughput : 10,000 req/sec * 800 bytes = 8,000,000 bytes/sec = 8 MB/sec
raw daily volume : 8,000,000 bytes/sec * 86,400 sec/day ~= 691 GB/day
compressed daily : 691 GB / 5 (a typical ~5x text-log compression ratio) ~= 138 GB/day
90-day hot tier : 138 GB/day * 90 days ~= 12.4 TB
These are illustrative planning numbers, not a measured production figure, since they depend
entirely on the assumed request rate and per-line size; the point of walking through them is the
method (raw rate times record size, times the retention window, adjusted for compression), which
is exactly the calculation a real capacity-planning exercise would run against the actual
traffic and schema. At roughly 12.4 TB for a 90-day hot window, keeping the same three years of
data fully indexed would mean holding onto roughly 12x that volume in the expensive, indexed
tier, which is the concrete cost argument for a cheaper cold tier handling the years-long
compliance retention instead.
Trade-offs and pitfalls
- A synchronous, blocking audit-log write is a latency and availability risk on the request
path itself. The streaming-buffer design exists specifically so a slow or briefly unavailable
log backend degrades log durability (a small window of events might be delayed or, in a worst
case, lost) rather than degrading the API's own availability for the request being audited. - Redaction is a one-way decision once data has already been logged unredacted. If a field is
discovered to have been logged in raw form when it should have been redacted, remediation means
finding and scrubbing every copy across hot and cold storage, including backups, which is far
more expensive than getting the redaction rule right before the first log line was ever
written. - Common wrong turn: indexing everything "in case it's useful later." This inflates the hot
tier's cost roughly in proportion to how much gets indexed, without a matching increase in
investigative value, since most fields nobody ever actually queries by; index what
investigators demonstrably query, and keep the rest in the cheaper tier where it is still
retrievable, just not indexed. - Common wrong turn: one retention policy for all data. Treating a routine read event and an
authentication failure with the same retention and redaction rules ignores that they carry very
different forensic value and very different privacy sensitivity; tier both retention and
redaction by the event's actual investigative and privacy weight, not uniformly.
You must securely integrate several third-party APIs into your platform. Describe a secure integration strategy covering vendor vetting, credential management (per-tenant credentials, rotation), sandboxing/testing, rate-limiting and circuit-breakers, monitoring for anomalous behavior, contractual SLAs and how to mitigate supply chain risks from third-party compromises.
Sample Answer
Direct answer
Treat every third-party API integration as an extension of your own attack surface, not a black box you can trust by contract alone. The strategy has to cover three separate failure windows: before onboarding (vendor vetting), during normal operation (isolated credentials, rate limiting, monitoring), and the day the vendor itself gets breached (supply chain containment), because all three have actually happened to real, well-known companies.
Structured elaboration
Vendor vetting
Before integrating, assess the vendor's own security posture: a SOC 2 or ISO 27001 attestation (third-party audits that certify a vendor's security controls), their breach history, how they handle your data at rest and in transit, and whether they support scoped credentials and signed webhooks on their side. Treat this the same way you would vet a subprocessor, because that is functionally what they are.
Credential management
Never share one platform-wide secret across every tenant's connection to a vendor. Issue per-tenant, or per-integration, credentials, so a leak or compromise tied to one tenant's connection does not unlock every other tenant's data through the same key. Rotate on a fixed cadence and on any signal of compromise, and make rotation an operational non-event: run old and new secrets valid in parallel for a short overlap window, so partners are never forced through a hard, scary cutover the moment a secret changes.
Sandboxing and testing
Integrate against the vendor's sandbox or test environment first. Even in production, constrain what the integration's credential and network identity are actually allowed to touch, an egress rule permitting only the vendor's documented IP ranges or domains, not open outbound traffic from that service.
Rate limiting and circuit breakers
Apply outbound rate limits so a runaway retry loop on your own side does not get you throttled or banned by the vendor. Apply inbound circuit breakers so a slow or failing vendor does not cascade into your own API's availability, since a synchronous call to a vendor that hangs can otherwise block your own request threads or connections, turning a vendor incident into your incident.
Monitoring for anomalous behavior
Baseline the normal call volume and pattern per integration, and alert on deviation in either direction: a sudden spike could mean abuse routed through your platform, a sudden drop could mean the vendor silently changed something and you are now failing calls quietly. Track the vendor's own status page and security advisories as an input too, not only your own internal metrics.
Contractual SLAs (Service Level Agreements)
Define uptime expectations, data handling terms, breach-notification timelines (how fast the vendor must tell you if they get breached), and right-to-audit terms. A security control you cannot enforce technically still needs to exist as a contractual obligation with a real consequence attached.
Mitigating supply chain risk
Assume the vendor will eventually be compromised and design so that outcome is survivable: scoped, per-tenant credentials limit blast radius (as above); no standing write access beyond what is actually needed; alerting tuned specifically to catch abnormal use of the vendor-facing credential, not just general auth logs; and a documented, actually-tested kill switch that revokes the vendor's access immediately without requiring a deploy.
Worked example
A platform integrates a third-party shipping-label API. Each tenant gets its own API key issued at onboarding, scoped to that tenant's shipments only. Outbound traffic to the vendor is restricted to their documented IP range via an egress allowlist. A circuit breaker trips if the vendor's error rate crosses a threshold, falling back to a queued retry instead of blocking checkout requests. When the vendor discloses a breach of their own systems, the response is to immediately revoke every tenant's key for that vendor from a single admin action (the kill switch), re-issue fresh keys once the vendor confirms remediation, and check the anomaly-monitoring dashboard for any tenant whose usage pattern changed in the days before the disclosure, since that is the fastest way to spot whether the compromise was already being exploited through this platform.
Trade-offs & pitfalls
Per-tenant credentials multiply operational complexity, more secrets to rotate, store, and monitor, than a single shared key. That cost is worth paying at any meaningful scale because it bounds the blast radius of a single leak, but a small startup that skips it "for now" finds it much harder to retrofit later once hundreds of tenants already share one key. Over-trusting a vendor because they are large or well-known is a real, recurring trap: some of the most damaging third-party compromises in recent memory involved exactly that kind of vendor. Circuit breakers and timeouts that are not tuned aggressively enough still let a slow vendor degrade your own service before the breaker actually trips.
Build a secure, auditable data-sharing API for content partners (studios) to receive usage reports and aggregated metrics. Define authentication, authorization, data transformations/aggregation to protect PII and trade secrets, rate limits, schema versioning, and logging/auditing for access and changes.
Sample Answer
Give each studio partner an authenticated, scoped channel to pre-aggregated data only, never raw per-user records, so the privacy control is architectural, the API literally cannot return an individual's data, rather than something enforced purely by policy or trust.
Authentication and authorization
Mutual TLS (mTLS) for partner identity plus OAuth 2.0 Client Credentials tokens carrying resource-scoped claims (for example reports:monthly_views, reports:ad_breaks), so a studio can only request the report types their contract covers. Per-partner entitlements (which titles, which geographies) are stored centrally and checked on every request, not baked into the token at issuance, so a contract change takes effect without reissuing credentials.
Protecting PII and trade secrets through transformation
No raw per-user rows ever leave the aggregation boundary. Techniques, applied per field based on sensitivity:
- k-anonymity: suppress any aggregate group smaller than k rows (for example, "views by city" for a city with 3 viewers gets dropped or merged into a broader region), so no aggregate can be reverse-engineered to a single person.
- Bucketing and time-windowing: report "views per day," never a per-minute, per-user timeline.
- Differential privacy (calibrated random noise added to a released statistic): applied to the most sensitive aggregates, tunable per contract.
Rate limits and quotas
A per-partner token bucket, tiered by contract, with both daily and per-minute caps, since a partner running an automated nightly pull has very different burst needs than a live dashboard.
Schema versioning
Explicit versioned endpoints (/v1/reports, /v2/reports) or an Accept-Version header, with deprecation announced well ahead, for example 90/30/7-day notices, and both old and new versions live during the overlap.
Logging and auditing
Log every access: partner id, report type, filters requested, and the aggregation level actually returned, not the underlying raw data. Also log every change to a transformation policy, who changed the k-anonymity threshold and when, since a mis-set threshold is itself a privacy incident waiting to happen.
Worked example
A studio requests "daily views by city" for a title. Raw data: city "Elm Creek" had 3 viewers that day. With a k-anonymity threshold of k=10, any city-day group with fewer than 10 viewers is suppressed from the individual breakdown and rolled into an "other cities" bucket instead, Elm Creek's 3 viewers get folded in, so the partner never sees a number small enough to plausibly identify a single household. A city with 400 viewers that day passes through untouched, since 400 is well above the threshold of 10. If the studio's contract adds differential privacy on top for the top-line national number, calibrated random noise is added to the final published aggregate so even that released figure carries some irreducible uncertainty about any single viewer's contribution, rather than being an exact count.
Trade-offs and pitfalls
k-anonymity thresholds and differential-privacy noise reduce accuracy, too aggressive and the partner's report becomes useless (everything suppressed), too weak and it doesn't actually protect anyone, this threshold should be a documented, per-contract decision, not a guess. Logging the aggregation level actually returned, not just what was requested, matters because a transformation bug that accidentally returns finer-grained data than intended is itself the incident you most need to detect quickly. A common pitfall is applying privacy transformations only at the external API response layer while an internal analyst tool bypasses them to query the same underlying data directly, the enforcement boundary has to be the actual data access path, not just the partner-facing endpoint.
Walk me through mutual TLS (mTLS): how does the handshake differ from standard one-way TLS, how do the client and server present and verify each other's certificates, and what are the practical options for certificate provisioning and rotation for service-to-service authentication in a microservice or service-mesh deployment?
Sample Answer
Direct answer
Mutual TLS (mTLS, where "TLS" is Transport Layer Security, the protocol that encrypts and
authenticates network connections) extends standard one-way TLS by having the client also
present a certificate that the server verifies, so both sides cryptographically prove their
identity to each other before any application data flows. In standard one-way TLS only the
server proves who it is; the client stays anonymous at the transport layer and any identity
checking happens later, in the application (a password, a bearer token).
Structured elaboration
How the handshake differs from one-way TLS. In a plain TLS handshake, the server sends its
certificate and the client verifies it against a trusted certificate authority (CA); the client
never presents one of its own. In an mTLS handshake, the server additionally sends a
CertificateRequest message, the client responds with its own certificate plus a
CertificateVerify message (a signature over the handshake transcript, proving the client
actually holds the private key matching that certificate, not just a copy of the public
certificate), and the server verifies the client's certificate against its own trusted CA
(commonly a private, internal CA for service-to-service traffic rather than a public one) before
completing the handshake. If either side's certificate fails verification, the connection is
refused before any request or response is exchanged.
What each side verifies. The client checks the server's certificate chain up to a trusted
root, the certificate's validity window, and that the certificate's subject matches the hostname
being connected to (the checks that already happen in ordinary HTTPS). The server does the
mirror image for the client: chain validity, expiry, and (this is the part unique to mTLS as an
authentication mechanism) that the certificate's identity (its Subject or a SPIFFE-style URI in
the Subject Alternative Name) matches an identity the server is willing to trust, and that the
certificate has not been revoked.
Provisioning and rotation options for service-to-service auth:
- Long-lived certificates issued manually or by a slow internal PKI (public key
infrastructure, the systems and processes for issuing and managing certificates), rotated
every 6 to 12 months. Simple to reason about but a compromised private key stays valid for a
long time, and rotation is often a manual, error-prone, outage-risking event precisely because
it happens rarely. - Short-lived certificates (hours, not months) issued automatically by an internal CA and
rotated continuously, often via a sidecar proxy that handles issuance and rotation
transparently to the application. This is the pattern service meshes like Istio or Linkerd
use, frequently paired with SPIFFE (Secure Production Identity Framework For Everyone, a
standard for representing workload identity as a URI) so identity is tied to what a workload
is (its service account, its namespace) rather than to a long-lived secret. Short TTLs shrink
the blast radius of a leaked key dramatically, since the certificate expires on its own within
hours even if revocation never fires. - A managed cloud CA or secrets-manager-backed issuance for teams that do not want to
operate their own internal CA, trading some control for less operational burden.
Worked example
sequenceDiagram
participant C as Client
participant S as Server
C->>S: ClientHello
S->>C: ServerHello plus Server Certificate
S->>C: CertificateRequest
C->>S: Client Certificate
C->>S: CertificateVerify (signed with client private key)
S->>S: Verify client cert against trusted CA, check chain and revocation
C->>S: Finished
S->>C: Finished
Note over C,S: Both sides now hold a mutually authenticated encrypted channel
The two extra round-trip messages compared to one-way TLS are CertificateRequest (the server
asking) and the client's Client Certificate plus CertificateVerify pair (the client proving
it holds the matching private key, not merely presenting a public certificate it copied from
somewhere). Everything after Finished on both sides is identical to ordinary TLS: an encrypted
channel, just one where the server now also knows, cryptographically, which specific
service-identity it is talking to, without needing an application-layer credential to establish
that.
Trade-offs and pitfalls
- mTLS proves connection identity, not user identity. It tells a server which service or
workload is calling, which is exactly the right primitive for service-to-service traffic in
a microservice or service-mesh deployment; it is the wrong tool for authenticating an
individual end user, since a human does not carry a private key the way a workload's sidecar
does. OAuth 2.0 or session-based authentication remains the right layer for user identity, and
the two are often combined (mTLS between services, a user token passed through inside that
channel). - Short-lived automated certificates need working automation, not just working crypto. If
the sidecar or agent responsible for rotation fails silently, certificates expire and every
connection using them starts failing at once, an outage that a slower manual rotation schedule
is less exposed to (at the cost of a much larger blast radius if a key leaks). Automated
rotation needs its own monitoring and alerting on issuance failures, not just on the
certificates' expiry dates. - Common wrong turn: skipping revocation checking because "the certificates are short-lived
anyway." Short TTLs reduce how long a compromise matters, but do not eliminate the window
entirely; a certificate stolen minutes before use is still valid until it expires, so
revocation checking (or, more commonly in practice, simply re-issuing all workload identities
and rotating the internal CA's trust) still matters for a confirmed compromise. - Common wrong turn: terminating mTLS at a load balancer and trusting an internal header for
identity afterward. If the load balancer is not itself inside the trust boundary you are
defending, or if an internal service can be reached directly without going through it, an
attacker who reaches the internal network can forge the identity header the same way they
would forge any other unauthenticated claim.
Unlock Full Question Bank
Get access to all API Security, Authentication and Authorization interview questions and detailed answers.
Sign in to ContinueJoin thousands of developers preparing for their dream job.