Deploy `Vault` policies.

This commit is contained in:
Kazuhiro MUSASHI 2022-03-13 21:34:14 +09:00
parent cf79f30c4d
commit 3bd4973c90
3 changed files with 35 additions and 0 deletions

View File

@ -0,0 +1,7 @@
{
"path": {
"identity/oidc/token/oidc-role": {
"policy": "read"
}
}
}

View File

@ -0,0 +1,20 @@
# Consul Managed PKI Mounts
path "/sys/mounts" {
capabilities = [ "read" ]
}
path "/sys/mounts/connect_root" {
capabilities = [ "create", "read", "update", "delete", "list" ]
}
path "/sys/mounts/connect_inter" {
capabilities = [ "create", "read", "update", "delete", "list" ]
}
path "/connect_root/*" {
capabilities = [ "create", "read", "update", "delete", "list" ]
}
path "/connect_inter/*" {
capabilities = [ "create", "read", "update", "delete", "list" ]
}

View File

@ -12,3 +12,11 @@ directory '/etc/vault.d/policies' do
group 'vault' group 'vault'
mode '755' mode '755'
end end
%w( consul-auto-config consul-connect-vault ).each do |conf|
remote_file "/etc/vault.d/policies/#{conf}.hcl" do
owner 'vault'
group 'vault'
mode '644'
end
end