@coffre/ui 0.14.7 → 0.16.0

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.
Files changed (112) hide show
  1. package/dist/audit-sentences.d.ts +56 -0
  2. package/dist/audit-sentences.js +886 -0
  3. package/dist/audit-sentences.js.map +1 -0
  4. package/dist/chunks/audit-sentence-C8NnAdjF.js +48 -0
  5. package/dist/chunks/audit-sentence-C8NnAdjF.js.map +1 -0
  6. package/dist/chunks/{connected-apps-IJdunsu8.js → connected-apps-6sMSgQ9U.js} +5 -5
  7. package/dist/chunks/{connected-apps-IJdunsu8.js.map → connected-apps-6sMSgQ9U.js.map} +1 -1
  8. package/dist/chunks/{delete-place-dIVoK87I.js → delete-place-T469tSN9.js} +5 -5
  9. package/dist/chunks/{delete-place-dIVoK87I.js.map → delete-place-T469tSN9.js.map} +1 -1
  10. package/dist/chunks/{directory-BM8yoiJN.js → directory-B_gVf7UL.js} +13 -12
  11. package/dist/chunks/{directory-BM8yoiJN.js.map → directory-B_gVf7UL.js.map} +1 -1
  12. package/dist/chunks/{folders-D3A1NGpt.js → folders-CVYauIDz.js} +3 -3
  13. package/dist/chunks/{folders-D3A1NGpt.js.map → folders-CVYauIDz.js.map} +1 -1
  14. package/dist/chunks/{grants-CjVmOgb2.js → grants-Dn_EW2XW.js} +6 -6
  15. package/dist/chunks/{grants-CjVmOgb2.js.map → grants-Dn_EW2XW.js.map} +1 -1
  16. package/dist/chunks/{multi-combobox-B0JzP1QN.js → multi-combobox-fbBRzi9z.js} +3 -3
  17. package/dist/chunks/{multi-combobox-B0JzP1QN.js.map → multi-combobox-fbBRzi9z.js.map} +1 -1
  18. package/dist/chunks/{offboarding-DbozhPym.js → offboarding-CXM464J_.js} +19 -13
  19. package/dist/chunks/offboarding-CXM464J_.js.map +1 -0
  20. package/dist/chunks/{page-JTORvh-N.js → page-Cb0ZjGda.js} +2 -2
  21. package/dist/chunks/{page-JTORvh-N.js.map → page-Cb0ZjGda.js.map} +1 -1
  22. package/dist/chunks/{personal-tokens-zWZOzLIC.js → personal-tokens-CSHMlRHy.js} +7 -7
  23. package/dist/chunks/personal-tokens-CSHMlRHy.js.map +1 -0
  24. package/dist/chunks/{principal-DFBswTBr.js → principal-BKJxbAtE.js} +2 -2
  25. package/dist/chunks/{principal-DFBswTBr.js.map → principal-BKJxbAtE.js.map} +1 -1
  26. package/dist/chunks/{principal-page-jJ0RVFg8.js → principal-page-COPmTDVW.js} +20 -17
  27. package/dist/chunks/principal-page-COPmTDVW.js.map +1 -0
  28. package/dist/chunks/{project-page-BjwEoXfU.js → project-page-g5_n46Nz.js} +3 -3
  29. package/dist/chunks/{project-page-BjwEoXfU.js.map → project-page-g5_n46Nz.js.map} +1 -1
  30. package/dist/chunks/{protected-y7KVhtHd.js → protected-DEWeOrmI.js} +7 -7
  31. package/dist/chunks/{protected-y7KVhtHd.js.map → protected-DEWeOrmI.js.map} +1 -1
  32. package/dist/chunks/{queries-2jdgTwfZ.js → queries-D4_o-bz3.js} +11 -88
  33. package/dist/chunks/queries-D4_o-bz3.js.map +1 -0
  34. package/dist/chunks/{references-CRT2BsOS.js → references-wTh_DT0M.js} +27 -23
  35. package/dist/chunks/references-wTh_DT0M.js.map +1 -0
  36. package/dist/chunks/{role-field-DswIpPqY.js → role-field-BiP09qfN.js} +4 -4
  37. package/dist/chunks/{role-field-DswIpPqY.js.map → role-field-BiP09qfN.js.map} +1 -1
  38. package/dist/chunks/{row-state-xtRGFnDc.js → row-state-CYhtmUkc.js} +3 -3
  39. package/dist/chunks/{row-state-xtRGFnDc.js.map → row-state-CYhtmUkc.js.map} +1 -1
  40. package/dist/chunks/{signin-errors-TlQmQe0t.js → signin-errors-BMnox7XD.js} +5 -19
  41. package/dist/chunks/signin-errors-BMnox7XD.js.map +1 -0
  42. package/dist/chunks/{theme-Ck45wzWB.js → theme-imSolE1q.js} +3 -3
  43. package/dist/chunks/{theme-Ck45wzWB.js.map → theme-imSolE1q.js.map} +1 -1
  44. package/dist/chunks/{ui-D-blFWfx.js → ui-Q_Eczt7m.js} +7 -3
  45. package/dist/chunks/{ui-D-blFWfx.js.map → ui-Q_Eczt7m.js.map} +1 -1
  46. package/dist/chunks/{use-action-CXEFFjx5.js → use-action-BfnN-De2.js} +3 -3
  47. package/dist/chunks/{use-action-CXEFFjx5.js.map → use-action-BfnN-De2.js.map} +1 -1
  48. package/dist/chunks/{use-change-BC4xo02c.js → use-change-Cc0X4sF3.js} +6 -4
  49. package/dist/chunks/use-change-Cc0X4sF3.js.map +1 -0
  50. package/dist/chunks/{use-roles-DswiNxBk.js → use-roles-stcv2QFj.js} +3 -3
  51. package/dist/chunks/{use-roles-DswiNxBk.js.map → use-roles-stcv2QFj.js.map} +1 -1
  52. package/dist/chunks/{use-shell-zpjE_MKh.js → use-shell-DMhLa2sh.js} +3 -3
  53. package/dist/chunks/{use-shell-zpjE_MKh.js.map → use-shell-DMhLa2sh.js.map} +1 -1
  54. package/dist/index.d.ts +22 -10
  55. package/dist/index.js +7 -7
  56. package/dist/pages/account.js +11 -11
  57. package/dist/pages/approval.js +2 -2
  58. package/dist/pages/audit.js +163 -152
  59. package/dist/pages/audit.js.map +1 -1
  60. package/dist/pages/device-login.js +2 -2
  61. package/dist/pages/environment.js +67 -35
  62. package/dist/pages/environment.js.map +1 -1
  63. package/dist/pages/login.js +6 -15
  64. package/dist/pages/login.js.map +1 -1
  65. package/dist/pages/oauth-authorize.js +2 -2
  66. package/dist/pages/project-access.js +11 -11
  67. package/dist/pages/project-environments.js +12 -12
  68. package/dist/pages/project-settings.js +8 -8
  69. package/dist/pages/project.js +3 -3
  70. package/dist/pages/projects.js +8 -8
  71. package/dist/pages/service-account.js +19 -15
  72. package/dist/pages/service-account.js.map +1 -1
  73. package/dist/pages/service-accounts.js +5 -5
  74. package/dist/pages/settings.js +26 -37
  75. package/dist/pages/settings.js.map +1 -1
  76. package/dist/pages/unregistered.js +2 -2
  77. package/dist/pages/user.js +7 -7
  78. package/dist/pages/user.js.map +1 -1
  79. package/dist/pages/users.js +5 -5
  80. package/package.json +8 -3
  81. package/src/components/directory.tsx +5 -4
  82. package/src/components/offboarding.tsx +9 -9
  83. package/src/components/personal-tokens.tsx +5 -2
  84. package/src/components/principal-page.tsx +4 -3
  85. package/src/components/references.tsx +18 -7
  86. package/src/components/trusted-workloads.tsx +6 -5
  87. package/src/components/ui.tsx +5 -0
  88. package/src/lib/audit-proofs.ts +51 -0
  89. package/src/lib/audit-sentences.ts +473 -509
  90. package/src/lib/bindings.ts +6 -0
  91. package/src/lib/changes.ts +3 -1
  92. package/src/lib/coffre.ts +2 -2
  93. package/src/lib/queries.ts +9 -94
  94. package/src/lib/reveal.ts +32 -5
  95. package/src/lib/row-reads.ts +2 -2
  96. package/src/lib/signin-errors.ts +5 -33
  97. package/src/pages/audit.tsx +145 -182
  98. package/src/pages/environment.tsx +21 -20
  99. package/src/pages/login.tsx +2 -4
  100. package/src/pages/settings.tsx +6 -10
  101. package/src/pages/user.tsx +2 -2
  102. package/src/parity.ts +0 -2
  103. package/src/styles/globals.css +18 -2
  104. package/dist/chunks/audit-sentence-JgJEwQEC.js +0 -969
  105. package/dist/chunks/audit-sentence-JgJEwQEC.js.map +0 -1
  106. package/dist/chunks/offboarding-DbozhPym.js.map +0 -1
  107. package/dist/chunks/personal-tokens-zWZOzLIC.js.map +0 -1
  108. package/dist/chunks/principal-page-jJ0RVFg8.js.map +0 -1
  109. package/dist/chunks/queries-2jdgTwfZ.js.map +0 -1
  110. package/dist/chunks/references-CRT2BsOS.js.map +0 -1
  111. package/dist/chunks/signin-errors-TlQmQe0t.js.map +0 -1
  112. package/dist/chunks/use-change-BC4xo02c.js.map +0 -1
@@ -154,32 +154,28 @@ function ServiceSetup({ scope }: { scope: Scope }) {
154
154
  * key typed into a web page would be within reach of everything running in it.
155
155
  */
156
156
  function Keys({ keys }: { keys: RouteOutput<'GET /audit/keys'> }) {
157
- const { current, checks } = keys.vault;
158
- const replaced = new Set(checks.map((check) => check.vaultId).filter((id) => id !== current.vaultId)).size;
157
+ const { kek, previous } = keys;
159
158
  return (
160
159
  <Card
161
160
  labelledBy="keys"
162
161
  title="Keys"
163
162
  description={
164
163
  <>
165
- To check your vault key and app key against these, run <code>coffre verify keys</code>.
166
- It reads them on your machine and sends neither.
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.
167
166
  </>
168
167
  }
169
168
  >
170
169
  <dl className="facts">
171
170
  <Fact label="Vault ID">
172
- <span className="mono">{current.vaultId}</span>
171
+ <span className="mono">{kek.id}</span>
173
172
  </Fact>
174
173
  <Fact label="Vault key">
175
174
  <span>
176
- Held by <span className="mono">{current.provider}</span>
177
- {replaced > 0 && `; ${replaced} earlier vault key${replaced === 1 ? '' : 's'} still checkable`}
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`}
178
177
  </span>
179
178
  </Fact>
180
- <Fact label="App key">
181
- <span className="mono">{keys.app.keyId}</span>
182
- </Fact>
183
179
  </dl>
184
180
  </Card>
185
181
  );
@@ -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/parity.ts CHANGED
@@ -198,7 +198,6 @@ export const UI_PARITY: { [K in RouteKey]: Reach } = {
198
198
  { does: "a user's or service account's page › Activity", in: 'components/actions-log.tsx', call: 'audit.list' },
199
199
  ],
200
200
  },
201
- 'GET /audit/verification': { ui: [{ does: "Audit: the log's seal, verified with every visit", in: 'pages/audit.tsx', call: 'audit.verify' }] },
202
201
  'GET /roles': {
203
202
  ui: [
204
203
  { does: 'Settings › Roles and Instance roles; every grant picker, for the roles it offers', in: 'lib/queries.ts', call: 'roles.list' },
@@ -231,5 +230,4 @@ export const UI_PARITY: { [K in RouteKey]: Reach } = {
231
230
  'GET /settings': { ui: [{ does: 'Settings › Service accounts: where people set them up', in: 'pages/settings.tsx', call: 'settings.get' }] },
232
231
  'PUT /settings': { ui: [{ does: 'Settings › Service accounts › Edit', in: 'pages/settings.tsx', call: 'settings.set' }] },
233
232
  'GET /audit/keys': { ui: [{ does: 'Settings › Keys: what the keys you keep are checked against', in: 'pages/settings.tsx', call: 'audit.keys' }] },
234
- 'POST /audit/loss': { not: "an Owner's acceptance of lost audit entries is rare and irreversible: `coffre audit accept-loss`, never a button" },
235
233
  };
@@ -3634,8 +3634,8 @@ a.env-card-name:hover {
3634
3634
  color: var(--red);
3635
3635
  }
3636
3636
 
3637
- /* Where a log stops verifying: a stronger tint than a denial, ruled above
3638
- and below, with a solid mark that says so in words. */
3637
+ /* An entry that is not what the vault signed: a stronger tint than a
3638
+ denial, ruled above and below, with a solid mark that says so in words. */
3639
3639
  .audit tr.is-break,
3640
3640
  .audit tr.is-break:hover {
3641
3641
  background: color-mix(in oklab, var(--red) 14%, var(--panel));
@@ -3656,6 +3656,22 @@ a.env-card-name:hover {
3656
3656
  font-weight: 700;
3657
3657
  }
3658
3658
 
3659
+ /* An entry past the vault's head: said quietly, since checking again
3660
+ usually proves it. */
3661
+ .unproven-mark {
3662
+ display: inline-flex;
3663
+ align-items: center;
3664
+ margin-left: 0.5rem;
3665
+ padding: 0 0.375rem;
3666
+ border: 1px solid var(--border);
3667
+ border-radius: var(--radius-sm);
3668
+ color: var(--ink-3);
3669
+ font-family: var(--font-sans);
3670
+ font-size: 0.6875rem;
3671
+ font-weight: 550;
3672
+ white-space: nowrap;
3673
+ }
3674
+
3659
3675
  .break-mark {
3660
3676
  display: inline-flex;
3661
3677
  align-items: center;