chore(dev): serve the API over HTTPS on :5080#23
Merged
Conversation
The Aspire dashboard mixed schemes — Web was HTTPS (:5180, PR #20) while the API still showed http://localhost:5080. Flip the API to HTTPS too so every .NET app endpoint in the AppHost is HTTPS and the documented links match. - src/AgentOs.Api/Properties/launchSettings.json: rename the launch profile http -> https, applicationUrl https://localhost:5080. Aspire reads the profile, so the api resource now exposes an HTTPS endpoint and the dashboard link is https://localhost:5080/scalar/v1. Uses the same ASP.NET dev cert as Web (dotnet dev-certs https --trust). - Docs (README, docs/SETUP.md, CLAUDE.md): update the Scalar / health / openapi / curl example URLs to https. - Code defaults that point at the local API follow it to https so they aren't broken-by-default against an https-only API: RemoteAgent REMOTE_AGENT_HUB default and the HttpPipelineClient Api:BaseUrl fallback. Both remain environment-overridable. Keycloak (:8080) and MailHog (:8025) intentionally stay HTTP — see the PR description. On localhost, putting KC behind a self-signed HTTPS cert breaks the backend OIDC metadata fetch (HttpClient rejects the untrusted cert) for zero security benefit; MailHog has no native TLS. Build clean. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Makes the local-dev scheme uniform. Web went HTTPS in PR #20 (
:5180); the API still servedhttp://localhost:5080, so the Aspire dashboard showed mixed http/https. This flips the API to HTTPS too.src/AgentOs.Api/Properties/launchSettings.json— launch profilehttp→https,applicationUrlhttps://localhost:5080. Aspire reads the profile, so theapiresource now exposes HTTPS and the dashboard link ishttps://localhost:5080/scalar/v1. Same ASP.NET dev cert as Web.README.md,docs/SETUP.md,CLAUDE.md) — Scalar / health / openapi / curl URLs → https.REMOTE_AGENT_HUBdefault +HttpPipelineClientApi:BaseUrlfallback. Both stay env-overridable.Why Keycloak (:8080) and MailHog (:8025) stay HTTP
Deliberate, not an oversight:
/.well-known/openid-configuration, server-to-server from API + Web) usesHttpClient, which rejects the untrusted cert — auth fails at startup. No security benefit on localhost. KC over HTTP for local dev is the standard setup; prod/Azure terminates TLS at the ingress (sslRequired: externalalready set).A reverse-proxy /
KC_HTTPS_*+ trust-store path exists if KC-on-HTTPS is ever wanted locally — separate, larger change.Test plan
dotnet build AgentOs.slnx -c Releasecleandotnet run --project infra/AgentOs.AppHost→ dashboard showsapiashttps://localhost:5080/scalar/v1, Scalar loadsdotnet dev-certs https --trust(shared with Web from PR chore: local dev HTTPS on :5180 + major dep bumps #20)🤖 Generated with Claude Code