@kong-ui-public/entities-vaults 4.18.2-pr.3869.e876c8c8a.0 → 4.18.2
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 +3106 -0
- package/dist/entities-vaults.umd.js +1 -0
- package/dist/style.css +1 -0
- package/dist/types/ai-gateway-mappers.d.ts +30 -0
- package/dist/types/ai-gateway-mappers.d.ts.map +1 -0
- package/dist/types/components/SecretForm.vue.d.ts +54 -0
- package/dist/types/components/SecretForm.vue.d.ts.map +1 -0
- package/dist/types/components/SecretFormInner.vue.d.ts +54 -0
- package/dist/types/components/SecretFormInner.vue.d.ts.map +1 -0
- package/dist/types/components/SecretList.vue.d.ts +85 -0
- package/dist/types/components/SecretList.vue.d.ts.map +1 -0
- package/dist/types/components/SecretListInner.vue.d.ts +85 -0
- package/dist/types/components/SecretListInner.vue.d.ts.map +1 -0
- package/dist/types/components/VaultConfigCard.vue.d.ts +63 -0
- package/dist/types/components/VaultConfigCard.vue.d.ts.map +1 -0
- package/dist/types/components/VaultForm.vue.d.ts +62 -0
- package/dist/types/components/VaultForm.vue.d.ts.map +1 -0
- package/dist/types/components/VaultList.vue.d.ts +107 -0
- package/dist/types/components/VaultList.vue.d.ts.map +1 -0
- package/dist/types/components/VaultSecretPicker.vue.d.ts +109 -0
- package/dist/types/components/VaultSecretPicker.vue.d.ts.map +1 -0
- package/dist/types/components/VaultSecretPickerProvider.vue.d.ts +13 -0
- package/dist/types/components/VaultSecretPickerProvider.vue.d.ts.map +1 -0
- package/dist/types/composables/index.d.ts +6 -0
- package/dist/types/composables/index.d.ts.map +1 -0
- package/dist/types/composables/useI18n.d.ts +9 -0
- package/dist/types/composables/useI18n.d.ts.map +1 -0
- package/dist/types/index.d.ts +14 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/secrets-endpoints.d.ts +22 -0
- package/dist/types/secrets-endpoints.d.ts.map +1 -0
- package/dist/types/types/index.d.ts +6 -0
- package/dist/types/types/index.d.ts.map +1 -0
- package/dist/types/types/secret-form.d.ts +27 -0
- package/dist/types/types/secret-form.d.ts.map +1 -0
- package/dist/types/types/secret-list.d.ts +23 -0
- package/dist/types/types/secret-list.d.ts.map +1 -0
- package/dist/types/types/vault-config.d.ts +26 -0
- package/dist/types/types/vault-config.d.ts.map +1 -0
- package/dist/types/types/vault-form.d.ts +331 -0
- package/dist/types/types/vault-form.d.ts.map +1 -0
- package/dist/types/types/vault-list.d.ts +41 -0
- package/dist/types/types/vault-list.d.ts.map +1 -0
- package/dist/types/utils.d.ts +37 -0
- package/dist/types/utils.d.ts.map +1 -0
- package/dist/types/vaults-endpoints.d.ts +33 -0
- package/dist/types/vaults-endpoints.d.ts.map +1 -0
- package/package.json +5 -5
|
@@ -0,0 +1,3106 @@
|
|
|
1
|
+
import { defineComponent as be, computed as b, ref as N, watch as Ge, onBeforeMount as Ne, resolveComponent as q, openBlock as _, createElementBlock as G, createVNode as u, unref as e, createSlots as Je, withCtx as g, createTextVNode as pe, toDisplayString as $, createElementVNode as x, createBlock as S, Teleport as gt, createCommentVNode as M, reactive as Te, resolveDynamicComponent as Qe, TransitionGroup as yt, renderSlot as ot, Fragment as it, renderList as bt, mergeProps as rt, normalizeClass as ht, nextTick as Vt } from "vue";
|
|
2
|
+
import { useRouter as De } from "vue-router";
|
|
3
|
+
import { BookIcon as Ye, AddIcon as qe, SecurityIcon as wt, FolderIcon as kt, ConjourIcon as Ct, AzureIcon as Xe, HashicorpIcon as At, GoogleCloudIcon as St, AwsIcon as Rt, CodeIcon as Et, KongIcon as It } from "@kong/icons";
|
|
4
|
+
import { useAxios as Se, useTableState as xt, useManagedByColumn as Ut, useFetcher as nt, useDeleteUrlBuilder as st, FetcherStatus as dt, EntityBaseTable as ut, PermissionsWrapper as Ae, getManagedByLabel as Ht, TableTags as Tt, EntityFilter as ct, EntityDeleteModal as ft, EntityTypes as pt, useErrors as mt, EntityBaseFormType as me, useGatewayFeatureSupported as Mt, EntityBaseForm as _t, SupportedEntityType as Ze, EntityFormSection as ze, SensitiveInput as He, useStringHelpers as Gt, useHelpers as $t, ConfigurationSchemaType as Pt, ConfigurationSchemaSection as et, EntityBaseConfigCard as Ot, ConfigCardItem as Ft, useDebouncedFilter as tt } from "@kong-ui-public/entities-shared";
|
|
5
|
+
import { createI18n as Nt, i18nTComponent as Kt } from "@kong-ui-public/i18n";
|
|
6
|
+
import { SecretInput as Ce } from "@kong-ui-public/misc-widgets";
|
|
7
|
+
import "@kong-ui-public/misc-widgets/dist/style.css";
|
|
8
|
+
const Wt = { create: "New vault", copy_id: "Copy ID", copy_json: "Copy JSON", edit: "Edit", delete: "Delete", view: "View details", loading: "Loading..." }, jt = { general: "Vaults could not be retrieved", delete: "The vault could not be deleted at this time.", copy: "Failed to copy to clipboard" }, qt = { placeholder_for_vaults: { konnect: "Filter by exact prefix or ID" }, placeholder_for_secrets: { konnect: "Filter by exact key" } }, zt = { title: "Vaults", list: { toolbar_actions: { new_vault: "New vault" }, table_headers: { prefix: "Prefix", prefix_ai_gateway: "Name", name: "Vault type", description: "Description", tags: "Tags", id: "ID" }, empty_state: { title: "Configure a new vault", description: "Improve the security of your Kong Gateway deployment with centralized secrets." }, empty_state_v2: { title: "Configure your first vault", group: "Vaults created in gateways within this group will automatically appear here.", description: "Vaults securely and centrally store sensitive information, such as credentials, tokens, and keys, to simplify secrets management.", create_cta: "New vault", learn_more: "Learn more" } } }, Lt = { title: "Secrets", list: { toolbar_actions: { new_secret: "Store new secret" }, table_headers: { key: "Secret key", updated_at: "Updated At" }, empty_state: { title: "No secrets stored", description: "Improve the security of your Kong Gateway deployment with centralized secrets." } }, form: { info: { title: "Secret", description: "Enter the secret key and secret value to be stored in Konnect vault" }, fields: { key: { label: "Key", placeholder: "Enter key" }, value: { label: "Value", placeholder: "Enter value here, can be simple values or multi-line", rotateLabel: "Rotate value" } }, hint: "Once saved, the secret value will not be visible" } }, Dt = { success: "Copied {val} to clipboard", success_brief: "Successfully copied to clipboard" }, Zt = { vault_type: "Vault type", vault_type_ai_gateway: "Type", vault_name_ai_gateway: "Name" }, Bt = { sections: { general: { title: "General information", description: "General information helps identify and manage this vault instance." }, config: { title: "Vault configuration", description: "Select a type of vault and configure properties specific to each type of Vault." } }, fields: { prefix: { label: "Prefix", placeholder: "Enter a unique prefix for this vault", help: "e.g. my-vault", tooltip: "The reference prefix. You need this prefix to access secrets stored in this vault. For example, {vault://<your-prefix>/<some-secret>}." }, prefix_ai_gateway: { label: "Name", placeholder: "Enter a unique name for this vault", help: "e.g. my-vault", tooltip: "The reference name. You need this name to access secrets stored in this vault. For example, {vault://<your-name>/<some-secret>}." }, description: { label: "Description", placeholder: "Enter some description for this vault" }, tags: { label: "Tags", placeholder: "Enter a list of tags separated by comma", help: "e.g. tag1, tag2, tag3" } }, config: { konnect: { label: "Konnect", description: "Access secrets stored directly in Konnect's unified platform to easily reference in Kong Gateway configuration." }, env: { label: "Environment variables", description: "Access secrets stored via variables to be made available in Kong Gateway at runtime.", fields: { prefix: { label: "Environment variable prefix", placeholder: "Enter your environment variable vault prefix", tooltip: "Data plane will access all the environment variables starting with this prefix." } } }, aws: { label: "AWS Secrets Manager", description: "Access secrets stored in AWS Secrets Manager for Kong Gateway configuration.", fields: { region: { label: "Region", placeholder: "Select an AWS region", tooltip: "The AWS region your vault is located in", locations: { "us-east-1": { location: "N. Virginia" }, "us-east-2": { location: "Ohio" }, "us-west-1": { location: "N. California" }, "us-west-2": { location: "Oregon" }, "af-south-1": { location: "Cape Town" }, "ap-east-1": { location: "Hong Kong" }, "ap-southeast-3": { location: "Jakarta" }, "ap-south-1": { location: "Mumbai" }, "ap-northeast-1": { location: "Tokyo" }, "ap-northeast-2": { location: "Seoul" }, "ap-northeast-3": { location: "Osaka" }, "ap-southeast-1": { location: "Singapore" }, "ap-southeast-2": { location: "Sydney" }, "ca-central-1": { location: "Canada" }, "eu-central-1": { location: "Frankfurt" }, "eu-west-1": { location: "Ireland" }, "eu-west-2": { location: "London" }, "eu-west-3": { location: "Paris" }, "eu-south-1": { location: "Milan" }, "eu-north-1": { location: "Stockholm" }, "me-south-1": { location: "Bahrain" }, "sa-east-1": { location: "São Paulo" }, "us-gov-east-1": { location: "US East" }, "us-gov-west-1": { location: "US West" } } }, endpoint_url: { label: "Endpoint URL", tooltip: 'The AWS SecretsManager service endpoint url. If not specified, the value used by vault will be the official AWS SecretsManager service url which is `https://secretsmanager.<region>.amazonaws.com`. You can specify a complete URL(including the "http/https" scheme) to override the endpoint that vault will connect to.' }, assume_role_arn: { label: "Assume role ARN", tooltip: "The target AWS IAM role ARN that will be assumed. Typically this is used for operating between multiple roles or cross-accounts. If you are not using assume role you should not specify this value." }, role_session_name: { label: "Role session name", tooltip: "The role session name used for role assuming." }, sts_endpoint_url: { label: "STS endpoint URL", tooltip: "The custom STS endpoint URL used for role assuming in AWS Vault. Note that this value will override the default STS endpoint URL(which should be `https: //sts.amazonaws.com`, or `https: //sts.<region>.amazonaws.com` if you have `AWS_STS_REGIONAL_ENDPOINTS` set to `regional`). If you are not using private VPC endpoint for STS service, you should not specify this value." } } }, gcp: { label: "Google Secret Manager", description: "Access secrets stored in Google Secret Manager for Kong Gateway configuration.", fields: { project_id: { label: "Project ID", placeholder: "Enter your Google Cloud Project ID", tooltip: { text: "Visit your Google API Console and select {italic-text} in the projects list to see your project ID", italicText: "Manage all projects" } } } }, hcv: { label: "HashiCorp Vault", description: "Access secrets stored in HashiCorp Vault for Kong Gateway configuration.", fields: { protocol: { label: "Protocol" }, host: { label: "Host" }, port: { label: "Port" }, mount: { label: "Mount" }, kv: { label: "KV" }, namespace: { label: "Namespace" }, ssl_verify: { label: "SSL verify" }, auth_method: { label: "Authentication method" }, token: { label: "Token" }, kube_role: { label: "Kubernetes role" }, kube_auth_path: { label: "Kubernetes auth path" }, kube_api_token_file: { label: "Kubernetes API token file" }, aws_auth_role: { label: "AWS auth role" }, aws_auth_region: { label: "AWS auth region" }, aws_access_key_id: { label: "AWS access key ID" }, aws_secret_access_key: { label: "AWS secret access key" }, aws_auth_nonce: { label: "AWS auth nonce" }, aws_login_path: { label: "AWS login path" }, azure_auth_role: { label: "Azure auth role" }, azure_login_path: { label: "Azure login path" }, gcp_auth_role: { label: "GCP auth role" }, gcp_login_path: { label: "GCP login path" }, gcp_service_account: { label: "GCP service account" }, gcp_jwt_exp: { label: "GCP JWT exp" }, aws_sts_endpoint_url: { label: "AWS STS endpoint URL" }, aws_assume_role_arn: { label: "AWS assume role ARN" }, aws_role_session_name: { label: "AWS role session name" }, approle_auth_path: { label: "App role auth path" }, approle_role_id: { label: "App role role ID" }, approle_secret_id: { label: "App role secret ID" }, approle_secret_id_file: { label: "App role secret ID file" }, approle_response_wrapping: { label: "App role response wrapping" }, cert_auth_cert: { label: "Cert" }, cert_auth_cert_key: { label: "Cert key", rotateLabel: "Rotate cert key", rotateAlert: "Once saved, the cert key value will not be visible." }, cert_auth_role_name: { label: "Role name" }, oauth2_audiences: { label: "OAuth2 audiences", tooltip: "Comma-separated list of OAuth2 audiences." }, oauth2_client_id: { label: "OAuth2 client ID" }, oauth2_client_secret: { label: "OAuth2 client secret" }, jwt_role: { label: "JWT role", tooltip: "The configured role name in HashiCorp Vault for JWT 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." }, oauth2_token_endpoint: { label: "OAuth2 token endpoint" } } }, azure: { label: "Azure Vault", description: "Access secrets stored in Azure Key Vault for Kong Gateway configuration.", fields: { location: { label: "Location" }, vault_uri: { label: "Vault URI" }, credential_prefix: { label: "Credential prefix" }, type: { label: "Type", placeholder: "Select a type" }, client_id: { label: "Client ID" }, tenant_id: { label: "Tenant ID" } } }, "azure-certs": { label: "Azure Key Vault (Certificates)", description: "Access certificates stored in Azure Key Vault for Kong Gateway TLS termination.", fields: { vault_uri: { label: "Vault URI" }, credential_prefix: { label: "Credential prefix" }, client_id: { label: "Client ID" }, tenant_id: { label: "Tenant ID" } } }, conjur: { label: "CyberArk Secrets Manager (Conjur)", description: "Access secrets stored in CyberArk Secrets Manager (Conjur) for Kong Gateway configuration.", fields: { endpoint_url: { label: "Server", tooltip: "The CyberArk Secrets Manager (Conjur) backend url. Accepts http or https." }, login: { label: "Workload identity", tooltip: "Identity of the workload or host authenticating to CyberArk Secrets Manager (Conjur). In this case Kong is the workload/host." }, api_key: { label: "API key", tooltip: "The API key issued to the workload." }, account: { label: "Account", tooltip: "The CyberArk Secrets Manager (Conjur) account for which the token will be issued. This is the identifier provided during CyberArk Secrets Manager (Conjur) configuration." } } }, fs: { label: "File system", description: "Access secrets stored in the file system.", fields: { prefix: { label: "File path prefix", tooltip: "The prefix path for the file vault referenced files." } } }, advancedFields: { title: "View advanced fields", ttl: "TTL", ttlTooltip: `Time-to-live (in seconds) of a secret from the vault when it's cached. The special value of 0 means "no rotation" and it's the default. When using non-zero values, it is recommended that they're at least 1 minute.`, negTtl: "Negative TTL", negTtlTooltip: "Time-to-live (in seconds) of a vault miss (no secret). Negatively cached secrets will remain valid until neg_ttl is reached, after which Kong will attempt to refresh the secret again. The default value for neg_ttl is 0, meaning no negative caching occurs.", resurrectTtl: "Resurrect TTL", resurrectTtlTooltip: "Time (in seconds) for how long secrets will remain in use after they are expired (config.ttl is over). This is useful when a vault becomes unreachable, or when a secret is deleted from the Vault and isn't replaced immediately. On both cases, the Gateway will keep trying to refresh the secret for resurrect_ttl seconds. After that, it will stop trying to refresh. We recommend assigning a sufficiently high value to this configuration option to ensure a seamless transition in case there are unexpected issues with the Vault. The default value for resurrect_ttl is 1e8 seconds, which is about 3 years." }, commonFields: { base64_decode: { label: "Base64 decode", tooltip: "Decode all secrets in this vault as base64, useful for binary data. If some of the secrets are not base64 encoded, an error will occur when using them. It's recommended to create a separate vault for base64 secrets." } } }, unavailable: "This vault provider is available on Enterprise." }, Jt = { title: "Look up key in vault", vault: { label: "Vault", placeholder: "Select a vault" }, secret_id: { label: "Secret ID", input_placeholder: "Enter a secret ID", select_placeholder: "Select or enter a complete secret ID" }, optional_secret_key: { label: "Secret key", placeholder: "Enter the key or key path to access a nested secret value", help: "Optional. e.g. tokens, tokens/refresh_token" }, fetch_error: { vaults: "Could not fetch available vaults", secrets: "Could not fetch available secrets", vaults_and_secrets: "Could not fetch available vaults and secrets" }, no_results: "No results found", actions: { use_key: "Use key" }, provider: { complete_action: "Look up {cta}", cta: "key in vault" } }, Qt = {
|
|
9
|
+
actions: Wt,
|
|
10
|
+
delete: { title: "Delete a vault", title_for_secret: "Delete a secret", description: "This action cannot be reversed." },
|
|
11
|
+
errors: jt,
|
|
12
|
+
search: qt,
|
|
13
|
+
vaults: zt,
|
|
14
|
+
secrets: Lt,
|
|
15
|
+
copy: Dt,
|
|
16
|
+
labels: Zt,
|
|
17
|
+
form: Bt,
|
|
18
|
+
vault_secret_picker: Jt
|
|
19
|
+
};
|
|
20
|
+
function Yt() {
|
|
21
|
+
const l = Nt("en-us", Qt);
|
|
22
|
+
return {
|
|
23
|
+
i18n: l,
|
|
24
|
+
i18nT: Kt(l)
|
|
25
|
+
// Translation component <i18n-t>
|
|
26
|
+
};
|
|
27
|
+
}
|
|
28
|
+
const Re = {
|
|
29
|
+
useI18n: Yt
|
|
30
|
+
}, Ke = "/v2/control-planes/{controlPlaneId}/core-entities/{workspace}", at = "/v2/control-planes/{controlPlaneId}/{workspace}/config-stores", We = "/{workspace}", Me = "/v1/ai-gateways/{aiGatewayId}", se = {
|
|
31
|
+
list: {
|
|
32
|
+
konnect: {
|
|
33
|
+
getAll: `${Ke}/vaults`,
|
|
34
|
+
deleteConfigStore: `${at}/{id}?force=true`
|
|
35
|
+
},
|
|
36
|
+
kongManager: {
|
|
37
|
+
getAll: `${We}/vaults`
|
|
38
|
+
},
|
|
39
|
+
aiGateway: {
|
|
40
|
+
getAll: `${Me}/vaults`,
|
|
41
|
+
deleteConfigStore: `${Me}/config-stores/{id}?force=true`
|
|
42
|
+
}
|
|
43
|
+
},
|
|
44
|
+
form: {
|
|
45
|
+
konnect: {
|
|
46
|
+
create: `${Ke}/vaults`,
|
|
47
|
+
createConfigStore: at,
|
|
48
|
+
edit: `${Ke}/vaults/{id}`
|
|
49
|
+
},
|
|
50
|
+
kongManager: {
|
|
51
|
+
create: `${We}/vaults`,
|
|
52
|
+
edit: `${We}/vaults/{id}`
|
|
53
|
+
},
|
|
54
|
+
aiGateway: {
|
|
55
|
+
create: `${Me}/vaults`,
|
|
56
|
+
edit: `${Me}/vaults/{id}`,
|
|
57
|
+
createConfigStore: `${Me}/config-stores`
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
};
|
|
61
|
+
var t = /* @__PURE__ */ ((l) => (l.AWS = "aws", l.GCP = "gcp", l.HCV = "hcv", l.ENV = "env", l.AZURE = "azure", l.AZURE_CERTS = "azure-certs", l.KONNECT = "konnect", l.CONJUR = "conjur", l.FS = "fs", l))(t || {}), m = /* @__PURE__ */ ((l) => (l.TOKEN = "token", l.K8S = "kubernetes", l.APP_ROLE = "approle", l.CERT = "cert", l.JWT = "jwt", l.AWS_IAM = "aws_iam", l.AWS_EC2 = "aws_ec2", l.AZURE = "azure", l.GCP_GCE = "gcp_gce", l.GCP_IAM = "gcp_iam", l))(m || {});
|
|
62
|
+
const vt = {
|
|
63
|
+
[m.TOKEN]: {
|
|
64
|
+
token: "token"
|
|
65
|
+
},
|
|
66
|
+
[m.CERT]: {
|
|
67
|
+
cert_auth_cert: "cert",
|
|
68
|
+
cert_auth_cert_key: "key",
|
|
69
|
+
cert_auth_role_name: "role_name"
|
|
70
|
+
},
|
|
71
|
+
[m.JWT]: {
|
|
72
|
+
jwt_role: "role",
|
|
73
|
+
oauth2_token_endpoint: "token_endpoint",
|
|
74
|
+
oauth2_client_id: "client_id",
|
|
75
|
+
oauth2_client_secret: "client_secret",
|
|
76
|
+
oauth2_audiences: "audiences"
|
|
77
|
+
},
|
|
78
|
+
[m.APP_ROLE]: {
|
|
79
|
+
approle_auth_path: "path",
|
|
80
|
+
approle_response_wrapping: "response_wrapping",
|
|
81
|
+
approle_role_id: "role_id",
|
|
82
|
+
approle_secret_id: "secret_id",
|
|
83
|
+
approle_secret_id_file: "secret_id_file"
|
|
84
|
+
},
|
|
85
|
+
[m.K8S]: {
|
|
86
|
+
kube_role: "role",
|
|
87
|
+
kube_auth_path: "path",
|
|
88
|
+
kube_api_token_file: "api_token_file"
|
|
89
|
+
},
|
|
90
|
+
[m.GCP_IAM]: {
|
|
91
|
+
gcp_auth_role: "role",
|
|
92
|
+
gcp_service_account: "service_account",
|
|
93
|
+
gcp_jwt_exp: "jwt_exp",
|
|
94
|
+
gcp_login_path: "login_path"
|
|
95
|
+
},
|
|
96
|
+
[m.GCP_GCE]: {
|
|
97
|
+
gcp_auth_role: "role",
|
|
98
|
+
gcp_login_path: "login_path"
|
|
99
|
+
},
|
|
100
|
+
[m.AWS_IAM]: {
|
|
101
|
+
aws_auth_role: "role",
|
|
102
|
+
aws_auth_region: "region",
|
|
103
|
+
aws_login_path: "login_path",
|
|
104
|
+
aws_access_key_id: "access_key_id",
|
|
105
|
+
aws_secret_access_key: "secret_access_key",
|
|
106
|
+
aws_sts_endpoint_url: "sts_endpoint_url",
|
|
107
|
+
aws_assume_role_arn: "assume_role_arn",
|
|
108
|
+
aws_role_session_name: "role_session_name"
|
|
109
|
+
},
|
|
110
|
+
[m.AWS_EC2]: {
|
|
111
|
+
aws_auth_role: "role",
|
|
112
|
+
aws_auth_nonce: "nonce",
|
|
113
|
+
aws_login_path: "login_path"
|
|
114
|
+
},
|
|
115
|
+
[m.AZURE]: {
|
|
116
|
+
azure_auth_role: "role",
|
|
117
|
+
azure_login_path: "login_path"
|
|
118
|
+
}
|
|
119
|
+
}, Xt = [
|
|
120
|
+
"protocol",
|
|
121
|
+
"host",
|
|
122
|
+
"port",
|
|
123
|
+
"mount",
|
|
124
|
+
"kv",
|
|
125
|
+
"namespace",
|
|
126
|
+
"ssl_verify",
|
|
127
|
+
"auth_method",
|
|
128
|
+
"base64_decode",
|
|
129
|
+
"ttl",
|
|
130
|
+
"neg_ttl",
|
|
131
|
+
"resurrect_ttl"
|
|
132
|
+
], ea = (l) => Object.fromEntries(Object.entries(l).map(([y, n]) => [n, y])), ta = (l) => l == null, Le = (l) => Object.fromEntries(Object.entries(l).filter(([, y]) => !ta(y))), aa = (l) => {
|
|
133
|
+
const y = vt[l.auth_method] ?? {}, n = {};
|
|
134
|
+
for (const s of Xt)
|
|
135
|
+
s in l && (n[s] = l[s]);
|
|
136
|
+
for (const [s, f] of Object.entries(y))
|
|
137
|
+
s in l && (n[f] = l[s]);
|
|
138
|
+
return Le(n);
|
|
139
|
+
}, la = (l) => {
|
|
140
|
+
const y = l.name;
|
|
141
|
+
let n = l.config ?? {};
|
|
142
|
+
if (y === t.HCV)
|
|
143
|
+
n = aa(n);
|
|
144
|
+
else if (y === t.CONJUR) {
|
|
145
|
+
const s = { ...n };
|
|
146
|
+
delete s.auth_method, n = Le(s);
|
|
147
|
+
} else
|
|
148
|
+
n = Le(n);
|
|
149
|
+
return {
|
|
150
|
+
type: y,
|
|
151
|
+
name: l.prefix,
|
|
152
|
+
// AI Gateway description is a non-nullable string; coerce the gateway's `null`
|
|
153
|
+
// (used for an empty description) to an empty string.
|
|
154
|
+
description: l.description ?? "",
|
|
155
|
+
config: n
|
|
156
|
+
};
|
|
157
|
+
}, oa = (l) => {
|
|
158
|
+
const y = ea(vt[l.auth_method] ?? {}), n = {};
|
|
159
|
+
for (const [s, f] of Object.entries(l))
|
|
160
|
+
n[y[s] ?? s] = f;
|
|
161
|
+
return n;
|
|
162
|
+
}, $e = (l) => {
|
|
163
|
+
const y = l?.type;
|
|
164
|
+
let n = l?.config ? { ...l.config } : {};
|
|
165
|
+
return y === t.HCV ? n = oa(n) : y === t.CONJUR && (n = { ...n, auth_method: "api_key" }), {
|
|
166
|
+
id: l?.id,
|
|
167
|
+
created_at: l?.created_at,
|
|
168
|
+
updated_at: l?.updated_at,
|
|
169
|
+
name: y,
|
|
170
|
+
prefix: l?.name,
|
|
171
|
+
description: l?.description ?? "",
|
|
172
|
+
labels: Object.entries(l?.labels ?? {}).map(([s, f]) => `${s}: ${f}`),
|
|
173
|
+
config: n
|
|
174
|
+
};
|
|
175
|
+
}, ia = { class: "kong-ui-entities-vaults-list" }, ra = { class: "button-row" }, na = { class: "table-content-overflow-wrapper" }, sa = { class: "table-content-overflow-wrapper" }, da = /* @__PURE__ */ be({
|
|
176
|
+
__name: "VaultList",
|
|
177
|
+
props: {
|
|
178
|
+
/** The base konnect or kongManger config. Pass additional config props in the shared entity component as needed. */
|
|
179
|
+
config: {
|
|
180
|
+
type: Object,
|
|
181
|
+
required: !0,
|
|
182
|
+
validator: (l) => !(!l || !["konnect", "kongManager"].includes(l?.app) || !l.createRoute || !l.getViewRoute || !l.getEditRoute || l.app === "kongManager" && !l.isExactMatch && !l.filterSchema || l.apiType === "aiGateway" && !l.aiGatewayId)
|
|
183
|
+
},
|
|
184
|
+
// used to override the default identifier for the cache entry
|
|
185
|
+
cacheIdentifier: {
|
|
186
|
+
type: String,
|
|
187
|
+
default: ""
|
|
188
|
+
},
|
|
189
|
+
/** A synchronous or asynchronous function, that returns a boolean, that evaluates if the user can create a new entity */
|
|
190
|
+
canCreate: {
|
|
191
|
+
type: Function,
|
|
192
|
+
required: !1,
|
|
193
|
+
default: async () => !0
|
|
194
|
+
},
|
|
195
|
+
/** A synchronous or asynchronous function, that returns a boolean, that evaluates if the user can delete a given entity */
|
|
196
|
+
canDelete: {
|
|
197
|
+
type: Function,
|
|
198
|
+
required: !1,
|
|
199
|
+
default: async () => !0
|
|
200
|
+
},
|
|
201
|
+
/** A synchronous or asynchronous function, that returns a boolean, that evaluates if the user can edit a given entity */
|
|
202
|
+
canEdit: {
|
|
203
|
+
type: Function,
|
|
204
|
+
required: !1,
|
|
205
|
+
default: async () => !0
|
|
206
|
+
},
|
|
207
|
+
/** A synchronous or asynchronous function, that returns a boolean, that evaluates if the user can retrieve (view details) a given entity */
|
|
208
|
+
canRetrieve: {
|
|
209
|
+
type: Function,
|
|
210
|
+
required: !1,
|
|
211
|
+
default: async () => !0
|
|
212
|
+
},
|
|
213
|
+
/** default to false, setting to true will teleport the toolbar button to the destination in the consuming app */
|
|
214
|
+
useActionOutside: {
|
|
215
|
+
type: Boolean,
|
|
216
|
+
default: !1
|
|
217
|
+
}
|
|
218
|
+
},
|
|
219
|
+
emits: ["error", "click:learn-more", "copy:success", "copy:error", "delete:success"],
|
|
220
|
+
setup(l, { emit: y }) {
|
|
221
|
+
const n = y, s = l, { i18n: { t: f } } = Re.useI18n(), i = De(), P = b(() => s.config.apiType === "aiGateway"), U = b(() => P.value ? "aiGateway" : s.config.app), h = (k) => k.replace(/{aiGatewayId}/gi, s.config.aiGatewayId || ""), { axiosInstance: V } = Se(s.config?.axiosRequestConfig), { hasRecords: A, handleStateChange: R } = xt(() => ee.value), I = b(() => A.value && s.config.app === "konnect"), d = b(() => s.config.app !== "kongManager" || !!s.config.disableSorting), H = {
|
|
222
|
+
// the Prefix column is non-hidable
|
|
223
|
+
prefix: { label: f("vaults.list.table_headers.prefix"), searchable: !0, sortable: !0, hidable: !1 },
|
|
224
|
+
// it's "Vault Type" on display, but we still use "name" to fit API schema
|
|
225
|
+
name: { label: f("vaults.list.table_headers.name"), searchable: !0, sortable: !0 },
|
|
226
|
+
description: { label: f("vaults.list.table_headers.description"), sortable: !1 },
|
|
227
|
+
tags: { label: f("vaults.list.table_headers.tags"), sortable: !1 }
|
|
228
|
+
}, p = b(() => {
|
|
229
|
+
if (P.value) {
|
|
230
|
+
const { description: k, name: T, prefix: j } = H;
|
|
231
|
+
return {
|
|
232
|
+
prefix: { ...j, label: f("vaults.list.table_headers.prefix_ai_gateway") },
|
|
233
|
+
name: T,
|
|
234
|
+
description: k
|
|
235
|
+
};
|
|
236
|
+
}
|
|
237
|
+
return H;
|
|
238
|
+
}), { defaultTablePreferences: Z, tableHeaders: le } = Ut(p), z = b(() => {
|
|
239
|
+
let k = `${s.config.apiBaseUrl}${se.list[U.value].getAll}`;
|
|
240
|
+
return s.config.app === "konnect" && (k = k.replace(/{controlPlaneId}/gi, s.config?.controlPlaneId || "")), h(k).replace(/\/{workspace}/gi, s.config?.workspace ? `/${s.config.workspace}` : "");
|
|
241
|
+
}), ee = N(""), B = b(() => {
|
|
242
|
+
if (s.config.app === "konnect" || s.config.isExactMatch)
|
|
243
|
+
return {
|
|
244
|
+
isExactMatch: !0,
|
|
245
|
+
placeholder: f("search.placeholder_for_vaults.konnect")
|
|
246
|
+
};
|
|
247
|
+
const { prefix: T, name: j } = H;
|
|
248
|
+
return {
|
|
249
|
+
isExactMatch: !1,
|
|
250
|
+
fields: { name: j, prefix: T },
|
|
251
|
+
schema: s.config.filterSchema
|
|
252
|
+
};
|
|
253
|
+
}), {
|
|
254
|
+
fetcher: L,
|
|
255
|
+
fetcherState: ie,
|
|
256
|
+
fetcherCacheKey: w
|
|
257
|
+
} = nt(b(() => ({ ...s.config, cacheIdentifier: s.cacheIdentifier })), z), a = P.value ? async (k) => {
|
|
258
|
+
const T = await L(k);
|
|
259
|
+
return { ...T, data: (T.data ?? []).map($e) };
|
|
260
|
+
} : L, de = () => {
|
|
261
|
+
ee.value = "";
|
|
262
|
+
}, _e = () => {
|
|
263
|
+
w.value++;
|
|
264
|
+
}, te = N(null), ue = async (k, T) => {
|
|
265
|
+
const j = k.id;
|
|
266
|
+
if (!await T(j)) {
|
|
267
|
+
n("copy:error", {
|
|
268
|
+
entity: k,
|
|
269
|
+
field: "id",
|
|
270
|
+
message: f("errors.copy")
|
|
271
|
+
});
|
|
272
|
+
return;
|
|
273
|
+
}
|
|
274
|
+
n("copy:success", {
|
|
275
|
+
entity: k,
|
|
276
|
+
field: "id",
|
|
277
|
+
message: f("copy.success", { val: j })
|
|
278
|
+
});
|
|
279
|
+
}, W = async (k, T) => {
|
|
280
|
+
const j = JSON.stringify(k);
|
|
281
|
+
if (!await T(j)) {
|
|
282
|
+
n("copy:error", {
|
|
283
|
+
entity: k,
|
|
284
|
+
message: f("errors.copy")
|
|
285
|
+
});
|
|
286
|
+
return;
|
|
287
|
+
}
|
|
288
|
+
n("copy:success", {
|
|
289
|
+
entity: k,
|
|
290
|
+
message: f("copy.success_brief")
|
|
291
|
+
});
|
|
292
|
+
}, J = async (k) => {
|
|
293
|
+
await s.canRetrieve?.(k) && i.push(s.config.getViewRoute(k.id));
|
|
294
|
+
}, Q = (k) => ({
|
|
295
|
+
label: f("actions.view"),
|
|
296
|
+
to: s.config.getViewRoute(k)
|
|
297
|
+
}), ve = (k) => ({
|
|
298
|
+
label: f("actions.edit"),
|
|
299
|
+
to: s.config.getEditRoute(k)
|
|
300
|
+
}), K = N(void 0), ge = N(!1), ae = N(!1), C = N(""), E = st(s.config, z.value), O = (k) => {
|
|
301
|
+
K.value = k, ge.value = !0;
|
|
302
|
+
}, ne = () => {
|
|
303
|
+
ge.value = !1;
|
|
304
|
+
}, ce = async (k) => {
|
|
305
|
+
const { apiBaseUrl: T, controlPlaneId: j } = s.config, he = h(`${T}${se.list[P.value ? "aiGateway" : "konnect"].deleteConfigStore}`).replace(/{controlPlaneId}/gi, j || "").replace(/\/{workspace}/gi, s.config?.workspace ? `/${s.config.workspace}` : "").replace(/{id}/gi, k);
|
|
306
|
+
try {
|
|
307
|
+
await V.delete(he);
|
|
308
|
+
} catch {
|
|
309
|
+
}
|
|
310
|
+
}, D = async () => {
|
|
311
|
+
if (K.value?.id) {
|
|
312
|
+
ae.value = !0;
|
|
313
|
+
try {
|
|
314
|
+
await V.delete(E(K.value.id)), s.config.app === "konnect" && K.value.config?.config_store_id && ce(K.value.config.config_store_id), ae.value = !1, ge.value = !1, w.value++, n("delete:success", K.value);
|
|
315
|
+
} catch (k) {
|
|
316
|
+
C.value = k.response?.data?.message || k.message || f("errors.delete"), n("error", k);
|
|
317
|
+
} finally {
|
|
318
|
+
ae.value = !1;
|
|
319
|
+
}
|
|
320
|
+
}
|
|
321
|
+
}, F = () => {
|
|
322
|
+
i.push(s.config.createRoute);
|
|
323
|
+
};
|
|
324
|
+
Ge(ie, (k) => {
|
|
325
|
+
if (k.status === dt.Error) {
|
|
326
|
+
te.value = {
|
|
327
|
+
title: f("errors.general")
|
|
328
|
+
}, k.error?.response?.data?.message && (te.value.message = k.error.response.data.message), n("error", k.error);
|
|
329
|
+
return;
|
|
330
|
+
}
|
|
331
|
+
te.value = null;
|
|
332
|
+
});
|
|
333
|
+
const ye = N({
|
|
334
|
+
ctaPath: s.config.createRoute,
|
|
335
|
+
ctaText: void 0,
|
|
336
|
+
message: `${f("vaults.list.empty_state.description")}${s.config.additionMessageForEmptyState ? ` ${s.config.additionMessageForEmptyState}` : ""}`,
|
|
337
|
+
title: f("vaults.title")
|
|
338
|
+
}), ke = N(!1);
|
|
339
|
+
return Ne(async () => {
|
|
340
|
+
ke.value = await s.canCreate(), ke.value && (ye.value.title = f("vaults.list.empty_state.title"), ye.value.ctaText = f("actions.create"));
|
|
341
|
+
}), (k, T) => {
|
|
342
|
+
const j = q("KButton"), he = q("KEmptyState"), Ve = q("KDropdownItem"), Pe = q("KClipboardProvider");
|
|
343
|
+
return _(), G("div", ia, [
|
|
344
|
+
u(e(ut), {
|
|
345
|
+
"cache-identifier": l.cacheIdentifier,
|
|
346
|
+
"default-table-preferences": e(Z),
|
|
347
|
+
"disable-sorting": d.value,
|
|
348
|
+
"empty-state-options": ye.value,
|
|
349
|
+
"enable-entity-actions": "",
|
|
350
|
+
"error-message": te.value,
|
|
351
|
+
fetcher: e(a),
|
|
352
|
+
"fetcher-cache-key": e(w),
|
|
353
|
+
"pagination-type": "offset",
|
|
354
|
+
"preferences-storage-key": "kong-ui-entities-vaults-list",
|
|
355
|
+
query: ee.value,
|
|
356
|
+
"table-headers": e(le),
|
|
357
|
+
onClearSearchInput: de,
|
|
358
|
+
"onClick:row": T[3] || (T[3] = (c) => J(c)),
|
|
359
|
+
onSort: _e,
|
|
360
|
+
onState: e(R)
|
|
361
|
+
}, Je({
|
|
362
|
+
"toolbar-filter": g(() => [
|
|
363
|
+
u(e(ct), {
|
|
364
|
+
modelValue: ee.value,
|
|
365
|
+
"onUpdate:modelValue": T[0] || (T[0] = (c) => ee.value = c),
|
|
366
|
+
config: B.value
|
|
367
|
+
}, null, 8, ["modelValue", "config"])
|
|
368
|
+
]),
|
|
369
|
+
"toolbar-button": g(() => [
|
|
370
|
+
(_(), S(gt, {
|
|
371
|
+
disabled: !l.useActionOutside,
|
|
372
|
+
to: "#kong-ui-app-page-header-action-button"
|
|
373
|
+
}, [
|
|
374
|
+
x("div", ra, [
|
|
375
|
+
I.value ? (_(), S(j, {
|
|
376
|
+
key: 0,
|
|
377
|
+
appearance: "secondary",
|
|
378
|
+
class: "open-learning-hub",
|
|
379
|
+
"data-testid": "vault-learn-more-button",
|
|
380
|
+
icon: "",
|
|
381
|
+
onClick: T[1] || (T[1] = (c) => k.$emit("click:learn-more"))
|
|
382
|
+
}, {
|
|
383
|
+
default: g(() => [
|
|
384
|
+
u(e(Ye), { decorative: "" })
|
|
385
|
+
]),
|
|
386
|
+
_: 1
|
|
387
|
+
})) : M("", !0),
|
|
388
|
+
u(e(Ae), {
|
|
389
|
+
"auth-function": () => l.canCreate()
|
|
390
|
+
}, {
|
|
391
|
+
default: g(() => [
|
|
392
|
+
u(j, {
|
|
393
|
+
appearance: "primary",
|
|
394
|
+
"data-testid": "toolbar-add-vault",
|
|
395
|
+
size: l.useActionOutside ? "medium" : "large",
|
|
396
|
+
to: l.config.createRoute
|
|
397
|
+
}, {
|
|
398
|
+
default: g(() => [
|
|
399
|
+
u(e(qe)),
|
|
400
|
+
pe(" " + $(e(f)("vaults.list.toolbar_actions.new_vault")), 1)
|
|
401
|
+
]),
|
|
402
|
+
_: 1
|
|
403
|
+
}, 8, ["size", "to"])
|
|
404
|
+
]),
|
|
405
|
+
_: 1
|
|
406
|
+
}, 8, ["auth-function"])
|
|
407
|
+
])
|
|
408
|
+
], 8, ["disabled"]))
|
|
409
|
+
]),
|
|
410
|
+
prefix: g(({ rowValue: c }) => [
|
|
411
|
+
x("div", na, [
|
|
412
|
+
x("b", null, $(c ?? "-"), 1)
|
|
413
|
+
])
|
|
414
|
+
]),
|
|
415
|
+
name: g(({ rowValue: c }) => [
|
|
416
|
+
x("b", null, $(c ?? "-"), 1)
|
|
417
|
+
]),
|
|
418
|
+
description: g(({ rowValue: c }) => [
|
|
419
|
+
x("div", sa, $(c ?? "-"), 1)
|
|
420
|
+
]),
|
|
421
|
+
tags: g(({ rowValue: c }) => [
|
|
422
|
+
u(e(Tt), { tags: c }, null, 8, ["tags"])
|
|
423
|
+
]),
|
|
424
|
+
managed_by: g(({ rowValue: c }) => [
|
|
425
|
+
pe($(e(Ht)(c) ?? "-"), 1)
|
|
426
|
+
]),
|
|
427
|
+
actions: g(({ row: c }) => [
|
|
428
|
+
u(Pe, null, {
|
|
429
|
+
default: g(({ copyToClipboard: o }) => [
|
|
430
|
+
u(Ve, {
|
|
431
|
+
"data-testid": "action-entity-copy-id",
|
|
432
|
+
onClick: (fe) => ue(c, o)
|
|
433
|
+
}, {
|
|
434
|
+
default: g(() => [
|
|
435
|
+
pe($(e(f)("actions.copy_id")), 1)
|
|
436
|
+
]),
|
|
437
|
+
_: 1
|
|
438
|
+
}, 8, ["onClick"])
|
|
439
|
+
]),
|
|
440
|
+
_: 2
|
|
441
|
+
}, 1024),
|
|
442
|
+
u(Pe, null, {
|
|
443
|
+
default: g(({ copyToClipboard: o }) => [
|
|
444
|
+
u(Ve, {
|
|
445
|
+
"data-testid": "action-entity-copy-json",
|
|
446
|
+
onClick: (fe) => W(c, o)
|
|
447
|
+
}, {
|
|
448
|
+
default: g(() => [
|
|
449
|
+
pe($(e(f)("actions.copy_json")), 1)
|
|
450
|
+
]),
|
|
451
|
+
_: 1
|
|
452
|
+
}, 8, ["onClick"])
|
|
453
|
+
]),
|
|
454
|
+
_: 2
|
|
455
|
+
}, 1024),
|
|
456
|
+
u(e(Ae), {
|
|
457
|
+
"auth-function": () => l.canRetrieve(c)
|
|
458
|
+
}, {
|
|
459
|
+
default: g(() => [
|
|
460
|
+
u(Ve, {
|
|
461
|
+
"data-testid": "action-entity-view",
|
|
462
|
+
"has-divider": "",
|
|
463
|
+
item: Q(c.id)
|
|
464
|
+
}, null, 8, ["item"])
|
|
465
|
+
]),
|
|
466
|
+
_: 2
|
|
467
|
+
}, 1032, ["auth-function"]),
|
|
468
|
+
u(e(Ae), {
|
|
469
|
+
"auth-function": () => l.canEdit(c)
|
|
470
|
+
}, {
|
|
471
|
+
default: g(() => [
|
|
472
|
+
u(Ve, {
|
|
473
|
+
"data-testid": "action-entity-edit",
|
|
474
|
+
item: ve(c.id)
|
|
475
|
+
}, null, 8, ["item"])
|
|
476
|
+
]),
|
|
477
|
+
_: 2
|
|
478
|
+
}, 1032, ["auth-function"]),
|
|
479
|
+
u(e(Ae), {
|
|
480
|
+
"auth-function": () => l.canDelete(c)
|
|
481
|
+
}, {
|
|
482
|
+
default: g(() => [
|
|
483
|
+
u(Ve, {
|
|
484
|
+
danger: "",
|
|
485
|
+
"data-testid": "action-entity-delete",
|
|
486
|
+
"has-divider": "",
|
|
487
|
+
onClick: (o) => O(c)
|
|
488
|
+
}, {
|
|
489
|
+
default: g(() => [
|
|
490
|
+
pe($(e(f)("actions.delete")), 1)
|
|
491
|
+
]),
|
|
492
|
+
_: 1
|
|
493
|
+
}, 8, ["onClick"])
|
|
494
|
+
]),
|
|
495
|
+
_: 2
|
|
496
|
+
}, 1032, ["auth-function"])
|
|
497
|
+
]),
|
|
498
|
+
_: 2
|
|
499
|
+
}, [
|
|
500
|
+
!ee.value && l.config.app === "konnect" ? {
|
|
501
|
+
name: "empty-state",
|
|
502
|
+
fn: g(() => [
|
|
503
|
+
u(he, {
|
|
504
|
+
"data-testid": "vaults-entity-empty-state",
|
|
505
|
+
"icon-background": "",
|
|
506
|
+
message: e(f)("vaults.list.empty_state_v2.description"),
|
|
507
|
+
title: e(f)("vaults.list.empty_state_v2.title")
|
|
508
|
+
}, Je({
|
|
509
|
+
icon: g(() => [
|
|
510
|
+
u(e(wt), { decorative: "" })
|
|
511
|
+
]),
|
|
512
|
+
action: g(() => [
|
|
513
|
+
ke.value ? (_(), S(j, {
|
|
514
|
+
key: 0,
|
|
515
|
+
"data-testid": "entity-create-button",
|
|
516
|
+
onClick: F
|
|
517
|
+
}, {
|
|
518
|
+
default: g(() => [
|
|
519
|
+
u(e(qe), { decorative: "" }),
|
|
520
|
+
pe(" " + $(e(f)("vaults.list.empty_state_v2.create_cta")), 1)
|
|
521
|
+
]),
|
|
522
|
+
_: 1
|
|
523
|
+
})) : M("", !0),
|
|
524
|
+
u(j, {
|
|
525
|
+
appearance: "secondary",
|
|
526
|
+
"data-testid": "entity-learn-more-button",
|
|
527
|
+
onClick: T[2] || (T[2] = (c) => k.$emit("click:learn-more"))
|
|
528
|
+
}, {
|
|
529
|
+
default: g(() => [
|
|
530
|
+
u(e(Ye), { decorative: "" }),
|
|
531
|
+
pe(" " + $(e(f)("vaults.list.empty_state_v2.learn_more")), 1)
|
|
532
|
+
]),
|
|
533
|
+
_: 1
|
|
534
|
+
})
|
|
535
|
+
]),
|
|
536
|
+
_: 2
|
|
537
|
+
}, [
|
|
538
|
+
l.config?.isControlPlaneGroup ? {
|
|
539
|
+
name: "default",
|
|
540
|
+
fn: g(() => [
|
|
541
|
+
pe($(e(f)("vaults.list.empty_state_v2.group")), 1)
|
|
542
|
+
]),
|
|
543
|
+
key: "0"
|
|
544
|
+
} : void 0
|
|
545
|
+
]), 1032, ["message", "title"])
|
|
546
|
+
]),
|
|
547
|
+
key: "0"
|
|
548
|
+
} : void 0
|
|
549
|
+
]), 1032, ["cache-identifier", "default-table-preferences", "disable-sorting", "empty-state-options", "error-message", "fetcher", "fetcher-cache-key", "query", "table-headers", "onState"]),
|
|
550
|
+
u(e(ft), {
|
|
551
|
+
"action-pending": ae.value,
|
|
552
|
+
description: e(f)("delete.description"),
|
|
553
|
+
"entity-name": K.value && (K.value.prefix || K.value.id),
|
|
554
|
+
"entity-type": e(pt).Vault,
|
|
555
|
+
error: C.value,
|
|
556
|
+
title: e(f)("delete.title"),
|
|
557
|
+
visible: ge.value,
|
|
558
|
+
onCancel: ne,
|
|
559
|
+
onProceed: D
|
|
560
|
+
}, null, 8, ["action-pending", "description", "entity-name", "entity-type", "error", "title", "visible"])
|
|
561
|
+
]);
|
|
562
|
+
};
|
|
563
|
+
}
|
|
564
|
+
}), we = (l, y) => {
|
|
565
|
+
const n = l.__vccOpts || l;
|
|
566
|
+
for (const [s, f] of y)
|
|
567
|
+
n[s] = f;
|
|
568
|
+
return n;
|
|
569
|
+
}, cl = /* @__PURE__ */ we(da, [["__scopeId", "data-v-76fe55c5"]]), ua = { class: "kong-ui-entities-vault-form" }, ca = { class: "vault-form-provider-cards-container" }, fa = ["data-testid"], pa = { class: "provider-item-title-container" }, ma = { class: "provider-item-title" }, _a = { class: "provider-item-description" }, va = {
|
|
570
|
+
key: "kong-vault-config-fields",
|
|
571
|
+
class: "vault-form-config-fields-container"
|
|
572
|
+
}, ga = {
|
|
573
|
+
key: 1,
|
|
574
|
+
class: "vault-form-config-auth-method-container"
|
|
575
|
+
}, ya = {
|
|
576
|
+
key: 2,
|
|
577
|
+
class: "vault-form-config-auth-method-container"
|
|
578
|
+
}, ba = {
|
|
579
|
+
key: 3,
|
|
580
|
+
class: "vault-form-config-auth-method-container"
|
|
581
|
+
}, ha = {
|
|
582
|
+
key: 4,
|
|
583
|
+
class: "vault-form-config-auth-method-container"
|
|
584
|
+
}, Va = {
|
|
585
|
+
key: 5,
|
|
586
|
+
class: "vault-form-config-auth-method-container"
|
|
587
|
+
}, wa = {
|
|
588
|
+
key: 6,
|
|
589
|
+
class: "vault-form-config-auth-method-container"
|
|
590
|
+
}, ka = {
|
|
591
|
+
key: 7,
|
|
592
|
+
class: "vault-form-config-auth-method-container"
|
|
593
|
+
}, Ca = {
|
|
594
|
+
key: 8,
|
|
595
|
+
class: "vault-form-config-auth-method-container"
|
|
596
|
+
}, Aa = {
|
|
597
|
+
key: 9,
|
|
598
|
+
class: "vault-form-config-auth-method-container"
|
|
599
|
+
}, Sa = {
|
|
600
|
+
key: 10,
|
|
601
|
+
class: "vault-form-config-auth-method-container"
|
|
602
|
+
}, Ra = { key: 8 }, Ea = { class: "wrapper" }, Ia = { class: "item-50" }, xa = { class: "item-50" }, Ua = { class: "wrapper" }, Ha = { class: "item-100" }, Ta = /* @__PURE__ */ be({
|
|
603
|
+
__name: "VaultForm",
|
|
604
|
+
props: {
|
|
605
|
+
/** The base konnect or kongManger config. Pass additional config props in the shared entity component as needed. */
|
|
606
|
+
config: {
|
|
607
|
+
type: Object,
|
|
608
|
+
required: !0,
|
|
609
|
+
validator: (l) => !(!l || !["konnect", "kongManager"].includes(l?.app) || l?.app === "konnect" && l?.apiType !== "aiGateway" && !l?.controlPlaneId || l?.app === "kongManager" && typeof l?.workspace != "string" || l?.apiType === "aiGateway" && !l?.aiGatewayId || !l?.cancelRoute)
|
|
610
|
+
},
|
|
611
|
+
/** If a valid vaultId is provided, it will put the form in Edit mode instead of Create */
|
|
612
|
+
vaultId: {
|
|
613
|
+
type: String,
|
|
614
|
+
required: !1,
|
|
615
|
+
default: null
|
|
616
|
+
}
|
|
617
|
+
},
|
|
618
|
+
emits: ["update", "error", "loading"],
|
|
619
|
+
setup(l, { emit: y }) {
|
|
620
|
+
const n = l, s = y, { i18nT: f, i18n: { t: i } } = Re.useI18n(), P = De(), { axiosInstance: U } = Se(n.config?.axiosRequestConfig), { getMessageFromError: h } = mt(), V = b(() => n.config.apiType === "aiGateway"), A = b(() => V.value ? "aiGateway" : n.config.app), R = (c) => c.replace(/{aiGatewayId}/gi, n.config.aiGatewayId || ""), I = V.value ? "https" : "http", d = Te({
|
|
621
|
+
fields: {
|
|
622
|
+
prefix: "",
|
|
623
|
+
description: "",
|
|
624
|
+
tags: "",
|
|
625
|
+
labelList: []
|
|
626
|
+
},
|
|
627
|
+
isReadonly: !1,
|
|
628
|
+
errorMessage: ""
|
|
629
|
+
}), H = Te({
|
|
630
|
+
prefix: "",
|
|
631
|
+
description: "",
|
|
632
|
+
tags: "",
|
|
633
|
+
labelList: []
|
|
634
|
+
}), p = N(n.config.app === "konnect" ? t.KONNECT : t.ENV), Z = N(null), le = N();
|
|
635
|
+
let z = 0;
|
|
636
|
+
const ee = (c) => Object.entries(c).map(([o, fe]) => ({ id: `label-${z++}`, key: o, value: fe })), B = (c) => {
|
|
637
|
+
d.fields.labelList = c;
|
|
638
|
+
}, L = b(() => [t.AWS, t.GCP, t.HCV, t.AZURE, t.CONJUR, t.FS, t.AZURE_CERTS].includes(p.value)), ie = b(() => V.value ? [
|
|
639
|
+
{ label: i("form.config.konnect.label"), value: t.KONNECT },
|
|
640
|
+
{ label: i("form.config.env.label"), value: t.ENV },
|
|
641
|
+
{ label: i("form.config.aws.label"), value: t.AWS },
|
|
642
|
+
{ label: i("form.config.gcp.label"), value: t.GCP },
|
|
643
|
+
{ label: i("form.config.hcv.label"), value: t.HCV },
|
|
644
|
+
{ label: i("form.config.azure.label"), value: t.AZURE },
|
|
645
|
+
{ label: i("form.config.conjur.label"), value: t.CONJUR }
|
|
646
|
+
] : [
|
|
647
|
+
...n.config.app === "konnect" ? [{
|
|
648
|
+
label: i("form.config.konnect.label"),
|
|
649
|
+
value: t.KONNECT
|
|
650
|
+
}] : [],
|
|
651
|
+
{
|
|
652
|
+
label: i("form.config.env.label"),
|
|
653
|
+
value: t.ENV
|
|
654
|
+
},
|
|
655
|
+
{
|
|
656
|
+
label: i("form.config.aws.label"),
|
|
657
|
+
value: t.AWS,
|
|
658
|
+
disabled: !ae.value
|
|
659
|
+
},
|
|
660
|
+
{
|
|
661
|
+
label: i("form.config.gcp.label"),
|
|
662
|
+
value: t.GCP,
|
|
663
|
+
disabled: !ae.value
|
|
664
|
+
},
|
|
665
|
+
{
|
|
666
|
+
label: i("form.config.hcv.label"),
|
|
667
|
+
value: t.HCV,
|
|
668
|
+
disabled: !ae.value
|
|
669
|
+
},
|
|
670
|
+
...n.config.azureVaultProviderAvailable ? [{
|
|
671
|
+
label: i("form.config.azure.label"),
|
|
672
|
+
value: t.AZURE,
|
|
673
|
+
disabled: !ae.value
|
|
674
|
+
}] : [],
|
|
675
|
+
...n.config.conjurVaultProviderAvailable ? [{
|
|
676
|
+
label: i("form.config.conjur.label"),
|
|
677
|
+
value: t.CONJUR,
|
|
678
|
+
disabled: !ae.value
|
|
679
|
+
}] : [],
|
|
680
|
+
...n.config.fsVaultProviderAvailable ? [{
|
|
681
|
+
label: i("form.config.fs.label"),
|
|
682
|
+
value: t.FS,
|
|
683
|
+
disabled: !ae.value
|
|
684
|
+
}] : [],
|
|
685
|
+
...n.config.azureCertsVaultProviderAvailable ? [{
|
|
686
|
+
label: i("form.config.azure-certs.label"),
|
|
687
|
+
value: t.AZURE_CERTS,
|
|
688
|
+
disabled: !ae.value
|
|
689
|
+
}] : []
|
|
690
|
+
]), w = n.config.base64FieldAvailable ? { base64_decode: !1 } : {}, a = Te({
|
|
691
|
+
[t.KONNECT]: {},
|
|
692
|
+
[t.ENV]: {
|
|
693
|
+
prefix: "",
|
|
694
|
+
...w
|
|
695
|
+
},
|
|
696
|
+
[t.AWS]: {
|
|
697
|
+
region: "",
|
|
698
|
+
endpoint_url: "",
|
|
699
|
+
assume_role_arn: "",
|
|
700
|
+
role_session_name: "KongVault",
|
|
701
|
+
...w
|
|
702
|
+
},
|
|
703
|
+
[t.GCP]: {
|
|
704
|
+
project_id: "",
|
|
705
|
+
...w
|
|
706
|
+
},
|
|
707
|
+
[t.HCV]: {
|
|
708
|
+
protocol: I,
|
|
709
|
+
host: "127.0.0.1",
|
|
710
|
+
port: 8200,
|
|
711
|
+
mount: "secret",
|
|
712
|
+
kv: "v1",
|
|
713
|
+
namespace: "",
|
|
714
|
+
ssl_verify: !0,
|
|
715
|
+
auth_method: m.TOKEN,
|
|
716
|
+
token: "",
|
|
717
|
+
kube_role: "",
|
|
718
|
+
kube_auth_path: "",
|
|
719
|
+
kube_api_token_file: "",
|
|
720
|
+
aws_auth_role: "",
|
|
721
|
+
aws_auth_region: "",
|
|
722
|
+
aws_auth_nonce: "",
|
|
723
|
+
aws_login_path: "",
|
|
724
|
+
aws_access_key_id: "",
|
|
725
|
+
aws_secret_access_key: "",
|
|
726
|
+
aws_sts_endpoint_url: "",
|
|
727
|
+
aws_assume_role_arn: "",
|
|
728
|
+
aws_role_session_name: "",
|
|
729
|
+
azure_auth_role: "",
|
|
730
|
+
azure_login_path: "",
|
|
731
|
+
gcp_auth_role: "",
|
|
732
|
+
gcp_login_path: "",
|
|
733
|
+
gcp_service_account: "",
|
|
734
|
+
gcp_jwt_exp: void 0,
|
|
735
|
+
approle_auth_path: "",
|
|
736
|
+
approle_role_id: "",
|
|
737
|
+
approle_secret_id: "",
|
|
738
|
+
approle_secret_id_file: "",
|
|
739
|
+
approle_response_wrapping: !1,
|
|
740
|
+
cert_auth_cert: "",
|
|
741
|
+
cert_auth_cert_key: "",
|
|
742
|
+
cert_auth_role_name: "",
|
|
743
|
+
oauth2_client_id: "",
|
|
744
|
+
oauth2_client_secret: "",
|
|
745
|
+
jwt_role: "",
|
|
746
|
+
oauth2_token_endpoint: "",
|
|
747
|
+
oauth2_audiences: "",
|
|
748
|
+
...w
|
|
749
|
+
},
|
|
750
|
+
[t.AZURE]: {
|
|
751
|
+
location: "",
|
|
752
|
+
vault_uri: "",
|
|
753
|
+
type: "secrets",
|
|
754
|
+
credentials_prefix: "AZURE",
|
|
755
|
+
client_id: "",
|
|
756
|
+
tenant_id: "",
|
|
757
|
+
...w
|
|
758
|
+
},
|
|
759
|
+
[t.AZURE_CERTS]: {
|
|
760
|
+
vault_uri: "",
|
|
761
|
+
credentials_prefix: "AZURE",
|
|
762
|
+
client_id: "",
|
|
763
|
+
tenant_id: "",
|
|
764
|
+
ttl: 3600
|
|
765
|
+
},
|
|
766
|
+
[t.CONJUR]: {
|
|
767
|
+
endpoint_url: "",
|
|
768
|
+
auth_method: "api_key",
|
|
769
|
+
...w
|
|
770
|
+
},
|
|
771
|
+
[t.FS]: {
|
|
772
|
+
prefix: "",
|
|
773
|
+
...w
|
|
774
|
+
}
|
|
775
|
+
}), de = Te({
|
|
776
|
+
[t.KONNECT]: {},
|
|
777
|
+
[t.ENV]: {
|
|
778
|
+
prefix: "",
|
|
779
|
+
...w
|
|
780
|
+
},
|
|
781
|
+
[t.AWS]: {
|
|
782
|
+
region: "",
|
|
783
|
+
endpoint_url: "",
|
|
784
|
+
assume_role_arn: "",
|
|
785
|
+
role_session_name: "KongVault",
|
|
786
|
+
...w
|
|
787
|
+
},
|
|
788
|
+
[t.GCP]: {
|
|
789
|
+
project_id: "",
|
|
790
|
+
...w
|
|
791
|
+
},
|
|
792
|
+
[t.HCV]: {
|
|
793
|
+
protocol: I,
|
|
794
|
+
host: "127.0.0.1",
|
|
795
|
+
port: 8200,
|
|
796
|
+
mount: "secret",
|
|
797
|
+
kv: "v1",
|
|
798
|
+
namespace: "",
|
|
799
|
+
ssl_verify: !0,
|
|
800
|
+
auth_method: m.TOKEN,
|
|
801
|
+
token: "",
|
|
802
|
+
kube_role: "",
|
|
803
|
+
kube_auth_path: "",
|
|
804
|
+
kube_api_token_file: "",
|
|
805
|
+
aws_auth_role: "",
|
|
806
|
+
aws_auth_region: "",
|
|
807
|
+
aws_auth_nonce: "",
|
|
808
|
+
aws_login_path: "",
|
|
809
|
+
aws_access_key_id: "",
|
|
810
|
+
aws_secret_access_key: "",
|
|
811
|
+
aws_sts_endpoint_url: "",
|
|
812
|
+
aws_assume_role_arn: "",
|
|
813
|
+
aws_role_session_name: "",
|
|
814
|
+
azure_auth_role: "",
|
|
815
|
+
azure_login_path: "",
|
|
816
|
+
gcp_auth_role: "",
|
|
817
|
+
gcp_login_path: "",
|
|
818
|
+
gcp_service_account: "",
|
|
819
|
+
gcp_jwt_exp: void 0,
|
|
820
|
+
approle_auth_path: "",
|
|
821
|
+
approle_role_id: "",
|
|
822
|
+
approle_secret_id: "",
|
|
823
|
+
approle_secret_id_file: "",
|
|
824
|
+
approle_response_wrapping: !1,
|
|
825
|
+
cert_auth_cert: "",
|
|
826
|
+
cert_auth_cert_key: "",
|
|
827
|
+
cert_auth_role_name: "",
|
|
828
|
+
oauth2_client_id: "",
|
|
829
|
+
oauth2_client_secret: "",
|
|
830
|
+
jwt_role: "",
|
|
831
|
+
oauth2_token_endpoint: "",
|
|
832
|
+
oauth2_audiences: "",
|
|
833
|
+
...w
|
|
834
|
+
},
|
|
835
|
+
[t.AZURE]: {
|
|
836
|
+
location: "",
|
|
837
|
+
vault_uri: "",
|
|
838
|
+
type: "secrets",
|
|
839
|
+
credentials_prefix: "AZURE",
|
|
840
|
+
client_id: "",
|
|
841
|
+
tenant_id: "",
|
|
842
|
+
...w
|
|
843
|
+
},
|
|
844
|
+
[t.AZURE_CERTS]: {
|
|
845
|
+
vault_uri: "",
|
|
846
|
+
credentials_prefix: "AZURE",
|
|
847
|
+
client_id: "",
|
|
848
|
+
tenant_id: "",
|
|
849
|
+
ttl: 3600
|
|
850
|
+
},
|
|
851
|
+
[t.CONJUR]: {
|
|
852
|
+
endpoint_url: "",
|
|
853
|
+
auth_method: "api_key",
|
|
854
|
+
...w
|
|
855
|
+
},
|
|
856
|
+
[t.FS]: {
|
|
857
|
+
prefix: "",
|
|
858
|
+
...w
|
|
859
|
+
}
|
|
860
|
+
}), _e = [
|
|
861
|
+
{ label: `${i("form.config.aws.fields.region.locations.us-east-1.location")} (us-east-1)`, value: "us-east-1" },
|
|
862
|
+
{ label: `${i("form.config.aws.fields.region.locations.us-east-2.location")} (us-east-2)`, value: "us-east-2" },
|
|
863
|
+
{ label: `${i("form.config.aws.fields.region.locations.us-west-1.location")} (us-west-1)`, value: "us-west-1" },
|
|
864
|
+
{ label: `${i("form.config.aws.fields.region.locations.us-west-2.location")} (us-west-2)`, value: "us-west-2" },
|
|
865
|
+
{ label: `${i("form.config.aws.fields.region.locations.af-south-1.location")} (af-south-1)`, value: "af-south-1" },
|
|
866
|
+
{ label: `${i("form.config.aws.fields.region.locations.ap-east-1.location")} (ap-east-1)`, value: "ap-east-1" },
|
|
867
|
+
{ label: `${i("form.config.aws.fields.region.locations.ap-southeast-3.location")} (ap-southeast-3)`, value: "ap-southeast-3" },
|
|
868
|
+
{ label: `${i("form.config.aws.fields.region.locations.ap-south-1.location")} (ap-south-1)`, value: "ap-south-1" },
|
|
869
|
+
{ label: `${i("form.config.aws.fields.region.locations.ap-northeast-1.location")} (ap-northeast-1)`, value: "ap-northeast-1" },
|
|
870
|
+
{ label: `${i("form.config.aws.fields.region.locations.ap-northeast-2.location")} (ap-northeast-2)`, value: "ap-northeast-2" },
|
|
871
|
+
{ label: `${i("form.config.aws.fields.region.locations.ap-northeast-3.location")} (ap-northeast-3)`, value: "ap-northeast-3" },
|
|
872
|
+
{ label: `${i("form.config.aws.fields.region.locations.ap-southeast-1.location")} (ap-southeast-1)`, value: "ap-southeast-1" },
|
|
873
|
+
{ label: `${i("form.config.aws.fields.region.locations.ap-southeast-2.location")} (ap-southeast-2)`, value: "ap-southeast-2" },
|
|
874
|
+
{ label: `${i("form.config.aws.fields.region.locations.ca-central-1.location")} (ca-central-1)`, value: "ca-central-1" },
|
|
875
|
+
{ label: `${i("form.config.aws.fields.region.locations.eu-central-1.location")} (eu-central-1)`, value: "eu-central-1" },
|
|
876
|
+
{ label: `${i("form.config.aws.fields.region.locations.eu-west-1.location")} (eu-west-1)`, value: "eu-west-1" },
|
|
877
|
+
{ label: `${i("form.config.aws.fields.region.locations.eu-west-2.location")} (eu-west-2)`, value: "eu-west-2" },
|
|
878
|
+
{ label: `${i("form.config.aws.fields.region.locations.eu-west-3.location")} (eu-west-3)`, value: "eu-west-3" },
|
|
879
|
+
{ label: `${i("form.config.aws.fields.region.locations.eu-south-1.location")} (eu-south-1)`, value: "eu-south-1" },
|
|
880
|
+
{ label: `${i("form.config.aws.fields.region.locations.eu-north-1.location")} (eu-north-1)`, value: "eu-north-1" },
|
|
881
|
+
{ label: `${i("form.config.aws.fields.region.locations.me-south-1.location")} (me-south-1)`, value: "me-south-1" },
|
|
882
|
+
{ label: `${i("form.config.aws.fields.region.locations.sa-east-1.location")} (sa-east-1)`, value: "sa-east-1" },
|
|
883
|
+
{ label: `${i("form.config.aws.fields.region.locations.us-gov-east-1.location")} (us-gov-east-1)`, value: "us-gov-east-1" },
|
|
884
|
+
{ label: `${i("form.config.aws.fields.region.locations.us-gov-west-1.location")} (us-gov-west-1)`, value: "us-gov-west-1" }
|
|
885
|
+
], te = [{ label: "secrets", value: "secrets" }], ue = [{ label: "http", value: "http" }, { label: "https", value: "https" }], W = [{ label: "v1", value: "v1" }, { label: "v2", value: "v2" }], J = b(() => n.vaultId ? me.Edit : me.Create), Q = b(() => J.value === me.Edit ? "edit" : "create"), ve = N(!1), K = b(() => R(se.form[A.value]?.edit)), ge = b(() => J.value === me.Edit && (n.config.app === "kongManager" || V.value)), ae = b(() => n.config.app === "konnect" || Mt({
|
|
886
|
+
gatewayInfo: n.config.gatewayInfo,
|
|
887
|
+
// vault name can only be `env` in Gateway Community Edition
|
|
888
|
+
supportedRange: {
|
|
889
|
+
enterprise: []
|
|
890
|
+
}
|
|
891
|
+
})), C = () => {
|
|
892
|
+
P.push(n.config?.cancelRoute || { name: "vault-list" });
|
|
893
|
+
}, E = (c) => {
|
|
894
|
+
s("loading", c);
|
|
895
|
+
}, O = (c) => {
|
|
896
|
+
s("error", c);
|
|
897
|
+
}, ne = (c) => {
|
|
898
|
+
switch (c) {
|
|
899
|
+
case t.KONNECT:
|
|
900
|
+
return It;
|
|
901
|
+
case t.ENV:
|
|
902
|
+
return Et;
|
|
903
|
+
case t.AWS:
|
|
904
|
+
return Rt;
|
|
905
|
+
case t.GCP:
|
|
906
|
+
return St;
|
|
907
|
+
case t.HCV:
|
|
908
|
+
return At;
|
|
909
|
+
case t.AZURE:
|
|
910
|
+
return Xe;
|
|
911
|
+
case t.AZURE_CERTS:
|
|
912
|
+
return Xe;
|
|
913
|
+
case t.CONJUR:
|
|
914
|
+
return Ct;
|
|
915
|
+
case t.FS:
|
|
916
|
+
return kt;
|
|
917
|
+
}
|
|
918
|
+
}, ce = (c) => {
|
|
919
|
+
switch (c) {
|
|
920
|
+
case t.KONNECT:
|
|
921
|
+
return i("form.config.konnect.description");
|
|
922
|
+
case t.ENV:
|
|
923
|
+
return i("form.config.env.description");
|
|
924
|
+
case t.AWS:
|
|
925
|
+
return i("form.config.aws.description");
|
|
926
|
+
case t.GCP:
|
|
927
|
+
return i("form.config.gcp.description");
|
|
928
|
+
case t.HCV:
|
|
929
|
+
return i("form.config.hcv.description");
|
|
930
|
+
case t.AZURE:
|
|
931
|
+
return i("form.config.azure.description");
|
|
932
|
+
case t.AZURE_CERTS:
|
|
933
|
+
return i("form.config.azure-certs.description");
|
|
934
|
+
case t.CONJUR:
|
|
935
|
+
return i("form.config.conjur.description");
|
|
936
|
+
case t.FS:
|
|
937
|
+
return i("form.config.fs.description");
|
|
938
|
+
}
|
|
939
|
+
}, D = (c) => {
|
|
940
|
+
const o = V.value ? $e(c?.item ?? c) : c;
|
|
941
|
+
d.fields.prefix = o?.item?.prefix || o?.prefix || "", d.fields.description = o?.item?.description || o?.description || "";
|
|
942
|
+
const fe = o?.item?.tags || o?.tags || [];
|
|
943
|
+
if (d.fields.tags = fe?.join(", ") || "", V.value) {
|
|
944
|
+
const v = o?.labels ?? {};
|
|
945
|
+
d.fields.labelList = ee(v);
|
|
946
|
+
}
|
|
947
|
+
Object.assign(H, d.fields), H.labelList = d.fields.labelList.map((v) => ({ ...v }));
|
|
948
|
+
const oe = o?.item?.config || o?.config || null;
|
|
949
|
+
oe && (Object.keys(oe).length || o?.name === t.KONNECT) ? (p.value = o?.item?.name || o?.name || "", Z.value = p.value, le.value = o?.config?.config_store_id || void 0, Object.assign(a[p.value], oe), Object.assign(de[p.value], oe)) : d.errorMessage = "Error loading vault config";
|
|
950
|
+
}, F = (c) => c === "" || c == null, ye = b(() => p.value === t.HCV ? !Object.keys(a[t.HCV]).filter((c) => [
|
|
951
|
+
"namespace",
|
|
952
|
+
"ttl",
|
|
953
|
+
"neg_ttl",
|
|
954
|
+
"resurrect_ttl",
|
|
955
|
+
"kube_role",
|
|
956
|
+
"kube_api_token_file",
|
|
957
|
+
"cert_auth_role_name",
|
|
958
|
+
"kube_auth_path",
|
|
959
|
+
"approle_auth_path",
|
|
960
|
+
"approle_secret_id",
|
|
961
|
+
"approle_secret_id_file",
|
|
962
|
+
"oauth2_audiences",
|
|
963
|
+
"aws_login_path",
|
|
964
|
+
"aws_sts_endpoint_url",
|
|
965
|
+
"aws_assume_role_arn",
|
|
966
|
+
"aws_role_session_name",
|
|
967
|
+
"azure_login_path",
|
|
968
|
+
"gcp_login_path"
|
|
969
|
+
].includes(c) || !n.config.hcvCspAuthMethodsAvailable && ["aws_auth_role", "aws_auth_region", "aws_auth_nonce", "aws_access_key_id", "aws_secret_access_key", "aws_login_path", "aws_sts_endpoint_url", "aws_assume_role_arn", "aws_role_session_name", "azure_auth_role", "azure_login_path", "gcp_auth_role", "gcp_login_path", "gcp_service_account", "gcp_jwt_exp"].includes(c) || ![m.AWS_IAM, m.AWS_EC2].includes(a[t.HCV].auth_method) && c === "aws_auth_role" || a[t.HCV].auth_method !== m.AWS_IAM && ["aws_auth_region", "aws_access_key_id", "aws_secret_access_key"].includes(c) || a[t.HCV].auth_method === m.AWS_IAM && ["aws_access_key_id", "aws_secret_access_key"].includes(c) || a[t.HCV].auth_method !== m.AWS_EC2 && c === "aws_auth_nonce" || a[t.HCV].auth_method !== m.AZURE && c === "azure_auth_role" || ![m.GCP_GCE, m.GCP_IAM].includes(a[t.HCV].auth_method) && c === "gcp_auth_role" || a[t.HCV].auth_method !== m.GCP_IAM && ["gcp_service_account", "gcp_jwt_exp"].includes(c) || a[t.HCV].auth_method !== m.TOKEN && c === "token" || V.value && J.value === me.Edit && ["token", "oauth2_client_secret", "cert_auth_cert_key"].includes(c) || a[t.HCV].auth_method !== m.APP_ROLE && (c === "approle_role_id" || c === "approle_response_wrapping") || a[t.HCV].auth_method === m.APP_ROLE && c === "approle_response_wrapping" && typeof a[p.value][c] == "boolean" || a[t.HCV].auth_method !== m.CERT && ["cert_auth_cert", "cert_auth_cert_key"].includes(c) || a[t.HCV].auth_method !== m.JWT && ["oauth2_client_id", "oauth2_client_secret", "jwt_role", "oauth2_token_endpoint"].includes(c) ? !1 : F(a[p.value][c])).length : p.value === t.AZURE ? !Object.keys(a[t.AZURE]).filter((c) => ["client_id", "tenant_id", "ttl", "neg_ttl", "resurrect_ttl"].includes(c) ? !1 : F(a[p.value][c])).length : p.value === t.AZURE_CERTS ? !Object.keys(a[t.AZURE_CERTS]).filter((c) => ["client_id", "tenant_id", "ttl", "neg_ttl", "resurrect_ttl"].includes(c) ? !1 : F(a[p.value][c])).length : p.value === t.AWS ? !Object.keys(a[t.AWS]).filter((c) => ["endpoint_url", "assume_role_arn", "ttl", "neg_ttl", "resurrect_ttl", "sts_endpoint_url"].includes(c) ? !1 : F(a[p.value][c])).length : !Object.keys(a[p.value]).filter((c) => ["ttl", "neg_ttl", "resurrect_ttl"].includes(c) ? !1 : F(a[p.value][c])).length), ke = b(() => !!d.fields.prefix && ye.value), k = b(() => JSON.stringify(d.fields) !== JSON.stringify(H) || p.value !== Z.value || JSON.stringify(a[p.value]) !== JSON.stringify(de[p.value])), T = b(() => {
|
|
970
|
+
let c = `${n.config.apiBaseUrl}${se.form[A.value][J.value]}`;
|
|
971
|
+
return n.config.app === "konnect" && (c = c.replace(/{controlPlaneId}/gi, n.config?.controlPlaneId || "")), R(c).replace(/\/{workspace}/gi, n.config?.workspace ? `/${n.config.workspace}` : "").replace(/{id}/gi, n.vaultId ?? "");
|
|
972
|
+
}), j = b(() => {
|
|
973
|
+
const c = parseInt(String(a[t.HCV].gcp_jwt_exp), 10), o = {
|
|
974
|
+
protocol: a[t.HCV].protocol,
|
|
975
|
+
host: a[t.HCV].host,
|
|
976
|
+
port: parseInt(a[t.HCV].port.toString()),
|
|
977
|
+
mount: a[t.HCV].mount,
|
|
978
|
+
kv: a[t.HCV].kv,
|
|
979
|
+
namespace: a[t.HCV].namespace || null,
|
|
980
|
+
...n.config.hcvSslVerifyAvailable && { ssl_verify: a[t.HCV].ssl_verify ?? !0 },
|
|
981
|
+
auth_method: a[t.HCV].auth_method,
|
|
982
|
+
...n.config.base64FieldAvailable && { base64_decode: a[t.HCV].base64_decode },
|
|
983
|
+
...a[t.HCV].auth_method === m.TOKEN && { token: a[t.HCV].token },
|
|
984
|
+
// For Kong Admin API, when auth_method is kubernetes, token must be in the request body and its value has to be null
|
|
985
|
+
...a[t.HCV].auth_method === m.K8S && {
|
|
986
|
+
kube_role: a[t.HCV].kube_role || void 0,
|
|
987
|
+
kube_auth_path: a[t.HCV].kube_auth_path || void 0,
|
|
988
|
+
kube_api_token_file: a[t.HCV].kube_api_token_file || void 0,
|
|
989
|
+
token: null
|
|
990
|
+
},
|
|
991
|
+
...a[t.HCV].auth_method === m.AWS_IAM && {
|
|
992
|
+
aws_auth_role: a[t.HCV].aws_auth_role || void 0,
|
|
993
|
+
aws_auth_region: a[t.HCV].aws_auth_region || void 0,
|
|
994
|
+
aws_login_path: a[t.HCV].aws_login_path || void 0,
|
|
995
|
+
aws_access_key_id: a[t.HCV].aws_access_key_id || void 0,
|
|
996
|
+
aws_secret_access_key: a[t.HCV].aws_secret_access_key || void 0,
|
|
997
|
+
aws_sts_endpoint_url: a[t.HCV].aws_sts_endpoint_url || void 0,
|
|
998
|
+
aws_assume_role_arn: a[t.HCV].aws_assume_role_arn || void 0,
|
|
999
|
+
aws_role_session_name: a[t.HCV].aws_role_session_name || void 0
|
|
1000
|
+
},
|
|
1001
|
+
...a[t.HCV].auth_method === m.AWS_EC2 && {
|
|
1002
|
+
aws_auth_role: a[t.HCV].aws_auth_role || void 0,
|
|
1003
|
+
aws_auth_nonce: a[t.HCV].aws_auth_nonce || void 0,
|
|
1004
|
+
aws_login_path: a[t.HCV].aws_login_path || void 0
|
|
1005
|
+
},
|
|
1006
|
+
...a[t.HCV].auth_method === m.AZURE && {
|
|
1007
|
+
azure_auth_role: a[t.HCV].azure_auth_role || void 0,
|
|
1008
|
+
azure_login_path: a[t.HCV].azure_login_path || void 0
|
|
1009
|
+
},
|
|
1010
|
+
...a[t.HCV].auth_method === m.GCP_GCE && {
|
|
1011
|
+
gcp_auth_role: a[t.HCV].gcp_auth_role || void 0,
|
|
1012
|
+
gcp_login_path: a[t.HCV].gcp_login_path || void 0
|
|
1013
|
+
},
|
|
1014
|
+
...a[t.HCV].auth_method === m.GCP_IAM && {
|
|
1015
|
+
gcp_auth_role: a[t.HCV].gcp_auth_role || void 0,
|
|
1016
|
+
gcp_login_path: a[t.HCV].gcp_login_path || void 0,
|
|
1017
|
+
gcp_service_account: a[t.HCV].gcp_service_account || void 0,
|
|
1018
|
+
gcp_jwt_exp: Number.isNaN(c) ? void 0 : c
|
|
1019
|
+
},
|
|
1020
|
+
...a[t.HCV].auth_method === m.APP_ROLE && {
|
|
1021
|
+
approle_auth_path: a[t.HCV].approle_auth_path || void 0,
|
|
1022
|
+
approle_role_id: a[t.HCV].approle_role_id,
|
|
1023
|
+
approle_secret_id: a[t.HCV].approle_secret_id || void 0,
|
|
1024
|
+
approle_secret_id_file: a[t.HCV].approle_secret_id_file || void 0,
|
|
1025
|
+
approle_response_wrapping: a[t.HCV].approle_response_wrapping ?? !1
|
|
1026
|
+
},
|
|
1027
|
+
...a[t.HCV].auth_method === m.CERT && {
|
|
1028
|
+
cert_auth_role_name: a[t.HCV].cert_auth_role_name || void 0,
|
|
1029
|
+
cert_auth_cert: a[t.HCV].cert_auth_cert,
|
|
1030
|
+
cert_auth_cert_key: a[t.HCV].cert_auth_cert_key
|
|
1031
|
+
},
|
|
1032
|
+
...a[t.HCV].auth_method === m.JWT && {
|
|
1033
|
+
oauth2_audiences: a[t.HCV].oauth2_audiences || null,
|
|
1034
|
+
oauth2_client_id: a[t.HCV].oauth2_client_id,
|
|
1035
|
+
oauth2_client_secret: a[t.HCV].oauth2_client_secret,
|
|
1036
|
+
jwt_role: a[t.HCV].jwt_role,
|
|
1037
|
+
oauth2_token_endpoint: a[t.HCV].oauth2_token_endpoint
|
|
1038
|
+
}
|
|
1039
|
+
}, fe = {
|
|
1040
|
+
...a[p.value],
|
|
1041
|
+
client_id: a[p.value].client_id || null,
|
|
1042
|
+
tenant_id: a[p.value].tenant_id || null
|
|
1043
|
+
}, oe = {
|
|
1044
|
+
...a[p.value],
|
|
1045
|
+
client_id: a[p.value].client_id || null,
|
|
1046
|
+
tenant_id: a[p.value].tenant_id || null
|
|
1047
|
+
}, v = {
|
|
1048
|
+
...a[p.value],
|
|
1049
|
+
endpoint_url: a[p.value].endpoint_url || null,
|
|
1050
|
+
assume_role_arn: a[p.value].assume_role_arn || null,
|
|
1051
|
+
...n.config.awsStsEndpointUrlAvailable ? { sts_endpoint_url: a[p.value].sts_endpoint_url || null } : {}
|
|
1052
|
+
};
|
|
1053
|
+
let Y = a[p.value];
|
|
1054
|
+
p.value === t.HCV ? Y = o : p.value === t.AZURE ? Y = fe : p.value === t.AZURE_CERTS ? Y = oe : p.value === t.AWS && (Y = v);
|
|
1055
|
+
let Ee = {};
|
|
1056
|
+
if (![t.KONNECT, t.ENV].includes(p.value)) {
|
|
1057
|
+
const X = a[p.value], xe = X.ttl, Ue = X.neg_ttl, Be = X.resurrect_ttl;
|
|
1058
|
+
Ee = {
|
|
1059
|
+
ttl: xe ? parseInt(xe.toString(), 10) : null,
|
|
1060
|
+
neg_ttl: Ue ? parseInt(Ue.toString(), 10) : null,
|
|
1061
|
+
resurrect_ttl: Be ? parseInt(Be.toString(), 10) : null
|
|
1062
|
+
};
|
|
1063
|
+
}
|
|
1064
|
+
const Oe = {
|
|
1065
|
+
prefix: d.fields.prefix,
|
|
1066
|
+
description: d.fields.description || null,
|
|
1067
|
+
tags: d.fields.tags.split(",")?.map((X) => String(X || "").trim())?.filter((X) => X !== ""),
|
|
1068
|
+
name: p.value,
|
|
1069
|
+
config: {
|
|
1070
|
+
...Y,
|
|
1071
|
+
...Ee
|
|
1072
|
+
}
|
|
1073
|
+
};
|
|
1074
|
+
if (!V.value) return Oe;
|
|
1075
|
+
const Ie = la(Oe), r = {};
|
|
1076
|
+
for (const X of d.fields.labelList) {
|
|
1077
|
+
const xe = X.key.trim();
|
|
1078
|
+
xe && (r[xe] = X.value.trim());
|
|
1079
|
+
}
|
|
1080
|
+
if (Object.keys(r).length > 0 && (Ie.labels = r), J.value === me.Edit) {
|
|
1081
|
+
const X = { ...Ie.config };
|
|
1082
|
+
return ["token", "client_secret", "secret_access_key", "api_key", "key"].forEach((Ue) => {
|
|
1083
|
+
Ue in X && F(X[Ue]) && delete X[Ue];
|
|
1084
|
+
}), { ...Ie, config: X };
|
|
1085
|
+
}
|
|
1086
|
+
return Ie;
|
|
1087
|
+
}), he = b(() => ({
|
|
1088
|
+
...j.value,
|
|
1089
|
+
config: {
|
|
1090
|
+
...j.value.config,
|
|
1091
|
+
config_store_id: le.value
|
|
1092
|
+
}
|
|
1093
|
+
})), Ve = async () => {
|
|
1094
|
+
const c = R(`${n.config.apiBaseUrl}${se.form[V.value ? "aiGateway" : "konnect"].createConfigStore}`).replace(/{controlPlaneId}/gi, n.config?.controlPlaneId || "").replace(/\/{workspace}/gi, n.config?.workspace ? `/${n.config.workspace}` : ""), o = V.value ? { name: d.fields.prefix } : void 0;
|
|
1095
|
+
return (await U.post(c, o))?.data.id;
|
|
1096
|
+
}, Pe = async () => {
|
|
1097
|
+
try {
|
|
1098
|
+
d.isReadonly = !0;
|
|
1099
|
+
let c;
|
|
1100
|
+
J.value === "create" ? p.value === t.KONNECT ? (le.value = await Ve(), c = await U.post(T.value, he.value)) : c = await U.post(T.value, j.value) : J.value === "edit" && (p.value === t.KONNECT && !le.value ? (le.value = await Ve(), c = await U.put(T.value, he.value)) : c = n.config?.app === "konnect" ? await U.put(T.value, he.value) : await U.patch(T.value, j.value)), D(c?.data), s("update", c?.data);
|
|
1101
|
+
} catch (c) {
|
|
1102
|
+
d.errorMessage = h(c), s("error", c);
|
|
1103
|
+
} finally {
|
|
1104
|
+
d.isReadonly = !1;
|
|
1105
|
+
}
|
|
1106
|
+
};
|
|
1107
|
+
return (c, o) => {
|
|
1108
|
+
const fe = q("KTooltip"), oe = q("KSelect"), v = q("KInput"), Y = q("KCheckbox"), Ee = q("KTextArea"), Oe = q("KAlert"), Ie = q("KCollapse");
|
|
1109
|
+
return _(), G("div", ua, [
|
|
1110
|
+
u(e(_t), {
|
|
1111
|
+
"can-submit": ke.value && k.value,
|
|
1112
|
+
config: l.config,
|
|
1113
|
+
"edit-id": l.vaultId,
|
|
1114
|
+
"entity-type": e(Ze).Vault,
|
|
1115
|
+
"error-message": d.errorMessage,
|
|
1116
|
+
"fetch-url": K.value,
|
|
1117
|
+
"form-fields": j.value,
|
|
1118
|
+
"is-readonly": d.isReadonly,
|
|
1119
|
+
"tabs-to-hide": l.config.apiType === "aiGateway" ? ["terraform", "deck"] : [],
|
|
1120
|
+
onCancel: C,
|
|
1121
|
+
"onFetch:error": O,
|
|
1122
|
+
"onFetch:success": D,
|
|
1123
|
+
onLoading: E,
|
|
1124
|
+
onSubmit: Pe
|
|
1125
|
+
}, {
|
|
1126
|
+
default: g(() => [
|
|
1127
|
+
u(e(ze), {
|
|
1128
|
+
description: e(i)("form.sections.config.description"),
|
|
1129
|
+
title: e(i)("form.sections.config.title")
|
|
1130
|
+
}, {
|
|
1131
|
+
default: g(() => [
|
|
1132
|
+
x("div", ca, [
|
|
1133
|
+
u(oe, {
|
|
1134
|
+
modelValue: p.value,
|
|
1135
|
+
"onUpdate:modelValue": o[0] || (o[0] = (r) => p.value = r),
|
|
1136
|
+
"data-testid": "provider-select",
|
|
1137
|
+
disabled: ge.value,
|
|
1138
|
+
"dropdown-max-height": "500",
|
|
1139
|
+
items: ie.value,
|
|
1140
|
+
readonly: d.isReadonly
|
|
1141
|
+
}, {
|
|
1142
|
+
"selected-item-template": g(({ item: r }) => [
|
|
1143
|
+
(_(), S(Qe(ne(r.value)))),
|
|
1144
|
+
x("span", null, $(r?.label), 1)
|
|
1145
|
+
]),
|
|
1146
|
+
"item-template": g(({ item: r }) => [
|
|
1147
|
+
u(fe, {
|
|
1148
|
+
placement: "top",
|
|
1149
|
+
text: r.disabled ? e(i)("form.unavailable") : ""
|
|
1150
|
+
}, {
|
|
1151
|
+
default: g(() => [
|
|
1152
|
+
x("div", {
|
|
1153
|
+
class: "provider-item",
|
|
1154
|
+
"data-testid": `vault-form-provider-${r.value}`
|
|
1155
|
+
}, [
|
|
1156
|
+
(_(), S(Qe(ne(r.value)))),
|
|
1157
|
+
x("div", pa, [
|
|
1158
|
+
x("span", ma, $(r?.label), 1),
|
|
1159
|
+
x("span", _a, $(ce(r.value)), 1)
|
|
1160
|
+
])
|
|
1161
|
+
], 8, fa)
|
|
1162
|
+
]),
|
|
1163
|
+
_: 2
|
|
1164
|
+
}, 1032, ["text"])
|
|
1165
|
+
]),
|
|
1166
|
+
_: 1
|
|
1167
|
+
}, 8, ["modelValue", "disabled", "items", "readonly"])
|
|
1168
|
+
]),
|
|
1169
|
+
u(yt, { name: "appear" }, {
|
|
1170
|
+
default: g(() => [
|
|
1171
|
+
p.value === e(t).ENV ? (_(), G("div", va, [
|
|
1172
|
+
u(v, {
|
|
1173
|
+
modelValue: a[e(t).ENV].prefix,
|
|
1174
|
+
"onUpdate:modelValue": o[1] || (o[1] = (r) => a[e(t).ENV].prefix = r),
|
|
1175
|
+
modelModifiers: { trim: !0 },
|
|
1176
|
+
autocomplete: "off",
|
|
1177
|
+
"data-testid": "vault-form-config-kong-prefix",
|
|
1178
|
+
label: e(i)("form.config.env.fields.prefix.label"),
|
|
1179
|
+
"label-attributes": {
|
|
1180
|
+
info: e(i)("form.config.env.fields.prefix.tooltip"),
|
|
1181
|
+
tooltipAttributes: { maxWidth: "400" }
|
|
1182
|
+
},
|
|
1183
|
+
placeholder: e(i)("form.config.env.fields.prefix.placeholder"),
|
|
1184
|
+
readonly: d.isReadonly,
|
|
1185
|
+
required: "",
|
|
1186
|
+
type: "text"
|
|
1187
|
+
}, null, 8, ["modelValue", "label", "label-attributes", "placeholder", "readonly"]),
|
|
1188
|
+
l.config.base64FieldAvailable ? (_(), S(Y, {
|
|
1189
|
+
key: 0,
|
|
1190
|
+
modelValue: a[e(t).ENV].base64_decode,
|
|
1191
|
+
"onUpdate:modelValue": o[2] || (o[2] = (r) => a[e(t).ENV].base64_decode = r),
|
|
1192
|
+
"data-testid": "vault-form-config-env-base64_decode",
|
|
1193
|
+
label: e(i)("form.config.commonFields.base64_decode.label"),
|
|
1194
|
+
"label-attributes": {
|
|
1195
|
+
info: e(i)("form.config.commonFields.base64_decode.tooltip"),
|
|
1196
|
+
tooltipAttributes: { maxWidth: "400" }
|
|
1197
|
+
},
|
|
1198
|
+
readonly: d.isReadonly
|
|
1199
|
+
}, null, 8, ["modelValue", "label", "label-attributes", "readonly"])) : M("", !0)
|
|
1200
|
+
])) : M("", !0),
|
|
1201
|
+
p.value === e(t).AWS ? (_(), G("div", {
|
|
1202
|
+
key: `${e(t).AWS}-vault-config-fields`,
|
|
1203
|
+
class: "vault-form-config-fields-container"
|
|
1204
|
+
}, [
|
|
1205
|
+
u(oe, {
|
|
1206
|
+
modelValue: a[e(t).AWS].region,
|
|
1207
|
+
"onUpdate:modelValue": o[3] || (o[3] = (r) => a[e(t).AWS].region = r),
|
|
1208
|
+
"data-testid": "vault-form-config-aws-region",
|
|
1209
|
+
items: _e,
|
|
1210
|
+
label: e(i)("form.config.aws.fields.region.label"),
|
|
1211
|
+
"label-attributes": { info: e(i)("form.config.aws.fields.region.tooltip") },
|
|
1212
|
+
placeholder: e(i)("form.config.aws.fields.region.placeholder"),
|
|
1213
|
+
readonly: d.isReadonly,
|
|
1214
|
+
required: "",
|
|
1215
|
+
width: "100%"
|
|
1216
|
+
}, null, 8, ["modelValue", "label", "label-attributes", "placeholder", "readonly"]),
|
|
1217
|
+
u(v, {
|
|
1218
|
+
modelValue: a[e(t).AWS].endpoint_url,
|
|
1219
|
+
"onUpdate:modelValue": o[4] || (o[4] = (r) => a[e(t).AWS].endpoint_url = r),
|
|
1220
|
+
modelModifiers: { trim: !0 },
|
|
1221
|
+
autocomplete: "off",
|
|
1222
|
+
"data-testid": "vault-form-config-aws-endpoint_url",
|
|
1223
|
+
label: e(i)("form.config.aws.fields.endpoint_url.label"),
|
|
1224
|
+
"label-attributes": {
|
|
1225
|
+
info: e(i)("form.config.aws.fields.endpoint_url.tooltip"),
|
|
1226
|
+
tooltipAttributes: { maxWidth: "400" }
|
|
1227
|
+
},
|
|
1228
|
+
readonly: d.isReadonly,
|
|
1229
|
+
type: "text"
|
|
1230
|
+
}, null, 8, ["modelValue", "label", "label-attributes", "readonly"]),
|
|
1231
|
+
u(v, {
|
|
1232
|
+
modelValue: a[e(t).AWS].assume_role_arn,
|
|
1233
|
+
"onUpdate:modelValue": o[5] || (o[5] = (r) => a[e(t).AWS].assume_role_arn = r),
|
|
1234
|
+
modelModifiers: { trim: !0 },
|
|
1235
|
+
autocomplete: "off",
|
|
1236
|
+
"data-testid": "vault-form-config-aws-assume_role_arn",
|
|
1237
|
+
label: e(i)("form.config.aws.fields.assume_role_arn.label"),
|
|
1238
|
+
"label-attributes": {
|
|
1239
|
+
info: e(i)("form.config.aws.fields.assume_role_arn.tooltip"),
|
|
1240
|
+
tooltipAttributes: { maxWidth: "400" }
|
|
1241
|
+
},
|
|
1242
|
+
readonly: d.isReadonly,
|
|
1243
|
+
type: "text"
|
|
1244
|
+
}, null, 8, ["modelValue", "label", "label-attributes", "readonly"]),
|
|
1245
|
+
u(v, {
|
|
1246
|
+
modelValue: a[e(t).AWS].role_session_name,
|
|
1247
|
+
"onUpdate:modelValue": o[6] || (o[6] = (r) => a[e(t).AWS].role_session_name = r),
|
|
1248
|
+
modelModifiers: { trim: !0 },
|
|
1249
|
+
autocomplete: "off",
|
|
1250
|
+
"data-testid": "vault-form-config-aws-role_session_name",
|
|
1251
|
+
label: e(i)("form.config.aws.fields.role_session_name.label"),
|
|
1252
|
+
"label-attributes": {
|
|
1253
|
+
info: e(i)("form.config.aws.fields.role_session_name.tooltip"),
|
|
1254
|
+
tooltipAttributes: { maxWidth: "400" }
|
|
1255
|
+
},
|
|
1256
|
+
readonly: d.isReadonly,
|
|
1257
|
+
required: "",
|
|
1258
|
+
type: "text"
|
|
1259
|
+
}, null, 8, ["modelValue", "label", "label-attributes", "readonly"]),
|
|
1260
|
+
l.config.awsStsEndpointUrlAvailable ? (_(), S(v, {
|
|
1261
|
+
key: 0,
|
|
1262
|
+
modelValue: a[e(t).AWS].sts_endpoint_url,
|
|
1263
|
+
"onUpdate:modelValue": o[7] || (o[7] = (r) => a[e(t).AWS].sts_endpoint_url = r),
|
|
1264
|
+
modelModifiers: { trim: !0 },
|
|
1265
|
+
autocomplete: "off",
|
|
1266
|
+
"data-testid": "vault-form-config-aws-sts_endpoint_url",
|
|
1267
|
+
label: e(i)("form.config.aws.fields.sts_endpoint_url.label"),
|
|
1268
|
+
"label-attributes": {
|
|
1269
|
+
info: e(i)("form.config.aws.fields.sts_endpoint_url.tooltip"),
|
|
1270
|
+
tooltipAttributes: { maxWidth: "400" }
|
|
1271
|
+
},
|
|
1272
|
+
readonly: d.isReadonly,
|
|
1273
|
+
type: "text"
|
|
1274
|
+
}, null, 8, ["modelValue", "label", "label-attributes", "readonly"])) : M("", !0),
|
|
1275
|
+
l.config.base64FieldAvailable ? (_(), S(Y, {
|
|
1276
|
+
key: 1,
|
|
1277
|
+
modelValue: a[e(t).AWS].base64_decode,
|
|
1278
|
+
"onUpdate:modelValue": o[8] || (o[8] = (r) => a[e(t).AWS].base64_decode = r),
|
|
1279
|
+
"data-testid": "vault-form-config-aws-base64_decode",
|
|
1280
|
+
label: e(i)("form.config.commonFields.base64_decode.label"),
|
|
1281
|
+
"label-attributes": {
|
|
1282
|
+
info: e(i)("form.config.commonFields.base64_decode.tooltip"),
|
|
1283
|
+
tooltipAttributes: { maxWidth: "400" }
|
|
1284
|
+
},
|
|
1285
|
+
readonly: d.isReadonly
|
|
1286
|
+
}, null, 8, ["modelValue", "label", "label-attributes", "readonly"])) : M("", !0)
|
|
1287
|
+
])) : M("", !0),
|
|
1288
|
+
p.value === e(t).GCP ? (_(), G("div", {
|
|
1289
|
+
key: `${e(t).GCP}-vault-config-fields`,
|
|
1290
|
+
class: "vault-form-config-fields-container"
|
|
1291
|
+
}, [
|
|
1292
|
+
u(v, {
|
|
1293
|
+
modelValue: a[e(t).GCP].project_id,
|
|
1294
|
+
"onUpdate:modelValue": o[9] || (o[9] = (r) => a[e(t).GCP].project_id = r),
|
|
1295
|
+
modelModifiers: { trim: !0 },
|
|
1296
|
+
autocomplete: "off",
|
|
1297
|
+
"data-testid": "vault-form-config-gcp-project-id",
|
|
1298
|
+
label: e(i)("form.config.gcp.fields.project_id.label"),
|
|
1299
|
+
placeholder: e(i)("form.config.gcp.fields.project_id.placeholder"),
|
|
1300
|
+
readonly: d.isReadonly,
|
|
1301
|
+
required: "",
|
|
1302
|
+
type: "text"
|
|
1303
|
+
}, {
|
|
1304
|
+
"label-tooltip": g(() => [
|
|
1305
|
+
u(e(f), {
|
|
1306
|
+
keypath: "form.config.gcp.fields.project_id.tooltip.text",
|
|
1307
|
+
scope: "global"
|
|
1308
|
+
}, {
|
|
1309
|
+
"italic-text": g(() => [
|
|
1310
|
+
x("em", null, $(e(i)("form.config.gcp.fields.project_id.tooltip.italicText")), 1)
|
|
1311
|
+
]),
|
|
1312
|
+
_: 1
|
|
1313
|
+
})
|
|
1314
|
+
]),
|
|
1315
|
+
_: 1
|
|
1316
|
+
}, 8, ["modelValue", "label", "placeholder", "readonly"]),
|
|
1317
|
+
l.config.base64FieldAvailable ? (_(), S(Y, {
|
|
1318
|
+
key: 0,
|
|
1319
|
+
modelValue: a[e(t).GCP].base64_decode,
|
|
1320
|
+
"onUpdate:modelValue": o[10] || (o[10] = (r) => a[e(t).GCP].base64_decode = r),
|
|
1321
|
+
"data-testid": "vault-form-config-gcp-base64_decode",
|
|
1322
|
+
label: e(i)("form.config.commonFields.base64_decode.label"),
|
|
1323
|
+
"label-attributes": {
|
|
1324
|
+
info: e(i)("form.config.commonFields.base64_decode.tooltip"),
|
|
1325
|
+
tooltipAttributes: { maxWidth: "400" }
|
|
1326
|
+
},
|
|
1327
|
+
readonly: d.isReadonly
|
|
1328
|
+
}, null, 8, ["modelValue", "label", "label-attributes", "readonly"])) : M("", !0)
|
|
1329
|
+
])) : M("", !0),
|
|
1330
|
+
p.value === e(t).HCV ? (_(), G("div", {
|
|
1331
|
+
key: `${e(t).HCV}-vault-config-fields`,
|
|
1332
|
+
class: "vault-form-config-fields-container"
|
|
1333
|
+
}, [
|
|
1334
|
+
u(oe, {
|
|
1335
|
+
modelValue: a[e(t).HCV].protocol,
|
|
1336
|
+
"onUpdate:modelValue": o[11] || (o[11] = (r) => a[e(t).HCV].protocol = r),
|
|
1337
|
+
"data-testid": "vault-form-config-hcv-protocol",
|
|
1338
|
+
items: ue,
|
|
1339
|
+
label: e(i)("form.config.hcv.fields.protocol.label"),
|
|
1340
|
+
readonly: d.isReadonly,
|
|
1341
|
+
required: "",
|
|
1342
|
+
width: "100%"
|
|
1343
|
+
}, null, 8, ["modelValue", "label", "readonly"]),
|
|
1344
|
+
l.config.hcvSslVerifyAvailable ? (_(), S(Y, {
|
|
1345
|
+
key: 0,
|
|
1346
|
+
modelValue: a[e(t).HCV].ssl_verify,
|
|
1347
|
+
"onUpdate:modelValue": o[12] || (o[12] = (r) => a[e(t).HCV].ssl_verify = r),
|
|
1348
|
+
"data-testid": "vault-form-config-hcv-ssl_verify",
|
|
1349
|
+
label: e(i)("form.config.hcv.fields.ssl_verify.label"),
|
|
1350
|
+
readonly: d.isReadonly
|
|
1351
|
+
}, null, 8, ["modelValue", "label", "readonly"])) : M("", !0),
|
|
1352
|
+
u(v, {
|
|
1353
|
+
modelValue: a[e(t).HCV].host,
|
|
1354
|
+
"onUpdate:modelValue": o[13] || (o[13] = (r) => a[e(t).HCV].host = r),
|
|
1355
|
+
modelModifiers: { trim: !0 },
|
|
1356
|
+
autocomplete: "off",
|
|
1357
|
+
"data-testid": "vault-form-config-hcv-host",
|
|
1358
|
+
label: e(i)("form.config.hcv.fields.host.label"),
|
|
1359
|
+
readonly: d.isReadonly,
|
|
1360
|
+
required: "",
|
|
1361
|
+
type: "text"
|
|
1362
|
+
}, null, 8, ["modelValue", "label", "readonly"]),
|
|
1363
|
+
u(v, {
|
|
1364
|
+
modelValue: a[e(t).HCV].port,
|
|
1365
|
+
"onUpdate:modelValue": o[14] || (o[14] = (r) => a[e(t).HCV].port = r),
|
|
1366
|
+
autocomplete: "off",
|
|
1367
|
+
"data-testid": "vault-form-config-hcv-port",
|
|
1368
|
+
label: e(i)("form.config.hcv.fields.port.label"),
|
|
1369
|
+
min: "0",
|
|
1370
|
+
readonly: d.isReadonly,
|
|
1371
|
+
required: "",
|
|
1372
|
+
type: "number"
|
|
1373
|
+
}, null, 8, ["modelValue", "label", "readonly"]),
|
|
1374
|
+
u(v, {
|
|
1375
|
+
modelValue: a[e(t).HCV].mount,
|
|
1376
|
+
"onUpdate:modelValue": o[15] || (o[15] = (r) => a[e(t).HCV].mount = r),
|
|
1377
|
+
modelModifiers: { trim: !0 },
|
|
1378
|
+
autocomplete: "off",
|
|
1379
|
+
"data-testid": "vault-form-config-hcv-mount",
|
|
1380
|
+
label: e(i)("form.config.hcv.fields.mount.label"),
|
|
1381
|
+
readonly: d.isReadonly,
|
|
1382
|
+
required: "",
|
|
1383
|
+
type: "text"
|
|
1384
|
+
}, null, 8, ["modelValue", "label", "readonly"]),
|
|
1385
|
+
u(oe, {
|
|
1386
|
+
modelValue: a[e(t).HCV].kv,
|
|
1387
|
+
"onUpdate:modelValue": o[16] || (o[16] = (r) => a[e(t).HCV].kv = r),
|
|
1388
|
+
"data-testid": "vault-form-config-hcv-kv",
|
|
1389
|
+
items: W,
|
|
1390
|
+
label: e(i)("form.config.hcv.fields.kv.label"),
|
|
1391
|
+
readonly: d.isReadonly,
|
|
1392
|
+
required: "",
|
|
1393
|
+
width: "100%"
|
|
1394
|
+
}, null, 8, ["modelValue", "label", "readonly"]),
|
|
1395
|
+
u(v, {
|
|
1396
|
+
modelValue: a[e(t).HCV].namespace,
|
|
1397
|
+
"onUpdate:modelValue": o[17] || (o[17] = (r) => a[e(t).HCV].namespace = r),
|
|
1398
|
+
modelModifiers: { trim: !0 },
|
|
1399
|
+
autocomplete: "off",
|
|
1400
|
+
"data-testid": "vault-form-config-hcv-namespace",
|
|
1401
|
+
label: e(i)("form.config.hcv.fields.namespace.label"),
|
|
1402
|
+
readonly: d.isReadonly,
|
|
1403
|
+
type: "text"
|
|
1404
|
+
}, null, 8, ["modelValue", "label", "readonly"]),
|
|
1405
|
+
u(oe, {
|
|
1406
|
+
modelValue: a[e(t).HCV].auth_method,
|
|
1407
|
+
"onUpdate:modelValue": o[18] || (o[18] = (r) => a[e(t).HCV].auth_method = r),
|
|
1408
|
+
"data-testid": "vault-form-config-hcv-auth_method",
|
|
1409
|
+
items: [
|
|
1410
|
+
{ label: e(m).TOKEN, value: e(m).TOKEN },
|
|
1411
|
+
{ label: e(m).K8S, value: e(m).K8S },
|
|
1412
|
+
...l.config.hcvAppRoleMethodAvailable ? [{ label: e(m).APP_ROLE, value: e(m).APP_ROLE }] : [],
|
|
1413
|
+
...l.config.hcvCertMethodAvailable ? [{ label: e(m).CERT, value: e(m).CERT }] : [],
|
|
1414
|
+
...l.config.hcvJwtMethodAvailable ? [{ label: e(m).JWT, value: e(m).JWT }] : [],
|
|
1415
|
+
...l.config.hcvCspAuthMethodsAvailable ? [
|
|
1416
|
+
{ label: e(m).AWS_IAM, value: e(m).AWS_IAM },
|
|
1417
|
+
{ label: e(m).AWS_EC2, value: e(m).AWS_EC2 },
|
|
1418
|
+
{ label: e(m).AZURE, value: e(m).AZURE },
|
|
1419
|
+
{ label: e(m).GCP_GCE, value: e(m).GCP_GCE },
|
|
1420
|
+
{ label: e(m).GCP_IAM, value: e(m).GCP_IAM }
|
|
1421
|
+
] : []
|
|
1422
|
+
],
|
|
1423
|
+
label: e(i)("form.config.hcv.fields.auth_method.label"),
|
|
1424
|
+
readonly: d.isReadonly,
|
|
1425
|
+
required: "",
|
|
1426
|
+
width: "100%"
|
|
1427
|
+
}, null, 8, ["modelValue", "items", "label", "readonly"]),
|
|
1428
|
+
a[e(t).HCV].auth_method === e(m).TOKEN ? (_(), G("div", ga, [
|
|
1429
|
+
V.value ? (_(), S(e(He), {
|
|
1430
|
+
key: 1,
|
|
1431
|
+
modelValue: a[e(t).HCV].token,
|
|
1432
|
+
"onUpdate:modelValue": o[20] || (o[20] = (r) => a[e(t).HCV].token = r),
|
|
1433
|
+
"data-testid": "vault-form-config-hcv-token",
|
|
1434
|
+
label: e(i)("form.config.hcv.fields.token.label"),
|
|
1435
|
+
mode: Q.value,
|
|
1436
|
+
readonly: d.isReadonly,
|
|
1437
|
+
required: Q.value === "create",
|
|
1438
|
+
"use-secret-input": ""
|
|
1439
|
+
}, null, 8, ["modelValue", "label", "mode", "readonly", "required"])) : (_(), S(e(Ce), {
|
|
1440
|
+
key: 0,
|
|
1441
|
+
modelValue: a[e(t).HCV].token,
|
|
1442
|
+
"onUpdate:modelValue": o[19] || (o[19] = (r) => a[e(t).HCV].token = r),
|
|
1443
|
+
modelModifiers: { trim: !0 },
|
|
1444
|
+
autocomplete: "off",
|
|
1445
|
+
"data-testid": "vault-form-config-hcv-token",
|
|
1446
|
+
label: e(i)("form.config.hcv.fields.token.label"),
|
|
1447
|
+
readonly: d.isReadonly,
|
|
1448
|
+
required: ""
|
|
1449
|
+
}, null, 8, ["modelValue", "label", "readonly"]))
|
|
1450
|
+
])) : a[e(t).HCV].auth_method === e(m).K8S ? (_(), G("div", ya, [
|
|
1451
|
+
u(v, {
|
|
1452
|
+
modelValue: a[e(t).HCV].kube_role,
|
|
1453
|
+
"onUpdate:modelValue": o[21] || (o[21] = (r) => a[e(t).HCV].kube_role = r),
|
|
1454
|
+
modelModifiers: { trim: !0 },
|
|
1455
|
+
autocomplete: "off",
|
|
1456
|
+
"data-testid": "vault-form-config-hcv-kube_role",
|
|
1457
|
+
label: e(i)("form.config.hcv.fields.kube_role.label"),
|
|
1458
|
+
readonly: d.isReadonly,
|
|
1459
|
+
type: "text"
|
|
1460
|
+
}, null, 8, ["modelValue", "label", "readonly"]),
|
|
1461
|
+
u(v, {
|
|
1462
|
+
modelValue: a[e(t).HCV].kube_auth_path,
|
|
1463
|
+
"onUpdate:modelValue": o[22] || (o[22] = (r) => a[e(t).HCV].kube_auth_path = r),
|
|
1464
|
+
modelModifiers: { trim: !0 },
|
|
1465
|
+
autocomplete: "off",
|
|
1466
|
+
"data-testid": "vault-form-config-hcv-kube_auth_path",
|
|
1467
|
+
label: e(i)("form.config.hcv.fields.kube_auth_path.label"),
|
|
1468
|
+
readonly: d.isReadonly,
|
|
1469
|
+
type: "text"
|
|
1470
|
+
}, null, 8, ["modelValue", "label", "readonly"]),
|
|
1471
|
+
u(v, {
|
|
1472
|
+
modelValue: a[e(t).HCV].kube_api_token_file,
|
|
1473
|
+
"onUpdate:modelValue": o[23] || (o[23] = (r) => a[e(t).HCV].kube_api_token_file = r),
|
|
1474
|
+
modelModifiers: { trim: !0 },
|
|
1475
|
+
autocomplete: "off",
|
|
1476
|
+
"data-testid": "vault-form-config-hcv-kube_api_token_file",
|
|
1477
|
+
label: e(i)("form.config.hcv.fields.kube_api_token_file.label"),
|
|
1478
|
+
readonly: d.isReadonly,
|
|
1479
|
+
type: "text"
|
|
1480
|
+
}, null, 8, ["modelValue", "label", "readonly"])
|
|
1481
|
+
])) : l.config.hcvCspAuthMethodsAvailable && a[e(t).HCV].auth_method === e(m).AWS_IAM ? (_(), G("div", ba, [
|
|
1482
|
+
u(v, {
|
|
1483
|
+
modelValue: a[e(t).HCV].aws_auth_role,
|
|
1484
|
+
"onUpdate:modelValue": o[24] || (o[24] = (r) => a[e(t).HCV].aws_auth_role = r),
|
|
1485
|
+
modelModifiers: { trim: !0 },
|
|
1486
|
+
autocomplete: "off",
|
|
1487
|
+
"data-testid": "vault-form-config-hcv-aws_auth_role",
|
|
1488
|
+
label: e(i)("form.config.hcv.fields.aws_auth_role.label"),
|
|
1489
|
+
readonly: d.isReadonly,
|
|
1490
|
+
required: "",
|
|
1491
|
+
type: "text"
|
|
1492
|
+
}, null, 8, ["modelValue", "label", "readonly"]),
|
|
1493
|
+
u(v, {
|
|
1494
|
+
modelValue: a[e(t).HCV].aws_auth_region,
|
|
1495
|
+
"onUpdate:modelValue": o[25] || (o[25] = (r) => a[e(t).HCV].aws_auth_region = r),
|
|
1496
|
+
modelModifiers: { trim: !0 },
|
|
1497
|
+
autocomplete: "off",
|
|
1498
|
+
"data-testid": "vault-form-config-hcv-aws_auth_region",
|
|
1499
|
+
label: e(i)("form.config.hcv.fields.aws_auth_region.label"),
|
|
1500
|
+
readonly: d.isReadonly,
|
|
1501
|
+
required: "",
|
|
1502
|
+
type: "text"
|
|
1503
|
+
}, null, 8, ["modelValue", "label", "readonly"]),
|
|
1504
|
+
u(v, {
|
|
1505
|
+
modelValue: a[e(t).HCV].aws_login_path,
|
|
1506
|
+
"onUpdate:modelValue": o[26] || (o[26] = (r) => a[e(t).HCV].aws_login_path = r),
|
|
1507
|
+
modelModifiers: { trim: !0 },
|
|
1508
|
+
autocomplete: "off",
|
|
1509
|
+
"data-testid": "vault-form-config-hcv-aws_login_path",
|
|
1510
|
+
label: e(i)("form.config.hcv.fields.aws_login_path.label"),
|
|
1511
|
+
readonly: d.isReadonly,
|
|
1512
|
+
type: "text"
|
|
1513
|
+
}, null, 8, ["modelValue", "label", "readonly"]),
|
|
1514
|
+
u(e(Ce), {
|
|
1515
|
+
modelValue: a[e(t).HCV].aws_access_key_id,
|
|
1516
|
+
"onUpdate:modelValue": o[27] || (o[27] = (r) => a[e(t).HCV].aws_access_key_id = r),
|
|
1517
|
+
modelModifiers: { trim: !0 },
|
|
1518
|
+
autocomplete: "off",
|
|
1519
|
+
"data-testid": "vault-form-config-hcv-aws_access_key_id",
|
|
1520
|
+
label: e(i)("form.config.hcv.fields.aws_access_key_id.label"),
|
|
1521
|
+
readonly: d.isReadonly
|
|
1522
|
+
}, null, 8, ["modelValue", "label", "readonly"]),
|
|
1523
|
+
V.value ? (_(), S(e(He), {
|
|
1524
|
+
key: 1,
|
|
1525
|
+
modelValue: a[e(t).HCV].aws_secret_access_key,
|
|
1526
|
+
"onUpdate:modelValue": o[29] || (o[29] = (r) => a[e(t).HCV].aws_secret_access_key = r),
|
|
1527
|
+
"data-testid": "vault-form-config-hcv-aws_secret_access_key",
|
|
1528
|
+
label: e(i)("form.config.hcv.fields.aws_secret_access_key.label"),
|
|
1529
|
+
mode: Q.value,
|
|
1530
|
+
readonly: d.isReadonly,
|
|
1531
|
+
"use-secret-input": ""
|
|
1532
|
+
}, null, 8, ["modelValue", "label", "mode", "readonly"])) : (_(), S(e(Ce), {
|
|
1533
|
+
key: 0,
|
|
1534
|
+
modelValue: a[e(t).HCV].aws_secret_access_key,
|
|
1535
|
+
"onUpdate:modelValue": o[28] || (o[28] = (r) => a[e(t).HCV].aws_secret_access_key = r),
|
|
1536
|
+
modelModifiers: { trim: !0 },
|
|
1537
|
+
autocomplete: "off",
|
|
1538
|
+
"data-testid": "vault-form-config-hcv-aws_secret_access_key",
|
|
1539
|
+
label: e(i)("form.config.hcv.fields.aws_secret_access_key.label"),
|
|
1540
|
+
readonly: d.isReadonly
|
|
1541
|
+
}, null, 8, ["modelValue", "label", "readonly"])),
|
|
1542
|
+
u(v, {
|
|
1543
|
+
modelValue: a[e(t).HCV].aws_sts_endpoint_url,
|
|
1544
|
+
"onUpdate:modelValue": o[30] || (o[30] = (r) => a[e(t).HCV].aws_sts_endpoint_url = r),
|
|
1545
|
+
modelModifiers: { trim: !0 },
|
|
1546
|
+
autocomplete: "off",
|
|
1547
|
+
"data-testid": "vault-form-config-hcv-aws_sts_endpoint_url",
|
|
1548
|
+
label: e(i)("form.config.hcv.fields.aws_sts_endpoint_url.label"),
|
|
1549
|
+
readonly: d.isReadonly,
|
|
1550
|
+
type: "text"
|
|
1551
|
+
}, null, 8, ["modelValue", "label", "readonly"]),
|
|
1552
|
+
u(v, {
|
|
1553
|
+
modelValue: a[e(t).HCV].aws_assume_role_arn,
|
|
1554
|
+
"onUpdate:modelValue": o[31] || (o[31] = (r) => a[e(t).HCV].aws_assume_role_arn = r),
|
|
1555
|
+
modelModifiers: { trim: !0 },
|
|
1556
|
+
autocomplete: "off",
|
|
1557
|
+
"data-testid": "vault-form-config-hcv-aws_assume_role_arn",
|
|
1558
|
+
label: e(i)("form.config.hcv.fields.aws_assume_role_arn.label"),
|
|
1559
|
+
readonly: d.isReadonly,
|
|
1560
|
+
type: "text"
|
|
1561
|
+
}, null, 8, ["modelValue", "label", "readonly"]),
|
|
1562
|
+
u(v, {
|
|
1563
|
+
modelValue: a[e(t).HCV].aws_role_session_name,
|
|
1564
|
+
"onUpdate:modelValue": o[32] || (o[32] = (r) => a[e(t).HCV].aws_role_session_name = r),
|
|
1565
|
+
modelModifiers: { trim: !0 },
|
|
1566
|
+
autocomplete: "off",
|
|
1567
|
+
"data-testid": "vault-form-config-hcv-aws_role_session_name",
|
|
1568
|
+
label: e(i)("form.config.hcv.fields.aws_role_session_name.label"),
|
|
1569
|
+
readonly: d.isReadonly,
|
|
1570
|
+
type: "text"
|
|
1571
|
+
}, null, 8, ["modelValue", "label", "readonly"])
|
|
1572
|
+
])) : l.config.hcvCspAuthMethodsAvailable && a[e(t).HCV].auth_method === e(m).AWS_EC2 ? (_(), G("div", ha, [
|
|
1573
|
+
u(v, {
|
|
1574
|
+
modelValue: a[e(t).HCV].aws_auth_role,
|
|
1575
|
+
"onUpdate:modelValue": o[33] || (o[33] = (r) => a[e(t).HCV].aws_auth_role = r),
|
|
1576
|
+
modelModifiers: { trim: !0 },
|
|
1577
|
+
autocomplete: "off",
|
|
1578
|
+
"data-testid": "vault-form-config-hcv-aws_auth_role",
|
|
1579
|
+
label: e(i)("form.config.hcv.fields.aws_auth_role.label"),
|
|
1580
|
+
readonly: d.isReadonly,
|
|
1581
|
+
required: "",
|
|
1582
|
+
type: "text"
|
|
1583
|
+
}, null, 8, ["modelValue", "label", "readonly"]),
|
|
1584
|
+
u(e(Ce), {
|
|
1585
|
+
modelValue: a[e(t).HCV].aws_auth_nonce,
|
|
1586
|
+
"onUpdate:modelValue": o[34] || (o[34] = (r) => a[e(t).HCV].aws_auth_nonce = r),
|
|
1587
|
+
modelModifiers: { trim: !0 },
|
|
1588
|
+
autocomplete: "off",
|
|
1589
|
+
"data-testid": "vault-form-config-hcv-aws_auth_nonce",
|
|
1590
|
+
label: e(i)("form.config.hcv.fields.aws_auth_nonce.label"),
|
|
1591
|
+
readonly: d.isReadonly,
|
|
1592
|
+
required: ""
|
|
1593
|
+
}, null, 8, ["modelValue", "label", "readonly"]),
|
|
1594
|
+
u(v, {
|
|
1595
|
+
modelValue: a[e(t).HCV].aws_login_path,
|
|
1596
|
+
"onUpdate:modelValue": o[35] || (o[35] = (r) => a[e(t).HCV].aws_login_path = r),
|
|
1597
|
+
modelModifiers: { trim: !0 },
|
|
1598
|
+
autocomplete: "off",
|
|
1599
|
+
"data-testid": "vault-form-config-hcv-aws_login_path",
|
|
1600
|
+
label: e(i)("form.config.hcv.fields.aws_login_path.label"),
|
|
1601
|
+
readonly: d.isReadonly,
|
|
1602
|
+
type: "text"
|
|
1603
|
+
}, null, 8, ["modelValue", "label", "readonly"])
|
|
1604
|
+
])) : l.config.hcvCspAuthMethodsAvailable && a[e(t).HCV].auth_method === e(m).AZURE ? (_(), G("div", Va, [
|
|
1605
|
+
u(v, {
|
|
1606
|
+
modelValue: a[e(t).HCV].azure_auth_role,
|
|
1607
|
+
"onUpdate:modelValue": o[36] || (o[36] = (r) => a[e(t).HCV].azure_auth_role = r),
|
|
1608
|
+
modelModifiers: { trim: !0 },
|
|
1609
|
+
autocomplete: "off",
|
|
1610
|
+
"data-testid": "vault-form-config-hcv-azure_auth_role",
|
|
1611
|
+
label: e(i)("form.config.hcv.fields.azure_auth_role.label"),
|
|
1612
|
+
readonly: d.isReadonly,
|
|
1613
|
+
required: "",
|
|
1614
|
+
type: "text"
|
|
1615
|
+
}, null, 8, ["modelValue", "label", "readonly"]),
|
|
1616
|
+
u(v, {
|
|
1617
|
+
modelValue: a[e(t).HCV].azure_login_path,
|
|
1618
|
+
"onUpdate:modelValue": o[37] || (o[37] = (r) => a[e(t).HCV].azure_login_path = r),
|
|
1619
|
+
modelModifiers: { trim: !0 },
|
|
1620
|
+
autocomplete: "off",
|
|
1621
|
+
"data-testid": "vault-form-config-hcv-azure_login_path",
|
|
1622
|
+
label: e(i)("form.config.hcv.fields.azure_login_path.label"),
|
|
1623
|
+
readonly: d.isReadonly,
|
|
1624
|
+
type: "text"
|
|
1625
|
+
}, null, 8, ["modelValue", "label", "readonly"])
|
|
1626
|
+
])) : l.config.hcvCspAuthMethodsAvailable && a[e(t).HCV].auth_method === e(m).GCP_GCE ? (_(), G("div", wa, [
|
|
1627
|
+
u(v, {
|
|
1628
|
+
modelValue: a[e(t).HCV].gcp_auth_role,
|
|
1629
|
+
"onUpdate:modelValue": o[38] || (o[38] = (r) => a[e(t).HCV].gcp_auth_role = r),
|
|
1630
|
+
modelModifiers: { trim: !0 },
|
|
1631
|
+
autocomplete: "off",
|
|
1632
|
+
"data-testid": "vault-form-config-hcv-gcp_auth_role",
|
|
1633
|
+
label: e(i)("form.config.hcv.fields.gcp_auth_role.label"),
|
|
1634
|
+
readonly: d.isReadonly,
|
|
1635
|
+
required: "",
|
|
1636
|
+
type: "text"
|
|
1637
|
+
}, null, 8, ["modelValue", "label", "readonly"]),
|
|
1638
|
+
u(v, {
|
|
1639
|
+
modelValue: a[e(t).HCV].gcp_login_path,
|
|
1640
|
+
"onUpdate:modelValue": o[39] || (o[39] = (r) => a[e(t).HCV].gcp_login_path = r),
|
|
1641
|
+
modelModifiers: { trim: !0 },
|
|
1642
|
+
autocomplete: "off",
|
|
1643
|
+
"data-testid": "vault-form-config-hcv-gcp_login_path",
|
|
1644
|
+
label: e(i)("form.config.hcv.fields.gcp_login_path.label"),
|
|
1645
|
+
readonly: d.isReadonly,
|
|
1646
|
+
type: "text"
|
|
1647
|
+
}, null, 8, ["modelValue", "label", "readonly"])
|
|
1648
|
+
])) : l.config.hcvCspAuthMethodsAvailable && a[e(t).HCV].auth_method === e(m).GCP_IAM ? (_(), G("div", ka, [
|
|
1649
|
+
u(v, {
|
|
1650
|
+
modelValue: a[e(t).HCV].gcp_auth_role,
|
|
1651
|
+
"onUpdate:modelValue": o[40] || (o[40] = (r) => a[e(t).HCV].gcp_auth_role = r),
|
|
1652
|
+
modelModifiers: { trim: !0 },
|
|
1653
|
+
autocomplete: "off",
|
|
1654
|
+
"data-testid": "vault-form-config-hcv-gcp_auth_role",
|
|
1655
|
+
label: e(i)("form.config.hcv.fields.gcp_auth_role.label"),
|
|
1656
|
+
readonly: d.isReadonly,
|
|
1657
|
+
required: "",
|
|
1658
|
+
type: "text"
|
|
1659
|
+
}, null, 8, ["modelValue", "label", "readonly"]),
|
|
1660
|
+
u(v, {
|
|
1661
|
+
modelValue: a[e(t).HCV].gcp_login_path,
|
|
1662
|
+
"onUpdate:modelValue": o[41] || (o[41] = (r) => a[e(t).HCV].gcp_login_path = r),
|
|
1663
|
+
modelModifiers: { trim: !0 },
|
|
1664
|
+
autocomplete: "off",
|
|
1665
|
+
"data-testid": "vault-form-config-hcv-gcp_login_path",
|
|
1666
|
+
label: e(i)("form.config.hcv.fields.gcp_login_path.label"),
|
|
1667
|
+
readonly: d.isReadonly,
|
|
1668
|
+
type: "text"
|
|
1669
|
+
}, null, 8, ["modelValue", "label", "readonly"]),
|
|
1670
|
+
u(v, {
|
|
1671
|
+
modelValue: a[e(t).HCV].gcp_service_account,
|
|
1672
|
+
"onUpdate:modelValue": o[42] || (o[42] = (r) => a[e(t).HCV].gcp_service_account = r),
|
|
1673
|
+
modelModifiers: { trim: !0 },
|
|
1674
|
+
autocomplete: "off",
|
|
1675
|
+
"data-testid": "vault-form-config-hcv-gcp_service_account",
|
|
1676
|
+
label: e(i)("form.config.hcv.fields.gcp_service_account.label"),
|
|
1677
|
+
readonly: d.isReadonly,
|
|
1678
|
+
required: "",
|
|
1679
|
+
type: "text"
|
|
1680
|
+
}, null, 8, ["modelValue", "label", "readonly"]),
|
|
1681
|
+
u(v, {
|
|
1682
|
+
modelValue: a[e(t).HCV].gcp_jwt_exp,
|
|
1683
|
+
"onUpdate:modelValue": o[43] || (o[43] = (r) => a[e(t).HCV].gcp_jwt_exp = r),
|
|
1684
|
+
autocomplete: "off",
|
|
1685
|
+
"data-testid": "vault-form-config-hcv-gcp_jwt_exp",
|
|
1686
|
+
label: e(i)("form.config.hcv.fields.gcp_jwt_exp.label"),
|
|
1687
|
+
readonly: d.isReadonly,
|
|
1688
|
+
required: "",
|
|
1689
|
+
type: "number"
|
|
1690
|
+
}, null, 8, ["modelValue", "label", "readonly"])
|
|
1691
|
+
])) : a[e(t).HCV].auth_method === e(m).APP_ROLE ? (_(), G("div", Ca, [
|
|
1692
|
+
u(v, {
|
|
1693
|
+
modelValue: a[e(t).HCV].approle_auth_path,
|
|
1694
|
+
"onUpdate:modelValue": o[44] || (o[44] = (r) => a[e(t).HCV].approle_auth_path = r),
|
|
1695
|
+
modelModifiers: { trim: !0 },
|
|
1696
|
+
autocomplete: "off",
|
|
1697
|
+
"data-testid": "vault-form-config-hcv-approle_auth_path",
|
|
1698
|
+
label: e(i)("form.config.hcv.fields.approle_auth_path.label"),
|
|
1699
|
+
readonly: d.isReadonly,
|
|
1700
|
+
type: "text"
|
|
1701
|
+
}, null, 8, ["modelValue", "label", "readonly"]),
|
|
1702
|
+
u(v, {
|
|
1703
|
+
modelValue: a[e(t).HCV].approle_role_id,
|
|
1704
|
+
"onUpdate:modelValue": o[45] || (o[45] = (r) => a[e(t).HCV].approle_role_id = r),
|
|
1705
|
+
modelModifiers: { trim: !0 },
|
|
1706
|
+
autocomplete: "off",
|
|
1707
|
+
"data-testid": "vault-form-config-hcv-approle_role_id",
|
|
1708
|
+
label: e(i)("form.config.hcv.fields.approle_role_id.label"),
|
|
1709
|
+
readonly: d.isReadonly,
|
|
1710
|
+
required: "",
|
|
1711
|
+
type: "text"
|
|
1712
|
+
}, null, 8, ["modelValue", "label", "readonly"]),
|
|
1713
|
+
u(e(Ce), {
|
|
1714
|
+
modelValue: a[e(t).HCV].approle_secret_id,
|
|
1715
|
+
"onUpdate:modelValue": o[46] || (o[46] = (r) => a[e(t).HCV].approle_secret_id = r),
|
|
1716
|
+
modelModifiers: { trim: !0 },
|
|
1717
|
+
autocomplete: "off",
|
|
1718
|
+
"data-testid": "vault-form-config-hcv-approle_secret_id",
|
|
1719
|
+
label: e(i)("form.config.hcv.fields.approle_secret_id.label"),
|
|
1720
|
+
readonly: d.isReadonly
|
|
1721
|
+
}, null, 8, ["modelValue", "label", "readonly"]),
|
|
1722
|
+
u(v, {
|
|
1723
|
+
modelValue: a[e(t).HCV].approle_secret_id_file,
|
|
1724
|
+
"onUpdate:modelValue": o[47] || (o[47] = (r) => a[e(t).HCV].approle_secret_id_file = r),
|
|
1725
|
+
modelModifiers: { trim: !0 },
|
|
1726
|
+
autocomplete: "off",
|
|
1727
|
+
"data-testid": "vault-form-config-hcv-approle_secret_id_file",
|
|
1728
|
+
label: e(i)("form.config.hcv.fields.approle_secret_id_file.label"),
|
|
1729
|
+
readonly: d.isReadonly,
|
|
1730
|
+
type: "text"
|
|
1731
|
+
}, null, 8, ["modelValue", "label", "readonly"]),
|
|
1732
|
+
u(Y, {
|
|
1733
|
+
modelValue: a[e(t).HCV].approle_response_wrapping,
|
|
1734
|
+
"onUpdate:modelValue": o[48] || (o[48] = (r) => a[e(t).HCV].approle_response_wrapping = r),
|
|
1735
|
+
"data-testid": "vault-form-config-hcv-approle_response_wrapping",
|
|
1736
|
+
label: e(i)("form.config.hcv.fields.approle_response_wrapping.label")
|
|
1737
|
+
}, null, 8, ["modelValue", "label"])
|
|
1738
|
+
])) : a[e(t).HCV].auth_method === e(m).CERT ? (_(), G("div", Aa, [
|
|
1739
|
+
u(v, {
|
|
1740
|
+
modelValue: a[e(t).HCV].cert_auth_role_name,
|
|
1741
|
+
"onUpdate:modelValue": o[49] || (o[49] = (r) => a[e(t).HCV].cert_auth_role_name = r),
|
|
1742
|
+
modelModifiers: { trim: !0 },
|
|
1743
|
+
autocomplete: "off",
|
|
1744
|
+
"data-testid": "vault-form-config-hcv-cert_auth_role_name",
|
|
1745
|
+
label: e(i)("form.config.hcv.fields.cert_auth_role_name.label"),
|
|
1746
|
+
readonly: d.isReadonly
|
|
1747
|
+
}, null, 8, ["modelValue", "label", "readonly"]),
|
|
1748
|
+
u(Ee, {
|
|
1749
|
+
modelValue: a[e(t).HCV].cert_auth_cert,
|
|
1750
|
+
"onUpdate:modelValue": o[50] || (o[50] = (r) => a[e(t).HCV].cert_auth_cert = r),
|
|
1751
|
+
modelModifiers: { trim: !0 },
|
|
1752
|
+
autocomplete: "off",
|
|
1753
|
+
"data-testid": "vault-form-config-hcv-cert_auth_cert",
|
|
1754
|
+
label: e(i)("form.config.hcv.fields.cert_auth_cert.label"),
|
|
1755
|
+
readonly: d.isReadonly,
|
|
1756
|
+
required: ""
|
|
1757
|
+
}, null, 8, ["modelValue", "label", "readonly"]),
|
|
1758
|
+
V.value ? (_(), S(e(He), {
|
|
1759
|
+
key: 1,
|
|
1760
|
+
modelValue: a[e(t).HCV].cert_auth_cert_key,
|
|
1761
|
+
"onUpdate:modelValue": o[52] || (o[52] = (r) => a[e(t).HCV].cert_auth_cert_key = r),
|
|
1762
|
+
"data-testid": "vault-form-config-hcv-cert_auth_cert_key",
|
|
1763
|
+
label: e(i)("form.config.hcv.fields.cert_auth_cert_key.label"),
|
|
1764
|
+
labels: { rotateLabel: e(i)("form.config.hcv.fields.cert_auth_cert_key.rotateLabel") },
|
|
1765
|
+
mode: Q.value,
|
|
1766
|
+
multiline: "",
|
|
1767
|
+
placeholder: "",
|
|
1768
|
+
readonly: d.isReadonly,
|
|
1769
|
+
required: Q.value === "create",
|
|
1770
|
+
onRotate: o[53] || (o[53] = (r) => ve.value = !0)
|
|
1771
|
+
}, {
|
|
1772
|
+
alert: g(() => [
|
|
1773
|
+
ve.value ? (_(), S(Oe, {
|
|
1774
|
+
key: 0,
|
|
1775
|
+
message: e(i)("form.config.hcv.fields.cert_auth_cert_key.rotateAlert")
|
|
1776
|
+
}, null, 8, ["message"])) : M("", !0)
|
|
1777
|
+
]),
|
|
1778
|
+
_: 1
|
|
1779
|
+
}, 8, ["modelValue", "label", "labels", "mode", "readonly", "required"])) : (_(), S(Ee, {
|
|
1780
|
+
key: 0,
|
|
1781
|
+
modelValue: a[e(t).HCV].cert_auth_cert_key,
|
|
1782
|
+
"onUpdate:modelValue": o[51] || (o[51] = (r) => a[e(t).HCV].cert_auth_cert_key = r),
|
|
1783
|
+
modelModifiers: { trim: !0 },
|
|
1784
|
+
autocomplete: "off",
|
|
1785
|
+
"data-testid": "vault-form-config-hcv-cert_auth_cert_key",
|
|
1786
|
+
label: e(i)("form.config.hcv.fields.cert_auth_cert_key.label"),
|
|
1787
|
+
readonly: d.isReadonly,
|
|
1788
|
+
required: ""
|
|
1789
|
+
}, null, 8, ["modelValue", "label", "readonly"]))
|
|
1790
|
+
])) : a[e(t).HCV].auth_method === e(m).JWT ? (_(), G("div", Sa, [
|
|
1791
|
+
u(v, {
|
|
1792
|
+
modelValue: a[e(t).HCV].oauth2_client_id,
|
|
1793
|
+
"onUpdate:modelValue": o[54] || (o[54] = (r) => a[e(t).HCV].oauth2_client_id = r),
|
|
1794
|
+
modelModifiers: { trim: !0 },
|
|
1795
|
+
autocomplete: "off",
|
|
1796
|
+
"data-testid": "vault-form-config-hcv-oauth2_client_id",
|
|
1797
|
+
label: e(i)("form.config.hcv.fields.oauth2_client_id.label"),
|
|
1798
|
+
readonly: d.isReadonly,
|
|
1799
|
+
required: ""
|
|
1800
|
+
}, null, 8, ["modelValue", "label", "readonly"]),
|
|
1801
|
+
V.value ? (_(), S(e(He), {
|
|
1802
|
+
key: 1,
|
|
1803
|
+
modelValue: a[e(t).HCV].oauth2_client_secret,
|
|
1804
|
+
"onUpdate:modelValue": o[56] || (o[56] = (r) => a[e(t).HCV].oauth2_client_secret = r),
|
|
1805
|
+
"data-testid": "vault-form-config-hcv-oauth2_client_secret",
|
|
1806
|
+
label: e(i)("form.config.hcv.fields.oauth2_client_secret.label"),
|
|
1807
|
+
mode: Q.value,
|
|
1808
|
+
readonly: d.isReadonly,
|
|
1809
|
+
required: Q.value === "create",
|
|
1810
|
+
"use-secret-input": ""
|
|
1811
|
+
}, null, 8, ["modelValue", "label", "mode", "readonly", "required"])) : (_(), S(e(Ce), {
|
|
1812
|
+
key: 0,
|
|
1813
|
+
modelValue: a[e(t).HCV].oauth2_client_secret,
|
|
1814
|
+
"onUpdate:modelValue": o[55] || (o[55] = (r) => a[e(t).HCV].oauth2_client_secret = r),
|
|
1815
|
+
modelModifiers: { trim: !0 },
|
|
1816
|
+
autocomplete: "off",
|
|
1817
|
+
"data-testid": "vault-form-config-hcv-oauth2_client_secret",
|
|
1818
|
+
label: e(i)("form.config.hcv.fields.oauth2_client_secret.label"),
|
|
1819
|
+
readonly: d.isReadonly,
|
|
1820
|
+
required: ""
|
|
1821
|
+
}, null, 8, ["modelValue", "label", "readonly"])),
|
|
1822
|
+
u(v, {
|
|
1823
|
+
modelValue: a[e(t).HCV].jwt_role,
|
|
1824
|
+
"onUpdate:modelValue": o[57] || (o[57] = (r) => a[e(t).HCV].jwt_role = r),
|
|
1825
|
+
modelModifiers: { trim: !0 },
|
|
1826
|
+
autocomplete: "off",
|
|
1827
|
+
"data-testid": "vault-form-config-hcv-jwt_role",
|
|
1828
|
+
label: e(i)("form.config.hcv.fields.jwt_role.label"),
|
|
1829
|
+
"label-attributes": {
|
|
1830
|
+
info: e(i)("form.config.hcv.fields.jwt_role.tooltip"),
|
|
1831
|
+
tooltipAttributes: { maxWidth: "400" }
|
|
1832
|
+
},
|
|
1833
|
+
readonly: d.isReadonly,
|
|
1834
|
+
required: ""
|
|
1835
|
+
}, null, 8, ["modelValue", "label", "label-attributes", "readonly"]),
|
|
1836
|
+
u(v, {
|
|
1837
|
+
modelValue: a[e(t).HCV].oauth2_token_endpoint,
|
|
1838
|
+
"onUpdate:modelValue": o[58] || (o[58] = (r) => a[e(t).HCV].oauth2_token_endpoint = r),
|
|
1839
|
+
modelModifiers: { trim: !0 },
|
|
1840
|
+
autocomplete: "off",
|
|
1841
|
+
"data-testid": "vault-form-config-hcv-oauth2_token_endpoint",
|
|
1842
|
+
label: e(i)("form.config.hcv.fields.oauth2_token_endpoint.label"),
|
|
1843
|
+
readonly: d.isReadonly,
|
|
1844
|
+
required: ""
|
|
1845
|
+
}, null, 8, ["modelValue", "label", "readonly"]),
|
|
1846
|
+
u(v, {
|
|
1847
|
+
modelValue: a[e(t).HCV].oauth2_audiences,
|
|
1848
|
+
"onUpdate:modelValue": o[59] || (o[59] = (r) => a[e(t).HCV].oauth2_audiences = r),
|
|
1849
|
+
modelModifiers: { trim: !0 },
|
|
1850
|
+
autocomplete: "off",
|
|
1851
|
+
"data-testid": "vault-form-config-hcv-oauth2_audiences",
|
|
1852
|
+
label: e(i)("form.config.hcv.fields.oauth2_audiences.label"),
|
|
1853
|
+
"label-attributes": {
|
|
1854
|
+
info: e(i)("form.config.hcv.fields.oauth2_audiences.tooltip"),
|
|
1855
|
+
tooltipAttributes: { maxWidth: "400" }
|
|
1856
|
+
},
|
|
1857
|
+
readonly: d.isReadonly
|
|
1858
|
+
}, null, 8, ["modelValue", "label", "label-attributes", "readonly"])
|
|
1859
|
+
])) : M("", !0),
|
|
1860
|
+
l.config.base64FieldAvailable ? (_(), S(Y, {
|
|
1861
|
+
key: 11,
|
|
1862
|
+
modelValue: a[e(t).HCV].base64_decode,
|
|
1863
|
+
"onUpdate:modelValue": o[60] || (o[60] = (r) => a[e(t).HCV].base64_decode = r),
|
|
1864
|
+
"data-testid": "vault-form-config-hcv-base64_decode",
|
|
1865
|
+
label: e(i)("form.config.commonFields.base64_decode.label"),
|
|
1866
|
+
"label-attributes": {
|
|
1867
|
+
info: e(i)("form.config.commonFields.base64_decode.tooltip"),
|
|
1868
|
+
tooltipAttributes: { maxWidth: "400" }
|
|
1869
|
+
},
|
|
1870
|
+
readonly: d.isReadonly
|
|
1871
|
+
}, null, 8, ["modelValue", "label", "label-attributes", "readonly"])) : M("", !0)
|
|
1872
|
+
])) : M("", !0),
|
|
1873
|
+
p.value === e(t).AZURE ? (_(), G("div", {
|
|
1874
|
+
key: `${e(t).AZURE}-vault-config-fields`,
|
|
1875
|
+
class: "vault-form-config-fields-container"
|
|
1876
|
+
}, [
|
|
1877
|
+
u(v, {
|
|
1878
|
+
modelValue: a[e(t).AZURE].location,
|
|
1879
|
+
"onUpdate:modelValue": o[61] || (o[61] = (r) => a[e(t).AZURE].location = r),
|
|
1880
|
+
modelModifiers: { trim: !0 },
|
|
1881
|
+
autocomplete: "off",
|
|
1882
|
+
"data-testid": "vault-form-config-azure-location",
|
|
1883
|
+
label: e(i)("form.config.azure.fields.location.label"),
|
|
1884
|
+
readonly: d.isReadonly,
|
|
1885
|
+
required: "",
|
|
1886
|
+
type: "text"
|
|
1887
|
+
}, null, 8, ["modelValue", "label", "readonly"]),
|
|
1888
|
+
u(v, {
|
|
1889
|
+
modelValue: a[e(t).AZURE].vault_uri,
|
|
1890
|
+
"onUpdate:modelValue": o[62] || (o[62] = (r) => a[e(t).AZURE].vault_uri = r),
|
|
1891
|
+
modelModifiers: { trim: !0 },
|
|
1892
|
+
autocomplete: "off",
|
|
1893
|
+
"data-testid": "vault-form-config-azure-uri",
|
|
1894
|
+
label: e(i)("form.config.azure.fields.vault_uri.label"),
|
|
1895
|
+
readonly: d.isReadonly,
|
|
1896
|
+
required: "",
|
|
1897
|
+
type: "text"
|
|
1898
|
+
}, null, 8, ["modelValue", "label", "readonly"]),
|
|
1899
|
+
u(v, {
|
|
1900
|
+
modelValue: a[e(t).AZURE].credentials_prefix,
|
|
1901
|
+
"onUpdate:modelValue": o[63] || (o[63] = (r) => a[e(t).AZURE].credentials_prefix = r),
|
|
1902
|
+
modelModifiers: { trim: !0 },
|
|
1903
|
+
autocomplete: "off",
|
|
1904
|
+
"data-testid": "vault-form-config-azure-prefix",
|
|
1905
|
+
label: e(i)("form.config.azure.fields.credential_prefix.label"),
|
|
1906
|
+
readonly: d.isReadonly,
|
|
1907
|
+
required: "",
|
|
1908
|
+
type: "text"
|
|
1909
|
+
}, null, 8, ["modelValue", "label", "readonly"]),
|
|
1910
|
+
u(oe, {
|
|
1911
|
+
modelValue: a[e(t).AZURE].type,
|
|
1912
|
+
"onUpdate:modelValue": o[64] || (o[64] = (r) => a[e(t).AZURE].type = r),
|
|
1913
|
+
"data-testid": "vault-form-config-azure-type",
|
|
1914
|
+
items: te,
|
|
1915
|
+
label: e(i)("form.config.azure.fields.type.label"),
|
|
1916
|
+
placeholder: e(i)("form.config.azure.fields.type.placeholder"),
|
|
1917
|
+
readonly: d.isReadonly,
|
|
1918
|
+
required: "",
|
|
1919
|
+
width: "100%"
|
|
1920
|
+
}, null, 8, ["modelValue", "label", "placeholder", "readonly"]),
|
|
1921
|
+
u(v, {
|
|
1922
|
+
modelValue: a[e(t).AZURE].client_id,
|
|
1923
|
+
"onUpdate:modelValue": o[65] || (o[65] = (r) => a[e(t).AZURE].client_id = r),
|
|
1924
|
+
modelModifiers: { trim: !0 },
|
|
1925
|
+
autocomplete: "off",
|
|
1926
|
+
"data-testid": "vault-form-config-azure-client-id",
|
|
1927
|
+
label: e(i)("form.config.azure.fields.client_id.label"),
|
|
1928
|
+
readonly: d.isReadonly,
|
|
1929
|
+
type: "text"
|
|
1930
|
+
}, null, 8, ["modelValue", "label", "readonly"]),
|
|
1931
|
+
u(v, {
|
|
1932
|
+
modelValue: a[e(t).AZURE].tenant_id,
|
|
1933
|
+
"onUpdate:modelValue": o[66] || (o[66] = (r) => a[e(t).AZURE].tenant_id = r),
|
|
1934
|
+
modelModifiers: { trim: !0 },
|
|
1935
|
+
autocomplete: "off",
|
|
1936
|
+
"data-testid": "vault-form-config-azure-tenant-id",
|
|
1937
|
+
label: e(i)("form.config.azure.fields.tenant_id.label"),
|
|
1938
|
+
readonly: d.isReadonly,
|
|
1939
|
+
type: "text"
|
|
1940
|
+
}, null, 8, ["modelValue", "label", "readonly"]),
|
|
1941
|
+
l.config.base64FieldAvailable ? (_(), S(Y, {
|
|
1942
|
+
key: 0,
|
|
1943
|
+
modelValue: a[e(t).AZURE].base64_decode,
|
|
1944
|
+
"onUpdate:modelValue": o[67] || (o[67] = (r) => a[e(t).AZURE].base64_decode = r),
|
|
1945
|
+
"data-testid": "vault-form-config-azure-base64_decode",
|
|
1946
|
+
label: e(i)("form.config.commonFields.base64_decode.label"),
|
|
1947
|
+
"label-attributes": {
|
|
1948
|
+
info: e(i)("form.config.commonFields.base64_decode.tooltip"),
|
|
1949
|
+
tooltipAttributes: { maxWidth: "400" }
|
|
1950
|
+
},
|
|
1951
|
+
readonly: d.isReadonly
|
|
1952
|
+
}, null, 8, ["modelValue", "label", "label-attributes", "readonly"])) : M("", !0)
|
|
1953
|
+
])) : M("", !0),
|
|
1954
|
+
p.value === e(t).AZURE_CERTS ? (_(), G("div", {
|
|
1955
|
+
key: `${e(t).AZURE_CERTS}-vault-config-fields`,
|
|
1956
|
+
class: "vault-form-config-fields-container"
|
|
1957
|
+
}, [
|
|
1958
|
+
u(v, {
|
|
1959
|
+
modelValue: a[e(t).AZURE_CERTS].vault_uri,
|
|
1960
|
+
"onUpdate:modelValue": o[68] || (o[68] = (r) => a[e(t).AZURE_CERTS].vault_uri = r),
|
|
1961
|
+
modelModifiers: { trim: !0 },
|
|
1962
|
+
autocomplete: "off",
|
|
1963
|
+
"data-testid": "vault-form-config-azure-certs-vault-uri",
|
|
1964
|
+
label: e(i)("form.config.azure-certs.fields.vault_uri.label"),
|
|
1965
|
+
readonly: d.isReadonly,
|
|
1966
|
+
required: "",
|
|
1967
|
+
type: "text"
|
|
1968
|
+
}, null, 8, ["modelValue", "label", "readonly"]),
|
|
1969
|
+
u(v, {
|
|
1970
|
+
modelValue: a[e(t).AZURE_CERTS].credentials_prefix,
|
|
1971
|
+
"onUpdate:modelValue": o[69] || (o[69] = (r) => a[e(t).AZURE_CERTS].credentials_prefix = r),
|
|
1972
|
+
modelModifiers: { trim: !0 },
|
|
1973
|
+
autocomplete: "off",
|
|
1974
|
+
"data-testid": "vault-form-config-azure-certs-credentials-prefix",
|
|
1975
|
+
label: e(i)("form.config.azure-certs.fields.credential_prefix.label"),
|
|
1976
|
+
readonly: d.isReadonly,
|
|
1977
|
+
required: "",
|
|
1978
|
+
type: "text"
|
|
1979
|
+
}, null, 8, ["modelValue", "label", "readonly"]),
|
|
1980
|
+
u(v, {
|
|
1981
|
+
modelValue: a[e(t).AZURE_CERTS].client_id,
|
|
1982
|
+
"onUpdate:modelValue": o[70] || (o[70] = (r) => a[e(t).AZURE_CERTS].client_id = r),
|
|
1983
|
+
modelModifiers: { trim: !0 },
|
|
1984
|
+
autocomplete: "off",
|
|
1985
|
+
"data-testid": "vault-form-config-azure-certs-client-id",
|
|
1986
|
+
label: e(i)("form.config.azure-certs.fields.client_id.label"),
|
|
1987
|
+
readonly: d.isReadonly,
|
|
1988
|
+
type: "text"
|
|
1989
|
+
}, null, 8, ["modelValue", "label", "readonly"]),
|
|
1990
|
+
u(v, {
|
|
1991
|
+
modelValue: a[e(t).AZURE_CERTS].tenant_id,
|
|
1992
|
+
"onUpdate:modelValue": o[71] || (o[71] = (r) => a[e(t).AZURE_CERTS].tenant_id = r),
|
|
1993
|
+
modelModifiers: { trim: !0 },
|
|
1994
|
+
autocomplete: "off",
|
|
1995
|
+
"data-testid": "vault-form-config-azure-certs-tenant-id",
|
|
1996
|
+
label: e(i)("form.config.azure-certs.fields.tenant_id.label"),
|
|
1997
|
+
readonly: d.isReadonly,
|
|
1998
|
+
type: "text"
|
|
1999
|
+
}, null, 8, ["modelValue", "label", "readonly"])
|
|
2000
|
+
])) : M("", !0),
|
|
2001
|
+
p.value === e(t).CONJUR ? (_(), G("div", {
|
|
2002
|
+
key: `${e(t).CONJUR}-vault-config-fields`,
|
|
2003
|
+
class: "vault-form-config-fields-container"
|
|
2004
|
+
}, [
|
|
2005
|
+
u(v, {
|
|
2006
|
+
modelValue: a[e(t).CONJUR].endpoint_url,
|
|
2007
|
+
"onUpdate:modelValue": o[72] || (o[72] = (r) => a[e(t).CONJUR].endpoint_url = r),
|
|
2008
|
+
modelModifiers: { trim: !0 },
|
|
2009
|
+
autocomplete: "off",
|
|
2010
|
+
"data-testid": "vault-form-config-conjur-endpoint_url",
|
|
2011
|
+
label: e(i)("form.config.conjur.fields.endpoint_url.label"),
|
|
2012
|
+
"label-attributes": {
|
|
2013
|
+
info: e(i)("form.config.conjur.fields.endpoint_url.tooltip"),
|
|
2014
|
+
tooltipAttributes: { maxWidth: "400" }
|
|
2015
|
+
},
|
|
2016
|
+
readonly: d.isReadonly,
|
|
2017
|
+
required: "",
|
|
2018
|
+
type: "text"
|
|
2019
|
+
}, null, 8, ["modelValue", "label", "label-attributes", "readonly"]),
|
|
2020
|
+
u(v, {
|
|
2021
|
+
modelValue: a[e(t).CONJUR].login,
|
|
2022
|
+
"onUpdate:modelValue": o[73] || (o[73] = (r) => a[e(t).CONJUR].login = r),
|
|
2023
|
+
modelModifiers: { trim: !0 },
|
|
2024
|
+
autocomplete: "off",
|
|
2025
|
+
"data-testid": "vault-form-config-conjur-login",
|
|
2026
|
+
label: e(i)("form.config.conjur.fields.login.label"),
|
|
2027
|
+
"label-attributes": {
|
|
2028
|
+
info: e(i)("form.config.conjur.fields.login.tooltip"),
|
|
2029
|
+
tooltipAttributes: { maxWidth: "400" }
|
|
2030
|
+
},
|
|
2031
|
+
readonly: d.isReadonly,
|
|
2032
|
+
required: "",
|
|
2033
|
+
type: "text"
|
|
2034
|
+
}, null, 8, ["modelValue", "label", "label-attributes", "readonly"]),
|
|
2035
|
+
u(v, {
|
|
2036
|
+
modelValue: a[e(t).CONJUR].account,
|
|
2037
|
+
"onUpdate:modelValue": o[74] || (o[74] = (r) => a[e(t).CONJUR].account = r),
|
|
2038
|
+
modelModifiers: { trim: !0 },
|
|
2039
|
+
autocomplete: "off",
|
|
2040
|
+
"data-testid": "vault-form-config-conjur-account",
|
|
2041
|
+
label: e(i)("form.config.conjur.fields.account.label"),
|
|
2042
|
+
"label-attributes": {
|
|
2043
|
+
info: e(i)("form.config.conjur.fields.account.tooltip"),
|
|
2044
|
+
tooltipAttributes: { maxWidth: "400" }
|
|
2045
|
+
},
|
|
2046
|
+
readonly: d.isReadonly,
|
|
2047
|
+
required: "",
|
|
2048
|
+
type: "text"
|
|
2049
|
+
}, null, 8, ["modelValue", "label", "label-attributes", "readonly"]),
|
|
2050
|
+
V.value ? (_(), S(e(He), {
|
|
2051
|
+
key: 1,
|
|
2052
|
+
modelValue: a[e(t).CONJUR].api_key,
|
|
2053
|
+
"onUpdate:modelValue": o[76] || (o[76] = (r) => a[e(t).CONJUR].api_key = r),
|
|
2054
|
+
"data-testid": "vault-form-config-conjur-api_key",
|
|
2055
|
+
label: e(i)("form.config.conjur.fields.api_key.label"),
|
|
2056
|
+
"label-attributes": {
|
|
2057
|
+
info: e(i)("form.config.conjur.fields.api_key.tooltip"),
|
|
2058
|
+
tooltipAttributes: { maxWidth: "400" }
|
|
2059
|
+
},
|
|
2060
|
+
mode: Q.value,
|
|
2061
|
+
readonly: d.isReadonly,
|
|
2062
|
+
required: Q.value === "create",
|
|
2063
|
+
"use-secret-input": ""
|
|
2064
|
+
}, null, 8, ["modelValue", "label", "label-attributes", "mode", "readonly", "required"])) : (_(), S(e(Ce), {
|
|
2065
|
+
key: 0,
|
|
2066
|
+
modelValue: a[e(t).CONJUR].api_key,
|
|
2067
|
+
"onUpdate:modelValue": o[75] || (o[75] = (r) => a[e(t).CONJUR].api_key = r),
|
|
2068
|
+
modelModifiers: { trim: !0 },
|
|
2069
|
+
autocomplete: "off",
|
|
2070
|
+
"data-testid": "vault-form-config-conjur-api_key",
|
|
2071
|
+
label: e(i)("form.config.conjur.fields.api_key.label"),
|
|
2072
|
+
"label-attributes": {
|
|
2073
|
+
info: e(i)("form.config.conjur.fields.api_key.tooltip"),
|
|
2074
|
+
tooltipAttributes: { maxWidth: "400" }
|
|
2075
|
+
},
|
|
2076
|
+
readonly: d.isReadonly,
|
|
2077
|
+
required: ""
|
|
2078
|
+
}, null, 8, ["modelValue", "label", "label-attributes", "readonly"])),
|
|
2079
|
+
l.config.base64FieldAvailable ? (_(), S(Y, {
|
|
2080
|
+
key: 2,
|
|
2081
|
+
modelValue: a[e(t).CONJUR].base64_decode,
|
|
2082
|
+
"onUpdate:modelValue": o[77] || (o[77] = (r) => a[e(t).CONJUR].base64_decode = r),
|
|
2083
|
+
"data-testid": "vault-form-config-env-base64_decode",
|
|
2084
|
+
label: e(i)("form.config.commonFields.base64_decode.label"),
|
|
2085
|
+
"label-attributes": {
|
|
2086
|
+
info: e(i)("form.config.commonFields.base64_decode.tooltip"),
|
|
2087
|
+
tooltipAttributes: { maxWidth: "400" }
|
|
2088
|
+
},
|
|
2089
|
+
readonly: d.isReadonly
|
|
2090
|
+
}, null, 8, ["modelValue", "label", "label-attributes", "readonly"])) : M("", !0)
|
|
2091
|
+
])) : M("", !0),
|
|
2092
|
+
p.value === e(t).FS ? (_(), G("div", {
|
|
2093
|
+
key: `${e(t).FS}-vault-config-fields`,
|
|
2094
|
+
class: "vault-form-config-fields-container"
|
|
2095
|
+
}, [
|
|
2096
|
+
u(v, {
|
|
2097
|
+
modelValue: a[e(t).FS].prefix,
|
|
2098
|
+
"onUpdate:modelValue": o[78] || (o[78] = (r) => a[e(t).FS].prefix = r),
|
|
2099
|
+
modelModifiers: { trim: !0 },
|
|
2100
|
+
autocomplete: "off",
|
|
2101
|
+
"data-testid": "vault-form-config-fs-prefix",
|
|
2102
|
+
label: e(i)("form.config.fs.fields.prefix.label"),
|
|
2103
|
+
"label-attributes": {
|
|
2104
|
+
info: e(i)("form.config.fs.fields.prefix.tooltip"),
|
|
2105
|
+
tooltipAttributes: { maxWidth: "400" }
|
|
2106
|
+
},
|
|
2107
|
+
readonly: d.isReadonly,
|
|
2108
|
+
required: "",
|
|
2109
|
+
type: "text"
|
|
2110
|
+
}, null, 8, ["modelValue", "label", "label-attributes", "readonly"]),
|
|
2111
|
+
l.config.base64FieldAvailable ? (_(), S(Y, {
|
|
2112
|
+
key: 0,
|
|
2113
|
+
modelValue: a[e(t).FS].base64_decode,
|
|
2114
|
+
"onUpdate:modelValue": o[79] || (o[79] = (r) => a[e(t).FS].base64_decode = r),
|
|
2115
|
+
"data-testid": "vault-form-config-fs-base64_decode",
|
|
2116
|
+
label: e(i)("form.config.commonFields.base64_decode.label"),
|
|
2117
|
+
"label-attributes": {
|
|
2118
|
+
info: e(i)("form.config.commonFields.base64_decode.tooltip"),
|
|
2119
|
+
tooltipAttributes: { maxWidth: "400" }
|
|
2120
|
+
},
|
|
2121
|
+
readonly: d.isReadonly
|
|
2122
|
+
}, null, 8, ["modelValue", "label", "label-attributes", "readonly"])) : M("", !0)
|
|
2123
|
+
])) : M("", !0),
|
|
2124
|
+
l.config.ttl ? (_(), G("div", Ra, [
|
|
2125
|
+
L.value ? (_(), S(Ie, {
|
|
2126
|
+
key: 0,
|
|
2127
|
+
class: "advanced-fields-collapse",
|
|
2128
|
+
"data-testid": "advanced-fields-collapse",
|
|
2129
|
+
"trigger-alignment": "leading",
|
|
2130
|
+
"trigger-label": e(i)("form.config.advancedFields.title")
|
|
2131
|
+
}, {
|
|
2132
|
+
default: g(() => [
|
|
2133
|
+
x("div", Ea, [
|
|
2134
|
+
x("div", Ia, [
|
|
2135
|
+
u(v, {
|
|
2136
|
+
modelValue: a[p.value].ttl,
|
|
2137
|
+
"onUpdate:modelValue": o[80] || (o[80] = (r) => a[p.value].ttl = r),
|
|
2138
|
+
"data-testid": "vault-ttl-input",
|
|
2139
|
+
label: e(i)("form.config.advancedFields.ttl"),
|
|
2140
|
+
"label-attributes": {
|
|
2141
|
+
info: e(i)("form.config.advancedFields.ttlTooltip"),
|
|
2142
|
+
tooltipAttributes: { maxWidth: "400" }
|
|
2143
|
+
},
|
|
2144
|
+
type: "number"
|
|
2145
|
+
}, null, 8, ["modelValue", "label", "label-attributes"])
|
|
2146
|
+
]),
|
|
2147
|
+
x("div", xa, [
|
|
2148
|
+
u(v, {
|
|
2149
|
+
modelValue: a[p.value].neg_ttl,
|
|
2150
|
+
"onUpdate:modelValue": o[81] || (o[81] = (r) => a[p.value].neg_ttl = r),
|
|
2151
|
+
"data-testid": "vault-neg-ttl-input",
|
|
2152
|
+
label: e(i)("form.config.advancedFields.negTtl"),
|
|
2153
|
+
"label-attributes": {
|
|
2154
|
+
info: e(i)("form.config.advancedFields.negTtlTooltip"),
|
|
2155
|
+
tooltipAttributes: { maxWidth: "400" }
|
|
2156
|
+
},
|
|
2157
|
+
type: "number"
|
|
2158
|
+
}, null, 8, ["modelValue", "label", "label-attributes"])
|
|
2159
|
+
])
|
|
2160
|
+
]),
|
|
2161
|
+
x("div", Ua, [
|
|
2162
|
+
x("div", Ha, [
|
|
2163
|
+
u(v, {
|
|
2164
|
+
modelValue: a[p.value].resurrect_ttl,
|
|
2165
|
+
"onUpdate:modelValue": o[82] || (o[82] = (r) => a[p.value].resurrect_ttl = r),
|
|
2166
|
+
"data-testid": "vault-resurrect-ttl-input",
|
|
2167
|
+
label: e(i)("form.config.advancedFields.resurrectTtl"),
|
|
2168
|
+
"label-attributes": {
|
|
2169
|
+
info: e(i)("form.config.advancedFields.resurrectTtlTooltip"),
|
|
2170
|
+
tooltipAttributes: { maxWidth: "400" }
|
|
2171
|
+
},
|
|
2172
|
+
type: "number"
|
|
2173
|
+
}, null, 8, ["modelValue", "label", "label-attributes"])
|
|
2174
|
+
])
|
|
2175
|
+
])
|
|
2176
|
+
]),
|
|
2177
|
+
_: 1
|
|
2178
|
+
}, 8, ["trigger-label"])) : M("", !0)
|
|
2179
|
+
])) : M("", !0)
|
|
2180
|
+
]),
|
|
2181
|
+
_: 1
|
|
2182
|
+
})
|
|
2183
|
+
]),
|
|
2184
|
+
_: 1
|
|
2185
|
+
}, 8, ["description", "title"]),
|
|
2186
|
+
u(e(ze), {
|
|
2187
|
+
description: e(i)("form.sections.general.description"),
|
|
2188
|
+
title: e(i)("form.sections.general.title")
|
|
2189
|
+
}, {
|
|
2190
|
+
default: g(() => [
|
|
2191
|
+
u(v, {
|
|
2192
|
+
modelValue: d.fields.prefix,
|
|
2193
|
+
"onUpdate:modelValue": o[83] || (o[83] = (r) => d.fields.prefix = r),
|
|
2194
|
+
modelModifiers: { trim: !0 },
|
|
2195
|
+
autocomplete: "off",
|
|
2196
|
+
"data-testid": "vault-form-prefix",
|
|
2197
|
+
help: e(i)(V.value ? "form.fields.prefix_ai_gateway.help" : "form.fields.prefix.help"),
|
|
2198
|
+
label: e(i)(V.value ? "form.fields.prefix_ai_gateway.label" : "form.fields.prefix.label"),
|
|
2199
|
+
"label-attributes": {
|
|
2200
|
+
info: e(i)(V.value ? "form.fields.prefix_ai_gateway.tooltip" : "form.fields.prefix.tooltip"),
|
|
2201
|
+
tooltipAttributes: { maxWidth: "400" }
|
|
2202
|
+
},
|
|
2203
|
+
placeholder: e(i)(V.value ? "form.fields.prefix_ai_gateway.placeholder" : "form.fields.prefix.placeholder"),
|
|
2204
|
+
readonly: d.isReadonly,
|
|
2205
|
+
required: "",
|
|
2206
|
+
type: "text"
|
|
2207
|
+
}, null, 8, ["modelValue", "help", "label", "label-attributes", "placeholder", "readonly"]),
|
|
2208
|
+
u(Ee, {
|
|
2209
|
+
modelValue: d.fields.description,
|
|
2210
|
+
"onUpdate:modelValue": o[84] || (o[84] = (r) => d.fields.description = r),
|
|
2211
|
+
modelModifiers: { trim: !0 },
|
|
2212
|
+
"character-limit": 1e3,
|
|
2213
|
+
class: "vault-form-textarea",
|
|
2214
|
+
"data-testid": "vault-form-description",
|
|
2215
|
+
label: e(i)("form.fields.description.label"),
|
|
2216
|
+
placeholder: e(i)("form.fields.description.placeholder"),
|
|
2217
|
+
readonly: d.isReadonly
|
|
2218
|
+
}, null, 8, ["modelValue", "label", "placeholder", "readonly"]),
|
|
2219
|
+
V.value ? M("", !0) : (_(), S(v, {
|
|
2220
|
+
key: 0,
|
|
2221
|
+
modelValue: d.fields.tags,
|
|
2222
|
+
"onUpdate:modelValue": o[85] || (o[85] = (r) => d.fields.tags = r),
|
|
2223
|
+
modelModifiers: { trim: !0 },
|
|
2224
|
+
autocomplete: "off",
|
|
2225
|
+
"data-testid": "vault-form-tags",
|
|
2226
|
+
help: e(i)("form.fields.tags.help"),
|
|
2227
|
+
label: e(i)("form.fields.tags.label"),
|
|
2228
|
+
placeholder: e(i)("form.fields.tags.placeholder"),
|
|
2229
|
+
readonly: d.isReadonly,
|
|
2230
|
+
type: "text"
|
|
2231
|
+
}, null, 8, ["modelValue", "help", "label", "placeholder", "readonly"])),
|
|
2232
|
+
V.value ? ot(c.$slots, "labels", {
|
|
2233
|
+
disabled: d.isReadonly,
|
|
2234
|
+
labelList: d.fields.labelList,
|
|
2235
|
+
updateLabelList: B
|
|
2236
|
+
}, void 0, !0, 1) : M("", !0)
|
|
2237
|
+
]),
|
|
2238
|
+
_: 3
|
|
2239
|
+
}, 8, ["description", "title"])
|
|
2240
|
+
]),
|
|
2241
|
+
_: 3
|
|
2242
|
+
}, 8, ["can-submit", "config", "edit-id", "entity-type", "error-message", "fetch-url", "form-fields", "is-readonly", "tabs-to-hide"])
|
|
2243
|
+
]);
|
|
2244
|
+
};
|
|
2245
|
+
}
|
|
2246
|
+
}), fl = /* @__PURE__ */ we(Ta, [["__scopeId", "data-v-3ef5e790"]]), Ma = { class: "kong-ui-vault-entity-config-card" }, lt = "************", pl = /* @__PURE__ */ be({
|
|
2247
|
+
__name: "VaultConfigCard",
|
|
2248
|
+
props: {
|
|
2249
|
+
/** The base konnect or kongManger config. Pass additional config props in the shared entity component as needed. */
|
|
2250
|
+
config: {
|
|
2251
|
+
type: Object,
|
|
2252
|
+
required: !0,
|
|
2253
|
+
validator: (l) => !(!l || !["konnect", "kongManager"].includes(l?.app) || l.app === "konnect" && l.apiType !== "aiGateway" && !l.controlPlaneId || l.app === "kongManager" && typeof l.workspace != "string" || l.apiType === "aiGateway" && !l.aiGatewayId || !l.entityId)
|
|
2254
|
+
},
|
|
2255
|
+
/**
|
|
2256
|
+
* External link for documentation that determines visibility of Documentation button
|
|
2257
|
+
*/
|
|
2258
|
+
configCardDoc: {
|
|
2259
|
+
type: String,
|
|
2260
|
+
default: "",
|
|
2261
|
+
required: !1
|
|
2262
|
+
},
|
|
2263
|
+
/**
|
|
2264
|
+
* Control visibility of card title content
|
|
2265
|
+
*/
|
|
2266
|
+
hideTitle: {
|
|
2267
|
+
type: Boolean,
|
|
2268
|
+
default: !1
|
|
2269
|
+
}
|
|
2270
|
+
},
|
|
2271
|
+
emits: ["loading", "fetch:error", "fetch:success"],
|
|
2272
|
+
setup(l) {
|
|
2273
|
+
const y = l, n = ["token", "approle_secret_id", "api_key", "aws_access_key_id", "aws_secret_access_key", "aws_auth_nonce", "cert_auth_cert_key", "oauth2_client_secret"], s = b(() => y.config.apiType === "aiGateway"), f = b(() => (s.value ? se.form.aiGateway?.edit : se.form[y.config?.app]?.edit)?.replace(/{aiGatewayId}/gi, y.config.aiGatewayId || "")), i = (I) => s.value ? $e(I) : I, { i18n: { t: P } } = Re.useI18n(), { convertKeyToTitle: U } = Gt(), { getPropValue: h } = $t(), V = b(() => ({
|
|
2274
|
+
id: {},
|
|
2275
|
+
name: {
|
|
2276
|
+
label: P(s.value ? "labels.vault_type_ai_gateway" : "labels.vault_type")
|
|
2277
|
+
},
|
|
2278
|
+
updated_at: {},
|
|
2279
|
+
created_at: {},
|
|
2280
|
+
prefix: {
|
|
2281
|
+
order: 5,
|
|
2282
|
+
section: et.Basic,
|
|
2283
|
+
label: s.value ? P("labels.vault_name_ai_gateway") : void 0
|
|
2284
|
+
},
|
|
2285
|
+
description: {
|
|
2286
|
+
order: 6,
|
|
2287
|
+
section: et.Basic
|
|
2288
|
+
},
|
|
2289
|
+
...s.value ? {} : {
|
|
2290
|
+
tags: {
|
|
2291
|
+
order: 7
|
|
2292
|
+
}
|
|
2293
|
+
},
|
|
2294
|
+
config: {
|
|
2295
|
+
order: 8,
|
|
2296
|
+
type: Pt.Json
|
|
2297
|
+
}
|
|
2298
|
+
})), A = (I) => {
|
|
2299
|
+
const d = { ...I.config };
|
|
2300
|
+
n.forEach((p) => {
|
|
2301
|
+
p in d && (d[p] = lt);
|
|
2302
|
+
});
|
|
2303
|
+
const H = { ...I, config: d };
|
|
2304
|
+
if (s.value) {
|
|
2305
|
+
const p = { ...H, type: H.name, name: H.prefix };
|
|
2306
|
+
return delete p.prefix, p;
|
|
2307
|
+
}
|
|
2308
|
+
return H;
|
|
2309
|
+
}, R = (I) => V.value?.[I]?.label || U(I);
|
|
2310
|
+
return (I, d) => (_(), G("div", Ma, [
|
|
2311
|
+
u(e(Ot), {
|
|
2312
|
+
"code-block-record-formatter": A,
|
|
2313
|
+
config: l.config,
|
|
2314
|
+
"config-card-doc": l.configCardDoc,
|
|
2315
|
+
"config-schema": V.value,
|
|
2316
|
+
"entity-type": e(Ze).Vault,
|
|
2317
|
+
"fetch-url": f.value,
|
|
2318
|
+
"formats-to-hide": l.config.apiType === "aiGateway" ? ["terraform", "deck"] : [],
|
|
2319
|
+
"hide-title": l.hideTitle,
|
|
2320
|
+
"record-resolver": i,
|
|
2321
|
+
"onFetch:error": d[0] || (d[0] = (H) => I.$emit("fetch:error", H)),
|
|
2322
|
+
"onFetch:success": d[1] || (d[1] = (H) => I.$emit("fetch:success", H)),
|
|
2323
|
+
onLoading: d[2] || (d[2] = (H) => I.$emit("loading", H))
|
|
2324
|
+
}, {
|
|
2325
|
+
config: g(({ rowValue: H }) => [
|
|
2326
|
+
(_(!0), G(it, null, bt(Object.keys(H).sort(), (p) => (_(), S(e(Ft), {
|
|
2327
|
+
key: p,
|
|
2328
|
+
item: {
|
|
2329
|
+
key: p,
|
|
2330
|
+
value: n.includes(p) ? lt : e(h)(p, H),
|
|
2331
|
+
label: R(p)
|
|
2332
|
+
}
|
|
2333
|
+
}, null, 8, ["item"]))), 128))
|
|
2334
|
+
]),
|
|
2335
|
+
_: 1
|
|
2336
|
+
}, 8, ["config", "config-card-doc", "config-schema", "entity-type", "fetch-url", "formats-to-hide", "hide-title"])
|
|
2337
|
+
]));
|
|
2338
|
+
}
|
|
2339
|
+
}), Ga = "/v2/control-planes/{controlPlaneId}/core-entities/{workspace}", je = "/v2/control-planes/{controlPlaneId}/{workspace}/config-stores", Fe = "/v1/ai-gateways/{aiGatewayId}", re = {
|
|
2340
|
+
getVault: {
|
|
2341
|
+
konnect: `${Ga}/vaults/{id}`,
|
|
2342
|
+
aiGateway: `${Fe}/vaults/{id}`
|
|
2343
|
+
},
|
|
2344
|
+
list: {
|
|
2345
|
+
konnect: `${je}/{id}/secrets`,
|
|
2346
|
+
aiGateway: `${Fe}/config-stores/{id}/secrets`
|
|
2347
|
+
},
|
|
2348
|
+
form: {
|
|
2349
|
+
konnect: {
|
|
2350
|
+
create: `${je}/{id}/secrets`,
|
|
2351
|
+
edit: `${je}/{id}/secrets/{secretId}`
|
|
2352
|
+
},
|
|
2353
|
+
aiGateway: {
|
|
2354
|
+
create: `${Fe}/config-stores/{id}/secrets`,
|
|
2355
|
+
edit: `${Fe}/config-stores/{id}/secrets/{secretId}`
|
|
2356
|
+
}
|
|
2357
|
+
}
|
|
2358
|
+
}, $a = { class: "table-content-overflow-wrapper" }, Pa = /* @__PURE__ */ be({
|
|
2359
|
+
inheritAttrs: !1,
|
|
2360
|
+
__name: "SecretListInner",
|
|
2361
|
+
props: {
|
|
2362
|
+
/** The base konnect config. Pass additional config props in the shared entity component as needed. */
|
|
2363
|
+
config: {
|
|
2364
|
+
type: Object,
|
|
2365
|
+
required: !0,
|
|
2366
|
+
validator: (l) => !(!l || l?.app !== "konnect" || !l.createRoute || !l.getEditRoute || l.apiType === "aiGateway" && !l.aiGatewayId)
|
|
2367
|
+
},
|
|
2368
|
+
// The config store id for the secrets
|
|
2369
|
+
configStoreId: {
|
|
2370
|
+
type: String,
|
|
2371
|
+
required: !0
|
|
2372
|
+
},
|
|
2373
|
+
// used to override the default identifier for the cache entry
|
|
2374
|
+
cacheIdentifier: {
|
|
2375
|
+
type: String,
|
|
2376
|
+
default: ""
|
|
2377
|
+
},
|
|
2378
|
+
/** A synchronous or asynchronous function, that returns a boolean, that evaluates if the user can create a new entity */
|
|
2379
|
+
canCreate: {
|
|
2380
|
+
type: Function,
|
|
2381
|
+
required: !1,
|
|
2382
|
+
default: async () => !0
|
|
2383
|
+
},
|
|
2384
|
+
/** A synchronous or asynchronous function, that returns a boolean, that evaluates if the user can delete a given entity */
|
|
2385
|
+
canDelete: {
|
|
2386
|
+
type: Function,
|
|
2387
|
+
required: !1,
|
|
2388
|
+
default: async () => !0
|
|
2389
|
+
},
|
|
2390
|
+
/** A synchronous or asynchronous function, that returns a boolean, that evaluates if the user can edit a given entity */
|
|
2391
|
+
canEdit: {
|
|
2392
|
+
type: Function,
|
|
2393
|
+
required: !1,
|
|
2394
|
+
default: async () => !0
|
|
2395
|
+
}
|
|
2396
|
+
},
|
|
2397
|
+
emits: ["error", "delete:success"],
|
|
2398
|
+
setup(l, { emit: y }) {
|
|
2399
|
+
const n = y, s = l, { i18n: { t: f, formatUnixTimeStamp: i } } = Re.useI18n(), { axiosInstance: P } = Se(s.config?.axiosRequestConfig), h = {
|
|
2400
|
+
// the Secret Key column is non-hidable
|
|
2401
|
+
key: { label: f("secrets.list.table_headers.key"), sortable: !1, hidable: !1 },
|
|
2402
|
+
updated_at: { label: f("secrets.list.table_headers.updated_at"), sortable: !1 }
|
|
2403
|
+
}, V = (W) => ({
|
|
2404
|
+
"data-testid": W.key
|
|
2405
|
+
}), A = b(() => s.config.apiType === "aiGateway" ? re.list.aiGateway : re.list[s.config.app]), R = b(() => `${s.config.apiBaseUrl}${A.value}`.replace(/{aiGatewayId}/gi, s.config.aiGatewayId || "").replace(/{controlPlaneId}/gi, s.config?.controlPlaneId || "").replace(/\/{workspace}/gi, s.config?.workspace ? `/${s.config.workspace}` : "").replace(/{id}/gi, s.configStoreId || "")), I = N(""), d = {
|
|
2406
|
+
isExactMatch: !0,
|
|
2407
|
+
placeholder: f("search.placeholder_for_secrets.konnect")
|
|
2408
|
+
}, {
|
|
2409
|
+
fetcher: H,
|
|
2410
|
+
fetcherState: p,
|
|
2411
|
+
fetcherCacheKey: Z
|
|
2412
|
+
} = nt(b(() => ({ ...s.config, cacheIdentifier: s.cacheIdentifier })), R), le = () => {
|
|
2413
|
+
I.value = "";
|
|
2414
|
+
}, z = N(null), ee = (W) => ({
|
|
2415
|
+
label: f("actions.edit"),
|
|
2416
|
+
to: s.config.getEditRoute(W)
|
|
2417
|
+
}), B = N(void 0), L = N(!1), ie = N(!1), w = N(""), a = st(s.config, R.value), de = (W) => {
|
|
2418
|
+
B.value = W, L.value = !0;
|
|
2419
|
+
}, _e = () => {
|
|
2420
|
+
L.value = !1;
|
|
2421
|
+
}, te = async () => {
|
|
2422
|
+
if (B.value?.key) {
|
|
2423
|
+
ie.value = !0;
|
|
2424
|
+
try {
|
|
2425
|
+
await P.delete(a(B.value.key)), ie.value = !1, L.value = !1, Z.value++, n("delete:success", B.value);
|
|
2426
|
+
} catch (W) {
|
|
2427
|
+
w.value = W.response?.data?.message || W.message || f("errors.delete"), n("error", W);
|
|
2428
|
+
} finally {
|
|
2429
|
+
ie.value = !1;
|
|
2430
|
+
}
|
|
2431
|
+
}
|
|
2432
|
+
};
|
|
2433
|
+
Ge(p, (W) => {
|
|
2434
|
+
if (W.status === dt.Error) {
|
|
2435
|
+
z.value = {
|
|
2436
|
+
title: f("errors.general")
|
|
2437
|
+
}, W.error?.response?.data?.message && (z.value.message = W.error.response.data.message), n("error", W.error);
|
|
2438
|
+
return;
|
|
2439
|
+
}
|
|
2440
|
+
z.value = null;
|
|
2441
|
+
});
|
|
2442
|
+
const ue = N({
|
|
2443
|
+
ctaPath: s.config.createRoute,
|
|
2444
|
+
ctaText: void 0,
|
|
2445
|
+
message: `${f("secrets.list.empty_state.description")}${s.config.additionMessageForEmptyState ? ` ${s.config.additionMessageForEmptyState}` : ""}`,
|
|
2446
|
+
title: f("secrets.title")
|
|
2447
|
+
});
|
|
2448
|
+
return Ne(async () => {
|
|
2449
|
+
await s.canCreate() && (ue.value.title = f("secrets.list.empty_state.title"), ue.value.ctaText = f("secrets.list.toolbar_actions.new_secret"));
|
|
2450
|
+
}), (W, J) => {
|
|
2451
|
+
const Q = q("KButton"), ve = q("KDropdownItem");
|
|
2452
|
+
return _(), G(it, null, [
|
|
2453
|
+
u(e(ut), {
|
|
2454
|
+
"cache-identifier": l.cacheIdentifier,
|
|
2455
|
+
"disable-sorting": "",
|
|
2456
|
+
"empty-state-options": ue.value,
|
|
2457
|
+
"enable-entity-actions": "",
|
|
2458
|
+
"error-message": z.value,
|
|
2459
|
+
fetcher: e(H),
|
|
2460
|
+
"fetcher-cache-key": e(Z),
|
|
2461
|
+
"pagination-type": "offset",
|
|
2462
|
+
"preferences-storage-key": "kong-ui-entities-secrets-list",
|
|
2463
|
+
query: I.value,
|
|
2464
|
+
"row-attributes": V,
|
|
2465
|
+
"table-headers": e(h),
|
|
2466
|
+
onClearSearchInput: le
|
|
2467
|
+
}, {
|
|
2468
|
+
"toolbar-filter": g(() => [
|
|
2469
|
+
u(e(ct), {
|
|
2470
|
+
modelValue: I.value,
|
|
2471
|
+
"onUpdate:modelValue": J[0] || (J[0] = (K) => I.value = K),
|
|
2472
|
+
config: d
|
|
2473
|
+
}, null, 8, ["modelValue"])
|
|
2474
|
+
]),
|
|
2475
|
+
"toolbar-button": g(() => [
|
|
2476
|
+
u(e(Ae), {
|
|
2477
|
+
"auth-function": () => l.canCreate()
|
|
2478
|
+
}, {
|
|
2479
|
+
default: g(() => [
|
|
2480
|
+
u(Q, {
|
|
2481
|
+
appearance: "primary",
|
|
2482
|
+
"data-testid": "toolbar-add-secret",
|
|
2483
|
+
size: "large",
|
|
2484
|
+
to: l.config.createRoute
|
|
2485
|
+
}, {
|
|
2486
|
+
default: g(() => [
|
|
2487
|
+
u(e(qe)),
|
|
2488
|
+
pe(" " + $(e(f)("secrets.list.toolbar_actions.new_secret")), 1)
|
|
2489
|
+
]),
|
|
2490
|
+
_: 1
|
|
2491
|
+
}, 8, ["to"])
|
|
2492
|
+
]),
|
|
2493
|
+
_: 1
|
|
2494
|
+
}, 8, ["auth-function"])
|
|
2495
|
+
]),
|
|
2496
|
+
key: g(({ rowValue: K }) => [
|
|
2497
|
+
x("div", $a, [
|
|
2498
|
+
x("b", null, $(K ?? "-"), 1)
|
|
2499
|
+
])
|
|
2500
|
+
]),
|
|
2501
|
+
updated_at: g(({ rowValue: K }) => [
|
|
2502
|
+
x("span", null, $(K ? e(i)(new Date(K).getTime() / 1e3) : "-"), 1)
|
|
2503
|
+
]),
|
|
2504
|
+
actions: g(({ row: K }) => [
|
|
2505
|
+
u(e(Ae), {
|
|
2506
|
+
"auth-function": () => l.canEdit(K)
|
|
2507
|
+
}, {
|
|
2508
|
+
default: g(() => [
|
|
2509
|
+
u(ve, {
|
|
2510
|
+
"data-testid": "action-entity-edit",
|
|
2511
|
+
item: ee(K.key)
|
|
2512
|
+
}, null, 8, ["item"])
|
|
2513
|
+
]),
|
|
2514
|
+
_: 2
|
|
2515
|
+
}, 1032, ["auth-function"]),
|
|
2516
|
+
u(e(Ae), {
|
|
2517
|
+
"auth-function": () => l.canDelete(K)
|
|
2518
|
+
}, {
|
|
2519
|
+
default: g(() => [
|
|
2520
|
+
u(ve, {
|
|
2521
|
+
danger: "",
|
|
2522
|
+
"data-testid": "action-entity-delete",
|
|
2523
|
+
"has-divider": "",
|
|
2524
|
+
onClick: (ge) => de(K)
|
|
2525
|
+
}, {
|
|
2526
|
+
default: g(() => [
|
|
2527
|
+
pe($(e(f)("actions.delete")), 1)
|
|
2528
|
+
]),
|
|
2529
|
+
_: 1
|
|
2530
|
+
}, 8, ["onClick"])
|
|
2531
|
+
]),
|
|
2532
|
+
_: 2
|
|
2533
|
+
}, 1032, ["auth-function"])
|
|
2534
|
+
]),
|
|
2535
|
+
_: 1
|
|
2536
|
+
}, 8, ["cache-identifier", "empty-state-options", "error-message", "fetcher", "fetcher-cache-key", "query", "table-headers"]),
|
|
2537
|
+
u(e(ft), {
|
|
2538
|
+
"action-pending": ie.value,
|
|
2539
|
+
description: e(f)("delete.description"),
|
|
2540
|
+
"entity-name": B.value && B.value.key,
|
|
2541
|
+
"entity-type": e(pt).Secret,
|
|
2542
|
+
error: w.value,
|
|
2543
|
+
title: e(f)("delete.title_for_secret"),
|
|
2544
|
+
visible: L.value,
|
|
2545
|
+
onCancel: _e,
|
|
2546
|
+
onProceed: te
|
|
2547
|
+
}, null, 8, ["action-pending", "description", "entity-name", "entity-type", "error", "title", "visible"])
|
|
2548
|
+
], 64);
|
|
2549
|
+
};
|
|
2550
|
+
}
|
|
2551
|
+
}), Oa = /* @__PURE__ */ we(Pa, [["__scopeId", "data-v-115ca40d"]]), Fa = { class: "kong-ui-entities-secrets-list" }, Na = /* @__PURE__ */ be({
|
|
2552
|
+
__name: "SecretList",
|
|
2553
|
+
props: {
|
|
2554
|
+
/** The base konnect config. Pass additional config props in the shared entity component as needed. */
|
|
2555
|
+
config: {
|
|
2556
|
+
type: Object,
|
|
2557
|
+
required: !0,
|
|
2558
|
+
validator: (l) => !(!l || l?.app !== "konnect" || !l.createRoute || !l.getEditRoute || l.apiType === "aiGateway" && !l.aiGatewayId)
|
|
2559
|
+
},
|
|
2560
|
+
// The vault id for the secrets
|
|
2561
|
+
vaultId: {
|
|
2562
|
+
type: String,
|
|
2563
|
+
required: !0
|
|
2564
|
+
},
|
|
2565
|
+
// used to override the default identifier for the cache entry
|
|
2566
|
+
cacheIdentifier: {
|
|
2567
|
+
type: String,
|
|
2568
|
+
default: ""
|
|
2569
|
+
},
|
|
2570
|
+
/** A synchronous or asynchronous function, that returns a boolean, that evaluates if the user can create a new entity */
|
|
2571
|
+
canCreate: {
|
|
2572
|
+
type: Function,
|
|
2573
|
+
required: !1,
|
|
2574
|
+
default: async () => !0
|
|
2575
|
+
},
|
|
2576
|
+
/** A synchronous or asynchronous function, that returns a boolean, that evaluates if the user can delete a given entity */
|
|
2577
|
+
canDelete: {
|
|
2578
|
+
type: Function,
|
|
2579
|
+
required: !1,
|
|
2580
|
+
default: async () => !0
|
|
2581
|
+
},
|
|
2582
|
+
/** A synchronous or asynchronous function, that returns a boolean, that evaluates if the user can edit a given entity */
|
|
2583
|
+
canEdit: {
|
|
2584
|
+
type: Function,
|
|
2585
|
+
required: !1,
|
|
2586
|
+
default: async () => !0
|
|
2587
|
+
}
|
|
2588
|
+
},
|
|
2589
|
+
emits: ["error", "delete:success"],
|
|
2590
|
+
setup(l, { emit: y }) {
|
|
2591
|
+
const n = y, s = l, f = (A) => {
|
|
2592
|
+
n("error", A);
|
|
2593
|
+
}, i = (A) => {
|
|
2594
|
+
n("delete:success", A);
|
|
2595
|
+
}, { axiosInstance: P } = Se(s.config?.axiosRequestConfig), U = N(""), h = b(() => s.config.apiType === "aiGateway" ? re.getVault.aiGateway : re.getVault[s.config.app]), V = b(() => `${s.config.apiBaseUrl}${h.value}`.replace(/{aiGatewayId}/gi, s.config.aiGatewayId || "").replace(/{controlPlaneId}/gi, s.config?.controlPlaneId || "").replace(/\/{workspace}/gi, s.config?.workspace ? `/${s.config.workspace}` : "").replace(/{id}/gi, s.vaultId));
|
|
2596
|
+
return Ne(async () => {
|
|
2597
|
+
try {
|
|
2598
|
+
const { data: A } = await P.get(V.value);
|
|
2599
|
+
U.value = A?.config?.config_store_id;
|
|
2600
|
+
} catch (A) {
|
|
2601
|
+
n("error", A);
|
|
2602
|
+
}
|
|
2603
|
+
}), (A, R) => (_(), G("div", Fa, [
|
|
2604
|
+
U.value ? (_(), S(Oa, rt({ key: 0 }, s, {
|
|
2605
|
+
"config-store-id": U.value,
|
|
2606
|
+
"onDelete:success": i,
|
|
2607
|
+
onError: f
|
|
2608
|
+
}), null, 16, ["config-store-id"])) : M("", !0)
|
|
2609
|
+
]));
|
|
2610
|
+
}
|
|
2611
|
+
}), ml = /* @__PURE__ */ we(Na, [["__scopeId", "data-v-e9c157a0"]]), Ka = /* @__PURE__ */ be({
|
|
2612
|
+
inheritAttrs: !1,
|
|
2613
|
+
__name: "SecretFormInner",
|
|
2614
|
+
props: {
|
|
2615
|
+
/** The base konnect or kongManger config. Pass additional config props in the shared entity component as needed. */
|
|
2616
|
+
config: {
|
|
2617
|
+
type: Object,
|
|
2618
|
+
required: !0,
|
|
2619
|
+
validator: (l) => !(!l || l.app !== "konnect" || l.apiType !== "aiGateway" && !l.controlPlaneId || !l.cancelRoute || l.apiType === "aiGateway" && !l.aiGatewayId)
|
|
2620
|
+
},
|
|
2621
|
+
/** Current config store ID */
|
|
2622
|
+
configStoreId: {
|
|
2623
|
+
type: String,
|
|
2624
|
+
required: !0
|
|
2625
|
+
},
|
|
2626
|
+
/** If a valid secretId is provided, it will put the form in Edit mode instead of Create */
|
|
2627
|
+
secretId: {
|
|
2628
|
+
type: String,
|
|
2629
|
+
required: !1,
|
|
2630
|
+
default: ""
|
|
2631
|
+
}
|
|
2632
|
+
},
|
|
2633
|
+
emits: ["update", "error", "loading"],
|
|
2634
|
+
setup(l, { emit: y }) {
|
|
2635
|
+
const n = l, s = y, { i18n: { t: f } } = Re.useI18n(), i = De(), { axiosInstance: P } = Se(n.config?.axiosRequestConfig), { getMessageFromError: U } = mt(), h = Te({
|
|
2636
|
+
fields: {
|
|
2637
|
+
key: "",
|
|
2638
|
+
value: ""
|
|
2639
|
+
},
|
|
2640
|
+
readonly: !1,
|
|
2641
|
+
errorMessage: ""
|
|
2642
|
+
}), V = Te({
|
|
2643
|
+
key: "",
|
|
2644
|
+
value: ""
|
|
2645
|
+
}), A = b(() => n.config.apiType === "aiGateway" ? re.form.aiGateway : re.form[n.config.app]), R = b(
|
|
2646
|
+
() => A.value?.edit.replace(/{aiGatewayId}/gi, n.config.aiGatewayId || "").replace(/{id}/gi, n.configStoreId).replace(/{secretId}/gi, n.secretId)
|
|
2647
|
+
), I = () => {
|
|
2648
|
+
i.push(n.config?.cancelRoute || { name: "secret-list" });
|
|
2649
|
+
}, d = (w) => {
|
|
2650
|
+
s("loading", w);
|
|
2651
|
+
}, H = (w) => {
|
|
2652
|
+
s("error", w);
|
|
2653
|
+
}, p = (w) => {
|
|
2654
|
+
h.fields.key = w?.item?.key || w?.key || "", h.fields.value = w?.item?.value || w?.value || "", Object.assign(V, h.fields);
|
|
2655
|
+
}, Z = b(() => n.secretId ? me.Edit : me.Create), le = b(() => Z.value === me.Edit ? "edit" : "create"), z = b(() => `${n.config.apiBaseUrl}${A.value[Z.value]}`.replace(/{aiGatewayId}/gi, n.config.aiGatewayId || "").replace(/{controlPlaneId}/gi, n.config?.controlPlaneId || "").replace(/\/{workspace}/gi, n.config?.workspace ? `/${n.config.workspace}` : "").replace(/{id}/gi, n.configStoreId).replace(/{secretId}/gi, n.secretId)), ee = b(() => !!h.fields.key && !!h.fields.value), B = b(() => JSON.stringify(h.fields) !== JSON.stringify(V)), L = b(() => ({
|
|
2656
|
+
key: h.fields.key,
|
|
2657
|
+
value: h.fields.value
|
|
2658
|
+
})), ie = async () => {
|
|
2659
|
+
try {
|
|
2660
|
+
h.readonly = !0;
|
|
2661
|
+
let w;
|
|
2662
|
+
if (Z.value === "create")
|
|
2663
|
+
w = await P.post(z.value, L.value);
|
|
2664
|
+
else if (Z.value === "edit") {
|
|
2665
|
+
const a = n.config.apiType === "aiGateway" ? { value: L.value.value } : L.value;
|
|
2666
|
+
w = await P.put(z.value, a);
|
|
2667
|
+
}
|
|
2668
|
+
p(w?.data), s("update", w?.data);
|
|
2669
|
+
} catch (w) {
|
|
2670
|
+
h.errorMessage = U(w), s("error", w);
|
|
2671
|
+
} finally {
|
|
2672
|
+
h.readonly = !1;
|
|
2673
|
+
}
|
|
2674
|
+
};
|
|
2675
|
+
return (w, a) => {
|
|
2676
|
+
const de = q("KInput"), _e = q("KAlert");
|
|
2677
|
+
return _(), S(e(_t), {
|
|
2678
|
+
"can-submit": ee.value && B.value,
|
|
2679
|
+
config: l.config,
|
|
2680
|
+
"edit-id": l.secretId,
|
|
2681
|
+
"entity-type": e(Ze).Other,
|
|
2682
|
+
"error-message": h.errorMessage,
|
|
2683
|
+
"fetch-url": R.value,
|
|
2684
|
+
"form-fields": L.value,
|
|
2685
|
+
"is-readonly": h.readonly,
|
|
2686
|
+
onCancel: I,
|
|
2687
|
+
"onFetch:error": H,
|
|
2688
|
+
"onFetch:success": p,
|
|
2689
|
+
onLoading: d,
|
|
2690
|
+
onSubmit: ie
|
|
2691
|
+
}, {
|
|
2692
|
+
default: g(() => [
|
|
2693
|
+
x("div", null, [
|
|
2694
|
+
u(e(ze), {
|
|
2695
|
+
description: e(f)("secrets.form.info.description"),
|
|
2696
|
+
"has-divider": "",
|
|
2697
|
+
title: e(f)("secrets.form.info.title")
|
|
2698
|
+
}, {
|
|
2699
|
+
default: g(() => [
|
|
2700
|
+
u(de, {
|
|
2701
|
+
modelValue: h.fields.key,
|
|
2702
|
+
"onUpdate:modelValue": a[0] || (a[0] = (te) => h.fields.key = te),
|
|
2703
|
+
modelModifiers: { trim: !0 },
|
|
2704
|
+
autocomplete: "off",
|
|
2705
|
+
class: "key-field",
|
|
2706
|
+
"data-testid": "secret-form-key",
|
|
2707
|
+
disabled: Z.value === e(me).Edit,
|
|
2708
|
+
label: e(f)("secrets.form.fields.key.label"),
|
|
2709
|
+
placeholder: e(f)("secrets.form.fields.key.placeholder"),
|
|
2710
|
+
readonly: h.readonly,
|
|
2711
|
+
required: "",
|
|
2712
|
+
type: "text"
|
|
2713
|
+
}, null, 8, ["modelValue", "disabled", "label", "placeholder", "readonly"]),
|
|
2714
|
+
u(e(He), {
|
|
2715
|
+
modelValue: h.fields.value,
|
|
2716
|
+
"onUpdate:modelValue": a[1] || (a[1] = (te) => h.fields.value = te),
|
|
2717
|
+
modelModifiers: { trim: !0 },
|
|
2718
|
+
"data-testid": "secret-form-value",
|
|
2719
|
+
label: e(f)("secrets.form.fields.value.label"),
|
|
2720
|
+
labels: { rotateLabel: e(f)("secrets.form.fields.value.rotateLabel") },
|
|
2721
|
+
mode: le.value,
|
|
2722
|
+
multiline: "",
|
|
2723
|
+
placeholder: e(f)("secrets.form.fields.value.placeholder"),
|
|
2724
|
+
readonly: h.readonly,
|
|
2725
|
+
required: ""
|
|
2726
|
+
}, null, 8, ["modelValue", "label", "labels", "mode", "placeholder", "readonly"]),
|
|
2727
|
+
u(_e, {
|
|
2728
|
+
appearance: "warning",
|
|
2729
|
+
message: e(f)("secrets.form.hint")
|
|
2730
|
+
}, null, 8, ["message"])
|
|
2731
|
+
]),
|
|
2732
|
+
_: 1
|
|
2733
|
+
}, 8, ["description", "title"])
|
|
2734
|
+
])
|
|
2735
|
+
]),
|
|
2736
|
+
_: 1
|
|
2737
|
+
}, 8, ["can-submit", "config", "edit-id", "entity-type", "error-message", "fetch-url", "form-fields", "is-readonly"]);
|
|
2738
|
+
};
|
|
2739
|
+
}
|
|
2740
|
+
}), Wa = /* @__PURE__ */ we(Ka, [["__scopeId", "data-v-6ff371de"]]), ja = { class: "kong-ui-entities-secret-form" }, qa = /* @__PURE__ */ be({
|
|
2741
|
+
__name: "SecretForm",
|
|
2742
|
+
props: {
|
|
2743
|
+
/** The base konnect or kongManger config. Pass additional config props in the shared entity component as needed. */
|
|
2744
|
+
config: {
|
|
2745
|
+
type: Object,
|
|
2746
|
+
required: !0,
|
|
2747
|
+
validator: (l) => !(!l || l.app !== "konnect" || l.apiType !== "aiGateway" && !l.controlPlaneId || !l.cancelRoute || l.apiType === "aiGateway" && !l.aiGatewayId)
|
|
2748
|
+
},
|
|
2749
|
+
/** Current vault ID */
|
|
2750
|
+
vaultId: {
|
|
2751
|
+
type: String,
|
|
2752
|
+
required: !0
|
|
2753
|
+
},
|
|
2754
|
+
/** If a valid secretId is provided, it will put the form in Edit mode instead of Create */
|
|
2755
|
+
secretId: {
|
|
2756
|
+
type: String,
|
|
2757
|
+
required: !1,
|
|
2758
|
+
default: ""
|
|
2759
|
+
}
|
|
2760
|
+
},
|
|
2761
|
+
emits: ["update", "error", "loading"],
|
|
2762
|
+
setup(l, { emit: y }) {
|
|
2763
|
+
const n = l, s = y, f = (R) => {
|
|
2764
|
+
s("update", R);
|
|
2765
|
+
}, i = (R) => {
|
|
2766
|
+
s("error", R);
|
|
2767
|
+
}, P = (R) => {
|
|
2768
|
+
s("loading", R);
|
|
2769
|
+
}, { axiosInstance: U } = Se(n.config?.axiosRequestConfig), h = N(""), V = b(() => n.config.apiType === "aiGateway" ? re.getVault.aiGateway : re.getVault[n.config.app]), A = b(() => `${n.config.apiBaseUrl}${V.value}`.replace(/{aiGatewayId}/gi, n.config.aiGatewayId || "").replace(/{controlPlaneId}/gi, n.config?.controlPlaneId || "").replace(/\/{workspace}/gi, n.config?.workspace ? `/${n.config.workspace}` : "").replace(/{id}/gi, n.vaultId));
|
|
2770
|
+
return Ne(async () => {
|
|
2771
|
+
try {
|
|
2772
|
+
const { data: R } = await U.get(A.value);
|
|
2773
|
+
h.value = R?.config?.config_store_id;
|
|
2774
|
+
} catch (R) {
|
|
2775
|
+
s("error", R);
|
|
2776
|
+
}
|
|
2777
|
+
}), (R, I) => (_(), G("div", ja, [
|
|
2778
|
+
h.value ? (_(), S(Wa, rt({ key: 0 }, n, {
|
|
2779
|
+
"config-store-id": h.value,
|
|
2780
|
+
onError: i,
|
|
2781
|
+
onLoading: P,
|
|
2782
|
+
onUpdate: f
|
|
2783
|
+
}), null, 16, ["config-store-id"])) : M("", !0)
|
|
2784
|
+
]));
|
|
2785
|
+
}
|
|
2786
|
+
}), _l = /* @__PURE__ */ we(qa, [["__scopeId", "data-v-1651a0c6"]]), za = {
|
|
2787
|
+
class: "vault-secret-picker-provider"
|
|
2788
|
+
}, La = /* @__PURE__ */ be({
|
|
2789
|
+
__name: "VaultSecretPickerProvider",
|
|
2790
|
+
props: {
|
|
2791
|
+
value: {},
|
|
2792
|
+
disabled: {
|
|
2793
|
+
type: Boolean
|
|
2794
|
+
},
|
|
2795
|
+
update: {
|
|
2796
|
+
type: Function
|
|
2797
|
+
}
|
|
2798
|
+
},
|
|
2799
|
+
emits: ["open"],
|
|
2800
|
+
setup(l, {
|
|
2801
|
+
emit: y
|
|
2802
|
+
}) {
|
|
2803
|
+
const n = l, s = y, {
|
|
2804
|
+
i18n: {
|
|
2805
|
+
t: f
|
|
2806
|
+
},
|
|
2807
|
+
i18nT: i
|
|
2808
|
+
} = Re.useI18n();
|
|
2809
|
+
return (P, U) => (_(), G("div", za, [u(e(i), {
|
|
2810
|
+
keypath: "vault_secret_picker.provider.complete_action",
|
|
2811
|
+
scope: "global"
|
|
2812
|
+
}, {
|
|
2813
|
+
cta: g(() => [x("span", {
|
|
2814
|
+
class: ht({
|
|
2815
|
+
"vault-secret-picker-provider-action": !0,
|
|
2816
|
+
disabled: n.disabled
|
|
2817
|
+
}),
|
|
2818
|
+
onClick: U[0] || (U[0] = () => !n.disabled && s("open", n.value, n.update))
|
|
2819
|
+
}, $(e(f)("vault_secret_picker.provider.cta")), 3)]),
|
|
2820
|
+
_: 1
|
|
2821
|
+
})]));
|
|
2822
|
+
}
|
|
2823
|
+
}), vl = /* @__PURE__ */ we(La, [["__scopeId", "data-v-fdd70514"]]), Da = (l) => {
|
|
2824
|
+
let y = l.trim();
|
|
2825
|
+
if (!y.startsWith("{") || !y.endsWith("}"))
|
|
2826
|
+
throw new Error("Invalid secret reference: must be enclosed in curly braces");
|
|
2827
|
+
if (y = y.substring(1, y.length - 1).trim(), !y.startsWith("vault://"))
|
|
2828
|
+
throw new Error("Invalid secret reference: must start with vault://");
|
|
2829
|
+
const n = new URL(`http://${y.substring(8)}`);
|
|
2830
|
+
if (!n)
|
|
2831
|
+
throw new Error("Invalid secret reference: must have a vault prefix");
|
|
2832
|
+
const s = n.host, [, f, ...i] = n.pathname.split("/");
|
|
2833
|
+
if (!s)
|
|
2834
|
+
throw new Error("Invalid secret reference: must have a vault prefix");
|
|
2835
|
+
return {
|
|
2836
|
+
vaultPrefix: s,
|
|
2837
|
+
secretId: f || void 0,
|
|
2838
|
+
// Non-empty string or undefined
|
|
2839
|
+
optionalSecretKey: i?.join("/")
|
|
2840
|
+
// Non-empty string or undefined
|
|
2841
|
+
};
|
|
2842
|
+
}, Za = (l) => {
|
|
2843
|
+
if (!l.vaultPrefix)
|
|
2844
|
+
throw new Error("Invalid secret reference: must have a vault prefix");
|
|
2845
|
+
let y = `vault://${l.vaultPrefix}`;
|
|
2846
|
+
return l.secretId && (y = `${y}/${l.secretId}`), l.optionalSecretKey && (y = `${y}/${l.optionalSecretKey}`), `{${y}}`;
|
|
2847
|
+
}, Ba = {
|
|
2848
|
+
key: 1,
|
|
2849
|
+
class: "inputs-wrapper"
|
|
2850
|
+
}, Ja = { "data-testid": "no-search-results" }, Qa = { class: "k-select-selected-item-label" }, Ya = { class: "vault-secret-picker-vault-dropdown-item" }, Xa = { class: "select-item-label" }, el = { class: "select-item-description" }, tl = { class: "select-item-description" }, al = { "data-testid": "no-search-results" }, ll = /* @__PURE__ */ be({
|
|
2851
|
+
__name: "VaultSecretPicker",
|
|
2852
|
+
props: {
|
|
2853
|
+
config: {
|
|
2854
|
+
type: Object,
|
|
2855
|
+
required: !0,
|
|
2856
|
+
validator: (l) => !(!l || !["konnect", "kongManager"].includes(l?.app) || l.app === "konnect" && l.apiType !== "aiGateway" && !l.controlPlaneId || l.app === "kongManager" && typeof l.workspace != "string" || l.apiType === "aiGateway" && !l.aiGatewayId)
|
|
2857
|
+
},
|
|
2858
|
+
setup: {
|
|
2859
|
+
type: null,
|
|
2860
|
+
required: !1,
|
|
2861
|
+
default: !1
|
|
2862
|
+
},
|
|
2863
|
+
title: {
|
|
2864
|
+
type: String,
|
|
2865
|
+
required: !1,
|
|
2866
|
+
default: void 0
|
|
2867
|
+
},
|
|
2868
|
+
proceedButtonText: {
|
|
2869
|
+
type: String,
|
|
2870
|
+
required: !1,
|
|
2871
|
+
default: void 0
|
|
2872
|
+
},
|
|
2873
|
+
additionalDisabled: {
|
|
2874
|
+
type: Boolean,
|
|
2875
|
+
required: !1,
|
|
2876
|
+
default: !1
|
|
2877
|
+
},
|
|
2878
|
+
allowedProviders: {
|
|
2879
|
+
type: Array,
|
|
2880
|
+
required: !1,
|
|
2881
|
+
default: void 0
|
|
2882
|
+
},
|
|
2883
|
+
showSecretKey: {
|
|
2884
|
+
type: Boolean,
|
|
2885
|
+
required: !1,
|
|
2886
|
+
default: !0
|
|
2887
|
+
}
|
|
2888
|
+
},
|
|
2889
|
+
emits: ["proceed", "cancel"],
|
|
2890
|
+
setup(l, { emit: y }) {
|
|
2891
|
+
const { i18n: { t: n } } = Re.useI18n(), s = l, f = y, { axiosInstance: i } = Se({
|
|
2892
|
+
// 404 errors are allowed in this components
|
|
2893
|
+
validateStatus: (C) => C === 404 || C >= 200 && C < 300,
|
|
2894
|
+
// Spread the passed-in config later to allow overriding
|
|
2895
|
+
...s.config?.axiosRequestConfig
|
|
2896
|
+
}), P = N(!1), U = N(""), h = N(""), V = N(""), A = N(), R = b(() => s.config.apiType === "aiGateway"), I = (C) => C.replace(/{aiGatewayId}/gi, s.config.aiGatewayId || ""), d = b(() => R.value ? I(se.list.aiGateway.getAll) : se.list[s.config.app].getAll), H = b(() => R.value ? I(re.list.aiGateway).replace(/{id}/gi, A.value?.config?.config_store_id ?? "") : s.config.app === "konnect" ? re.list[s.config.app].replace(/{id}/gi, A.value?.config?.config_store_id ?? "") : "<not_applicable>"), p = b(() => {
|
|
2897
|
+
if (z && w)
|
|
2898
|
+
return n("vault_secret_picker.fetch_error.vaults_and_secrets");
|
|
2899
|
+
if (z)
|
|
2900
|
+
return n("vault_secret_picker.fetch_error.vaults");
|
|
2901
|
+
if (w)
|
|
2902
|
+
return n("vault_secret_picker.fetch_error.secrets");
|
|
2903
|
+
}), {
|
|
2904
|
+
debouncedQueryChange: Z,
|
|
2905
|
+
loading: le,
|
|
2906
|
+
error: z,
|
|
2907
|
+
loadItems: ee,
|
|
2908
|
+
results: B
|
|
2909
|
+
} = tt(s.config, d, void 0, {
|
|
2910
|
+
fetchedItemsKey: "data",
|
|
2911
|
+
// AI Gateway vaults carry the identifier in `name`; gateway vaults in `prefix`.
|
|
2912
|
+
searchKeys: R.value ? ["name"] : ["prefix"]
|
|
2913
|
+
}), {
|
|
2914
|
+
debouncedQueryChange: L,
|
|
2915
|
+
loading: ie,
|
|
2916
|
+
error: w,
|
|
2917
|
+
loadItems: a,
|
|
2918
|
+
results: de
|
|
2919
|
+
} = tt(s.config, H, void 0, {
|
|
2920
|
+
fetchedItemsKey: "data",
|
|
2921
|
+
searchKeys: ["key"],
|
|
2922
|
+
exactMatchKey: "key"
|
|
2923
|
+
}), _e = (C) => s.allowedProviders?.length ? s.allowedProviders.includes(C) : C !== t.AZURE_CERTS, te = b(() => R.value ? (B.value ?? []).map((C) => $e(C)) : B.value ?? []), ue = b(() => {
|
|
2924
|
+
let C = !1;
|
|
2925
|
+
const E = (te.value ?? []).filter((O) => _e(O.name)).map((O) => (O.prefix === U.value && (C = !0), { label: O.prefix, value: O.prefix, vault: O }));
|
|
2926
|
+
return !C && A.value && E.push({
|
|
2927
|
+
label: A.value.prefix,
|
|
2928
|
+
value: A.value.prefix,
|
|
2929
|
+
vault: A.value
|
|
2930
|
+
}), E;
|
|
2931
|
+
}), W = b(() => {
|
|
2932
|
+
let C = !1;
|
|
2933
|
+
const E = de.value?.map((O) => (O.key === h.value && (C = !0), { label: O.key, value: O.key })) ?? [];
|
|
2934
|
+
return !C && h.value && E.push({ label: h.value, value: h.value }), E;
|
|
2935
|
+
}), J = b(() => A?.value?.name === "konnect"), Q = b(() => !!A.value && !!h.value && !s.additionalDisabled), ve = (C) => C.label ? `${C.label} - (${C.vault.name} - ${C.vault.id})` : C.value, K = (C) => {
|
|
2936
|
+
const E = R.value ? se.form.aiGateway.edit : se.form[s.config.app].edit;
|
|
2937
|
+
let O = `${s.config.apiBaseUrl}${E}`;
|
|
2938
|
+
return s.config.app === "konnect" && (O = O.replace(/{controlPlaneId}/gi, s.config?.controlPlaneId || "")), I(O).replace(/\/{workspace}/gi, s.config?.workspace ? `/${s.config.workspace}` : "").replace(/{id}/gi, C);
|
|
2939
|
+
}, ge = (C, E) => {
|
|
2940
|
+
if (s.config.app !== "konnect")
|
|
2941
|
+
return "<not_applicable>";
|
|
2942
|
+
const O = R.value ? re.form.aiGateway.edit : re.form[s.config.app].edit;
|
|
2943
|
+
return I(`${s.config.apiBaseUrl}${O}`).replace(/{controlPlaneId}/gi, s.config?.controlPlaneId || "").replace(/\/{workspace}/gi, s.config?.workspace ? `/${s.config.workspace}` : "").replace(/{id}/gi, E).replace(/{secretId}/gi, C);
|
|
2944
|
+
}, ae = () => {
|
|
2945
|
+
f("proceed", Za({
|
|
2946
|
+
vaultPrefix: U.value,
|
|
2947
|
+
secretId: h.value || void 0,
|
|
2948
|
+
// Either a non-empty string or undefined
|
|
2949
|
+
optionalSecretKey: V.value || void 0
|
|
2950
|
+
// Either a non-empty string or undefined
|
|
2951
|
+
}));
|
|
2952
|
+
};
|
|
2953
|
+
return Ge(() => s.setup, async (C) => {
|
|
2954
|
+
if (C !== !1) {
|
|
2955
|
+
if (P.value = !0, U.value = "", A.value = void 0, h.value = "", V.value = "", typeof C == "string" && C.trim().length > 0)
|
|
2956
|
+
try {
|
|
2957
|
+
let E, O = "", ne = "", ce = "";
|
|
2958
|
+
const D = Da(C), { data: F } = await i.get(K(D.vaultPrefix)), ye = F && R.value ? $e(F) : F;
|
|
2959
|
+
if (ye?.name)
|
|
2960
|
+
if (E = ye, O = D.vaultPrefix, E.name === "konnect") {
|
|
2961
|
+
if (D.secretId) {
|
|
2962
|
+
const { data: ke } = await i.get(ge(D.secretId, ye.config.config_store_id));
|
|
2963
|
+
ke.key === D.secretId && (ne = D.secretId, ce = D.optionalSecretKey ?? "");
|
|
2964
|
+
}
|
|
2965
|
+
} else
|
|
2966
|
+
ne = D.secretId ?? "", ce = D.optionalSecretKey ?? "";
|
|
2967
|
+
await Vt(() => {
|
|
2968
|
+
U.value = O, A.value = E, h.value = ne, V.value = ce;
|
|
2969
|
+
});
|
|
2970
|
+
} catch (E) {
|
|
2971
|
+
console.debug(E);
|
|
2972
|
+
}
|
|
2973
|
+
P.value = !1, await ee();
|
|
2974
|
+
}
|
|
2975
|
+
}, { immediate: !0 }), Ge(U, async (C, E) => {
|
|
2976
|
+
P.value || C === E || (A.value = ue.value.find((O) => O.value === C)?.vault, h.value = "", V.value = "");
|
|
2977
|
+
}), Ge(H, async () => {
|
|
2978
|
+
J.value && await a();
|
|
2979
|
+
}, { immediate: !0 }), (C, E) => {
|
|
2980
|
+
const O = q("KEmptyState"), ne = q("KSelect"), ce = q("KInput"), D = q("KModal");
|
|
2981
|
+
return _(), S(D, {
|
|
2982
|
+
"action-button-disabled": !Q.value,
|
|
2983
|
+
"action-button-text": l.proceedButtonText || e(n)("vault_secret_picker.actions.use_key"),
|
|
2984
|
+
class: "vault-secret-picker",
|
|
2985
|
+
"data-testid": "vault-secret-picker-modal",
|
|
2986
|
+
title: l.title || e(n)("vault_secret_picker.title"),
|
|
2987
|
+
visible: s.setup !== !1,
|
|
2988
|
+
onCancel: E[4] || (E[4] = () => f("cancel")),
|
|
2989
|
+
onProceed: ae
|
|
2990
|
+
}, {
|
|
2991
|
+
default: g(() => [
|
|
2992
|
+
e(z) || e(w) ? (_(), S(O, {
|
|
2993
|
+
key: 0,
|
|
2994
|
+
"data-testid": "vault-secret-picker-fetch-error",
|
|
2995
|
+
"icon-variant": "error",
|
|
2996
|
+
message: p.value
|
|
2997
|
+
}, null, 8, ["message"])) : (_(), G("div", Ba, [
|
|
2998
|
+
ot(C.$slots, "form-prefix", {}, void 0, !0),
|
|
2999
|
+
u(ne, {
|
|
3000
|
+
modelValue: U.value,
|
|
3001
|
+
"onUpdate:modelValue": E[0] || (E[0] = (F) => U.value = F),
|
|
3002
|
+
clearable: "",
|
|
3003
|
+
"data-testid": "vault-secret-picker-vault-select",
|
|
3004
|
+
disabled: P.value,
|
|
3005
|
+
"enable-filtering": "",
|
|
3006
|
+
"filter-function": () => !0,
|
|
3007
|
+
items: ue.value,
|
|
3008
|
+
"kpop-attributes": { "data-testid": "vault-secret-picker-vault-popover" },
|
|
3009
|
+
label: e(n)("vault_secret_picker.vault.label"),
|
|
3010
|
+
loading: e(le),
|
|
3011
|
+
placeholder: e(n)("vault_secret_picker.vault.placeholder"),
|
|
3012
|
+
required: "",
|
|
3013
|
+
"reuse-item-template": "",
|
|
3014
|
+
width: "100%",
|
|
3015
|
+
onQueryChange: e(Z)
|
|
3016
|
+
}, {
|
|
3017
|
+
loading: g(() => [
|
|
3018
|
+
x("div", null, $(e(n)("actions.loading")), 1)
|
|
3019
|
+
]),
|
|
3020
|
+
empty: g(() => [
|
|
3021
|
+
x("div", Ja, $(e(n)("vault_secret_picker.no_results")), 1)
|
|
3022
|
+
]),
|
|
3023
|
+
"selected-item-template": g(({ item: F }) => [
|
|
3024
|
+
x("span", Qa, $(ve(F)), 1)
|
|
3025
|
+
]),
|
|
3026
|
+
"item-template": g(({ item: F }) => [
|
|
3027
|
+
x("div", Ya, [
|
|
3028
|
+
x("span", Xa, $(F.label), 1),
|
|
3029
|
+
x("span", el, $(F.vault.name), 1),
|
|
3030
|
+
x("span", tl, $(F.vault.id), 1)
|
|
3031
|
+
])
|
|
3032
|
+
]),
|
|
3033
|
+
_: 1
|
|
3034
|
+
}, 8, ["modelValue", "disabled", "items", "label", "loading", "placeholder", "onQueryChange"]),
|
|
3035
|
+
J.value ? (_(), S(ne, {
|
|
3036
|
+
key: 0,
|
|
3037
|
+
modelValue: h.value,
|
|
3038
|
+
"onUpdate:modelValue": E[1] || (E[1] = (F) => h.value = F),
|
|
3039
|
+
clearable: "",
|
|
3040
|
+
"data-testid": "vault-secret-picker-secret-id-select",
|
|
3041
|
+
disabled: P.value || !A.value,
|
|
3042
|
+
"enable-filtering": "",
|
|
3043
|
+
"filter-function": () => !0,
|
|
3044
|
+
items: W.value,
|
|
3045
|
+
"kpop-attributes": { "data-testid": "vault-secret-picker-secret-id-popover" },
|
|
3046
|
+
label: e(n)("vault_secret_picker.secret_id.label"),
|
|
3047
|
+
loading: e(ie),
|
|
3048
|
+
placeholder: e(n)("vault_secret_picker.secret_id.select_placeholder"),
|
|
3049
|
+
required: "",
|
|
3050
|
+
"reuse-item-template": "",
|
|
3051
|
+
width: "100%",
|
|
3052
|
+
onQueryChange: e(L)
|
|
3053
|
+
}, {
|
|
3054
|
+
loading: g(() => [
|
|
3055
|
+
x("div", null, $(e(n)("actions.loading")), 1)
|
|
3056
|
+
]),
|
|
3057
|
+
empty: g(() => [
|
|
3058
|
+
x("div", al, $(e(n)("vault_secret_picker.no_results")), 1)
|
|
3059
|
+
]),
|
|
3060
|
+
_: 1
|
|
3061
|
+
}, 8, ["modelValue", "disabled", "items", "label", "loading", "placeholder", "onQueryChange"])) : (_(), S(ce, {
|
|
3062
|
+
key: 1,
|
|
3063
|
+
modelValue: h.value,
|
|
3064
|
+
"onUpdate:modelValue": E[2] || (E[2] = (F) => h.value = F),
|
|
3065
|
+
modelModifiers: { trim: !0 },
|
|
3066
|
+
autocomplete: "off",
|
|
3067
|
+
"data-testid": "vault-secret-picker-secret-id-input",
|
|
3068
|
+
disabled: P.value || !A.value,
|
|
3069
|
+
label: e(n)("vault_secret_picker.secret_id.label"),
|
|
3070
|
+
placeholder: e(n)("vault_secret_picker.secret_id.input_placeholder"),
|
|
3071
|
+
required: "",
|
|
3072
|
+
type: "text"
|
|
3073
|
+
}, null, 8, ["modelValue", "disabled", "label", "placeholder"])),
|
|
3074
|
+
l.showSecretKey ? (_(), S(ce, {
|
|
3075
|
+
key: 2,
|
|
3076
|
+
modelValue: V.value,
|
|
3077
|
+
"onUpdate:modelValue": E[3] || (E[3] = (F) => V.value = F),
|
|
3078
|
+
modelModifiers: { trim: !0 },
|
|
3079
|
+
autocomplete: "off",
|
|
3080
|
+
"data-testid": "vault-secret-picker-secret-key-input",
|
|
3081
|
+
disabled: P.value || !A.value,
|
|
3082
|
+
help: e(n)("vault_secret_picker.optional_secret_key.help"),
|
|
3083
|
+
label: e(n)("vault_secret_picker.optional_secret_key.label"),
|
|
3084
|
+
placeholder: e(n)("vault_secret_picker.optional_secret_key.placeholder"),
|
|
3085
|
+
type: "text"
|
|
3086
|
+
}, null, 8, ["modelValue", "disabled", "help", "label", "placeholder"])) : M("", !0)
|
|
3087
|
+
]))
|
|
3088
|
+
]),
|
|
3089
|
+
_: 3
|
|
3090
|
+
}, 8, ["action-button-disabled", "action-button-text", "title", "visible"]);
|
|
3091
|
+
};
|
|
3092
|
+
}
|
|
3093
|
+
}), gl = /* @__PURE__ */ we(ll, [["__scopeId", "data-v-2ab21bd2"]]);
|
|
3094
|
+
export {
|
|
3095
|
+
_l as SecretForm,
|
|
3096
|
+
ml as SecretList,
|
|
3097
|
+
m as VaultAuthMethods,
|
|
3098
|
+
pl as VaultConfigCard,
|
|
3099
|
+
fl as VaultForm,
|
|
3100
|
+
cl as VaultList,
|
|
3101
|
+
t as VaultProviders,
|
|
3102
|
+
gl as VaultSecretPicker,
|
|
3103
|
+
vl as VaultSecretPickerProvider,
|
|
3104
|
+
re as secretsEndpoints,
|
|
3105
|
+
se as vaultsEndpoints
|
|
3106
|
+
};
|