@coffre/ui 0.4.4 → 0.4.6
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/{audit-sentence-BhHmvQX_.js → audit-sentence-DIztXvbU.js} +11 -2
- package/dist/chunks/audit-sentence-DIztXvbU.js.map +1 -0
- package/dist/chunks/{connected-apps-D8Df97-F.js → connected-apps-AZsX9Zvv.js} +2 -2
- package/dist/chunks/{connected-apps-D8Df97-F.js.map → connected-apps-AZsX9Zvv.js.map} +1 -1
- package/dist/chunks/{delete-place-LYN7z7xb.js → delete-place-D6LIZkg9.js} +4 -4
- package/dist/chunks/delete-place-D6LIZkg9.js.map +1 -0
- package/dist/chunks/{directory-v87HGjEn.js → directory-B6FuiCir.js} +5 -5
- package/dist/chunks/directory-B6FuiCir.js.map +1 -0
- package/dist/chunks/{folders-CbGU0xOz.js → folders-DvSqBhuu.js} +3 -3
- package/dist/chunks/folders-DvSqBhuu.js.map +1 -0
- package/dist/chunks/{offboarding-DdnmRV1f.js → offboarding-CLJaNTcD.js} +6 -6
- package/dist/chunks/offboarding-CLJaNTcD.js.map +1 -0
- package/dist/chunks/{principal-page-BubEO6-b.js → principal-page-1yMztIcc.js} +8 -8
- package/dist/chunks/principal-page-1yMztIcc.js.map +1 -0
- package/dist/chunks/{references-DPSYdWOk.js → references-DWDnXNoW.js} +3 -3
- package/dist/chunks/references-DWDnXNoW.js.map +1 -0
- package/dist/index.d.ts +5 -0
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/dist/pages/account.js +8 -8
- package/dist/pages/account.js.map +1 -1
- package/dist/pages/approval.js +55 -23
- package/dist/pages/approval.js.map +1 -1
- package/dist/pages/audit.js +4 -4
- package/dist/pages/audit.js.map +1 -1
- package/dist/pages/device-login.js +5 -4
- package/dist/pages/device-login.js.map +1 -1
- package/dist/pages/environment.js +9 -13
- package/dist/pages/environment.js.map +1 -1
- package/dist/pages/login.js +3 -3
- package/dist/pages/login.js.map +1 -1
- package/dist/pages/oauth-authorize.js +9 -14
- package/dist/pages/oauth-authorize.js.map +1 -1
- package/dist/pages/project-access.js +2 -2
- package/dist/pages/project-environments.js +7 -7
- package/dist/pages/project-environments.js.map +1 -1
- package/dist/pages/project-settings.js +6 -6
- package/dist/pages/project-settings.js.map +1 -1
- package/dist/pages/project.js +1 -1
- package/dist/pages/project.js.map +1 -1
- package/dist/pages/projects.js +4 -4
- package/dist/pages/projects.js.map +1 -1
- package/dist/pages/service-account.js +5 -5
- package/dist/pages/service-account.js.map +1 -1
- package/dist/pages/service-accounts.js +2 -2
- package/dist/pages/settings.js +4 -4
- package/dist/pages/settings.js.map +1 -1
- package/dist/pages/unregistered.js +3 -3
- package/dist/pages/unregistered.js.map +1 -1
- package/dist/pages/user.js +1 -1
- package/dist/pages/users.js +2 -2
- package/package.json +3 -3
- package/src/components/connected-apps.tsx +1 -1
- package/src/components/delete-place.tsx +4 -5
- package/src/components/directory.tsx +5 -6
- package/src/components/folders.tsx +2 -2
- package/src/components/offboarding.tsx +5 -5
- package/src/components/principal-page.tsx +3 -3
- package/src/components/references.tsx +2 -2
- package/src/components/route-states.tsx +4 -5
- package/src/components/service-tokens.tsx +1 -1
- package/src/components/trusted-workloads.tsx +3 -3
- package/src/lib/approval.ts +23 -0
- package/src/lib/audit-sentences.ts +5 -0
- package/src/pages/account.tsx +7 -7
- package/src/pages/approval.tsx +21 -20
- package/src/pages/audit.tsx +3 -3
- package/src/pages/device-login.tsx +3 -5
- package/src/pages/environment.tsx +8 -15
- package/src/pages/login.tsx +5 -10
- package/src/pages/oauth-authorize.tsx +7 -11
- package/src/pages/project-environments.tsx +6 -6
- package/src/pages/project-settings.tsx +5 -7
- package/src/pages/project.tsx +2 -2
- package/src/pages/projects.tsx +3 -3
- package/src/pages/settings.tsx +4 -4
- package/src/pages/unregistered.tsx +3 -5
- package/src/styles/globals.css +12 -7
- package/dist/chunks/audit-sentence-BhHmvQX_.js.map +0 -1
- package/dist/chunks/delete-place-LYN7z7xb.js.map +0 -1
- package/dist/chunks/directory-v87HGjEn.js.map +0 -1
- package/dist/chunks/folders-CbGU0xOz.js.map +0 -1
- package/dist/chunks/offboarding-DdnmRV1f.js.map +0 -1
- package/dist/chunks/principal-page-BubEO6-b.js.map +0 -1
- package/dist/chunks/references-DPSYdWOk.js.map +0 -1
package/dist/pages/user.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { s as memberRef } from "../chunks/page-DvsgZ2Hd.js";
|
|
2
2
|
import { t as pageRoute } from "../chunks/page-route-Drfw7lmn.js";
|
|
3
|
-
import { n as PrincipalLayout, r as ActionsLog, t as PrincipalAccess } from "../chunks/principal-page-
|
|
3
|
+
import { n as PrincipalLayout, r as ActionsLog, t as PrincipalAccess } from "../chunks/principal-page-1yMztIcc.js";
|
|
4
4
|
import { jsx } from "react/jsx-runtime";
|
|
5
5
|
//#region src/pages/user.tsx
|
|
6
6
|
var Route = pageRoute();
|
package/dist/pages/users.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { i as PageHeader, n as ClosedDoor, rt as Users, u as useCoffre } from "../chunks/page-DvsgZ2Hd.js";
|
|
2
2
|
import { p as queries } from "../chunks/queries-Dew8mIeo.js";
|
|
3
3
|
import { t as useShell } from "../chunks/use-shell-Dkv89nW1.js";
|
|
4
|
-
import { t as DirectoryTable } from "../chunks/directory-
|
|
5
|
-
import { n as RemovedList } from "../chunks/offboarding-
|
|
4
|
+
import { t as DirectoryTable } from "../chunks/directory-B6FuiCir.js";
|
|
5
|
+
import { n as RemovedList } from "../chunks/offboarding-CLJaNTcD.js";
|
|
6
6
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
7
7
|
import { useSuspenseQuery } from "@tanstack/react-query";
|
|
8
8
|
//#region src/pages/users.tsx
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@coffre/ui",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.6",
|
|
4
4
|
"description": "coffre's pages, for a deployment's own TanStack Start app: its router, and a Vite plugin for its build.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -44,8 +44,8 @@
|
|
|
44
44
|
"@tanstack/router-core": "1.171.15",
|
|
45
45
|
"lucide-react": "1.47.0",
|
|
46
46
|
"sonner": "2.0.7",
|
|
47
|
-
"@coffre/client": "0.4.
|
|
48
|
-
"@coffre/core": "0.4.
|
|
47
|
+
"@coffre/client": "0.4.6",
|
|
48
|
+
"@coffre/core": "0.4.6"
|
|
49
49
|
},
|
|
50
50
|
"peerDependencies": {
|
|
51
51
|
"@tanstack/react-query": "5.103.1",
|
|
@@ -108,7 +108,7 @@ export function ConnectedAppsCard<TData>({
|
|
|
108
108
|
)}
|
|
109
109
|
, last used{' '}
|
|
110
110
|
{app.lastUsedAt === null ? 'never' : <Timestamp iso={app.lastUsedAt} display="relative" />},
|
|
111
|
-
|
|
111
|
+
will stop working. To use it again, connect it again.
|
|
112
112
|
</>
|
|
113
113
|
}
|
|
114
114
|
confirmLabel="Disconnect"
|
|
@@ -60,8 +60,7 @@ export function DeletePlaceDialog({
|
|
|
60
60
|
</div>
|
|
61
61
|
<div className="dialog-body">
|
|
62
62
|
<Notice tone="bad">
|
|
63
|
-
Nothing brings it back
|
|
64
|
-
encrypted values; only they, with the vault key, could restore them.
|
|
63
|
+
Nothing brings it back, except a database backup from before now, with the vault key.
|
|
65
64
|
</Notice>
|
|
66
65
|
</div>
|
|
67
66
|
<form
|
|
@@ -126,7 +125,7 @@ function DeletionSummary({ deletion, what }: { deletion: Deletion; what: 'projec
|
|
|
126
125
|
<ul className="deletion-summary">
|
|
127
126
|
<li>
|
|
128
127
|
<strong>Erased:</strong> the values of {count(deletion.versions, 'secret version')}
|
|
129
|
-
{environments}
|
|
128
|
+
{environments}.
|
|
130
129
|
</li>
|
|
131
130
|
<li>
|
|
132
131
|
<strong>Revoked:</strong> {count(deletion.grants.length, 'grant')}
|
|
@@ -160,8 +159,8 @@ function DeletionSummary({ deletion, what }: { deletion: Deletion; what: 'projec
|
|
|
160
159
|
)}
|
|
161
160
|
<li>
|
|
162
161
|
<strong>Kept, names only:</strong> the {what} and its {count(deletion.keys, 'key')}, as{' '}
|
|
163
|
-
<span className="mono">{deletion.tombstone}</span>,
|
|
164
|
-
|
|
162
|
+
<span className="mono">{deletion.tombstone}</span>, for the audit log. Its name is free
|
|
163
|
+
to use again.
|
|
165
164
|
</li>
|
|
166
165
|
{deletion.stranded.length > 0 && (
|
|
167
166
|
<li>
|
|
@@ -67,8 +67,8 @@ export function DirectoryTable({
|
|
|
67
67
|
: 'No service accounts yet'
|
|
68
68
|
}
|
|
69
69
|
>
|
|
70
|
-
{hasRemoved ? `Add a ${KIND[principalType]}` : `Add the first ${KIND[principalType]}`}
|
|
71
|
-
it
|
|
70
|
+
{hasRemoved ? `Add a ${KIND[principalType]}` : `Add the first ${KIND[principalType]}`}, then
|
|
71
|
+
grant it project access from each project's page.
|
|
72
72
|
</EmptyState>
|
|
73
73
|
) : (
|
|
74
74
|
<div className="dt-wrap">
|
|
@@ -277,7 +277,7 @@ export function InstanceRole({ principal }: { principal: DirectoryPrincipal }) {
|
|
|
277
277
|
label={
|
|
278
278
|
<>
|
|
279
279
|
Their record was changed outside coffre, so the vault refuses them
|
|
280
|
-
everything.
|
|
280
|
+
everything. To start over, remove them and add them again.
|
|
281
281
|
</>
|
|
282
282
|
}
|
|
283
283
|
>
|
|
@@ -293,8 +293,7 @@ export function InstanceRole({ principal }: { principal: DirectoryPrincipal }) {
|
|
|
293
293
|
<Toggletip
|
|
294
294
|
label={
|
|
295
295
|
<>
|
|
296
|
-
Set by <code>rootAdmins</code> in the vault's configuration,
|
|
297
|
-
cannot be changed or removed here.
|
|
296
|
+
Set by <code>rootAdmins</code> in the vault's configuration, not here.
|
|
298
297
|
</>
|
|
299
298
|
}
|
|
300
299
|
>
|
|
@@ -498,7 +497,7 @@ export function AddPrincipal({ principalType }: { principalType: PrincipalType }
|
|
|
498
497
|
open={open}
|
|
499
498
|
onOpenChange={(next) => (next ? setOpen(true) : close())}
|
|
500
499
|
title={`Add a ${kind}`}
|
|
501
|
-
description={`This
|
|
500
|
+
description={`This gives the ${kind} no project access. Grant it afterwards, from its page or a project's.`}
|
|
502
501
|
>
|
|
503
502
|
<form
|
|
504
503
|
className="form"
|
|
@@ -83,7 +83,7 @@ export function FolderMenu({
|
|
|
83
83
|
open={renaming}
|
|
84
84
|
onOpenChange={setRenaming}
|
|
85
85
|
title={`Rename ${folder}`}
|
|
86
|
-
description={`Its ${items} move with it.
|
|
86
|
+
description={`Its ${items} move with it. Nothing else changes.`}
|
|
87
87
|
>
|
|
88
88
|
<form
|
|
89
89
|
className="form"
|
|
@@ -172,7 +172,7 @@ export function MoveToFolder({
|
|
|
172
172
|
open={open}
|
|
173
173
|
onOpenChange={onOpenChange}
|
|
174
174
|
title={`Move ${what} to a folder`}
|
|
175
|
-
description="
|
|
175
|
+
description="Folders only arrange the list: names, values and access stay as they are."
|
|
176
176
|
>
|
|
177
177
|
<form
|
|
178
178
|
className="form"
|
|
@@ -41,8 +41,8 @@ export function RemovedNotice({ report }: { report: PrincipalReport }) {
|
|
|
41
41
|
)}
|
|
42
42
|
.{' '}
|
|
43
43
|
{person
|
|
44
|
-
? 'Their project access, sessions, CLI logins, linked sign-in accounts and connected apps were revoked
|
|
45
|
-
: 'Its project access and every token issued to it were revoked
|
|
44
|
+
? 'Their project access, sessions, CLI logins, linked sign-in accounts and connected apps were revoked, so adding them again starts from nothing.'
|
|
45
|
+
: 'Its project access and every token issued to it were revoked, so adding it again starts from nothing.'}
|
|
46
46
|
</Notice>
|
|
47
47
|
</div>
|
|
48
48
|
);
|
|
@@ -119,7 +119,7 @@ function ConsiderRotating({ report, person }: { report: PrincipalReport; person:
|
|
|
119
119
|
<Card
|
|
120
120
|
labelledBy="seen-values"
|
|
121
121
|
title="Consider rotating"
|
|
122
|
-
description={`Values ${they} read or wrote that nobody has changed since
|
|
122
|
+
description={`Values ${they} read or wrote that nobody has changed since. Rotate each at its source, such as a new API key or database password, then save the new value here.`}
|
|
123
123
|
actions={
|
|
124
124
|
report.rotated > 0 && (
|
|
125
125
|
<span className="card-aside">{report.rotated} already rotated</span>
|
|
@@ -183,7 +183,7 @@ function MadeReferences({ report }: { report: PrincipalReport }) {
|
|
|
183
183
|
<Card
|
|
184
184
|
labelledBy="made-references"
|
|
185
185
|
title="References they made"
|
|
186
|
-
description="
|
|
186
|
+
description="These stay after they leave, and whoever reads a reference's environment reads its source through it. Review them: the source's access managers, or whoever writes where one is held, can break it."
|
|
187
187
|
>
|
|
188
188
|
<div className="dt-wrap">
|
|
189
189
|
<table className="dt stacks">
|
|
@@ -219,7 +219,7 @@ function IssuedTokens({ report }: { report: PrincipalReport }) {
|
|
|
219
219
|
<Card
|
|
220
220
|
labelledBy="issued-tokens"
|
|
221
221
|
title="Bearer tokens they issued"
|
|
222
|
-
description="
|
|
222
|
+
description="These still work, and they saw each one when it was issued. Revoke any they may have kept."
|
|
223
223
|
>
|
|
224
224
|
<div className="dt-wrap">
|
|
225
225
|
<table className="dt report-tokens">
|
|
@@ -320,8 +320,8 @@ function MemberApps({ principalId, apps }: { principalId: string; apps: Principa
|
|
|
320
320
|
<ConnectedAppsCard
|
|
321
321
|
apps={apps}
|
|
322
322
|
change={disconnectMemberApp(useCoffre(), memberRef('user', principalId))}
|
|
323
|
-
description="AI assistants and other MCP clients they connected.
|
|
324
|
-
empty="They have connected none.
|
|
323
|
+
description="AI assistants and other MCP clients they connected. Removing them disconnects every one."
|
|
324
|
+
empty="They have connected none."
|
|
325
325
|
/>
|
|
326
326
|
);
|
|
327
327
|
}
|
|
@@ -382,7 +382,7 @@ function EditAccess({
|
|
|
382
382
|
Edit access for <span className="mono">{principalId}</span>
|
|
383
383
|
</>
|
|
384
384
|
}
|
|
385
|
-
description={`Set what this ${kind} can reach on each project you manage, and until when
|
|
385
|
+
description={`Set what this ${kind} can reach on each project you manage, and until when.`}
|
|
386
386
|
wide
|
|
387
387
|
>
|
|
388
388
|
<form
|
|
@@ -141,7 +141,7 @@ export function MakeReference({
|
|
|
141
141
|
open={open}
|
|
142
142
|
onOpenChange={onOpenChange}
|
|
143
143
|
title={`Make ${holder.split('/')[2]} a reference`}
|
|
144
|
-
description={`Whoever can read ${holderEnvironment} will read the secret you name, as it changes, even without access to its project.
|
|
144
|
+
description={`Whoever can read ${holderEnvironment} will read the secret you name, as it changes, even without access to its project. You need read access to that secret.`}
|
|
145
145
|
>
|
|
146
146
|
<form
|
|
147
147
|
className="form"
|
|
@@ -204,7 +204,7 @@ export function ReferencesInto({ project }: { project: string }) {
|
|
|
204
204
|
<Card
|
|
205
205
|
labelledBy="references-into"
|
|
206
206
|
title="Also readable through references"
|
|
207
|
-
description={`Secrets of ${project} that
|
|
207
|
+
description={`Secrets of ${project} that references elsewhere read. Whoever reads a reference's environment reads its source, with no grant here.`}
|
|
208
208
|
>
|
|
209
209
|
<div className="dt-wrap">
|
|
210
210
|
<table className="dt stacks">
|
|
@@ -15,8 +15,8 @@ export function NotFound() {
|
|
|
15
15
|
</Link>
|
|
16
16
|
}
|
|
17
17
|
>
|
|
18
|
-
|
|
19
|
-
|
|
18
|
+
If you followed a link to a project or environment, it may have been renamed or
|
|
19
|
+
archived.
|
|
20
20
|
</ClosedDoor>
|
|
21
21
|
);
|
|
22
22
|
}
|
|
@@ -52,9 +52,8 @@ export function RouteError({ reset }: ErrorComponentProps) {
|
|
|
52
52
|
</>
|
|
53
53
|
}
|
|
54
54
|
>
|
|
55
|
-
coffre could not load
|
|
56
|
-
|
|
57
|
-
be unavailable.
|
|
55
|
+
coffre could not load this page, and nothing was read or written. If it keeps
|
|
56
|
+
happening, the service or its database may be down.
|
|
58
57
|
</ClosedDoor>
|
|
59
58
|
);
|
|
60
59
|
}
|
|
@@ -108,7 +108,7 @@ export function ServiceTokens({ serviceId, tokens }: { serviceId: string; tokens
|
|
|
108
108
|
</>
|
|
109
109
|
)}
|
|
110
110
|
.{' '}
|
|
111
|
-
Whatever uses it is refused
|
|
111
|
+
Whatever uses it is refused at once. Issue a new token first if the
|
|
112
112
|
service account should keep working.
|
|
113
113
|
</>
|
|
114
114
|
}
|
|
@@ -28,7 +28,7 @@ export function TrustedWorkloads({ serviceId, bindings }: { serviceId: string; b
|
|
|
28
28
|
<Card
|
|
29
29
|
labelledBy="trusted-workloads"
|
|
30
30
|
title="Sign in with OIDC"
|
|
31
|
-
description="
|
|
31
|
+
description="CI runs sign in as this service account with their platform's ID token, when it matches a trust binding. There is nothing to store, so prefer it wherever the CI supports it."
|
|
32
32
|
>
|
|
33
33
|
{bindings.length === 0 ? (
|
|
34
34
|
<EmptyState title="No trust bindings">
|
|
@@ -100,7 +100,7 @@ export function TrustedWorkloads({ serviceId, bindings }: { serviceId: string; b
|
|
|
100
100
|
It was last used <Timestamp iso={binding.lastUsedAt} display="relative" />.
|
|
101
101
|
</>
|
|
102
102
|
)}{' '}
|
|
103
|
-
|
|
103
|
+
To trust these runs again, add a new binding.
|
|
104
104
|
</>
|
|
105
105
|
}
|
|
106
106
|
confirmLabel="Remove binding"
|
|
@@ -264,7 +264,7 @@ function TrustWorkload({ serviceId }: { serviceId: string }) {
|
|
|
264
264
|
{field('Owner ID', 'ownerId', { mono: true })}
|
|
265
265
|
</div>
|
|
266
266
|
<p className="hint">
|
|
267
|
-
Bindings
|
|
267
|
+
Bindings use IDs, since a name can pass to someone else. For a private repository:{' '}
|
|
268
268
|
<span className="mono">gh api repos/{form.repository.trim() || 'acme/api'} --jq '.id, .owner.id'</span>
|
|
269
269
|
</p>
|
|
270
270
|
<ErrorLine error={lookup.error} />
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { ApprovalView } from '@coffre/client';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* What the approval page says once an approval no longer waits: its title,
|
|
5
|
+
* and what became of it. Approved with no outcome yet, coffre is making
|
|
6
|
+
* the change; a minute on with none, the server reports it failed, its
|
|
7
|
+
* outcome unknown, and the page says coffre doesn't know whether it was made.
|
|
8
|
+
*/
|
|
9
|
+
export function settled(view: Pick<ApprovalView, 'status' | 'outcome'>): { title: string; text: string } {
|
|
10
|
+
if (view.outcome?.error === 'unknown_outcome') {
|
|
11
|
+
return { title: 'This change may not have been made', text: "You approved it, but coffre doesn't know whether it was made. Check before approving it again." };
|
|
12
|
+
}
|
|
13
|
+
if (view.status === 'approved' && view.outcome === null) return { title: 'You approved this', text: 'coffre is making the change. Refresh in a moment to see how it went.' };
|
|
14
|
+
const title = {
|
|
15
|
+
pending: 'Waiting for you',
|
|
16
|
+
approved: 'You approved this',
|
|
17
|
+
denied: 'You denied this',
|
|
18
|
+
cancelled: 'The app cancelled this',
|
|
19
|
+
failed: 'This change failed',
|
|
20
|
+
expired: 'This approval expired',
|
|
21
|
+
}[view.status];
|
|
22
|
+
return { title, text: view.outcome?.text ?? (view.status === 'expired' ? 'Nothing changed. The app can ask again.' : 'Nothing changed.') };
|
|
23
|
+
}
|
|
@@ -321,6 +321,8 @@ const TEMPLATES: Record<string, Template> = {
|
|
|
321
321
|
'mcp.approve': { did: 'approved', tried: 'approve', what: ({ entry }) => tool(entry), then: ({ entry }) => [` for ${text(entry.metadata.clientName) ?? 'an app'}`] },
|
|
322
322
|
'mcp.deny': { did: 'turned down', tried: 'turn down', what: ({ entry }) => tool(entry), then: ({ entry }) => [` for ${text(entry.metadata.clientName) ?? 'an app'}`] },
|
|
323
323
|
'mcp.view': { did: 'opened an approval', tried: 'open an approval', what: () => [] },
|
|
324
|
+
// The app's prompt declined, which cancels the approval it would have opened.
|
|
325
|
+
'mcp.cancel': { did: 'cancelled', tried: 'cancel', what: ({ entry }) => tool(entry), then: ({ entry }) => via(entry) },
|
|
324
326
|
'mcp.disconnect': {
|
|
325
327
|
did: 'disconnected',
|
|
326
328
|
tried: 'disconnect',
|
|
@@ -427,6 +429,9 @@ const REASONS: Record<string, string> = {
|
|
|
427
429
|
too_many_approvals: 'too many changes waiting for approval',
|
|
428
430
|
request_state: 'its retry did not match its call',
|
|
429
431
|
changed: 'the change was not the one shown',
|
|
432
|
+
replaced: 'what it replaces changed since it was shown',
|
|
433
|
+
unconfirmed: 'what it replaces could not be read',
|
|
434
|
+
disconnected: 'the app was disconnected',
|
|
430
435
|
};
|
|
431
436
|
|
|
432
437
|
/** What a missing permission meant, from the app's `missing_<permission>`. */
|
package/src/pages/account.tsx
CHANGED
|
@@ -180,7 +180,7 @@ function SigninAccountsCard({
|
|
|
180
180
|
<Card
|
|
181
181
|
labelledBy="signin-accounts"
|
|
182
182
|
title="Sign-in accounts"
|
|
183
|
-
description="
|
|
183
|
+
description="You can sign in with any of these. Link another below."
|
|
184
184
|
>
|
|
185
185
|
{(linked !== undefined || message !== null) && (
|
|
186
186
|
<div className="card-body">
|
|
@@ -316,7 +316,7 @@ function Sessions({
|
|
|
316
316
|
<Card
|
|
317
317
|
labelledBy="sessions"
|
|
318
318
|
title="Sessions"
|
|
319
|
-
description="Browsers and command lines signed in as you.
|
|
319
|
+
description="Browsers and command lines signed in as you."
|
|
320
320
|
>
|
|
321
321
|
{sessions.length === 0 ? (
|
|
322
322
|
<EmptyState title="No sessions">Nothing is signed in as you right now.</EmptyState>
|
|
@@ -395,8 +395,8 @@ function Sessions({
|
|
|
395
395
|
</>
|
|
396
396
|
)}
|
|
397
397
|
, last active{' '}
|
|
398
|
-
<Timestamp iso={session.lastUsedAt ?? session.createdAt} display="relative" />,
|
|
399
|
-
signed out
|
|
398
|
+
<Timestamp iso={session.lastUsedAt ?? session.createdAt} display="relative" />, will be
|
|
399
|
+
signed out.
|
|
400
400
|
</>
|
|
401
401
|
}
|
|
402
402
|
confirmLabel="End session"
|
|
@@ -427,7 +427,7 @@ function ConnectAnApp({ url }: { url: string }) {
|
|
|
427
427
|
<Card
|
|
428
428
|
labelledBy="connect"
|
|
429
429
|
title="Connect an app"
|
|
430
|
-
description="Claude, or
|
|
430
|
+
description="Claude, or any other MCP client, connects at this address once you approve it."
|
|
431
431
|
>
|
|
432
432
|
<dl className="facts">
|
|
433
433
|
<Fact label="MCP URL">
|
|
@@ -465,8 +465,8 @@ function ConnectedApps() {
|
|
|
465
465
|
<ConnectedAppsCard
|
|
466
466
|
apps={apps.ok ? apps.apps : { error: apps.error }}
|
|
467
467
|
change={disconnectApp(client)}
|
|
468
|
-
description="
|
|
469
|
-
empty="
|
|
468
|
+
description="Every call an app makes is in the audit log."
|
|
469
|
+
empty="Apps you connect show here."
|
|
470
470
|
/>
|
|
471
471
|
);
|
|
472
472
|
}
|
package/src/pages/approval.tsx
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { useState } from 'react';
|
|
2
2
|
import type { ApprovalView, Decision } from '@coffre/client';
|
|
3
3
|
|
|
4
|
+
import { settled } from '../lib/approval';
|
|
4
5
|
import { failureMessage, statusOf, useCoffre } from '../lib/coffre';
|
|
5
6
|
import { ClosedDoor } from '../components/page';
|
|
6
7
|
import { CopyButton, ErrorLine, Notice, Spinner, Timestamp } from '../components/ui';
|
|
@@ -33,25 +34,16 @@ export function ApprovalPage() {
|
|
|
33
34
|
return <Approve view={view} onDecided={setDecided} />;
|
|
34
35
|
}
|
|
35
36
|
|
|
36
|
-
const SETTLED: Record<Exclude<ApprovalView['status'], 'pending'>, string> = {
|
|
37
|
-
approved: 'You approved this',
|
|
38
|
-
denied: 'You denied this',
|
|
39
|
-
cancelled: 'The app cancelled this',
|
|
40
|
-
failed: 'This change failed',
|
|
41
|
-
expired: 'This approval expired',
|
|
42
|
-
};
|
|
43
|
-
|
|
44
37
|
function Settled({ view }: { view: ApprovalView }) {
|
|
45
|
-
const
|
|
38
|
+
const { title, text } = settled(view);
|
|
46
39
|
return (
|
|
47
40
|
<ClosedDoor
|
|
48
|
-
icon={status === 'approved' ? <CheckCircle size={18} /> : <SlashCircle size={18} />}
|
|
41
|
+
icon={view.status === 'approved' ? <CheckCircle size={18} /> : <SlashCircle size={18} />}
|
|
49
42
|
label="Approve a change"
|
|
50
|
-
title={
|
|
43
|
+
title={title}
|
|
51
44
|
>
|
|
52
45
|
<p>
|
|
53
|
-
{view.client.name} asked to {view.summary}.{
|
|
54
|
-
{view.outcome?.text ?? (status === 'expired' ? 'Nothing changed. The app can ask again.' : 'Nothing changed.')}
|
|
46
|
+
{view.client.name} asked to {view.summary}. {text}
|
|
55
47
|
</p>
|
|
56
48
|
</ClosedDoor>
|
|
57
49
|
);
|
|
@@ -68,7 +60,7 @@ function Decided({ decision, reveal }: { decision: Decision; reveal: boolean })
|
|
|
68
60
|
{!(reveal && done) && <p>{decision.outcome.text}</p>}
|
|
69
61
|
{decision.shown.length > 0 && (
|
|
70
62
|
<>
|
|
71
|
-
<Notice tone="warn">{reveal ? 'Shown
|
|
63
|
+
<Notice tone="warn">{reveal ? 'Shown only to you, here. The app does not get it.' : 'Shown once, here only: copy it now. The app does not get it.'}</Notice>
|
|
72
64
|
<dl className="facts device-facts">
|
|
73
65
|
{decision.shown.map((line) => (
|
|
74
66
|
<div className="fact" key={line.label}>
|
|
@@ -82,7 +74,7 @@ function Decided({ decision, reveal }: { decision: Decision; reveal: boolean })
|
|
|
82
74
|
</dl>
|
|
83
75
|
</>
|
|
84
76
|
)}
|
|
85
|
-
<p>You can close this tab
|
|
77
|
+
<p>You can close this tab and go back to the app.</p>
|
|
86
78
|
</ClosedDoor>
|
|
87
79
|
);
|
|
88
80
|
}
|
|
@@ -103,6 +95,7 @@ function Approve({ view, onDecided }: { view: ApprovalView; onDecided: (decision
|
|
|
103
95
|
await coffre.approvals.decide(view.id, {
|
|
104
96
|
approve,
|
|
105
97
|
digest: view.digest,
|
|
98
|
+
basis: view.basis,
|
|
106
99
|
...(approve && asksValue !== null ? { value } : {}),
|
|
107
100
|
}),
|
|
108
101
|
);
|
|
@@ -121,8 +114,10 @@ function Approve({ view, onDecided }: { view: ApprovalView; onDecided: (decision
|
|
|
121
114
|
<p className="signin-lede">
|
|
122
115
|
{client.name} asks to <strong>{view.summary}</strong>.{' '}
|
|
123
116
|
{reveal
|
|
124
|
-
?
|
|
125
|
-
|
|
117
|
+
? view.reveals
|
|
118
|
+
? 'Reveal shows it to you, here. The app holds Reveal values, so it can read it too.'
|
|
119
|
+
: 'Reveal shows it only to you, here. The app never gets it.'
|
|
120
|
+
: 'Nothing changes until you approve.'}
|
|
126
121
|
</p>
|
|
127
122
|
</div>
|
|
128
123
|
|
|
@@ -141,8 +136,11 @@ function Approve({ view, onDecided }: { view: ApprovalView; onDecided: (decision
|
|
|
141
136
|
{view.details.map((line) => (
|
|
142
137
|
<div className="fact" key={line.label}>
|
|
143
138
|
<dt>{line.label}</dt>
|
|
144
|
-
<dd
|
|
145
|
-
{line.kind === '
|
|
139
|
+
<dd>
|
|
140
|
+
<span className={line.kind === 'mono' ? 'mono' : undefined}>
|
|
141
|
+
{line.kind === 'time' ? <Timestamp iso={line.value} /> : line.value}
|
|
142
|
+
</span>
|
|
143
|
+
{line.note !== undefined && <small className={line.warn === true ? 'approval-note approval-warn' : 'approval-note'}>{line.note}</small>}
|
|
146
144
|
</dd>
|
|
147
145
|
</div>
|
|
148
146
|
))}
|
|
@@ -172,6 +170,9 @@ function Approve({ view, onDecided }: { view: ApprovalView; onDecided: (decision
|
|
|
172
170
|
)}
|
|
173
171
|
|
|
174
172
|
<div className="consent-notices">
|
|
173
|
+
{!view.ready && (
|
|
174
|
+
<Notice tone="warn">coffre couldn't read what this change replaces, so it can't be approved yet. Reload to try again.</Notice>
|
|
175
|
+
)}
|
|
175
176
|
{client.registration === 'dcr' && (
|
|
176
177
|
<Notice tone="warn">This app registered itself: its name is its own claim. Approve only what you asked it to do.</Notice>
|
|
177
178
|
)}
|
|
@@ -185,7 +186,7 @@ function Approve({ view, onDecided }: { view: ApprovalView; onDecided: (decision
|
|
|
185
186
|
</button>
|
|
186
187
|
<button
|
|
187
188
|
className="btn btn-primary"
|
|
188
|
-
disabled={pending !== null || (asksValue !== null && value === '')}
|
|
189
|
+
disabled={pending !== null || !view.ready || (asksValue !== null && value === '')}
|
|
189
190
|
onClick={() => void decide(true)}
|
|
190
191
|
>
|
|
191
192
|
{pending === 'approve' && <Spinner />}
|
package/src/pages/audit.tsx
CHANGED
|
@@ -136,7 +136,7 @@ export function AuditPage() {
|
|
|
136
136
|
{shown.length === 0 ? (
|
|
137
137
|
<EmptyState title={deniedOnly ? 'No denials recorded' : 'Nothing recorded yet'}>
|
|
138
138
|
{deniedOnly
|
|
139
|
-
? '
|
|
139
|
+
? 'Nobody has been turned away.'
|
|
140
140
|
: 'The log fills as people read and write secrets and change who has access.'}
|
|
141
141
|
</EmptyState>
|
|
142
142
|
) : (
|
|
@@ -378,7 +378,7 @@ function ChainStatus({ chain, onRetry }: { chain: ChainResult | undefined; onRet
|
|
|
378
378
|
return (
|
|
379
379
|
<Toggletip
|
|
380
380
|
align="end"
|
|
381
|
-
label="
|
|
381
|
+
label="Only owners and root admins can check the log: it takes every entry, and you see only your projects'."
|
|
382
382
|
>
|
|
383
383
|
<button type="button" className="chain-note">
|
|
384
384
|
<Info size={14} />
|
|
@@ -393,7 +393,7 @@ function ChainStatus({ chain, onRetry }: { chain: ChainResult | undefined; onRet
|
|
|
393
393
|
<div className="chain">
|
|
394
394
|
<Toggletip
|
|
395
395
|
align="end"
|
|
396
|
-
label={`coffre could not check the log: ${chain.problem}. The entries below
|
|
396
|
+
label={`coffre could not check the log: ${chain.problem}. The entries below are unverified.`}
|
|
397
397
|
>
|
|
398
398
|
<button type="button" className="chain-flag chain-flag-warn">
|
|
399
399
|
<AlertTriangle size={14} />
|
|
@@ -32,9 +32,8 @@ export function DevicePage() {
|
|
|
32
32
|
return (
|
|
33
33
|
<ClosedDoor icon={<SlashCircle size={18} />} label="coffre CLI" title="Sign-in refused">
|
|
34
34
|
<p>
|
|
35
|
-
The terminal
|
|
36
|
-
|
|
37
|
-
in the audit log.
|
|
35
|
+
The terminal gets nothing. If you did not run <span className="mono">coffre login</span>{' '}
|
|
36
|
+
yourself, someone may be trying to get you to approve theirs.
|
|
38
37
|
</p>
|
|
39
38
|
</ClosedDoor>
|
|
40
39
|
);
|
|
@@ -134,8 +133,7 @@ function Approve({
|
|
|
134
133
|
</h1>
|
|
135
134
|
<p className="signin-lede">
|
|
136
135
|
Only if you just ran <span className="mono">coffre login</span> yourself and it shows
|
|
137
|
-
this code. It gets your access
|
|
138
|
-
from your account page.
|
|
136
|
+
this code. It gets your access for {sessionDays} days.
|
|
139
137
|
</p>
|
|
140
138
|
</div>
|
|
141
139
|
|
|
@@ -450,8 +450,8 @@ function EnvironmentLedger({
|
|
|
450
450
|
{active.length === 0 && drafts.length === 0 ? (
|
|
451
451
|
<EmptyState title="No secrets yet">
|
|
452
452
|
{canWrite
|
|
453
|
-
? 'Add them one by one, or import
|
|
454
|
-
: '
|
|
453
|
+
? 'Add them one by one, or import a .env file.'
|
|
454
|
+
: 'Adding secrets here needs secret.write.'}
|
|
455
455
|
</EmptyState>
|
|
456
456
|
) : (
|
|
457
457
|
<div className="dt-wrap">
|
|
@@ -1409,7 +1409,7 @@ function DraftRow({
|
|
|
1409
1409
|
{(keyProblem !== null || isNewVersion) && (
|
|
1410
1410
|
<span className={`edit-note${keyProblem !== null ? ' edit-note-error' : ''}`}>
|
|
1411
1411
|
{keyProblem ??
|
|
1412
|
-
'This name
|
|
1412
|
+
'This name exists here already. Saving adds a new version to it.'}
|
|
1413
1413
|
</span>
|
|
1414
1414
|
)}
|
|
1415
1415
|
</div>
|
|
@@ -1683,13 +1683,11 @@ function VersionHistory({
|
|
|
1683
1683
|
}
|
|
1684
1684
|
body={
|
|
1685
1685
|
<>
|
|
1686
|
-
|
|
1687
|
-
or deleted, every version stays readable, and the next write
|
|
1688
|
-
continues the numbering forward. Anything reading{' '}
|
|
1686
|
+
v{version.version} becomes current, and anything reading{' '}
|
|
1689
1687
|
<span className="mono">
|
|
1690
1688
|
{project}/{environment}
|
|
1691
1689
|
</span>{' '}
|
|
1692
|
-
|
|
1690
|
+
gets it at once. Every version stays.
|
|
1693
1691
|
</>
|
|
1694
1692
|
}
|
|
1695
1693
|
confirmLabel={`Roll back to v${version.version}`}
|
|
@@ -1725,9 +1723,6 @@ function VersionHistory({
|
|
|
1725
1723
|
<ErrorLine error={error} />
|
|
1726
1724
|
</div>
|
|
1727
1725
|
)}
|
|
1728
|
-
<p className="history-note">
|
|
1729
|
-
Metadata only. Listing versions decrypts nothing.
|
|
1730
|
-
</p>
|
|
1731
1726
|
</div>
|
|
1732
1727
|
);
|
|
1733
1728
|
}
|
|
@@ -1829,10 +1824,8 @@ function ImportEnv({ project, environment }: { project: string; environment: str
|
|
|
1829
1824
|
wide
|
|
1830
1825
|
description={
|
|
1831
1826
|
<>
|
|
1832
|
-
Paste a .env file.
|
|
1833
|
-
|
|
1834
|
-
than guessed at. coffre compares it with the current values without sending any
|
|
1835
|
-
to this page.
|
|
1827
|
+
Paste a .env file. coffre parses it as the CLI does and compares it with the current
|
|
1828
|
+
values, without sending them to this page.
|
|
1836
1829
|
</>
|
|
1837
1830
|
}
|
|
1838
1831
|
>
|
|
@@ -1881,7 +1874,7 @@ function ImportEnv({ project, environment }: { project: string; environment: str
|
|
|
1881
1874
|
)}
|
|
1882
1875
|
|
|
1883
1876
|
{plan !== null && plan.entries.length > 0 && changes.length === 0 && (
|
|
1884
|
-
<Notice tone="good">Every key already has this value
|
|
1877
|
+
<Notice tone="good">Every key already has this value.</Notice>
|
|
1885
1878
|
)}
|
|
1886
1879
|
|
|
1887
1880
|
{problems.length > 0 && (
|