Skip to content

Instantly share code, notes, and snippets.

@chrishoffman
Created May 22, 2017 13:11
Show Gist options
  • Save chrishoffman/a204b7726f5c77a4ea81ed843bd40913 to your computer and use it in GitHub Desktop.
Save chrishoffman/a204b7726f5c77a4ea81ed843bd40913 to your computer and use it in GitHub Desktop.
PKI max ttl
# setup pki
vault mount pki
vault mount-tune -max-lease-ttl=87600h pki
vault write pki/root/generate/internal common_name="Vault Testing Root Authority" ttl=87600h
# create role
vault write pki/roles/test allow_any_name=true enforce_hostnames=false max_ttl=1440h
# create certificate and read it
vault write -format=json pki/issue/test common_name=test ttl=1440h | \
jq -r .data.certificate | \
openssl x509 -noout -text | \
grep "Not "
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment