You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Optional Cloudflare Access identity binding after first successful pair
#32387
When a self-hosted T3 Code server sits behind Cloudflare Access, Access already identifies the human at the gateway. T3 pairing is still a separate per-browser grant. After the first successful pair, opening the same environment from another browser as the same Access user requires a new pairing code.
For a small team that shares one server and one tunnel, that means minting and distributing pairing invites whenever someone uses a new browser. I do not need isolated per-user execution, separate provider or Git credentials, or full multi-user support. I understand that direction was declined in #12278. I do want the existing pairing grant to persist against a verified Cloudflare Access identity so the same person does not have to pair again.
Not skipping pairing for anyone who merely passes Access without a first successful pair.
Not letting Cloudflare Access service tokens become a T3 UI or RPC session. Service tokens should stay on the existing pairing, MCP, or OAuth paths.
Not a change to the default pairing flow when the setting is off.
Proposed behavior
An optional setting, shipped off by default (for example under Settings → Connections → Access):
The first visit still requires a normal pairing code.
After a successful pair, store the verified Cloudflare Access JWT identity. Verify Cf-Access-Jwt-Assertion against the team's JWKS; do not trust a raw email header.
Later requests from that same verified identity resume a session with the standard client scopes, including another browser, without another pairing prompt.
When revoking, ask whether to drop only this browser session or drop the stored Access identity (every browser session tied to it, so that person must pair again).
Teammates would still share the host's files, shell, and provider credentials. That tradeoff is acceptable for this use case.
I implemented this on a self-hosted install behind Cloudflare Access and tested it:
First pair was still required.
A second browser, signed in to Access as the same person, did not prompt for pairing again.
A public implementation based on current main is at smartphonekey#1 if it is useful after you approve the direction. I have not opened a pull request here because CONTRIBUTING asks for an Ideas discussion and explicit maintainer approval of direction and scope first.
Ask
Would you consider this direction? If the scope looks right, I can open a focused PR. I am also happy to change the design (storage, revoke UX, or JWT verification details) before any PR.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
When a self-hosted T3 Code server sits behind Cloudflare Access, Access already identifies the human at the gateway. T3 pairing is still a separate per-browser grant. After the first successful pair, opening the same environment from another browser as the same Access user requires a new pairing code.
For a small team that shares one server and one tunnel, that means minting and distributing pairing invites whenever someone uses a new browser. I do not need isolated per-user execution, separate provider or Git credentials, or full multi-user support. I understand that direction was declined in #12278. I do want the existing pairing grant to persist against a verified Cloudflare Access identity so the same person does not have to pair again.
What this is not
Proposed behavior
An optional setting, shipped off by default (for example under Settings → Connections → Access):
Cf-Access-Jwt-Assertionagainst the team's JWKS; do not trust a raw email header.Teammates would still share the host's files, shell, and provider credentials. That tradeoff is acceptable for this use case.
Related
Evidence
I implemented this on a self-hosted install behind Cloudflare Access and tested it:
A public implementation based on current
mainis at smartphonekey#1 if it is useful after you approve the direction. I have not opened a pull request here because CONTRIBUTING asks for an Ideas discussion and explicit maintainer approval of direction and scope first.Ask
Would you consider this direction? If the scope looks right, I can open a focused PR. I am also happy to change the design (storage, revoke UX, or JWT verification details) before any PR.
All reactions