Vault replication is powerful, but you should not necessarily replicate everything. Compliance and data locality requirements often demand a design that intentionally narrows what gets replicated.
This article focuses on Vault Enterprise Filtered Paths (path-based filtering): how to restrict what gets replicated on performance replication, how it differs from DR replication, and practical patterns that combine it with local mounts and namespaces.
Filtered Paths is a Vault Enterprise mechanism for narrowing the scope of performance replication at the path level. You define include (allow) and exclude (deny) rules so that only the minimum necessary data is sent to secondaries.
A key point: Filtered Paths controls the replication layer and is distinct from policy-based access control for clients. Policies decide whether reads or writes are allowed, while Filtered Paths limits the data that actually arrives on secondaries.
Local mounts (local=true) take data under that mount out of both performance and DR replication. It is a coarser grain, but a reliable way to guarantee exclusion.
Vault replication comes in two main forms: performance replication and DR replication. Filtered Paths is a concept used with performance replication. DR replication targets failover, so it prioritizes completeness over selective replication.
There are several ways to restrict what is replicated; pick the right one for the requirement. Use Filtered Paths for fine-grained control, local mounts to exclude entire mounts, and namespace-scoped secondaries when you want to split replication by tenant or organization.
| Method | Granularity | Applicable Replication | Main Use Case |
|---|---|---|---|
| Filtered Paths (path filtering) | Per path (include / exclude) | Performance | Replicate only required paths to minimize data |
| Namespace-scoped secondary | Per namespace subtree | Mainly performance | Separate replication along tenant or organization boundaries |
| Local mount (local=true) | Per mount | Excluded from both performance and DR | Bulk exclusion of data that compliance rules forbid from leaving to secondaries |
| DR replication (no filtering) | Entire dataset (by default) | DR | Complete data preservation for disaster recovery |
Misconfigured path-based filters can cause data leaks or unexpected gaps. In practice, start with an include-first (allow-list) plus least-privilege approach and expand coverage gradually.
Group path names by prefix, with hierarchy that reflects team, system, and data sensitivity. That way responsibility boundaries map cleanly to filter rules. Regardless of engine type (KV, PKI, Transit, etc.), you can design with logical-path prefix matching.
Filtered Paths rules are defined and applied through dedicated settings for includes and excludes. Follow your Vault Enterprise version's documentation for evaluation order and detailed semantics, and always validate in a staging environment.
How Filtered Paths evaluation works
When you need fine-grained replication control, build the design around Filtered Paths. Organize logical paths by team or application and define an allow-list. Watch the impact with audits and metrics, and expand the scope gradually.
In tenant-isolated environments, splitting replication along organizational boundaries with namespace-scoped secondaries simplifies operations. Combine this with policies to keep each secondary holding only the minimum necessary paths.
For data that compliance forbids from leaving to a secondary (e.g., region-restricted data or experimental mounts), create or adjust the mount with local=true to exclude it from the replication layer entirely.
Always validate filter designs against a staging secondary. Inject test data into representative paths and verify both reachability and policy consistency. Continuously monitor audit logs and metrics for unexpected arrivals or omissions.
Build a workflow for changes covering request, review, implementation, and verification, with rollback procedures prepared in advance. Filtered Paths rule changes affect future replication. Agree up front on how data already present on secondaries will be handled (auto-deletion behavior and manual cleanup policy).
In DR replication environments, operations are more stable if you standardize on no filtering by default and reach for local mounts only when exclusion is truly required.
Below is a minimal example that excludes some mounts via local mounts while enabling performance replication. The Filtered Paths rule configuration itself depends on Enterprise feature specifics, so follow the official procedure for the version you are running.
The key point: by creating the team-b mount as local, it is excluded from both performance and DR replication, while team-a remains replicated, which the setup lets you verify directly.
Example: local exclusion + performance replication
# Primary でログイン
vault login <root>
# マウント作成(team-a は複製対象、team-b はローカル=除外)
vault secrets enable -path=team-a kv-v2
vault secrets enable -local -path=team-b kv-v2
# サンプルデータ投入
vault kv put team-a/app foo=bar
vault kv put team-b/app baz=qux
# パフォーマンスレプリケーションを有効化(Primary 側)
vault write -f sys/replication/performance/primary/enable
# セカンダリ有効化用のトークンを作成(出力値を控える)
# 実際の出力・パラメータは利用バージョンのドキュメントに従ってください
vault write -f sys/replication/performance/primary/secondary-token
# Secondary 側で有効化(<token>は上記で取得)
vault write sys/replication/performance/secondary/enable token=<token>
# 検証: Secondary で team-a は取得可能、team-b は存在しない想定
vault kv get team-a/app # => 存在するはず
vault kv get team-b/app # => 見つからない(local で除外)Do not confuse the scope: Filtered Paths is about performance replication, and DR filtering is generally not supported. A mount's local flag is an exclusive exclusion that applies to both replication types.
A policy deny does not stop replication itself. To meet a requirement of not delivering data to a secondary, use Filtered Paths or local mounts.
Namespace scope is effective for coarse-grained separation; complement it with Filtered Paths for path-level optimization.
Ops
問題 1
On Vault Enterprise, you want a design that replicates only data under team-a/ to a performance secondary and sends nothing else. Which approach is most appropriate?
正解: A
To restrict what is replicated at the path level, Filtered Paths on performance replication is the right tool. DR replication is not designed for filtering, and local=true is an exclusion that prevents replication entirely. A policy deny is access control and does not stop the delivery of replication itself.
Can I do path-based filtering on DR replication, similar to Filtered Paths?
In general, no. DR replication prioritizes complete recovery over selective replication, so completeness takes precedence over filtering. If you absolutely need to exclude something, create or adjust the mount with local=true so it is removed from replication entirely.
Do filter methods differ by secrets engine type, such as KV v2 or Transit?
Filtered Paths operate on logical paths, so the core approach does not depend on the engine type. The key is to design consistent path naming and hierarchy so prefix matching expresses your intent correctly.
What happens to data already replicated to a secondary when I change filter rules?
Rule changes affect future replication. How existing data is handled depends on the Vault version and configuration, and it may not be auto-deleted. Decide on your secondary-side cleanup policy (manual or automated) in advance, and use audit logs to scope the impact before applying changes.
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...