@burdenoff/microfe-security 2026.624.1 → 2026.625.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/security/components/ConfirmDialog.js +28 -37
- package/dist/security/components/ConfirmDialog.js.map +1 -1
- package/dist/security/components/ImportWizard.js +81 -88
- package/dist/security/components/ImportWizard.js.map +1 -1
- package/dist/security/components/SecretShareDialog.js +75 -86
- package/dist/security/components/SecretShareDialog.js.map +1 -1
- package/dist/security/components/SecurityScoreCard.js +21 -20
- package/dist/security/components/SecurityScoreCard.js.map +1 -1
- package/dist/security/components/VaultShareDialog.js +26 -40
- package/dist/security/components/VaultShareDialog.js.map +1 -1
- package/dist/security/components/ui.js +2 -2
- package/dist/security/components/ui.js.map +1 -1
- package/dist/security/pages/AccessReviewPage.js +52 -67
- package/dist/security/pages/AccessReviewPage.js.map +1 -1
- package/dist/security/pages/ProviderDetailPage.js +122 -142
- package/dist/security/pages/ProviderDetailPage.js.map +1 -1
- package/dist/security/pages/ProvidersPage.js +118 -113
- package/dist/security/pages/ProvidersPage.js.map +1 -1
- package/dist/security/pages/SecretCreatePage.js +73 -68
- package/dist/security/pages/SecretCreatePage.js.map +1 -1
- package/dist/security/pages/SecretDetailPage.js +240 -253
- package/dist/security/pages/SecretDetailPage.js.map +1 -1
- package/dist/security/pages/SecurityDashboardPage.js +89 -85
- package/dist/security/pages/SecurityDashboardPage.js.map +1 -1
- package/dist/security/pages/VaultDetailPage.js +137 -183
- package/dist/security/pages/VaultDetailPage.js.map +1 -1
- package/dist/security/pages/VaultShareViewer.js +61 -59
- package/dist/security/pages/VaultShareViewer.js.map +1 -1
- package/dist/security/pages/VaultsDashboardPage.js +66 -64
- package/dist/security/pages/VaultsDashboardPage.js.map +1 -1
- package/package.json +2 -2
|
@@ -3,277 +3,269 @@ import { SECURITY_FEATURE_FLAGS as t } from "../constants/featureFlags.js";
|
|
|
3
3
|
import { cn as n } from "../utils/cn.js";
|
|
4
4
|
import { PageLayout as r } from "../components/PageLayout.js";
|
|
5
5
|
import { Badge as i, Button as a, Card as o } from "../components/ui.js";
|
|
6
|
-
import { translateWithFallback as
|
|
7
|
-
import { ConfirmDialog as
|
|
8
|
-
import { useGetSecretVersionsQuery as
|
|
9
|
-
import { useSecurityEventEmitter as
|
|
10
|
-
import { useDeleteSecret as
|
|
11
|
-
import { nativeConfirm as
|
|
12
|
-
import { SecurityPermissionGuard as
|
|
13
|
-
import { SecretValueDisplay as
|
|
14
|
-
import { SecretTypeBadge as
|
|
15
|
-
import { RotationStatusBadge as
|
|
16
|
-
import { SecretShareDialog as
|
|
17
|
-
import { useSecretValue as
|
|
18
|
-
import { useRef as
|
|
19
|
-
import { usePermission as
|
|
20
|
-
import { useNavigate as
|
|
21
|
-
import { jsx as
|
|
22
|
-
import { AlertTriangle as
|
|
23
|
-
import {
|
|
6
|
+
import { translateWithFallback as ee } from "../utils/i18n.js";
|
|
7
|
+
import { ConfirmDialog as te } from "../components/ConfirmDialog.js";
|
|
8
|
+
import { useGetSecretVersionsQuery as ne } from "../../generated/wspace-operations.js";
|
|
9
|
+
import { useSecurityEventEmitter as re } from "../hooks/useSecurityEventEmitter.js";
|
|
10
|
+
import { useDeleteSecret as ie, useGetSecret as ae, useRollbackSecret as s, useRotateSecret as c } from "../hooks/useSecretQueries.js";
|
|
11
|
+
import { nativeConfirm as l, nativeImpact as u, nativeNotify as d } from "../../utils/nativeBridge.js";
|
|
12
|
+
import { SecurityPermissionGuard as oe } from "../components/SecurityPermissionGuard.js";
|
|
13
|
+
import { SecretValueDisplay as se } from "../components/SecretValueDisplay.js";
|
|
14
|
+
import { SecretTypeBadge as ce } from "../components/SecretTypeBadge.js";
|
|
15
|
+
import { RotationStatusBadge as le } from "../components/RotationStatusBadge.js";
|
|
16
|
+
import { SecretShareDialog as ue } from "../components/SecretShareDialog.js";
|
|
17
|
+
import { useSecretValue as de } from "../hooks/useSecretValue.js";
|
|
18
|
+
import { useRef as fe, useState as f } from "react";
|
|
19
|
+
import { useFeatureFlag as pe, usePermission as p } from "@burdenoff/fe-libs/shared/providers/shell";
|
|
20
|
+
import { useNavigate as me, useParams as m } from "react-router-dom";
|
|
21
|
+
import { jsx as h, jsxs as g } from "react/jsx-runtime";
|
|
22
|
+
import { AlertTriangle as he, ArrowLeft as _, Calendar as v, Clock as y, History as b, KeyRound as ge, Loader2 as x, RefreshCw as S, Share2 as _e, Shield as ve, Trash2 as ye } from "lucide-react";
|
|
23
|
+
import { CTAOverflowMenu as be, Dialog as C, DialogContent as w, DialogHeader as T, DialogTitle as E, GlassCard as D } from "@burdenoff/fe-libs/ui";
|
|
24
|
+
import { useI18n as O } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
|
|
24
25
|
//#region src/security/pages/SecretDetailPage.tsx
|
|
25
|
-
function
|
|
26
|
-
let { vaultId:
|
|
26
|
+
function k() {
|
|
27
|
+
let { vaultId: k, secretId: A } = m(), { basePath: j = "/", navigate: M } = e(), { t: N } = O(), xe = me(), { data: Se, loading: Ce, error: P, refetch: F } = ae(A ?? null), I = Se?.getSecret, { data: we, loading: Te } = ne({
|
|
27
28
|
variables: {
|
|
28
|
-
secretId:
|
|
29
|
+
secretId: A ?? "",
|
|
29
30
|
pagination: { limit: 50 }
|
|
30
31
|
},
|
|
31
|
-
skip: !
|
|
32
|
+
skip: !A,
|
|
32
33
|
fetchPolicy: "network-only"
|
|
33
|
-
}),
|
|
34
|
-
|
|
35
|
-
}, [
|
|
36
|
-
|
|
34
|
+
}), Ee = we?.getSecretVersionsPaginated?.items ?? [], { value: De, reveal: Oe, hide: ke, loading: L, isRevealed: R } = de(A ?? ""), [Ae, { loading: je }] = ie(), [Me, { loading: z }] = c(), [Ne, { loading: Pe }] = s(), { emit: B } = re(), Fe = p("secret:delete"), V = p("secret:update"), Ie = p("secret:decrypt"), Le = pe(t.SECRET_ROTATE, !1), [Re, H] = f(!1), [ze, U] = f(!1), [Be, W] = f(!1), G = fe(null), Ve = () => {
|
|
35
|
+
W(!0), requestAnimationFrame(() => G.current?.focus());
|
|
36
|
+
}, [He, K] = f(!1), [q, J] = f(""), Y = (e, t, n) => ee(N, e, t, n), Ue = (e) => {
|
|
37
|
+
M ? M(e) : xe(e);
|
|
37
38
|
}, X = () => {
|
|
38
|
-
|
|
39
|
+
Ue(`${j}/vaults/${k}`);
|
|
39
40
|
}, Z = async () => {
|
|
40
|
-
if (
|
|
41
|
-
await
|
|
42
|
-
secretId:
|
|
43
|
-
vaultId:
|
|
44
|
-
}),
|
|
41
|
+
if (A) try {
|
|
42
|
+
await Ae({ variables: { id: A } }), B("secret.deleted", {
|
|
43
|
+
secretId: A,
|
|
44
|
+
vaultId: k
|
|
45
|
+
}), H(!1), d("success"), X();
|
|
45
46
|
} catch (e) {
|
|
46
|
-
console.error("Failed to delete secret:", e),
|
|
47
|
+
console.error("Failed to delete secret:", e), d("error");
|
|
47
48
|
}
|
|
48
|
-
},
|
|
49
|
-
|
|
50
|
-
let e = await
|
|
49
|
+
}, We = async () => {
|
|
50
|
+
u("medium");
|
|
51
|
+
let e = await l({
|
|
51
52
|
title: "Delete Secret",
|
|
52
53
|
message: "Delete this secret? This cannot be undone.",
|
|
53
54
|
okButtonTitle: "Delete",
|
|
54
55
|
cancelButtonTitle: "Cancel"
|
|
55
56
|
});
|
|
56
57
|
if (e === null) {
|
|
57
|
-
|
|
58
|
+
H(!0);
|
|
58
59
|
return;
|
|
59
60
|
}
|
|
60
61
|
e && await Z();
|
|
61
|
-
},
|
|
62
|
-
if (!(!
|
|
63
|
-
await
|
|
64
|
-
id:
|
|
62
|
+
}, Ge = async () => {
|
|
63
|
+
if (!(!A || !q.trim())) try {
|
|
64
|
+
await Me({ variables: {
|
|
65
|
+
id: A,
|
|
65
66
|
newValue: q.trim()
|
|
66
67
|
} }), B("secret.rotated", {
|
|
67
|
-
secretId:
|
|
68
|
-
vaultId:
|
|
69
|
-
}),
|
|
68
|
+
secretId: A,
|
|
69
|
+
vaultId: k
|
|
70
|
+
}), W(!1), J(""), F();
|
|
70
71
|
} catch (e) {
|
|
71
72
|
console.error("Failed to rotate secret:", e);
|
|
72
73
|
}
|
|
73
|
-
},
|
|
74
|
-
if (
|
|
75
|
-
await
|
|
76
|
-
id:
|
|
74
|
+
}, Ke = async (e) => {
|
|
75
|
+
if (A) try {
|
|
76
|
+
await Ne({ variables: {
|
|
77
|
+
id: A,
|
|
77
78
|
version: e
|
|
78
79
|
} }), B("secret.rollback", {
|
|
79
|
-
secretId:
|
|
80
|
-
vaultId:
|
|
81
|
-
}),
|
|
80
|
+
secretId: A,
|
|
81
|
+
vaultId: k
|
|
82
|
+
}), F(), K(!1);
|
|
82
83
|
} catch (e) {
|
|
83
84
|
console.error("Failed to rollback secret:", e);
|
|
84
85
|
}
|
|
85
86
|
};
|
|
86
|
-
if (
|
|
87
|
+
if (Ce && !I) return /* @__PURE__ */ h(r, {
|
|
87
88
|
title: Y("security.secretDetail.loading.title", "Loading Secret..."),
|
|
88
89
|
breadcrumbs: [{
|
|
89
90
|
label: Y("security.common.breadcrumbs.security", "Security"),
|
|
90
|
-
path:
|
|
91
|
+
path: j
|
|
91
92
|
}, { label: Y("security.common.breadcrumbs.secret", "Secret") }],
|
|
92
|
-
children: /* @__PURE__ */
|
|
93
|
+
children: /* @__PURE__ */ h("div", {
|
|
93
94
|
className: "flex items-center justify-center py-20",
|
|
94
|
-
children: /* @__PURE__ */
|
|
95
|
+
children: /* @__PURE__ */ h(x, { className: "size-10 animate-spin text-primary/60" })
|
|
95
96
|
})
|
|
96
97
|
});
|
|
97
|
-
if (
|
|
98
|
+
if (P || !I) return /* @__PURE__ */ h(r, {
|
|
98
99
|
title: Y("security.common.errorPage.title", "Error"),
|
|
99
100
|
breadcrumbs: [{
|
|
100
101
|
label: Y("security.common.breadcrumbs.security", "Security"),
|
|
101
|
-
path:
|
|
102
|
+
path: j
|
|
102
103
|
}, { label: Y("security.common.breadcrumbs.secret", "Secret") }],
|
|
103
|
-
children: /* @__PURE__ */
|
|
104
|
+
children: /* @__PURE__ */ h(o, {
|
|
104
105
|
className: "p-8 text-center max-w-lg mx-auto mt-10",
|
|
105
|
-
children: /* @__PURE__ */
|
|
106
|
+
children: /* @__PURE__ */ g("div", {
|
|
106
107
|
className: "flex flex-col items-center gap-4",
|
|
107
108
|
children: [
|
|
108
|
-
/* @__PURE__ */
|
|
109
|
+
/* @__PURE__ */ h("div", {
|
|
109
110
|
className: "p-3 rounded-full bg-status-error-bg/10",
|
|
110
|
-
children: /* @__PURE__ */
|
|
111
|
+
children: /* @__PURE__ */ h(he, { className: "size-8 text-status-error-text" })
|
|
111
112
|
}),
|
|
112
|
-
/* @__PURE__ */
|
|
113
|
+
/* @__PURE__ */ g("div", { children: [/* @__PURE__ */ h("h3", {
|
|
113
114
|
className: "text-lg font-bold text-text-primary",
|
|
114
115
|
children: Y("security.secretDetail.error.title", "Failed to load secret")
|
|
115
|
-
}), /* @__PURE__ */
|
|
116
|
+
}), /* @__PURE__ */ h("p", {
|
|
116
117
|
className: "text-sm text-text-secondary mt-2",
|
|
117
|
-
children:
|
|
118
|
+
children: P?.message ?? Y("security.secretDetail.error.description", "Secret not found or access denied.")
|
|
118
119
|
})] }),
|
|
119
|
-
/* @__PURE__ */
|
|
120
|
+
/* @__PURE__ */ g(a, {
|
|
120
121
|
variant: "outline",
|
|
121
122
|
onClick: X,
|
|
122
123
|
className: "mt-4",
|
|
123
|
-
children: [/* @__PURE__ */
|
|
124
|
+
children: [/* @__PURE__ */ h(_, { className: "size-4" }), Y("security.secretDetail.actions.backToVault", "Go Back to Vault")]
|
|
124
125
|
})
|
|
125
126
|
]
|
|
126
127
|
})
|
|
127
128
|
})
|
|
128
129
|
});
|
|
129
|
-
let Q =
|
|
130
|
-
return /* @__PURE__ */
|
|
131
|
-
title:
|
|
132
|
-
description:
|
|
130
|
+
let Q = I.versionCount ?? 0, $ = I.lastRotatedAt ? "healthy" : void 0;
|
|
131
|
+
return /* @__PURE__ */ g(r, {
|
|
132
|
+
title: I.name,
|
|
133
|
+
description: I.description ?? Y("security.secretDetail.description", "View and manage this secret."),
|
|
133
134
|
breadcrumbs: [
|
|
134
135
|
{
|
|
135
136
|
label: Y("security.common.breadcrumbs.security", "Security"),
|
|
136
|
-
path:
|
|
137
|
+
path: j
|
|
137
138
|
},
|
|
138
139
|
{
|
|
139
140
|
label: Y("security.common.breadcrumbs.vault", "Vault"),
|
|
140
|
-
path: `${
|
|
141
|
+
path: `${j}/vaults/${k}`
|
|
141
142
|
},
|
|
142
|
-
{ label:
|
|
143
|
+
{ label: I.name }
|
|
143
144
|
],
|
|
144
|
-
actions:
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
145
|
+
actions: (() => {
|
|
146
|
+
let e = [];
|
|
147
|
+
return V && e.push({
|
|
148
|
+
label: Y("security.common.actions.share", "Share"),
|
|
149
|
+
icon: /* @__PURE__ */ h(_e, { className: "size-4" }),
|
|
150
|
+
onSelect: () => U(!0)
|
|
151
|
+
}), V && Le && e.push({
|
|
152
|
+
label: Y("security.secretDetail.actions.rotate", "Rotate"),
|
|
153
|
+
icon: /* @__PURE__ */ h(S, { className: "size-4" }),
|
|
154
|
+
onSelect: Ve
|
|
155
|
+
}), Fe && e.push({
|
|
156
|
+
label: Y("security.common.actions.delete", "Delete"),
|
|
157
|
+
icon: /* @__PURE__ */ h(ye, { className: "size-4" }),
|
|
158
|
+
intent: "destructive",
|
|
159
|
+
onSelect: () => void We()
|
|
160
|
+
}), /* @__PURE__ */ g("div", {
|
|
161
|
+
className: "flex flex-wrap items-center gap-2",
|
|
162
|
+
children: [/* @__PURE__ */ g(a, {
|
|
148
163
|
variant: "outline",
|
|
149
164
|
size: "sm",
|
|
150
165
|
onClick: X,
|
|
151
166
|
children: [
|
|
152
|
-
/* @__PURE__ */
|
|
153
|
-
/* @__PURE__ */
|
|
167
|
+
/* @__PURE__ */ h(_, { className: "size-4" }),
|
|
168
|
+
/* @__PURE__ */ h("span", {
|
|
154
169
|
className: "hidden sm:inline",
|
|
155
170
|
children: Y("security.secretDetail.actions.backToVault", "Back to Vault")
|
|
156
171
|
}),
|
|
157
|
-
/* @__PURE__ */
|
|
172
|
+
/* @__PURE__ */ h("span", {
|
|
158
173
|
className: "sm:hidden",
|
|
159
174
|
children: Y("security.common.actions.back", "Back")
|
|
160
175
|
})
|
|
161
176
|
]
|
|
162
|
-
}),
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
size: "sm",
|
|
166
|
-
onClick: () => H(!0),
|
|
167
|
-
children: [/* @__PURE__ */ v(he, { className: "size-4" }), Y("security.common.actions.share", "Share")]
|
|
168
|
-
}),
|
|
169
|
-
/* @__PURE__ */ v(u, {
|
|
170
|
-
permission: "secret:update",
|
|
171
|
-
featureFlagKey: t.SECRET_ROTATE,
|
|
172
|
-
featureFlagDefault: !1,
|
|
173
|
-
children: /* @__PURE__ */ y(a, {
|
|
174
|
-
variant: "outline",
|
|
175
|
-
size: "sm",
|
|
176
|
-
onClick: Fe,
|
|
177
|
-
children: [/* @__PURE__ */ v(C, { className: "size-4" }), Y("security.secretDetail.actions.rotate", "Rotate")]
|
|
178
|
-
})
|
|
179
|
-
}),
|
|
180
|
-
ke && /* @__PURE__ */ y(a, {
|
|
181
|
-
variant: "outline",
|
|
182
|
-
size: "sm",
|
|
183
|
-
className: "text-status-error-text hover:bg-status-error-bg/10 border-status-error-border/20",
|
|
184
|
-
onClick: () => void Le(),
|
|
185
|
-
children: [/* @__PURE__ */ v(w, { className: "size-4" }), Y("security.common.actions.delete", "Delete")]
|
|
186
|
-
})
|
|
187
|
-
]
|
|
188
|
-
}),
|
|
177
|
+
}), /* @__PURE__ */ h(be, { actions: e })]
|
|
178
|
+
});
|
|
179
|
+
})(),
|
|
189
180
|
children: [
|
|
190
|
-
/* @__PURE__ */
|
|
181
|
+
/* @__PURE__ */ g("div", {
|
|
191
182
|
className: "space-y-6",
|
|
192
|
-
children: [/* @__PURE__ */
|
|
183
|
+
children: [/* @__PURE__ */ g("div", {
|
|
193
184
|
className: "flex flex-wrap items-center gap-3",
|
|
194
185
|
children: [
|
|
195
|
-
/* @__PURE__ */
|
|
196
|
-
$ && /* @__PURE__ */
|
|
197
|
-
/* @__PURE__ */
|
|
186
|
+
/* @__PURE__ */ h(ce, { type: I.type }),
|
|
187
|
+
$ && /* @__PURE__ */ h(le, { status: $ }),
|
|
188
|
+
/* @__PURE__ */ h(i, {
|
|
198
189
|
variant: "outline",
|
|
199
190
|
className: "bg-bg-surface/50",
|
|
200
|
-
children: Y("security.secretDetail.status.label", "Status: {status}", { status:
|
|
191
|
+
children: Y("security.secretDetail.status.label", "Status: {status}", { status: I.status })
|
|
201
192
|
}),
|
|
202
|
-
|
|
193
|
+
I.labels?.map((e) => /* @__PURE__ */ h(i, {
|
|
203
194
|
variant: "outline",
|
|
204
195
|
className: "border-primary/20 text-primary",
|
|
205
196
|
children: e.label
|
|
206
197
|
}, e.id))
|
|
207
198
|
]
|
|
208
|
-
}), /* @__PURE__ */
|
|
199
|
+
}), /* @__PURE__ */ g("div", {
|
|
209
200
|
className: "grid grid-cols-1 md:grid-cols-3 gap-6",
|
|
210
|
-
children: [/* @__PURE__ */
|
|
201
|
+
children: [/* @__PURE__ */ g("div", {
|
|
211
202
|
className: "md:col-span-2 space-y-6",
|
|
212
|
-
children: [/* @__PURE__ */
|
|
213
|
-
|
|
203
|
+
children: [/* @__PURE__ */ g(D, {
|
|
204
|
+
treatment: "glass",
|
|
205
|
+
className: "p-6",
|
|
214
206
|
children: [
|
|
215
|
-
/* @__PURE__ */
|
|
207
|
+
/* @__PURE__ */ g("div", {
|
|
216
208
|
className: "flex items-center justify-between mb-4",
|
|
217
|
-
children: [/* @__PURE__ */
|
|
209
|
+
children: [/* @__PURE__ */ g("h2", {
|
|
218
210
|
className: "text-lg font-bold text-text-primary flex items-center gap-2",
|
|
219
|
-
children: [/* @__PURE__ */
|
|
220
|
-
}),
|
|
211
|
+
children: [/* @__PURE__ */ h(ge, { className: "size-5 text-primary" }), Y("security.secretDetail.value.title", "Secret Value")]
|
|
212
|
+
}), I.expiresAt && /* @__PURE__ */ g("div", {
|
|
221
213
|
className: "flex items-center gap-1.5 text-xs text-warning",
|
|
222
|
-
children: [/* @__PURE__ */ v
|
|
214
|
+
children: [/* @__PURE__ */ h(v, { className: "size-3.5" }), Y("security.secretDetail.value.expires", "Expires: {date}", { date: new Date(I.expiresAt).toLocaleDateString() })]
|
|
223
215
|
})]
|
|
224
216
|
}),
|
|
225
|
-
/* @__PURE__ */
|
|
226
|
-
value:
|
|
217
|
+
/* @__PURE__ */ h(se, {
|
|
218
|
+
value: De ?? "",
|
|
227
219
|
isRevealed: R,
|
|
228
|
-
onToggleReveal:
|
|
229
|
-
R ?
|
|
220
|
+
onToggleReveal: Ie ? () => {
|
|
221
|
+
R ? ke() : Oe();
|
|
230
222
|
} : void 0,
|
|
231
|
-
isLoading:
|
|
223
|
+
isLoading: L
|
|
232
224
|
}),
|
|
233
|
-
/* @__PURE__ */
|
|
225
|
+
/* @__PURE__ */ h("p", {
|
|
234
226
|
className: "text-xs text-text-secondary mt-4 italic",
|
|
235
227
|
children: Y("security.secretDetail.value.note", "Secret values are decrypted on-demand and never stored in plain text.")
|
|
236
228
|
})
|
|
237
229
|
]
|
|
238
|
-
}), /* @__PURE__ */
|
|
230
|
+
}), /* @__PURE__ */ g(o, {
|
|
239
231
|
className: "p-6 shadow-sm border-border-subtle/60",
|
|
240
|
-
children: [/* @__PURE__ */
|
|
232
|
+
children: [/* @__PURE__ */ g("div", {
|
|
241
233
|
className: "flex items-center justify-between mb-6",
|
|
242
|
-
children: [/* @__PURE__ */
|
|
234
|
+
children: [/* @__PURE__ */ g("h2", {
|
|
243
235
|
className: "text-lg font-bold text-text-primary flex items-center gap-2",
|
|
244
|
-
children: [/* @__PURE__ */
|
|
245
|
-
}), /* @__PURE__ */
|
|
236
|
+
children: [/* @__PURE__ */ h(b, { className: "size-5 text-primary" }), Y("security.secretDetail.history.title", "Version History")]
|
|
237
|
+
}), /* @__PURE__ */ h(i, {
|
|
246
238
|
variant: "outline",
|
|
247
239
|
className: "bg-bg-sunken font-mono",
|
|
248
240
|
children: Y("security.secretDetail.history.totalVersions", "{count} total versions", { count: Q })
|
|
249
241
|
})]
|
|
250
|
-
}), /* @__PURE__ */
|
|
242
|
+
}), /* @__PURE__ */ g("div", {
|
|
251
243
|
className: "space-y-4",
|
|
252
|
-
children: [/* @__PURE__ */
|
|
244
|
+
children: [/* @__PURE__ */ g("div", {
|
|
253
245
|
className: "flex items-center justify-between p-4 rounded-lg bg-action-primary-bg/5 border border-primary/10",
|
|
254
|
-
children: [/* @__PURE__ */
|
|
246
|
+
children: [/* @__PURE__ */ g("div", {
|
|
255
247
|
className: "flex items-center gap-3",
|
|
256
|
-
children: [/* @__PURE__ */
|
|
257
|
-
className: "size-8 rounded-full bg-action-primary-bg/10 flex items-center justify-center text-primary text-xs font-bold",
|
|
258
|
-
children: ["v",
|
|
259
|
-
}), /* @__PURE__ */
|
|
248
|
+
children: [/* @__PURE__ */ g("div", {
|
|
249
|
+
className: "size-8 rounded-full bg-action-primary-bg/10 flex items-center justify-center text-primary text-xs font-bold tabular-nums",
|
|
250
|
+
children: ["v", I.version ?? Q]
|
|
251
|
+
}), /* @__PURE__ */ g("div", { children: [/* @__PURE__ */ h("p", {
|
|
260
252
|
className: "text-sm font-semibold",
|
|
261
253
|
children: Y("security.secretDetail.history.currentVersion", "Current Active Version")
|
|
262
|
-
}), /* @__PURE__ */
|
|
254
|
+
}), /* @__PURE__ */ h("p", {
|
|
263
255
|
className: "text-xs text-text-secondary",
|
|
264
|
-
children: Y("security.secretDetail.history.lastUpdated", "Last updated {date}", { date: new Date(
|
|
256
|
+
children: Y("security.secretDetail.history.lastUpdated", "Last updated {date}", { date: new Date(I.updatedAt).toLocaleString() })
|
|
265
257
|
})] })]
|
|
266
|
-
}), /* @__PURE__ */
|
|
258
|
+
}), /* @__PURE__ */ h(i, {
|
|
267
259
|
variant: "success",
|
|
268
260
|
className: "text-[10px] uppercase",
|
|
269
261
|
children: Y("security.common.status.active", "Active")
|
|
270
262
|
})]
|
|
271
|
-
}), Q > 1 && /* @__PURE__ */
|
|
263
|
+
}), Q > 1 && /* @__PURE__ */ g("div", {
|
|
272
264
|
className: "text-center py-4 border-2 border-dashed border-border-subtle/40 rounded-lg bg-bg-sunken/20",
|
|
273
|
-
children: [/* @__PURE__ */
|
|
265
|
+
children: [/* @__PURE__ */ h("p", {
|
|
274
266
|
className: "text-sm text-text-secondary",
|
|
275
267
|
children: Y("security.secretDetail.history.available", "Historical versions are available. You can rollback to a previous state if needed.")
|
|
276
|
-
}), /* @__PURE__ */
|
|
268
|
+
}), /* @__PURE__ */ h(a, {
|
|
277
269
|
variant: "outline",
|
|
278
270
|
size: "sm",
|
|
279
271
|
className: "mt-3",
|
|
@@ -283,52 +275,53 @@ function D() {
|
|
|
283
275
|
})]
|
|
284
276
|
})]
|
|
285
277
|
})]
|
|
286
|
-
}), /* @__PURE__ */
|
|
278
|
+
}), /* @__PURE__ */ g("div", {
|
|
287
279
|
className: "space-y-6",
|
|
288
|
-
children: [/* @__PURE__ */
|
|
280
|
+
children: [/* @__PURE__ */ g(o, {
|
|
289
281
|
className: "p-6 shadow-sm border-border-subtle/60 space-y-4",
|
|
290
|
-
children: [/* @__PURE__ */
|
|
282
|
+
children: [/* @__PURE__ */ h("h3", {
|
|
291
283
|
className: "font-bold text-sm uppercase tracking-wider text-text-secondary",
|
|
292
284
|
children: Y("security.secretDetail.details.title", "Details")
|
|
293
|
-
}), /* @__PURE__ */
|
|
285
|
+
}), /* @__PURE__ */ g("div", {
|
|
294
286
|
className: "space-y-3",
|
|
295
287
|
children: [
|
|
296
|
-
/* @__PURE__ */
|
|
288
|
+
/* @__PURE__ */ g("div", { children: [/* @__PURE__ */ h("p", {
|
|
297
289
|
className: "text-xs text-text-secondary",
|
|
298
290
|
children: Y("security.secretDetail.details.keyIdentifier", "Key Identifier")
|
|
299
|
-
}), /* @__PURE__ */
|
|
291
|
+
}), /* @__PURE__ */ h("code", {
|
|
300
292
|
className: "text-xs font-mono bg-bg-sunken px-1.5 py-0.5 rounded block mt-1 overflow-hidden text-ellipsis whitespace-nowrap",
|
|
301
|
-
children:
|
|
293
|
+
children: I.key
|
|
302
294
|
})] }),
|
|
303
|
-
/* @__PURE__ */
|
|
295
|
+
/* @__PURE__ */ g("div", { children: [/* @__PURE__ */ h("p", {
|
|
304
296
|
className: "text-xs text-text-secondary",
|
|
305
297
|
children: Y("security.secretDetail.details.createdBy", "Created By")
|
|
306
|
-
}), /* @__PURE__ */
|
|
298
|
+
}), /* @__PURE__ */ h("p", {
|
|
307
299
|
className: "text-sm font-medium mt-1",
|
|
308
|
-
children:
|
|
300
|
+
children: I.createdBy
|
|
309
301
|
})] }),
|
|
310
|
-
/* @__PURE__ */
|
|
302
|
+
/* @__PURE__ */ g("div", { children: [/* @__PURE__ */ h("p", {
|
|
311
303
|
className: "text-xs text-text-secondary",
|
|
312
304
|
children: Y("security.secretDetail.details.createdAt", "Created At")
|
|
313
|
-
}), /* @__PURE__ */
|
|
305
|
+
}), /* @__PURE__ */ g("div", {
|
|
314
306
|
className: "flex items-center gap-1.5 text-sm mt-1",
|
|
315
|
-
children: [/* @__PURE__ */
|
|
307
|
+
children: [/* @__PURE__ */ h(y, { className: "size-3.5" }), new Date(I.createdAt).toLocaleDateString()]
|
|
316
308
|
})] }),
|
|
317
|
-
|
|
309
|
+
I.lastRotatedAt && /* @__PURE__ */ g("div", { children: [/* @__PURE__ */ h("p", {
|
|
318
310
|
className: "text-xs text-text-secondary",
|
|
319
311
|
children: Y("security.secretDetail.details.lastRotation", "Last Rotation")
|
|
320
|
-
}), /* @__PURE__ */
|
|
312
|
+
}), /* @__PURE__ */ h("p", {
|
|
321
313
|
className: "text-sm mt-1",
|
|
322
|
-
children: new Date(
|
|
314
|
+
children: new Date(I.lastRotatedAt).toLocaleString()
|
|
323
315
|
})] })
|
|
324
316
|
]
|
|
325
317
|
})]
|
|
326
|
-
}), /* @__PURE__ */
|
|
327
|
-
|
|
328
|
-
|
|
318
|
+
}), /* @__PURE__ */ g(D, {
|
|
319
|
+
treatment: "insight",
|
|
320
|
+
className: "p-6 space-y-4",
|
|
321
|
+
children: [/* @__PURE__ */ g("h3", {
|
|
329
322
|
className: "font-bold text-sm text-primary flex items-center gap-2",
|
|
330
|
-
children: [/* @__PURE__ */
|
|
331
|
-
}), /* @__PURE__ */
|
|
323
|
+
children: [/* @__PURE__ */ h(ve, { className: "size-4" }), Y("security.secretDetail.security.title", "Security")]
|
|
324
|
+
}), /* @__PURE__ */ h("p", {
|
|
332
325
|
className: "text-xs text-text-secondary leading-relaxed",
|
|
333
326
|
children: Y("security.secretDetail.security.description", "This secret is protected by 256-bit encryption. All access is logged and monitored for suspicious activity.")
|
|
334
327
|
})]
|
|
@@ -336,75 +329,68 @@ function D() {
|
|
|
336
329
|
})]
|
|
337
330
|
})]
|
|
338
331
|
}),
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
className: "flex items-center justify-between p-6 border-b border-border-subtle",
|
|
350
|
-
children: [/* @__PURE__ */ y("div", {
|
|
332
|
+
/* @__PURE__ */ h(C, {
|
|
333
|
+
open: He,
|
|
334
|
+
onOpenChange: (e) => {
|
|
335
|
+
e || K(!1);
|
|
336
|
+
},
|
|
337
|
+
children: /* @__PURE__ */ g(w, {
|
|
338
|
+
className: "max-w-2xl border-primary/20 max-h-[80vh] flex flex-col gap-0 p-0",
|
|
339
|
+
children: [/* @__PURE__ */ h(T, {
|
|
340
|
+
className: "p-6 border-b border-border-subtle text-left",
|
|
341
|
+
children: /* @__PURE__ */ g("div", {
|
|
351
342
|
className: "flex items-center gap-3",
|
|
352
|
-
children: [/* @__PURE__ */
|
|
343
|
+
children: [/* @__PURE__ */ h("div", {
|
|
353
344
|
className: "p-2 rounded-full bg-action-primary-bg/10 text-primary",
|
|
354
|
-
children: /* @__PURE__ */
|
|
355
|
-
}), /* @__PURE__ */
|
|
356
|
-
className: "text-xl font-bold
|
|
345
|
+
children: /* @__PURE__ */ h(b, { className: "size-5" })
|
|
346
|
+
}), /* @__PURE__ */ h(E, {
|
|
347
|
+
className: "text-xl font-bold",
|
|
357
348
|
children: Y("security.secretDetail.history.modalTitle", "Version History")
|
|
358
349
|
})]
|
|
359
|
-
})
|
|
360
|
-
|
|
361
|
-
onClick: () => K(!1),
|
|
362
|
-
className: "p-2 rounded-md hover:bg-bg-sunken text-text-secondary transition-colors",
|
|
363
|
-
children: /* @__PURE__ */ v(T, { className: "size-5" })
|
|
364
|
-
})]
|
|
365
|
-
}), /* @__PURE__ */ v("div", {
|
|
350
|
+
})
|
|
351
|
+
}), /* @__PURE__ */ h("div", {
|
|
366
352
|
className: "p-6 overflow-y-auto flex-1",
|
|
367
|
-
children:
|
|
353
|
+
children: Te ? /* @__PURE__ */ h("div", {
|
|
368
354
|
className: "flex justify-center py-8",
|
|
369
|
-
children: /* @__PURE__ */
|
|
370
|
-
}) : /* @__PURE__ */
|
|
355
|
+
children: /* @__PURE__ */ h(x, { className: "size-8 animate-spin text-primary/60" })
|
|
356
|
+
}) : /* @__PURE__ */ h("div", {
|
|
371
357
|
className: "space-y-4",
|
|
372
|
-
children:
|
|
373
|
-
className: n("p-4 rounded-lg border", e.version ===
|
|
374
|
-
children: /* @__PURE__ */
|
|
358
|
+
children: Ee.map((e) => /* @__PURE__ */ h("div", {
|
|
359
|
+
className: n("p-4 rounded-lg border", e.version === I.version ? "bg-action-primary-bg/5 border-primary/20" : "bg-bg-surface border-border-subtle"),
|
|
360
|
+
children: /* @__PURE__ */ g("div", {
|
|
375
361
|
className: "flex items-center justify-between",
|
|
376
|
-
children: [/* @__PURE__ */
|
|
377
|
-
/* @__PURE__ */
|
|
362
|
+
children: [/* @__PURE__ */ g("div", { children: [
|
|
363
|
+
/* @__PURE__ */ g("div", {
|
|
378
364
|
className: "flex items-center gap-2",
|
|
379
|
-
children: [/* @__PURE__ */
|
|
365
|
+
children: [/* @__PURE__ */ h("span", {
|
|
380
366
|
className: "font-semibold",
|
|
381
367
|
children: Y("security.secretDetail.history.versionLabel", "Version {version}", { version: e.version })
|
|
382
|
-
}), e.version ===
|
|
368
|
+
}), e.version === I.version && /* @__PURE__ */ h(i, {
|
|
383
369
|
variant: "success",
|
|
384
370
|
className: "text-[10px] uppercase",
|
|
385
371
|
children: Y("security.common.status.active", "Active")
|
|
386
372
|
})]
|
|
387
373
|
}),
|
|
388
|
-
/* @__PURE__ */
|
|
374
|
+
/* @__PURE__ */ h("p", {
|
|
389
375
|
className: "text-xs text-text-secondary mt-1",
|
|
390
376
|
children: Y("security.secretDetail.history.versionMeta", "{date} by {createdBy}", {
|
|
391
377
|
date: new Date(e.createdAt).toLocaleString(),
|
|
392
378
|
createdBy: e.createdBy
|
|
393
379
|
})
|
|
394
380
|
}),
|
|
395
|
-
e.changeReason && /* @__PURE__ */
|
|
381
|
+
e.changeReason && /* @__PURE__ */ h("p", {
|
|
396
382
|
className: "text-sm mt-2",
|
|
397
383
|
children: e.changeReason
|
|
398
384
|
})
|
|
399
|
-
] }), e.version !==
|
|
385
|
+
] }), e.version !== I.version && /* @__PURE__ */ h(oe, {
|
|
400
386
|
permission: "secret:update",
|
|
401
387
|
featureFlagKey: t.SECRET_ROLLBACK,
|
|
402
388
|
featureFlagDefault: !1,
|
|
403
|
-
children: /* @__PURE__ */
|
|
389
|
+
children: /* @__PURE__ */ h(a, {
|
|
404
390
|
variant: "outline",
|
|
405
391
|
size: "sm",
|
|
406
|
-
onClick: () =>
|
|
407
|
-
disabled:
|
|
392
|
+
onClick: () => Ke(e.version),
|
|
393
|
+
disabled: Pe,
|
|
408
394
|
children: Y("security.secretDetail.actions.rollback", "Rollback")
|
|
409
395
|
})
|
|
410
396
|
})]
|
|
@@ -412,53 +398,54 @@ function D() {
|
|
|
412
398
|
}, e.id))
|
|
413
399
|
})
|
|
414
400
|
})]
|
|
415
|
-
})
|
|
401
|
+
})
|
|
416
402
|
}),
|
|
417
|
-
/* @__PURE__ */
|
|
418
|
-
isOpen:
|
|
419
|
-
onClose: () =>
|
|
403
|
+
/* @__PURE__ */ h(te, {
|
|
404
|
+
isOpen: Re,
|
|
405
|
+
onClose: () => H(!1),
|
|
420
406
|
onConfirm: Z,
|
|
421
407
|
title: Y("security.secretDetail.delete.title", "Delete Secret"),
|
|
422
|
-
description: Y("security.secretDetail.delete.description", "Are you sure you want to delete \"{name}\"? This action cannot be undone and will permanently remove this secret from the vault.", { name:
|
|
423
|
-
confirmLabel:
|
|
408
|
+
description: Y("security.secretDetail.delete.description", "Are you sure you want to delete \"{name}\"? This action cannot be undone and will permanently remove this secret from the vault.", { name: I.name }),
|
|
409
|
+
confirmLabel: je ? Y("security.secretDetail.delete.deleting", "Deleting...") : Y("security.secretDetail.delete.confirm", "Delete Secret"),
|
|
424
410
|
variant: "destructive"
|
|
425
411
|
}),
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
children: /* @__PURE__ */ y("div", {
|
|
436
|
-
className: "p-6 space-y-4",
|
|
412
|
+
/* @__PURE__ */ h(C, {
|
|
413
|
+
open: Be,
|
|
414
|
+
onOpenChange: (e) => {
|
|
415
|
+
e || W(!1);
|
|
416
|
+
},
|
|
417
|
+
children: /* @__PURE__ */ h(w, {
|
|
418
|
+
className: "max-w-md border-primary/20",
|
|
419
|
+
children: /* @__PURE__ */ g("div", {
|
|
420
|
+
className: "space-y-4",
|
|
437
421
|
children: [
|
|
438
|
-
/* @__PURE__ */
|
|
439
|
-
className: "
|
|
440
|
-
children:
|
|
441
|
-
className: "
|
|
442
|
-
children: /* @__PURE__ */
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
422
|
+
/* @__PURE__ */ h(T, {
|
|
423
|
+
className: "text-left",
|
|
424
|
+
children: /* @__PURE__ */ g("div", {
|
|
425
|
+
className: "flex items-center gap-3",
|
|
426
|
+
children: [/* @__PURE__ */ h("div", {
|
|
427
|
+
className: "p-2 rounded-full bg-action-primary-bg/10 text-primary",
|
|
428
|
+
children: /* @__PURE__ */ h(S, { className: "size-5" })
|
|
429
|
+
}), /* @__PURE__ */ h(E, {
|
|
430
|
+
className: "text-xl font-bold",
|
|
431
|
+
children: Y("security.secretDetail.rotate.title", "Rotate Secret")
|
|
432
|
+
})]
|
|
433
|
+
})
|
|
447
434
|
}),
|
|
448
|
-
/* @__PURE__ */
|
|
435
|
+
/* @__PURE__ */ h("p", {
|
|
449
436
|
className: "text-sm text-text-secondary",
|
|
450
|
-
children: Y("security.secretDetail.rotate.description", "Enter a new value for {name}. The current value will be moved to version history.", { name:
|
|
437
|
+
children: Y("security.secretDetail.rotate.description", "Enter a new value for {name}. The current value will be moved to version history.", { name: I.name })
|
|
451
438
|
}),
|
|
452
|
-
/* @__PURE__ */
|
|
439
|
+
/* @__PURE__ */ g("div", {
|
|
453
440
|
className: "space-y-2",
|
|
454
|
-
children: [/* @__PURE__ */
|
|
441
|
+
children: [/* @__PURE__ */ h("label", {
|
|
455
442
|
htmlFor: "new-secret-value",
|
|
456
443
|
className: "text-sm font-medium",
|
|
457
444
|
children: Y("security.secretDetail.rotate.newValue", "New Secret Value")
|
|
458
|
-
}), /* @__PURE__ */
|
|
445
|
+
}), /* @__PURE__ */ h("textarea", {
|
|
459
446
|
id: "new-secret-value",
|
|
460
447
|
"aria-label": Y("security.secretDetail.rotate.newValue", "New Secret Value"),
|
|
461
|
-
ref:
|
|
448
|
+
ref: G,
|
|
462
449
|
value: q,
|
|
463
450
|
onChange: (e) => J(e.target.value),
|
|
464
451
|
placeholder: Y("security.secretDetail.rotate.placeholder", "Enter new secret value..."),
|
|
@@ -466,34 +453,34 @@ function D() {
|
|
|
466
453
|
className: n("w-full rounded-md border border-border-subtle bg-bg-surface px-3 py-2 text-sm font-mono transition-all", "focus:outline-none focus:ring-2 focus:ring-primary/50 focus:border-primary", "placeholder:text-text-secondary/50")
|
|
467
454
|
})]
|
|
468
455
|
}),
|
|
469
|
-
/* @__PURE__ */
|
|
456
|
+
/* @__PURE__ */ g("div", {
|
|
470
457
|
className: "flex justify-end gap-3 pt-2",
|
|
471
|
-
children: [/* @__PURE__ */
|
|
458
|
+
children: [/* @__PURE__ */ h(a, {
|
|
472
459
|
variant: "outline",
|
|
473
|
-
onClick: () =>
|
|
460
|
+
onClick: () => W(!1),
|
|
474
461
|
disabled: z,
|
|
475
462
|
children: Y("security.common.actions.cancel", "Cancel")
|
|
476
|
-
}), /* @__PURE__ */
|
|
477
|
-
onClick:
|
|
463
|
+
}), /* @__PURE__ */ g(a, {
|
|
464
|
+
onClick: Ge,
|
|
478
465
|
disabled: z || !q.trim(),
|
|
479
|
-
children: [z ? /* @__PURE__ */
|
|
466
|
+
children: [z ? /* @__PURE__ */ h(x, { className: "size-4 animate-spin" }) : /* @__PURE__ */ h(S, { className: "size-4" }), z ? Y("security.secretDetail.rotate.loading", "Rotating...") : Y("security.secretDetail.rotate.confirm", "Rotate Secret")]
|
|
480
467
|
})]
|
|
481
468
|
})
|
|
482
469
|
]
|
|
483
470
|
})
|
|
484
|
-
})
|
|
471
|
+
})
|
|
485
472
|
}),
|
|
486
|
-
|
|
487
|
-
isOpen:
|
|
488
|
-
onClose: () =>
|
|
489
|
-
vaultId:
|
|
490
|
-
secretId:
|
|
491
|
-
name:
|
|
473
|
+
k && A && /* @__PURE__ */ h(ue, {
|
|
474
|
+
isOpen: ze,
|
|
475
|
+
onClose: () => U(!1),
|
|
476
|
+
vaultId: k,
|
|
477
|
+
secretId: A,
|
|
478
|
+
name: I.name
|
|
492
479
|
})
|
|
493
480
|
]
|
|
494
481
|
});
|
|
495
482
|
}
|
|
496
483
|
//#endregion
|
|
497
|
-
export {
|
|
484
|
+
export { k as SecretDetailPage };
|
|
498
485
|
|
|
499
486
|
//# sourceMappingURL=SecretDetailPage.js.map
|