mirror of
https://github.com/hashicorp/vault-action.git
synced 2026-04-16 16:55:45 +00:00
Fix wildcard for K/V v2 and Cubbyhole. Add more tests
This commit is contained in:
parent
6c9a25ff52
commit
a729d0aca1
2 changed files with 27 additions and 1 deletions
|
|
@ -41,7 +41,11 @@ async function getSecrets(secretRequests, client) {
|
|||
|
||||
if (selector == wildcard) {
|
||||
body = JSON.parse(body);
|
||||
const keys = body.data;
|
||||
let keys = body.data;
|
||||
if (body.data["data"] != undefined) {
|
||||
keys = keys.data;
|
||||
}
|
||||
|
||||
for (let key in keys) {
|
||||
let newRequest = Object.assign({},secretRequest);
|
||||
newRequest.selector = key;
|
||||
|
|
@ -74,6 +78,9 @@ async function getSecrets(secretRequests, client) {
|
|||
cachedResponse
|
||||
});
|
||||
|
||||
//DEBUG
|
||||
//console.log("After", newRequest, value);
|
||||
|
||||
// used cachedResponse for first entry in wildcard list and set to true for the rest
|
||||
cachedResponse = true;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue