Skip to content

Instantly share code, notes, and snippets.

Created May 4, 2020 19:38
  • Star 6 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save bdemers/d4ee7a8d5e489cc8c0e680db386ee8a2 to your computer and use it in GitHub Desktop.
#!/usr/bin/env bash
# requires `yq` and `jq` cli tools
OKTA_API_TOKEN=$(yq --raw-output .okta.client.token ~/.okta/okta.yaml)
CERT=$(cat "${RENEWED_LINEAGE}/cert.pem")
KEY=$(cat "${RENEWED_LINEAGE}/privkey.pem")
CHAIN=$(cat "${RENEWED_LINEAGE}/chain.pem")
echo "Updating Okta Certs"
http POST $API_URL "Authorization: SSWS ${OKTA_API_TOKEN}" \
publicCertContent="${CERT}" \
privateKeyContent="${KEY}" \
#!/usr/bin/env bash
# NOTE the `-admin` in the okta domain below
certbot --config-dir etc/letsencrypt \
--work-dir work \
--logs-dir logs \
certonly \
--manual \
--manual-public-ip-logging-ok \
--manual-auth-hook "./ create" \
--manual-cleanup-hook "./ delete" \
--deploy-hook "./" \
--preferred-challenges dns \
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment