fix(outline): stop the CA bundle being read as a server certificate #3
Loading…
Reference in a new issue
No description provided.
Delete branch "fix/ssl-cert-file-collision"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Outline deployed and will not boot:
Nothing in this repository sets
SSL_CERT. The cluster's trust injection adds this to every pod:To OpenSSL,
SSL_CERT_FILEmeans "the trust store is here" — which certificates to believe.Outline reads its environment through a Docker-secrets proxy (
server/utils/environment.ts): readingNAMEwhen it isundefinedreturns the contents of the file named byNAME_FILE. So Outline read the cluster CA bundle and concluded the operator had supplied a TLS server certificate to terminate with. There is noSSL_KEYto go with it, and@CannotUseWithout("SSL_KEY")ends the process before it serves.Two conventions, one name.
The fix
The proxy falls back only when the value is strictly
undefined:so declaring
SSL_CERTat all — even empty — stops the fallback, and Outline's owntoOptionalString("")turns it back intoundefinedfor validation. Node still trusts the bundle throughNODE_EXTRA_CA_CERTS, which is the variable Node actually reads;SSL_CERT_FILEwas never doing that job here.Worth knowing beyond this repository
Any application in this cluster that implements the
_FILEconvention meets the same collision. The reason is written down in both the manifest and the README rather than left as an empty value someone will later tidy away as dead configuration.https://claude.ai/code/session_01JGe4pyhQ36AhgDfPJry4d3
Outline will not boot: Environment configuration is invalid, please check the following: - SSL_CERT cannot be used without SSL_KEY. Nothing here sets SSL_CERT. The cluster injects SSL_CERT_FILE=/etc/ssl/cluster-trust/ca-bundle.crt into every pod, which to OpenSSL means "the trust store is here" -- which certificates to BELIEVE. Outline reads its environment through a Docker-secrets proxy (server/utils/environment.ts): reading NAME when it is `undefined` returns the contents of the file named by NAME_FILE. So Outline loaded the cluster CA bundle and concluded the operator had supplied a TLS SERVER certificate to terminate with. There is no SSL_KEY to go with it, and @CannotUseWithout("SSL_KEY") ends the process before it serves. Two conventions, one name. The proxy falls back only when the value is strictly `undefined`, so declaring SSL_CERT at all -- even empty -- stops the fallback, and Outline's own toOptionalString("") turns it back into `undefined` for validation. Node still trusts the bundle through NODE_EXTRA_CA_CERTS, the variable Node actually reads; SSL_CERT_FILE was never doing that job here. Any other application in this cluster that implements the `_FILE` convention meets the same collision, so the reason is written down in both the manifest and the README rather than left as an empty value someone will tidy away. Claude-Session: https://claude.ai/code/session_01JGe4pyhQ36AhgDfPJry4d3