Skip to content

Re-running --configure-network drops the web listener's TLS and OIDC settings #4743

Closed

Description

@erikdarlingdata

When --configure-network runs again and the operator picks the web listener, the wizard rebuilds the whole web.network block of darling.json from its prompts. That covers choice 3, choice 4, and any combination that includes 3. It drops every key it does not ask about, including tls and oidc.

The wizard gives no warning. The TLS line it shows is read-only, and it never mentions oidc. It does write a timestamped backup first. After the restart the wizard offers, the web listener serves plain HTTP and OIDC sign-in is gone. web.publicBaseUrl and the token survive. mcp.network and postgres.network lose only their inline comments.

Where (as of 1248a67)

  • The rebuild: Darling/PerformanceMonitor.Darling.Service/DarlingCliCommands.cs:1963, :1986-1991 and :2429-2440.
  • BuildWebNetworkBlock and UpsertNetworkBlock: DarlingNetworkConfigEditor.cs:335-340 and :456-469.
  • No tls block means plain HTTP: DarlingConfig.cs:1364-1368, :1406 and :1415. The web server's own setup code was not traced, so this last step is inferred.
  • The backup: DarlingCliCommands.cs:2674-2691.

Fix

Rebuild only the keys the wizard asks about, and carry every other key under web.network over unchanged: tls, oidc and any key added later. Do not list today's keys by name. If a carried key conflicts with a new answer, say so and ask.

Test that must fail first

Run the wizard again over a config that has web.network.tls, web.network.oidc and an unknown key under web.network. All three must come through byte for byte, and the keys the wizard asks about must change as answered.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions