Skip to content

Conversation

up9cloud
Copy link

@up9cloud up9cloud commented Aug 10, 2025

起因

因為 Google cloud sql SSL 如果選擇最嚴格的驗證方式: Only allow connections encrypted with SSL/TLS and with valid client certificates. 必須要使用客製化的 tls 檢查方式, see:

測試方法

  • GCP 開 MYSQL instance
    • ssl 選要驗證 client cert
    • 下載相關證書至 /tmp
  • run:
make update-conf
make update-conf-docx
docker build -t artalk .
docker run --rm \
	--net=host \
...
	-e ATK_DB_TYPE="mysql" \
	-e ATK_DB_DSN="user:pass@tcp(<gcp mysql ip>)/<db name>?tls=cloudsql" \
	-e ATK_DB_SERVER_CA_PATH="/tmp/server-ca.pem" \
	-e ATK_DB_CLIENT_CERT_PATH="/tmp/client-cert.pem" \
	-e ATK_DB_CLIENT_KEY_PATH="/tmp/client-key.pem" \
	-v /tmp:/tmp \
	artalk

修改內容

  • Added custom TLS support for CloudSQL
  • Add environment variables for DB certificates; updated cache.go accordingly
  • Improved cache.go generator to format output line-by-line for cleaner Git diffs
  • Fixed en/guild/env.md generator logic for title and table fields

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant