Configure cross namespace access
Using the sys/config/group_policy_application
endpoint, you can enable secrets sharing
across multiple independent namespaces.
Historically, any policies attached to an identity group would only apply when the Vault token authorizing a request was created in the same namespace as that group, or a descendent namespace.
This endpoint reduces the operational overhead by relaxing this restriction.
When the mode is set to the default, within_namespace_hierarchy
, the
historical behaviour is maintained. When set to any
, group policies apply to
all members of a group, regardless of what namespace the request token came
from.
Prerequisites
- Vault Enterprise 1.13 or later
- Authentication method configured
Enable secrets sharing
Verify the current setting.
within_namespace_hierarchy
is the default setting.Change the
group_policy_application_mode
setting toany
.Policies can now be applied, and secrets shared, across namespaces without a hierarchical relationship.
Example auth method configuration
Cross namespace access can be used with all auth methods for both machine and human based authentication. Examples of each are provided for reference.
Create and run a script to configure the Kubernetes auth method, and two namespaces.
Authenticate to the
us-west-org
Vault namespace with a valid JWT.Read a secret in the
us-east-org
namespace using the Vault token fromus-west-org
.