@coffre/ui 0.15.0 → 0.16.1
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/audit-sentences.d.ts +56 -0
- package/dist/audit-sentences.js +886 -0
- package/dist/audit-sentences.js.map +1 -0
- package/dist/chunks/audit-sentence-C8NnAdjF.js +48 -0
- package/dist/chunks/audit-sentence-C8NnAdjF.js.map +1 -0
- package/dist/chunks/{connected-apps-CGUQlFMx.js → connected-apps-6sMSgQ9U.js} +5 -5
- package/dist/chunks/{connected-apps-CGUQlFMx.js.map → connected-apps-6sMSgQ9U.js.map} +1 -1
- package/dist/chunks/{delete-place-CswZ-meh.js → delete-place-T469tSN9.js} +5 -5
- package/dist/chunks/{delete-place-CswZ-meh.js.map → delete-place-T469tSN9.js.map} +1 -1
- package/dist/chunks/{directory-DrswWQLT.js → directory-B_gVf7UL.js} +18 -17
- package/dist/chunks/directory-B_gVf7UL.js.map +1 -0
- package/dist/chunks/{folders-A6sbR_PG.js → folders-CVYauIDz.js} +3 -3
- package/dist/chunks/{folders-A6sbR_PG.js.map → folders-CVYauIDz.js.map} +1 -1
- package/dist/chunks/{grants-C0cb2oii.js → grants-Dn_EW2XW.js} +8 -8
- package/dist/chunks/grants-Dn_EW2XW.js.map +1 -0
- package/dist/chunks/{multi-combobox-B3SEv1gq.js → multi-combobox-fbBRzi9z.js} +3 -3
- package/dist/chunks/{multi-combobox-B3SEv1gq.js.map → multi-combobox-fbBRzi9z.js.map} +1 -1
- package/dist/chunks/{offboarding-C1jbG_dk.js → offboarding-CXM464J_.js} +81 -80
- package/dist/chunks/offboarding-CXM464J_.js.map +1 -0
- package/dist/chunks/{page-CfhC9Hp1.js → page-Cb0ZjGda.js} +7 -12
- package/dist/chunks/page-Cb0ZjGda.js.map +1 -0
- package/dist/chunks/{personal-tokens-xC9wulhg.js → personal-tokens-CSHMlRHy.js} +7 -7
- package/dist/chunks/personal-tokens-CSHMlRHy.js.map +1 -0
- package/dist/chunks/{principal-CI17XK13.js → principal-BKJxbAtE.js} +2 -2
- package/dist/chunks/{principal-CI17XK13.js.map → principal-BKJxbAtE.js.map} +1 -1
- package/dist/chunks/{principal-page-CdSeftGD.js → principal-page-COPmTDVW.js} +132 -19
- package/dist/chunks/principal-page-COPmTDVW.js.map +1 -0
- package/dist/chunks/{project-page-CHxjBE97.js → project-page-g5_n46Nz.js} +3 -3
- package/dist/chunks/{project-page-CHxjBE97.js.map → project-page-g5_n46Nz.js.map} +1 -1
- package/dist/chunks/protected-DEWeOrmI.js +77 -0
- package/dist/chunks/protected-DEWeOrmI.js.map +1 -0
- package/dist/chunks/{queries-D1JuimTu.js → queries-D4_o-bz3.js} +22 -155
- package/dist/chunks/queries-D4_o-bz3.js.map +1 -0
- package/dist/chunks/{references-D5llUGQL.js → references-wTh_DT0M.js} +27 -23
- package/dist/chunks/references-wTh_DT0M.js.map +1 -0
- package/dist/chunks/{role-field-CoCv8wse.js → role-field-BiP09qfN.js} +5 -5
- package/dist/chunks/role-field-BiP09qfN.js.map +1 -0
- package/dist/chunks/{row-state-CYH7kZHl.js → row-state-CYhtmUkc.js} +3 -3
- package/dist/chunks/{row-state-CYH7kZHl.js.map → row-state-CYhtmUkc.js.map} +1 -1
- package/dist/chunks/{signin-errors-TlQmQe0t.js → signin-errors-BMnox7XD.js} +5 -19
- package/dist/chunks/signin-errors-BMnox7XD.js.map +1 -0
- package/dist/chunks/{theme-rF44Wbmm.js → theme-imSolE1q.js} +3 -3
- package/dist/chunks/{theme-rF44Wbmm.js.map → theme-imSolE1q.js.map} +1 -1
- package/dist/chunks/{ui-CGdORVzW.js → ui-Q_Eczt7m.js} +7 -3
- package/dist/chunks/{ui-CGdORVzW.js.map → ui-Q_Eczt7m.js.map} +1 -1
- package/dist/chunks/{use-action-BxrHTBZw.js → use-action-BfnN-De2.js} +3 -3
- package/dist/chunks/{use-action-BxrHTBZw.js.map → use-action-BfnN-De2.js.map} +1 -1
- package/dist/chunks/{use-change-BorW2R6C.js → use-change-Cc0X4sF3.js} +6 -4
- package/dist/chunks/use-change-Cc0X4sF3.js.map +1 -0
- package/dist/chunks/{use-roles-BZnJ9Cq0.js → use-roles-stcv2QFj.js} +13 -56
- package/dist/chunks/use-roles-stcv2QFj.js.map +1 -0
- package/dist/chunks/{use-shell-CPskgi1k.js → use-shell-DMhLa2sh.js} +3 -3
- package/dist/chunks/{use-shell-CPskgi1k.js.map → use-shell-DMhLa2sh.js.map} +1 -1
- package/dist/index.d.ts +23 -55
- package/dist/index.js +12 -31
- package/dist/index.js.map +1 -1
- package/dist/pages/account.js +12 -12
- package/dist/pages/account.js.map +1 -1
- package/dist/pages/approval.js +2 -2
- package/dist/pages/audit.js +173 -196
- package/dist/pages/audit.js.map +1 -1
- package/dist/pages/device-login.js +2 -2
- package/dist/pages/environment.js +445 -252
- package/dist/pages/environment.js.map +1 -1
- package/dist/pages/login.js +6 -15
- package/dist/pages/login.js.map +1 -1
- package/dist/pages/oauth-authorize.js +2 -2
- package/dist/pages/project-access.js +11 -11
- package/dist/pages/project-environments.js +359 -28
- package/dist/pages/project-environments.js.map +1 -1
- package/dist/pages/project-settings.js +8 -8
- package/dist/pages/project.js +3 -3
- package/dist/pages/projects.js +8 -8
- package/dist/pages/service-account.js +19 -16
- package/dist/pages/service-account.js.map +1 -1
- package/dist/pages/service-accounts.js +6 -7
- package/dist/pages/service-accounts.js.map +1 -1
- package/dist/pages/settings.d.ts +1 -6
- package/dist/pages/settings.js +155 -286
- package/dist/pages/settings.js.map +1 -1
- package/dist/pages/unregistered.js +2 -2
- package/dist/pages/user.js +7 -8
- package/dist/pages/user.js.map +1 -1
- package/dist/pages/users.js +6 -7
- package/dist/pages/users.js.map +1 -1
- package/package.json +8 -3
- package/src/components/actions-log.tsx +8 -61
- package/src/components/directory.tsx +10 -9
- package/src/components/grants.tsx +2 -2
- package/src/components/icons.tsx +0 -2
- package/src/components/offboarding.tsx +9 -16
- package/src/components/page.tsx +2 -3
- package/src/components/personal-tokens.tsx +5 -2
- package/src/components/principal-page.tsx +5 -4
- package/src/components/protected.tsx +39 -52
- package/src/components/references.tsx +18 -7
- package/src/components/role-editor.tsx +68 -99
- package/src/components/role-field.tsx +1 -1
- package/src/components/trusted-workloads.tsx +6 -5
- package/src/components/ui.tsx +5 -0
- package/src/lib/audit-proofs.ts +51 -0
- package/src/lib/audit-sentences.ts +490 -529
- package/src/lib/bindings.ts +6 -0
- package/src/lib/changes.ts +3 -1
- package/src/lib/coffre.ts +2 -2
- package/src/lib/queries.ts +19 -168
- package/src/lib/reveal.ts +32 -5
- package/src/lib/roles.ts +10 -36
- package/src/lib/row-reads.ts +2 -2
- package/src/lib/signin-errors.ts +5 -33
- package/src/options.ts +3 -19
- package/src/pages/account.tsx +1 -1
- package/src/pages/audit.tsx +151 -228
- package/src/pages/environment.tsx +373 -247
- package/src/pages/login.tsx +2 -4
- package/src/pages/project-environments.tsx +322 -20
- package/src/pages/service-accounts.tsx +1 -1
- package/src/pages/settings.tsx +49 -134
- package/src/pages/user.tsx +2 -2
- package/src/pages/users.tsx +1 -1
- package/src/parity.ts +11 -20
- package/src/styles/globals.css +107 -273
- package/dist/chunks/actions-log-DupYCEyV.js +0 -1134
- package/dist/chunks/actions-log-DupYCEyV.js.map +0 -1
- package/dist/chunks/directory-DrswWQLT.js.map +0 -1
- package/dist/chunks/environment-actions-8rL9Cw6X.js +0 -576
- package/dist/chunks/environment-actions-8rL9Cw6X.js.map +0 -1
- package/dist/chunks/grants-C0cb2oii.js.map +0 -1
- package/dist/chunks/offboarding-C1jbG_dk.js.map +0 -1
- package/dist/chunks/page-CfhC9Hp1.js.map +0 -1
- package/dist/chunks/personal-tokens-xC9wulhg.js.map +0 -1
- package/dist/chunks/principal-page-CdSeftGD.js.map +0 -1
- package/dist/chunks/queries-D1JuimTu.js.map +0 -1
- package/dist/chunks/references-D5llUGQL.js.map +0 -1
- package/dist/chunks/role-field-CoCv8wse.js.map +0 -1
- package/dist/chunks/signin-errors-TlQmQe0t.js.map +0 -1
- package/dist/chunks/use-change-BorW2R6C.js.map +0 -1
- package/dist/chunks/use-roles-BZnJ9Cq0.js.map +0 -1
- package/src/components/environment-actions.tsx +0 -508
package/src/pages/settings.tsx
CHANGED
|
@@ -5,80 +5,22 @@ import { useSuspenseQuery } from '@tanstack/react-query';
|
|
|
5
5
|
import { Link } from '@tanstack/react-router';
|
|
6
6
|
import { toast } from 'sonner';
|
|
7
7
|
import { useCoffre } from '../lib/coffre';
|
|
8
|
-
import { pageRoute } from '../lib/page-route';
|
|
9
8
|
import { affects, queries } from '../lib/queries';
|
|
10
9
|
import { useAction } from '../lib/use-action';
|
|
11
10
|
import { useShell } from '../lib/use-shell';
|
|
12
11
|
import { Card, Fact, PageHeader } from '../components/page';
|
|
13
12
|
import { ScopeField } from '../components/role-field';
|
|
14
13
|
import { RolesSettings } from '../components/role-editor';
|
|
15
|
-
import { PageTabs } from '../components/tabs';
|
|
16
14
|
import { ErrorLine, Modal, Spinner, Toggletip } from '../components/ui';
|
|
17
|
-
import { Info,
|
|
18
|
-
import type { settings as settingsRoute } from '../options';
|
|
15
|
+
import { Info, Pencil } from '../components/icons';
|
|
19
16
|
|
|
20
|
-
|
|
17
|
+
/** The instance's settings. Your own are under Account, at the sidebar's foot. */
|
|
21
18
|
|
|
22
|
-
/**
|
|
23
|
-
* The instance's settings, a tab each: General, the instance and who
|
|
24
|
-
* creates service accounts; Roles, the project roles or the global ones;
|
|
25
|
-
* Keys, for whoever runs the instance. Your own settings are under
|
|
26
|
-
* Account, at the sidebar's foot.
|
|
27
|
-
*/
|
|
28
19
|
export function SettingsPage() {
|
|
29
|
-
const { tab, roles } = Route.useSearch();
|
|
30
|
-
const { capabilities } = useShell();
|
|
31
|
-
// One route, its tab in the search: a link is current only for its own search, but Roles for either of its two.
|
|
32
|
-
const current = { exact: true, includeSearch: true } as const;
|
|
33
|
-
return (
|
|
34
|
-
<>
|
|
35
|
-
<PageHeader title="Settings" />
|
|
36
|
-
<PageTabs label="Settings sections">
|
|
37
|
-
{[
|
|
38
|
-
<Link key="general" to="/settings" search={{}} activeOptions={current}>
|
|
39
|
-
<Settings size={15} />
|
|
40
|
-
General
|
|
41
|
-
</Link>,
|
|
42
|
-
<Link key="roles" to="/settings" search={{ tab: 'roles' }} activeOptions={{ includeSearch: true }}>
|
|
43
|
-
<ShieldCheck size={15} />
|
|
44
|
-
Roles
|
|
45
|
-
</Link>,
|
|
46
|
-
capabilities.runsInstance && (
|
|
47
|
-
<Link key="keys" to="/settings" search={{ tab: 'keys' }} activeOptions={current}>
|
|
48
|
-
<Key size={15} />
|
|
49
|
-
Keys
|
|
50
|
-
</Link>
|
|
51
|
-
),
|
|
52
|
-
]}
|
|
53
|
-
</PageTabs>
|
|
54
|
-
{tab === undefined ? (
|
|
55
|
-
<General />
|
|
56
|
-
) : tab === 'keys' ? (
|
|
57
|
-
<KeysTab />
|
|
58
|
-
) : (
|
|
59
|
-
<RolesSettings
|
|
60
|
-
kind={roles === 'global' ? 'instance-role' : 'role'}
|
|
61
|
-
switcher={
|
|
62
|
-
<nav className="segmented" aria-label="Roles">
|
|
63
|
-
<Link to="/settings" search={{ tab: 'roles' }} activeOptions={current}>
|
|
64
|
-
Project roles
|
|
65
|
-
</Link>
|
|
66
|
-
<Link to="/settings" search={{ tab: 'roles', roles: 'global' }} activeOptions={current}>
|
|
67
|
-
Global roles
|
|
68
|
-
</Link>
|
|
69
|
-
</nav>
|
|
70
|
-
}
|
|
71
|
-
/>
|
|
72
|
-
)}
|
|
73
|
-
</>
|
|
74
|
-
);
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
/** The instance, as its deployment set it up, and who creates service accounts. */
|
|
78
|
-
function General() {
|
|
79
20
|
const { auth, capabilities } = useShell();
|
|
80
21
|
const client = useCoffre();
|
|
81
22
|
const { data: directory } = useSuspenseQuery(queries.directory(client, capabilities.canManageGrants));
|
|
23
|
+
const { data: keys } = useSuspenseQuery(queries.auditKeys(client, capabilities.runsInstance));
|
|
82
24
|
const { data: settings } = useSuspenseQuery(queries.settings(client, capabilities.runsInstance));
|
|
83
25
|
const providers = auth?.signin?.providers.map((provider) => provider.label) ?? [];
|
|
84
26
|
|
|
@@ -88,6 +30,8 @@ function General() {
|
|
|
88
30
|
|
|
89
31
|
return (
|
|
90
32
|
<>
|
|
33
|
+
<PageHeader title="Settings" />
|
|
34
|
+
|
|
91
35
|
<Card
|
|
92
36
|
labelledBy="instance"
|
|
93
37
|
title="Instance"
|
|
@@ -111,40 +55,35 @@ function General() {
|
|
|
111
55
|
</span>
|
|
112
56
|
</Fact>
|
|
113
57
|
{principals !== null && (
|
|
114
|
-
|
|
115
|
-
<
|
|
116
|
-
<
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
58
|
+
<>
|
|
59
|
+
<Fact label="Directory">
|
|
60
|
+
<span>
|
|
61
|
+
<Link to="/users">
|
|
62
|
+
{users} user{users === 1 ? '' : 's'}
|
|
63
|
+
</Link>
|
|
64
|
+
{' · '}
|
|
65
|
+
<Link to="/service-accounts">
|
|
66
|
+
{tokens} service account{tokens === 1 ? '' : 's'}
|
|
67
|
+
</Link>
|
|
68
|
+
</span>
|
|
69
|
+
</Fact>
|
|
70
|
+
</>
|
|
125
71
|
)}
|
|
126
72
|
</dl>
|
|
127
73
|
</Card>
|
|
74
|
+
|
|
75
|
+
<RolesSettings />
|
|
128
76
|
{settings?.ok === true && <ServiceSetup scope={settings.serviceAccounts} />}
|
|
77
|
+
{keys?.ok === true && <Keys keys={keys} />}
|
|
129
78
|
</>
|
|
130
79
|
);
|
|
131
80
|
}
|
|
132
81
|
|
|
133
82
|
/**
|
|
134
|
-
* Who
|
|
135
|
-
*
|
|
136
|
-
*
|
|
83
|
+
* Who sets up service accounts without running the instance: anyone who
|
|
84
|
+
* holds access, inside this scope, giving one at most what they hold there.
|
|
85
|
+
* Narrowed, the rest takes an Admin whose own scope reaches it.
|
|
137
86
|
*/
|
|
138
|
-
function serviceSetupInWords(scope: Scope): string {
|
|
139
|
-
if (unscoped(scope)) return 'Anyone with access, in every project and environment';
|
|
140
|
-
const { projects, environments } = scope;
|
|
141
|
-
if ((projects !== 'all' && 'only' in projects && projects.only.length === 0) || (environments !== 'all' && 'only' in environments && environments.only.length === 0)) {
|
|
142
|
-
return 'Admins only';
|
|
143
|
-
}
|
|
144
|
-
const where = scopeInWords(scope);
|
|
145
|
-
return `Anyone with access, in ${where.charAt(0).toLowerCase()}${where.slice(1)}; elsewhere, Admins`;
|
|
146
|
-
}
|
|
147
|
-
|
|
148
87
|
function ServiceSetup({ scope }: { scope: Scope }) {
|
|
149
88
|
const client = useCoffre();
|
|
150
89
|
const [open, setOpen] = useState(false);
|
|
@@ -156,25 +95,27 @@ function ServiceSetup({ scope }: { scope: Scope }) {
|
|
|
156
95
|
setError(null);
|
|
157
96
|
};
|
|
158
97
|
return (
|
|
159
|
-
<Card
|
|
98
|
+
<Card
|
|
99
|
+
labelledBy="service-setup"
|
|
100
|
+
title="Service accounts"
|
|
101
|
+
description="Anyone who holds access sets up service accounts for CI where this lets them: the account, its tokens and its OIDC trust, giving it at most what they hold. Elsewhere, an Admin whose scope reaches it does."
|
|
102
|
+
actions={
|
|
103
|
+
<button className="btn" type="button" onClick={() => setOpen(true)}>
|
|
104
|
+
<Pencil size={14} />
|
|
105
|
+
Edit
|
|
106
|
+
</button>
|
|
107
|
+
}
|
|
108
|
+
>
|
|
160
109
|
<dl className="facts">
|
|
161
|
-
<Fact
|
|
162
|
-
|
|
163
|
-
action={
|
|
164
|
-
<button className="btn btn-sm" type="button" onClick={() => setOpen(true)} aria-label="Edit who creates service accounts">
|
|
165
|
-
<Pencil size={14} />
|
|
166
|
-
Edit
|
|
167
|
-
</button>
|
|
168
|
-
}
|
|
169
|
-
>
|
|
170
|
-
<span>{serviceSetupInWords(scope)}</span>
|
|
110
|
+
<Fact label="Set up by people in">
|
|
111
|
+
<span>{unscoped(scope) ? 'Every project and environment' : scopeInWords(scope)}</span>
|
|
171
112
|
</Fact>
|
|
172
113
|
</dl>
|
|
173
114
|
<Modal
|
|
174
115
|
open={open}
|
|
175
116
|
onOpenChange={(next) => (next ? setOpen(true) : close())}
|
|
176
|
-
title="Who
|
|
177
|
-
description="
|
|
117
|
+
title="Who sets up service accounts"
|
|
118
|
+
description="People set up service accounts, and give them what they hold, in these projects and environments. All except prod keeps prod's to Admins."
|
|
178
119
|
>
|
|
179
120
|
<form
|
|
180
121
|
className="form"
|
|
@@ -183,7 +124,7 @@ function ServiceSetup({ scope }: { scope: Scope }) {
|
|
|
183
124
|
run(() => client.settings.set({ serviceAccounts: draft }), {
|
|
184
125
|
affects: affects.settings(),
|
|
185
126
|
onSuccess: () => {
|
|
186
|
-
toast.success('Saved
|
|
127
|
+
toast.success('Saved where people set up service accounts');
|
|
187
128
|
setOpen(false);
|
|
188
129
|
setError(null);
|
|
189
130
|
},
|
|
@@ -207,62 +148,36 @@ function ServiceSetup({ scope }: { scope: Scope }) {
|
|
|
207
148
|
);
|
|
208
149
|
}
|
|
209
150
|
|
|
210
|
-
function KeysTab() {
|
|
211
|
-
const { capabilities } = useShell();
|
|
212
|
-
const { data: keys } = useSuspenseQuery(queries.auditKeys(useCoffre(), capabilities.runsInstance));
|
|
213
|
-
if (keys === null) return null;
|
|
214
|
-
return keys.ok ? <Keys keys={keys} /> : <ErrorLine error={`The keys could not be read. ${keys.error}`} />;
|
|
215
|
-
}
|
|
216
|
-
|
|
217
|
-
/** Where a vault key is kept, in words: the deployment's own, or a key service's. */
|
|
218
|
-
function keptIn(provider: string): string {
|
|
219
|
-
if (provider === 'local') return "kept in the deployment's configuration";
|
|
220
|
-
if (provider === 'aws-kms') return 'kept in AWS KMS';
|
|
221
|
-
return `kept in ${provider}`;
|
|
222
|
-
}
|
|
223
|
-
|
|
224
|
-
/** A key's identifier by its end, `…3f9a2c`, enough to tell it from another; the whole of it a hover away. */
|
|
225
|
-
function KeyId({ id }: { id: string }) {
|
|
226
|
-
return (
|
|
227
|
-
<span className="mono" title={id}>
|
|
228
|
-
{id.length <= 8 ? id : `…${id.slice(-6)}`}
|
|
229
|
-
</span>
|
|
230
|
-
);
|
|
231
|
-
}
|
|
232
|
-
|
|
233
151
|
/**
|
|
234
152
|
* What the keys you keep are checked against: no secret, so shown. The keys
|
|
235
153
|
* themselves are checked by `coffre verify keys`, on your machine: a vault
|
|
236
154
|
* key typed into a web page would be within reach of everything running in it.
|
|
237
155
|
*/
|
|
238
156
|
function Keys({ keys }: { keys: RouteOutput<'GET /audit/keys'> }) {
|
|
239
|
-
const {
|
|
240
|
-
const replaced = new Set(checks.map((check) => check.vaultId).filter((id) => id !== current.vaultId)).size;
|
|
157
|
+
const { kek, previous } = keys;
|
|
241
158
|
return (
|
|
242
159
|
<Card
|
|
243
160
|
labelledBy="keys"
|
|
244
161
|
title="Keys"
|
|
245
162
|
description={
|
|
246
163
|
<>
|
|
247
|
-
To check
|
|
164
|
+
To check the vault key you keep, or the signing key you gave the vault, run <code>coffre verify keys</code>.
|
|
165
|
+
It reads the key on your machine and sends it nowhere.
|
|
248
166
|
</>
|
|
249
167
|
}
|
|
250
168
|
>
|
|
251
169
|
<dl className="facts">
|
|
170
|
+
<Fact label="Vault ID">
|
|
171
|
+
<span className="mono">{kek.id}</span>
|
|
172
|
+
</Fact>
|
|
252
173
|
<Fact label="Vault key">
|
|
253
174
|
<span>
|
|
254
|
-
|
|
175
|
+
Held by <span className="mono">{kek.provider}</span>
|
|
176
|
+
{previous.length > 0 && `; ${previous.length} earlier vault key${previous.length === 1 ? '' : 's'} still unwrapping what ${previous.length === 1 ? 'it' : 'they'} wrapped`}
|
|
255
177
|
</span>
|
|
256
|
-
{replaced > 0 && (
|
|
257
|
-
<span className="muted">
|
|
258
|
-
{replaced} earlier vault key{replaced === 1 ? '' : 's'} still checkable
|
|
259
|
-
</span>
|
|
260
|
-
)}
|
|
261
|
-
</Fact>
|
|
262
|
-
<Fact label="App key">
|
|
263
|
-
<KeyId id={keys.app.keyId} />
|
|
264
178
|
</Fact>
|
|
265
179
|
</dl>
|
|
266
180
|
</Card>
|
|
267
181
|
);
|
|
268
182
|
}
|
|
183
|
+
|
package/src/pages/user.tsx
CHANGED
|
@@ -27,8 +27,8 @@ export function UserAppsPage() {
|
|
|
27
27
|
const client = useCoffre();
|
|
28
28
|
const member = memberRef('user', Route.useParams().user);
|
|
29
29
|
const { data: report } = useSuspenseQuery(queries.report(client, member, useShell().capabilities.runsInstance));
|
|
30
|
-
// Their layout says why there is no report.
|
|
31
|
-
if (report?.ok !== true || report.report === null) return null;
|
|
30
|
+
// Their layout says why there is no report, or no tab where it lists no apps.
|
|
31
|
+
if (report?.ok !== true || report.report === null || report.report.apps === null) return null;
|
|
32
32
|
return (
|
|
33
33
|
<ConnectedAppsCard
|
|
34
34
|
apps={report.report.apps}
|
package/src/pages/users.tsx
CHANGED
|
@@ -30,7 +30,7 @@ export function UsersPage() {
|
|
|
30
30
|
principals={users}
|
|
31
31
|
hasRemoved={result.removed.some((principal) => principal.principalType === 'user')}
|
|
32
32
|
/>
|
|
33
|
-
<RemovedList principalType="user" removed={result.removed}
|
|
33
|
+
<RemovedList principalType="user" removed={result.removed} />
|
|
34
34
|
</>
|
|
35
35
|
);
|
|
36
36
|
}
|
package/src/parity.ts
CHANGED
|
@@ -47,22 +47,17 @@ export const UI_PARITY: { [K in RouteKey]: Reach } = {
|
|
|
47
47
|
],
|
|
48
48
|
},
|
|
49
49
|
'PUT /projects/:project/:environment': {
|
|
50
|
-
ui: [
|
|
51
|
-
{ does: 'a project › Environments › Add environment, empty, inheriting, a copy or references', in: 'components/environment-actions.tsx', call: 'environments.create' },
|
|
52
|
-
{ does: "an environment › ⋯ › Fork…, the same dialog, inheriting from it", in: 'components/environment-actions.tsx', call: 'environments.create' },
|
|
53
|
-
{ does: "an environment › ⋯ › My own dev › Make my own dev", in: 'pages/environment.tsx', call: 'environments.create' },
|
|
54
|
-
],
|
|
50
|
+
ui: [{ does: 'a project › Environments › Add environment, empty, inheriting, a copy or references', in: 'pages/project-environments.tsx', call: 'environments.create' }],
|
|
55
51
|
},
|
|
56
52
|
'PATCH /projects/:project/:environment': {
|
|
57
53
|
ui: [
|
|
58
|
-
{ does: "an environment's card
|
|
59
|
-
{ does: "an environment's card
|
|
54
|
+
{ does: "an environment's card › ⋯ › Rename, Archive…, Restore", in: 'pages/project-environments.tsx', call: 'environments.update' },
|
|
55
|
+
{ does: "an environment's card › ⋯ › Protect…, and for an Owner of its project Unprotect…", in: 'pages/project-environments.tsx', call: 'environments.protect' },
|
|
60
56
|
],
|
|
61
57
|
},
|
|
62
58
|
'DELETE /projects/:project/:environment': {
|
|
63
59
|
ui: [
|
|
64
60
|
{ does: "an archived environment's card › ⋯ › Delete…, its path typed out", in: 'components/delete-place.tsx', call: 'environments.delete' },
|
|
65
|
-
{ does: 'your own dev, `dev@me`, its card or page › ⋯ › Delete…', in: 'components/environment-actions.tsx', call: 'environments.delete' },
|
|
66
61
|
{ does: 'the same dialog: what deleting would erase and revoke', in: 'lib/queries.ts', call: 'environments.previewDelete' },
|
|
67
62
|
],
|
|
68
63
|
},
|
|
@@ -84,14 +79,14 @@ export const UI_PARITY: { [K in RouteKey]: Reach } = {
|
|
|
84
79
|
'GET /secrets/:project/:environment': { ui: [{ does: 'an environment: its secrets', in: 'pages/environment.tsx', call: 'secrets.list' }] },
|
|
85
80
|
'PATCH /secrets/:project/:environment': {
|
|
86
81
|
ui: [
|
|
87
|
-
{ does: 'an environment › Add secret, Edit, then Save
|
|
82
|
+
{ does: 'an environment › Add secret, Edit, then Save', in: 'pages/environment.tsx', call: 'secrets.set' },
|
|
88
83
|
{ does: 'an environment › Import .env, after its plan', in: 'pages/environment.tsx', call: 'secrets.set' },
|
|
89
84
|
{ does: 'a secret › ⋯ › Who sees it, stricter: at once, its value kept', in: 'pages/environment.tsx', call: 'secrets.set' },
|
|
90
85
|
],
|
|
91
86
|
},
|
|
92
87
|
'PATCH /secrets/:project/:environment/:key': {
|
|
93
88
|
ui: [
|
|
94
|
-
{ does: "a secret › Edit: its name, then Save
|
|
89
|
+
{ does: "a secret › Edit: its name, then Save", in: 'pages/environment.tsx', call: 'secrets.rename' },
|
|
95
90
|
{ does: 'a secret › ⋯ › Archive; an archived one › ⋯ › Restore', in: 'pages/environment.tsx', call: 'secrets.update' },
|
|
96
91
|
{ does: "a fork › an override › ⋯ › Reset to its parent; a reset one › ⋯ › Use its own value again; Undo after either", in: 'lib/changes.ts', call: 'secrets.inherit' },
|
|
97
92
|
],
|
|
@@ -140,7 +135,7 @@ export const UI_PARITY: { [K in RouteKey]: Reach } = {
|
|
|
140
135
|
ui: [
|
|
141
136
|
{ does: 'Users › Add user; Service accounts › Add service account', in: 'components/directory.tsx', call: 'members.add' },
|
|
142
137
|
{ does: 'a project › Service accounts › Add service account › New service account: made with its grant, in one call', in: 'pages/project-access.tsx', call: 'members.add' },
|
|
143
|
-
{ does: 'a user › ⋯ › Change
|
|
138
|
+
{ does: 'a user › ⋯ › Change role', in: 'components/directory.tsx', call: 'members.add' },
|
|
144
139
|
],
|
|
145
140
|
},
|
|
146
141
|
'DELETE /members/:member': { ui: [{ does: 'a user or service account › ⋯ › Remove…', in: 'components/directory.tsx', call: 'members.remove' }] },
|
|
@@ -203,12 +198,9 @@ export const UI_PARITY: { [K in RouteKey]: Reach } = {
|
|
|
203
198
|
{ does: "a user's or service account's page › Activity", in: 'components/actions-log.tsx', call: 'audit.list' },
|
|
204
199
|
],
|
|
205
200
|
},
|
|
206
|
-
'GET /audit/verification': { ui: [{ does: "Audit: the log's seal, verified with every visit", in: 'pages/audit.tsx', call: 'audit.verify' }] },
|
|
207
|
-
'GET /audit/trees': { ui: [{ does: "Audit: 0.15's log, its newest checkpoint and the entries since, verified with every visit", in: 'lib/queries.ts', call: 'audit.verifyTrees' }] },
|
|
208
|
-
'GET /audit/reads': { ui: [{ does: "Audit › Verify whole log: the reads listed, held to the uses 0.15's log sealed", in: 'lib/queries.ts', call: 'audit.verifyReads' }] },
|
|
209
201
|
'GET /roles': {
|
|
210
202
|
ui: [
|
|
211
|
-
{ does: 'Settings › Roles
|
|
203
|
+
{ does: 'Settings › Roles and Instance roles; every grant picker, for the roles it offers', in: 'lib/queries.ts', call: 'roles.list' },
|
|
212
204
|
],
|
|
213
205
|
},
|
|
214
206
|
'PUT /roles/:role': {
|
|
@@ -225,18 +217,17 @@ export const UI_PARITY: { [K in RouteKey]: Reach } = {
|
|
|
225
217
|
},
|
|
226
218
|
'PUT /instance-roles/:role': {
|
|
227
219
|
ui: [
|
|
228
|
-
{ does: 'Settings ›
|
|
220
|
+
{ does: 'Settings › Instance roles › Edit… › Save', in: 'components/role-editor.tsx', call: 'roles.set', args: ['developer', {}, { instance: true }] },
|
|
229
221
|
{ does: 'the same dialog: what saving would do, before it is confirmed', in: 'components/role-editor.tsx', call: 'roles.preview', args: ['developer', {}, { instance: true }] },
|
|
230
222
|
],
|
|
231
223
|
},
|
|
232
224
|
'DELETE /instance-roles/:role': {
|
|
233
225
|
ui: [
|
|
234
|
-
{ does: 'Settings ›
|
|
226
|
+
{ does: 'Settings › Instance roles › Edit… › Reset to default', in: 'components/role-editor.tsx', call: 'roles.reset', args: ['developer', { instance: true }] },
|
|
235
227
|
{ does: 'the same: what it would do, before it is confirmed', in: 'components/role-editor.tsx', call: 'roles.previewReset', args: ['developer', { instance: true }] },
|
|
236
228
|
],
|
|
237
229
|
},
|
|
238
|
-
'GET /settings': { ui: [{ does: 'Settings ›
|
|
239
|
-
'PUT /settings': { ui: [{ does: 'Settings ›
|
|
230
|
+
'GET /settings': { ui: [{ does: 'Settings › Service accounts: where people set them up', in: 'pages/settings.tsx', call: 'settings.get' }] },
|
|
231
|
+
'PUT /settings': { ui: [{ does: 'Settings › Service accounts › Edit', in: 'pages/settings.tsx', call: 'settings.set' }] },
|
|
240
232
|
'GET /audit/keys': { ui: [{ does: 'Settings › Keys: what the keys you keep are checked against', in: 'pages/settings.tsx', call: 'audit.keys' }] },
|
|
241
|
-
'POST /audit/loss': { not: "an Owner's acceptance of lost audit entries is rare and irreversible: `coffre audit accept-loss`, never a button" },
|
|
242
233
|
};
|