feat(credential): Add static credential store and username_password credential
This commit is contained in:
1 parent
b6da1ccac7
commit
58d546cdd4
59 files changed
+10859
-205
No files matched your search
@@ -0,0 +1,34 @@
|
||||
load _authorized_actions
|
||||
|
||||
function create_username_password_credential() {
|
||||
local name=$1
|
||||
local sid=$2
|
||||
local user=$3
|
||||
local pass=$4
|
||||
|
||||
boundary credentials create username-password \
|
||||
-name $name \
|
||||
-description 'test username password credential' \
|
||||
-credential-store-id $sid \
|
||||
-username $user \
|
||||
-password $pass
|
||||
}
|
||||
|
||||
function read_credential() {
|
||||
boundary credentials read -id $1 -format json
|
||||
}
|
||||
|
||||
function delete_credential() {
|
||||
boundary credentials delete -id $1
|
||||
}
|
||||
|
||||
function list_credentials() {
|
||||
boundary credentials list -credential-store-id $1 -format json
|
||||
}
|
||||
|
||||
function credential_id() {
|
||||
local name=$1
|
||||
local sid=$2
|
||||
|
||||
strip $(list_credentials $sid | jq -c ".items[] | select(.name | contains(\"$name\")) | .[\"id\"]")
|
||||
}
|
||||
Reference in new issue
Block a user