Repository navigation
Commit e81561c
committed
🔐 Move the credential into a broker child the provider cannot read
Slices 1 and 2, as one vertical slice: the abstraction and a real Git consumer
arrive together.
**Three processes, one question.** A provider invocation starts a broker child
for one exact repository. The child acquires through the invoking user's Git and
holds the result; the provider holds a capability and a private endpoint; the
shim Git runs is the only program that writes a credential anywhere. The
workflow process never receives a username or a password — there is no longer
anything in it for a lease to be read out of.
**The capability is not on a command line.** It reaches the shim through the
environment of the Git command the lease was attached to; the command line names
a program. The shim file itself holds neither the credential nor the capability
— it is a launcher for this host's own unadvertised internal mode, which is not
a command, appears in no help or public grammar, and can acquire nothing by
itself.
**What the broker refuses.** A capability that is not this lease's, an operation
that is not `get`, and a locator that is not the one it was leased for. The last
is the redirect defence: Git asks the shim about wherever it arrived, the shim
restates that, and a broker leased for somewhere else answers nothing. Scheme,
host with its explicit port, and full path are all compared. `useHttpPath` is
forced on the transport as well as on the acquisition, because without it Git
asks about the server and the two repositories could not be told apart at all.
**Get-only, structurally.** `store`, `erase`, `approve` and `reject` are not
operations that are declined — no code path here writes, forgets or reports a
credential.
**Teardown order.** Invalidate the lease, close the child's stdin, signal and
await the process group, then remove the endpoint and the launcher. A shim that
connects during teardown is refused rather than racing a broker that is going
away, and an endpoint is never left addressable after its owner is gone.
Slices remaining: cancellation-ordering and one-active-process evidence,
protected interrupted-Push crash adoption, shared Deno/compiled host-assembly
evidence, and the Windows named-pipe equivalent.
Refs #5221 parent 43c4dc1 commit e81561c
10 files changed
Lines changed: 1078 additions & 472 deletions
File tree
- packages
- cli/src
- workflow
- src/deno/composition
- broker
- tests
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| 15 | + | |
15 | 16 | | |
16 | | - | |
17 | | - | |
18 | | - | |
19 | | - | |
20 | | - | |
21 | | - | |
22 | | - | |
23 | | - | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
24 | 31 | | |
25 | | - | |
26 | | - | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
27 | 35 | | |
28 | | - | |
29 | | - | |
30 | | - | |
31 | | - | |
32 | | - | |
33 | | - | |
34 | | - | |
35 | | - | |
36 | | - | |
37 | | - | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
| 18 | + | |
18 | 19 | | |
19 | 20 | | |
20 | 21 | | |
21 | | - | |
22 | | - | |
23 | | - | |
24 | | - | |
25 | | - | |
26 | | - | |
27 | | - | |
28 | | - | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
29 | 36 | | |
30 | | - | |
31 | | - | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
32 | 40 | | |
33 | | - | |
34 | | - | |
35 | | - | |
36 | | - | |
37 | | - | |
38 | | - | |
39 | | - | |
40 | | - | |
41 | | - | |
42 | | - | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
75 | 75 | | |
76 | 76 | | |
77 | 77 | | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
0 commit comments