EGP leverages the Sentinel integration in Vault Enterprise to add flexible, per-endpoint pre- and post-evaluation on top of the API.
This article covers how EGP differs from ACL, the evaluation flow, path/operation targeting, policy authoring patterns, safe rollout, and operational pitfalls from an Ops perspective.
EGP (Endpoint Governing Policy) adds extra governance to Vault API endpoints (for example, secret/data/*, sys/mounts/*). Policies are written in Sentinel and can branch on request context such as the call payload and the calling identity (when Identity integration is enabled).
ACL is the foundation of authorization, granting or denying capabilities (read, create, update, delete, list, sudo). EGP runs after ACL passes the request and tightens control with additional conditions (time of day, path naming conventions, labels, issuer attributes, and so on). RGP (Role Governing Policy) is best for governance per authentication role, while EGP is best for governance per endpoint. Both EGP and RGP are Vault Enterprise features.
In general, EGP runs as a "pre" evaluation after the ACL check and as a "post" evaluation after the backend processing. Post evaluation can be used to validate the response (within the metadata that is exposed), enabling checks such as "the number of returned secret keys does not exceed a limit" (subject to what the target endpoint supports).
EGP supports Sentinel enforcement levels (advisory / soft-mandatory / hard-mandatory). A safe rollout is to start with advisory, monitor, and only then escalate to hard-mandatory.
| Item | ACL | EGP | RGP |
|---|---|---|---|
| Scope of application | Token/path capabilities | API endpoint (path + operation) | Authentication role / token role |
| Evaluation timing | Always first | Pre/post around the backend, after ACL | Mainly at auth and token issuance |
| Expressiveness | Static capabilities | Strong with conditionals and attribute checks | Centralizes role requirements |
| Typical use cases | Basic allow/deny | Naming conventions, time windows, attribute-based control | Role-based controls such as TTL and max uses |
| Edition | OSS/Enterprise | Enterprise/HCP | Enterprise/HCP |
EGP evaluation flow in Vault (conceptual)
EGP narrows the target endpoint by path (patterns that can include wildcards) and operation (capabilities). Commonly used operations are read, create, update, delete, list, and sudo. For example, you can target only create and update on secret/data/prod/*.
Combining EGP with Vault Enterprise namespaces lets you define the same EGP at a higher level and inherit it into child namespaces, or apply it to a specific namespace only. In larger environments, "loose globally and strict below" is a manageable two-tier pattern.
EGP policies are written in Sentinel. The example below conceptually allows writes to prod paths only when the calling entity belongs to the prod-writers group. It assumes Identity integration is enabled (be sure to verify that the group attribute is actually attached during testing).
The key authoring tip is to clearly target a path and operation, pass non-matching cases through, and only strictly judge the matching cases. This avoids unnecessary side effects.
Sentinel policy for EGP (conceptual example)
import "strings"
# Whether the path is under prod
prod_path = strings.has_prefix(request.path, "secret/data/prod/")
# Whether the operation is a write (create/update)
is_write = rule { request.operation in ["create", "update"] }
# Whether the caller belongs to the required group (when Identity integration is enabled)
allowed_writer = rule { identity.groups contains "prod-writers" }
# Main decision: when the path is under prod AND the operation is a write, require group membership
main = rule {
!(prod_path and is_write) or allowed_writer
}
Start small and tighten gradually. Apply the policy first as advisory to a limited path (for example, secret/data/prod/app1/*) and watch audit logs and metrics. Once you have confirmed there are no false positives, move to soft-mandatory and finally to hard-mandatory.
Always manage changes as code and run replay tests in staging (playing back representative API scenarios). Post evaluation in particular depends on the response structure of the target endpoint, so regression tests that minimize the impact of version differences are useful.
Hard-mandatory EGP cannot be bypassed even by a root token. Emergency response should "remove the policy from scope or temporarily lower the enforcement level" — a common point of confusion in real Ops work.
Understanding the evaluation order (ACL → EGP(pre) → backend → EGP(post)) and that EGP is an "extra check" is also a frequent exam topic. When configuring policies, keep the split clear: ACL grants basic permission, EGP tightens conditions.
Ops
問題 1
Which of the following is the most accurate evaluation order when using EGP (Endpoint Governing Policy) in Vault Enterprise?
正解: A
EGP runs as a pre evaluation after ACL has granted the basic permission, and as a post evaluation after backend processing. RGP governs the role side and, in general, does not interleave with the EGP order.
Can EGP be used with Vault OSS?
EGP is part of the Sentinel integration offered with Vault Enterprise (and the corresponding HCP Vault plans). It is not available with OSS alone.
Can a root token bypass EGP?
No. A hard-mandatory EGP cannot be bypassed even by a root token. In an emergency you must make explicit changes such as narrowing the policy scope or lowering the enforcement level.
Can post evaluation be used on every endpoint?
Post evaluation is supported on many endpoints, but the available response context and applicability depend on the endpoint. Verify the behavior of the target endpoint against your requirements.
Practice with certification-focused question sets
無料で問題を解いてみるNicheeLab Editorial Team
NicheeLab editorial team focused on data engineering and cloud certification learning. Content is structured around practical study needs and official exam domains.
Vault Core Concepts: Sealed/Unsealed, Auth, Secrets (2026)
Vault fundamentals — sealed/unsealed state, auth methods, se...
Vault Operations Professional (VOP-003): Complete Guide (2026)
Pass the Vault Operations Professional exam — enterprise pat...
Vault Path-Based Routing: API URL Structure (2026)
How Vault's path-based routing works — mount points, sub-pat...
Vault Tokens: Auth Token Mechanics (2026)
Token fundamentals — service vs. batch tokens, accessor, ren...
Vault Token Types: Service, Batch, Periodic (2026)
Service vs. batch tokens compared — performance, ACL behavio...