Task 5.7: Enable secrets engines using the CLI, API, and UI
vault secrets enable with -path and -version, POST to sys/mounts, tuning lease TTLs, the UI flow, and the errors a busy or reserved path returns.
Study it
Enabling secrets engines from the CLI, the API and the UI
Lesson coming
Sample questions
Try each one before opening the answer. Every option is explained, with the HashiCorp documentation page that proves it.
Question 1 · choose 1
A team ran these commands, wanting KV version 2 at team-a/:
$ vault secrets enable -path=team-a kv
$ vault kv put team-a/app key=value
$ vault secrets enable -path=team-a -version=2 kv
Error enabling: ... path is already in use at team-a/
The data already written must stay at team-a/. What should the team run?
Avault secrets enable -path=team-a kv-v2
Bvault kv enable-versioning team-a/
Cvault secrets disable team-a/, then enable it again with -version=2
Dvault secrets move team-a/ team-a-old/, then enable version 2 at team-a/
Show the answer and why
Avault secrets enable -path=team-a kv-v2
Incorrect
Enabling any engine at a path that is already mounted returns the same error.
Bvault kv enable-versioning team-a/
Correct
This upgrades the existing KV v1 mount to version 2 in place, keeping its data at the same path.
Cvault secrets disable team-a/, then enable it again with -version=2
Incorrect
Disabling a mount deletes all of its data from storage.
Dvault secrets move team-a/ team-a-old/, then enable version 2 at team-a/
Incorrect
The existing data would then live at team-a-old/, not at team-a/.
Upgrade a v1 mount in place with kv enable-versioning.
A team built its own secrets engine plugin and copied the binary into the server's plugin directory. vault secrets enable -path=inventory inventory-plugin fails because Vault does not know the plugin. What step is missing?
AEnable it with -plugin-version set to the binary's version
BRegister the binary in the plugin catalog with vault plugin register
CRestart Vault so that it loads every binary in its plugin directory
DEnable it through the UI, which accepts unregistered plugins
Show the answer and why
AEnable it with -plugin-version set to the binary's version
Incorrect
A version selects among registered plugins; it does not make an unknown binary known.
BRegister the binary in the plugin catalog with vault plugin register
Correct
An external plugin must be registered in the plugin catalog, for example with its SHA-256 checksum, before secrets enable can mount it.
CRestart Vault so that it loads every binary in its plugin directory
Incorrect
Being in the directory is not enough; each external plugin must be registered first.
DEnable it through the UI, which accepts unregistered plugins
Incorrect
Only built-in plugins are preregistered; an external plugin must be registered before any mount can use it, whichever interface enables it.
Built-in plugins are preregistered; external ones must be registered in the plugin catalog before any mount can use them.