I have vault set up to auto-unseal using another vault server. I have created what I believe should be a renewable periodic token:
Key Value
--- -----
accessor fXXXXXXXXXXXXXXXXXXXXXXXXXi
creation_time 1633457637
creation_ttl 768h
display_name token-delme
entity_id n/a
expire_time 2021-11-06T18:13:57.686777872Z
explicit_max_ttl 0s
id s.XXXXXXXXXXXXXXXXZ
issue_time 2021-10-05T18:13:57.021630522Z
last_renewal 2021-10-05T18:15:35.686778002Z
last_renewal_time 1633457735
meta <nil>
num_uses 0
orphan true
path auth/token/create/unsealer
period 768h
policies [default unsealer]
renewable true
role unsealer
ttl 767h58m19s
type service
However, I can’t seem to renew said token:
WARNING! The following warnings were returned from Vault:
* TTL of "767h59m28s" exceeded the effective max_ttl of "767h58m22s"; TTL
value is capped accordingly
Key Value
--- -----
token s.XXXXXXXXXXXZ
token_accessor fXXXXXXXXXXi
token_duration 767h58m22s
token_renewable true
token_policies ["default" "unsealer"]
identity_policies []
policies ["default" "unsealer"]
Command used to create the token:
vault token create \
-display-name="delme" \
-orphan=true \
-period="768h" \
-policy "unsealer" \
-role="unsealer"
Unsealer policy:
# Allow operator to use Vault via Terraform.
# https://www.terraform.io/docs/providers/vault/index.html#token
path "auth/token/create" {
capabilities = [ "update" ]
}
# Allow encryption for respective vault domain
path "unsealer/encrypt/vault.example.com" {
capabilities = [ "update" ]
}
# Allow decryption for respective vault domain
path "unsealer/decrypt/vault.example.com" {
capabilities = [ "update" ]
}
If I leave off the -role
then I am able to renew it just fine. However, without that role the token cannot be used to authenticate. Any idea what I’m missing here?