#!/usr/bin/env bash # Script: gen-firezone-secrets.sh # Purpose: Generate all Firezone-required secrets as random hex values, # and store them in an OpenShift secret. # Configures Gmail as SMTP relay in OUTBOUND_EMAIL_ADAPTER_OPTS. set -euo pipefail # Change to your desired namespace (project name): NAMESPACE="firezone" SECRET_NAME="firezone-secrets" # Random hex strings for Firezone secrets (adjust byte sizes as needed). SECRET_KEY_BASE="$(openssl rand -hex 32)" LIVE_VIEW_SIGNING_SALT="$(openssl rand -hex 8)" COOKIE_SIGNING_SALT="$(openssl rand -hex 8)" COOKIE_ENCRYPTION_SALT="$(openssl rand -hex 8)" TOKENS_KEY_BASE="$(openssl rand -hex 32)" TOKENS_SALT="$(openssl rand -hex 8)" RELEASE_COOKIE="$(openssl rand -hex 16)" # Database credentials (example) DB_USERNAME="firezone_db_user" DB_PASSWORD="firezone_db_pass" # Gmail SMTP configuration # Replace these with your actual Gmail username & app password GMAIL_USERNAME="postmaster@mg.calegix.net" GMAIL_APP_PASSWORD="9e847ec32783381d4ff3a316c8157c64-667818f5-9bf832a6" # We'll embed these in a JSON object that Swoosh can parse: OUTBOUND_EMAIL_ADAPTER_OPTS="$(cat <