mirror of
https://github.com/optim-enterprises-bv/vault.git
synced 2025-11-02 03:27:54 +00:00
Add LIST support to sys/policies/password (#12787)
* Add read support to sys/policies/password Closes https://github.com/hashicorp/vault/issues/12562 * Add changelog * Empty commit to trigger CI * Add optional / Co-authored-by: Calvin Leung Huang <1883212+calvn@users.noreply.github.com> * Use a ListOperation Co-authored-by: Calvin Leung Huang <1883212+calvn@users.noreply.github.com>
This commit is contained in:
@@ -77,6 +77,43 @@ rule "charset" {
|
||||
$ vault write sys/policies/password/my-policy policy=@my-policy.hcl
|
||||
```
|
||||
|
||||
## List Password Policies
|
||||
|
||||
This endpoints list the password policies.
|
||||
|
||||
| Method | Path |
|
||||
| :------ | :--------------------------------- |
|
||||
| `LIST` | `/sys/policies/password` |
|
||||
| `GET` | `/sys/policies/password?list=true` |
|
||||
|
||||
### Sample Request
|
||||
|
||||
```shell
|
||||
$ curl \
|
||||
--header "X-Vault-Token: ..." \
|
||||
--request LIST \
|
||||
http://127.0.0.1:8200/v1/sys/policies/password
|
||||
```
|
||||
|
||||
### Sample Response
|
||||
|
||||
```json
|
||||
{
|
||||
"request_id": "58e2540f-8c51-6390-46de-38e279e75468",
|
||||
"lease_id": "",
|
||||
"renewable": false,
|
||||
"lease_duration": 0,
|
||||
"data": {
|
||||
"keys": [
|
||||
"my-policy"
|
||||
]
|
||||
},
|
||||
"wrap_info": null,
|
||||
"warnings": null,
|
||||
"auth": null
|
||||
}
|
||||
```
|
||||
|
||||
## Read Password Policy
|
||||
|
||||
This endpoint retrieves information about the named password policy.
|
||||
|
||||
Reference in New Issue
Block a user