Repository navigation
Commit d401458
gluck
gateway: the refusal table, judged against the socket the kernel bound
Step 3. Which authenticator may serve which exposure is now a table with
all nine cells enumerated and tested, plus a totality test that fails when
someone adds an authenticator without deciding what its cells mean.
THE ADDRESS IS NOT JUDGED AS A STRING. ":9090", "0.0.0.0", "::",
"::ffff:127.0.0.1", a hostname resolving to a LAN address and a localhost
repointed in /etc/hosts all defeat a config parse. So Serve binds FIRST and
interrogates net.Listener.Addr(), which is the only thing that cannot lie
about itself. A listener that fails admit() is closed, not served: a server
that refuses while holding the port has refused nothing.
none unix only -- anyone reaching the port is an administrator
upstream unix, loopback -- Remote-* is believable only behind a proxy
doorkey anywhere -- carries proof per request; plaintext TCP
still needs --tls-terminated
Loopback is documented as what it is: not a principal boundary. Every local
uid reaches it, a published container port or an ssh -L re-exposes it. It
buys "the proxy can be the only route IF the box is not shared", and where
that is not enough the answer is a credential, not a tighter address check.
TWO CONTROLS FROM THE KING OF SPAIN, who reviewed the deployment:
Cloudflare reaps an idle WebSocket at ~100s and it is not configurable on a
tunnel, so the tunnel now pings every 30s. This had to ship WITH the feature:
an idle-only failure never appears in a test that keeps sending, and appears
immediately when the operator stops typing.
More seriously: forward_auth runs on the UPGRADE REQUEST ONLY. Once a socket
is established no frame is ever re-authorized, so a revoked operator keeps a
live shell until it drops -- a WebSocket outlives its authorization. Tunnels
are now capped (8h by default on TCP), because a re-upgrade is a
re-authorization. "Authelia gates it" must not stand unqualified in this
design: what it gates is the handshake.
Also: a Host allowlist, because binding loopback is no defence against DNS
rebinding from a browser on the same machine; and --doorkey-file rather than
a flag, since an argument is visible in /proc and in every other user's
process table, while a file is a path plus a mode -- and is what
LoadCredential hands you in production.
The plan's section 7 is rewritten with the King's answers: dedicated user
rather than DynamicUser (a figwal store's ownership must survive redeploys),
KillMode=mixed, MemoryMax/CPUQuota because spain is the house router, one
figaro-admin group rather than split capabilities (a read-only figaro role
would be a lie), and hush left off the server entirely -- machine secrets
belong in sops. It also records the sequencing constraint: the parked router
branch means this must be a single-purpose watched deploy, never merged to
sit in spain-flake master.
Full suite green.1 parent 5d26496 commit d401458
7 files changed
Lines changed: 794 additions & 88 deletions
File tree
- internal
- cli
- gateway
- plans
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1414 | 1414 | | |
1415 | 1415 | | |
1416 | 1416 | | |
1417 | | - | |
1418 | | - | |
1419 | | - | |
1420 | | - | |
1421 | | - | |
1422 | | - | |
| 1417 | + | |
| 1418 | + | |
| 1419 | + | |
| 1420 | + | |
| 1421 | + | |
| 1422 | + | |
| 1423 | + | |
| 1424 | + | |
| 1425 | + | |
| 1426 | + | |
| 1427 | + | |
| 1428 | + | |
1423 | 1429 | | |
1424 | 1430 | | |
1425 | 1431 | | |
1426 | | - | |
| 1432 | + | |
| 1433 | + | |
| 1434 | + | |
| 1435 | + | |
| 1436 | + | |
| 1437 | + | |
| 1438 | + | |
1427 | 1439 | | |
1428 | 1440 | | |
1429 | | - | |
| 1441 | + | |
1430 | 1442 | | |
1431 | | - | |
| 1443 | + | |
| 1444 | + | |
| 1445 | + | |
1432 | 1446 | | |
| 1447 | + | |
| 1448 | + | |
| 1449 | + | |
1433 | 1450 | | |
1434 | 1451 | | |
1435 | | - | |
1436 | | - | |
1437 | | - | |
| 1452 | + | |
| 1453 | + | |
| 1454 | + | |
1438 | 1455 | | |
1439 | | - | |
| 1456 | + | |
1440 | 1457 | | |
1441 | 1458 | | |
| 1459 | + | |
| 1460 | + | |
| 1461 | + | |
| 1462 | + | |
| 1463 | + | |
| 1464 | + | |
| 1465 | + | |
| 1466 | + | |
| 1467 | + | |
| 1468 | + | |
| 1469 | + | |
| 1470 | + | |
| 1471 | + | |
| 1472 | + | |
| 1473 | + | |
| 1474 | + | |
1442 | 1475 | | |
1443 | | - | |
| 1476 | + | |
1444 | 1477 | | |
1445 | 1478 | | |
1446 | 1479 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
| 16 | + | |
16 | 17 | | |
| 18 | + | |
17 | 19 | | |
18 | 20 | | |
19 | 21 | | |
| |||
25 | 27 | | |
26 | 28 | | |
27 | 29 | | |
28 | | - | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
29 | 43 | | |
30 | 44 | | |
31 | 45 | | |
32 | 46 | | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
33 | 70 | | |
34 | 71 | | |
35 | 72 | | |
| |||
47 | 84 | | |
48 | 85 | | |
49 | 86 | | |
50 | | - | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
51 | 93 | | |
52 | 94 | | |
53 | 95 | | |
| |||
57 | 99 | | |
58 | 100 | | |
59 | 101 | | |
60 | | - | |
| 102 | + | |
61 | 103 | | |
62 | 104 | | |
63 | 105 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
0 commit comments