Skip to content

fix(cira): require opt-in for non-forward-secret ciphers - #1200

Open
nbmaiti wants to merge 1 commit into
mainfrom
fix/cira-insecure-ciphers-default
Open

fix(cira): require opt-in for non-forward-secret ciphers#1200
nbmaiti wants to merge 1 commit into
mainfrom
fix/cira-insecure-ciphers-default

Conversation

@nbmaiti

@nbmaiti nbmaiti commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

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:

APP_ALLOW_INSECURE_CIPHERS=true

Testing

Added coverage verifying insecure suites are excluded by default, included only with explicit opt-in, and recognized by Go as insecure.

@codecov

codecov Bot commented Aug 13, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 55.55556% with 8 lines in your changes missing coverage. Please review.
✅ Project coverage is 50.15%. Comparing base (2296f65) to head (77cb650).

Files with missing lines Patch % Lines
internal/controller/tcp/cira/tunnel.go 58.82% 7 Missing ⚠️
internal/app/app.go 0.00% 1 Missing ⚠️
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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 allowInsecureCiphers toggle 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.yml and .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.

Comment thread internal/app/app.go

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.")

@nbmaiti
nbmaiti force-pushed the fix/cira-insecure-ciphers-default branch from b32100e to 77cb650 Compare August 13, 2026 15:50
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>
@nbmaiti
nbmaiti force-pushed the fix/cira-insecure-ciphers-default branch from 77cb650 to 42ebf7d Compare August 14, 2026 08:38
@nbmaiti
nbmaiti marked this pull request as ready for review August 14, 2026 08:39
@nbmaiti
nbmaiti requested a review from a team as a code owner August 14, 2026 08:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants