feat: PEP-3172 update scripts to support KAS#31
Open
dillonthompson wants to merge 10 commits intomainfrom
Open
feat: PEP-3172 update scripts to support KAS#31dillonthompson wants to merge 10 commits intomainfrom
dillonthompson wants to merge 10 commits intomainfrom
Conversation
Contributor
|
Proposed script updates for KAS
# KAS defaults
KAS_ENABLED=false
KEY_ID=""
if prompt "Do you want to enable KAS [yes/no]?"; then
KAS_ENABLED=true
KAS_AUTH_ISSUER="https://login.virtru.com/oauth2/default"
KAS_AUTH_AUDIENCE="https://api.virtru.com"
KAS_URI="https://${CKS_FQDN}"
while [ -z "$KEY_ID" ]; do
read -p "Enter the Virtru SaaS DSP Key ID for this KAS deployment: " KEY_ID
if [ -z "$KEY_ID" ]; then
printf "KEY_ID is required for KAS deployments.\n"
fi
done
fi
printf "KAS_ROOT_KEY=%s\n" "$KAS_ROOT_KEY" >> ./env/cks.env
printf "KEY_ID=%s\n" "$KEY_ID" >> ./env/cks.env
printf "ORG_ID=%s\n" "$JWT_AUTH_AUDIENCE" >> ./env/cks.env
printf "PORT=9000\n" >> ./env/cks.env
EXISTING_KEY_ID=$(grep '^KEY_ID=' "$WORKING_DIR"/env/cks.env 2>/dev/null | cut -d "=" -f2-)
if [ -z "$EXISTING_KEY_ID" ]; then
KEY_ID=""
while [ -z "$KEY_ID" ]; do
read -p "Enter the Virtru SaaS DSP Key ID for this KAS deployment: " KEY_ID
if [ -z "$KEY_ID" ]; then
printf "KEY_ID is required for KAS deployments.\n"
fi
done
else
KEY_ID="$EXISTING_KEY_ID"
fi
updateEnvVariable "KAS_ROOT_KEY" "$KAS_ROOT_KEY"
updateEnvVariable "KEY_ID" "$KEY_ID"
updateEnvVariable "ORG_ID" "$EXISTING_ORG_ID"
updateEnvVariable "PORT" "9000"Rationale: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.