You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We are using templated policies to allow an app access to team secrets based on their metadata:
app:
# Allow apps to read their own secrets e.g. secret/data/teams/foo/app-foo-bar/*.
path "secret/data/teams/{{identity.entity.metadata.team}}/{{identity.entity.name}}/*" {
capabilities = ["read"]
}
To enforce that a team can only create entities with a team metadata value of their team (e.g. foo) we are using the policy:
dynamic metadata values (e.g. app = "*") can't be used:
"metadata" = [{"app" = [], "team" = "foo"}}]
arbitrary metadata keys can't be used (e.g.
"metadata" = [{"*" = [], "team" = "foo"}}]
Our current solution means
policies have to be fixed (and in the correct order)
teams can't add additional metadata (e.g. the app name bar) and so use a cleaner secret hierachy (or have arbitrary metadata):
policy-app.hcl: |-
# Allow apps to read their own secrets e.g. secret/data/teams/foo/apps/bar/*.
path "secret/data/teams/{{identity.entity.metadata.team}}/apps/{{identity.entity.metadata.app}}/*" {
capabilities = ["read"]
}
The text was updated successfully, but these errors were encountered:
We are using templated policies to allow an app access to team secrets based on their metadata:
app:
To enforce that a team can only create entities with a team metadata value of their team (e.g. foo) we are using the policy:
team-foo:
Unfortunately Vault doesn't allow wildcards in composite data type keys or values, due to the comparison been passed directly to
reflect.DeepEquals
.This means that
policies can't use globs
policies have to be ordered the same as clients
dynamic metadata values (e.g. app = "*") can't be used:
arbitrary metadata keys can't be used (e.g.
Our current solution means
bar
) and so use a cleaner secret hierachy (or have arbitrary metadata):The text was updated successfully, but these errors were encountered: