fix(cira): require opt-in for non-forward-secret ciphers - #1200
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1200 +/- ##
==========================================
+ Coverage 50.09% 50.15% +0.06%
==========================================
Files 146 146
Lines 13552 13555 +3
==========================================
+ Hits 6789 6799 +10
+ Misses 6171 6164 -7
Partials 592 592 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Pull request overview
This PR hardens the CIRA TLS configuration by making legacy RSA key-exchange cipher suites (non-forward-secret) opt-in via APP_ALLOW_INSECURE_CIPHERS, aligning the listener with Go’s secure defaults unless explicitly overridden for older AMT compatibility.
Changes:
- Adds an
allowInsecureCipherstoggle to the CIRA server and uses it to control whether legacy RSA cipher suites are advertised. - Introduces focused unit tests to verify insecure suites are excluded by default and included only when explicitly enabled.
- Documents the setting in
config/config.ymland.env.example.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| internal/controller/tcp/cira/tunnel.go | Adds opt-in gating + warning behavior for legacy RSA cipher suites on the CIRA listener. |
| internal/controller/tcp/cira/tunnel_test.go | Adds tests covering default vs opt-in cipher suite behavior and Go’s insecure classification. |
| internal/app/app.go | Wires cfg.AllowInsecureCiphers into the CIRA server constructor. |
| config/config.yml | Documents allow_insecure_ciphers behavior and intended usage. |
| .env.example | Documents APP_ALLOW_INSECURE_CIPHERS and provides a sample value. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 5 out of 5 changed files in this pull request and generated no new comments.
Suppressed comments (1)
internal/controller/tcp/cira/tunnel.go:103
- The warning message only references the env var, but this setting can also be enabled via config.yml (allow_insecure_ciphers). Mentioning both makes the startup warning actionable for operators using file-based config.
s.log.Warn("CIRA server - insecure cipher suites enabled for AMT compatibility; " +
"these lack perfect forward secrecy. Disable APP_ALLOW_INSECURE_CIPHERS unless required.")
b32100e to
77cb650
Compare
The CIRA listener unconditionally advertised three RSA key-exchange suites for older AMT firmware: TLS_RSA_WITH_AES_128_GCM_SHA256 TLS_RSA_WITH_AES_128_CBC_SHA TLS_RSA_WITH_AES_256_CBC_SHA All three lack perfect forward secrecy, so a default install shipped a weakened TLS posture on :4433 even when every enrolled device could negotiate ECDHE. Gate them behind the existing allow_insecure_ciphers setting (APP_ALLOW_INSECURE_CIPHERS, already false by default), which governs the same trade-off on outbound WSMAN connections. The listener now offers only Go's secure defaults unless an operator opts in, and logs a warning at startup when they do. Behaviour change: deployments that depend on the RSA suites must set APP_ALLOW_INSECURE_CIPHERS=true. Signed-off-by: Nabendu Maiti <nabendu.bikash.maiti@intel.com>
77cb650 to
42ebf7d
Compare
Summary
Gate legacy RSA TLS cipher suites for the CIRA listener behind APP_ALLOW_INSECURE_CIPHERS.
Keep Go's secure TLS defaults enabled unless an operator explicitly opts in for older AMT compatibility.
Warn at startup when insecure cipher support is enabled.
Document the setting in the sample environment and configuration files.
Breaking Change
Deployments that require legacy RSA cipher suites must set:
Testing
Added coverage verifying insecure suites are excluded by default, included only with explicit opt-in, and recognized by Go as insecure.