← Concepts

阅读中文版本

Ambient Authority

Ambient authority grants permissions by the running process identity rather than the requested operation, making every call maximally privileged and every bug a potential escalation.

security

Definition

Ambient authority is an access control model where the principal authority is implicit in the execution context — the process user, the ambient role — so any code running in that context can exercise the full authority, regardless of what specific operation it is performing.

Context and scope

Applies to filesystem permissions by UID, cloud IAM roles attached to an instance, and any system where authority is a property of the caller rather than the call.

Common misconceptions

  • A root process is safe if the code is audited — the bug class is that any vulnerability in any code path becomes root, not that the audited path is wrong
  • Capability tokens are just ambient authority with extra steps — capabilities are unforgeable references to a specific authority, ambient authority is a blanket grant

Anti-patterns

  • Running a web server as root so it can bind port 80 and read a config file, giving every request handler root filesystem access
  • Attaching a broad IAM role to an EC2 instance so any code on it can list every S3 bucket

Related concepts

Authoritative source

https://en.wikipedia.org/wiki/Capability-based_security

What it is

Ambient authority is an access control model where the principal authority is implicit in the execution context — the process user, the ambient role — so any code running in that context can exercise the full authority, regardless of what specific operation it is performing. Applies to filesystem permissions by UID, cloud IAM roles attached to an instance, and any system where authority is a property of the caller rather than the call. The threat model determines which controls apply: preventive controls block exploits, detective controls surface violations, and corrective controls restore integrity after an incident.

How it works

Effective implementations layer controls so that no single bypass compromises the asset. Verification happens at trust boundaries, not just at the perimeter. Cryptographic primitives are selected for the concrete property needed — unforgeability, indistinguishability, or non-malleability — and never composed ad hoc. Failure modes fail closed: a verification error denies rather than allows.

When to enforce and pitfalls

Enforce wherever an attacker can influence input that crosses a trust boundary. Common pitfalls include treating obfuscation as a control, relying on secrecy of the algorithm rather than the key, and auditing the happy path while ignoring error-handling branches where bypasses often hide. Rate-limit and log every verification attempt so brute-force and oracle attacks become visible.