[AAP-76188]fix: enforce TLS certificate validation for JWT and resource server - #1658
[AAP-76188]fix: enforce TLS certificate validation for JWT and resource server#1658wfealdel wants to merge 3 commits into
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (5)
Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review. 📝 WalkthroughWalkthroughTLS certificate verification now defaults to enabled for JWT and resource-server connections. Production startup warns when verification is disabled. Startup logs and deployment documentation describe the settings and private CA options. ChangesTLS verification configuration
Estimated code review effort: 2 (Simple) | ~10 minutes Merge Risk: ⚪ Minimal · up to The change enforces TLS certificate validation by default in production while retaining explicit development and opt-out configurations; no actionable merge-blocking risk remains after normal checks and review. Suggested reviewers: 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Full details: Docstring CoverageExplanation Docstring coverage is 22.22% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 9 functions across 4 files. (1 skipped: 1 unsupported.)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
5c6faa0 to
8903c7c
Compare
|
/run-atf-tests |
|
/run-e2e |
Codecov Report✅ All modified and coverable lines are covered by tests. @@ Coverage Diff @@
## main #1658 +/- ##
=======================================
Coverage 93.39% 93.39%
=======================================
Files 247 247
Lines 11698 11706 +8
=======================================
+ Hits 10925 10933 +8
Misses 773 773
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
✅ Test Results - PASSEDSummary
Pass Rate: 75.8% |
…ce server Change ANSIBLE_BASE_JWT_VALIDATE_CERT and RESOURCE_SERVER__VALIDATE_HTTPS defaults from False to True in production settings to prevent JWT token forgery and authentication bypass via MITM attacks. Development mode retains False defaults via development_defaults.py. A startup warning is logged when either setting is disabled in non-debug mode. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
8903c7c to
e2e9d1c
Compare
|
/run-e2e |
|



What is being changed?
The production defaults for
ANSIBLE_BASE_JWT_VALIDATE_CERTandRESOURCE_SERVER__VALIDATE_HTTPSare changed fromFalsetoTrueindefaults.py. A startup warning is added inpost_load.pythat logs aSECURITY WARNINGwhen either setting is disabled in production (non-debug) mode. Deployment documentation is updated with TLS certificate verification guidance including CA bundle configuration.https://redhat.atlassian.net/browse/AAP-76188
Why is this change needed?
In production AAP deployments, JWT is the sole authentication mechanism. Defaulting TLS certificate verification to
Falseexposes critical authentication channels to man-in-the-middle attacks and JWT token forgery (CTRL-010, AAP-76188).How does this change address the issue?
True, enforcing secure-by-default in productiondocs/deployment.mdEDA_MODE=development) retainsFalsedefaults viadevelopment_defaults.pyDoes this change introduce any new dependencies, blockers or breaking changes?
Breaking change: production deployments that relied on the
Falsedefaults and lack proper CA configuration will need to either configure a CA bundle or explicitly setEDA_ANSIBLE_BASE_JWT_VALIDATE_CERT=False/EDA_RESOURCE_SERVER__VALIDATE_HTTPS=False. Docker compose files for dev/stage already set these explicitly and are unaffected.How it can be tested?
pytest tests/unit/test_settings.py -v— 4 new tests verify defaults areTrue, warnings fire in production, no warnings in debug modepytest tests/unit/test_settings_bootstrap.py -v— existing bootstrap tests pass unchangedEDA_MODE=productionandEDA_ANSIBLE_BASE_JWT_VALIDATE_CERT=False— bothSECURITY WARNINGmessages appear in logs🤖 Generated with Claude Code
Summary by CodeRabbit
Security
Documentation