@coffre/ui 0.4.0 → 0.4.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chunks/connected-apps-D8Df97-F.js +146 -0
- package/dist/chunks/connected-apps-D8Df97-F.js.map +1 -0
- package/dist/chunks/{delete-place-CRX7ntE8.js → delete-place-LYN7z7xb.js} +3 -3
- package/dist/chunks/{delete-place-CRX7ntE8.js.map → delete-place-LYN7z7xb.js.map} +1 -1
- package/dist/chunks/{directory-zr3ek7Mc.js → directory-v87HGjEn.js} +8 -6
- package/dist/chunks/{directory-zr3ek7Mc.js.map → directory-v87HGjEn.js.map} +1 -1
- package/dist/chunks/{folders-DoBmCwOi.js → folders-CbGU0xOz.js} +2 -2
- package/dist/chunks/{folders-DoBmCwOi.js.map → folders-CbGU0xOz.js.map} +1 -1
- package/dist/chunks/{grants-Cw1FyGID.js → grants-9kIV6uZ7.js} +5 -5
- package/dist/chunks/{grants-Cw1FyGID.js.map → grants-9kIV6uZ7.js.map} +1 -1
- package/dist/chunks/{offboarding-CE6d7um1.js → offboarding-DdnmRV1f.js} +3 -3
- package/dist/chunks/offboarding-DdnmRV1f.js.map +1 -0
- package/dist/chunks/{principal-page-DhjO76GH.js → principal-page-BubEO6-b.js} +24 -10
- package/dist/chunks/principal-page-BubEO6-b.js.map +1 -0
- package/dist/chunks/{project-page-SRCtRe2g.js → project-page-C4cEaRFa.js} +2 -2
- package/dist/chunks/{project-page-SRCtRe2g.js.map → project-page-C4cEaRFa.js.map} +1 -1
- package/dist/chunks/{queries-DVR_i3rA.js → queries-Dew8mIeo.js} +3 -3
- package/dist/chunks/queries-Dew8mIeo.js.map +1 -0
- package/dist/chunks/{references-B6pLT1uQ.js → references-DPSYdWOk.js} +3 -3
- package/dist/chunks/{references-B6pLT1uQ.js.map → references-DPSYdWOk.js.map} +1 -1
- package/dist/chunks/{use-change-DUiGO19U.js → use-change-C4bGRhHY.js} +31 -8
- package/dist/chunks/use-change-C4bGRhHY.js.map +1 -0
- package/dist/chunks/{use-shell-rNKfGjdj.js → use-shell-Dkv89nW1.js} +2 -2
- package/dist/chunks/{use-shell-rNKfGjdj.js.map → use-shell-Dkv89nW1.js.map} +1 -1
- package/dist/chunks/{validation-D312_NLf.js → validation-DvPinn8V.js} +2 -2
- package/dist/chunks/{validation-D312_NLf.js.map → validation-DvPinn8V.js.map} +1 -1
- package/dist/index.d.ts +47 -8
- package/dist/index.js +36 -12
- package/dist/index.js.map +1 -1
- package/dist/pages/account.d.ts +13 -3
- package/dist/pages/account.js +164 -198
- package/dist/pages/account.js.map +1 -1
- package/dist/pages/audit.js +1 -1
- package/dist/pages/environment.js +9 -10
- package/dist/pages/environment.js.map +1 -1
- package/dist/pages/login.js +1 -1
- package/dist/pages/oauth-authorize.d.ts +2 -1
- package/dist/pages/oauth-authorize.js +12 -8
- package/dist/pages/oauth-authorize.js.map +1 -1
- package/dist/pages/project-access.js +7 -7
- package/dist/pages/project-environments.js +8 -8
- package/dist/pages/project-settings.js +6 -6
- package/dist/pages/project.js +2 -2
- package/dist/pages/projects.js +6 -6
- package/dist/pages/service-account.js +6 -6
- package/dist/pages/service-account.js.map +1 -1
- package/dist/pages/service-accounts.js +4 -4
- package/dist/pages/settings.js +2 -2
- package/dist/pages/unregistered.js +1 -1
- package/dist/pages/user.js +1 -1
- package/dist/pages/users.js +4 -4
- package/package.json +3 -3
- package/src/components/connected-apps.tsx +138 -0
- package/src/components/directory.tsx +9 -2
- package/src/components/offboarding.tsx +1 -1
- package/src/components/principal-page.tsx +19 -3
- package/src/components/service-tokens.tsx +1 -1
- package/src/index.ts +4 -1
- package/src/lib/changes.ts +23 -2
- package/src/lib/queries.ts +2 -2
- package/src/options.ts +41 -13
- package/src/pages/account.tsx +142 -166
- package/src/pages/environment.tsx +2 -2
- package/src/pages/oauth-authorize.tsx +10 -7
- package/src/parity.ts +4 -4
- package/src/register.ts +13 -5
- package/src/shared/models.ts +1 -1
- package/src/styles/globals.css +9 -4
- package/dist/chunks/offboarding-CE6d7um1.js.map +0 -1
- package/dist/chunks/principal-page-DhjO76GH.js.map +0 -1
- package/dist/chunks/queries-DVR_i3rA.js.map +0 -1
- package/dist/chunks/use-change-DUiGO19U.js.map +0 -1
package/src/pages/account.tsx
CHANGED
|
@@ -1,96 +1,136 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import type { IdentityRow, SessionRow } from '@coffre/client';
|
|
2
|
+
import { Link, Outlet } from '@tanstack/react-router';
|
|
3
|
+
import { useSuspenseQuery } from '@tanstack/react-query';
|
|
4
4
|
|
|
5
5
|
import { Fragment } from 'react';
|
|
6
6
|
import { useShell } from '../lib/use-shell';
|
|
7
7
|
import { Card, Fact, PageHeader } from '../components/page';
|
|
8
|
+
import { PageTabs } from '../components/tabs';
|
|
8
9
|
import { ThemeCards } from '../components/theme';
|
|
9
10
|
import { InstanceRole } from '../components/directory';
|
|
10
|
-
import { ConfirmButton, EmptyState, ErrorLine, Notice, Timestamp } from '../components/ui';
|
|
11
|
-
import { Link as LinkIcon, Monitor, ProviderMark, SignOut, Terminal, X } from '../components/icons';
|
|
11
|
+
import { ConfirmButton, CopyButton, EmptyState, ErrorLine, Notice, Timestamp } from '../components/ui';
|
|
12
|
+
import { Link as LinkIcon, Monitor, ProviderMark, SignOut, Sun, Terminal, User, X } from '../components/icons';
|
|
12
13
|
import { signinErrorMessage } from '../lib/signin-errors';
|
|
13
14
|
import { useOneTime } from '../lib/one-time';
|
|
14
15
|
import { useCoffre } from '../lib/coffre';
|
|
16
|
+
import { useMounted } from '../lib/mounted';
|
|
15
17
|
import { disconnectApp, endSession, unlinkIdentity } from '../lib/changes';
|
|
16
18
|
import { queries } from '../lib/queries';
|
|
17
19
|
import { useChange, useChangeStatus } from '../lib/use-change';
|
|
18
20
|
import { RowFailure, RowPending, rowClass } from '../components/row-state';
|
|
21
|
+
import { ConnectedAppsCard } from '../components/connected-apps';
|
|
19
22
|
import { pageRoute } from '../lib/page-route';
|
|
20
|
-
import type {
|
|
23
|
+
import type { accountProfile } from '../options';
|
|
21
24
|
|
|
22
|
-
const Route = pageRoute<typeof
|
|
23
|
-
|
|
24
|
-
type Search = { linked?: string; error?: string };
|
|
25
|
+
const Route = pageRoute<typeof accountProfile>();
|
|
25
26
|
|
|
26
27
|
/**
|
|
27
|
-
* Your own
|
|
28
|
+
* Your own account, around its tabs: who coffre takes you for and, when
|
|
28
29
|
* coffre runs its own sign-in, which accounts you sign in with, where you
|
|
29
|
-
* are signed in,
|
|
30
|
-
*
|
|
30
|
+
* are signed in, the MCP clients you connected, and how coffre looks here.
|
|
31
|
+
* The sidebar's Settings is the instance's; this page is reached from your
|
|
32
|
+
* account at the sidebar's foot. It keeps the name it had as one page, which
|
|
33
|
+
* a deployment's `_coffre/account.tsx` mounts.
|
|
31
34
|
*/
|
|
32
|
-
|
|
33
35
|
export function AccountPage() {
|
|
34
|
-
const { principal,
|
|
36
|
+
const { principal, auth, features } = useShell();
|
|
37
|
+
const mounted = useMounted();
|
|
38
|
+
const person = principal?.type === 'user';
|
|
35
39
|
|
|
36
40
|
return (
|
|
37
41
|
<>
|
|
38
42
|
<PageHeader title="Account" actions={principal !== null && <SignOutButton />} />
|
|
39
43
|
|
|
40
|
-
<
|
|
41
|
-
|
|
42
|
-
<
|
|
43
|
-
|
|
44
|
-
|
|
44
|
+
<PageTabs label="Account sections">
|
|
45
|
+
{[
|
|
46
|
+
<Link key="profile" to="/account" activeOptions={{ exact: true, includeSearch: false }}>
|
|
47
|
+
<User size={15} />
|
|
48
|
+
Profile
|
|
49
|
+
</Link>,
|
|
50
|
+
person && auth.signin !== null && mounted('/account/sessions') && (
|
|
51
|
+
<Link key="sessions" to="/account/sessions">
|
|
52
|
+
<Monitor size={15} />
|
|
53
|
+
Sessions
|
|
54
|
+
</Link>
|
|
55
|
+
),
|
|
56
|
+
person && features.mcp && mounted('/account/apps') && (
|
|
57
|
+
<Link key="apps" to="/account/apps">
|
|
58
|
+
<LinkIcon size={15} />
|
|
59
|
+
Connected apps
|
|
60
|
+
</Link>
|
|
61
|
+
),
|
|
62
|
+
mounted('/account/appearance') && (
|
|
63
|
+
<Link key="appearance" to="/account/appearance">
|
|
64
|
+
<Sun size={15} />
|
|
65
|
+
Appearance
|
|
66
|
+
</Link>
|
|
67
|
+
),
|
|
68
|
+
]}
|
|
69
|
+
</PageTabs>
|
|
45
70
|
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
71
|
+
<Outlet />
|
|
72
|
+
</>
|
|
73
|
+
);
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
/** Its first tab: who you are to coffre, and the accounts you sign in with. */
|
|
77
|
+
export function AccountProfilePage() {
|
|
78
|
+
const { principal, instanceRole, auth } = useShell();
|
|
79
|
+
if (principal === null) return null;
|
|
80
|
+
return (
|
|
81
|
+
<>
|
|
82
|
+
<Card labelledBy="identity" title="Identity">
|
|
83
|
+
<dl className="facts">
|
|
84
|
+
<Fact label={principal.type === 'user' ? 'Email' : 'Name'}>
|
|
85
|
+
<span className="mono">{principal.id}</span>
|
|
86
|
+
</Fact>
|
|
87
|
+
<Fact label="Kind">{principal.type === 'user' ? 'User' : 'Token'}</Fact>
|
|
88
|
+
{principal.type === 'user' && (
|
|
89
|
+
<Fact label="Instance role">
|
|
90
|
+
<InstanceRole
|
|
91
|
+
principal={{
|
|
92
|
+
principalType: 'user',
|
|
93
|
+
principalId: principal.id,
|
|
94
|
+
instanceRole: instanceRole ?? 'user',
|
|
95
|
+
isRootAdmin: instanceRole === 'root-admin',
|
|
96
|
+
}}
|
|
97
|
+
/>
|
|
51
98
|
</Fact>
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
<InstanceRole
|
|
56
|
-
principal={{
|
|
57
|
-
principalType: 'user',
|
|
58
|
-
principalId: principal.id,
|
|
59
|
-
instanceRole: instanceRole ?? 'user',
|
|
60
|
-
isRootAdmin: instanceRole === 'root-admin',
|
|
61
|
-
}}
|
|
62
|
-
/>
|
|
63
|
-
</Fact>
|
|
64
|
-
)}
|
|
65
|
-
</dl>
|
|
66
|
-
</Card>
|
|
67
|
-
)}
|
|
99
|
+
)}
|
|
100
|
+
</dl>
|
|
101
|
+
</Card>
|
|
68
102
|
|
|
69
|
-
{auth.signin !== null && principal
|
|
70
|
-
<
|
|
103
|
+
{auth.signin !== null && principal.type === 'user' && (
|
|
104
|
+
<SigninAccounts email={principal.id} providers={auth.signin.providers} />
|
|
71
105
|
)}
|
|
72
|
-
|
|
73
|
-
{features.mcp && principal?.type === 'user' && <ConnectedApps />}
|
|
74
106
|
</>
|
|
75
107
|
);
|
|
76
108
|
}
|
|
77
109
|
|
|
78
|
-
/**
|
|
79
|
-
function
|
|
80
|
-
const
|
|
81
|
-
const
|
|
82
|
-
queries: [queries.identities(client), queries.sessions(client)],
|
|
83
|
-
});
|
|
84
|
-
if (!identities.ok) return <ErrorLine error={identities.error} />;
|
|
110
|
+
/** Where you are signed in, browsers and command lines. */
|
|
111
|
+
export function AccountSessionsPage() {
|
|
112
|
+
const { auth } = useShell();
|
|
113
|
+
const { data: sessions } = useSuspenseQuery(queries.sessions(useCoffre()));
|
|
85
114
|
if (!sessions.ok) return <ErrorLine error={sessions.error} />;
|
|
115
|
+
return <Sessions sessions={sessions.sessions} providers={auth.signin?.providers ?? []} />;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
/** How to connect Claude, then the apps you connected. */
|
|
119
|
+
export function AccountAppsPage() {
|
|
120
|
+
const { features } = useShell();
|
|
86
121
|
return (
|
|
87
122
|
<>
|
|
88
|
-
|
|
89
|
-
<
|
|
123
|
+
{features.mcp !== null && <ConnectAnApp url={features.mcp} />}
|
|
124
|
+
<ConnectedApps />
|
|
90
125
|
</>
|
|
91
126
|
);
|
|
92
127
|
}
|
|
93
128
|
|
|
129
|
+
/** How coffre looks in this browser. */
|
|
130
|
+
export function AccountAppearancePage() {
|
|
131
|
+
return <ThemeCards />;
|
|
132
|
+
}
|
|
133
|
+
|
|
94
134
|
/**
|
|
95
135
|
* Sign-out is a form post: a GET could be triggered by any image tag on any
|
|
96
136
|
* page, and the server's origin check covers form posts.
|
|
@@ -112,7 +152,14 @@ function providerLabel(providers: Provider[], id: string | null) {
|
|
|
112
152
|
return providers.find((provider) => provider.id === id)?.label ?? id ?? 'unknown';
|
|
113
153
|
}
|
|
114
154
|
|
|
115
|
-
|
|
155
|
+
/** Which accounts you sign in with. */
|
|
156
|
+
function SigninAccounts({ email, providers }: { email: string; providers: Provider[] }) {
|
|
157
|
+
const { data } = useSuspenseQuery(queries.identities(useCoffre()));
|
|
158
|
+
if (!data.ok) return <ErrorLine error={data.error} />;
|
|
159
|
+
return <SigninAccountsCard email={email} providers={providers} identities={data.identities} />;
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
function SigninAccountsCard({
|
|
116
163
|
email,
|
|
117
164
|
providers,
|
|
118
165
|
identities,
|
|
@@ -374,123 +421,52 @@ function Sessions({
|
|
|
374
421
|
);
|
|
375
422
|
}
|
|
376
423
|
|
|
377
|
-
/**
|
|
378
|
-
function
|
|
379
|
-
const client = useCoffre();
|
|
380
|
-
const { data: apps } = useSuspenseQuery(queries.apps(client));
|
|
381
|
-
const change = disconnectApp(client);
|
|
382
|
-
const disconnect = useChange(change);
|
|
383
|
-
const { status, dismiss } = useChangeStatus(change.list.queryKey);
|
|
384
|
-
|
|
424
|
+
/** How to connect an MCP client: this instance's endpoint, as `/me` reports it, and the steps for Claude Code and claude.ai. */
|
|
425
|
+
function ConnectAnApp({ url }: { url: string }) {
|
|
385
426
|
return (
|
|
386
427
|
<Card
|
|
387
|
-
labelledBy="
|
|
388
|
-
title="
|
|
389
|
-
description="
|
|
428
|
+
labelledBy="connect"
|
|
429
|
+
title="Connect an app"
|
|
430
|
+
description="Claude, or another MCP client, connects at this address. It asks you to approve it here, then acts as you."
|
|
390
431
|
>
|
|
391
|
-
|
|
392
|
-
<
|
|
393
|
-
<
|
|
394
|
-
</
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
<
|
|
402
|
-
<
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
<th>App</th>
|
|
406
|
-
<th>May</th>
|
|
407
|
-
<th className="col-shrink">Last used</th>
|
|
408
|
-
<th className="col-shrink">Expires</th>
|
|
409
|
-
<th className="col-actions">
|
|
410
|
-
<span className="visually-hidden">Actions</span>
|
|
411
|
-
</th>
|
|
412
|
-
</tr>
|
|
413
|
-
</thead>
|
|
414
|
-
<tbody>
|
|
415
|
-
{apps.apps.map((app) => {
|
|
416
|
-
const state = status(app.id);
|
|
417
|
-
return (
|
|
418
|
-
<Fragment key={app.id}>
|
|
419
|
-
<tr className={rowClass(state)}>
|
|
420
|
-
<td>
|
|
421
|
-
<span className="cell-account">
|
|
422
|
-
<LinkIcon size={15} />
|
|
423
|
-
<span className="cell-stack">
|
|
424
|
-
<span>
|
|
425
|
-
{app.name}{' '}
|
|
426
|
-
{app.registration === 'dcr' && (
|
|
427
|
-
<span className="tag tag-amber" title="It registered itself: its name is its own claim">
|
|
428
|
-
Unverified
|
|
429
|
-
</span>
|
|
430
|
-
)}
|
|
431
|
-
</span>
|
|
432
|
-
<small>
|
|
433
|
-
{app.host === null ? 'no website' : <span className="mono">{app.host}</span>}
|
|
434
|
-
{' · connected '}
|
|
435
|
-
<Timestamp iso={app.createdAt} display="relative" />
|
|
436
|
-
</small>
|
|
437
|
-
</span>
|
|
438
|
-
</span>
|
|
439
|
-
</td>
|
|
440
|
-
<td data-label="May">{scopeLabels(app)}</td>
|
|
441
|
-
<td className="nowrap cell-muted" data-label="Last used">
|
|
442
|
-
{app.lastUsedAt === null ? 'Never' : <Timestamp iso={app.lastUsedAt} display="relative" />}
|
|
443
|
-
</td>
|
|
444
|
-
<td className="nowrap cell-muted" data-label="Expires">
|
|
445
|
-
<Timestamp iso={app.expiresAt} display="relative" />
|
|
446
|
-
</td>
|
|
447
|
-
<td className="col-actions">
|
|
448
|
-
{state.state === 'pending' ? (
|
|
449
|
-
<RowPending status={state} />
|
|
450
|
-
) : (
|
|
451
|
-
<ConfirmButton
|
|
452
|
-
trigger={
|
|
453
|
-
<button className="act">
|
|
454
|
-
<X size={13} />
|
|
455
|
-
Disconnect
|
|
456
|
-
</button>
|
|
457
|
-
}
|
|
458
|
-
title={`Disconnect ${app.name}?`}
|
|
459
|
-
body={
|
|
460
|
-
<>
|
|
461
|
-
{app.name}
|
|
462
|
-
{app.host !== null && (
|
|
463
|
-
<>
|
|
464
|
-
{' '}at <span className="mono">{app.host}</span>
|
|
465
|
-
</>
|
|
466
|
-
)}
|
|
467
|
-
, last used{' '}
|
|
468
|
-
{app.lastUsedAt === null ? 'never' : <Timestamp iso={app.lastUsedAt} display="relative" />},
|
|
469
|
-
stops at its next request. To use it again, connect it again.
|
|
470
|
-
</>
|
|
471
|
-
}
|
|
472
|
-
confirmLabel="Disconnect"
|
|
473
|
-
onConfirm={() => disconnect(app)}
|
|
474
|
-
/>
|
|
475
|
-
)}
|
|
476
|
-
</td>
|
|
477
|
-
</tr>
|
|
478
|
-
<RowFailure
|
|
479
|
-
status={state}
|
|
480
|
-
columns={5}
|
|
481
|
-
onDismiss={() => state.state === 'failed' && dismiss(state.mutationId)}
|
|
482
|
-
/>
|
|
483
|
-
</Fragment>
|
|
484
|
-
);
|
|
485
|
-
})}
|
|
486
|
-
</tbody>
|
|
487
|
-
</table>
|
|
488
|
-
</div>
|
|
489
|
-
)}
|
|
432
|
+
<dl className="facts">
|
|
433
|
+
<Fact label="MCP URL">
|
|
434
|
+
<CopyLine value={url} label="Copy the URL" />
|
|
435
|
+
</Fact>
|
|
436
|
+
<Fact label="Claude Code">
|
|
437
|
+
<CopyLine value={`claude mcp add --transport http coffre ${url}`} label="Copy the command" />
|
|
438
|
+
<span className="hint">
|
|
439
|
+
Then run <span className="mono">/mcp</span> in Claude Code to sign in.
|
|
440
|
+
</span>
|
|
441
|
+
</Fact>
|
|
442
|
+
<Fact label="claude.ai">
|
|
443
|
+
<span>In Customize › Connectors, choose Add custom connector, then paste the URL.</span>
|
|
444
|
+
</Fact>
|
|
445
|
+
</dl>
|
|
490
446
|
</Card>
|
|
491
447
|
);
|
|
492
448
|
}
|
|
493
449
|
|
|
494
|
-
|
|
495
|
-
|
|
450
|
+
/** A value to copy whole, in a box of its own. */
|
|
451
|
+
function CopyLine({ value, label }: { value: string; label: string }) {
|
|
452
|
+
return (
|
|
453
|
+
<div className="copy-line">
|
|
454
|
+
<code className="mono">{value}</code>
|
|
455
|
+
<CopyButton value={value} label={label} />
|
|
456
|
+
</div>
|
|
457
|
+
);
|
|
458
|
+
}
|
|
459
|
+
|
|
460
|
+
/** The MCP clients you connected, such as Claude: each acts as you until it is disconnected or expires. */
|
|
461
|
+
function ConnectedApps() {
|
|
462
|
+
const client = useCoffre();
|
|
463
|
+
const { data: apps } = useSuspenseQuery(queries.apps(client));
|
|
464
|
+
return (
|
|
465
|
+
<ConnectedAppsCard
|
|
466
|
+
apps={apps.ok ? apps.apps : { error: apps.error }}
|
|
467
|
+
change={disconnectApp(client)}
|
|
468
|
+
description="Each acts as you, never beyond your access, and every call it makes is in the audit log. Disconnecting one stops it at its next request."
|
|
469
|
+
empty="An app you connect shows here once you approve it."
|
|
470
|
+
/>
|
|
471
|
+
);
|
|
496
472
|
}
|
|
@@ -1892,8 +1892,8 @@ function ImportEnv({ project, environment }: { project: string; environment: str
|
|
|
1892
1892
|
<ul style={{ margin: '0.375rem 0 0', paddingLeft: '1.1rem' }}>
|
|
1893
1893
|
{problems.map((problem) => (
|
|
1894
1894
|
<li key={problem.line}>
|
|
1895
|
-
Line {problem.line}: {problem.reason}
|
|
1896
|
-
<span className="mono">({problem.
|
|
1895
|
+
Line {problem.line}: {problem.reason}
|
|
1896
|
+
{problem.key !== undefined && <span className="mono"> ({problem.key})</span>}
|
|
1897
1897
|
</li>
|
|
1898
1898
|
))}
|
|
1899
1899
|
</ul>
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { useState } from 'react';
|
|
2
2
|
import type { AuthorizationView, RouteInput } from '@coffre/client';
|
|
3
|
-
import { MCP_SCOPE_INFO, supersedes, type McpScope } from '@coffre/core/mcp';
|
|
3
|
+
import { MCP_SCOPE_INFO, MCP_SCOPES, supersedes, type McpScope } from '@coffre/core/mcp';
|
|
4
4
|
|
|
5
5
|
import { failureMessage, statusOf, useCoffre } from '../lib/coffre';
|
|
6
6
|
import { ClosedDoor } from '../components/page';
|
|
@@ -15,7 +15,8 @@ type Ready = Extract<AuthorizationView, { status: 'ready' }>;
|
|
|
15
15
|
|
|
16
16
|
/**
|
|
17
17
|
* Where an MCP client, such as Claude, sends you to connect: who it is,
|
|
18
|
-
* where coffre's answer goes, and what it may do as you
|
|
18
|
+
* where coffre's answer goes, and what it may do as you, of every scope,
|
|
19
|
+
* whatever it asked for: what it asked for starts ticked. Nothing is granted
|
|
19
20
|
* until you press Approve, and every connection asks again: there is no
|
|
20
21
|
* silent re-consent. Either answer goes back to the app by `location`,
|
|
21
22
|
* never a form post, which the page's `form-action 'self'` would stop.
|
|
@@ -98,7 +99,7 @@ function Approve({
|
|
|
98
99
|
const { client } = view;
|
|
99
100
|
const unverified = client.registration === 'dcr';
|
|
100
101
|
// A step-up: the connections this one grants all of and more end once the app has its new one.
|
|
101
|
-
const granted =
|
|
102
|
+
const granted = MCP_SCOPES.filter((scope) => chosen.has(scope));
|
|
102
103
|
const replaced = view.connections.filter((held) => supersedes(granted, held)).length;
|
|
103
104
|
const kept = view.connections.length - replaced;
|
|
104
105
|
|
|
@@ -166,10 +167,12 @@ function Approve({
|
|
|
166
167
|
</dl>
|
|
167
168
|
|
|
168
169
|
<fieldset className="consent-scopes">
|
|
169
|
-
<legend className="label">
|
|
170
|
-
|
|
170
|
+
<legend className="label">
|
|
171
|
+
It may <span className="hint">· to add a scope later, you connect it again</span>
|
|
172
|
+
</legend>
|
|
173
|
+
{MCP_SCOPES.map((scope) => {
|
|
171
174
|
const { label, description } = MCP_SCOPE_INFO[scope];
|
|
172
|
-
const locked = scope === '
|
|
175
|
+
const locked = scope === 'read';
|
|
173
176
|
return (
|
|
174
177
|
<label key={scope} className="consent-scope">
|
|
175
178
|
<input
|
|
@@ -191,7 +194,7 @@ function Approve({
|
|
|
191
194
|
</fieldset>
|
|
192
195
|
|
|
193
196
|
<div className="consent-notices">
|
|
194
|
-
{chosen.has('
|
|
197
|
+
{chosen.has('reveal') && (
|
|
195
198
|
<Notice tone="bad">
|
|
196
199
|
Values will be sent to {client.name}. They become part of the conversation: whoever can read
|
|
197
200
|
that conversation, and wherever {client.name} stores it, has them.
|
package/src/parity.ts
CHANGED
|
@@ -138,9 +138,9 @@ export const UI_PARITY: { [K in RouteKey]: Reach } = {
|
|
|
138
138
|
],
|
|
139
139
|
},
|
|
140
140
|
'GET /sessions': { ui: [{ does: 'Account › Sessions', in: 'pages/account.tsx', call: 'sessions.list' }] },
|
|
141
|
-
'DELETE /sessions/:id': { ui: [{ does: 'Account › a session › End', in: 'pages/account.tsx', call: 'sessions.revoke' }] },
|
|
142
|
-
'GET /identities': { ui: [{ does: 'Account › Sign-in accounts', in: 'pages/account.tsx', call: 'identities.list' }] },
|
|
143
|
-
'DELETE /identities/:id': { ui: [{ does: 'Account › a sign-in account › Unlink', in: 'pages/account.tsx', call: 'identities.unlink' }] },
|
|
141
|
+
'DELETE /sessions/:id': { ui: [{ does: 'Account › Sessions › a session › End', in: 'pages/account.tsx', call: 'sessions.revoke' }] },
|
|
142
|
+
'GET /identities': { ui: [{ does: 'Account › Profile › Sign-in accounts', in: 'pages/account.tsx', call: 'identities.list' }] },
|
|
143
|
+
'DELETE /identities/:id': { ui: [{ does: 'Account › Profile › a sign-in account › Unlink', in: 'pages/account.tsx', call: 'identities.unlink' }] },
|
|
144
144
|
'GET /device-logins/:code': { ui: [{ does: "the page `coffre login` opens: the login's code", in: 'pages/device-login.tsx', call: 'deviceLogins.get' }] },
|
|
145
145
|
'POST /device-logins/:code': { ui: [{ does: 'that page › Approve, Deny', in: 'pages/device-login.tsx', call: 'deviceLogins.decide' }] },
|
|
146
146
|
'GET /oauth/authorizations': { ui: [{ does: 'the page an MCP client opens to connect: what it asks for', in: 'pages/oauth-authorize.tsx', call: 'oauth.describe' }] },
|
|
@@ -148,7 +148,7 @@ export const UI_PARITY: { [K in RouteKey]: Reach } = {
|
|
|
148
148
|
'GET /approvals/:id': { ui: [{ does: 'the page an MCP client sends you to, to decide a change it asked for', in: 'pages/approval.tsx', call: 'approvals.get' }] },
|
|
149
149
|
'POST /approvals/:id': { ui: [{ does: 'that page › Approve, Deny', in: 'pages/approval.tsx', call: 'approvals.decide' }] },
|
|
150
150
|
'GET /apps': { ui: [{ does: 'Account › Connected apps', in: 'pages/account.tsx', call: 'apps.list' }] },
|
|
151
|
-
'DELETE /apps/:id': { ui: [{ does: 'Account › a connected app › Disconnect', in: 'pages/account.tsx', call: 'apps.disconnect' }] },
|
|
151
|
+
'DELETE /apps/:id': { ui: [{ does: 'Account › Connected apps › a connected app › Disconnect', in: 'pages/account.tsx', call: 'apps.disconnect' }] },
|
|
152
152
|
'GET /audit': {
|
|
153
153
|
ui: [
|
|
154
154
|
{ does: 'Audit', in: 'pages/audit.tsx', call: 'audit.list' },
|
package/src/register.ts
CHANGED
|
@@ -7,8 +7,11 @@ import { createRootRouteWithContext, createRoute } from '@tanstack/react-router'
|
|
|
7
7
|
|
|
8
8
|
import type { createRouter } from './router';
|
|
9
9
|
import {
|
|
10
|
-
access,
|
|
11
10
|
account,
|
|
11
|
+
accountAppearance,
|
|
12
|
+
accountApps,
|
|
13
|
+
accountProfile,
|
|
14
|
+
accountSessions,
|
|
12
15
|
audit,
|
|
13
16
|
deviceLogin,
|
|
14
17
|
environment,
|
|
@@ -35,7 +38,7 @@ import {
|
|
|
35
38
|
users,
|
|
36
39
|
type CoffreContext,
|
|
37
40
|
} from './options';
|
|
38
|
-
import { AccountPage } from './pages/account';
|
|
41
|
+
import { AccountAppearancePage, AccountAppsPage, AccountPage, AccountProfilePage, AccountSessionsPage } from './pages/account';
|
|
39
42
|
import { AuditPage } from './pages/audit';
|
|
40
43
|
import { DevicePage } from './pages/device-login';
|
|
41
44
|
import { EnvironmentPage } from './pages/environment';
|
|
@@ -61,7 +64,8 @@ const under = <T extends string>(path: T) => ({ getParentRoute: () => nav, path
|
|
|
61
64
|
const projectPage = createRoute({ ...under('/projects/$project'), ...project, component: ProjectLayout });
|
|
62
65
|
const userPage = createRoute({ ...under('/users/$user'), ...user, component: UserLayout });
|
|
63
66
|
const serviceAccountPage = createRoute({ ...under('/service-accounts/$account'), ...serviceAccount, component: ServiceAccountLayout });
|
|
64
|
-
const
|
|
67
|
+
const accountPage = createRoute({ ...under('/account'), ...account, component: AccountPage });
|
|
68
|
+
const tab = <P extends typeof projectPage | typeof userPage | typeof serviceAccountPage | typeof accountPage, T extends string>(parent: P, path: T) => ({ getParentRoute: () => parent, path });
|
|
65
69
|
|
|
66
70
|
const routeTree = root.addChildren([
|
|
67
71
|
frame.addChildren([
|
|
@@ -80,7 +84,6 @@ const routeTree = root.addChildren([
|
|
|
80
84
|
]),
|
|
81
85
|
createRoute({ ...under('/projects/$project/$environment'), ...environment, component: EnvironmentPage }),
|
|
82
86
|
createRoute({ ...under('/audit'), ...audit, component: AuditPage }),
|
|
83
|
-
createRoute({ ...under('/access'), ...access }),
|
|
84
87
|
createRoute({ ...under('/users'), ...users, component: UsersPage }),
|
|
85
88
|
userPage.addChildren([
|
|
86
89
|
createRoute({ ...tab(userPage, '/'), ...userAccess, component: UserAccessPage }),
|
|
@@ -93,7 +96,12 @@ const routeTree = root.addChildren([
|
|
|
93
96
|
createRoute({ ...tab(serviceAccountPage, '/activity'), ...serviceAccountActivity, component: ServiceAccountActivityPage }),
|
|
94
97
|
]),
|
|
95
98
|
createRoute({ ...under('/settings'), ...settings, component: SettingsPage }),
|
|
96
|
-
|
|
99
|
+
accountPage.addChildren([
|
|
100
|
+
createRoute({ ...tab(accountPage, '/'), ...accountProfile, component: AccountProfilePage }),
|
|
101
|
+
createRoute({ ...tab(accountPage, '/sessions'), ...accountSessions, component: AccountSessionsPage }),
|
|
102
|
+
createRoute({ ...tab(accountPage, '/apps'), ...accountApps, component: AccountAppsPage }),
|
|
103
|
+
createRoute({ ...tab(accountPage, '/appearance'), ...accountAppearance, component: AccountAppearancePage }),
|
|
104
|
+
]),
|
|
97
105
|
]),
|
|
98
106
|
]);
|
|
99
107
|
|
package/src/shared/models.ts
CHANGED
|
@@ -52,4 +52,4 @@ export type ImportPlanEntry = { key: string; action: ImportAction; version: numb
|
|
|
52
52
|
export type PrincipalReport = OffboardingReport;
|
|
53
53
|
export type RemovedPrincipal = RemovedMember;
|
|
54
54
|
|
|
55
|
-
export type ImportProblem = { line: number;
|
|
55
|
+
export type ImportProblem = { line: number; key?: string; reason: string };
|
package/src/styles/globals.css
CHANGED
|
@@ -722,8 +722,9 @@ a.crumb-link:hover {
|
|
|
722
722
|
margin-bottom: 1.5rem;
|
|
723
723
|
}
|
|
724
724
|
|
|
725
|
-
/* Its actions end where the page's cards do. */
|
|
726
|
-
.content:has(.card-wide) > .page-head
|
|
725
|
+
/* Its actions, and the tab bar under it, end where the page's cards do. */
|
|
726
|
+
.content:has(.card-wide) > .page-head,
|
|
727
|
+
.content:has(.card-wide) > .tabs {
|
|
727
728
|
max-width: none;
|
|
728
729
|
}
|
|
729
730
|
|
|
@@ -1803,7 +1804,7 @@ a.crumb-link:hover {
|
|
|
1803
1804
|
color: var(--ink-3);
|
|
1804
1805
|
}
|
|
1805
1806
|
|
|
1806
|
-
.
|
|
1807
|
+
.copy-line {
|
|
1807
1808
|
display: flex;
|
|
1808
1809
|
align-items: center;
|
|
1809
1810
|
gap: 0.5rem;
|
|
@@ -1813,9 +1814,12 @@ a.crumb-link:hover {
|
|
|
1813
1814
|
background: var(--canvas);
|
|
1814
1815
|
}
|
|
1815
1816
|
|
|
1816
|
-
.
|
|
1817
|
+
.copy-line code {
|
|
1817
1818
|
flex: 1;
|
|
1818
1819
|
min-width: 0;
|
|
1820
|
+
padding: 0;
|
|
1821
|
+
border: 0;
|
|
1822
|
+
background: none;
|
|
1819
1823
|
font-size: 0.8125rem;
|
|
1820
1824
|
overflow-wrap: anywhere;
|
|
1821
1825
|
}
|
|
@@ -2715,6 +2719,7 @@ span.env-link {
|
|
|
2715
2719
|
.tabs {
|
|
2716
2720
|
display: flex;
|
|
2717
2721
|
gap: 0.25rem;
|
|
2722
|
+
max-width: var(--card-max);
|
|
2718
2723
|
margin: -0.25rem 0 1.5rem;
|
|
2719
2724
|
/* A shadow rather than a border: the scroll box clips at its padding
|
|
2720
2725
|
edge, and the current tab's underline has to cover this line. */
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"offboarding-CE6d7um1.js","names":[],"sources":["../../src/components/offboarding.tsx"],"sourcesContent":["import { Link } from '@tanstack/react-router';\nimport type { PrincipalReport, RemovedPrincipal } from '../shared/models';\nimport { Card } from './page';\nimport { EmptyState, Notice, Timestamp } from './ui';\nimport { PrincipalLink } from './principal';\nimport { referenceProblem } from './references';\nimport { ChevronRight, Key, User } from './icons';\nimport { serviceName } from '@coffre/client';\n\n/**\n * The part of a user's or token's page that answers \"what do we change now\n * they have left?\". Owners only. Once someone is removed everything that let\n * them in is gone, but what they saw is not, nor tokens they issued.\n */\nexport function PrincipalReportCards({ report }: { report: PrincipalReport }) {\n const person = report.principalType === 'user';\n return (\n <>\n {report.status === 'removed' && <ConsiderRotating report={report} person={person} />}\n {report.issuedTokens.length > 0 && <IssuedTokens report={report} />}\n {report.references.length > 0 && <MadeReferences report={report} />}\n </>\n );\n}\n\nexport function RemovedNotice({ report }: { report: PrincipalReport }) {\n const person = report.principalType === 'user';\n return (\n <div className=\"report-notice\">\n <Notice>\n Removed\n {report.removedBy !== null && (\n <>\n {' '}by <span className=\"mono\">{report.removedBy}</span>\n </>\n )}\n {report.removedAt !== null && (\n <>\n {' '}on <Timestamp iso={report.removedAt} />\n </>\n )}\n .{' '}\n {person\n ? 'Their project access, sessions, CLI logins and linked sign-in accounts were revoked at the same time, so adding them again starts from nothing.'\n : 'Its project access and every token issued to it were revoked at the same time, so adding it again starts from nothing.'}\n </Notice>\n </div>\n );\n}\n\n/**\n * The people or service accounts removed from the directory, under the live ones.\n * Removal ends their access but not the work it leaves, so they stay one click\n * away until every value they saw has been rotated.\n */\nexport function RemovedList({\n principalType,\n removed,\n}: {\n principalType: RemovedPrincipal['principalType'];\n removed: RemovedPrincipal[];\n}) {\n const users = principalType === 'user';\n const rows = removed.filter((principal) => principal.principalType === principalType);\n if (rows.length === 0) return null;\n return (\n <>\n <h2 className=\"section-title\">Removed</h2>\n <section className=\"card\" aria-label={users ? 'Removed users' : 'Removed service accounts'}>\n <div className=\"dt-wrap\">\n <table className=\"dt directory stacks\">\n <thead>\n <tr>\n <th className=\"n\">#</th>\n <th className=\"col-principal\">\n <span className=\"th\">\n {users ? <User size={14} /> : <Key size={14} />}\n {users ? 'Email' : 'Name'}\n </span>\n </th>\n <th className=\"col-role\">Consider rotating</th>\n <th className=\"col-actions\">\n <span className=\"visually-hidden\">Report</span>\n </th>\n </tr>\n </thead>\n <tbody>\n {rows.map((principal, index) => (\n <tr key={principal.principalId} className=\"row-link\">\n <td className=\"n\">{index + 1}</td>\n <td className=\"col-lead\" data-label={users ? 'Email' : 'Name'}>\n <PrincipalLink type={principal.principalType} id={principal.principalId} stretch />\n </td>\n <td className=\"col-role\" data-label=\"Consider rotating\">\n {principal.toRotate === 0 ? (\n <span className=\"cell-muted\">Nothing</span>\n ) : (\n `${principal.toRotate} ${principal.toRotate === 1 ? 'value' : 'values'}`\n )}\n </td>\n {/* The row opens the report; the chevron says it does. */}\n <td className=\"col-actions col-open cell-muted\" aria-hidden=\"true\">\n <ChevronRight size={16} />\n </td>\n </tr>\n ))}\n </tbody>\n </table>\n </div>\n </section>\n </>\n );\n}\n\n/** Values a removed member saw that nobody has changed since. */\nfunction ConsiderRotating({ report, person }: { report: PrincipalReport; person: boolean }) {\n const they = person ? 'they' : 'it';\n return (\n <Card\n labelledBy=\"seen-values\"\n title=\"Consider rotating\"\n description={`Values ${they} read or wrote that nobody has changed since, so ${they} may still hold them. Rotate each where it comes from, such as a new API key or database password, then save the new value here and it leaves this list.`}\n actions={\n report.rotated > 0 && (\n <span className=\"card-aside\">{report.rotated} already rotated</span>\n )\n }\n >\n {report.exposed.length === 0 ? (\n <EmptyState title=\"Nothing left to rotate\">\n {report.rotated > 0\n ? `Every value ${they} saw has had a new version since.`\n : `${person ? 'They have' : 'It has'} not read or written a value that is still current.`}\n </EmptyState>\n ) : (\n <div className=\"dt-wrap\">\n <table className=\"dt report-values\">\n <thead>\n <tr>\n <th>Secret</th>\n <th className=\"col-shrink\">Version</th>\n <th className=\"col-shrink\">Last seen</th>\n </tr>\n </thead>\n <tbody>\n {report.exposed.map((secret) => (\n <tr key={`${secret.project}/${secret.environment}/${secret.key}`}>\n <td>\n <Link\n className=\"cell-link mono\"\n to=\"/projects/$project/$environment\"\n params={{ project: secret.project, environment: secret.environment }}\n search={{ filter: secret.key }}\n >\n <span className=\"report-path\">\n {secret.project}/{secret.environment}/\n </span>\n {secret.key}\n </Link>\n </td>\n <td className=\"col-shrink cell-mono cell-muted\">v{secret.version}</td>\n <td className=\"col-shrink nowrap\">\n {secret.how === 'wrote' ? 'Wrote' : 'Read'}{' '}\n <Timestamp iso={secret.at} display=\"relative\" />\n </td>\n </tr>\n ))}\n </tbody>\n </table>\n </div>\n )}\n </Card>\n );\n}\n\n/**\n * References they made, as the log names them: each belongs to the\n * environment that holds it, like a value, not to them (D46), so their\n * leaving ends none. Listed to review.\n */\nfunction MadeReferences({ report }: { report: PrincipalReport }) {\n return (\n <Card\n labelledBy=\"made-references\"\n title=\"References they made\"\n description=\"Each belongs to the environment that holds it, like a value, and stays when they leave: whoever reads that environment reads another secret through it. Review them; the source's access managers, or whoever writes where one is held, can break it.\"\n >\n <div className=\"dt-wrap\">\n <table className=\"dt stacks\">\n <thead>\n <tr>\n <th>Reference</th>\n <th>Reads</th>\n <th className=\"col-shrink\">Made</th>\n </tr>\n </thead>\n <tbody>\n {report.references.map((reference) => (\n <tr key={reference.id}>\n <td className=\"mono\" data-label=\"Reference\">{reference.holder}</td>\n <td data-label=\"Reads\">\n <span className=\"mono\">{reference.source}</span>\n {reference.state !== 'live' && <span className=\"cell-muted\"> · {referenceProblem(reference.state)}</span>}\n </td>\n <td className=\"col-shrink nowrap\" data-label=\"Made\">\n <Timestamp iso={reference.createdAt} display=\"relative\" />\n </td>\n </tr>\n ))}\n </tbody>\n </table>\n </div>\n </Card>\n );\n}\n\nfunction IssuedTokens({ report }: { report: PrincipalReport }) {\n return (\n <Card\n labelledBy=\"issued-tokens\"\n title=\"Bearer tokens they issued\"\n description=\"Bearer tokens they issued to service accounts that still work. Each was shown to them once, when it was made; revoke any they may have kept a copy of.\"\n >\n <div className=\"dt-wrap\">\n <table className=\"dt report-tokens\">\n <thead>\n <tr>\n <th>Token</th>\n <th className=\"col-shrink\">Expires</th>\n <th className=\"col-shrink col-hide-narrow\">Last used</th>\n </tr>\n </thead>\n <tbody>\n {report.issuedTokens.map((token) => (\n <tr key={token.id}>\n <td>\n <span className=\"cell-stack\">\n <Link className=\"cell-link mono\" to=\"/service-accounts/$account\" params={{ account: serviceName(token.service) }}>\n service:{serviceName(token.service)}\n </Link>\n <small>\n {token.label ?? 'No label'} · <span className=\"mono\">{token.hint}</span>\n </small>\n </span>\n </td>\n <td className=\"col-shrink nowrap\">\n <Timestamp iso={token.expiresAt} display=\"relative\" />\n </td>\n <td className=\"col-shrink col-hide-narrow nowrap\">\n {token.lastUsedAt === null ? (\n <span className=\"cell-muted\">Never</span>\n ) : (\n <Timestamp iso={token.lastUsedAt} display=\"relative\" />\n )}\n </td>\n </tr>\n ))}\n </tbody>\n </table>\n </div>\n </Card>\n );\n}\n"],"mappings":";;;;;;;;;;;;;AAcA,SAAgB,qBAAqB,EAAE,UAAuC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