Skip to content

Expose a secret-free ProPR Connect discovery contract for desktop #1987

Closed

Description

@integry

Objective

Provide a stable machine-readable local contract that lets ProPR Desktop discover a Connect tunnel endpoint and verify the remote API is still the same local instance, without reading .env or exposing any credential.

CLI contract

  • Add a versioned noninteractive command, preferably propr connect status --json --root <explicit-root> (a compatible propr connect --json shorthand is acceptable). Preserve the current propr tunnel setup|on|off|verify surface and share its canonical URL logic; do not create divergent parsers.
  • JSON stdout is one bounded discriminated document with schemaVersion and safe fields only: canonicalEndpoint, publicInstanceIdentity, configured, enabled, sidecarRunning, apiReady, restartRequired, compatibility/version, and bounded safe reason codes. Human diagnostics go to stderr or non-JSON mode. Define stable exit semantics for ready, known-not-ready, incompatible, invalid config, timeout, and internal failure.
  • Never output the Cloudflare connector token, relay token, pairing/device secret, instance bearer, environment contents, credential-presence oracle, GitHub identity/installation id, repository name, username, hostname, container details, or any absolute/private filesystem path. Redact parse/validation errors.
  • Resolve only an explicit/root already owned by the caller; no recursive filesystem scan. Reject symlink/root authority changes consistently with local setup. Use bounded probes and output sizes.

Stable public instance identity

  • Define a non-secret random installation identity that is generated once for a stack, durably persisted across normal restart/upgrade/tunnel rotation, and changes when the stack is reinitialized/replaced. It must not be derived from a connector token, access token, GitHub installation/account id, filesystem path, hostname, or other personal data.
  • Return the same identity from the unauthenticated bounded desktop compatibility/status discovery response and from the local CLI JSON document. The response must remain minimal, rate-limited, cache-safe, schema/versioned, and free of account/credential state.
  • A stale tunnel/API configuration must be observable: configured/enabled/running is not apiReady until the remote response confirms the expected canonical origin and public instance identity. Detect the current propr tunnel on without API restart case and return restartRequired rather than a false-ready endpoint.
  • Document whether Connect guarantees deleted tunnel hostnames are never reassigned. Even with that guarantee, keep identity matching as defense in depth.

Tests

Add deterministic CLI/shared/API tests for schema compatibility, stdout/stderr separation, secret sentinel absence, canonical t-.propr.dev URL and IDNA/lookalike rejection, missing/old config, disabled/down/restart-required/ready states, probe timeout/abort/non-JSON response, output cap, identity persistence across restart/upgrade, identity change on reinitialize, and local/remote identity mismatch. No live Cloudflare dependency.

Integration boundaries

This issue owns only CLI/shared/API discovery and identity contracts. #1985 owns Electron invocation, UI confirmation, profile handling, and propr://connect handoff. #1961 owns credential custody, pairing, profile generations, and reconnect isolation. Do not add a second desktop auth stack or expose secrets to renderer code.

Target the branch selected by base-1953-epic-desktop-transport-api; never target main. Do not merge the generated PR. Require Ultrafix, exact-head review, full CI, and later sync with #1961/#1985.

Part of #1950, #1953, and #1985.

Activity

  1. propr-dev commented on Aug 29, 2026

    @propr-dev
    Contributor

    🤖 AI processing has started for this issue using codex agent with gpt-5.6-sol model.

    I'll analyze the problem and work on a solution. This may take a few minutes.

    Processing Details:

    • Agent: codex
    • Model: gpt-5.6-sol
    • Branch: 1987/gpt-5.6-sol-expose-a-secret-free-prop-20260829-2120-4hc
    • Base Branch: 1953-epic-desktop-transport-api
    • Worktree: issue-1987-20260829-2120-gpt-5.6-sol-4hc

    🔍 Track Task Execution

  2. added a commit that references this issue on Aug 29, 2026
  3. integry commented on Aug 29, 2026

    @integry
    OwnerAuthor

    External release prerequisite: the discovery identity is intentionally public and unauthenticated, so endpoint + UUID matching prevents accidental stale routing but cannot defeat a hostile hostname reassignee that recorded and replays the previous UUID/schema. The Connect control plane must atomically allocate names, permanently tombstone every released t-<id>.propr.dev hostname, and prove non-reuse under concurrent delete/recreate, failed allocation, restore, migration, and disaster-recovery paths. Keep an auditable operational retention policy and allocator tests in the control-plane repository. This repository documents the invariant but cannot enforce it; desktop auto-discovery must not be declared production-safe until control-plane evidence is linked here.

  4. integry commented on Sep 4, 2026

    @integry
    OwnerAuthor

    Implemented by #1989, merged into 1953-epic-desktop-transport-api (71b2d69). Closing the completed child issue during epic issue/PR reconciliation. Final desktop integration and delivery remain tracked by #1950 / #1970; this does not claim a main-branch release.

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions