Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save rwbaskette/7474ac6f5e44d50ad2c1ca4c16e104c2 to your computer and use it in GitHub Desktop.

Select an option

Save rwbaskette/7474ac6f5e44d50ad2c1ca4c16e104c2 to your computer and use it in GitHub Desktop.
Manually Register Drata Client on Linux
#!/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