saltstack / saltstack/salt

salt-key does not ask for confirmation when running salt-key -D

Open
#65,468 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug needs-triage
Dominant language
Python
Stars
15.7k
Forks
5.6k
Avg merge
2d 44m
Merged PRs (30d)
80

Description

Description of Issue

The salt-key binary is careful when deleting a single host key using salt-key -d . You have to confirm the removal of an accepted salt-client by typing Y/N
However when you accidentally type salt-key -D to delete a single key you will be surprised to immediately read the answer that all your keys were successfully deleted, without any Y/N request.
The user should be asked if he is sure to really delete all keys just like when salt-key -d is run.

Steps to Reproduce Issue

call salt-key -D and it will do what is documented but without any safety request similar to the behavior of salt-key -d

Versions Report

Salt: 3006.0

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the salt-key command entry point and reproduce the difference between salt-key -d and salt-key -D. Make the all-keys deletion path request Y/N confirmation, then verify that both accepting and declining the prompt behave safely; the issue names no specific file or test to run.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
cli, devops
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.