Created
March 5, 2024 19:10
-
-
Save rwbaskette/7474ac6f5e44d50ad2c1ca4c16e104c2 to your computer and use it in GitHub Desktop.
Manually Register Drata Client on Linux
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
| #!/usr/bin/env bash | |
| DRATA_TOKEN="UUID_TOKEN_FROM_DRATA" | |
| DRATA_REGION="NA" | |
| CONFIG_FILE="${HOME}/.config/drata-agent/app-data.json" | |
| CONFIG_FILE_BAK="${HOME}/.config/drata-agent/app-data.json.orig" | |
| if [ ! -f $CONFIG_FILE_BAK ]; then | |
| cp $CONFIG_FILE $CONFIG_FILE_BAK; | |
| fi | |
| cat $CONFIG_FILE_BAK | \ | |
| jq ".capturedProtocol += {\"protocolSchema\":\"auth-drata-agent\",\"args\":{\"token\":\"${DRATA_TOKEN}\",\"region\":\"${DRATA_REGION}\"}}" \ | |
| > $CONFIG_FILE | |
| echo "DONE" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment