-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Update docs to match running builtins as plugins #5727
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,17 +9,17 @@ description: |- | |
|
||
# `/sys/plugins/catalog` | ||
|
||
The `/sys/plugins/catalog` endpoint is used to list, register, update, and | ||
The `/sys/plugins/catalog` endpoint is used to read, register, update, and | ||
remove plugins in Vault's catalog. Plugins must be registered before use, and | ||
once registered backends can use the plugin by querying the catalog. | ||
|
||
## List Plugins | ||
## Read Plugins | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Even though the Method has changed to GET, I think "List" is still the right word for the heading, and is consistent with following sentence. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Good point! Also, revisiting this made me realize I'd not included the new three LIST endpoints for plugins by type, so I'm adding those. |
||
|
||
This endpoint lists the plugins in the catalog. | ||
This endpoint lists the plugins in the catalog by type. | ||
|
||
| Method | Path | Produces | | ||
| :------- | :--------------------------- | :--------------------- | | ||
| `LIST` | `/sys/plugins/catalog` | `200 application/json` | | ||
| `GET` | `/sys/plugins/catalog` | `200 application/json` | | ||
|
||
### Sample Request | ||
|
||
|
@@ -35,11 +35,25 @@ $ curl \ | |
```javascript | ||
{ | ||
"data": { | ||
"keys": [ | ||
"auth": [ | ||
"aws", | ||
"azure", | ||
"custom-auth-plugin", | ||
"gcp", | ||
"ldap" | ||
], | ||
"database": [ | ||
"cassandra-database-plugin", | ||
"mssql-database-plugin", | ||
"mysql-database-plugin", | ||
"postgresql-database-plugin" | ||
], | ||
"secret": [ | ||
"ad", | ||
"aws", | ||
"azure", | ||
"gcp", | ||
"transit" | ||
] | ||
} | ||
} | ||
|
@@ -53,15 +67,18 @@ supplied name. | |
- **`sudo` required** – This endpoint requires `sudo` capability in addition to | ||
any path-specific capabilities. | ||
|
||
| Method | Path | Produces | | ||
| :------- | :--------------------------- | :--------------------- | | ||
| `PUT` | `/sys/plugins/catalog/:name` | `204 (empty body)` | | ||
| Method | Path | Produces | | ||
| :------- | :--------------------------------- | :--------------------- | | ||
| `PUT` | `/sys/plugins/catalog/:type/:name` | `204 (empty body)` | | ||
|
||
### Parameters | ||
|
||
- `name` `(string: <required>)` – Specifies the name for this plugin. The name | ||
is what is used to look up plugins in the catalog. This is part of the request | ||
URL. | ||
|
||
- `type` `(string: <required>)` – Specifies the type of this plugin. May be | ||
"auth", "database", or "secret". | ||
|
||
- `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 | ||
|
@@ -94,7 +111,7 @@ $ curl \ | |
--header "X-Vault-Token: ..." \ | ||
--request PUT \ | ||
--data @payload.json \ | ||
http://127.0.0.1:8200/v1/sys/plugins/catalog/example-plugin | ||
http://127.0.0.1:8200/v1/sys/plugins/catalog/secret/example-plugin | ||
``` | ||
|
||
## Read Plugin | ||
|
@@ -104,22 +121,25 @@ 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 | Produces | | ||
| :------- | :--------------------------- | :--------------------- | | ||
| `GET` | `/sys/plugins/catalog/:name` | `200 application/json` | | ||
| Method | Path | Produces | | ||
| :------- | :--------------------------------- | :--------------------- | | ||
| `GET` | `/sys/plugins/catalog/:type/:name` | `200 application/json` | | ||
|
||
### Parameters | ||
|
||
- `name` `(string: <required>)` – Specifies the name of the plugin to retrieve. | ||
This is part of the request URL. | ||
|
||
- `type` `(string: <required>)` – Specifies the type of this plugin. May be | ||
"auth", "database", or "secret". | ||
|
||
### Sample Request | ||
|
||
``` | ||
$ curl \ | ||
--header "X-Vault-Token: ..." \ | ||
--request GET \ | ||
http://127.0.0.1:8200/v1/sys/plugins/catalog/example-plugin | ||
http://127.0.0.1:8200/v1/sys/plugins/catalog/secret/example-plugin | ||
``` | ||
|
||
### Sample Response | ||
|
@@ -144,18 +164,21 @@ This endpoint removes the plugin with the given name. | |
|
||
| Method | Path | Produces | | ||
| :------- | :--------------------------- | :--------------------- | | ||
| `DELETE` | `/sys/plugins/catalog/:name` | `204 (empty body)` | | ||
| `DELETE` | `/sys/plugins/catalog/:type/:name` | `204 (empty body)` | | ||
|
||
### Parameters | ||
|
||
- `name` `(string: <required>)` – Specifies the name of the plugin to delete. | ||
This is part of the request URL. | ||
|
||
- `type` `(string: <required>)` – Specifies the type of this plugin. May be | ||
"auth", "database", or "secret". | ||
|
||
### Sample Request | ||
|
||
``` | ||
$ curl \ | ||
--header "X-Vault-Token: ..." \ | ||
--request DELETE \ | ||
http://127.0.0.1:8200/v1/sys/plugins/catalog/example-plugin | ||
http://127.0.0.1:8200/v1/sys/plugins/catalog/secret/example-plugin | ||
``` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove reference to plugin name & backends.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch!