@@ -22,6 +22,54 @@ check output uses the shared `PlatformCliConnectionCheckReport` contract in
2222with [ example/connection-check-report.json] ( example/connection-check-report.json )
2323as its maintained example.
2424
25+ ## Security boundary
26+
27+ Connection selection does not create product authority. ` --client ` delegates
28+ to the product adapter, which owns any retained local endpoint, credential,
29+ profile headers, and readiness checks. ` --connection ` materializes one saved
30+ connection for that product, and ` --url ` is an advanced one-off destination
31+ that is anonymous unless ` --token-file ` is supplied. Saved authentication is
32+ exactly one of anonymous, a referenced bearer, or ` private_key_jwt ` . The
33+ receiving product still authenticates and authorizes every protected request.
34+
35+ The direct ` --token-file ` input must fit within 8 KiB, including its optional
36+ line ending. That ending is removed and the bearer remains opaque; it need not
37+ be a compact JWT. Direct token,
38+ CA, request-body, and header files use the shared bounded regular-file reader;
39+ on Unix it opens nonblocking, so a FIFO is refused instead of hanging. A
40+ symlink whose target is a regular file remains accepted. Only ` --input - `
41+ reads a request body from standard input. The saved-connections document uses
42+ the same reader under its own document bound. Saved bearer and private-key
43+ references instead use the platform secret resolver, retaining that resolver's
44+ separate root, permission, size, and symlink policy.
45+
46+ Every service base URL uses the shared checked HTTP(S) type, which permits
47+ plain HTTP only for loopback. A request path stays under the selected origin
48+ and deployment prefix. The selected connection owns ` Host ` , automatic
49+ ` Authorization ` , and any product profile header it sets, so command-line headers
50+ cannot replace them. The client ignores ambient proxies, follows no redirect,
51+ retries no request, applies fixed connect and overall deadlines, and bounds
52+ both request and response bodies. Debug output and transport errors do not
53+ contain the bearer or request values.
54+
55+ The maintained proofs are:
56+
57+ - ` crates/registry-cli-api/tests/api_http.rs ` , including
58+ ` automatic_credentials_cannot_be_replaced_by_a_repeated_header ` ,
59+ ` paths_and_host_headers_cannot_escape_the_selected_endpoint ` ,
60+ ` redirect_answers_are_returned_without_following_them ` ,
61+ ` response_bodies_are_bounded ` , and
62+ ` bearer_connection_debug_and_failures_do_not_disclose_the_token ` ;
63+ - ` crates/registry-cli-api/tests/connection_store.rs ` ,
64+ ` saved_connections_add_show_use_reread_credentials_and_acquire_private_key_jwt ` ;
65+ - ` crates/registry-bregctl/tests/api_cli.rs ` ,
66+ ` raw_api_refuses_fifo_file_inputs_without_blocking ` ,
67+ ` connection_commands_refuse_fifo_stores_without_blocking ` , and
68+ ` raw_api_accepts_a_regular_token_file_and_request_body_from_standard_input ` .
69+
70+ These references identify the maintained contract; this README does not claim
71+ that they ran in a particular review.
72+
2573Run the focused checks from the workspace root:
2674
2775``` console
0 commit comments