Need to list roles in PKI secret backend

1,926 views
Skip to first unread message

Brandon Bradley

unread,
Apr 18, 2017, 7:28:12 AM4/18/17
to Vault
Hello,

I'm trying to list the existing roles in a PKI backend. I've examined the path-help pretty thoroughly and found this:

# vault path-help pki/roles
Request:        roles
Matching Route: ^roles/?$

List the existing roles in this backend


## DESCRIPTION

Roles will be listed by the role name.

However, reading from this path yields:

# vault read pki/roles
Error reading pki/roles: Error making API request.

URL
: GET https://127.0.0.1:8200/v1/pki/roles
Code: 405. Errors:

* 1 error occurred:

* unsupported operation

Am I doing something wrong? Or is this a bug?

Cheers!
Brandon

Chris Hoffman

unread,
Apr 18, 2017, 8:20:07 AM4/18/17
to vault...@googlegroups.com
You can use the list command to list out pki roles.  In the HTTP api, the LIST verb is used or you can GET with the query parameter ?list=true.  See the api documentation here https://www.vaultproject.io/api/secret/pki/index.html#list-roles

vault list pki/roles 

Chris

--
This mailing list is governed under the HashiCorp Community Guidelines - https://www.hashicorp.com/community-guidelines.html. Behavior in violation of those guidelines may result in your removal from this mailing list.
 
GitHub Issues: https://github.com/hashicorp/vault/issues
IRC: #vault-tool on Freenode
---
You received this message because you are subscribed to the Google Groups "Vault" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vault-tool+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vault-tool/40d15cc5-813c-4506-b0ab-c91c442ed231%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages