Skip to content

Add TLS to WebAPI (again)#146

Open
isbm wants to merge 43 commits intomasterfrom
isbm-secure-webapi
Open

Add TLS to WebAPI (again)#146
isbm wants to merge 43 commits intomasterfrom
isbm-secure-webapi

Conversation

@isbm
Copy link
Member

@isbm isbm commented Mar 21, 2026

This [re]adds TLS to the WebAPI.

  • Implementation
  • Configuration
  • Docs
  • Tests

@isbm isbm self-assigned this Mar 21, 2026
@isbm isbm added documentation Improvements or additions to documentation feature New feature or request dependencies Pull requests that update a dependency file labels Mar 21, 2026
@isbm isbm marked this pull request as ready for review March 21, 2026 15:13
@isbm isbm requested a review from Copilot March 21, 2026 15:13
Copy link
Contributor

Copilot AI left a comment

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 reintroduces TLS for the embedded Web API and updates the Web API authentication/request flow to use bearer tokens over HTTPS, alongside substantial secure-transport protocol and implementation updates (ephemeral key exchange + version negotiation) with expanded tests and documentation.

Changes:

  • Start the embedded Web API over rustls (and disable it when TLS isn’t configured), with new api.tls.* master configuration options and supporting docs/scripts.
  • Switch Web API auth/query flows to bearer tokens + plain JSON over HTTPS; update sysclient accordingly and add contract tests.
  • Update secure transport bootstrap protocol shapes and implementation (supported versions + Curve25519 ephemeral keys), plus additional transport tests/docs/fixtures.

Reviewed changes

Copilot reviewed 56 out of 58 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
libwebapi/src/lib.rs Starts embedded Web API over rustls; TLS config loading and logging.
libwebapi/src/api/v1/{system,minions,model,store}.rs Bearer-token auth enforcement and API contract updates.
libsysinspect/src/cfg/mmconf.rs Adds api.tls.* config fields with rooted path resolution.
sysmaster/src/master.rs Switches to start_embedded_webapi.
sysclient/src/lib.rs (+ tests) Client updated to HTTPS default + bearer auth; new unit/contract tests.
libsysinspect/src/transport/{secure_bootstrap,secure_channel}.rs (+ tests) Secure transport protocol/crypto changes with expanded test coverage.
libwebapi/tests/api_contract.rs HTTPS API contract tests using rustls.
scripts/dev-tls.sh / docs / examples Developer TLS helper + updated operator docs + protocol fixtures.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Contributor

Copilot AI left a comment

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 61 out of 63 changed files in this pull request and generated 5 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file documentation Improvements or additions to documentation feature New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants