Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use --password-file for CA/SSH key password in ca token --offline #539

Closed
labichn opened this issue Sep 4, 2021 · 0 comments · Fixed by #544
Closed

Use --password-file for CA/SSH key password in ca token --offline #539

labichn opened this issue Sep 4, 2021 · 0 comments · Fixed by #544
Assignees
Labels
enhancement needs triage Waiting for discussion / prioritization by team

Comments

@labichn
Copy link

labichn commented Sep 4, 2021

What would you like to be added

The --password-file flag is an alias for --provisioner-password-file in the ca token command. When ca token is invoked with the --offline flag, that means the intermediate CA key password must be provided interactively.

I request/suggest that the --password-file flag should not be an alias for --provisioner-password-file, but should allow the intermediate CA key password to be passed in so ca token --offline can be used non-interactively.

Why this is needed

The ca token --offline command cannot be scripted as currently implemented.

The desired functionality would allow the following command to be performed without user input.

step ca token foo.example.org \
  --offline \
  --not-after 30m \
  --root $(step path)/certs/root_ca.crt \
  --password-file <(echo -n 'ca/ssh password') \
  --provisioner jwk \
  --provisioner-password-file <(echo -n 'jwk password') \
  --ssh --host
# => Currently, prints: "Cannot use two forms of the same flag: password-file provisioner-password-file"

Removing --password-file <(echo -n 'ca/ssh password') creates the token, once you enter the intermediate CA/SSH key password three times.

This is an instance of the general feature request in #502, but I haven't found any commands that it's not possible to script other than ca token --offline.

@labichn labichn added enhancement needs triage Waiting for discussion / prioritization by team labels Sep 4, 2021
@dopey dopey self-assigned this Sep 8, 2021
@dopey dopey closed this as completed in #544 Sep 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement needs triage Waiting for discussion / prioritization by team
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants