Conversation
OAC_PUBLIC_URL_INSECURE=1 accepts an http:// origin on a host that is not loopback, for a deployment that stays on a trusted network and has no certificate authority. The default is unchanged, and the opt-in mirrors core.runtime_history.insecure: it is refused for an https:// origin, refused without an origin, and any other value stops Core at startup. The node, its installer, oac apply and web.core_url keep the HTTPS-or-loopback rule, so Web still issues node commands only for an HTTPS origin.
velrith
force-pushed
the
feat/insecure-public-url
branch
from
October 2, 2026 13:46
10096bf to
4cff5cb
Compare
OAC_PUBLIC_URL_INSECURE=1 now reaches the node path. Core reports insecure_public_url in the installation, the console passes --allow-insecure-core-url to the node installer only for that installation, and the installer records the choice in the node's provider.json. The node, the installer and its artifact downloads then accept the plain origin; host allowlists and checksums still decide what those downloads may be. Nothing changes without the flag: a remote plain-HTTP origin stays refused in Core, in the node and in the installer, an https origin never takes it, and the installer refuses the flag when no configured origin needs it, so a stale command fails instead of widening the policy. Both documentation languages and the OpenAPI document follow.
The only conflict is the environment table in docs/configuration.md and docs/zh/configuration.md: upstream dropped the ports.core wording from the OAC_ADDR row, which sits directly below the OAC_PUBLIC_URL_INSECURE row this branch adds. Keep the new row and upstream's OAC_ADDR wording. Verified after the merge: gofmt, go build and go test ./services/core/...; 239 installer tests; @oac/agents-client 765 and @oac/web 441 unit tests with typecheck and build; 86 Web acceptance tests.
Contributor
|
Thanks for the contribution, @velrith, and for the careful opt-in design. We've since reworked how installations handle their address in #402. Core no longer manages a domain or certificates. Web is the single published entry, and HTTPS is terminated by the operator's reverse proxy or hosting platform (HTTPS and the reverse proxy). With that split, Closing this one. Thanks again! |
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.
Refs #398.
OAC_PUBLIC_URL_INSECURE=1accepts anhttp://origin on a host that is not loopback, for a deployment that stays on a network the operator controls and has no certificate authority to satisfy.The opt-in mirrors
core.runtime_history.insecure:ValidateCoreURLand every existing caller behave exactly as before;https://origin;OAC_PUBLIC_URL;0or1stops Core at startup.With it on, Core accepts the origin and reports
local_only: falsefor it, so Web stops showing the configure-HTTPS notice. Core also reportsinsecure_public_url, which carries the same decision to the node path: Web passes--allow-insecure-core-urlto the generated node command only for that installation, the installer records it in the node'sprovider.json, and the node, the installer and its artifact downloads then accept the plain origin.Scope
Core:
services/core/internal/deployment/public_url.go:ValidateCoreURLInsecureadds the non-loopback HTTP case;ValidateCoreURLis unchanged.services/core/cmd/server/process_configuration.go: reads the flag and applies it toOAC_PUBLIC_URL.services/core/internal/api/installation.go,services/core/cmd/server/installation.go: reportinsecure_public_url.services/core/internal/sandbox/nodeandservices/core/cmd/sandbox-node: enrollment, identity and connection accept the plain origin when the deployment carries the opt-in.Node enrollment and installer:
services/core/internal/sandbox/providers/config.go: the node'sprovider.jsongainsinsecure_core_url.deploy/install/node_install.py: adds--allow-insecure-core-url, records the choice inprovider.json, and refuses the flag when the configured origin ishttpsor absent.deploy/install/node_generations.py: a later generation inherits the recorded choice.deploy/install/distribution.py: artifact URLs and redirects admit the plain origin only with the opt-in; host allowlists and SHA-256 checks are unchanged.Web:
packages/agents-client/src/admin-types.ts,admin-projection.ts: projectinsecure_public_urlfrom the installation.apps/web/src/features/sandbox/core-origin.ts,enrollment-command.ts: issue a node command for the opted-in origin and add the flag.apps/web/src/lib/connection.ts:isValidDirectCoreBaseUrltakes the allowance as an argument instead of assuming loopback-only.Documentation and contracts:
configuration.md,nodes.md,install-options.md,console-api-usage.mdin both languages, pluscore.openapi.yamlandadmin-api.md.Deliberately unchanged, so the option cannot be reached by accident:
install.sh,oac applyandweb.core_urlkeep the HTTPS-or-loopback rule. The flag is a process variable, not aconfig.jsonkey, andoac applyregeneratesgenerated/core.env, so an installer-managed installation cannot keep it.https://origin never takes it, and the installer refuses the flag when no configured origin needs it, so a stale command fails instead of widening the policy.Validation
go build ./services/core/...,gofmt -l,go test ./services/core/... -count=1PYTHONDONTWRITEBYTECODE=1 python3 -m unittest discover -s deploy/install(268 tests, 1 skipped)pnpm --filter @oac/agents-client testandpnpm --filter @oac/web test, including typecheckmake check-coreandmake check-core-storeagainst a fresh PostgreSQL test database (the parallelmake check-corepackage run collides on one database; the same packages pass serially with-p 1, and the store shard passes on its own)python3 scripts/config-reference.py --check,check-docsprovider_readyat the opted-in generation. Without the flag, Core refuses that origin at startup and the installer refuses the flag.Need help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.