Create token with policy

Issue a short-lived token limited to a specific policy

vault token create -policy=read-only -ttl=1h

tool
vault31 commands
tags
vault

More vault commands

  • vault auth list

    Show all enabled auth backends in Vault

  • vault auth enable kubernetes && vault write auth/kubernetes/config kubernetes_host=https://$KUBERNETES_PORT_443_TCP_ADDR:443

    Enable and configure Kubernetes auth method

  • vault write auth/kubernetes/role/my-role bound_service_account_names=<sa> bound_service_account_namespaces=<ns> policies=<policy> ttl=1h

    Bind a k8s ServiceAccount to a Vault policy

  • vault policy write my-policy policy.hcl

    Upload an HCL policy file to Vault

  • vault policy list

    List all policies in Vault

all 31 vault commands