Nomad Version : >= 1.0.0
Nomad Ent. Version : >= 0.7.0
https://learn.hashicorp.com/tutorials/nomad/namespaces
Namespace 생성
$ nomad namespace apply -description "PoC Application" apps
약 2 분
Nomad Version : >= 1.0.0
Nomad Ent. Version : >= 0.7.0
https://learn.hashicorp.com/tutorials/nomad/namespaces
$ nomad namespace apply -description "PoC Application" apps
# 사용된 policy들
$ cat nomad-cluster-role.json
{
"allowed_policies": "admin",
"token_explicit_max_ttl": 0,
"name": "nomad-cluster",
"orphan": true,
"token_period": 259200,
"renewable": true
}
vault write /auth/token/roles/nomad-cluster @nomad-cluster-role.json
$ cat admin-policy.hcl
# Read system health check
path "sys/health"
{
capabilities = ["read", "sudo"]
}
# Create and manage ACL policies broadly across Vault
# List existing policies
path "sys/policies/acl"
{
capabilities = ["list"]
}
# Create and manage ACL policies
path "sys/policies/acl/*"
{
capabilities = ["create", "read", "update", "delete", "list", "sudo"]
}
# Enable and manage authentication methods broadly across Vault
# Manage auth methods broadly across Vault
path "auth/*"
{
capabilities = ["create", "read", "update", "delete", "list", "sudo"]
}
# Create, update, and delete auth methods
path "sys/auth/*"
{
capabilities = ["create", "update", "delete", "sudo"]
}
# List auth methods
path "sys/auth"
{
capabilities = ["read"]
}
# Enable and manage the key/value secrets engine at `secret/` path
# List, create, update, and delete key/value secrets
path "secret/*"
{
capabilities = ["create", "read", "update", "delete", "list", "sudo"]
}
# Manage secrets engines
path "sys/mounts/*"
{
capabilities = ["create", "read", "update", "delete", "list", "sudo"]
}
# List existing secrets engines.
path "sys/mounts"
{
capabilities = ["read"]
}
vault policy write admin admin-policy.hcl
# token 생성
vault token create -policy admin -period 72h -orphan