mirror of
https://github.com/optim-enterprises-bv/vault.git
synced 2025-10-29 17:52:32 +00:00
Docs: Plugin versioning documentation (#17460)
Co-authored-by: John-Michael Faircloth <fairclothjm@users.noreply.github.com>
This commit is contained in:
@@ -28,7 +28,7 @@ $ curl \
|
||||
|
||||
### Sample Response
|
||||
|
||||
```javascript
|
||||
```json
|
||||
{
|
||||
"data": {
|
||||
"auth": [
|
||||
@@ -44,6 +44,32 @@ $ curl \
|
||||
"mysql-database-plugin",
|
||||
"postgresql-database-plugin"
|
||||
],
|
||||
"detailed": [
|
||||
{
|
||||
"builtin": true,
|
||||
"deprecation_status": "supported",
|
||||
"name": "aws",
|
||||
"type": "auth",
|
||||
"version": "v1.12.0+builtin.vault"
|
||||
},
|
||||
...
|
||||
{
|
||||
"builtin": true,
|
||||
"deprecation_status": "supported",
|
||||
"name": "cassandra-database-plugin",
|
||||
"type": "database",
|
||||
"version": "v1.12.0+builtin.vault"
|
||||
},
|
||||
...
|
||||
{
|
||||
"builtin": true,
|
||||
"deprecation_status": "supported",
|
||||
"name": "aws",
|
||||
"type": "secret",
|
||||
"version": "v1.12.0+builtin.vault"
|
||||
},
|
||||
...
|
||||
],
|
||||
"secret": [
|
||||
"ad",
|
||||
"aws",
|
||||
@@ -76,7 +102,7 @@ $ curl \
|
||||
|
||||
### Sample Response
|
||||
|
||||
```javascript
|
||||
```json
|
||||
{
|
||||
"data": {
|
||||
"keys": [
|
||||
@@ -111,6 +137,8 @@ supplied name.
|
||||
- `type` `(string: <required>)` – Specifies the type of this plugin. May be
|
||||
"auth", "database", or "secret".
|
||||
|
||||
- `version` `(string: "")` - Specifies the semantic version of this plugin.
|
||||
|
||||
- `sha256` `(string: <required>)` – This is the SHA256 sum of the plugin's
|
||||
binary. Before a plugin is run it's SHA will be checked against this value, if
|
||||
they do not match the plugin can not be run.
|
||||
@@ -152,9 +180,9 @@ This endpoint returns the configuration data for the plugin with the given name.
|
||||
- **`sudo` required** – This endpoint requires `sudo` capability in addition to
|
||||
any path-specific capabilities.
|
||||
|
||||
| Method | Path |
|
||||
| :----- | :--------------------------------- |
|
||||
| `GET` | `/sys/plugins/catalog/:type/:name` |
|
||||
| Method | Path |
|
||||
| :----- | :-------------------------------------------------- |
|
||||
| `GET` | `/sys/plugins/catalog/:type/:name?version=:version` |
|
||||
|
||||
### Parameters
|
||||
|
||||
@@ -164,6 +192,8 @@ This endpoint returns the configuration data for the plugin with the given name.
|
||||
- `type` `(string: <required>)` – Specifies the type of this plugin. May be
|
||||
"auth", "database", or "secret".
|
||||
|
||||
- `version` `(string: "")` – The semantic version of the plugin to read.
|
||||
|
||||
### Sample Request
|
||||
|
||||
```shell-session
|
||||
@@ -175,15 +205,16 @@ $ curl \
|
||||
|
||||
### Sample Response
|
||||
|
||||
```javascript
|
||||
```json
|
||||
{
|
||||
"data": {
|
||||
"args": [],
|
||||
"builtin": false,
|
||||
"command": "/tmp/vault-plugins/mysql-database-plugin",
|
||||
"name": "example-plugin",
|
||||
"sha256": "0TC5oPv93vlwnY/5Ll5gU8zSRreGMvwDuFSEVwJpYek="
|
||||
}
|
||||
"data": {
|
||||
"args": [],
|
||||
"builtin": false,
|
||||
"command": "/tmp/vault-plugins/mysql-database-plugin",
|
||||
"name": "example-plugin",
|
||||
"sha256": "0TC5oPv93vlwnY/5Ll5gU8zSRreGMvwDuFSEVwJpYek=",
|
||||
"version": "v1.0.0"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
@@ -194,9 +225,9 @@ This endpoint removes the plugin with the given name.
|
||||
- **`sudo` required** – This endpoint requires `sudo` capability in addition to
|
||||
any path-specific capabilities.
|
||||
|
||||
| Method | Path |
|
||||
| :------- | :--------------------------------- |
|
||||
| `DELETE` | `/sys/plugins/catalog/:type/:name` |
|
||||
| Method | Path |
|
||||
| :------- | :-------------------------------------------------- |
|
||||
| `DELETE` | `/sys/plugins/catalog/:type/:name?version=:version` |
|
||||
|
||||
### Parameters
|
||||
|
||||
@@ -206,11 +237,14 @@ This endpoint removes the plugin with the given name.
|
||||
- `type` `(string: <required>)` – Specifies the type of this plugin. May be
|
||||
"auth", "database", or "secret".
|
||||
|
||||
- `version` `(string: "")` – Specifies the semantic version of the plugin
|
||||
to delete.
|
||||
|
||||
### Sample Request
|
||||
|
||||
```shell-session
|
||||
$ curl \
|
||||
--header "X-Vault-Token: ..." \
|
||||
--request DELETE \
|
||||
http://127.0.0.1:8200/v1/sys/plugins/catalog/secret/example-plugin
|
||||
http://127.0.0.1:8200/v1/sys/plugins/catalog/secret/example-plugin?version=v1.0.0
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user