Skip to content
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

List all secrets from vault with couchdb as storage backend limits to 100 secrets #4124

Closed
tiru1012 opened this issue Mar 13, 2018 · 0 comments · Fixed by #4149
Closed

List all secrets from vault with couchdb as storage backend limits to 100 secrets #4124

tiru1012 opened this issue Mar 13, 2018 · 0 comments · Fixed by #4149
Milestone

Comments

@tiru1012
Copy link

tiru1012 commented Mar 13, 2018

when used couchdb as backend for vault, the vault returns only 100 secrets when ran below api
https://vault:8200/v1/secret?list=true

I see the limit is hardcoded in the code. It would be good enough if an env variable or a flag is made available for setting this limit.

func (m *couchDBClient) list(prefix string) ([]couchDBListItem, error) {
	req, _ := http.NewRequest("GET", fmt.Sprintf("%s/_all_docs", m.endpoint), nil)
	req.SetBasicAuth(m.username, m.password)
	values := req.URL.Query()
	values.Set("skip", "0")
	values.Set("limit", "100")
	values.Set("include_docs", "false")
	if prefix != "" {
		values.Set("startkey", fmt.Sprintf("%q", prefix))
		values.Set("endkey", fmt.Sprintf("%q", prefix+"{}"))
	}
	req.URL.RawQuery = values.Encode()

Its an important fix that IBM needs. Please help prioritizing this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants