← Back to Pull requests

AAP-79315 Add custom CA certificate support for outbound TLS connections #250

Closed
unknown closed this pull request without merging on Jul 07, 2026 10:04 UTC
View on GitHub
unknown unknown commented on Jul 07, 2026 09:26 UTC
Author

Summary


  • Add custom_ca_cert inventory variable to supply a custom CA certificate (PEM) for trusting AAP servers with private/enterprise CAs

  • Align common/tasks/tls.yml with the upstream AAP containerized installer pattern: inline update-ca-trust task with _ca_volumes fact, checksum tracking, and conditional custom cert mounting

  • Set REQUESTS_CA_BUNDLE and SSL_CERT_FILE unconditionally in dashboard container environments so the Python requests library uses the system trust store (which includes the custom CA)

  • Remove the Update CA trust handler (replaced by inline task)
  • Test plan


  • Run installer with custom_ca_cert set in inventory pointing to a real CA cert

  • Verify ~/aap/tls/custom.cert is created on the managed host

  • Verify REQUESTS_CA_BUNDLE is set in containers: podman exec automation-dashboard-task env | grep REQUESTS_CA_BUNDLE

  • With check_ssl=true and verify_ssl=true, confirm authentication and data sync work against an AAP instance using the custom CA

  • Run installer without custom_ca_cert to verify no regression
  • 🤖 Generated with Claude Code

    <!-- This is an auto-generated comment: release notes by coderabbit.ai -->

    Summary by CodeRabbit

    New Features
    Improved TLS handling for dashboard tasks and web processes by automatically using the trusted CA bundle.
    Added support for an optional custom CA certificate when verifying secure connections.

    Bug Fixes
    Updated certificate trust refresh behavior to run directly during TLS setup, making trust updates more reliable.
    Removed an outdated trust-update step that could leave certificate changes unapplied.

    <!-- end of auto-generated comment: release notes by coderabbit.ai -->

    -----------

    Manual test:
    Inventory with aap_auth_provider_check_ssl=true, clusters.yaml with verify_ssl=true, both worked. CA cert - containirized AAP has it at ~/aap/tls/extracted/pem/tls-ca-bundle.pem, the first entry.

    Diff: 255 lines (+191 / -64) across 3 files Reviewer: kcagran Review duration: 38m
    All Vouch review confidence checks passed
    Residual risk 0.25 = Change Risk (0.62) × (1 − Review Confidence (0.60)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.62 · 255 lines diff across 3 files
    0.62
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.17 · 1 substantive comment(s)
    0.17
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 35%
    60%
    Bedrock Claude 3 · Risk Narration
    (disconnected)
    Groq
    Groq Risk Narration
    AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
    Model 1 · Change Risk Attribution
    SHAP Weights
    Diff Size diff_size
    0.332
    Shallow Review Depth shallow_review_depth
    0.289
    Sensitive Paths sensitive_paths
    0.062
    Real PR Conversation Timeline
    1 comments
    "Review active on #250"
    general weight: 0.35
    Reviewers
    Assignees
    Unassigned
    Labels
    risk: low confidence: 60.5% reviewed sensitive_module
    Vouch Risk Breakdown
    AI-powered review risk analysis
    Change Risk
    Change Risk · Model 1 (XGBoost)
    Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
    Score: 62.3% (MEDIUM) · Higher = larger blast radius
    62.3%
    Review Confidence
    Review Confidence · Models 2 & 3
    Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
    Score: 60.5% · Lower = rushed or shallow review
    60.5%
    Residual Risk
    Residual Risk · Core Equation
    Residual = Change × (1 − Confidence)
    Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
    Score: 24.6% · Safe to merge
    24.6%