@kong-ui-public/entities-vaults 3.26.11-pr.2640.fb8bab909.0 → 3.27.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.
- package/dist/entities-vaults.es.js +867 -773
- package/dist/entities-vaults.umd.js +1 -1
- package/dist/style.css +1 -1
- package/dist/types/components/VaultForm.vue.d.ts.map +1 -1
- package/dist/types/types/vault-form.d.ts +11 -1
- package/dist/types/types/vault-form.d.ts.map +1 -1
- package/package.json +3 -3
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { useRouter as
|
|
3
|
-
import { BookIcon as Me, AddIcon as
|
|
4
|
-
import { useAxios as _e, useTableState as ft, useFetcher as De, useDeleteUrlBuilder as We, FetcherStatus as Be, EntityBaseTable as Le, PermissionsWrapper as ge, TableTags as pt, EntityFilter as ze, EntityDeleteModal as Ge, EntityTypes as Je, useErrors as Ze, EntityBaseFormType as Ve, useGatewayFeatureSupported as mt, EntityBaseForm as Qe, SupportedEntityType as Ue, EntityFormSection as
|
|
5
|
-
import { createI18n as
|
|
1
|
+
import { defineComponent as ce, ref as $, computed as w, watch as ke, onBeforeMount as we, resolveComponent as L, createElementBlock as D, openBlock as V, createVNode as d, unref as e, createSlots as Ke, withCtx as m, createTextVNode as de, toDisplayString as H, createElementVNode as x, createBlock as W, Teleport as Ye, createCommentVNode as B, reactive as ye, resolveDynamicComponent as Pe, TransitionGroup as Xe, Fragment as qe, renderList as et, mergeProps as je, normalizeClass as tt, nextTick as lt, renderSlot as ot } from "vue";
|
|
2
|
+
import { useRouter as Ee } from "vue-router";
|
|
3
|
+
import { BookIcon as Me, AddIcon as Ae, SecurityIcon as at, ConjourIcon as rt, AzureIcon as it, HashicorpIcon as nt, GoogleCloudIcon as st, AwsIcon as ut, CodeIcon as dt, KongIcon as ct } from "@kong/icons";
|
|
4
|
+
import { useAxios as _e, useTableState as ft, useFetcher as De, useDeleteUrlBuilder as We, FetcherStatus as Be, EntityBaseTable as Le, PermissionsWrapper as ge, TableTags as pt, EntityFilter as ze, EntityDeleteModal as Ge, EntityTypes as Je, useErrors as Ze, EntityBaseFormType as Ve, useGatewayFeatureSupported as mt, EntityBaseForm as Qe, SupportedEntityType as Ue, EntityFormSection as Re, useStringHelpers as vt, useHelpers as gt, ConfigurationSchemaType as Se, ConfigurationSchemaSection as Oe, EntityBaseConfigCard as bt, ConfigCardItem as _t, useDebouncedFilter as Ne } from "@kong-ui-public/entities-shared";
|
|
5
|
+
import { createI18n as ht, i18nTComponent as yt } from "@kong-ui-public/i18n";
|
|
6
6
|
const Vt = {
|
|
7
7
|
create: "New vault",
|
|
8
8
|
copy_id: "Copy ID",
|
|
@@ -84,7 +84,7 @@ const Vt = {
|
|
|
84
84
|
success_brief: "Successfully copied to clipboard"
|
|
85
85
|
}, xt = {
|
|
86
86
|
vault_type: "Vault Type"
|
|
87
|
-
},
|
|
87
|
+
}, At = {
|
|
88
88
|
sections: {
|
|
89
89
|
general: {
|
|
90
90
|
title: "General Information",
|
|
@@ -303,6 +303,23 @@ const Vt = {
|
|
|
303
303
|
},
|
|
304
304
|
cert_auth_role_name: {
|
|
305
305
|
label: "Role Name"
|
|
306
|
+
},
|
|
307
|
+
oauth2_audiences: {
|
|
308
|
+
label: "OAuth2 Audiences",
|
|
309
|
+
tooltip: "Comma-separated list of OAuth2 audiences."
|
|
310
|
+
},
|
|
311
|
+
oauth2_client_id: {
|
|
312
|
+
label: "OAuth2 Client ID"
|
|
313
|
+
},
|
|
314
|
+
oauth2_client_secret: {
|
|
315
|
+
label: "OAuth2 Client Secret"
|
|
316
|
+
},
|
|
317
|
+
oauth2_role_name: {
|
|
318
|
+
label: "OAuth2 Role Name",
|
|
319
|
+
tooltip: "The configured role name in HashiCorp Vault for OAuth2 auth. When creating the role in HashiCorp Vault, make sure that the `role_type` is `jwt` and the `token_policies` have permissions to read the secrets."
|
|
320
|
+
},
|
|
321
|
+
oauth2_token_endpoint: {
|
|
322
|
+
label: "OAuth2 Token Endpoint"
|
|
306
323
|
}
|
|
307
324
|
}
|
|
308
325
|
},
|
|
@@ -370,7 +387,7 @@ const Vt = {
|
|
|
370
387
|
}
|
|
371
388
|
},
|
|
372
389
|
unavailable: "This vault provider is available on Enterprise."
|
|
373
|
-
},
|
|
390
|
+
}, Rt = {
|
|
374
391
|
title: "Look up Key in Vault",
|
|
375
392
|
vault: {
|
|
376
393
|
label: "Vault",
|
|
@@ -399,7 +416,7 @@ const Vt = {
|
|
|
399
416
|
complete_action: "Look up {cta}",
|
|
400
417
|
cta: "key in vault"
|
|
401
418
|
}
|
|
402
|
-
},
|
|
419
|
+
}, Et = {
|
|
403
420
|
actions: Vt,
|
|
404
421
|
delete: {
|
|
405
422
|
title: "Delete a Vault",
|
|
@@ -412,24 +429,24 @@ const Vt = {
|
|
|
412
429
|
secrets: St,
|
|
413
430
|
copy: It,
|
|
414
431
|
labels: xt,
|
|
415
|
-
form:
|
|
416
|
-
vault_secret_picker:
|
|
432
|
+
form: At,
|
|
433
|
+
vault_secret_picker: Rt
|
|
417
434
|
};
|
|
418
435
|
function Ut() {
|
|
419
|
-
const
|
|
436
|
+
const o = ht("en-us", Et);
|
|
420
437
|
return {
|
|
421
|
-
i18n:
|
|
422
|
-
i18nT:
|
|
438
|
+
i18n: o,
|
|
439
|
+
i18nT: yt(o)
|
|
423
440
|
// Translation component <i18n-t>
|
|
424
441
|
};
|
|
425
442
|
}
|
|
426
|
-
const
|
|
443
|
+
const he = {
|
|
427
444
|
useI18n: Ut
|
|
428
|
-
}, Ie = "/v2/control-planes/{controlPlaneId}/core-entities",
|
|
445
|
+
}, Ie = "/v2/control-planes/{controlPlaneId}/core-entities", Fe = "/v2/control-planes/{controlPlaneId}/config-stores", xe = "/{workspace}", pe = {
|
|
429
446
|
list: {
|
|
430
447
|
konnect: {
|
|
431
448
|
getAll: `${Ie}/vaults`,
|
|
432
|
-
deleteConfigStore: `${
|
|
449
|
+
deleteConfigStore: `${Fe}/{id}?force=true`
|
|
433
450
|
},
|
|
434
451
|
kongManager: {
|
|
435
452
|
getAll: `${xe}/vaults`
|
|
@@ -438,7 +455,7 @@ const ye = {
|
|
|
438
455
|
form: {
|
|
439
456
|
konnect: {
|
|
440
457
|
create: `${Ie}/vaults`,
|
|
441
|
-
createConfigStore:
|
|
458
|
+
createConfigStore: Fe,
|
|
442
459
|
edit: `${Ie}/vaults/{id}`
|
|
443
460
|
},
|
|
444
461
|
kongManager: {
|
|
@@ -446,14 +463,14 @@ const ye = {
|
|
|
446
463
|
edit: `${xe}/vaults/{id}`
|
|
447
464
|
}
|
|
448
465
|
}
|
|
449
|
-
}, Tt = { class: "kong-ui-entities-vaults-list" },
|
|
466
|
+
}, Tt = { class: "kong-ui-entities-vaults-list" }, Ht = { class: "button-row" }, $t = { class: "table-content-overflow-wrapper" }, Kt = { class: "table-content-overflow-wrapper" }, Pt = /* @__PURE__ */ ce({
|
|
450
467
|
__name: "VaultList",
|
|
451
468
|
props: {
|
|
452
469
|
/** The base konnect or kongManger config. Pass additional config props in the shared entity component as needed. */
|
|
453
470
|
config: {
|
|
454
471
|
type: Object,
|
|
455
472
|
required: !0,
|
|
456
|
-
validator: (
|
|
473
|
+
validator: (o) => !(!o || !["konnect", "kongManager"].includes(o == null ? void 0 : o.app) || !o.createRoute || !o.getViewRoute || !o.getEditRoute || o.app === "kongManager" && !o.isExactMatch && !o.filterSchema)
|
|
457
474
|
},
|
|
458
475
|
// used to override the default identifier for the cache entry
|
|
459
476
|
cacheIdentifier: {
|
|
@@ -491,153 +508,153 @@ const ye = {
|
|
|
491
508
|
}
|
|
492
509
|
},
|
|
493
510
|
emits: ["error", "click:learn-more", "copy:success", "copy:error", "delete:success"],
|
|
494
|
-
setup(
|
|
511
|
+
setup(o, { emit: S }) {
|
|
495
512
|
var fe;
|
|
496
|
-
const
|
|
513
|
+
const c = S, u = o, { i18n: { t: p } } = he.useI18n(), a = Ee(), { axiosInstance: K } = _e((fe = u.config) == null ? void 0 : fe.axiosRequestConfig), { hasRecords: I, handleStateChange: h } = ft(() => Q.value), n = w(() => I.value && u.config.app === "konnect"), g = w(() => u.config.app !== "kongManager" || !!u.config.disableSorting), f = {
|
|
497
514
|
// the Prefix column is non-hidable
|
|
498
515
|
prefix: { label: p("vaults.list.table_headers.prefix"), searchable: !0, sortable: !0, hidable: !1 },
|
|
499
516
|
// it's "Vault Type" on display, but we still use "name" to fit API schema
|
|
500
517
|
name: { label: p("vaults.list.table_headers.name"), searchable: !0, sortable: !0 },
|
|
501
518
|
description: { label: p("vaults.list.table_headers.description"), sortable: !1 },
|
|
502
519
|
tags: { label: p("vaults.list.table_headers.tags"), sortable: !1 }
|
|
503
|
-
},
|
|
504
|
-
var E,
|
|
505
|
-
let k = `${
|
|
506
|
-
return
|
|
520
|
+
}, O = f, X = w(() => {
|
|
521
|
+
var E, U;
|
|
522
|
+
let k = `${u.config.apiBaseUrl}${pe.list[u.config.app].getAll}`;
|
|
523
|
+
return u.config.app === "konnect" ? k = k.replace(/{controlPlaneId}/gi, ((E = u.config) == null ? void 0 : E.controlPlaneId) || "") : u.config.app === "kongManager" && (k = k.replace(/\/{workspace}/gi, (U = u.config) != null && U.workspace ? `/${u.config.workspace}` : "")), k;
|
|
507
524
|
}), Q = $(""), Y = w(() => {
|
|
508
|
-
if (
|
|
525
|
+
if (u.config.app === "konnect" || u.config.isExactMatch)
|
|
509
526
|
return {
|
|
510
527
|
isExactMatch: !0,
|
|
511
528
|
placeholder: p("search.placeholder_for_vaults.konnect")
|
|
512
529
|
};
|
|
513
|
-
const { prefix: E, name:
|
|
530
|
+
const { prefix: E, name: U } = f;
|
|
514
531
|
return {
|
|
515
532
|
isExactMatch: !1,
|
|
516
|
-
fields: { name:
|
|
517
|
-
schema:
|
|
533
|
+
fields: { name: U, prefix: E },
|
|
534
|
+
schema: u.config.filterSchema
|
|
518
535
|
};
|
|
519
536
|
}), {
|
|
520
|
-
fetcher:
|
|
521
|
-
fetcherState:
|
|
537
|
+
fetcher: F,
|
|
538
|
+
fetcherState: l,
|
|
522
539
|
fetcherCacheKey: ae
|
|
523
|
-
} = De(w(() => ({ ...
|
|
540
|
+
} = De(w(() => ({ ...u.config, cacheIdentifier: u.cacheIdentifier })), X), G = () => {
|
|
524
541
|
Q.value = "";
|
|
525
542
|
}, ee = () => {
|
|
526
543
|
ae.value++;
|
|
527
544
|
}, J = $(null), y = async (k, E) => {
|
|
528
|
-
const
|
|
529
|
-
if (!await E(
|
|
530
|
-
|
|
545
|
+
const U = k.id;
|
|
546
|
+
if (!await E(U)) {
|
|
547
|
+
c("copy:error", {
|
|
531
548
|
entity: k,
|
|
532
549
|
field: "id",
|
|
533
550
|
message: p("errors.copy")
|
|
534
551
|
});
|
|
535
552
|
return;
|
|
536
553
|
}
|
|
537
|
-
|
|
554
|
+
c("copy:success", {
|
|
538
555
|
entity: k,
|
|
539
556
|
field: "id",
|
|
540
|
-
message: p("copy.success", { val:
|
|
557
|
+
message: p("copy.success", { val: U })
|
|
541
558
|
});
|
|
542
|
-
},
|
|
543
|
-
const
|
|
544
|
-
if (!await E(
|
|
545
|
-
|
|
559
|
+
}, N = async (k, E) => {
|
|
560
|
+
const U = JSON.stringify(k);
|
|
561
|
+
if (!await E(U)) {
|
|
562
|
+
c("copy:error", {
|
|
546
563
|
entity: k,
|
|
547
564
|
message: p("errors.copy")
|
|
548
565
|
});
|
|
549
566
|
return;
|
|
550
567
|
}
|
|
551
|
-
|
|
568
|
+
c("copy:success", {
|
|
552
569
|
entity: k,
|
|
553
570
|
message: p("copy.success_brief")
|
|
554
571
|
});
|
|
555
572
|
}, re = async (k) => {
|
|
556
|
-
var
|
|
557
|
-
await ((
|
|
573
|
+
var U;
|
|
574
|
+
await ((U = u.canRetrieve) == null ? void 0 : U.call(u, k)) && a.push(u.config.getViewRoute(k.id));
|
|
558
575
|
}, ne = (k) => ({
|
|
559
576
|
label: p("actions.view"),
|
|
560
|
-
to:
|
|
577
|
+
to: u.config.getViewRoute(k)
|
|
561
578
|
}), le = (k) => ({
|
|
562
579
|
label: p("actions.edit"),
|
|
563
|
-
to:
|
|
564
|
-
}), q = $(void 0), ie = $(!1),
|
|
580
|
+
to: u.config.getEditRoute(k)
|
|
581
|
+
}), q = $(void 0), ie = $(!1), T = $(!1), Z = $(""), te = We(u.config, X.value), b = (k) => {
|
|
565
582
|
q.value = k, ie.value = !0;
|
|
566
583
|
}, v = () => {
|
|
567
584
|
ie.value = !1;
|
|
568
585
|
}, P = async (k) => {
|
|
569
|
-
const { apiBaseUrl: E, app:
|
|
586
|
+
const { apiBaseUrl: E, app: U, controlPlaneId: s } = u.config, r = `${E}${pe.list[U].deleteConfigStore}`.replace(/{controlPlaneId}/gi, s || "").replace(/{id}/gi, k);
|
|
570
587
|
try {
|
|
571
588
|
await K.delete(r);
|
|
572
589
|
} catch {
|
|
573
590
|
}
|
|
574
|
-
},
|
|
575
|
-
var k, E,
|
|
591
|
+
}, M = async () => {
|
|
592
|
+
var k, E, U, s;
|
|
576
593
|
if ((k = q.value) != null && k.id) {
|
|
577
|
-
|
|
594
|
+
T.value = !0;
|
|
578
595
|
try {
|
|
579
|
-
await K.delete(te(q.value.id)),
|
|
596
|
+
await K.delete(te(q.value.id)), u.config.app === "konnect" && ((E = q.value.config) != null && E.config_store_id) && P(q.value.config.config_store_id), T.value = !1, ie.value = !1, ae.value++, c("delete:success", q.value);
|
|
580
597
|
} catch (r) {
|
|
581
|
-
Z.value = ((
|
|
598
|
+
Z.value = ((s = (U = r.response) == null ? void 0 : U.data) == null ? void 0 : s.message) || r.message || p("errors.delete"), c("error", r);
|
|
582
599
|
} finally {
|
|
583
|
-
|
|
600
|
+
T.value = !1;
|
|
584
601
|
}
|
|
585
602
|
}
|
|
586
603
|
}, se = () => {
|
|
587
|
-
a.push(
|
|
604
|
+
a.push(u.config.createRoute);
|
|
588
605
|
};
|
|
589
|
-
ke(
|
|
590
|
-
var E,
|
|
606
|
+
ke(l, (k) => {
|
|
607
|
+
var E, U, s;
|
|
591
608
|
if (k.status === Be.Error) {
|
|
592
609
|
J.value = {
|
|
593
610
|
title: p("errors.general")
|
|
594
|
-
}, (
|
|
611
|
+
}, (s = (U = (E = k.error) == null ? void 0 : E.response) == null ? void 0 : U.data) != null && s.message && (J.value.message = k.error.response.data.message), c("error", k.error);
|
|
595
612
|
return;
|
|
596
613
|
}
|
|
597
614
|
J.value = null;
|
|
598
615
|
});
|
|
599
616
|
const j = $({
|
|
600
|
-
ctaPath:
|
|
617
|
+
ctaPath: u.config.createRoute,
|
|
601
618
|
ctaText: void 0,
|
|
602
|
-
message: `${p("vaults.list.empty_state.description")}${
|
|
619
|
+
message: `${p("vaults.list.empty_state.description")}${u.config.additionMessageForEmptyState ? ` ${u.config.additionMessageForEmptyState}` : ""}`,
|
|
603
620
|
title: p("vaults.title")
|
|
604
|
-
}),
|
|
621
|
+
}), A = $(!1);
|
|
605
622
|
return we(async () => {
|
|
606
|
-
|
|
623
|
+
A.value = await u.canCreate(), A.value && (j.value.title = p("vaults.list.empty_state.title"), j.value.ctaText = p("actions.create"));
|
|
607
624
|
}), (k, E) => {
|
|
608
|
-
const
|
|
609
|
-
return V(),
|
|
610
|
-
|
|
611
|
-
"cache-identifier":
|
|
625
|
+
const U = L("KButton"), s = L("KEmptyState"), r = L("KDropdownItem"), z = L("KClipboardProvider");
|
|
626
|
+
return V(), D("div", Tt, [
|
|
627
|
+
d(e(Le), {
|
|
628
|
+
"cache-identifier": o.cacheIdentifier,
|
|
612
629
|
"disable-sorting": g.value,
|
|
613
630
|
"empty-state-options": j.value,
|
|
614
631
|
"enable-entity-actions": "",
|
|
615
632
|
"error-message": J.value,
|
|
616
|
-
fetcher: e(
|
|
633
|
+
fetcher: e(F),
|
|
617
634
|
"fetcher-cache-key": e(ae),
|
|
618
635
|
"pagination-type": "offset",
|
|
619
636
|
"preferences-storage-key": "kong-ui-entities-vaults-list",
|
|
620
637
|
query: Q.value,
|
|
621
|
-
"table-headers": e(
|
|
638
|
+
"table-headers": e(O),
|
|
622
639
|
onClearSearchInput: G,
|
|
623
640
|
"onClick:row": E[3] || (E[3] = (C) => re(C)),
|
|
624
641
|
onSort: ee,
|
|
625
|
-
onState: e(
|
|
626
|
-
},
|
|
642
|
+
onState: e(h)
|
|
643
|
+
}, Ke({
|
|
627
644
|
"toolbar-filter": m(() => [
|
|
628
|
-
|
|
645
|
+
d(e(ze), {
|
|
629
646
|
modelValue: Q.value,
|
|
630
647
|
"onUpdate:modelValue": E[0] || (E[0] = (C) => Q.value = C),
|
|
631
648
|
config: Y.value
|
|
632
649
|
}, null, 8, ["modelValue", "config"])
|
|
633
650
|
]),
|
|
634
651
|
"toolbar-button": m(() => [
|
|
635
|
-
(V(),
|
|
636
|
-
disabled: !
|
|
652
|
+
(V(), W(Ye, {
|
|
653
|
+
disabled: !o.useActionOutside,
|
|
637
654
|
to: "#kong-ui-app-page-header-action-button"
|
|
638
655
|
}, [
|
|
639
|
-
x("div",
|
|
640
|
-
|
|
656
|
+
x("div", Ht, [
|
|
657
|
+
n.value ? (V(), W(U, {
|
|
641
658
|
key: 0,
|
|
642
659
|
appearance: "secondary",
|
|
643
660
|
class: "open-learning-hub",
|
|
@@ -646,23 +663,23 @@ const ye = {
|
|
|
646
663
|
onClick: E[1] || (E[1] = (C) => k.$emit("click:learn-more"))
|
|
647
664
|
}, {
|
|
648
665
|
default: m(() => [
|
|
649
|
-
|
|
666
|
+
d(e(Me), { decorative: "" })
|
|
650
667
|
]),
|
|
651
668
|
_: 1
|
|
652
|
-
})) :
|
|
653
|
-
|
|
654
|
-
"auth-function": () =>
|
|
669
|
+
})) : B("", !0),
|
|
670
|
+
d(e(ge), {
|
|
671
|
+
"auth-function": () => o.canCreate()
|
|
655
672
|
}, {
|
|
656
673
|
default: m(() => [
|
|
657
|
-
|
|
674
|
+
d(U, {
|
|
658
675
|
appearance: "primary",
|
|
659
676
|
"data-testid": "toolbar-add-vault",
|
|
660
|
-
size:
|
|
661
|
-
to:
|
|
677
|
+
size: o.useActionOutside ? "medium" : "large",
|
|
678
|
+
to: o.config.createRoute
|
|
662
679
|
}, {
|
|
663
680
|
default: m(() => [
|
|
664
|
-
|
|
665
|
-
de(" " +
|
|
681
|
+
d(e(Ae)),
|
|
682
|
+
de(" " + H(e(p)("vaults.list.toolbar_actions.new_vault")), 1)
|
|
666
683
|
]),
|
|
667
684
|
_: 1
|
|
668
685
|
}, 8, ["size", "to"])
|
|
@@ -673,53 +690,53 @@ const ye = {
|
|
|
673
690
|
], 8, ["disabled"]))
|
|
674
691
|
]),
|
|
675
692
|
prefix: m(({ rowValue: C }) => [
|
|
676
|
-
x("div",
|
|
677
|
-
x("b", null,
|
|
693
|
+
x("div", $t, [
|
|
694
|
+
x("b", null, H(C ?? "-"), 1)
|
|
678
695
|
])
|
|
679
696
|
]),
|
|
680
697
|
name: m(({ rowValue: C }) => [
|
|
681
|
-
x("b", null,
|
|
698
|
+
x("b", null, H(C ?? "-"), 1)
|
|
682
699
|
]),
|
|
683
700
|
description: m(({ rowValue: C }) => [
|
|
684
|
-
x("div",
|
|
701
|
+
x("div", Kt, H(C ?? "-"), 1)
|
|
685
702
|
]),
|
|
686
703
|
tags: m(({ rowValue: C }) => [
|
|
687
|
-
|
|
704
|
+
d(e(pt), { tags: C }, null, 8, ["tags"])
|
|
688
705
|
]),
|
|
689
706
|
actions: m(({ row: C }) => [
|
|
690
|
-
|
|
691
|
-
default: m(({ copyToClipboard:
|
|
692
|
-
|
|
707
|
+
d(z, null, {
|
|
708
|
+
default: m(({ copyToClipboard: _ }) => [
|
|
709
|
+
d(r, {
|
|
693
710
|
"data-testid": "action-entity-copy-id",
|
|
694
|
-
onClick: (oe) => y(C,
|
|
711
|
+
onClick: (oe) => y(C, _)
|
|
695
712
|
}, {
|
|
696
713
|
default: m(() => [
|
|
697
|
-
de(
|
|
714
|
+
de(H(e(p)("actions.copy_id")), 1)
|
|
698
715
|
]),
|
|
699
716
|
_: 1
|
|
700
717
|
}, 8, ["onClick"])
|
|
701
718
|
]),
|
|
702
719
|
_: 2
|
|
703
720
|
}, 1024),
|
|
704
|
-
|
|
705
|
-
default: m(({ copyToClipboard:
|
|
706
|
-
|
|
721
|
+
d(z, null, {
|
|
722
|
+
default: m(({ copyToClipboard: _ }) => [
|
|
723
|
+
d(r, {
|
|
707
724
|
"data-testid": "action-entity-copy-json",
|
|
708
|
-
onClick: (oe) =>
|
|
725
|
+
onClick: (oe) => N(C, _)
|
|
709
726
|
}, {
|
|
710
727
|
default: m(() => [
|
|
711
|
-
de(
|
|
728
|
+
de(H(e(p)("actions.copy_json")), 1)
|
|
712
729
|
]),
|
|
713
730
|
_: 1
|
|
714
731
|
}, 8, ["onClick"])
|
|
715
732
|
]),
|
|
716
733
|
_: 2
|
|
717
734
|
}, 1024),
|
|
718
|
-
|
|
719
|
-
"auth-function": () =>
|
|
735
|
+
d(e(ge), {
|
|
736
|
+
"auth-function": () => o.canRetrieve(C)
|
|
720
737
|
}, {
|
|
721
738
|
default: m(() => [
|
|
722
|
-
|
|
739
|
+
d(r, {
|
|
723
740
|
"data-testid": "action-entity-view",
|
|
724
741
|
"has-divider": "",
|
|
725
742
|
item: ne(C.id)
|
|
@@ -727,29 +744,29 @@ const ye = {
|
|
|
727
744
|
]),
|
|
728
745
|
_: 2
|
|
729
746
|
}, 1032, ["auth-function"]),
|
|
730
|
-
|
|
731
|
-
"auth-function": () =>
|
|
747
|
+
d(e(ge), {
|
|
748
|
+
"auth-function": () => o.canEdit(C)
|
|
732
749
|
}, {
|
|
733
750
|
default: m(() => [
|
|
734
|
-
|
|
751
|
+
d(r, {
|
|
735
752
|
"data-testid": "action-entity-edit",
|
|
736
753
|
item: le(C.id)
|
|
737
754
|
}, null, 8, ["item"])
|
|
738
755
|
]),
|
|
739
756
|
_: 2
|
|
740
757
|
}, 1032, ["auth-function"]),
|
|
741
|
-
|
|
742
|
-
"auth-function": () =>
|
|
758
|
+
d(e(ge), {
|
|
759
|
+
"auth-function": () => o.canDelete(C)
|
|
743
760
|
}, {
|
|
744
761
|
default: m(() => [
|
|
745
|
-
|
|
762
|
+
d(r, {
|
|
746
763
|
danger: "",
|
|
747
764
|
"data-testid": "action-entity-delete",
|
|
748
765
|
"has-divider": "",
|
|
749
|
-
onClick: (
|
|
766
|
+
onClick: (_) => b(C)
|
|
750
767
|
}, {
|
|
751
768
|
default: m(() => [
|
|
752
|
-
de(
|
|
769
|
+
de(H(e(p)("actions.delete")), 1)
|
|
753
770
|
]),
|
|
754
771
|
_: 1
|
|
755
772
|
}, 8, ["onClick"])
|
|
@@ -759,50 +776,50 @@ const ye = {
|
|
|
759
776
|
]),
|
|
760
777
|
_: 2
|
|
761
778
|
}, [
|
|
762
|
-
!Q.value &&
|
|
779
|
+
!Q.value && o.config.app === "konnect" ? {
|
|
763
780
|
name: "empty-state",
|
|
764
781
|
fn: m(() => {
|
|
765
782
|
var C;
|
|
766
783
|
return [
|
|
767
|
-
|
|
784
|
+
d(s, {
|
|
768
785
|
"data-testid": "vaults-entity-empty-state",
|
|
769
786
|
"icon-background": "",
|
|
770
787
|
message: e(p)("vaults.list.empty_state_v2.description"),
|
|
771
788
|
title: e(p)("vaults.list.empty_state_v2.title")
|
|
772
|
-
},
|
|
789
|
+
}, Ke({
|
|
773
790
|
icon: m(() => [
|
|
774
|
-
|
|
791
|
+
d(e(at), { decorative: "" })
|
|
775
792
|
]),
|
|
776
793
|
action: m(() => [
|
|
777
|
-
|
|
794
|
+
A.value ? (V(), W(U, {
|
|
778
795
|
key: 0,
|
|
779
796
|
"data-testid": "entity-create-button",
|
|
780
797
|
onClick: se
|
|
781
798
|
}, {
|
|
782
799
|
default: m(() => [
|
|
783
|
-
|
|
784
|
-
de(" " +
|
|
800
|
+
d(e(Ae), { decorative: "" }),
|
|
801
|
+
de(" " + H(e(p)("vaults.list.empty_state_v2.create_cta")), 1)
|
|
785
802
|
]),
|
|
786
803
|
_: 1
|
|
787
|
-
})) :
|
|
788
|
-
|
|
804
|
+
})) : B("", !0),
|
|
805
|
+
d(U, {
|
|
789
806
|
appearance: "secondary",
|
|
790
807
|
"data-testid": "entity-learn-more-button",
|
|
791
|
-
onClick: E[2] || (E[2] = (
|
|
808
|
+
onClick: E[2] || (E[2] = (_) => k.$emit("click:learn-more"))
|
|
792
809
|
}, {
|
|
793
810
|
default: m(() => [
|
|
794
|
-
|
|
795
|
-
de(" " +
|
|
811
|
+
d(e(Me), { decorative: "" }),
|
|
812
|
+
de(" " + H(e(p)("vaults.list.empty_state_v2.learn_more")), 1)
|
|
796
813
|
]),
|
|
797
814
|
_: 1
|
|
798
815
|
})
|
|
799
816
|
]),
|
|
800
817
|
_: 2
|
|
801
818
|
}, [
|
|
802
|
-
(C =
|
|
819
|
+
(C = o.config) != null && C.isControlPlaneGroup ? {
|
|
803
820
|
name: "default",
|
|
804
821
|
fn: m(() => [
|
|
805
|
-
de(
|
|
822
|
+
de(H(e(p)("vaults.list.empty_state_v2.group")), 1)
|
|
806
823
|
]),
|
|
807
824
|
key: "0"
|
|
808
825
|
} : void 0
|
|
@@ -812,8 +829,8 @@ const ye = {
|
|
|
812
829
|
key: "0"
|
|
813
830
|
} : void 0
|
|
814
831
|
]), 1032, ["cache-identifier", "disable-sorting", "empty-state-options", "error-message", "fetcher", "fetcher-cache-key", "query", "table-headers", "onState"]),
|
|
815
|
-
|
|
816
|
-
"action-pending":
|
|
832
|
+
d(e(Ge), {
|
|
833
|
+
"action-pending": T.value,
|
|
817
834
|
description: e(p)("delete.description"),
|
|
818
835
|
"entity-name": q.value && (q.value.prefix || q.value.id),
|
|
819
836
|
"entity-type": e(Je).Vault,
|
|
@@ -821,19 +838,19 @@ const ye = {
|
|
|
821
838
|
title: e(p)("delete.title"),
|
|
822
839
|
visible: ie.value,
|
|
823
840
|
onCancel: v,
|
|
824
|
-
onProceed:
|
|
841
|
+
onProceed: M
|
|
825
842
|
}, null, 8, ["action-pending", "description", "entity-name", "entity-type", "error", "title", "visible"])
|
|
826
843
|
]);
|
|
827
844
|
};
|
|
828
845
|
}
|
|
829
|
-
}), me = (
|
|
830
|
-
const
|
|
831
|
-
for (const [
|
|
832
|
-
|
|
833
|
-
return
|
|
834
|
-
}, El = /* @__PURE__ */ me(
|
|
835
|
-
var t = /* @__PURE__ */ ((
|
|
836
|
-
const Mt = { class: "kong-ui-entities-vault-form" },
|
|
846
|
+
}), me = (o, S) => {
|
|
847
|
+
const c = o.__vccOpts || o;
|
|
848
|
+
for (const [u, p] of S)
|
|
849
|
+
c[u] = p;
|
|
850
|
+
return c;
|
|
851
|
+
}, El = /* @__PURE__ */ me(Pt, [["__scopeId", "data-v-0f7e9fff"]]);
|
|
852
|
+
var t = /* @__PURE__ */ ((o) => (o.AWS = "aws", o.GCP = "gcp", o.HCV = "hcv", o.ENV = "env", o.AZURE = "azure", o.KONNECT = "konnect", o.CONJUR = "conjur", o))(t || {}), R = /* @__PURE__ */ ((o) => (o.TOKEN = "token", o.K8S = "kubernetes", o.APP_ROLE = "approle", o.CERT = "cert", o.OAUTH2 = "oauth2", o))(R || {});
|
|
853
|
+
const Mt = { class: "kong-ui-entities-vault-form" }, Ot = { class: "vault-form-provider-cards-container" }, Nt = ["data-testid"], Ft = { class: "provider-item-title-container" }, qt = { class: "provider-item-title" }, jt = { class: "provider-item-description" }, Dt = {
|
|
837
854
|
key: "kong-vault-config-fields",
|
|
838
855
|
class: "vault-form-config-fields-container"
|
|
839
856
|
}, Wt = {
|
|
@@ -848,14 +865,17 @@ const Mt = { class: "kong-ui-entities-vault-form" }, Nt = { class: "vault-form-p
|
|
|
848
865
|
}, zt = {
|
|
849
866
|
key: 3,
|
|
850
867
|
class: "vault-form-config-auth-method-container"
|
|
851
|
-
}, Gt = {
|
|
868
|
+
}, Gt = {
|
|
869
|
+
key: 4,
|
|
870
|
+
class: "vault-form-config-auth-method-container"
|
|
871
|
+
}, Jt = { key: 6 }, Zt = { class: "wrapper" }, Qt = { class: "item-50" }, Yt = { class: "item-50" }, Xt = { class: "wrapper" }, el = { class: "item-100" }, tl = /* @__PURE__ */ ce({
|
|
852
872
|
__name: "VaultForm",
|
|
853
873
|
props: {
|
|
854
874
|
/** The base konnect or kongManger config. Pass additional config props in the shared entity component as needed. */
|
|
855
875
|
config: {
|
|
856
876
|
type: Object,
|
|
857
877
|
required: !0,
|
|
858
|
-
validator: (
|
|
878
|
+
validator: (o) => !(!o || !["konnect", "kongManager"].includes(o == null ? void 0 : o.app) || (o == null ? void 0 : o.app) === "konnect" && !(o != null && o.controlPlaneId) || (o == null ? void 0 : o.app) === "kongManager" && typeof (o == null ? void 0 : o.workspace) != "string" || !(o != null && o.cancelRoute))
|
|
859
879
|
},
|
|
860
880
|
/** If a valid vaultId is provided, it will put the form in Edit mode instead of Create */
|
|
861
881
|
vaultId: {
|
|
@@ -865,9 +885,9 @@ const Mt = { class: "kong-ui-entities-vault-form" }, Nt = { class: "vault-form-p
|
|
|
865
885
|
}
|
|
866
886
|
},
|
|
867
887
|
emits: ["update", "error", "loading"],
|
|
868
|
-
setup(
|
|
869
|
-
var
|
|
870
|
-
const
|
|
888
|
+
setup(o, { emit: S }) {
|
|
889
|
+
var U;
|
|
890
|
+
const c = o, u = S, { i18nT: p, i18n: { t: a } } = he.useI18n(), K = Ee(), { axiosInstance: I } = _e((U = c.config) == null ? void 0 : U.axiosRequestConfig), { getMessageFromError: h } = Ze(), n = ye({
|
|
871
891
|
fields: {
|
|
872
892
|
prefix: "",
|
|
873
893
|
description: "",
|
|
@@ -875,12 +895,12 @@ const Mt = { class: "kong-ui-entities-vault-form" }, Nt = { class: "vault-form-p
|
|
|
875
895
|
},
|
|
876
896
|
isReadonly: !1,
|
|
877
897
|
errorMessage: ""
|
|
878
|
-
}), g =
|
|
898
|
+
}), g = ye({
|
|
879
899
|
prefix: "",
|
|
880
900
|
description: "",
|
|
881
901
|
tags: ""
|
|
882
|
-
}),
|
|
883
|
-
...
|
|
902
|
+
}), f = $(c.config.app === "konnect" ? t.KONNECT : t.ENV), O = $(null), X = $(), Q = w(() => [t.AWS, t.GCP, t.HCV, t.AZURE, t.CONJUR].includes(f.value)), Y = w(() => [
|
|
903
|
+
...c.config.app === "konnect" ? [{
|
|
884
904
|
label: a("form.config.konnect.label"),
|
|
885
905
|
value: t.KONNECT
|
|
886
906
|
}] : [],
|
|
@@ -903,32 +923,32 @@ const Mt = { class: "kong-ui-entities-vault-form" }, Nt = { class: "vault-form-p
|
|
|
903
923
|
value: t.HCV,
|
|
904
924
|
disabled: !le.value
|
|
905
925
|
},
|
|
906
|
-
...
|
|
926
|
+
...c.config.azureVaultProviderAvailable ? [{
|
|
907
927
|
label: a("form.config.azure.label"),
|
|
908
928
|
value: t.AZURE,
|
|
909
929
|
disabled: !le.value
|
|
910
930
|
}] : [],
|
|
911
|
-
...
|
|
931
|
+
...c.config.conjurVaultProviderAvailable ? [{
|
|
912
932
|
label: a("form.config.conjur.label"),
|
|
913
933
|
value: t.CONJUR,
|
|
914
934
|
disabled: !le.value
|
|
915
935
|
}] : []
|
|
916
|
-
]),
|
|
936
|
+
]), F = c.config.base64FieldAvailable ? { base64_decode: !1 } : {}, l = ye({
|
|
917
937
|
[t.KONNECT]: {},
|
|
918
938
|
[t.ENV]: {
|
|
919
939
|
prefix: "",
|
|
920
|
-
...
|
|
940
|
+
...F
|
|
921
941
|
},
|
|
922
942
|
[t.AWS]: {
|
|
923
943
|
region: "",
|
|
924
944
|
endpoint_url: "",
|
|
925
945
|
assume_role_arn: "",
|
|
926
946
|
role_session_name: "KongVault",
|
|
927
|
-
...
|
|
947
|
+
...F
|
|
928
948
|
},
|
|
929
949
|
[t.GCP]: {
|
|
930
950
|
project_id: "",
|
|
931
|
-
...
|
|
951
|
+
...F
|
|
932
952
|
},
|
|
933
953
|
[t.HCV]: {
|
|
934
954
|
protocol: "http",
|
|
@@ -937,7 +957,7 @@ const Mt = { class: "kong-ui-entities-vault-form" }, Nt = { class: "vault-form-p
|
|
|
937
957
|
mount: "secret",
|
|
938
958
|
kv: "v1",
|
|
939
959
|
namespace: "",
|
|
940
|
-
auth_method:
|
|
960
|
+
auth_method: R.TOKEN,
|
|
941
961
|
token: "",
|
|
942
962
|
kube_role: "",
|
|
943
963
|
kube_auth_path: "",
|
|
@@ -950,7 +970,12 @@ const Mt = { class: "kong-ui-entities-vault-form" }, Nt = { class: "vault-form-p
|
|
|
950
970
|
cert_auth_cert: "",
|
|
951
971
|
cert_auth_cert_key: "",
|
|
952
972
|
cert_auth_role_name: "",
|
|
953
|
-
|
|
973
|
+
oauth2_client_id: "",
|
|
974
|
+
oauth2_client_secret: "",
|
|
975
|
+
oauth2_role_name: "",
|
|
976
|
+
oauth2_token_endpoint: "",
|
|
977
|
+
oauth2_audiences: "",
|
|
978
|
+
...F
|
|
954
979
|
},
|
|
955
980
|
[t.AZURE]: {
|
|
956
981
|
location: "",
|
|
@@ -959,29 +984,29 @@ const Mt = { class: "kong-ui-entities-vault-form" }, Nt = { class: "vault-form-p
|
|
|
959
984
|
credentials_prefix: "AZURE",
|
|
960
985
|
client_id: "",
|
|
961
986
|
tenant_id: "",
|
|
962
|
-
...
|
|
987
|
+
...F
|
|
963
988
|
},
|
|
964
989
|
[t.CONJUR]: {
|
|
965
990
|
endpoint_url: "",
|
|
966
991
|
auth_method: "api_key",
|
|
967
|
-
...
|
|
992
|
+
...F
|
|
968
993
|
}
|
|
969
|
-
}), ae =
|
|
994
|
+
}), ae = ye({
|
|
970
995
|
[t.KONNECT]: {},
|
|
971
996
|
[t.ENV]: {
|
|
972
997
|
prefix: "",
|
|
973
|
-
...
|
|
998
|
+
...F
|
|
974
999
|
},
|
|
975
1000
|
[t.AWS]: {
|
|
976
1001
|
region: "",
|
|
977
1002
|
endpoint_url: "",
|
|
978
1003
|
assume_role_arn: "",
|
|
979
1004
|
role_session_name: "KongVault",
|
|
980
|
-
...
|
|
1005
|
+
...F
|
|
981
1006
|
},
|
|
982
1007
|
[t.GCP]: {
|
|
983
1008
|
project_id: "",
|
|
984
|
-
...
|
|
1009
|
+
...F
|
|
985
1010
|
},
|
|
986
1011
|
[t.HCV]: {
|
|
987
1012
|
protocol: "http",
|
|
@@ -990,7 +1015,7 @@ const Mt = { class: "kong-ui-entities-vault-form" }, Nt = { class: "vault-form-p
|
|
|
990
1015
|
mount: "secret",
|
|
991
1016
|
kv: "v1",
|
|
992
1017
|
namespace: "",
|
|
993
|
-
auth_method:
|
|
1018
|
+
auth_method: R.TOKEN,
|
|
994
1019
|
token: "",
|
|
995
1020
|
kube_role: "",
|
|
996
1021
|
kube_auth_path: "",
|
|
@@ -1000,7 +1025,7 @@ const Mt = { class: "kong-ui-entities-vault-form" }, Nt = { class: "vault-form-p
|
|
|
1000
1025
|
approle_secret_id: "",
|
|
1001
1026
|
approle_secret_id_file: "",
|
|
1002
1027
|
approle_response_wrapping: !1,
|
|
1003
|
-
...
|
|
1028
|
+
...F
|
|
1004
1029
|
},
|
|
1005
1030
|
[t.AZURE]: {
|
|
1006
1031
|
location: "",
|
|
@@ -1009,12 +1034,12 @@ const Mt = { class: "kong-ui-entities-vault-form" }, Nt = { class: "vault-form-p
|
|
|
1009
1034
|
credentials_prefix: "AZURE",
|
|
1010
1035
|
client_id: "",
|
|
1011
1036
|
tenant_id: "",
|
|
1012
|
-
...
|
|
1037
|
+
...F
|
|
1013
1038
|
},
|
|
1014
1039
|
[t.CONJUR]: {
|
|
1015
1040
|
endpoint_url: "",
|
|
1016
1041
|
auth_method: "api_key",
|
|
1017
|
-
...
|
|
1042
|
+
...F
|
|
1018
1043
|
}
|
|
1019
1044
|
}), G = [
|
|
1020
1045
|
{ label: `${a("form.config.aws.fields.region.locations.us-east-1.location")} (us-east-1)`, value: "us-east-1" },
|
|
@@ -1041,30 +1066,30 @@ const Mt = { class: "kong-ui-entities-vault-form" }, Nt = { class: "vault-form-p
|
|
|
1041
1066
|
{ label: `${a("form.config.aws.fields.region.locations.sa-east-1.location")} (sa-east-1)`, value: "sa-east-1" },
|
|
1042
1067
|
{ label: `${a("form.config.aws.fields.region.locations.us-gov-east-1.location")} (us-gov-east-1)`, value: "us-gov-east-1" },
|
|
1043
1068
|
{ label: `${a("form.config.aws.fields.region.locations.us-gov-west-1.location")} (us-gov-west-1)`, value: "us-gov-west-1" }
|
|
1044
|
-
], ee = [{ label: "secrets", value: "secrets" }], J = [{ label: "http", value: "http" }, { label: "https", value: "https" }], y = [{ label: "v1", value: "v1" }, { label: "v2", value: "v2" }],
|
|
1045
|
-
var
|
|
1046
|
-
return (r = pe.form[(
|
|
1047
|
-
}), ne = w(() =>
|
|
1048
|
-
gatewayInfo:
|
|
1069
|
+
], ee = [{ label: "secrets", value: "secrets" }], J = [{ label: "http", value: "http" }, { label: "https", value: "https" }], y = [{ label: "v1", value: "v1" }, { label: "v2", value: "v2" }], N = w(() => c.vaultId ? Ve.Edit : Ve.Create), re = w(() => {
|
|
1070
|
+
var s, r;
|
|
1071
|
+
return (r = pe.form[(s = c.config) == null ? void 0 : s.app]) == null ? void 0 : r.edit;
|
|
1072
|
+
}), ne = w(() => N.value === Ve.Edit && c.config.app === "kongManager"), le = w(() => c.config.app === "konnect" || mt({
|
|
1073
|
+
gatewayInfo: c.config.gatewayInfo,
|
|
1049
1074
|
// vault name can only be `env` in Gateway Community Edition
|
|
1050
1075
|
supportedRange: {
|
|
1051
1076
|
enterprise: []
|
|
1052
1077
|
}
|
|
1053
1078
|
})), q = () => {
|
|
1054
|
-
var
|
|
1055
|
-
K.push(((
|
|
1056
|
-
}, ie = (
|
|
1057
|
-
|
|
1058
|
-
},
|
|
1059
|
-
|
|
1060
|
-
}, Z = (
|
|
1061
|
-
switch (
|
|
1079
|
+
var s;
|
|
1080
|
+
K.push(((s = c.config) == null ? void 0 : s.cancelRoute) || { name: "vault-list" });
|
|
1081
|
+
}, ie = (s) => {
|
|
1082
|
+
u("loading", s);
|
|
1083
|
+
}, T = (s) => {
|
|
1084
|
+
u("error", s);
|
|
1085
|
+
}, Z = (s) => {
|
|
1086
|
+
switch (s) {
|
|
1062
1087
|
case t.KONNECT:
|
|
1063
|
-
return
|
|
1088
|
+
return ct;
|
|
1064
1089
|
case t.ENV:
|
|
1065
1090
|
return dt;
|
|
1066
1091
|
case t.AWS:
|
|
1067
|
-
return
|
|
1092
|
+
return ut;
|
|
1068
1093
|
case t.GCP:
|
|
1069
1094
|
return st;
|
|
1070
1095
|
case t.HCV:
|
|
@@ -1074,8 +1099,8 @@ const Mt = { class: "kong-ui-entities-vault-form" }, Nt = { class: "vault-form-p
|
|
|
1074
1099
|
case t.CONJUR:
|
|
1075
1100
|
return rt;
|
|
1076
1101
|
}
|
|
1077
|
-
}, te = (
|
|
1078
|
-
switch (
|
|
1102
|
+
}, te = (s) => {
|
|
1103
|
+
switch (s) {
|
|
1079
1104
|
case t.KONNECT:
|
|
1080
1105
|
return a("form.config.konnect.description");
|
|
1081
1106
|
case t.ENV:
|
|
@@ -1091,14 +1116,14 @@ const Mt = { class: "kong-ui-entities-vault-form" }, Nt = { class: "vault-form-p
|
|
|
1091
1116
|
case t.CONJUR:
|
|
1092
1117
|
return a("form.config.conjur.description");
|
|
1093
1118
|
}
|
|
1094
|
-
}, b = (
|
|
1095
|
-
var C,
|
|
1096
|
-
|
|
1097
|
-
const r = ((oe =
|
|
1098
|
-
|
|
1099
|
-
const z = ((
|
|
1100
|
-
z && (Object.keys(z).length || (
|
|
1101
|
-
}, v = (
|
|
1119
|
+
}, b = (s) => {
|
|
1120
|
+
var C, _, oe, ue, ve, i;
|
|
1121
|
+
n.fields.prefix = ((C = s == null ? void 0 : s.item) == null ? void 0 : C.prefix) || (s == null ? void 0 : s.prefix) || "", n.fields.description = ((_ = s == null ? void 0 : s.item) == null ? void 0 : _.description) || (s == null ? void 0 : s.description) || "";
|
|
1122
|
+
const r = ((oe = s == null ? void 0 : s.item) == null ? void 0 : oe.tags) || (s == null ? void 0 : s.tags) || [];
|
|
1123
|
+
n.fields.tags = (r == null ? void 0 : r.join(", ")) || "", Object.assign(g, n.fields);
|
|
1124
|
+
const z = ((ue = s == null ? void 0 : s.item) == null ? void 0 : ue.config) || (s == null ? void 0 : s.config) || null;
|
|
1125
|
+
z && (Object.keys(z).length || (s == null ? void 0 : s.name) === t.KONNECT) ? (f.value = ((ve = s == null ? void 0 : s.item) == null ? void 0 : ve.name) || (s == null ? void 0 : s.name) || "", O.value = f.value, X.value = ((i = s == null ? void 0 : s.config) == null ? void 0 : i.config_store_id) || void 0, Object.assign(l[f.value], z), Object.assign(ae[f.value], z)) : n.errorMessage = "Error loading vault config";
|
|
1126
|
+
}, v = (s) => s === "" || s == null, P = w(() => f.value === t.HCV ? !Object.keys(l[t.HCV]).filter((s) => [
|
|
1102
1127
|
"namespace",
|
|
1103
1128
|
"ttl",
|
|
1104
1129
|
"neg_ttl",
|
|
@@ -1107,141 +1132,148 @@ const Mt = { class: "kong-ui-entities-vault-form" }, Nt = { class: "vault-form-p
|
|
|
1107
1132
|
"approle_auth_path",
|
|
1108
1133
|
"approle_secret_id",
|
|
1109
1134
|
"approle_secret_id_file"
|
|
1110
|
-
].includes(
|
|
1135
|
+
].includes(s) || l[t.HCV].auth_method !== R.K8S && (s === "kube_role" || s === "kube_api_token_file") || l[t.HCV].auth_method !== R.TOKEN && s === "token" || l[t.HCV].auth_method !== R.APP_ROLE && (s === "approle_role_id" || s === "approle_response_wrapping") || l[t.HCV].auth_method === R.APP_ROLE && s === "approle_response_wrapping" && typeof l[f.value][s] == "boolean" || l[t.HCV].auth_method !== R.CERT && ["cert_auth_role_name", "cert_auth_cert", "cert_auth_cert_key"].includes(s) || l[t.HCV].auth_method !== R.OAUTH2 && ["oauth2_client_id", "oauth2_client_secret", "oauth2_role_name", "oauth2_token_endpoint", "oauth2_audiences"].includes(s) ? !1 : v(l[f.value][s])).length : f.value === t.AZURE ? !Object.keys(l[t.AZURE]).filter((s) => ["client_id", "tenant_id", "ttl", "neg_ttl", "resurrect_ttl"].includes(s) ? !1 : v(l[f.value][s])).length : f.value === t.AWS ? !Object.keys(l[t.AWS]).filter((s) => ["endpoint_url", "assume_role_arn", "ttl", "neg_ttl", "resurrect_ttl", "sts_endpoint_url"].includes(s) ? !1 : v(l[f.value][s])).length : !Object.keys(l[f.value]).filter((s) => ["ttl", "neg_ttl", "resurrect_ttl"].includes(s) ? !1 : v(l[f.value][s])).length), M = w(() => !!n.fields.prefix && P.value), se = w(() => JSON.stringify(n.fields) !== JSON.stringify(g) || f.value !== O.value || JSON.stringify(l[f.value]) !== JSON.stringify(ae[f.value])), j = w(() => {
|
|
1111
1136
|
var r, z;
|
|
1112
|
-
let
|
|
1113
|
-
return
|
|
1114
|
-
}),
|
|
1115
|
-
var
|
|
1116
|
-
const
|
|
1117
|
-
protocol:
|
|
1118
|
-
host:
|
|
1119
|
-
port: parseInt(
|
|
1120
|
-
mount:
|
|
1121
|
-
kv:
|
|
1122
|
-
namespace:
|
|
1123
|
-
auth_method:
|
|
1124
|
-
...
|
|
1125
|
-
...
|
|
1137
|
+
let s = `${c.config.apiBaseUrl}${pe.form[c.config.app][N.value]}`;
|
|
1138
|
+
return c.config.app === "konnect" ? s = s.replace(/{controlPlaneId}/gi, ((r = c.config) == null ? void 0 : r.controlPlaneId) || "") : c.config.app === "kongManager" && (s = s.replace(/\/{workspace}/gi, (z = c.config) != null && z.workspace ? `/${c.config.workspace}` : "")), s = s.replace(/{id}/gi, c.vaultId), s;
|
|
1139
|
+
}), A = w(() => {
|
|
1140
|
+
var ue, ve;
|
|
1141
|
+
const s = {
|
|
1142
|
+
protocol: l[t.HCV].protocol,
|
|
1143
|
+
host: l[t.HCV].host,
|
|
1144
|
+
port: parseInt(l[t.HCV].port.toString()),
|
|
1145
|
+
mount: l[t.HCV].mount,
|
|
1146
|
+
kv: l[t.HCV].kv,
|
|
1147
|
+
namespace: l[t.HCV].namespace || null,
|
|
1148
|
+
auth_method: l[t.HCV].auth_method,
|
|
1149
|
+
...c.config.base64FieldAvailable && { base64_decode: l[t.HCV].base64_decode },
|
|
1150
|
+
...l[t.HCV].auth_method === R.TOKEN && { token: l[t.HCV].token },
|
|
1126
1151
|
// For Kong Admin API, when auth_method is kubernetes, token must be in the request body and its value has to be null
|
|
1127
|
-
...
|
|
1128
|
-
kube_role:
|
|
1129
|
-
kube_auth_path:
|
|
1130
|
-
kube_api_token_file:
|
|
1152
|
+
...l[t.HCV].auth_method === R.K8S && {
|
|
1153
|
+
kube_role: l[t.HCV].kube_role,
|
|
1154
|
+
kube_auth_path: l[t.HCV].kube_auth_path || void 0,
|
|
1155
|
+
kube_api_token_file: l[t.HCV].kube_api_token_file,
|
|
1131
1156
|
token: null
|
|
1132
1157
|
},
|
|
1133
|
-
...
|
|
1134
|
-
approle_auth_path:
|
|
1135
|
-
approle_role_id:
|
|
1136
|
-
approle_secret_id:
|
|
1137
|
-
approle_secret_id_file:
|
|
1138
|
-
approle_response_wrapping:
|
|
1158
|
+
...l[t.HCV].auth_method === R.APP_ROLE && {
|
|
1159
|
+
approle_auth_path: l[t.HCV].approle_auth_path || void 0,
|
|
1160
|
+
approle_role_id: l[t.HCV].approle_role_id,
|
|
1161
|
+
approle_secret_id: l[t.HCV].approle_secret_id || void 0,
|
|
1162
|
+
approle_secret_id_file: l[t.HCV].approle_secret_id_file || void 0,
|
|
1163
|
+
approle_response_wrapping: l[t.HCV].approle_response_wrapping ?? !1
|
|
1164
|
+
},
|
|
1165
|
+
...l[t.HCV].auth_method === R.CERT && {
|
|
1166
|
+
cert_auth_role_name: l[t.HCV].cert_auth_role_name,
|
|
1167
|
+
cert_auth_cert: l[t.HCV].cert_auth_cert,
|
|
1168
|
+
cert_auth_cert_key: l[t.HCV].cert_auth_cert_key
|
|
1139
1169
|
},
|
|
1140
|
-
...
|
|
1141
|
-
|
|
1142
|
-
|
|
1143
|
-
|
|
1170
|
+
...l[t.HCV].auth_method === R.OAUTH2 && {
|
|
1171
|
+
oauth2_audiences: l[t.HCV].oauth2_audiences,
|
|
1172
|
+
oauth2_client_id: l[t.HCV].oauth2_client_id,
|
|
1173
|
+
oauth2_client_secret: l[t.HCV].oauth2_client_secret,
|
|
1174
|
+
oauth2_role_name: l[t.HCV].oauth2_role_name,
|
|
1175
|
+
oauth2_token_endpoint: l[t.HCV].oauth2_token_endpoint
|
|
1144
1176
|
}
|
|
1145
1177
|
}, r = {
|
|
1146
|
-
...
|
|
1147
|
-
client_id:
|
|
1148
|
-
tenant_id:
|
|
1178
|
+
...l[f.value],
|
|
1179
|
+
client_id: l[f.value].client_id || null,
|
|
1180
|
+
tenant_id: l[f.value].tenant_id || null
|
|
1149
1181
|
}, z = {
|
|
1150
|
-
...
|
|
1151
|
-
endpoint_url:
|
|
1152
|
-
assume_role_arn:
|
|
1153
|
-
...
|
|
1182
|
+
...l[f.value],
|
|
1183
|
+
endpoint_url: l[f.value].endpoint_url || null,
|
|
1184
|
+
assume_role_arn: l[f.value].assume_role_arn || null,
|
|
1185
|
+
...c.config.awsStsEndpointUrlAvailable ? { sts_endpoint_url: l[f.value].sts_endpoint_url || null } : {}
|
|
1154
1186
|
};
|
|
1155
|
-
let C =
|
|
1156
|
-
|
|
1157
|
-
let
|
|
1158
|
-
if (![t.KONNECT, t.ENV].includes(
|
|
1159
|
-
const i =
|
|
1160
|
-
|
|
1187
|
+
let C = l[f.value];
|
|
1188
|
+
f.value === t.HCV ? C = s : f.value === t.AZURE ? C = r : f.value === t.AWS && (C = z);
|
|
1189
|
+
let _ = {};
|
|
1190
|
+
if (![t.KONNECT, t.ENV].includes(f.value)) {
|
|
1191
|
+
const i = l[f.value], Te = i.ttl, He = i.neg_ttl, $e = i.resurrect_ttl;
|
|
1192
|
+
_ = {
|
|
1161
1193
|
ttl: Te ? parseInt(Te.toString(), 10) : null,
|
|
1162
|
-
neg_ttl:
|
|
1163
|
-
resurrect_ttl:
|
|
1194
|
+
neg_ttl: He ? parseInt(He.toString(), 10) : null,
|
|
1195
|
+
resurrect_ttl: $e ? parseInt($e.toString(), 10) : null
|
|
1164
1196
|
};
|
|
1165
1197
|
}
|
|
1166
1198
|
return {
|
|
1167
|
-
prefix:
|
|
1168
|
-
description:
|
|
1169
|
-
tags: (ve = (
|
|
1170
|
-
name:
|
|
1199
|
+
prefix: n.fields.prefix,
|
|
1200
|
+
description: n.fields.description || null,
|
|
1201
|
+
tags: (ve = (ue = n.fields.tags.split(",")) == null ? void 0 : ue.map((i) => String(i || "").trim())) == null ? void 0 : ve.filter((i) => i !== ""),
|
|
1202
|
+
name: f.value,
|
|
1171
1203
|
config: {
|
|
1172
1204
|
...C,
|
|
1173
|
-
...
|
|
1205
|
+
..._
|
|
1174
1206
|
}
|
|
1175
1207
|
};
|
|
1176
1208
|
}), fe = w(() => ({
|
|
1177
|
-
...
|
|
1209
|
+
...A.value,
|
|
1178
1210
|
config: {
|
|
1179
|
-
...
|
|
1211
|
+
...A.value.config,
|
|
1180
1212
|
config_store_id: X.value
|
|
1181
1213
|
}
|
|
1182
1214
|
})), k = async () => {
|
|
1183
|
-
var
|
|
1215
|
+
var s;
|
|
1184
1216
|
try {
|
|
1185
|
-
|
|
1186
|
-
const r = `${
|
|
1217
|
+
n.isReadonly = !0;
|
|
1218
|
+
const r = `${c.config.apiBaseUrl}${pe.form.konnect.createConfigStore}`.replace(/{controlPlaneId}/gi, ((s = c.config) == null ? void 0 : s.controlPlaneId) || ""), z = await I.post(r);
|
|
1187
1219
|
return z == null ? void 0 : z.data.id;
|
|
1188
1220
|
} catch (r) {
|
|
1189
|
-
|
|
1221
|
+
n.errorMessage = h(r), u("error", r);
|
|
1190
1222
|
} finally {
|
|
1191
|
-
|
|
1223
|
+
n.isReadonly = !1;
|
|
1192
1224
|
}
|
|
1193
1225
|
}, E = async () => {
|
|
1194
|
-
var
|
|
1226
|
+
var s;
|
|
1195
1227
|
try {
|
|
1196
|
-
|
|
1228
|
+
n.isReadonly = !0;
|
|
1197
1229
|
let r;
|
|
1198
|
-
|
|
1230
|
+
N.value === "create" ? f.value === t.KONNECT ? (X.value = await k(), r = await I.post(j.value, fe.value)) : r = await I.post(j.value, A.value) : N.value === "edit" && (f.value === t.KONNECT && !X.value ? (X.value = await k(), r = await I.put(j.value, fe.value)) : r = ((s = c.config) == null ? void 0 : s.app) === "konnect" ? await I.put(j.value, fe.value) : await I.patch(j.value, A.value)), b(r == null ? void 0 : r.data), u("update", r == null ? void 0 : r.data);
|
|
1199
1231
|
} catch (r) {
|
|
1200
|
-
|
|
1232
|
+
n.errorMessage = h(r), u("error", r);
|
|
1201
1233
|
} finally {
|
|
1202
|
-
|
|
1234
|
+
n.isReadonly = !1;
|
|
1203
1235
|
}
|
|
1204
1236
|
};
|
|
1205
|
-
return (
|
|
1206
|
-
const z = L("KTooltip"), C = L("KSelect"),
|
|
1207
|
-
return V(),
|
|
1208
|
-
|
|
1209
|
-
"can-submit":
|
|
1210
|
-
config:
|
|
1211
|
-
"edit-id":
|
|
1237
|
+
return (s, r) => {
|
|
1238
|
+
const z = L("KTooltip"), C = L("KSelect"), _ = L("KInput"), oe = L("KCheckbox"), ue = L("KTextArea"), ve = L("KCollapse");
|
|
1239
|
+
return V(), D("div", Mt, [
|
|
1240
|
+
d(e(Qe), {
|
|
1241
|
+
"can-submit": M.value && se.value,
|
|
1242
|
+
config: o.config,
|
|
1243
|
+
"edit-id": o.vaultId,
|
|
1212
1244
|
"entity-type": e(Ue).Vault,
|
|
1213
|
-
"error-message":
|
|
1245
|
+
"error-message": n.errorMessage,
|
|
1214
1246
|
"fetch-url": re.value,
|
|
1215
|
-
"form-fields":
|
|
1216
|
-
"is-readonly":
|
|
1247
|
+
"form-fields": A.value,
|
|
1248
|
+
"is-readonly": n.isReadonly,
|
|
1217
1249
|
onCancel: q,
|
|
1218
|
-
"onFetch:error":
|
|
1250
|
+
"onFetch:error": T,
|
|
1219
1251
|
"onFetch:success": b,
|
|
1220
1252
|
onLoading: ie,
|
|
1221
1253
|
onSubmit: E
|
|
1222
1254
|
}, {
|
|
1223
1255
|
default: m(() => [
|
|
1224
|
-
|
|
1256
|
+
d(e(Re), {
|
|
1225
1257
|
description: e(a)("form.sections.config.description"),
|
|
1226
1258
|
title: e(a)("form.sections.config.title")
|
|
1227
1259
|
}, {
|
|
1228
1260
|
default: m(() => [
|
|
1229
|
-
x("div",
|
|
1230
|
-
|
|
1231
|
-
modelValue:
|
|
1232
|
-
"onUpdate:modelValue": r[0] || (r[0] = (i) =>
|
|
1261
|
+
x("div", Ot, [
|
|
1262
|
+
d(C, {
|
|
1263
|
+
modelValue: f.value,
|
|
1264
|
+
"onUpdate:modelValue": r[0] || (r[0] = (i) => f.value = i),
|
|
1233
1265
|
"data-testid": "provider-select",
|
|
1234
1266
|
disabled: ne.value,
|
|
1235
1267
|
"dropdown-max-height": "500",
|
|
1236
1268
|
items: Y.value,
|
|
1237
|
-
readonly:
|
|
1269
|
+
readonly: n.isReadonly
|
|
1238
1270
|
}, {
|
|
1239
1271
|
"selected-item-template": m(({ item: i }) => [
|
|
1240
|
-
(V(),
|
|
1241
|
-
x("span", null,
|
|
1272
|
+
(V(), W(Pe(Z(i.value)))),
|
|
1273
|
+
x("span", null, H(i == null ? void 0 : i.label), 1)
|
|
1242
1274
|
]),
|
|
1243
1275
|
"item-template": m(({ item: i }) => [
|
|
1244
|
-
|
|
1276
|
+
d(z, {
|
|
1245
1277
|
placement: "top",
|
|
1246
1278
|
text: i.disabled ? e(a)("form.unavailable") : ""
|
|
1247
1279
|
}, {
|
|
@@ -1250,12 +1282,12 @@ const Mt = { class: "kong-ui-entities-vault-form" }, Nt = { class: "vault-form-p
|
|
|
1250
1282
|
class: "provider-item",
|
|
1251
1283
|
"data-testid": `vault-form-provider-${i.value}`
|
|
1252
1284
|
}, [
|
|
1253
|
-
(V(),
|
|
1254
|
-
x("div",
|
|
1255
|
-
x("span", qt,
|
|
1256
|
-
x("span", jt,
|
|
1285
|
+
(V(), W(Pe(Z(i.value)))),
|
|
1286
|
+
x("div", Ft, [
|
|
1287
|
+
x("span", qt, H(i == null ? void 0 : i.label), 1),
|
|
1288
|
+
x("span", jt, H(te(i.value)), 1)
|
|
1257
1289
|
])
|
|
1258
|
-
], 8,
|
|
1290
|
+
], 8, Nt)
|
|
1259
1291
|
]),
|
|
1260
1292
|
_: 2
|
|
1261
1293
|
}, 1032, ["text"])
|
|
@@ -1263,12 +1295,12 @@ const Mt = { class: "kong-ui-entities-vault-form" }, Nt = { class: "vault-form-p
|
|
|
1263
1295
|
_: 1
|
|
1264
1296
|
}, 8, ["modelValue", "disabled", "items", "readonly"])
|
|
1265
1297
|
]),
|
|
1266
|
-
|
|
1298
|
+
d(Xe, { name: "appear" }, {
|
|
1267
1299
|
default: m(() => [
|
|
1268
|
-
|
|
1269
|
-
|
|
1270
|
-
modelValue:
|
|
1271
|
-
"onUpdate:modelValue": r[1] || (r[1] = (i) =>
|
|
1300
|
+
f.value === e(t).ENV ? (V(), D("div", Dt, [
|
|
1301
|
+
d(_, {
|
|
1302
|
+
modelValue: l[e(t).ENV].prefix,
|
|
1303
|
+
"onUpdate:modelValue": r[1] || (r[1] = (i) => l[e(t).ENV].prefix = i),
|
|
1272
1304
|
modelModifiers: { trim: !0 },
|
|
1273
1305
|
autocomplete: "off",
|
|
1274
1306
|
"data-testid": "vault-form-config-kong-prefix",
|
|
@@ -1278,42 +1310,42 @@ const Mt = { class: "kong-ui-entities-vault-form" }, Nt = { class: "vault-form-p
|
|
|
1278
1310
|
tooltipAttributes: { maxWidth: "400" }
|
|
1279
1311
|
},
|
|
1280
1312
|
placeholder: e(a)("form.config.env.fields.prefix.placeholder"),
|
|
1281
|
-
readonly:
|
|
1313
|
+
readonly: n.isReadonly,
|
|
1282
1314
|
required: "",
|
|
1283
1315
|
type: "text"
|
|
1284
1316
|
}, null, 8, ["modelValue", "label", "label-attributes", "placeholder", "readonly"]),
|
|
1285
|
-
|
|
1317
|
+
o.config.base64FieldAvailable ? (V(), W(oe, {
|
|
1286
1318
|
key: 0,
|
|
1287
|
-
modelValue:
|
|
1288
|
-
"onUpdate:modelValue": r[2] || (r[2] = (i) =>
|
|
1319
|
+
modelValue: l[e(t).ENV].base64_decode,
|
|
1320
|
+
"onUpdate:modelValue": r[2] || (r[2] = (i) => l[e(t).ENV].base64_decode = i),
|
|
1289
1321
|
"data-testid": "vault-form-config-env-base64_decode",
|
|
1290
1322
|
label: e(a)("form.config.commonFields.base64_decode.label"),
|
|
1291
1323
|
"label-attributes": {
|
|
1292
1324
|
info: e(a)("form.config.commonFields.base64_decode.tooltip"),
|
|
1293
1325
|
tooltipAttributes: { maxWidth: "400" }
|
|
1294
1326
|
},
|
|
1295
|
-
readonly:
|
|
1296
|
-
}, null, 8, ["modelValue", "label", "label-attributes", "readonly"])) :
|
|
1297
|
-
])) :
|
|
1298
|
-
|
|
1327
|
+
readonly: n.isReadonly
|
|
1328
|
+
}, null, 8, ["modelValue", "label", "label-attributes", "readonly"])) : B("", !0)
|
|
1329
|
+
])) : B("", !0),
|
|
1330
|
+
f.value === e(t).AWS ? (V(), D("div", {
|
|
1299
1331
|
key: `${e(t).AWS}-vault-config-fields`,
|
|
1300
1332
|
class: "vault-form-config-fields-container"
|
|
1301
1333
|
}, [
|
|
1302
|
-
|
|
1303
|
-
modelValue:
|
|
1304
|
-
"onUpdate:modelValue": r[3] || (r[3] = (i) =>
|
|
1334
|
+
d(C, {
|
|
1335
|
+
modelValue: l[e(t).AWS].region,
|
|
1336
|
+
"onUpdate:modelValue": r[3] || (r[3] = (i) => l[e(t).AWS].region = i),
|
|
1305
1337
|
"data-testid": "vault-form-config-aws-region",
|
|
1306
1338
|
items: G,
|
|
1307
1339
|
label: e(a)("form.config.aws.fields.region.label"),
|
|
1308
1340
|
"label-attributes": { info: e(a)("form.config.aws.fields.region.tooltip") },
|
|
1309
1341
|
placeholder: e(a)("form.config.aws.fields.region.placeholder"),
|
|
1310
|
-
readonly:
|
|
1342
|
+
readonly: n.isReadonly,
|
|
1311
1343
|
required: "",
|
|
1312
1344
|
width: "100%"
|
|
1313
1345
|
}, null, 8, ["modelValue", "label", "label-attributes", "placeholder", "readonly"]),
|
|
1314
|
-
|
|
1315
|
-
modelValue:
|
|
1316
|
-
"onUpdate:modelValue": r[4] || (r[4] = (i) =>
|
|
1346
|
+
d(_, {
|
|
1347
|
+
modelValue: l[e(t).AWS].endpoint_url,
|
|
1348
|
+
"onUpdate:modelValue": r[4] || (r[4] = (i) => l[e(t).AWS].endpoint_url = i),
|
|
1317
1349
|
modelModifiers: { trim: !0 },
|
|
1318
1350
|
autocomplete: "off",
|
|
1319
1351
|
"data-testid": "vault-form-config-aws-endpoint_url",
|
|
@@ -1322,12 +1354,12 @@ const Mt = { class: "kong-ui-entities-vault-form" }, Nt = { class: "vault-form-p
|
|
|
1322
1354
|
info: e(a)("form.config.aws.fields.endpoint_url.tooltip"),
|
|
1323
1355
|
tooltipAttributes: { maxWidth: "400" }
|
|
1324
1356
|
},
|
|
1325
|
-
readonly:
|
|
1357
|
+
readonly: n.isReadonly,
|
|
1326
1358
|
type: "text"
|
|
1327
1359
|
}, null, 8, ["modelValue", "label", "label-attributes", "readonly"]),
|
|
1328
|
-
|
|
1329
|
-
modelValue:
|
|
1330
|
-
"onUpdate:modelValue": r[5] || (r[5] = (i) =>
|
|
1360
|
+
d(_, {
|
|
1361
|
+
modelValue: l[e(t).AWS].assume_role_arn,
|
|
1362
|
+
"onUpdate:modelValue": r[5] || (r[5] = (i) => l[e(t).AWS].assume_role_arn = i),
|
|
1331
1363
|
modelModifiers: { trim: !0 },
|
|
1332
1364
|
autocomplete: "off",
|
|
1333
1365
|
"data-testid": "vault-form-config-aws-assume_role_arn",
|
|
@@ -1336,12 +1368,12 @@ const Mt = { class: "kong-ui-entities-vault-form" }, Nt = { class: "vault-form-p
|
|
|
1336
1368
|
info: e(a)("form.config.aws.fields.assume_role_arn.tooltip"),
|
|
1337
1369
|
tooltipAttributes: { maxWidth: "400" }
|
|
1338
1370
|
},
|
|
1339
|
-
readonly:
|
|
1371
|
+
readonly: n.isReadonly,
|
|
1340
1372
|
type: "text"
|
|
1341
1373
|
}, null, 8, ["modelValue", "label", "label-attributes", "readonly"]),
|
|
1342
|
-
|
|
1343
|
-
modelValue:
|
|
1344
|
-
"onUpdate:modelValue": r[6] || (r[6] = (i) =>
|
|
1374
|
+
d(_, {
|
|
1375
|
+
modelValue: l[e(t).AWS].role_session_name,
|
|
1376
|
+
"onUpdate:modelValue": r[6] || (r[6] = (i) => l[e(t).AWS].role_session_name = i),
|
|
1345
1377
|
modelModifiers: { trim: !0 },
|
|
1346
1378
|
autocomplete: "off",
|
|
1347
1379
|
"data-testid": "vault-form-config-aws-role_session_name",
|
|
@@ -1350,14 +1382,14 @@ const Mt = { class: "kong-ui-entities-vault-form" }, Nt = { class: "vault-form-p
|
|
|
1350
1382
|
info: e(a)("form.config.aws.fields.role_session_name.tooltip"),
|
|
1351
1383
|
tooltipAttributes: { maxWidth: "400" }
|
|
1352
1384
|
},
|
|
1353
|
-
readonly:
|
|
1385
|
+
readonly: n.isReadonly,
|
|
1354
1386
|
required: "",
|
|
1355
1387
|
type: "text"
|
|
1356
1388
|
}, null, 8, ["modelValue", "label", "label-attributes", "readonly"]),
|
|
1357
|
-
|
|
1389
|
+
o.config.awsStsEndpointUrlAvailable ? (V(), W(_, {
|
|
1358
1390
|
key: 0,
|
|
1359
|
-
modelValue:
|
|
1360
|
-
"onUpdate:modelValue": r[7] || (r[7] = (i) =>
|
|
1391
|
+
modelValue: l[e(t).AWS].sts_endpoint_url,
|
|
1392
|
+
"onUpdate:modelValue": r[7] || (r[7] = (i) => l[e(t).AWS].sts_endpoint_url = i),
|
|
1361
1393
|
modelModifiers: { trim: !0 },
|
|
1362
1394
|
autocomplete: "off",
|
|
1363
1395
|
"data-testid": "vault-form-config-aws-sts_endpoint_url",
|
|
@@ -1366,374 +1398,436 @@ const Mt = { class: "kong-ui-entities-vault-form" }, Nt = { class: "vault-form-p
|
|
|
1366
1398
|
info: e(a)("form.config.aws.fields.sts_endpoint_url.tooltip"),
|
|
1367
1399
|
tooltipAttributes: { maxWidth: "400" }
|
|
1368
1400
|
},
|
|
1369
|
-
readonly:
|
|
1401
|
+
readonly: n.isReadonly,
|
|
1370
1402
|
type: "text"
|
|
1371
|
-
}, null, 8, ["modelValue", "label", "label-attributes", "readonly"])) :
|
|
1372
|
-
|
|
1403
|
+
}, null, 8, ["modelValue", "label", "label-attributes", "readonly"])) : B("", !0),
|
|
1404
|
+
o.config.base64FieldAvailable ? (V(), W(oe, {
|
|
1373
1405
|
key: 1,
|
|
1374
|
-
modelValue:
|
|
1375
|
-
"onUpdate:modelValue": r[8] || (r[8] = (i) =>
|
|
1406
|
+
modelValue: l[e(t).AWS].base64_decode,
|
|
1407
|
+
"onUpdate:modelValue": r[8] || (r[8] = (i) => l[e(t).AWS].base64_decode = i),
|
|
1376
1408
|
"data-testid": "vault-form-config-aws-base64_decode",
|
|
1377
1409
|
label: e(a)("form.config.commonFields.base64_decode.label"),
|
|
1378
1410
|
"label-attributes": {
|
|
1379
1411
|
info: e(a)("form.config.commonFields.base64_decode.tooltip"),
|
|
1380
1412
|
tooltipAttributes: { maxWidth: "400" }
|
|
1381
1413
|
},
|
|
1382
|
-
readonly:
|
|
1383
|
-
}, null, 8, ["modelValue", "label", "label-attributes", "readonly"])) :
|
|
1384
|
-
])) :
|
|
1385
|
-
|
|
1414
|
+
readonly: n.isReadonly
|
|
1415
|
+
}, null, 8, ["modelValue", "label", "label-attributes", "readonly"])) : B("", !0)
|
|
1416
|
+
])) : B("", !0),
|
|
1417
|
+
f.value === e(t).GCP ? (V(), D("div", {
|
|
1386
1418
|
key: `${e(t).GCP}-vault-config-fields`,
|
|
1387
1419
|
class: "vault-form-config-fields-container"
|
|
1388
1420
|
}, [
|
|
1389
|
-
|
|
1390
|
-
modelValue:
|
|
1391
|
-
"onUpdate:modelValue": r[9] || (r[9] = (i) =>
|
|
1421
|
+
d(_, {
|
|
1422
|
+
modelValue: l[e(t).GCP].project_id,
|
|
1423
|
+
"onUpdate:modelValue": r[9] || (r[9] = (i) => l[e(t).GCP].project_id = i),
|
|
1392
1424
|
modelModifiers: { trim: !0 },
|
|
1393
1425
|
autocomplete: "off",
|
|
1394
1426
|
"data-testid": "vault-form-config-gcp-project-id",
|
|
1395
1427
|
label: e(a)("form.config.gcp.fields.project_id.label"),
|
|
1396
1428
|
placeholder: e(a)("form.config.gcp.fields.project_id.placeholder"),
|
|
1397
|
-
readonly:
|
|
1429
|
+
readonly: n.isReadonly,
|
|
1398
1430
|
required: "",
|
|
1399
1431
|
type: "text"
|
|
1400
1432
|
}, {
|
|
1401
1433
|
"label-tooltip": m(() => [
|
|
1402
|
-
|
|
1434
|
+
d(e(p), {
|
|
1403
1435
|
keypath: "form.config.gcp.fields.project_id.tooltip.text",
|
|
1404
1436
|
scope: "global"
|
|
1405
1437
|
}, {
|
|
1406
1438
|
"italic-text": m(() => [
|
|
1407
|
-
x("em", null,
|
|
1439
|
+
x("em", null, H(e(a)("form.config.gcp.fields.project_id.tooltip.italicText")), 1)
|
|
1408
1440
|
]),
|
|
1409
1441
|
_: 1
|
|
1410
1442
|
})
|
|
1411
1443
|
]),
|
|
1412
1444
|
_: 1
|
|
1413
1445
|
}, 8, ["modelValue", "label", "placeholder", "readonly"]),
|
|
1414
|
-
|
|
1446
|
+
o.config.base64FieldAvailable ? (V(), W(oe, {
|
|
1415
1447
|
key: 0,
|
|
1416
|
-
modelValue:
|
|
1417
|
-
"onUpdate:modelValue": r[10] || (r[10] = (i) =>
|
|
1448
|
+
modelValue: l[e(t).GCP].base64_decode,
|
|
1449
|
+
"onUpdate:modelValue": r[10] || (r[10] = (i) => l[e(t).GCP].base64_decode = i),
|
|
1418
1450
|
"data-testid": "vault-form-config-gcp-base64_decode",
|
|
1419
1451
|
label: e(a)("form.config.commonFields.base64_decode.label"),
|
|
1420
1452
|
"label-attributes": {
|
|
1421
1453
|
info: e(a)("form.config.commonFields.base64_decode.tooltip"),
|
|
1422
1454
|
tooltipAttributes: { maxWidth: "400" }
|
|
1423
1455
|
},
|
|
1424
|
-
readonly:
|
|
1425
|
-
}, null, 8, ["modelValue", "label", "label-attributes", "readonly"])) :
|
|
1426
|
-
])) :
|
|
1427
|
-
|
|
1456
|
+
readonly: n.isReadonly
|
|
1457
|
+
}, null, 8, ["modelValue", "label", "label-attributes", "readonly"])) : B("", !0)
|
|
1458
|
+
])) : B("", !0),
|
|
1459
|
+
f.value === e(t).HCV ? (V(), D("div", {
|
|
1428
1460
|
key: `${e(t).HCV}-vault-config-fields`,
|
|
1429
1461
|
class: "vault-form-config-fields-container"
|
|
1430
1462
|
}, [
|
|
1431
|
-
|
|
1432
|
-
modelValue:
|
|
1433
|
-
"onUpdate:modelValue": r[11] || (r[11] = (i) =>
|
|
1463
|
+
d(C, {
|
|
1464
|
+
modelValue: l[e(t).HCV].protocol,
|
|
1465
|
+
"onUpdate:modelValue": r[11] || (r[11] = (i) => l[e(t).HCV].protocol = i),
|
|
1434
1466
|
"data-testid": "vault-form-config-hcv-protocol",
|
|
1435
1467
|
items: J,
|
|
1436
1468
|
label: e(a)("form.config.hcv.fields.protocol.label"),
|
|
1437
|
-
readonly:
|
|
1469
|
+
readonly: n.isReadonly,
|
|
1438
1470
|
required: "",
|
|
1439
1471
|
width: "100%"
|
|
1440
1472
|
}, null, 8, ["modelValue", "label", "readonly"]),
|
|
1441
|
-
|
|
1442
|
-
modelValue:
|
|
1443
|
-
"onUpdate:modelValue": r[12] || (r[12] = (i) =>
|
|
1473
|
+
d(_, {
|
|
1474
|
+
modelValue: l[e(t).HCV].host,
|
|
1475
|
+
"onUpdate:modelValue": r[12] || (r[12] = (i) => l[e(t).HCV].host = i),
|
|
1444
1476
|
modelModifiers: { trim: !0 },
|
|
1445
1477
|
autocomplete: "off",
|
|
1446
1478
|
"data-testid": "vault-form-config-hcv-host",
|
|
1447
1479
|
label: e(a)("form.config.hcv.fields.host.label"),
|
|
1448
|
-
readonly:
|
|
1480
|
+
readonly: n.isReadonly,
|
|
1449
1481
|
required: "",
|
|
1450
1482
|
type: "text"
|
|
1451
1483
|
}, null, 8, ["modelValue", "label", "readonly"]),
|
|
1452
|
-
|
|
1453
|
-
modelValue:
|
|
1454
|
-
"onUpdate:modelValue": r[13] || (r[13] = (i) =>
|
|
1484
|
+
d(_, {
|
|
1485
|
+
modelValue: l[e(t).HCV].port,
|
|
1486
|
+
"onUpdate:modelValue": r[13] || (r[13] = (i) => l[e(t).HCV].port = i),
|
|
1455
1487
|
autocomplete: "off",
|
|
1456
1488
|
"data-testid": "vault-form-config-hcv-port",
|
|
1457
1489
|
label: e(a)("form.config.hcv.fields.port.label"),
|
|
1458
1490
|
min: "0",
|
|
1459
|
-
readonly:
|
|
1491
|
+
readonly: n.isReadonly,
|
|
1460
1492
|
required: "",
|
|
1461
1493
|
type: "number"
|
|
1462
1494
|
}, null, 8, ["modelValue", "label", "readonly"]),
|
|
1463
|
-
|
|
1464
|
-
modelValue:
|
|
1465
|
-
"onUpdate:modelValue": r[14] || (r[14] = (i) =>
|
|
1495
|
+
d(_, {
|
|
1496
|
+
modelValue: l[e(t).HCV].mount,
|
|
1497
|
+
"onUpdate:modelValue": r[14] || (r[14] = (i) => l[e(t).HCV].mount = i),
|
|
1466
1498
|
modelModifiers: { trim: !0 },
|
|
1467
1499
|
autocomplete: "off",
|
|
1468
1500
|
"data-testid": "vault-form-config-hcv-mount",
|
|
1469
1501
|
label: e(a)("form.config.hcv.fields.mount.label"),
|
|
1470
|
-
readonly:
|
|
1502
|
+
readonly: n.isReadonly,
|
|
1471
1503
|
required: "",
|
|
1472
1504
|
type: "text"
|
|
1473
1505
|
}, null, 8, ["modelValue", "label", "readonly"]),
|
|
1474
|
-
|
|
1475
|
-
modelValue:
|
|
1476
|
-
"onUpdate:modelValue": r[15] || (r[15] = (i) =>
|
|
1506
|
+
d(C, {
|
|
1507
|
+
modelValue: l[e(t).HCV].kv,
|
|
1508
|
+
"onUpdate:modelValue": r[15] || (r[15] = (i) => l[e(t).HCV].kv = i),
|
|
1477
1509
|
"data-testid": "vault-form-config-hcv-kv",
|
|
1478
1510
|
items: y,
|
|
1479
1511
|
label: e(a)("form.config.hcv.fields.kv.label"),
|
|
1480
|
-
readonly:
|
|
1512
|
+
readonly: n.isReadonly,
|
|
1481
1513
|
required: "",
|
|
1482
1514
|
width: "100%"
|
|
1483
1515
|
}, null, 8, ["modelValue", "label", "readonly"]),
|
|
1484
|
-
|
|
1485
|
-
modelValue:
|
|
1486
|
-
"onUpdate:modelValue": r[16] || (r[16] = (i) =>
|
|
1516
|
+
d(_, {
|
|
1517
|
+
modelValue: l[e(t).HCV].namespace,
|
|
1518
|
+
"onUpdate:modelValue": r[16] || (r[16] = (i) => l[e(t).HCV].namespace = i),
|
|
1487
1519
|
modelModifiers: { trim: !0 },
|
|
1488
1520
|
autocomplete: "off",
|
|
1489
1521
|
"data-testid": "vault-form-config-hcv-namespace",
|
|
1490
1522
|
label: e(a)("form.config.hcv.fields.namespace.label"),
|
|
1491
|
-
readonly:
|
|
1523
|
+
readonly: n.isReadonly,
|
|
1492
1524
|
type: "text"
|
|
1493
1525
|
}, null, 8, ["modelValue", "label", "readonly"]),
|
|
1494
|
-
|
|
1495
|
-
modelValue:
|
|
1496
|
-
"onUpdate:modelValue": r[17] || (r[17] = (i) =>
|
|
1526
|
+
d(C, {
|
|
1527
|
+
modelValue: l[e(t).HCV].auth_method,
|
|
1528
|
+
"onUpdate:modelValue": r[17] || (r[17] = (i) => l[e(t).HCV].auth_method = i),
|
|
1497
1529
|
"data-testid": "vault-form-config-hcv-auth_method",
|
|
1498
1530
|
items: [
|
|
1499
|
-
{ label: e(
|
|
1500
|
-
{ label: e(
|
|
1501
|
-
...
|
|
1502
|
-
...
|
|
1531
|
+
{ label: e(R).TOKEN, value: e(R).TOKEN },
|
|
1532
|
+
{ label: e(R).K8S, value: e(R).K8S },
|
|
1533
|
+
...o.config.hcvAppRoleMethodAvailable ? [{ label: e(R).APP_ROLE, value: e(R).APP_ROLE }] : [],
|
|
1534
|
+
...o.config.hcvCertMethodAvailable ? [{ label: e(R).CERT, value: e(R).CERT }] : [],
|
|
1535
|
+
...o.config.hcvOauth2MethodAvailable ? [{ label: e(R).OAUTH2, value: e(R).OAUTH2 }] : []
|
|
1503
1536
|
],
|
|
1504
1537
|
label: e(a)("form.config.hcv.fields.auth_method.label"),
|
|
1505
|
-
readonly:
|
|
1538
|
+
readonly: n.isReadonly,
|
|
1506
1539
|
required: "",
|
|
1507
1540
|
width: "100%"
|
|
1508
1541
|
}, null, 8, ["modelValue", "items", "label", "readonly"]),
|
|
1509
|
-
|
|
1510
|
-
|
|
1511
|
-
modelValue:
|
|
1512
|
-
"onUpdate:modelValue": r[18] || (r[18] = (i) =>
|
|
1542
|
+
l[e(t).HCV].auth_method === e(R).TOKEN ? (V(), D("div", Wt, [
|
|
1543
|
+
d(_, {
|
|
1544
|
+
modelValue: l[e(t).HCV].token,
|
|
1545
|
+
"onUpdate:modelValue": r[18] || (r[18] = (i) => l[e(t).HCV].token = i),
|
|
1513
1546
|
modelModifiers: { trim: !0 },
|
|
1514
1547
|
autocomplete: "off",
|
|
1515
1548
|
"data-testid": "vault-form-config-hcv-token",
|
|
1516
1549
|
label: e(a)("form.config.hcv.fields.token.label"),
|
|
1517
|
-
readonly:
|
|
1550
|
+
readonly: n.isReadonly,
|
|
1518
1551
|
required: "",
|
|
1519
1552
|
"show-password-mask-toggle": "",
|
|
1520
1553
|
type: "password"
|
|
1521
1554
|
}, null, 8, ["modelValue", "label", "readonly"])
|
|
1522
|
-
])) :
|
|
1523
|
-
|
|
1524
|
-
modelValue:
|
|
1525
|
-
"onUpdate:modelValue": r[19] || (r[19] = (i) =>
|
|
1555
|
+
])) : l[e(t).HCV].auth_method === e(R).K8S ? (V(), D("div", Bt, [
|
|
1556
|
+
d(_, {
|
|
1557
|
+
modelValue: l[e(t).HCV].kube_role,
|
|
1558
|
+
"onUpdate:modelValue": r[19] || (r[19] = (i) => l[e(t).HCV].kube_role = i),
|
|
1526
1559
|
modelModifiers: { trim: !0 },
|
|
1527
1560
|
autocomplete: "off",
|
|
1528
1561
|
"data-testid": "vault-form-config-hcv-kube_role",
|
|
1529
1562
|
label: e(a)("form.config.hcv.fields.kube_role.label"),
|
|
1530
|
-
readonly:
|
|
1563
|
+
readonly: n.isReadonly,
|
|
1531
1564
|
required: "",
|
|
1532
1565
|
type: "text"
|
|
1533
1566
|
}, null, 8, ["modelValue", "label", "readonly"]),
|
|
1534
|
-
|
|
1535
|
-
modelValue:
|
|
1536
|
-
"onUpdate:modelValue": r[20] || (r[20] = (i) =>
|
|
1567
|
+
d(_, {
|
|
1568
|
+
modelValue: l[e(t).HCV].kube_auth_path,
|
|
1569
|
+
"onUpdate:modelValue": r[20] || (r[20] = (i) => l[e(t).HCV].kube_auth_path = i),
|
|
1537
1570
|
modelModifiers: { trim: !0 },
|
|
1538
1571
|
autocomplete: "off",
|
|
1539
1572
|
"data-testid": "vault-form-config-hcv-kube_auth_path",
|
|
1540
1573
|
label: e(a)("form.config.hcv.fields.kube_auth_path.label"),
|
|
1541
|
-
readonly:
|
|
1574
|
+
readonly: n.isReadonly,
|
|
1542
1575
|
type: "text"
|
|
1543
1576
|
}, null, 8, ["modelValue", "label", "readonly"]),
|
|
1544
|
-
|
|
1545
|
-
modelValue:
|
|
1546
|
-
"onUpdate:modelValue": r[21] || (r[21] = (i) =>
|
|
1577
|
+
d(_, {
|
|
1578
|
+
modelValue: l[e(t).HCV].kube_api_token_file,
|
|
1579
|
+
"onUpdate:modelValue": r[21] || (r[21] = (i) => l[e(t).HCV].kube_api_token_file = i),
|
|
1547
1580
|
modelModifiers: { trim: !0 },
|
|
1548
1581
|
autocomplete: "off",
|
|
1549
1582
|
"data-testid": "vault-form-config-hcv-kube_api_token_file",
|
|
1550
1583
|
label: e(a)("form.config.hcv.fields.kube_api_token_file.label"),
|
|
1551
|
-
readonly:
|
|
1584
|
+
readonly: n.isReadonly,
|
|
1552
1585
|
required: "",
|
|
1553
1586
|
type: "text"
|
|
1554
1587
|
}, null, 8, ["modelValue", "label", "readonly"])
|
|
1555
|
-
])) :
|
|
1556
|
-
|
|
1557
|
-
modelValue:
|
|
1558
|
-
"onUpdate:modelValue": r[22] || (r[22] = (i) =>
|
|
1588
|
+
])) : l[e(t).HCV].auth_method === e(R).APP_ROLE ? (V(), D("div", Lt, [
|
|
1589
|
+
d(_, {
|
|
1590
|
+
modelValue: l[e(t).HCV].approle_auth_path,
|
|
1591
|
+
"onUpdate:modelValue": r[22] || (r[22] = (i) => l[e(t).HCV].approle_auth_path = i),
|
|
1559
1592
|
modelModifiers: { trim: !0 },
|
|
1560
1593
|
autocomplete: "off",
|
|
1561
1594
|
"data-testid": "vault-form-config-hcv-approle_auth_path",
|
|
1562
1595
|
label: e(a)("form.config.hcv.fields.approle_auth_path.label"),
|
|
1563
|
-
readonly:
|
|
1596
|
+
readonly: n.isReadonly,
|
|
1564
1597
|
type: "text"
|
|
1565
1598
|
}, null, 8, ["modelValue", "label", "readonly"]),
|
|
1566
|
-
|
|
1567
|
-
modelValue:
|
|
1568
|
-
"onUpdate:modelValue": r[23] || (r[23] = (i) =>
|
|
1599
|
+
d(_, {
|
|
1600
|
+
modelValue: l[e(t).HCV].approle_role_id,
|
|
1601
|
+
"onUpdate:modelValue": r[23] || (r[23] = (i) => l[e(t).HCV].approle_role_id = i),
|
|
1569
1602
|
modelModifiers: { trim: !0 },
|
|
1570
1603
|
autocomplete: "off",
|
|
1571
1604
|
"data-testid": "vault-form-config-hcv-approle_role_id",
|
|
1572
1605
|
label: e(a)("form.config.hcv.fields.approle_role_id.label"),
|
|
1573
|
-
readonly:
|
|
1606
|
+
readonly: n.isReadonly,
|
|
1574
1607
|
required: "",
|
|
1575
1608
|
type: "text"
|
|
1576
1609
|
}, null, 8, ["modelValue", "label", "readonly"]),
|
|
1577
|
-
|
|
1578
|
-
modelValue:
|
|
1579
|
-
"onUpdate:modelValue": r[24] || (r[24] = (i) =>
|
|
1610
|
+
d(_, {
|
|
1611
|
+
modelValue: l[e(t).HCV].approle_secret_id,
|
|
1612
|
+
"onUpdate:modelValue": r[24] || (r[24] = (i) => l[e(t).HCV].approle_secret_id = i),
|
|
1580
1613
|
modelModifiers: { trim: !0 },
|
|
1581
1614
|
autocomplete: "off",
|
|
1582
1615
|
"data-testid": "vault-form-config-hcv-approle_secret_id",
|
|
1583
1616
|
label: e(a)("form.config.hcv.fields.approle_secret_id.label"),
|
|
1584
|
-
readonly:
|
|
1617
|
+
readonly: n.isReadonly,
|
|
1585
1618
|
"show-password-mask-toggle": "",
|
|
1586
1619
|
type: "password"
|
|
1587
1620
|
}, null, 8, ["modelValue", "label", "readonly"]),
|
|
1588
|
-
|
|
1589
|
-
modelValue:
|
|
1590
|
-
"onUpdate:modelValue": r[25] || (r[25] = (i) =>
|
|
1621
|
+
d(_, {
|
|
1622
|
+
modelValue: l[e(t).HCV].approle_secret_id_file,
|
|
1623
|
+
"onUpdate:modelValue": r[25] || (r[25] = (i) => l[e(t).HCV].approle_secret_id_file = i),
|
|
1591
1624
|
modelModifiers: { trim: !0 },
|
|
1592
1625
|
autocomplete: "off",
|
|
1593
1626
|
"data-testid": "vault-form-config-hcv-approle_secret_id_file",
|
|
1594
1627
|
label: e(a)("form.config.hcv.fields.approle_secret_id_file.label"),
|
|
1595
|
-
readonly:
|
|
1628
|
+
readonly: n.isReadonly,
|
|
1596
1629
|
type: "text"
|
|
1597
1630
|
}, null, 8, ["modelValue", "label", "readonly"]),
|
|
1598
|
-
|
|
1599
|
-
modelValue:
|
|
1600
|
-
"onUpdate:modelValue": r[26] || (r[26] = (i) =>
|
|
1631
|
+
d(oe, {
|
|
1632
|
+
modelValue: l[e(t).HCV].approle_response_wrapping,
|
|
1633
|
+
"onUpdate:modelValue": r[26] || (r[26] = (i) => l[e(t).HCV].approle_response_wrapping = i),
|
|
1601
1634
|
"data-testid": "vault-form-config-hcv-approle_response_wrapping",
|
|
1602
1635
|
label: e(a)("form.config.hcv.fields.approle_response_wrapping.label")
|
|
1603
1636
|
}, null, 8, ["modelValue", "label"])
|
|
1604
|
-
])) :
|
|
1605
|
-
|
|
1606
|
-
modelValue:
|
|
1607
|
-
"onUpdate:modelValue": r[27] || (r[27] = (i) =>
|
|
1637
|
+
])) : l[e(t).HCV].auth_method === e(R).CERT ? (V(), D("div", zt, [
|
|
1638
|
+
d(_, {
|
|
1639
|
+
modelValue: l[e(t).HCV].cert_auth_role_name,
|
|
1640
|
+
"onUpdate:modelValue": r[27] || (r[27] = (i) => l[e(t).HCV].cert_auth_role_name = i),
|
|
1608
1641
|
modelModifiers: { trim: !0 },
|
|
1609
1642
|
autocomplete: "off",
|
|
1610
1643
|
"data-testid": "vault-form-config-hcv-cert_auth_role_name",
|
|
1611
1644
|
label: e(a)("form.config.hcv.fields.cert_auth_role_name.label"),
|
|
1612
|
-
readonly:
|
|
1645
|
+
readonly: n.isReadonly,
|
|
1613
1646
|
required: ""
|
|
1614
1647
|
}, null, 8, ["modelValue", "label", "readonly"]),
|
|
1615
|
-
|
|
1616
|
-
modelValue:
|
|
1617
|
-
"onUpdate:modelValue": r[28] || (r[28] = (i) =>
|
|
1648
|
+
d(ue, {
|
|
1649
|
+
modelValue: l[e(t).HCV].cert_auth_cert,
|
|
1650
|
+
"onUpdate:modelValue": r[28] || (r[28] = (i) => l[e(t).HCV].cert_auth_cert = i),
|
|
1618
1651
|
modelModifiers: { trim: !0 },
|
|
1619
1652
|
autocomplete: "off",
|
|
1620
1653
|
"data-testid": "vault-form-config-hcv-cert_auth_cert",
|
|
1621
1654
|
label: e(a)("form.config.hcv.fields.cert_auth_cert.label"),
|
|
1622
|
-
readonly:
|
|
1655
|
+
readonly: n.isReadonly,
|
|
1623
1656
|
required: ""
|
|
1624
1657
|
}, null, 8, ["modelValue", "label", "readonly"]),
|
|
1625
|
-
|
|
1626
|
-
modelValue:
|
|
1627
|
-
"onUpdate:modelValue": r[29] || (r[29] = (i) =>
|
|
1658
|
+
d(ue, {
|
|
1659
|
+
modelValue: l[e(t).HCV].cert_auth_cert_key,
|
|
1660
|
+
"onUpdate:modelValue": r[29] || (r[29] = (i) => l[e(t).HCV].cert_auth_cert_key = i),
|
|
1628
1661
|
modelModifiers: { trim: !0 },
|
|
1629
1662
|
autocomplete: "off",
|
|
1630
1663
|
"data-testid": "vault-form-config-hcv-cert_auth_cert_key",
|
|
1631
1664
|
label: e(a)("form.config.hcv.fields.cert_auth_cert_key.label"),
|
|
1632
|
-
readonly:
|
|
1665
|
+
readonly: n.isReadonly,
|
|
1633
1666
|
required: ""
|
|
1634
1667
|
}, null, 8, ["modelValue", "label", "readonly"])
|
|
1635
|
-
])) :
|
|
1636
|
-
|
|
1637
|
-
|
|
1638
|
-
|
|
1639
|
-
|
|
1668
|
+
])) : l[e(t).HCV].auth_method === e(R).OAUTH2 ? (V(), D("div", Gt, [
|
|
1669
|
+
d(_, {
|
|
1670
|
+
modelValue: l[e(t).HCV].oauth2_client_id,
|
|
1671
|
+
"onUpdate:modelValue": r[30] || (r[30] = (i) => l[e(t).HCV].oauth2_client_id = i),
|
|
1672
|
+
modelModifiers: { trim: !0 },
|
|
1673
|
+
autocomplete: "off",
|
|
1674
|
+
"data-testid": "vault-form-config-hcv-oauth2_client_id",
|
|
1675
|
+
label: e(a)("form.config.hcv.fields.oauth2_client_id.label"),
|
|
1676
|
+
readonly: n.isReadonly,
|
|
1677
|
+
required: ""
|
|
1678
|
+
}, null, 8, ["modelValue", "label", "readonly"]),
|
|
1679
|
+
d(_, {
|
|
1680
|
+
modelValue: l[e(t).HCV].oauth2_client_secret,
|
|
1681
|
+
"onUpdate:modelValue": r[31] || (r[31] = (i) => l[e(t).HCV].oauth2_client_secret = i),
|
|
1682
|
+
modelModifiers: { trim: !0 },
|
|
1683
|
+
autocomplete: "off",
|
|
1684
|
+
"data-testid": "vault-form-config-hcv-oauth2_client_secret",
|
|
1685
|
+
label: e(a)("form.config.hcv.fields.oauth2_client_secret.label"),
|
|
1686
|
+
readonly: n.isReadonly,
|
|
1687
|
+
required: "",
|
|
1688
|
+
"show-password-mask-toggle": "",
|
|
1689
|
+
type: "password"
|
|
1690
|
+
}, null, 8, ["modelValue", "label", "readonly"]),
|
|
1691
|
+
d(_, {
|
|
1692
|
+
modelValue: l[e(t).HCV].oauth2_role_name,
|
|
1693
|
+
"onUpdate:modelValue": r[32] || (r[32] = (i) => l[e(t).HCV].oauth2_role_name = i),
|
|
1694
|
+
modelModifiers: { trim: !0 },
|
|
1695
|
+
autocomplete: "off",
|
|
1696
|
+
"data-testid": "vault-form-config-hcv-oauth2_role_name",
|
|
1697
|
+
label: e(a)("form.config.hcv.fields.oauth2_role_name.label"),
|
|
1698
|
+
"label-attributes": {
|
|
1699
|
+
info: e(a)("form.config.hcv.fields.oauth2_role_name.tooltip"),
|
|
1700
|
+
tooltipAttributes: { maxWidth: "400" }
|
|
1701
|
+
},
|
|
1702
|
+
readonly: n.isReadonly,
|
|
1703
|
+
required: ""
|
|
1704
|
+
}, null, 8, ["modelValue", "label", "label-attributes", "readonly"]),
|
|
1705
|
+
d(_, {
|
|
1706
|
+
modelValue: l[e(t).HCV].oauth2_token_endpoint,
|
|
1707
|
+
"onUpdate:modelValue": r[33] || (r[33] = (i) => l[e(t).HCV].oauth2_token_endpoint = i),
|
|
1708
|
+
modelModifiers: { trim: !0 },
|
|
1709
|
+
autocomplete: "off",
|
|
1710
|
+
"data-testid": "vault-form-config-hcv-oauth2_token_endpoint",
|
|
1711
|
+
label: e(a)("form.config.hcv.fields.oauth2_token_endpoint.label"),
|
|
1712
|
+
readonly: n.isReadonly,
|
|
1713
|
+
required: ""
|
|
1714
|
+
}, null, 8, ["modelValue", "label", "readonly"]),
|
|
1715
|
+
d(_, {
|
|
1716
|
+
modelValue: l[e(t).HCV].oauth2_audiences,
|
|
1717
|
+
"onUpdate:modelValue": r[34] || (r[34] = (i) => l[e(t).HCV].oauth2_audiences = i),
|
|
1718
|
+
modelModifiers: { trim: !0 },
|
|
1719
|
+
autocomplete: "off",
|
|
1720
|
+
"data-testid": "vault-form-config-hcv-oauth2_audiences",
|
|
1721
|
+
label: e(a)("form.config.hcv.fields.oauth2_audiences.label"),
|
|
1722
|
+
"label-attributes": {
|
|
1723
|
+
info: e(a)("form.config.hcv.fields.oauth2_audiences.tooltip"),
|
|
1724
|
+
tooltipAttributes: { maxWidth: "400" }
|
|
1725
|
+
},
|
|
1726
|
+
readonly: n.isReadonly,
|
|
1727
|
+
required: ""
|
|
1728
|
+
}, null, 8, ["modelValue", "label", "label-attributes", "readonly"])
|
|
1729
|
+
])) : B("", !0),
|
|
1730
|
+
o.config.base64FieldAvailable ? (V(), W(oe, {
|
|
1731
|
+
key: 5,
|
|
1732
|
+
modelValue: l[e(t).HCV].base64_decode,
|
|
1733
|
+
"onUpdate:modelValue": r[35] || (r[35] = (i) => l[e(t).HCV].base64_decode = i),
|
|
1640
1734
|
"data-testid": "vault-form-config-hcv-base64_decode",
|
|
1641
1735
|
label: e(a)("form.config.commonFields.base64_decode.label"),
|
|
1642
1736
|
"label-attributes": {
|
|
1643
1737
|
info: e(a)("form.config.commonFields.base64_decode.tooltip"),
|
|
1644
1738
|
tooltipAttributes: { maxWidth: "400" }
|
|
1645
1739
|
},
|
|
1646
|
-
readonly:
|
|
1647
|
-
}, null, 8, ["modelValue", "label", "label-attributes", "readonly"])) :
|
|
1648
|
-
])) :
|
|
1649
|
-
|
|
1740
|
+
readonly: n.isReadonly
|
|
1741
|
+
}, null, 8, ["modelValue", "label", "label-attributes", "readonly"])) : B("", !0)
|
|
1742
|
+
])) : B("", !0),
|
|
1743
|
+
f.value === e(t).AZURE ? (V(), D("div", {
|
|
1650
1744
|
key: `${e(t).AZURE}-vault-config-fields`,
|
|
1651
1745
|
class: "vault-form-config-fields-container"
|
|
1652
1746
|
}, [
|
|
1653
|
-
|
|
1654
|
-
modelValue:
|
|
1655
|
-
"onUpdate:modelValue": r[
|
|
1747
|
+
d(_, {
|
|
1748
|
+
modelValue: l[e(t).AZURE].location,
|
|
1749
|
+
"onUpdate:modelValue": r[36] || (r[36] = (i) => l[e(t).AZURE].location = i),
|
|
1656
1750
|
modelModifiers: { trim: !0 },
|
|
1657
1751
|
autocomplete: "off",
|
|
1658
1752
|
"data-testid": "vault-form-config-azure-location",
|
|
1659
1753
|
label: e(a)("form.config.azure.fields.location.label"),
|
|
1660
|
-
readonly:
|
|
1754
|
+
readonly: n.isReadonly,
|
|
1661
1755
|
required: "",
|
|
1662
1756
|
type: "text"
|
|
1663
1757
|
}, null, 8, ["modelValue", "label", "readonly"]),
|
|
1664
|
-
|
|
1665
|
-
modelValue:
|
|
1666
|
-
"onUpdate:modelValue": r[
|
|
1758
|
+
d(_, {
|
|
1759
|
+
modelValue: l[e(t).AZURE].vault_uri,
|
|
1760
|
+
"onUpdate:modelValue": r[37] || (r[37] = (i) => l[e(t).AZURE].vault_uri = i),
|
|
1667
1761
|
modelModifiers: { trim: !0 },
|
|
1668
1762
|
autocomplete: "off",
|
|
1669
1763
|
"data-testid": "vault-form-config-azure-uri",
|
|
1670
1764
|
label: e(a)("form.config.azure.fields.vault_uri.label"),
|
|
1671
|
-
readonly:
|
|
1765
|
+
readonly: n.isReadonly,
|
|
1672
1766
|
required: "",
|
|
1673
1767
|
type: "text"
|
|
1674
1768
|
}, null, 8, ["modelValue", "label", "readonly"]),
|
|
1675
|
-
|
|
1676
|
-
modelValue:
|
|
1677
|
-
"onUpdate:modelValue": r[
|
|
1769
|
+
d(_, {
|
|
1770
|
+
modelValue: l[e(t).AZURE].credentials_prefix,
|
|
1771
|
+
"onUpdate:modelValue": r[38] || (r[38] = (i) => l[e(t).AZURE].credentials_prefix = i),
|
|
1678
1772
|
modelModifiers: { trim: !0 },
|
|
1679
1773
|
autocomplete: "off",
|
|
1680
1774
|
"data-testid": "vault-form-config-azure-prefix",
|
|
1681
1775
|
label: e(a)("form.config.azure.fields.credential_prefix.label"),
|
|
1682
|
-
readonly:
|
|
1776
|
+
readonly: n.isReadonly,
|
|
1683
1777
|
required: "",
|
|
1684
1778
|
type: "text"
|
|
1685
1779
|
}, null, 8, ["modelValue", "label", "readonly"]),
|
|
1686
|
-
|
|
1687
|
-
modelValue:
|
|
1688
|
-
"onUpdate:modelValue": r[
|
|
1780
|
+
d(C, {
|
|
1781
|
+
modelValue: l[e(t).AZURE].type,
|
|
1782
|
+
"onUpdate:modelValue": r[39] || (r[39] = (i) => l[e(t).AZURE].type = i),
|
|
1689
1783
|
"data-testid": "vault-form-config-azure-type",
|
|
1690
1784
|
items: ee,
|
|
1691
1785
|
label: e(a)("form.config.azure.fields.type.label"),
|
|
1692
1786
|
placeholder: e(a)("form.config.azure.fields.type.placeholder"),
|
|
1693
|
-
readonly:
|
|
1787
|
+
readonly: n.isReadonly,
|
|
1694
1788
|
required: "",
|
|
1695
1789
|
width: "100%"
|
|
1696
1790
|
}, null, 8, ["modelValue", "label", "placeholder", "readonly"]),
|
|
1697
|
-
|
|
1698
|
-
modelValue:
|
|
1699
|
-
"onUpdate:modelValue": r[
|
|
1791
|
+
d(_, {
|
|
1792
|
+
modelValue: l[e(t).AZURE].client_id,
|
|
1793
|
+
"onUpdate:modelValue": r[40] || (r[40] = (i) => l[e(t).AZURE].client_id = i),
|
|
1700
1794
|
modelModifiers: { trim: !0 },
|
|
1701
1795
|
autocomplete: "off",
|
|
1702
1796
|
"data-testid": "vault-form-config-azure-client-id",
|
|
1703
1797
|
label: e(a)("form.config.azure.fields.client_id.label"),
|
|
1704
|
-
readonly:
|
|
1798
|
+
readonly: n.isReadonly,
|
|
1705
1799
|
type: "text"
|
|
1706
1800
|
}, null, 8, ["modelValue", "label", "readonly"]),
|
|
1707
|
-
|
|
1708
|
-
modelValue:
|
|
1709
|
-
"onUpdate:modelValue": r[
|
|
1801
|
+
d(_, {
|
|
1802
|
+
modelValue: l[e(t).AZURE].tenant_id,
|
|
1803
|
+
"onUpdate:modelValue": r[41] || (r[41] = (i) => l[e(t).AZURE].tenant_id = i),
|
|
1710
1804
|
modelModifiers: { trim: !0 },
|
|
1711
1805
|
autocomplete: "off",
|
|
1712
1806
|
"data-testid": "vault-form-config-azure-tenant-id",
|
|
1713
1807
|
label: e(a)("form.config.azure.fields.tenant_id.label"),
|
|
1714
|
-
readonly:
|
|
1808
|
+
readonly: n.isReadonly,
|
|
1715
1809
|
type: "text"
|
|
1716
1810
|
}, null, 8, ["modelValue", "label", "readonly"]),
|
|
1717
|
-
|
|
1811
|
+
o.config.base64FieldAvailable ? (V(), W(oe, {
|
|
1718
1812
|
key: 0,
|
|
1719
|
-
modelValue:
|
|
1720
|
-
"onUpdate:modelValue": r[
|
|
1813
|
+
modelValue: l[e(t).AZURE].base64_decode,
|
|
1814
|
+
"onUpdate:modelValue": r[42] || (r[42] = (i) => l[e(t).AZURE].base64_decode = i),
|
|
1721
1815
|
"data-testid": "vault-form-config-azure-base64_decode",
|
|
1722
1816
|
label: e(a)("form.config.commonFields.base64_decode.label"),
|
|
1723
1817
|
"label-attributes": {
|
|
1724
1818
|
info: e(a)("form.config.commonFields.base64_decode.tooltip"),
|
|
1725
1819
|
tooltipAttributes: { maxWidth: "400" }
|
|
1726
1820
|
},
|
|
1727
|
-
readonly:
|
|
1728
|
-
}, null, 8, ["modelValue", "label", "label-attributes", "readonly"])) :
|
|
1729
|
-
])) :
|
|
1730
|
-
|
|
1821
|
+
readonly: n.isReadonly
|
|
1822
|
+
}, null, 8, ["modelValue", "label", "label-attributes", "readonly"])) : B("", !0)
|
|
1823
|
+
])) : B("", !0),
|
|
1824
|
+
f.value === e(t).CONJUR ? (V(), D("div", {
|
|
1731
1825
|
key: `${e(t).CONJUR}-vault-config-fields`,
|
|
1732
1826
|
class: "vault-form-config-fields-container"
|
|
1733
1827
|
}, [
|
|
1734
|
-
|
|
1735
|
-
modelValue:
|
|
1736
|
-
"onUpdate:modelValue": r[
|
|
1828
|
+
d(_, {
|
|
1829
|
+
modelValue: l[e(t).CONJUR].endpoint_url,
|
|
1830
|
+
"onUpdate:modelValue": r[43] || (r[43] = (i) => l[e(t).CONJUR].endpoint_url = i),
|
|
1737
1831
|
modelModifiers: { trim: !0 },
|
|
1738
1832
|
autocomplete: "off",
|
|
1739
1833
|
"data-testid": "vault-form-config-conjur-endpoint_url",
|
|
@@ -1742,13 +1836,13 @@ const Mt = { class: "kong-ui-entities-vault-form" }, Nt = { class: "vault-form-p
|
|
|
1742
1836
|
info: e(a)("form.config.conjur.fields.endpoint_url.tooltip"),
|
|
1743
1837
|
tooltipAttributes: { maxWidth: "400" }
|
|
1744
1838
|
},
|
|
1745
|
-
readonly:
|
|
1839
|
+
readonly: n.isReadonly,
|
|
1746
1840
|
required: "",
|
|
1747
1841
|
type: "text"
|
|
1748
1842
|
}, null, 8, ["modelValue", "label", "label-attributes", "readonly"]),
|
|
1749
|
-
|
|
1750
|
-
modelValue:
|
|
1751
|
-
"onUpdate:modelValue": r[
|
|
1843
|
+
d(_, {
|
|
1844
|
+
modelValue: l[e(t).CONJUR].login,
|
|
1845
|
+
"onUpdate:modelValue": r[44] || (r[44] = (i) => l[e(t).CONJUR].login = i),
|
|
1752
1846
|
modelModifiers: { trim: !0 },
|
|
1753
1847
|
autocomplete: "off",
|
|
1754
1848
|
"data-testid": "vault-form-config-conjur-login",
|
|
@@ -1757,13 +1851,13 @@ const Mt = { class: "kong-ui-entities-vault-form" }, Nt = { class: "vault-form-p
|
|
|
1757
1851
|
info: e(a)("form.config.conjur.fields.login.tooltip"),
|
|
1758
1852
|
tooltipAttributes: { maxWidth: "400" }
|
|
1759
1853
|
},
|
|
1760
|
-
readonly:
|
|
1854
|
+
readonly: n.isReadonly,
|
|
1761
1855
|
required: "",
|
|
1762
1856
|
type: "text"
|
|
1763
1857
|
}, null, 8, ["modelValue", "label", "label-attributes", "readonly"]),
|
|
1764
|
-
|
|
1765
|
-
modelValue:
|
|
1766
|
-
"onUpdate:modelValue": r[
|
|
1858
|
+
d(_, {
|
|
1859
|
+
modelValue: l[e(t).CONJUR].account,
|
|
1860
|
+
"onUpdate:modelValue": r[45] || (r[45] = (i) => l[e(t).CONJUR].account = i),
|
|
1767
1861
|
modelModifiers: { trim: !0 },
|
|
1768
1862
|
autocomplete: "off",
|
|
1769
1863
|
"data-testid": "vault-form-config-conjur-account",
|
|
@@ -1772,13 +1866,13 @@ const Mt = { class: "kong-ui-entities-vault-form" }, Nt = { class: "vault-form-p
|
|
|
1772
1866
|
info: e(a)("form.config.conjur.fields.account.tooltip"),
|
|
1773
1867
|
tooltipAttributes: { maxWidth: "400" }
|
|
1774
1868
|
},
|
|
1775
|
-
readonly:
|
|
1869
|
+
readonly: n.isReadonly,
|
|
1776
1870
|
required: "",
|
|
1777
1871
|
type: "text"
|
|
1778
1872
|
}, null, 8, ["modelValue", "label", "label-attributes", "readonly"]),
|
|
1779
|
-
|
|
1780
|
-
modelValue:
|
|
1781
|
-
"onUpdate:modelValue": r[
|
|
1873
|
+
d(_, {
|
|
1874
|
+
modelValue: l[e(t).CONJUR].api_key,
|
|
1875
|
+
"onUpdate:modelValue": r[46] || (r[46] = (i) => l[e(t).CONJUR].api_key = i),
|
|
1782
1876
|
modelModifiers: { trim: !0 },
|
|
1783
1877
|
autocomplete: "off",
|
|
1784
1878
|
"data-testid": "vault-form-config-conjur-api_key",
|
|
@@ -1787,26 +1881,26 @@ const Mt = { class: "kong-ui-entities-vault-form" }, Nt = { class: "vault-form-p
|
|
|
1787
1881
|
info: e(a)("form.config.conjur.fields.api_key.tooltip"),
|
|
1788
1882
|
tooltipAttributes: { maxWidth: "400" }
|
|
1789
1883
|
},
|
|
1790
|
-
readonly:
|
|
1884
|
+
readonly: n.isReadonly,
|
|
1791
1885
|
required: "",
|
|
1792
1886
|
"show-password-mask-toggle": "",
|
|
1793
1887
|
type: "password"
|
|
1794
1888
|
}, null, 8, ["modelValue", "label", "label-attributes", "readonly"]),
|
|
1795
|
-
|
|
1889
|
+
o.config.base64FieldAvailable ? (V(), W(oe, {
|
|
1796
1890
|
key: 0,
|
|
1797
|
-
modelValue:
|
|
1798
|
-
"onUpdate:modelValue": r[
|
|
1891
|
+
modelValue: l[e(t).CONJUR].base64_decode,
|
|
1892
|
+
"onUpdate:modelValue": r[47] || (r[47] = (i) => l[e(t).CONJUR].base64_decode = i),
|
|
1799
1893
|
"data-testid": "vault-form-config-env-base64_decode",
|
|
1800
1894
|
label: e(a)("form.config.commonFields.base64_decode.label"),
|
|
1801
1895
|
"label-attributes": {
|
|
1802
1896
|
info: e(a)("form.config.commonFields.base64_decode.tooltip"),
|
|
1803
1897
|
tooltipAttributes: { maxWidth: "400" }
|
|
1804
1898
|
},
|
|
1805
|
-
readonly:
|
|
1806
|
-
}, null, 8, ["modelValue", "label", "label-attributes", "readonly"])) :
|
|
1807
|
-
])) :
|
|
1808
|
-
|
|
1809
|
-
Q.value ? (V(),
|
|
1899
|
+
readonly: n.isReadonly
|
|
1900
|
+
}, null, 8, ["modelValue", "label", "label-attributes", "readonly"])) : B("", !0)
|
|
1901
|
+
])) : B("", !0),
|
|
1902
|
+
o.config.ttl ? (V(), D("div", Jt, [
|
|
1903
|
+
Q.value ? (V(), W(ve, {
|
|
1810
1904
|
key: 0,
|
|
1811
1905
|
class: "advanced-fields-collapse",
|
|
1812
1906
|
"data-testid": "advanced-fields-collapse",
|
|
@@ -1814,11 +1908,11 @@ const Mt = { class: "kong-ui-entities-vault-form" }, Nt = { class: "vault-form-p
|
|
|
1814
1908
|
"trigger-label": e(a)("form.config.advancedFields.title")
|
|
1815
1909
|
}, {
|
|
1816
1910
|
default: m(() => [
|
|
1817
|
-
x("div",
|
|
1818
|
-
x("div",
|
|
1819
|
-
|
|
1820
|
-
modelValue:
|
|
1821
|
-
"onUpdate:modelValue": r[
|
|
1911
|
+
x("div", Zt, [
|
|
1912
|
+
x("div", Qt, [
|
|
1913
|
+
d(_, {
|
|
1914
|
+
modelValue: l[f.value].ttl,
|
|
1915
|
+
"onUpdate:modelValue": r[48] || (r[48] = (i) => l[f.value].ttl = i),
|
|
1822
1916
|
"data-testid": "vault-ttl-input",
|
|
1823
1917
|
label: e(a)("form.config.advancedFields.ttl"),
|
|
1824
1918
|
"label-attributes": {
|
|
@@ -1828,10 +1922,10 @@ const Mt = { class: "kong-ui-entities-vault-form" }, Nt = { class: "vault-form-p
|
|
|
1828
1922
|
type: "number"
|
|
1829
1923
|
}, null, 8, ["modelValue", "label", "label-attributes"])
|
|
1830
1924
|
]),
|
|
1831
|
-
x("div",
|
|
1832
|
-
|
|
1833
|
-
modelValue:
|
|
1834
|
-
"onUpdate:modelValue": r[
|
|
1925
|
+
x("div", Yt, [
|
|
1926
|
+
d(_, {
|
|
1927
|
+
modelValue: l[f.value].neg_ttl,
|
|
1928
|
+
"onUpdate:modelValue": r[49] || (r[49] = (i) => l[f.value].neg_ttl = i),
|
|
1835
1929
|
"data-testid": "vault-neg-ttl-input",
|
|
1836
1930
|
label: e(a)("form.config.advancedFields.negTtl"),
|
|
1837
1931
|
"label-attributes": {
|
|
@@ -1842,11 +1936,11 @@ const Mt = { class: "kong-ui-entities-vault-form" }, Nt = { class: "vault-form-p
|
|
|
1842
1936
|
}, null, 8, ["modelValue", "label", "label-attributes"])
|
|
1843
1937
|
])
|
|
1844
1938
|
]),
|
|
1845
|
-
x("div",
|
|
1846
|
-
x("div",
|
|
1847
|
-
|
|
1848
|
-
modelValue:
|
|
1849
|
-
"onUpdate:modelValue": r[
|
|
1939
|
+
x("div", Xt, [
|
|
1940
|
+
x("div", el, [
|
|
1941
|
+
d(_, {
|
|
1942
|
+
modelValue: l[f.value].resurrect_ttl,
|
|
1943
|
+
"onUpdate:modelValue": r[50] || (r[50] = (i) => l[f.value].resurrect_ttl = i),
|
|
1850
1944
|
"data-testid": "vault-resurrect-ttl-input",
|
|
1851
1945
|
label: e(a)("form.config.advancedFields.resurrectTtl"),
|
|
1852
1946
|
"label-attributes": {
|
|
@@ -1859,22 +1953,22 @@ const Mt = { class: "kong-ui-entities-vault-form" }, Nt = { class: "vault-form-p
|
|
|
1859
1953
|
])
|
|
1860
1954
|
]),
|
|
1861
1955
|
_: 1
|
|
1862
|
-
}, 8, ["trigger-label"])) :
|
|
1863
|
-
])) :
|
|
1956
|
+
}, 8, ["trigger-label"])) : B("", !0)
|
|
1957
|
+
])) : B("", !0)
|
|
1864
1958
|
]),
|
|
1865
1959
|
_: 1
|
|
1866
1960
|
})
|
|
1867
1961
|
]),
|
|
1868
1962
|
_: 1
|
|
1869
1963
|
}, 8, ["description", "title"]),
|
|
1870
|
-
|
|
1964
|
+
d(e(Re), {
|
|
1871
1965
|
description: e(a)("form.sections.general.description"),
|
|
1872
1966
|
title: e(a)("form.sections.general.title")
|
|
1873
1967
|
}, {
|
|
1874
1968
|
default: m(() => [
|
|
1875
|
-
|
|
1876
|
-
modelValue:
|
|
1877
|
-
"onUpdate:modelValue": r[
|
|
1969
|
+
d(_, {
|
|
1970
|
+
modelValue: n.fields.prefix,
|
|
1971
|
+
"onUpdate:modelValue": r[51] || (r[51] = (i) => n.fields.prefix = i),
|
|
1878
1972
|
modelModifiers: { trim: !0 },
|
|
1879
1973
|
autocomplete: "off",
|
|
1880
1974
|
"data-testid": "vault-form-prefix",
|
|
@@ -1885,31 +1979,31 @@ const Mt = { class: "kong-ui-entities-vault-form" }, Nt = { class: "vault-form-p
|
|
|
1885
1979
|
tooltipAttributes: { maxWidth: "400" }
|
|
1886
1980
|
},
|
|
1887
1981
|
placeholder: e(a)("form.fields.prefix.placeholder"),
|
|
1888
|
-
readonly:
|
|
1982
|
+
readonly: n.isReadonly,
|
|
1889
1983
|
required: "",
|
|
1890
1984
|
type: "text"
|
|
1891
1985
|
}, null, 8, ["modelValue", "help", "label", "label-attributes", "placeholder", "readonly"]),
|
|
1892
|
-
|
|
1893
|
-
modelValue:
|
|
1894
|
-
"onUpdate:modelValue": r[
|
|
1986
|
+
d(ue, {
|
|
1987
|
+
modelValue: n.fields.description,
|
|
1988
|
+
"onUpdate:modelValue": r[52] || (r[52] = (i) => n.fields.description = i),
|
|
1895
1989
|
modelModifiers: { trim: !0 },
|
|
1896
1990
|
"character-limit": 1e3,
|
|
1897
1991
|
class: "vault-form-textarea",
|
|
1898
1992
|
"data-testid": "vault-form-description",
|
|
1899
1993
|
label: e(a)("form.fields.description.label"),
|
|
1900
1994
|
placeholder: e(a)("form.fields.description.placeholder"),
|
|
1901
|
-
readonly:
|
|
1995
|
+
readonly: n.isReadonly
|
|
1902
1996
|
}, null, 8, ["modelValue", "label", "placeholder", "readonly"]),
|
|
1903
|
-
|
|
1904
|
-
modelValue:
|
|
1905
|
-
"onUpdate:modelValue": r[
|
|
1997
|
+
d(_, {
|
|
1998
|
+
modelValue: n.fields.tags,
|
|
1999
|
+
"onUpdate:modelValue": r[53] || (r[53] = (i) => n.fields.tags = i),
|
|
1906
2000
|
modelModifiers: { trim: !0 },
|
|
1907
2001
|
autocomplete: "off",
|
|
1908
2002
|
"data-testid": "vault-form-tags",
|
|
1909
2003
|
help: e(a)("form.fields.tags.help"),
|
|
1910
2004
|
label: e(a)("form.fields.tags.label"),
|
|
1911
2005
|
placeholder: e(a)("form.fields.tags.placeholder"),
|
|
1912
|
-
readonly:
|
|
2006
|
+
readonly: n.isReadonly,
|
|
1913
2007
|
type: "text"
|
|
1914
2008
|
}, null, 8, ["modelValue", "help", "label", "placeholder", "readonly"])
|
|
1915
2009
|
]),
|
|
@@ -1921,14 +2015,14 @@ const Mt = { class: "kong-ui-entities-vault-form" }, Nt = { class: "vault-form-p
|
|
|
1921
2015
|
]);
|
|
1922
2016
|
};
|
|
1923
2017
|
}
|
|
1924
|
-
}),
|
|
2018
|
+
}), Ul = /* @__PURE__ */ me(tl, [["__scopeId", "data-v-23223787"]]), ll = { class: "kong-ui-vault-entity-config-card" }, Tl = /* @__PURE__ */ ce({
|
|
1925
2019
|
__name: "VaultConfigCard",
|
|
1926
2020
|
props: {
|
|
1927
2021
|
/** The base konnect or kongManger config. Pass additional config props in the shared entity component as needed. */
|
|
1928
2022
|
config: {
|
|
1929
2023
|
type: Object,
|
|
1930
2024
|
required: !0,
|
|
1931
|
-
validator: (
|
|
2025
|
+
validator: (o) => !(!o || !["konnect", "kongManager"].includes(o == null ? void 0 : o.app) || o.app === "konnect" && !o.controlPlaneId || o.app === "kongManager" && typeof o.workspace != "string" || !o.entityId)
|
|
1932
2026
|
},
|
|
1933
2027
|
/**
|
|
1934
2028
|
* External link for documentation that determines visibility of Documentation button
|
|
@@ -1947,11 +2041,11 @@ const Mt = { class: "kong-ui-entities-vault-form" }, Nt = { class: "vault-form-p
|
|
|
1947
2041
|
}
|
|
1948
2042
|
},
|
|
1949
2043
|
emits: ["loading", "fetch:error", "fetch:success"],
|
|
1950
|
-
setup(
|
|
1951
|
-
const S =
|
|
1952
|
-
var
|
|
1953
|
-
return (g = pe.form[(
|
|
1954
|
-
}), { i18n: { t: p } } =
|
|
2044
|
+
setup(o) {
|
|
2045
|
+
const S = o, c = ["token", "approle_secret_id", "api_key"], u = w(() => {
|
|
2046
|
+
var n, g;
|
|
2047
|
+
return (g = pe.form[(n = S.config) == null ? void 0 : n.app]) == null ? void 0 : g.edit;
|
|
2048
|
+
}), { i18n: { t: p } } = he.useI18n(), { convertKeyToTitle: a } = vt(), { getPropValue: K } = gt(), I = $({
|
|
1955
2049
|
id: {},
|
|
1956
2050
|
name: {
|
|
1957
2051
|
label: p("labels.vault_type")
|
|
@@ -1960,11 +2054,11 @@ const Mt = { class: "kong-ui-entities-vault-form" }, Nt = { class: "vault-form-p
|
|
|
1960
2054
|
created_at: {},
|
|
1961
2055
|
prefix: {
|
|
1962
2056
|
order: 5,
|
|
1963
|
-
section:
|
|
2057
|
+
section: Oe.Basic
|
|
1964
2058
|
},
|
|
1965
2059
|
description: {
|
|
1966
2060
|
order: 6,
|
|
1967
|
-
section:
|
|
2061
|
+
section: Oe.Basic
|
|
1968
2062
|
},
|
|
1969
2063
|
tags: {
|
|
1970
2064
|
order: 7
|
|
@@ -1973,30 +2067,30 @@ const Mt = { class: "kong-ui-entities-vault-form" }, Nt = { class: "vault-form-p
|
|
|
1973
2067
|
order: 8,
|
|
1974
2068
|
type: Se.Json
|
|
1975
2069
|
}
|
|
1976
|
-
}),
|
|
1977
|
-
var g,
|
|
1978
|
-
return ((
|
|
2070
|
+
}), h = (n) => {
|
|
2071
|
+
var g, f;
|
|
2072
|
+
return ((f = (g = I.value) == null ? void 0 : g[n]) == null ? void 0 : f.label) || a(n);
|
|
1979
2073
|
};
|
|
1980
|
-
return (
|
|
1981
|
-
|
|
1982
|
-
config:
|
|
1983
|
-
"config-card-doc":
|
|
2074
|
+
return (n, g) => (V(), D("div", ll, [
|
|
2075
|
+
d(e(bt), {
|
|
2076
|
+
config: o.config,
|
|
2077
|
+
"config-card-doc": o.configCardDoc,
|
|
1984
2078
|
"config-schema": I.value,
|
|
1985
2079
|
"entity-type": e(Ue).Vault,
|
|
1986
|
-
"fetch-url":
|
|
1987
|
-
"hide-title":
|
|
1988
|
-
"onFetch:error": g[0] || (g[0] = (
|
|
1989
|
-
"onFetch:success": g[1] || (g[1] = (
|
|
1990
|
-
onLoading: g[2] || (g[2] = (
|
|
2080
|
+
"fetch-url": u.value,
|
|
2081
|
+
"hide-title": o.hideTitle,
|
|
2082
|
+
"onFetch:error": g[0] || (g[0] = (f) => n.$emit("fetch:error", f)),
|
|
2083
|
+
"onFetch:success": g[1] || (g[1] = (f) => n.$emit("fetch:success", f)),
|
|
2084
|
+
onLoading: g[2] || (g[2] = (f) => n.$emit("loading", f))
|
|
1991
2085
|
}, {
|
|
1992
|
-
config: m(({ rowValue:
|
|
1993
|
-
(V(!0),
|
|
1994
|
-
key:
|
|
2086
|
+
config: m(({ rowValue: f }) => [
|
|
2087
|
+
(V(!0), D(qe, null, et(Object.keys(f).sort(), (O) => (V(), W(e(_t), {
|
|
2088
|
+
key: O,
|
|
1995
2089
|
item: {
|
|
1996
|
-
key:
|
|
1997
|
-
value: e(K)(
|
|
1998
|
-
label:
|
|
1999
|
-
type:
|
|
2090
|
+
key: O,
|
|
2091
|
+
value: e(K)(O, f),
|
|
2092
|
+
label: h(O),
|
|
2093
|
+
type: c.includes(O) ? e(Se).Redacted : e(Se).Text
|
|
2000
2094
|
}
|
|
2001
2095
|
}, null, 8, ["item"]))), 128))
|
|
2002
2096
|
]),
|
|
@@ -2017,7 +2111,7 @@ const Mt = { class: "kong-ui-entities-vault-form" }, Nt = { class: "vault-form-p
|
|
|
2017
2111
|
edit: `${Ce}/config-stores/{id}/secrets/{secretId}`
|
|
2018
2112
|
}
|
|
2019
2113
|
}
|
|
2020
|
-
},
|
|
2114
|
+
}, ol = { class: "table-content-overflow-wrapper" }, al = /* @__PURE__ */ ce({
|
|
2021
2115
|
inheritAttrs: !1,
|
|
2022
2116
|
__name: "SecretListInner",
|
|
2023
2117
|
props: {
|
|
@@ -2025,7 +2119,7 @@ const Mt = { class: "kong-ui-entities-vault-form" }, Nt = { class: "vault-form-p
|
|
|
2025
2119
|
config: {
|
|
2026
2120
|
type: Object,
|
|
2027
2121
|
required: !0,
|
|
2028
|
-
validator: (
|
|
2122
|
+
validator: (o) => !(!o || (o == null ? void 0 : o.app) !== "konnect" || !o.createRoute || !o.getEditRoute)
|
|
2029
2123
|
},
|
|
2030
2124
|
// The config store id for the secrets
|
|
2031
2125
|
configStoreId: {
|
|
@@ -2057,103 +2151,103 @@ const Mt = { class: "kong-ui-entities-vault-form" }, Nt = { class: "vault-form-p
|
|
|
2057
2151
|
}
|
|
2058
2152
|
},
|
|
2059
2153
|
emits: ["error", "delete:success"],
|
|
2060
|
-
setup(
|
|
2154
|
+
setup(o, { emit: S }) {
|
|
2061
2155
|
var ie;
|
|
2062
|
-
const
|
|
2156
|
+
const c = S, u = o, { i18n: { t: p, formatUnixTimeStamp: a } } = he.useI18n(), { axiosInstance: K } = _e((ie = u.config) == null ? void 0 : ie.axiosRequestConfig), h = {
|
|
2063
2157
|
// the Secret Key column is non-hidable
|
|
2064
2158
|
key: { label: p("secrets.list.table_headers.key"), sortable: !1, hidable: !1 },
|
|
2065
2159
|
updated_at: { label: p("secrets.list.table_headers.updated_at"), sortable: !1 }
|
|
2066
|
-
},
|
|
2067
|
-
"data-testid":
|
|
2160
|
+
}, n = (T) => ({
|
|
2161
|
+
"data-testid": T.key
|
|
2068
2162
|
}), g = w(() => {
|
|
2069
|
-
var
|
|
2070
|
-
return `${
|
|
2071
|
-
}),
|
|
2163
|
+
var T;
|
|
2164
|
+
return `${u.config.apiBaseUrl}${be.list[u.config.app]}`.replace(/{controlPlaneId}/gi, ((T = u.config) == null ? void 0 : T.controlPlaneId) || "").replace(/{id}/gi, u.configStoreId || "");
|
|
2165
|
+
}), f = $(""), O = {
|
|
2072
2166
|
isExactMatch: !0,
|
|
2073
2167
|
placeholder: p("search.placeholder_for_secrets.konnect")
|
|
2074
2168
|
}, {
|
|
2075
2169
|
fetcher: X,
|
|
2076
2170
|
fetcherState: Q,
|
|
2077
2171
|
fetcherCacheKey: Y
|
|
2078
|
-
} = De(w(() => ({ ...
|
|
2079
|
-
|
|
2080
|
-
},
|
|
2172
|
+
} = De(w(() => ({ ...u.config, cacheIdentifier: u.cacheIdentifier })), g), F = () => {
|
|
2173
|
+
f.value = "";
|
|
2174
|
+
}, l = $(null), ae = (T) => ({
|
|
2081
2175
|
label: p("actions.edit"),
|
|
2082
|
-
to:
|
|
2083
|
-
}), G = $(void 0), ee = $(!1), J = $(!1), y = $(""),
|
|
2084
|
-
G.value =
|
|
2176
|
+
to: u.config.getEditRoute(T)
|
|
2177
|
+
}), G = $(void 0), ee = $(!1), J = $(!1), y = $(""), N = We(u.config, g.value), re = (T) => {
|
|
2178
|
+
G.value = T, ee.value = !0;
|
|
2085
2179
|
}, ne = () => {
|
|
2086
2180
|
ee.value = !1;
|
|
2087
2181
|
}, le = async () => {
|
|
2088
|
-
var
|
|
2089
|
-
if ((
|
|
2182
|
+
var T, Z, te;
|
|
2183
|
+
if ((T = G.value) != null && T.key) {
|
|
2090
2184
|
J.value = !0;
|
|
2091
2185
|
try {
|
|
2092
|
-
await K.delete(
|
|
2186
|
+
await K.delete(N(G.value.key)), J.value = !1, ee.value = !1, Y.value++, c("delete:success", G.value);
|
|
2093
2187
|
} catch (b) {
|
|
2094
|
-
y.value = ((te = (Z = b.response) == null ? void 0 : Z.data) == null ? void 0 : te.message) || b.message || p("errors.delete"),
|
|
2188
|
+
y.value = ((te = (Z = b.response) == null ? void 0 : Z.data) == null ? void 0 : te.message) || b.message || p("errors.delete"), c("error", b);
|
|
2095
2189
|
} finally {
|
|
2096
2190
|
J.value = !1;
|
|
2097
2191
|
}
|
|
2098
2192
|
}
|
|
2099
2193
|
};
|
|
2100
|
-
ke(Q, (
|
|
2194
|
+
ke(Q, (T) => {
|
|
2101
2195
|
var Z, te, b;
|
|
2102
|
-
if (
|
|
2103
|
-
|
|
2196
|
+
if (T.status === Be.Error) {
|
|
2197
|
+
l.value = {
|
|
2104
2198
|
title: p("errors.general")
|
|
2105
|
-
}, (b = (te = (Z =
|
|
2199
|
+
}, (b = (te = (Z = T.error) == null ? void 0 : Z.response) == null ? void 0 : te.data) != null && b.message && (l.value.message = T.error.response.data.message), c("error", T.error);
|
|
2106
2200
|
return;
|
|
2107
2201
|
}
|
|
2108
|
-
|
|
2202
|
+
l.value = null;
|
|
2109
2203
|
});
|
|
2110
2204
|
const q = $({
|
|
2111
|
-
ctaPath:
|
|
2205
|
+
ctaPath: u.config.createRoute,
|
|
2112
2206
|
ctaText: void 0,
|
|
2113
|
-
message: `${p("secrets.list.empty_state.description")}${
|
|
2207
|
+
message: `${p("secrets.list.empty_state.description")}${u.config.additionMessageForEmptyState ? ` ${u.config.additionMessageForEmptyState}` : ""}`,
|
|
2114
2208
|
title: p("secrets.title")
|
|
2115
2209
|
});
|
|
2116
2210
|
return we(async () => {
|
|
2117
|
-
await
|
|
2118
|
-
}), (
|
|
2211
|
+
await u.canCreate() && (q.value.title = p("secrets.list.empty_state.title"), q.value.ctaText = p("secrets.list.toolbar_actions.new_secret"));
|
|
2212
|
+
}), (T, Z) => {
|
|
2119
2213
|
const te = L("KButton"), b = L("KDropdownItem");
|
|
2120
|
-
return V(),
|
|
2121
|
-
|
|
2122
|
-
"cache-identifier":
|
|
2214
|
+
return V(), D(qe, null, [
|
|
2215
|
+
d(e(Le), {
|
|
2216
|
+
"cache-identifier": o.cacheIdentifier,
|
|
2123
2217
|
"disable-sorting": "",
|
|
2124
2218
|
"empty-state-options": q.value,
|
|
2125
2219
|
"enable-entity-actions": "",
|
|
2126
|
-
"error-message":
|
|
2220
|
+
"error-message": l.value,
|
|
2127
2221
|
fetcher: e(X),
|
|
2128
2222
|
"fetcher-cache-key": e(Y),
|
|
2129
2223
|
"pagination-type": "offset",
|
|
2130
2224
|
"preferences-storage-key": "kong-ui-entities-secrets-list",
|
|
2131
|
-
query:
|
|
2132
|
-
"row-attributes":
|
|
2133
|
-
"table-headers": e(
|
|
2134
|
-
onClearSearchInput:
|
|
2225
|
+
query: f.value,
|
|
2226
|
+
"row-attributes": n,
|
|
2227
|
+
"table-headers": e(h),
|
|
2228
|
+
onClearSearchInput: F
|
|
2135
2229
|
}, {
|
|
2136
2230
|
"toolbar-filter": m(() => [
|
|
2137
|
-
|
|
2138
|
-
modelValue:
|
|
2139
|
-
"onUpdate:modelValue": Z[0] || (Z[0] = (v) =>
|
|
2140
|
-
config:
|
|
2231
|
+
d(e(ze), {
|
|
2232
|
+
modelValue: f.value,
|
|
2233
|
+
"onUpdate:modelValue": Z[0] || (Z[0] = (v) => f.value = v),
|
|
2234
|
+
config: O
|
|
2141
2235
|
}, null, 8, ["modelValue"])
|
|
2142
2236
|
]),
|
|
2143
2237
|
"toolbar-button": m(() => [
|
|
2144
|
-
|
|
2145
|
-
"auth-function": () =>
|
|
2238
|
+
d(e(ge), {
|
|
2239
|
+
"auth-function": () => o.canCreate()
|
|
2146
2240
|
}, {
|
|
2147
2241
|
default: m(() => [
|
|
2148
|
-
|
|
2242
|
+
d(te, {
|
|
2149
2243
|
appearance: "primary",
|
|
2150
2244
|
"data-testid": "toolbar-add-secret",
|
|
2151
2245
|
size: "large",
|
|
2152
|
-
to:
|
|
2246
|
+
to: o.config.createRoute
|
|
2153
2247
|
}, {
|
|
2154
2248
|
default: m(() => [
|
|
2155
|
-
|
|
2156
|
-
de(" " +
|
|
2249
|
+
d(e(Ae)),
|
|
2250
|
+
de(" " + H(e(p)("secrets.list.toolbar_actions.new_secret")), 1)
|
|
2157
2251
|
]),
|
|
2158
2252
|
_: 1
|
|
2159
2253
|
}, 8, ["to"])
|
|
@@ -2162,37 +2256,37 @@ const Mt = { class: "kong-ui-entities-vault-form" }, Nt = { class: "vault-form-p
|
|
|
2162
2256
|
}, 8, ["auth-function"])
|
|
2163
2257
|
]),
|
|
2164
2258
|
key: m(({ rowValue: v }) => [
|
|
2165
|
-
x("div",
|
|
2166
|
-
x("b", null,
|
|
2259
|
+
x("div", ol, [
|
|
2260
|
+
x("b", null, H(v ?? "-"), 1)
|
|
2167
2261
|
])
|
|
2168
2262
|
]),
|
|
2169
2263
|
updated_at: m(({ rowValue: v }) => [
|
|
2170
|
-
x("span", null,
|
|
2264
|
+
x("span", null, H(v ? e(a)(new Date(v).getTime() / 1e3) : "-"), 1)
|
|
2171
2265
|
]),
|
|
2172
2266
|
actions: m(({ row: v }) => [
|
|
2173
|
-
|
|
2174
|
-
"auth-function": () =>
|
|
2267
|
+
d(e(ge), {
|
|
2268
|
+
"auth-function": () => o.canEdit(v)
|
|
2175
2269
|
}, {
|
|
2176
2270
|
default: m(() => [
|
|
2177
|
-
|
|
2271
|
+
d(b, {
|
|
2178
2272
|
"data-testid": "action-entity-edit",
|
|
2179
2273
|
item: ae(v.key)
|
|
2180
2274
|
}, null, 8, ["item"])
|
|
2181
2275
|
]),
|
|
2182
2276
|
_: 2
|
|
2183
2277
|
}, 1032, ["auth-function"]),
|
|
2184
|
-
|
|
2185
|
-
"auth-function": () =>
|
|
2278
|
+
d(e(ge), {
|
|
2279
|
+
"auth-function": () => o.canDelete(v)
|
|
2186
2280
|
}, {
|
|
2187
2281
|
default: m(() => [
|
|
2188
|
-
|
|
2282
|
+
d(b, {
|
|
2189
2283
|
danger: "",
|
|
2190
2284
|
"data-testid": "action-entity-delete",
|
|
2191
2285
|
"has-divider": "",
|
|
2192
2286
|
onClick: (P) => re(v)
|
|
2193
2287
|
}, {
|
|
2194
2288
|
default: m(() => [
|
|
2195
|
-
de(
|
|
2289
|
+
de(H(e(p)("actions.delete")), 1)
|
|
2196
2290
|
]),
|
|
2197
2291
|
_: 1
|
|
2198
2292
|
}, 8, ["onClick"])
|
|
@@ -2202,7 +2296,7 @@ const Mt = { class: "kong-ui-entities-vault-form" }, Nt = { class: "vault-form-p
|
|
|
2202
2296
|
]),
|
|
2203
2297
|
_: 1
|
|
2204
2298
|
}, 8, ["cache-identifier", "empty-state-options", "error-message", "fetcher", "fetcher-cache-key", "query", "table-headers"]),
|
|
2205
|
-
|
|
2299
|
+
d(e(Ge), {
|
|
2206
2300
|
"action-pending": J.value,
|
|
2207
2301
|
description: e(p)("delete.description"),
|
|
2208
2302
|
"entity-name": G.value && G.value.key,
|
|
@@ -2216,14 +2310,14 @@ const Mt = { class: "kong-ui-entities-vault-form" }, Nt = { class: "vault-form-p
|
|
|
2216
2310
|
], 64);
|
|
2217
2311
|
};
|
|
2218
2312
|
}
|
|
2219
|
-
}),
|
|
2313
|
+
}), rl = /* @__PURE__ */ me(al, [["__scopeId", "data-v-904390fc"]]), il = { class: "kong-ui-entities-secrets-list" }, nl = /* @__PURE__ */ ce({
|
|
2220
2314
|
__name: "SecretList",
|
|
2221
2315
|
props: {
|
|
2222
2316
|
/** The base konnect config. Pass additional config props in the shared entity component as needed. */
|
|
2223
2317
|
config: {
|
|
2224
2318
|
type: Object,
|
|
2225
2319
|
required: !0,
|
|
2226
|
-
validator: (
|
|
2320
|
+
validator: (o) => !(!o || (o == null ? void 0 : o.app) !== "konnect" || !o.createRoute || !o.getEditRoute)
|
|
2227
2321
|
},
|
|
2228
2322
|
// The vault id for the secrets
|
|
2229
2323
|
vaultId: {
|
|
@@ -2255,33 +2349,33 @@ const Mt = { class: "kong-ui-entities-vault-form" }, Nt = { class: "vault-form-p
|
|
|
2255
2349
|
}
|
|
2256
2350
|
},
|
|
2257
2351
|
emits: ["error", "delete:success"],
|
|
2258
|
-
setup(
|
|
2259
|
-
var
|
|
2260
|
-
const
|
|
2261
|
-
|
|
2352
|
+
setup(o, { emit: S }) {
|
|
2353
|
+
var n;
|
|
2354
|
+
const c = S, u = o, p = (g) => {
|
|
2355
|
+
c("error", g);
|
|
2262
2356
|
}, a = (g) => {
|
|
2263
|
-
|
|
2264
|
-
}, { axiosInstance: K } = _e((
|
|
2357
|
+
c("delete:success", g);
|
|
2358
|
+
}, { axiosInstance: K } = _e((n = u.config) == null ? void 0 : n.axiosRequestConfig), I = $(""), h = w(() => {
|
|
2265
2359
|
var g;
|
|
2266
|
-
return `${
|
|
2360
|
+
return `${u.config.apiBaseUrl}${be.getVault[u.config.app]}`.replace(/{controlPlaneId}/gi, ((g = u.config) == null ? void 0 : g.controlPlaneId) || "").replace(/{id}/gi, u.vaultId);
|
|
2267
2361
|
});
|
|
2268
2362
|
return we(async () => {
|
|
2269
2363
|
var g;
|
|
2270
2364
|
try {
|
|
2271
|
-
const { data:
|
|
2272
|
-
I.value = (g =
|
|
2273
|
-
} catch (
|
|
2274
|
-
|
|
2365
|
+
const { data: f } = await K.get(h.value);
|
|
2366
|
+
I.value = (g = f == null ? void 0 : f.config) == null ? void 0 : g.config_store_id;
|
|
2367
|
+
} catch (f) {
|
|
2368
|
+
c("error", f);
|
|
2275
2369
|
}
|
|
2276
|
-
}), (g,
|
|
2277
|
-
I.value ? (V(),
|
|
2370
|
+
}), (g, f) => (V(), D("div", il, [
|
|
2371
|
+
I.value ? (V(), W(rl, je({ key: 0 }, u, {
|
|
2278
2372
|
"config-store-id": I.value,
|
|
2279
2373
|
"onDelete:success": a,
|
|
2280
2374
|
onError: p
|
|
2281
|
-
}), null, 16, ["config-store-id"])) :
|
|
2375
|
+
}), null, 16, ["config-store-id"])) : B("", !0)
|
|
2282
2376
|
]));
|
|
2283
2377
|
}
|
|
2284
|
-
}),
|
|
2378
|
+
}), Hl = /* @__PURE__ */ me(nl, [["__scopeId", "data-v-f5aa5636"]]), sl = /* @__PURE__ */ ce({
|
|
2285
2379
|
inheritAttrs: !1,
|
|
2286
2380
|
__name: "SecretFormInner",
|
|
2287
2381
|
props: {
|
|
@@ -2289,7 +2383,7 @@ const Mt = { class: "kong-ui-entities-vault-form" }, Nt = { class: "vault-form-p
|
|
|
2289
2383
|
config: {
|
|
2290
2384
|
type: Object,
|
|
2291
2385
|
required: !0,
|
|
2292
|
-
validator: (
|
|
2386
|
+
validator: (o) => !(!o || o.app !== "konnect" || !o.controlPlaneId || !o.cancelRoute)
|
|
2293
2387
|
},
|
|
2294
2388
|
/** Current config store ID */
|
|
2295
2389
|
configStoreId: {
|
|
@@ -2304,78 +2398,78 @@ const Mt = { class: "kong-ui-entities-vault-form" }, Nt = { class: "vault-form-p
|
|
|
2304
2398
|
}
|
|
2305
2399
|
},
|
|
2306
2400
|
emits: ["update", "error", "loading"],
|
|
2307
|
-
setup(
|
|
2401
|
+
setup(o, { emit: S }) {
|
|
2308
2402
|
var J;
|
|
2309
|
-
const
|
|
2403
|
+
const c = o, u = S, { i18n: { t: p } } = he.useI18n(), a = Ee(), { axiosInstance: K } = _e((J = c.config) == null ? void 0 : J.axiosRequestConfig), { getMessageFromError: I } = Ze(), h = ye({
|
|
2310
2404
|
fields: {
|
|
2311
2405
|
key: "",
|
|
2312
2406
|
value: ""
|
|
2313
2407
|
},
|
|
2314
2408
|
readonly: !1,
|
|
2315
2409
|
errorMessage: ""
|
|
2316
|
-
}),
|
|
2410
|
+
}), n = ye({
|
|
2317
2411
|
key: "",
|
|
2318
2412
|
value: ""
|
|
2319
2413
|
}), g = w(
|
|
2320
2414
|
() => {
|
|
2321
|
-
var y,
|
|
2322
|
-
return (
|
|
2415
|
+
var y, N;
|
|
2416
|
+
return (N = be.form[(y = c.config) == null ? void 0 : y.app]) == null ? void 0 : N.edit.replace(/{id}/gi, c.configStoreId).replace(/{secretId}/gi, c.secretId);
|
|
2323
2417
|
}
|
|
2324
|
-
),
|
|
2418
|
+
), f = () => {
|
|
2325
2419
|
var y;
|
|
2326
|
-
a.push(((y =
|
|
2327
|
-
},
|
|
2328
|
-
|
|
2420
|
+
a.push(((y = c.config) == null ? void 0 : y.cancelRoute) || { name: "secret-list" });
|
|
2421
|
+
}, O = (y) => {
|
|
2422
|
+
u("loading", y);
|
|
2329
2423
|
}, X = (y) => {
|
|
2330
|
-
|
|
2424
|
+
u("error", y);
|
|
2331
2425
|
}, Q = (y) => {
|
|
2332
|
-
var
|
|
2333
|
-
|
|
2334
|
-
}, Y = w(() =>
|
|
2426
|
+
var N, re;
|
|
2427
|
+
h.fields.key = ((N = y == null ? void 0 : y.item) == null ? void 0 : N.key) || (y == null ? void 0 : y.key) || "", h.fields.value = ((re = y == null ? void 0 : y.item) == null ? void 0 : re.value) || (y == null ? void 0 : y.value) || "", Object.assign(n, h.fields);
|
|
2428
|
+
}, Y = w(() => c.secretId ? Ve.Edit : Ve.Create), F = w(() => {
|
|
2335
2429
|
var y;
|
|
2336
|
-
return `${
|
|
2337
|
-
}),
|
|
2338
|
-
key:
|
|
2339
|
-
value:
|
|
2430
|
+
return `${c.config.apiBaseUrl}${be.form[c.config.app][Y.value]}`.replace(/{controlPlaneId}/gi, ((y = c.config) == null ? void 0 : y.controlPlaneId) || "").replace(/{id}/gi, c.configStoreId).replace(/{secretId}/gi, c.secretId);
|
|
2431
|
+
}), l = w(() => !!h.fields.key && !!h.fields.value), ae = w(() => JSON.stringify(h.fields) !== JSON.stringify(n)), G = w(() => ({
|
|
2432
|
+
key: h.fields.key,
|
|
2433
|
+
value: h.fields.value
|
|
2340
2434
|
})), ee = async () => {
|
|
2341
2435
|
try {
|
|
2342
|
-
|
|
2436
|
+
h.readonly = !0;
|
|
2343
2437
|
let y;
|
|
2344
|
-
Y.value === "create" ? y = await K.post(
|
|
2438
|
+
Y.value === "create" ? y = await K.post(F.value, G.value) : Y.value === "edit" && (y = await K.put(F.value, G.value)), Q(y == null ? void 0 : y.data), u("update", y == null ? void 0 : y.data);
|
|
2345
2439
|
} catch (y) {
|
|
2346
|
-
|
|
2440
|
+
h.errorMessage = I(y), u("error", y);
|
|
2347
2441
|
} finally {
|
|
2348
|
-
|
|
2442
|
+
h.readonly = !1;
|
|
2349
2443
|
}
|
|
2350
2444
|
};
|
|
2351
|
-
return (y,
|
|
2445
|
+
return (y, N) => {
|
|
2352
2446
|
const re = L("KInput"), ne = L("KTextArea"), le = L("KAlert");
|
|
2353
|
-
return V(),
|
|
2354
|
-
"can-submit":
|
|
2355
|
-
config:
|
|
2356
|
-
"edit-id":
|
|
2447
|
+
return V(), W(e(Qe), {
|
|
2448
|
+
"can-submit": l.value && ae.value,
|
|
2449
|
+
config: o.config,
|
|
2450
|
+
"edit-id": o.secretId,
|
|
2357
2451
|
"entity-type": e(Ue).Other,
|
|
2358
|
-
"error-message":
|
|
2452
|
+
"error-message": h.errorMessage,
|
|
2359
2453
|
"fetch-url": g.value,
|
|
2360
2454
|
"form-fields": G.value,
|
|
2361
|
-
"is-readonly":
|
|
2362
|
-
onCancel:
|
|
2455
|
+
"is-readonly": h.readonly,
|
|
2456
|
+
onCancel: f,
|
|
2363
2457
|
"onFetch:error": X,
|
|
2364
2458
|
"onFetch:success": Q,
|
|
2365
|
-
onLoading:
|
|
2459
|
+
onLoading: O,
|
|
2366
2460
|
onSubmit: ee
|
|
2367
2461
|
}, {
|
|
2368
2462
|
default: m(() => [
|
|
2369
2463
|
x("div", null, [
|
|
2370
|
-
|
|
2464
|
+
d(e(Re), {
|
|
2371
2465
|
description: e(p)("secrets.form.info.description"),
|
|
2372
2466
|
"has-divider": "",
|
|
2373
2467
|
title: e(p)("secrets.form.info.title")
|
|
2374
2468
|
}, {
|
|
2375
2469
|
default: m(() => [
|
|
2376
|
-
|
|
2377
|
-
modelValue:
|
|
2378
|
-
"onUpdate:modelValue":
|
|
2470
|
+
d(re, {
|
|
2471
|
+
modelValue: h.fields.key,
|
|
2472
|
+
"onUpdate:modelValue": N[0] || (N[0] = (q) => h.fields.key = q),
|
|
2379
2473
|
modelModifiers: { trim: !0 },
|
|
2380
2474
|
autocomplete: "off",
|
|
2381
2475
|
class: "key-field",
|
|
@@ -2383,24 +2477,24 @@ const Mt = { class: "kong-ui-entities-vault-form" }, Nt = { class: "vault-form-p
|
|
|
2383
2477
|
disabled: Y.value === e(Ve).Edit,
|
|
2384
2478
|
label: e(p)("secrets.form.fields.key.label"),
|
|
2385
2479
|
placeholder: e(p)("secrets.form.fields.key.placeholder"),
|
|
2386
|
-
readonly:
|
|
2480
|
+
readonly: h.readonly,
|
|
2387
2481
|
required: "",
|
|
2388
2482
|
type: "text"
|
|
2389
2483
|
}, null, 8, ["modelValue", "disabled", "label", "placeholder", "readonly"]),
|
|
2390
|
-
|
|
2391
|
-
modelValue:
|
|
2392
|
-
"onUpdate:modelValue":
|
|
2484
|
+
d(ne, {
|
|
2485
|
+
modelValue: h.fields.value,
|
|
2486
|
+
"onUpdate:modelValue": N[1] || (N[1] = (q) => h.fields.value = q),
|
|
2393
2487
|
modelModifiers: { trim: !0 },
|
|
2394
2488
|
autocomplete: "off",
|
|
2395
2489
|
"data-testid": "secret-form-value",
|
|
2396
2490
|
label: e(p)("secrets.form.fields.value.label"),
|
|
2397
2491
|
placeholder: e(p)("secrets.form.fields.value.placeholder"),
|
|
2398
|
-
readonly:
|
|
2492
|
+
readonly: h.readonly,
|
|
2399
2493
|
required: "",
|
|
2400
2494
|
resizable: "",
|
|
2401
2495
|
type: "text"
|
|
2402
2496
|
}, null, 8, ["modelValue", "label", "placeholder", "readonly"]),
|
|
2403
|
-
|
|
2497
|
+
d(le, {
|
|
2404
2498
|
appearance: "warning",
|
|
2405
2499
|
message: e(p)("secrets.form.hint")
|
|
2406
2500
|
}, null, 8, ["message"])
|
|
@@ -2413,14 +2507,14 @@ const Mt = { class: "kong-ui-entities-vault-form" }, Nt = { class: "vault-form-p
|
|
|
2413
2507
|
}, 8, ["can-submit", "config", "edit-id", "entity-type", "error-message", "fetch-url", "form-fields", "is-readonly"]);
|
|
2414
2508
|
};
|
|
2415
2509
|
}
|
|
2416
|
-
}),
|
|
2510
|
+
}), ul = /* @__PURE__ */ me(sl, [["__scopeId", "data-v-5ee165bf"]]), dl = { class: "kong-ui-entities-secret-form" }, cl = /* @__PURE__ */ ce({
|
|
2417
2511
|
__name: "SecretForm",
|
|
2418
2512
|
props: {
|
|
2419
2513
|
/** The base konnect or kongManger config. Pass additional config props in the shared entity component as needed. */
|
|
2420
2514
|
config: {
|
|
2421
2515
|
type: Object,
|
|
2422
2516
|
required: !0,
|
|
2423
|
-
validator: (
|
|
2517
|
+
validator: (o) => !(!o || o.app !== "konnect" || !o.controlPlaneId || !o.cancelRoute)
|
|
2424
2518
|
},
|
|
2425
2519
|
/** Current vault ID */
|
|
2426
2520
|
vaultId: {
|
|
@@ -2435,38 +2529,38 @@ const Mt = { class: "kong-ui-entities-vault-form" }, Nt = { class: "vault-form-p
|
|
|
2435
2529
|
}
|
|
2436
2530
|
},
|
|
2437
2531
|
emits: ["update", "error", "loading"],
|
|
2438
|
-
setup(
|
|
2532
|
+
setup(o, { emit: S }) {
|
|
2439
2533
|
var g;
|
|
2440
|
-
const
|
|
2441
|
-
|
|
2442
|
-
}, a = (
|
|
2443
|
-
|
|
2444
|
-
}, K = (
|
|
2445
|
-
|
|
2446
|
-
}, { axiosInstance: I } = _e((g =
|
|
2447
|
-
var
|
|
2448
|
-
return `${
|
|
2534
|
+
const c = o, u = S, p = (f) => {
|
|
2535
|
+
u("update", f);
|
|
2536
|
+
}, a = (f) => {
|
|
2537
|
+
u("error", f);
|
|
2538
|
+
}, K = (f) => {
|
|
2539
|
+
u("loading", f);
|
|
2540
|
+
}, { axiosInstance: I } = _e((g = c.config) == null ? void 0 : g.axiosRequestConfig), h = $(""), n = w(() => {
|
|
2541
|
+
var f;
|
|
2542
|
+
return `${c.config.apiBaseUrl}${be.getVault[c.config.app]}`.replace(/{controlPlaneId}/gi, ((f = c.config) == null ? void 0 : f.controlPlaneId) || "").replace(/{id}/gi, c.vaultId);
|
|
2449
2543
|
});
|
|
2450
2544
|
return we(async () => {
|
|
2451
|
-
var
|
|
2545
|
+
var f;
|
|
2452
2546
|
try {
|
|
2453
|
-
const { data:
|
|
2454
|
-
|
|
2455
|
-
} catch (
|
|
2456
|
-
|
|
2547
|
+
const { data: O } = await I.get(n.value);
|
|
2548
|
+
h.value = (f = O == null ? void 0 : O.config) == null ? void 0 : f.config_store_id;
|
|
2549
|
+
} catch (O) {
|
|
2550
|
+
u("error", O);
|
|
2457
2551
|
}
|
|
2458
|
-
}), (
|
|
2459
|
-
|
|
2460
|
-
"config-store-id":
|
|
2552
|
+
}), (f, O) => (V(), D("div", dl, [
|
|
2553
|
+
h.value ? (V(), W(ul, je({ key: 0 }, c, {
|
|
2554
|
+
"config-store-id": h.value,
|
|
2461
2555
|
onError: a,
|
|
2462
2556
|
onLoading: K,
|
|
2463
2557
|
onUpdate: p
|
|
2464
|
-
}), null, 16, ["config-store-id"])) :
|
|
2558
|
+
}), null, 16, ["config-store-id"])) : B("", !0)
|
|
2465
2559
|
]));
|
|
2466
2560
|
}
|
|
2467
|
-
}), $l = /* @__PURE__ */ me(
|
|
2561
|
+
}), $l = /* @__PURE__ */ me(cl, [["__scopeId", "data-v-754ddb2f"]]), fl = {
|
|
2468
2562
|
class: "vault-secret-picker-provider"
|
|
2469
|
-
},
|
|
2563
|
+
}, pl = /* @__PURE__ */ ce({
|
|
2470
2564
|
__name: "VaultSecretPickerProvider",
|
|
2471
2565
|
props: {
|
|
2472
2566
|
value: {},
|
|
@@ -2478,63 +2572,63 @@ const Mt = { class: "kong-ui-entities-vault-form" }, Nt = { class: "vault-form-p
|
|
|
2478
2572
|
}
|
|
2479
2573
|
},
|
|
2480
2574
|
emits: ["open"],
|
|
2481
|
-
setup(
|
|
2575
|
+
setup(o, {
|
|
2482
2576
|
emit: S
|
|
2483
2577
|
}) {
|
|
2484
|
-
const
|
|
2578
|
+
const c = o, u = S, {
|
|
2485
2579
|
i18n: {
|
|
2486
2580
|
t: p
|
|
2487
2581
|
},
|
|
2488
2582
|
i18nT: a
|
|
2489
|
-
} =
|
|
2490
|
-
return (K, I) => (V(),
|
|
2583
|
+
} = he.useI18n();
|
|
2584
|
+
return (K, I) => (V(), D("div", fl, [d(e(a), {
|
|
2491
2585
|
keypath: "vault_secret_picker.provider.complete_action",
|
|
2492
2586
|
scope: "global"
|
|
2493
2587
|
}, {
|
|
2494
2588
|
cta: m(() => [x("span", {
|
|
2495
2589
|
class: tt({
|
|
2496
2590
|
"vault-secret-picker-provider-action": !0,
|
|
2497
|
-
disabled:
|
|
2591
|
+
disabled: c.disabled
|
|
2498
2592
|
}),
|
|
2499
|
-
onClick: I[0] || (I[0] = () => !
|
|
2500
|
-
},
|
|
2593
|
+
onClick: I[0] || (I[0] = () => !c.disabled && u("open", c.value, c.update))
|
|
2594
|
+
}, H(e(p)("vault_secret_picker.provider.cta")), 3)]),
|
|
2501
2595
|
_: 1
|
|
2502
2596
|
})]));
|
|
2503
2597
|
}
|
|
2504
|
-
}), Kl = /* @__PURE__ */ me(
|
|
2505
|
-
let S =
|
|
2598
|
+
}), Kl = /* @__PURE__ */ me(pl, [["__scopeId", "data-v-66a1e406"]]), ml = (o) => {
|
|
2599
|
+
let S = o.trim();
|
|
2506
2600
|
if (!S.startsWith("{") || !S.endsWith("}"))
|
|
2507
2601
|
throw new Error("Invalid secret reference: must be enclosed in curly braces");
|
|
2508
2602
|
if (S = S.substring(1, S.length - 1).trim(), !S.startsWith("vault://"))
|
|
2509
2603
|
throw new Error("Invalid secret reference: must start with vault://");
|
|
2510
|
-
const
|
|
2511
|
-
if (!d)
|
|
2512
|
-
throw new Error("Invalid secret reference: must have a vault prefix");
|
|
2513
|
-
const c = d.host, [, p, ...a] = d.pathname.split("/");
|
|
2604
|
+
const c = new URL(`http://${S.substring(8)}`);
|
|
2514
2605
|
if (!c)
|
|
2515
2606
|
throw new Error("Invalid secret reference: must have a vault prefix");
|
|
2607
|
+
const u = c.host, [, p, ...a] = c.pathname.split("/");
|
|
2608
|
+
if (!u)
|
|
2609
|
+
throw new Error("Invalid secret reference: must have a vault prefix");
|
|
2516
2610
|
return {
|
|
2517
|
-
vaultPrefix:
|
|
2611
|
+
vaultPrefix: u,
|
|
2518
2612
|
secretId: p || void 0,
|
|
2519
2613
|
// Non-empty string or undefined
|
|
2520
2614
|
optionalSecretKey: a == null ? void 0 : a.join("/")
|
|
2521
2615
|
// Non-empty string or undefined
|
|
2522
2616
|
};
|
|
2523
|
-
},
|
|
2524
|
-
if (!
|
|
2617
|
+
}, vl = (o) => {
|
|
2618
|
+
if (!o.vaultPrefix)
|
|
2525
2619
|
throw new Error("Invalid secret reference: must have a vault prefix");
|
|
2526
|
-
let S = `vault://${
|
|
2527
|
-
return
|
|
2528
|
-
},
|
|
2620
|
+
let S = `vault://${o.vaultPrefix}`;
|
|
2621
|
+
return o.secretId && (S = `${S}/${o.secretId}`), o.optionalSecretKey && (S = `${S}/${o.optionalSecretKey}`), `{${S}}`;
|
|
2622
|
+
}, gl = {
|
|
2529
2623
|
key: 1,
|
|
2530
2624
|
class: "inputs-wrapper"
|
|
2531
|
-
},
|
|
2625
|
+
}, bl = { "data-testid": "no-search-results" }, _l = { class: "k-select-selected-item-label" }, hl = { class: "vault-secret-picker-vault-dropdown-item" }, yl = { class: "select-item-label" }, Vl = { class: "select-item-description" }, kl = { class: "select-item-description" }, Cl = { "data-testid": "no-search-results" }, wl = /* @__PURE__ */ ce({
|
|
2532
2626
|
__name: "VaultSecretPicker",
|
|
2533
2627
|
props: {
|
|
2534
2628
|
config: {
|
|
2535
2629
|
type: Object,
|
|
2536
2630
|
required: !0,
|
|
2537
|
-
validator: (
|
|
2631
|
+
validator: (o) => !(!o || !["konnect", "kongManager"].includes(o == null ? void 0 : o.app) || o.app === "konnect" && !o.controlPlaneId || o.app === "kongManager" && typeof o.workspace != "string")
|
|
2538
2632
|
},
|
|
2539
2633
|
setup: {
|
|
2540
2634
|
type: null,
|
|
@@ -2558,30 +2652,30 @@ const Mt = { class: "kong-ui-entities-vault-form" }, Nt = { class: "vault-form-p
|
|
|
2558
2652
|
}
|
|
2559
2653
|
},
|
|
2560
2654
|
emits: ["proceed", "cancel"],
|
|
2561
|
-
setup(
|
|
2655
|
+
setup(o, { emit: S }) {
|
|
2562
2656
|
var te;
|
|
2563
|
-
const { i18n: { t:
|
|
2657
|
+
const { i18n: { t: c } } = he.useI18n(), u = o, p = S, { axiosInstance: a } = _e({
|
|
2564
2658
|
// 404 errors are allowed in this components
|
|
2565
2659
|
validateStatus: (b) => b === 404 || b >= 200 && b < 300,
|
|
2566
2660
|
// Spread the passed-in config later to allow overriding
|
|
2567
|
-
...(te =
|
|
2568
|
-
}), K = $(!1), I = $(""),
|
|
2661
|
+
...(te = u.config) == null ? void 0 : te.axiosRequestConfig
|
|
2662
|
+
}), K = $(!1), I = $(""), h = $(""), n = $(""), g = $(), f = w(() => {
|
|
2569
2663
|
var b, v;
|
|
2570
|
-
return
|
|
2571
|
-
}),
|
|
2664
|
+
return u.config.app === "konnect" ? be.list[u.config.app].replace(/{id}/gi, ((v = (b = g.value) == null ? void 0 : b.config) == null ? void 0 : v.config_store_id) ?? "") : "<not_applicable>";
|
|
2665
|
+
}), O = w(() => {
|
|
2572
2666
|
if (Y && ee)
|
|
2573
|
-
return
|
|
2667
|
+
return c("vault_secret_picker.fetch_error.vaults_and_secrets");
|
|
2574
2668
|
if (Y)
|
|
2575
|
-
return
|
|
2669
|
+
return c("vault_secret_picker.fetch_error.vaults");
|
|
2576
2670
|
if (ee)
|
|
2577
|
-
return
|
|
2671
|
+
return c("vault_secret_picker.fetch_error.secrets");
|
|
2578
2672
|
}), {
|
|
2579
2673
|
debouncedQueryChange: X,
|
|
2580
2674
|
loading: Q,
|
|
2581
2675
|
error: Y,
|
|
2582
|
-
loadItems:
|
|
2583
|
-
results:
|
|
2584
|
-
} =
|
|
2676
|
+
loadItems: F,
|
|
2677
|
+
results: l
|
|
2678
|
+
} = Ne(u.config, pe.list[u.config.app].getAll, void 0, {
|
|
2585
2679
|
fetchedItemsKey: "data",
|
|
2586
2680
|
searchKeys: ["prefix"]
|
|
2587
2681
|
}), {
|
|
@@ -2590,14 +2684,14 @@ const Mt = { class: "kong-ui-entities-vault-form" }, Nt = { class: "vault-form-p
|
|
|
2590
2684
|
error: ee,
|
|
2591
2685
|
loadItems: J,
|
|
2592
2686
|
results: y
|
|
2593
|
-
} =
|
|
2687
|
+
} = Ne(u.config, f, void 0, {
|
|
2594
2688
|
fetchedItemsKey: "data",
|
|
2595
2689
|
searchKeys: ["key"],
|
|
2596
2690
|
exactMatchKey: "key"
|
|
2597
|
-
}),
|
|
2691
|
+
}), N = w(() => {
|
|
2598
2692
|
var P;
|
|
2599
2693
|
let b = !1;
|
|
2600
|
-
const v = ((P =
|
|
2694
|
+
const v = ((P = l.value) == null ? void 0 : P.map((M) => (M.prefix === I.value && (b = !0), { label: M.prefix, value: M.prefix, vault: M }))) ?? [];
|
|
2601
2695
|
return !b && g.value && v.push({
|
|
2602
2696
|
label: g.value.prefix,
|
|
2603
2697
|
value: g.value.prefix,
|
|
@@ -2606,114 +2700,114 @@ const Mt = { class: "kong-ui-entities-vault-form" }, Nt = { class: "vault-form-p
|
|
|
2606
2700
|
}), re = w(() => {
|
|
2607
2701
|
var P;
|
|
2608
2702
|
let b = !1;
|
|
2609
|
-
const v = ((P = y.value) == null ? void 0 : P.map((
|
|
2610
|
-
return !b &&
|
|
2703
|
+
const v = ((P = y.value) == null ? void 0 : P.map((M) => (M.key === h.value && (b = !0), { label: M.key, value: M.key }))) ?? [];
|
|
2704
|
+
return !b && h.value && v.push({ label: h.value, value: h.value }), v;
|
|
2611
2705
|
}), ne = w(() => {
|
|
2612
2706
|
var b;
|
|
2613
2707
|
return ((b = g == null ? void 0 : g.value) == null ? void 0 : b.name) === "konnect";
|
|
2614
|
-
}), le = w(() => !!g.value && !!
|
|
2615
|
-
var P,
|
|
2616
|
-
let v = `${
|
|
2617
|
-
return
|
|
2618
|
-
},
|
|
2708
|
+
}), le = w(() => !!g.value && !!h.value && !u.additionalDisabled), q = (b) => b.label ? `${b.label} - (${b.vault.name} - ${b.vault.id})` : b.value, ie = (b) => {
|
|
2709
|
+
var P, M;
|
|
2710
|
+
let v = `${u.config.apiBaseUrl}${pe.form[u.config.app].edit}`;
|
|
2711
|
+
return u.config.app === "konnect" ? v = v.replace(/{controlPlaneId}/gi, ((P = u.config) == null ? void 0 : P.controlPlaneId) || "") : u.config.app === "kongManager" && (v = v.replace(/\/{workspace}/gi, (M = u.config) != null && M.workspace ? `/${u.config.workspace}` : "")), v.replace(/{id}/gi, b);
|
|
2712
|
+
}, T = (b, v) => {
|
|
2619
2713
|
var P;
|
|
2620
|
-
return
|
|
2714
|
+
return u.config.app !== "konnect" ? "<not_applicable>" : `${u.config.apiBaseUrl}${be.form[u.config.app].edit}`.replace(/{controlPlaneId}/gi, ((P = u.config) == null ? void 0 : P.controlPlaneId) || "").replace(/{id}/gi, v).replace(/{secretId}/gi, b);
|
|
2621
2715
|
}, Z = () => {
|
|
2622
|
-
p("proceed",
|
|
2716
|
+
p("proceed", vl({
|
|
2623
2717
|
vaultPrefix: I.value,
|
|
2624
|
-
secretId:
|
|
2718
|
+
secretId: h.value || void 0,
|
|
2625
2719
|
// Either a non-empty string or undefined
|
|
2626
|
-
optionalSecretKey:
|
|
2720
|
+
optionalSecretKey: n.value || void 0
|
|
2627
2721
|
// Either a non-empty string or undefined
|
|
2628
2722
|
}));
|
|
2629
2723
|
};
|
|
2630
|
-
return ke(() =>
|
|
2724
|
+
return ke(() => u.setup, async (b) => {
|
|
2631
2725
|
if (b !== !1) {
|
|
2632
|
-
if (K.value = !0, I.value = "", g.value = void 0,
|
|
2726
|
+
if (K.value = !0, I.value = "", g.value = void 0, h.value = "", n.value = "", typeof b == "string" && b.trim().length > 0)
|
|
2633
2727
|
try {
|
|
2634
|
-
let v, P = "",
|
|
2635
|
-
const j =
|
|
2636
|
-
if (
|
|
2637
|
-
if (v =
|
|
2728
|
+
let v, P = "", M = "", se = "";
|
|
2729
|
+
const j = ml(b), { data: A } = await a.get(ie(j.vaultPrefix));
|
|
2730
|
+
if (A != null && A.name)
|
|
2731
|
+
if (v = A, P = j.vaultPrefix, v.name === "konnect") {
|
|
2638
2732
|
if (j.secretId) {
|
|
2639
|
-
const { data: fe } = await a.get(
|
|
2640
|
-
fe.key === j.secretId && (
|
|
2733
|
+
const { data: fe } = await a.get(T(j.secretId, A.config.config_store_id));
|
|
2734
|
+
fe.key === j.secretId && (M = j.secretId, se = j.optionalSecretKey ?? "");
|
|
2641
2735
|
}
|
|
2642
2736
|
} else
|
|
2643
|
-
|
|
2737
|
+
M = j.secretId ?? "", se = j.optionalSecretKey ?? "";
|
|
2644
2738
|
await lt(() => {
|
|
2645
|
-
I.value = P, g.value = v,
|
|
2739
|
+
I.value = P, g.value = v, h.value = M, n.value = se;
|
|
2646
2740
|
});
|
|
2647
2741
|
} catch (v) {
|
|
2648
2742
|
console.debug(v);
|
|
2649
2743
|
}
|
|
2650
|
-
K.value = !1, await
|
|
2744
|
+
K.value = !1, await F();
|
|
2651
2745
|
}
|
|
2652
2746
|
}, { immediate: !0 }), ke(I, async (b, v) => {
|
|
2653
2747
|
var P;
|
|
2654
|
-
K.value || b === v || (g.value = (P =
|
|
2655
|
-
}), ke(
|
|
2748
|
+
K.value || b === v || (g.value = (P = N.value.find((M) => M.value === b)) == null ? void 0 : P.vault, h.value = "", n.value = "");
|
|
2749
|
+
}), ke(f, async () => {
|
|
2656
2750
|
ne.value && await J();
|
|
2657
2751
|
}, { immediate: !0 }), (b, v) => {
|
|
2658
|
-
const P = L("KEmptyState"),
|
|
2659
|
-
return V(),
|
|
2752
|
+
const P = L("KEmptyState"), M = L("KSelect"), se = L("KInput"), j = L("KModal");
|
|
2753
|
+
return V(), W(j, {
|
|
2660
2754
|
"action-button-disabled": !le.value,
|
|
2661
|
-
"action-button-text":
|
|
2755
|
+
"action-button-text": o.proceedButtonText || e(c)("vault_secret_picker.actions.use_key"),
|
|
2662
2756
|
class: "vault-secret-picker",
|
|
2663
2757
|
"data-testid": "vault-secret-picker-modal",
|
|
2664
|
-
title:
|
|
2665
|
-
visible:
|
|
2758
|
+
title: o.title || e(c)("vault_secret_picker.title"),
|
|
2759
|
+
visible: u.setup !== !1,
|
|
2666
2760
|
onCancel: v[4] || (v[4] = () => p("cancel")),
|
|
2667
2761
|
onProceed: Z
|
|
2668
2762
|
}, {
|
|
2669
2763
|
default: m(() => [
|
|
2670
|
-
e(Y) || e(ee) ? (V(),
|
|
2764
|
+
e(Y) || e(ee) ? (V(), W(P, {
|
|
2671
2765
|
key: 0,
|
|
2672
2766
|
"data-testid": "vault-secret-picker-fetch-error",
|
|
2673
2767
|
"icon-variant": "error",
|
|
2674
|
-
message:
|
|
2675
|
-
}, null, 8, ["message"])) : (V(),
|
|
2768
|
+
message: O.value
|
|
2769
|
+
}, null, 8, ["message"])) : (V(), D("div", gl, [
|
|
2676
2770
|
ot(b.$slots, "form-prefix", {}, void 0, !0),
|
|
2677
|
-
|
|
2771
|
+
d(M, {
|
|
2678
2772
|
modelValue: I.value,
|
|
2679
|
-
"onUpdate:modelValue": v[0] || (v[0] = (
|
|
2773
|
+
"onUpdate:modelValue": v[0] || (v[0] = (A) => I.value = A),
|
|
2680
2774
|
clearable: "",
|
|
2681
2775
|
"data-testid": "vault-secret-picker-vault-select",
|
|
2682
2776
|
disabled: K.value,
|
|
2683
2777
|
"enable-filtering": "",
|
|
2684
2778
|
"filter-function": () => !0,
|
|
2685
|
-
items:
|
|
2779
|
+
items: N.value,
|
|
2686
2780
|
"kpop-attributes": { "data-testid": "vault-secret-picker-vault-popover" },
|
|
2687
|
-
label: e(
|
|
2781
|
+
label: e(c)("vault_secret_picker.vault.label"),
|
|
2688
2782
|
loading: e(Q),
|
|
2689
|
-
placeholder: e(
|
|
2783
|
+
placeholder: e(c)("vault_secret_picker.vault.placeholder"),
|
|
2690
2784
|
required: "",
|
|
2691
2785
|
"reuse-item-template": "",
|
|
2692
2786
|
width: "100%",
|
|
2693
2787
|
onQueryChange: e(X)
|
|
2694
2788
|
}, {
|
|
2695
2789
|
loading: m(() => [
|
|
2696
|
-
x("div", null,
|
|
2790
|
+
x("div", null, H(e(c)("actions.loading")), 1)
|
|
2697
2791
|
]),
|
|
2698
2792
|
empty: m(() => [
|
|
2699
|
-
x("div",
|
|
2793
|
+
x("div", bl, H(e(c)("vault_secret_picker.no_results")), 1)
|
|
2700
2794
|
]),
|
|
2701
|
-
"selected-item-template": m(({ item:
|
|
2702
|
-
x("span",
|
|
2795
|
+
"selected-item-template": m(({ item: A }) => [
|
|
2796
|
+
x("span", _l, H(q(A)), 1)
|
|
2703
2797
|
]),
|
|
2704
|
-
"item-template": m(({ item:
|
|
2705
|
-
x("div",
|
|
2706
|
-
x("span", yl,
|
|
2707
|
-
x("span",
|
|
2708
|
-
x("span",
|
|
2798
|
+
"item-template": m(({ item: A }) => [
|
|
2799
|
+
x("div", hl, [
|
|
2800
|
+
x("span", yl, H(A.label), 1),
|
|
2801
|
+
x("span", Vl, H(A.vault.name), 1),
|
|
2802
|
+
x("span", kl, H(A.vault.id), 1)
|
|
2709
2803
|
])
|
|
2710
2804
|
]),
|
|
2711
2805
|
_: 1
|
|
2712
2806
|
}, 8, ["modelValue", "disabled", "items", "label", "loading", "placeholder", "onQueryChange"]),
|
|
2713
|
-
ne.value ? (V(),
|
|
2807
|
+
ne.value ? (V(), W(M, {
|
|
2714
2808
|
key: 0,
|
|
2715
|
-
modelValue:
|
|
2716
|
-
"onUpdate:modelValue": v[1] || (v[1] = (
|
|
2809
|
+
modelValue: h.value,
|
|
2810
|
+
"onUpdate:modelValue": v[1] || (v[1] = (A) => h.value = A),
|
|
2717
2811
|
clearable: "",
|
|
2718
2812
|
"data-testid": "vault-secret-picker-secret-id-select",
|
|
2719
2813
|
disabled: K.value || !g.value,
|
|
@@ -2721,44 +2815,44 @@ const Mt = { class: "kong-ui-entities-vault-form" }, Nt = { class: "vault-form-p
|
|
|
2721
2815
|
"filter-function": () => !0,
|
|
2722
2816
|
items: re.value,
|
|
2723
2817
|
"kpop-attributes": { "data-testid": "vault-secret-picker-secret-id-popover" },
|
|
2724
|
-
label: e(
|
|
2818
|
+
label: e(c)("vault_secret_picker.secret_id.label"),
|
|
2725
2819
|
loading: e(G),
|
|
2726
|
-
placeholder: e(
|
|
2820
|
+
placeholder: e(c)("vault_secret_picker.secret_id.select_placeholder"),
|
|
2727
2821
|
required: "",
|
|
2728
2822
|
"reuse-item-template": "",
|
|
2729
2823
|
width: "100%",
|
|
2730
2824
|
onQueryChange: e(ae)
|
|
2731
2825
|
}, {
|
|
2732
2826
|
loading: m(() => [
|
|
2733
|
-
x("div", null,
|
|
2827
|
+
x("div", null, H(e(c)("actions.loading")), 1)
|
|
2734
2828
|
]),
|
|
2735
2829
|
empty: m(() => [
|
|
2736
|
-
x("div",
|
|
2830
|
+
x("div", Cl, H(e(c)("vault_secret_picker.no_results")), 1)
|
|
2737
2831
|
]),
|
|
2738
2832
|
_: 1
|
|
2739
|
-
}, 8, ["modelValue", "disabled", "items", "label", "loading", "placeholder", "onQueryChange"])) : (V(),
|
|
2833
|
+
}, 8, ["modelValue", "disabled", "items", "label", "loading", "placeholder", "onQueryChange"])) : (V(), W(se, {
|
|
2740
2834
|
key: 1,
|
|
2741
|
-
modelValue:
|
|
2742
|
-
"onUpdate:modelValue": v[2] || (v[2] = (
|
|
2835
|
+
modelValue: h.value,
|
|
2836
|
+
"onUpdate:modelValue": v[2] || (v[2] = (A) => h.value = A),
|
|
2743
2837
|
modelModifiers: { trim: !0 },
|
|
2744
2838
|
autocomplete: "off",
|
|
2745
2839
|
"data-testid": "vault-secret-picker-secret-id-input",
|
|
2746
2840
|
disabled: K.value || !g.value,
|
|
2747
|
-
label: e(
|
|
2748
|
-
placeholder: e(
|
|
2841
|
+
label: e(c)("vault_secret_picker.secret_id.label"),
|
|
2842
|
+
placeholder: e(c)("vault_secret_picker.secret_id.input_placeholder"),
|
|
2749
2843
|
required: "",
|
|
2750
2844
|
type: "text"
|
|
2751
2845
|
}, null, 8, ["modelValue", "disabled", "label", "placeholder"])),
|
|
2752
|
-
|
|
2753
|
-
modelValue:
|
|
2754
|
-
"onUpdate:modelValue": v[3] || (v[3] = (
|
|
2846
|
+
d(se, {
|
|
2847
|
+
modelValue: n.value,
|
|
2848
|
+
"onUpdate:modelValue": v[3] || (v[3] = (A) => n.value = A),
|
|
2755
2849
|
modelModifiers: { trim: !0 },
|
|
2756
2850
|
autocomplete: "off",
|
|
2757
2851
|
"data-testid": "vault-secret-picker-secret-key-input",
|
|
2758
2852
|
disabled: K.value || !g.value,
|
|
2759
|
-
help: e(
|
|
2760
|
-
label: e(
|
|
2761
|
-
placeholder: e(
|
|
2853
|
+
help: e(c)("vault_secret_picker.optional_secret_key.help"),
|
|
2854
|
+
label: e(c)("vault_secret_picker.optional_secret_key.label"),
|
|
2855
|
+
placeholder: e(c)("vault_secret_picker.optional_secret_key.placeholder"),
|
|
2762
2856
|
type: "text"
|
|
2763
2857
|
}, null, 8, ["modelValue", "disabled", "help", "label", "placeholder"])
|
|
2764
2858
|
]))
|
|
@@ -2767,13 +2861,13 @@ const Mt = { class: "kong-ui-entities-vault-form" }, Nt = { class: "vault-form-p
|
|
|
2767
2861
|
}, 8, ["action-button-disabled", "action-button-text", "title", "visible"]);
|
|
2768
2862
|
};
|
|
2769
2863
|
}
|
|
2770
|
-
}), Pl = /* @__PURE__ */ me(
|
|
2864
|
+
}), Pl = /* @__PURE__ */ me(wl, [["__scopeId", "data-v-9ee12676"]]);
|
|
2771
2865
|
export {
|
|
2772
2866
|
$l as SecretForm,
|
|
2773
|
-
|
|
2774
|
-
|
|
2775
|
-
|
|
2776
|
-
|
|
2867
|
+
Hl as SecretList,
|
|
2868
|
+
R as VaultAuthMethods,
|
|
2869
|
+
Tl as VaultConfigCard,
|
|
2870
|
+
Ul as VaultForm,
|
|
2777
2871
|
El as VaultList,
|
|
2778
2872
|
t as VaultProviders,
|
|
2779
2873
|
Pl as VaultSecretPicker,
|