Skip to content

Commit

Permalink
try to create a new client, no attributes
Browse files Browse the repository at this point in the history
  • Loading branch information
elizabethhealy committed Dec 19, 2024
1 parent 5be9bb1 commit bebb7b0
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 13 deletions.
8 changes: 8 additions & 0 deletions .github/workflows/roundtrip/config-demo-idp.sh
Original file line number Diff line number Diff line change
Expand Up @@ -42,5 +42,13 @@ kcadm.sh create clients -r opentdf \
-s 'protocolMappers=[{"name":"aud","protocol":"openid-connect","protocolMapper":"oidc-audience-mapper","consentRequired":false,"config":{"access.token.claim":"true","included.custom.audience":"http://localhost:65432"}}]' \
-s 'attributes={"dpop.bound.access.tokens":"true"}'

kcadm.sh create clients -r opentdf \
-s clientId=testclient \
-s secret=secret \
-s enabled=true \
-s standardFlowEnabled=true \
-s serviceAccountsEnabled=true \
-s 'protocolMappers=[{"name":"aud","protocol":"openid-connect","protocolMapper":"oidc-audience-mapper","consentRequired":false,"config":{"access.token.claim":"true","included.custom.audience":"http://localhost:65432"}}]'

kcadm.sh create users -r opentdf -s username=user1 -s enabled=true -s firstName=Alice -s lastName=User
kcadm.sh set-password -r opentdf --username user1 --new-password testuser123
16 changes: 8 additions & 8 deletions .github/workflows/roundtrip/encrypt-decrypt.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,18 +15,18 @@ _nano_test() {
--kasEndpoint http://localhost:65432/kas \
--ignoreAllowList \
--oidcEndpoint http://localhost:65432/auth/realms/opentdf \
--auth opentdf:secret \
--auth testclient:secret \
--output sample.txt.ntdf \
encrypt "${plain}" \
--attributes https://example.com/attr/attr1/value/value1
encrypt "${plain}" #\
# --attributes https://example.com/attr/attr1/value/value1

[ -f sample.txt.ntdf ]

npx "$2" --log-level DEBUG \
--kasEndpoint http://localhost:65432/kas \
--ignoreAllowList \
--oidcEndpoint http://localhost:65432/auth/realms/opentdf \
--auth opentdf:secret \
--auth testclient:secret \
--output sample_out.txt \
decrypt sample.txt.ntdf

Expand All @@ -46,19 +46,19 @@ _tdf3_test() {
--kasEndpoint http://localhost:65432/kas \
--ignoreAllowList \
--oidcEndpoint http://localhost:65432/auth/realms/opentdf \
--auth opentdf:secret \
--auth testclient:secret \
--output sample.txt.tdf \
encrypt "${plain}" \
--containerType tdf3 \
--attributes https://example.com/attr/attr1/value/value1
--containerType tdf3 #\
# --attributes https://example.com/attr/attr1/value/value1

[ -f sample.txt.tdf ]

npx "$2" --log-level DEBUG \
--kasEndpoint http://localhost:65432/kas \
--ignoreAllowList \
--oidcEndpoint http://localhost:65432/auth/realms/opentdf \
--auth opentdf:secret \
--auth testclient:secret \
--output sample_out.txt \
--containerType tdf3 \
decrypt sample.txt.tdf
Expand Down
9 changes: 4 additions & 5 deletions .github/workflows/roundtrip/wait-and-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -162,11 +162,10 @@ if [ $1 = platform ]; then
fi
fi

echo "[WARN] Skipping cli tests"
# if ! "${APP}"; then
# echo "[ERROR] Encrypt/decrypt failure"
# exit 2
# fi
if ! "${APP}"; then
echo "[ERROR] Encrypt/decrypt failure"
exit 2
fi

if ! cd "${WEB_APP_DIR}"; then
echo "[ERROR] Couldn't cd to web-app dir, [${WEB_APP_DIR}]"
Expand Down

0 comments on commit bebb7b0

Please sign in to comment.