Join our Newsletter — 33% off our NHI Course

HTTP Header

An HTTP header is metadata sent with a request to describe how the server should process it. Headers commonly carry authentication tokens, content type, and accepted response formats. In API security, headers are important because they often hold the controls that prove identity and define how the exchange is interpreted.

Expanded Definition

An HTTP header is the metadata layer that rides alongside an HTTP request or response and shapes how the message is interpreted, routed, authenticated, cached, and encoded. In security practice, headers often carry bearer tokens, content negotiation details, correlation data, and policy signals such as content type or transport expectations.

The boundary matters: the header is not the payload itself, and it is not a generic container for all security controls. It is the envelope that tells systems how to treat the exchange. That distinction is important in APIs, gateways, and browser-based integrations, where a header value can change trust decisions without changing the underlying body.

Guidance versus consensus: there is broad consensus that headers are central to API security, but implementation practice varies on which headers are trusted, transformed, or stripped by intermediaries. A common misunderstanding is to assume any header seen at the application layer was supplied directly by the caller; in reality, proxies and edge services may add, overwrite, or remove values before the request reaches the app.

Examples and Use Cases

  • A REST API uses OWASP Non-Human Identity Top 10 style thinking to treat authorization headers as part of machine identity governance rather than as disposable transport details.
  • A browser request includes an

    Accept

    header so the server can return JSON instead of HTML, which is routine in API integrations and client negotiation.

  • A service mesh or API gateway forwards

    X-Request-Id

    or a similar correlation header to preserve traceability across multiple backend services.

  • An application checks

    Content-Type

    before parsing a body, because mismatched types can break validation, deserialization, or security filters.

  • A reverse proxy strips or rewrites sensitive headers before forwarding traffic, reducing accidental trust in values that should only be accepted from a controlled edge.

One practical tradeoff is that more header-based policy can improve interoperability and control, but it also increases the chance of trust-boundary mistakes when multiple intermediaries modify the same request.

Security Implications

HTTP headers become security-sensitive when organisations treat them as authoritative without validating where they came from or how they were altered in transit. The most common failure mode is trust confusion: an application assumes a header represents caller intent, but an intermediary, client library, or attacker-controlled request can set or shape that value first.

That can lead to authentication bypass, privilege confusion, cache poisoning, incorrect content handling, and logging gaps. Header misuse is also a frequent cause of API behaviour that looks correct in normal testing but fails under proxying, load balancing, or chained services, where one component silently rewrites the value another component relies on.

For non-human identities, the impact is sharper because headers often carry tokens or claims used by automated workloads. If those headers are exposed in logs, accepted from the wrong trust zone, or forwarded too broadly, a machine identity can be replayed, impersonated, or overextended across services. The observable symptom is often inconsistent authorisation: the same request succeeds in one path and fails in another because header trust rules are not aligned.

Domain and Governance Relevance

In API security and identity-heavy architectures, HTTP headers are part of the control plane for trust. They are where authentication material, delegation signals, and content expectations often meet application logic, which makes them a governance issue as much as a transport detail. That is especially true when services are composed across gateways, proxies, and serverless components.

For NHI environments, headers are often where machine credentials are presented and where identity context is propagated between systems. That means header handling affects ownership, rotation exposure, revocation effectiveness, and auditability. If teams do not define which headers are trusted at each boundary, they can create hidden identity paths that bypass central controls even when the underlying services are well managed.

NHIMG treats header governance as part of request integrity: the question is not only what a header contains, but which component is allowed to create, transform, or consume it. That boundary discipline is what keeps identity assertions, API semantics, and operational telemetry aligned.

Standards & Framework Alignment

This section maps relevant standards and security frameworks to the operational risks and controls described in this guidance.

OWASP Non-Human Identity Top 10 and MITRE ATT&CK address the attack and risk surface, while CIS Controls v8 and NIST CSF 2.0 set the governance and control requirements practitioners need to meet.

Framework Control / Reference Relevance
OWASP Non-Human Identity Top 10 NHI-01 — Inventory and Ownership Headers often carry machine identity context that needs ownership and lifecycle control.
NHI-02 — Secrets and Credential Management Authorization headers frequently carry tokens and API keys that require protection.
NHI-04 — Access Scope and Authorization Header values can influence authorization decisions across services and trust zones.
Recommendation — Inventory every header that conveys identity or trust context and assign clear ownership. Protect header-borne secrets from exposure, replay, and unnecessary propagation. Restrict header trust to approved boundaries and validate claims before authorising access.
CIS Controls v8 6 — Access Control Management Header misuse can create unauthorised access paths through confused trust decisions.
8 — Audit Log Management Headers frequently carry trace and identity data that must be logged safely and consistently.
Recommendation — Enforce least privilege on every service that accepts or forwards security-sensitive headers. Log header-derived identity data with protections that preserve integrity and privacy.
MITRE ATT&CK T1134 — Access Token Manipulation Attackers may abuse token-bearing headers to impersonate a caller or extend access.
Recommendation — Detect manipulation and replay of bearer tokens carried in HTTP headers.
NIST CSF 2.0 PR.AC — Identity Management, Authentication and Access Control Header handling directly affects authentication and access-control enforcement in APIs.
Recommendation — Validate header trust boundaries and enforce authentication consistently at every entry point.