--- title: "ADR 0067: TLS configuration parsing and its tolerance of unknown names" --- * Status: accepted * Code: [`pkg/tlsconfig/tls_config.go`](https://github.com/tektoncd/pipelines-as-code/blob/main/pkg/tlsconfig/tls_config.go) ## Context The controller reads `TLS_MIN_VERSION`, `TLS_CIPHER_SUITES` and `TLS_CURVE_PREFERENCES` from the environment (`LoadFromEnv`), and `adapter.go` turns them into a `tls.Config` and logs the cipher suites through `FormatCipherSuites`. The values may be injected from outside, so a list can name ciphers or curves this Go build does not know. ## Decision * `ToTLSConfig` starts from `MinVersion` TLS 1.2 and ALPN `h2`, `http/1.1`; `TLS_MIN_VERSION` only overrides the version. * Ciphers come from `tls.CipherSuites()` only, so the insecure list from `tls.InsecureCipherSuites()` is never accepted by name or by number. * In a list, an unknown cipher name or curve name is skipped without an error. A numeric cipher ID that is not a secure suite, and a list that yields no cipher at all, are errors. A numeric curve ID is checked against the known curves. * The post-quantum hybrid curve is registered as the literal ID 25497 under the name `X25519Kyber768Draft00`, in both `curveNameToID` and `curveIDToName`. * `curveIDToName` is a separate map so the ID to name lookup does not depend on iteration order of `curveNameToID`, which has several aliases per ID. ## Consequences * A typo in a cipher name does not stop the server; it silently narrows the list. The code relies on the startup log to make this visible, and `adapter.go` logs ciphers; whether curves are logged was not verified here. * Enabling an insecure cipher needs a code change. * The code does not say why the 25497 literal is used rather than a Go constant; the removed comment only said it might not exist in all Go versions.