Skip to content

Obtaining a token non interactively and without password file #864

Answered by tashian
jwh asked this question in Q&A
Discussion options

You must be logged in to vote

Hi @jwh,

The approach we recommend here is to use process substitution. Assuming the env variable itself is well protected, you can safely do something like this:

$  STEP_CA_PASSWORD=amazingpw; step ca token ... --provisioner-password-file <(echo -n "$STEP_CA_PASSWORD")

See also: Our blog How to Handle Secrets on the Command Line

Hope this helps :D

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@jwh
Comment options

@tashian
Comment options

tashian Mar 23, 2022
Collaborator

@jwh
Comment options

Answer selected by jwh
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants