2022-05-18 20:20:45 -07:00
|
|
|
load _authorized_actions
|
|
|
|
|
|
|
|
|
|
function create_static_credential_store() {
|
|
|
|
|
local name=$1
|
|
|
|
|
local sid=$2
|
|
|
|
|
|
|
|
|
|
boundary credential-stores create static \
|
|
|
|
|
-name $name \
|
|
|
|
|
-description 'test static credential store' \
|
|
|
|
|
-scope-id $sid
|
|
|
|
|
}
|
|
|
|
|
|
2023-01-24 13:01:20 +00:00
|
|
|
function create_vault_credential_store() {
|
|
|
|
|
boundary credential-stores create vault $@
|
|
|
|
|
}
|
|
|
|
|
|
2022-05-18 20:20:45 -07:00
|
|
|
function read_credential_store() {
|
|
|
|
|
boundary credential-stores read -id $1 -format json
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function delete_credential_store() {
|
2023-02-01 20:54:08 +00:00
|
|
|
boundary credential-stores delete -id $1 -format json
|
2022-05-18 20:20:45 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function list_credential_stores() {
|
|
|
|
|
boundary credential-stores list -scope-id $1 -format json
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function credential_store_id() {
|
|
|
|
|
local name=$1
|
|
|
|
|
local sid=$2
|
|
|
|
|
|
|
|
|
|
strip $(list_credential_stores $sid | jq -c ".items[] | select(.name | contains(\"$name\")) | .[\"id\"]")
|
|
|
|
|
}
|