|
|
|
|
@ -69,13 +69,6 @@ export NEW_PASSWORD_CREDENTIAL='test-pass'
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@test "boundary/credentials: can create $NEW_JSON_CREDENTIAL credential in $NEW_STORE store" {
|
|
|
|
|
local csid=$(credential_store_id $NEW_STORE $DEFAULT_P_ID)
|
|
|
|
|
run create_json_credential $NEW_JSON_CREDENTIAL $csid '-string-kv username=admin -string-kv password=pass'
|
|
|
|
|
echo "$output"
|
|
|
|
|
[ "$status" -eq 0 ]
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@test "boundary/credentials: can create $NEW_PASSWORD_CREDENTIAL credential in $NEW_STORE store" {
|
|
|
|
|
local csid=$(credential_store_id $NEW_STORE $DEFAULT_P_ID)
|
|
|
|
|
run create_password_credential $NEW_PASSWORD_CREDENTIAL $csid 'password'
|
|
|
|
|
@ -90,6 +83,13 @@ export NEW_PASSWORD_CREDENTIAL='test-pass'
|
|
|
|
|
[ "$status" -eq 1 ]
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@test "boundary/credentials: can create $NEW_JSON_CREDENTIAL credential in $NEW_STORE store" {
|
|
|
|
|
local csid=$(credential_store_id $NEW_STORE $DEFAULT_P_ID)
|
|
|
|
|
run create_json_credential $NEW_JSON_CREDENTIAL $csid '-string-kv username=admin -string-kv password=pass'
|
|
|
|
|
echo "$output"
|
|
|
|
|
[ "$status" -eq 0 ]
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@test "boundary/credentials: can not create already created $NEW_CREDENTIAL credential" {
|
|
|
|
|
local csid=$(credential_store_id $NEW_STORE $DEFAULT_P_ID)
|
|
|
|
|
run create_username_password_credential $NEW_CREDENTIAL $csid 'username' 'password'
|
|
|
|
|
@ -140,26 +140,25 @@ export NEW_PASSWORD_CREDENTIAL='test-pass'
|
|
|
|
|
echo "$output"
|
|
|
|
|
[ "$status" -eq 0 ]
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@test "boundary/credentials: can read $NEW_PASSWORD_CREDENTIAL credential" {
|
|
|
|
|
@test "boundary/credentials: can read $NEW_UPD_AT_CREDENTIAL credential" {
|
|
|
|
|
local csid=$(credential_store_id $NEW_STORE $DEFAULT_P_ID)
|
|
|
|
|
local cid=$(credential_id $NEW_PASSWORD_CREDENTIAL $csid)
|
|
|
|
|
local cid=$(credential_id $NEW_UPD_AT_CREDENTIAL $csid)
|
|
|
|
|
run read_credential $cid
|
|
|
|
|
echo "$output"
|
|
|
|
|
[ "$status" -eq 0 ]
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@test "boundary/credentials: can read $NEW_UPD_AT_CREDENTIAL credential" {
|
|
|
|
|
@test "boundary/credentials: can read $NEW_UPD_SLASH_CREDENTIAL credential" {
|
|
|
|
|
local csid=$(credential_store_id $NEW_STORE $DEFAULT_P_ID)
|
|
|
|
|
local cid=$(credential_id $NEW_UPD_AT_CREDENTIAL $csid)
|
|
|
|
|
local cid=$(credential_id $NEW_UPD_SLASH_CREDENTIAL $csid)
|
|
|
|
|
run read_credential $cid
|
|
|
|
|
echo "$output"
|
|
|
|
|
[ "$status" -eq 0 ]
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@test "boundary/credentials: can read $NEW_UPD_SLASH_CREDENTIAL credential" {
|
|
|
|
|
@test "boundary/credentials: can read $NEW_PASSWORD_CREDENTIAL credential" {
|
|
|
|
|
local csid=$(credential_store_id $NEW_STORE $DEFAULT_P_ID)
|
|
|
|
|
local cid=$(credential_id $NEW_UPD_SLASH_CREDENTIAL $csid)
|
|
|
|
|
local cid=$(credential_id $NEW_PASSWORD_CREDENTIAL $csid)
|
|
|
|
|
run read_credential $cid
|
|
|
|
|
echo "$output"
|
|
|
|
|
[ "$status" -eq 0 ]
|
|
|
|
|
@ -209,6 +208,15 @@ export NEW_PASSWORD_CREDENTIAL='test-pass'
|
|
|
|
|
[ "$status" -eq 0 ]
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@test "boundary/credentials: can delete $NEW_PASSWORD_CREDENTIAL credential" {
|
|
|
|
|
local csid=$(credential_store_id $NEW_STORE $DEFAULT_P_ID)
|
|
|
|
|
local cid=$(credential_id $NEW_PASSWORD_CREDENTIAL $csid)
|
|
|
|
|
run delete_credential $cid
|
|
|
|
|
echo "$output"
|
|
|
|
|
run has_status_code "$output" "204"
|
|
|
|
|
[ "$status" -eq 0 ]
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@test "boundary/credentials: can delete $NEW_JSON_CREDENTIAL credential" {
|
|
|
|
|
local csid=$(credential_store_id $NEW_STORE $DEFAULT_P_ID)
|
|
|
|
|
local cid=$(credential_id $NEW_JSON_CREDENTIAL $csid)
|
|
|
|
|
@ -287,6 +295,14 @@ export NEW_PASSWORD_CREDENTIAL='test-pass'
|
|
|
|
|
[ "$status" -eq 1 ]
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@test "boundary/credential-stores: can not read deleted $NEW_PASSWORD_CREDENTIAL credential" {
|
|
|
|
|
local csid=$(credential_store_id $NEW_STORE $DEFAULT_P_ID)
|
|
|
|
|
local cid=$(credential_id $NEW_PASSWORD_CREDENTIAL $csid)
|
|
|
|
|
run read_credential $cid
|
|
|
|
|
echo "$output"
|
|
|
|
|
[ "$status" -eq 1 ]
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@test "boundary/credential-stores: can delete $NEW_STORE static store" {
|
|
|
|
|
local csid=$(credential_store_id $NEW_STORE $DEFAULT_P_ID)
|
|
|
|
|
run delete_credential_store $csid
|
|
|
|
|
@ -308,12 +324,4 @@ export NEW_PASSWORD_CREDENTIAL='test-pass'
|
|
|
|
|
run read_credential $cid
|
|
|
|
|
echo "$output"
|
|
|
|
|
[ "$status" -eq 1 ]
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@test "boundary/credential-stores: can not read deleted $NEW_PASSWORD_CREDENTIAL credential" {
|
|
|
|
|
local csid=$(credential_store_id $NEW_STORE $DEFAULT_P_ID)
|
|
|
|
|
local cid=$(credential_id $NEW_PASSWORD_CREDENTIAL $csid)
|
|
|
|
|
run read_credential $cid
|
|
|
|
|
echo "$output"
|
|
|
|
|
[ "$status" -eq 1 ]
|
|
|
|
|
}
|