Skip to content

fix(controller): enforce confidential certificate import transport - #187

Merged
RentnerKev merged 1 commit into
mainfrom
fix/certificate-controller-transport
Oct 6, 2026
Merged

RentnerKev merged 1 commit into
mainfrom
fix/certificate-controller-transport

Conversation

@RentnerKev

@RentnerKev RentnerKev commented Oct 6, 2026 •

Copy link
Copy Markdown
Member

Summary

Certificate imports now use the controller client's existing confidential transport policy. The change preserves authenticated HTTPS and loopback imports and checks transport before dispatching the request.

Adds focused coverage for IPv4, IPv6, hostname, authentication and supported transport behavior. Refs #72.

Validation

  • 28 focused controller tests passed, including 9 new certificate-import transport cases.
  • Scoped Oxlint, type-aware Oxlint and Oxfmt passed.
  • CI, CodeQL, Gitleaks and production smokes must pass before merge.

Risk

Uses the existing controller transport guard without changing API payloads or persisted data.

Summary by CodeRabbit

  • Security
    • Controller certificate imports now use confidential request handling, adding protection to the request while preserving its existing behavior.

@RentnerKev RentnerKev added this to the v1.0.0-beta.1 milestone Oct 6, 2026
@RentnerKev RentnerKev added security Public security hardening or remediation; disclose vulnerabilities privately. area: runtime Caddy and privileged controller runtime behavior. area: certificates Certificates, ACME, trusted CAs, and TLS material. labels Oct 6, 2026
@coderabbitai

coderabbitai Bot commented Oct 6, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Repository: RentnerKev/RentnerProxy/.coderabbit.yaml
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 94f754bc-4b46-462f-9a4e-1ff7d7270f67
📥 Commits

Reviewing files that changed from the base of the PR and between ca99c6c and 8638ac5.

📒 Files selected for processing (2)
  • web/src/server/Controller/certificates.server.ts
  • web/src/tests/server/Controller/certificate-import-transport.test.ts

Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.


📝 Walkthrough

Walkthrough

The certificate import request now sets confidential: true. Transport tests cover HTTP and HTTPS controller URLs, authenticated POST requests, and rejection when the URL or controller token is invalid.

Changes

Certificate Import Transport

Layer / File(s) Summary
Import request and transport validation
web/src/server/Controller/certificates.server.ts, web/src/tests/server/Controller/certificate-import-transport.test.ts
The import request sets confidential: true. Tests verify that non-loopback HTTP URLs and empty controller tokens reject without dispatch. HTTPS and loopback HTTP URLs dispatch an authenticated POST with redirects disabled and the import payload.

Priority: ⬇️ Low

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Bug fix

Merge Risk: ⚪ Minimal · up to 8638a

Certificate imports are restricted to HTTPS or loopback and require an acceptable controller token. No actionable merge-blocking risk remains; proceed subject to normal checks.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 1 functions across 2 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely describes the main change: enforcing confidential transport for certificate imports.
Description check ✅ Passed The description explains the change, references issue #72, reports validation results, and describes risk. It omits the explicit change type, checklist, breaking-changes, and screenshots sections.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
  • Fix all pre-merge checks with AI
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@RentnerKev
RentnerKev merged commit b2c15bb into main Oct 6, 2026
27 of 28 checks passed
@RentnerKev
RentnerKev deleted the fix/certificate-controller-transport branch October 6, 2026 20:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: certificates Certificates, ACME, trusted CAs, and TLS material. area: runtime Caddy and privileged controller runtime behavior. security Public security hardening or remediation; disclose vulnerabilities privately.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant