@kong-ui-public/entities-plugins 9.100.4 → 9.100.5

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.
@@ -1524,6 +1524,7 @@ const Gn = (e) => {
1524
1524
  secret: {
1525
1525
  auto: !0,
1526
1526
  type: "string",
1527
+ encrypted: !0,
1527
1528
  hint: "The secret to use in the HMAC Signature verification. Note that if this parameter isn’t provided, Kong will generate a value for you and send it as part of the response body."
1528
1529
  }
1529
1530
  },
@@ -1604,6 +1605,7 @@ const Gn = (e) => {
1604
1605
  hint: "A unique string identifying the credential. If left out, it will be auto-generated.",
1605
1606
  required: !1,
1606
1607
  type: "string",
1608
+ encrypted: !0,
1607
1609
  unique: !0
1608
1610
  }
1609
1611
  },
@@ -1611,7 +1613,8 @@ const Gn = (e) => {
1611
1613
  secret: {
1612
1614
  auto: !0,
1613
1615
  hint: "If algorithm is HS256 or ES256, the secret used to sign JWTs for this credential. If left out, will be auto-generated.",
1614
- type: "string"
1616
+ type: "string",
1617
+ encrypted: !0
1615
1618
  }
1616
1619
  },
1617
1620
  {
@@ -3,10 +3,10 @@ If the limit is exceeded and the user receives a 429 error, each additional requ
3
3
  will extend the wait time by about 12 minutes, continuously adjusting as new requests are made.`}}}}};function Pe(){const e=je.createI18n("en-us",We);return{i18n:e,i18nT:je.i18nTComponent(e)}}function rs(){const{capitalize:e}=pe.useStringHelpers(),n=["methods","logout_methods"];return{setFieldType:(u,p,m)=>{var h,y,g;if(!(!u||!p||!m))switch(m.type){case"boolean":u[p]={type:pe.ConfigurationSchemaType.BadgeStatus,...u[p]};break;case"string":m.encrypted?u[p]={type:pe.ConfigurationSchemaType.Redacted,...u[p]}:u[p]={type:pe.ConfigurationSchemaType.Text,...u[p]};break;case"set":((h=m.elements)==null?void 0:h.type)==="string"&&(u[p]={type:pe.ConfigurationSchemaType.BadgeTag,...u[p]});break;case"array":n.includes(p)?u[p]={type:pe.ConfigurationSchemaType.BadgeMethod,...u[p]}:((y=m.elements)==null?void 0:y.type)==="string"?m.encrypted?u[p]={type:pe.ConfigurationSchemaType.RedactedArray,...u[p]}:u[p]={type:pe.ConfigurationSchemaType.BadgeTag,...u[p]}:((g=m.elements)==null?void 0:g.type)==="record"&&(u[p]={type:pe.ConfigurationSchemaType.Json,...u[p]});break;case"record":u[p]={type:pe.ConfigurationSchemaType.Json,...u[p]};break;default:u[p]={type:pe.ConfigurationSchemaType.Text,...u[p]};break}},convertToDotNotation:u=>u.replace(/-/g,"."),unFlattenObject:u=>{const p={};for(const m in u){const h=m.split(".");h.reduce((y,g,_)=>y[g]||(y[g]=isNaN(h[_+1])?h.length-1===_?u[m]:{}:[]),p)}return p},dismissField:(u,p,m="redis",h=!1)=>{const y=new RegExp("(?<=-redis-).*");if(typeof u!="object"||u===null)return u;m==="redis"?Object.keys(u).forEach(g=>{g.match(y)&&delete u[g]}):h?u[m]=null:delete u[m],Object.assign(u,p)},isObjectEmpty:u=>Object.keys(u).length===0,unsetNullForeignKey:(u,p)=>{["service.id","route.id","consumer.id","consumer_group.id"].indexOf(u)>-1&&p[u]===null&&(delete p[u],p[u.replace(".id","")]=null)},formatPluginFieldLabel:u=>e(u.replace(/_/g," ")),getTallestPluginCardHeight:u=>{let p=0;if(u.length)for(let m=0;m<u.length;m++){const h=u[m].$el;p=h.offsetHeight>p?h.offsetHeight:p}return p},getToggleVisibility:(u,p)=>{var m,h;if(u&&p){const y=(h=(m=window==null?void 0:window.getComputedStyle(u))==null?void 0:m.getPropertyValue("grid-template-columns"))==null?void 0:h.split(" ").length;return p>y}return!0}}}var fr=(e=>(e.REDIS_CE="redis-ce",e.REDIS_EE="redis-ee",e))(fr||{});const is=[z.PluginGroup.AUTHENTICATION,z.PluginGroup.AI,z.PluginGroup.SECURITY,z.PluginGroup.TRAFFIC_CONTROL,z.PluginGroup.SERVERLESS,z.PluginGroup.ANALYTICS_AND_MONITORING,z.PluginGroup.TRANSFORMATIONS,z.PluginGroup.LOGGING,z.PluginGroup.DEPLOYMENT,z.PluginGroup.WEBSOCKET,z.PluginGroup.CUSTOM_PLUGINS],as={[z.PluginGroup.AUTHENTICATION]:!1,[z.PluginGroup.AI]:!1,[z.PluginGroup.SECURITY]:!1,[z.PluginGroup.TRAFFIC_CONTROL]:!1,[z.PluginGroup.SERVERLESS]:!1,[z.PluginGroup.ANALYTICS_AND_MONITORING]:!1,[z.PluginGroup.TRANSFORMATIONS]:!1,[z.PluginGroup.LOGGING]:!1,[z.PluginGroup.DEPLOYMENT]:!1,[z.PluginGroup.CUSTOM_PLUGINS]:!1};var rn=(e=>(e.SERVICE="service_id",e.ROUTE="route_id",e.CONSUMER="consumer_id",e.CONSUMER_GROUP="consumer_group_id",e))(rn||{});const an=e=>{const n=Object.fromEntries(e.fields.map(o=>Object.entries(o)[0]));return"id"in n||(n.id={}),n},ln={label:"Tags",name:"tags",type:"input",inputType:"text",valueType:"array",valueArrayType:"string",placeholder:"Enter list of tags",help:"An optional set of strings for grouping and filtering, separated by commas.",hint:"e.g. tag1, tag2, tag3"},Tn={getColumnFields:an,tags:ln,id:{label:"ID"},enabled:{label:"Enabled",indexed:!0,type:"boolean"},created_at:{label:"Created"},updated_at:{label:"Last updated"},fields:{arrayItems(e){const n=e.inputAttributes||{};return delete e.inputAttributes,{type:"array",itemContainerComponent:"FieldArrayItem",fieldClasses:"kong-form-array-field",fieldItemsClasses:"kong-form-array-field-item",newElementButtonLabelClasses:"kong-form-new-element-button-label",inputAttributes:{class:"form-control",style:{minWidth:"200px"},...n},removeElementButtonLabel:"remove",styleClasses:"kong-form-field-wrapper",inputType:"text",valueType:"array",valueArrayType:"string",...e}}}},ls={fields:[{group:{hint:"The arbitrary group name to associate to the consumer."}},{tags:ln}]},$m={fields:[{id:{uuid:!0,type:"string",auto:!0}},{created_at:{auto:!0,timestamp:!0,type:"integer"}},{consumer:{reference:"consumers",type:"foreign",on_delete:"cascade",required:!0}},{group:{required:!0,type:"string",hint:"The arbitrary group name to associate to the consumer."}},{tags:{elements:{type:"string",required:!0},type:"set"}}]},ss={fields:[{username:{}},{password:{inputType:"password"}},{tags:ln}]},Bm={fields:[{id:{uuid:!0,type:"string",auto:!0}},{created_at:{auto:!0,timestamp:!0,type:"integer"}},{consumer:{reference:"consumers",type:"foreign",on_delete:"cascade",required:!0}},{username:{required:!0,type:"string",unique:!0}},{password:{type:"string",required:!0,encrypted:!0}},{tags:{elements:{type:"string",required:!0},type:"set"}}]},Vm={class:"field-wrapper"},Rm=t.defineComponent({__name:"KeyAuthIdentityRealms",props:{disabled:{type:Boolean},formOptions:{},model:{},schema:{},vfg:{},errors:{},hint:{}},emits:["modelUpdated"],setup(e,{expose:n,emit:o}){const r=e,i=o,{clearValidationErrors:a,value:l}=Oe.composables.useAbstractFields({model:t.toRef(()=>r.model),schema:r.schema,formOptions:r.formOptions,emitModelUpdated:b=>{i("modelUpdated",b.value,b.model)}}),{i18n:s}=De.useI18n(),{t:c}=s,d={value:"current-cp",label:c("custom_field.key_auth_identity_realms.cp_label"),group:c("custom_field.key_auth_identity_realms.cp_group_label")},f=t.inject(Oe.FORMS_CONFIG),{axiosInstance:u}=pe.useAxios(f==null?void 0:f.axiosRequestConfig),p=()=>{if((f==null?void 0:f.app)==="konnect"){const b=/\b(us|eu|au|me|in)\b/.exec((f==null?void 0:f.apiBaseUrl)||"");if(b)return{region:b[1]}}return{}},m=t.ref(!0),h=t.ref([d]),y=async()=>{if((f==null?void 0:f.app)==="konnect")try{m.value=!0;let b=`${f==null?void 0:f.apiBaseUrl}/v1/realms`;const w=[];do{const v=await u.get(b);v&&v.data&&v.data.data&&w.push(...v.data.data.map(x=>({value:x.id,label:x.name,group:c("custom_field.key_auth_identity_realms.realm_group_label")}))),b=v.data.meta.next?`${f==null?void 0:f.apiBaseUrl}${v.data.meta.next}`:null}while(b);h.value=[d,...w]}catch(b){console.error("Failed to fetch Konnect realms",b)}finally{m.value=!1}},g=t.computed(()=>l.value.map(b=>b.id||"current-cp")),_=b=>{const w=b.includes("current-cp")?[{scope:"cp",id:null}]:[],v=l.value.filter(({scope:D})=>D!=="cp").map(({id:D})=>D),x=b.filter(D=>D!=="current-cp"),$=(v.length!==x.length||v.some(D=>!x.includes(D))?x.filter(D=>!v.includes(D)):x).map(D=>({...p(),scope:"realm",id:D}));l.value=[...w,...$]};return t.watch(l,()=>{l.value||(l.value=[{scope:"cp",id:null}])}),t.onMounted(()=>{y()}),n({clearValidationErrors:a}),(b,w)=>{const v=t.resolveComponent("KMultiselect");return t.openBlock(),t.createElementBlock("div",Vm,[t.createVNode(v,{items:h.value,loading:m.value,"model-value":g.value,"onUpdate:modelValue":_},null,8,["items","loading","model-value"])])}}}),Ee=(e,n)=>{const o=e.__vccOpts||e;for(const[r,i]of n)o[r]=i;return o},Dm=Ee(Rm,[["__scopeId","data-v-29b128ff"]]),cs={fields:[{key:{submitWhenNull:!1,hint:`You can optionally set your own unique key to authenticate the
4
4
  client. If missing, it will be generated for you.`}},{tags:ln},{ttl:{help:"Time-to-live value for data"}}]},Mm=e=>{var n;return(e==null?void 0:e.app)==="kongManager"?{fieldsToDelete:["config-identity_realms"],shamefullyTransformPayload:({payload:o})=>{(e!=null&&e.credential&&typeof o.ttl!="number"||Number.isNaN(o.ttl))&&(o.ttl=0)}}:{"config-identity_realms":{component:((n=e==null?void 0:e.experimentalRenders)==null?void 0:n.keyAuthIdentityRealms)??!1?t.markRaw(Dm):null}}},Lm={fields:[{id:{uuid:!0,type:"string",auto:!0}},{created_at:{auto:!0,timestamp:!0,type:"integer"}},{consumer:{reference:"consumers",type:"foreign",on_delete:"cascade",required:!0}},{key:{auto:!0,hint:"If left empty, a key will be generated after saving this form.",required:!1,type:"string",unique:!0}},{tags:{elements:{type:"string",required:!0},type:"set"}},{ttl:{between:[0,1e8],description:"Time-to-live value for data",type:"number"}}]},ds={fields:[{username:{hint:"The username to use in the HMAC Signature verification."}},{secret:{inputType:"text",submitWhenNull:!1,hint:`The secret to use in the HMAC Signature verification. Note that
5
5
  if this parameter isn’t provided, Kong will generate a value for you and
6
- send it as part of the response body.`}},{tags:ln}]},Fm={fields:[{id:{uuid:!0,type:"string",auto:!0}},{created_at:{auto:!0,timestamp:!0,type:"integer"}},{consumer:{reference:"consumers",type:"foreign",on_delete:"cascade",required:!0}},{username:{required:!0,type:"string",unique:!0,hint:"The username to use in the HMAC Signature verification."}},{secret:{auto:!0,type:"string",hint:"The secret to use in the HMAC Signature verification. Note that if this parameter isn’t provided, Kong will generate a value for you and send it as part of the response body."}},{tags:{elements:{type:"string",required:!0},type:"set"}}]},Um={fields:[{key:{submitWhenNull:!1,hint:`A unique string identifying the credential. If left out, it will
6
+ send it as part of the response body.`}},{tags:ln}]},Fm={fields:[{id:{uuid:!0,type:"string",auto:!0}},{created_at:{auto:!0,timestamp:!0,type:"integer"}},{consumer:{reference:"consumers",type:"foreign",on_delete:"cascade",required:!0}},{username:{required:!0,type:"string",unique:!0,hint:"The username to use in the HMAC Signature verification."}},{secret:{auto:!0,type:"string",encrypted:!0,hint:"The secret to use in the HMAC Signature verification. Note that if this parameter isn’t provided, Kong will generate a value for you and send it as part of the response body."}},{tags:{elements:{type:"string",required:!0},type:"set"}}]},Um={fields:[{key:{submitWhenNull:!1,hint:`A unique string identifying the credential. If left out, it will
7
7
  be auto-generated.`}},{algorithm:{order:1,hint:"The algorithm used to verify the token’s signature."}},{rsa_public_key:{order:2,type:"textArea",label:"RSA public-key",hint:`If algorithm is RSA or ECDSA, the public key (in PEM format) to
8
8
  use to verify the token’s signature.`,rows:10,visible:e=>e&&e.algorithm&&/^((RS|PS|ES)(256|384|512)|EdDSA)$/.test(e.algorithm)}},{secret:{inputType:"text",hint:`If algorithm is HMAC, the secret used to sign JWTs for
9
- this credential. If left out, will be auto-generated.`}},{tags:ln}]},Km={fields:[{id:{uuid:!0,type:"string",auto:!0}},{created_at:{auto:!0,timestamp:!0,type:"integer"}},{consumer:{reference:"consumers",type:"foreign",on_delete:"cascade",required:!0}},{key:{auto:!0,hint:"A unique string identifying the credential. If left out, it will be auto-generated.",required:!1,type:"string",unique:!0}},{secret:{auto:!0,hint:"If algorithm is HS256 or ES256, the secret used to sign JWTs for this credential. If left out, will be auto-generated.",type:"string"}},{rsa_public_key:{type:"string"}},{algorithm:{default:"HS256",type:"string",one_of:["HS256","HS384","HS512","RS256","RS384","RS512","ES256","ES384","ES512","PS256","PS384","PS512","EdDSA"]}},{tags:{elements:{type:"string",required:!0},type:"set"}}]},us={fields:[{name:{}},{client_id:{submitWhenNull:!1,hint:`You can optionally set your own unique client_id. If missing, it
9
+ this credential. If left out, will be auto-generated.`}},{tags:ln}]},Km={fields:[{id:{uuid:!0,type:"string",auto:!0}},{created_at:{auto:!0,timestamp:!0,type:"integer"}},{consumer:{reference:"consumers",type:"foreign",on_delete:"cascade",required:!0}},{key:{auto:!0,hint:"A unique string identifying the credential. If left out, it will be auto-generated.",required:!1,type:"string",encrypted:!0,unique:!0}},{secret:{auto:!0,hint:"If algorithm is HS256 or ES256, the secret used to sign JWTs for this credential. If left out, will be auto-generated.",type:"string",encrypted:!0}},{rsa_public_key:{type:"string"}},{algorithm:{default:"HS256",type:"string",one_of:["HS256","HS384","HS512","RS256","RS384","RS512","ES256","ES384","ES512","PS256","PS384","PS512","EdDSA"]}},{tags:{elements:{type:"string",required:!0},type:"set"}}]},us={fields:[{name:{}},{client_id:{submitWhenNull:!1,hint:`You can optionally set your own unique client_id. If missing, it
10
10
  will be generated for you.`,inputType:"text",encrypted:!0}},{client_secret:{submitWhenNull:!1,hint:`You can optionally set your own unique client_secret. If missing,
11
11
  it will be generated for you.`,inputType:"password",encrypted:!0}},{redirect_uris:Tn.fields.arrayItems({label:"Redirect URI(s)",hint:`One or more URLs in your app where users will be sent after
12
12
  authorization (RFC 6742 Section 3.1.2)`,newElementButtonLabel:"+ Add Redirect URI",inputAttributes:{placeholder:"Enter URI"}})},{tags:Tn.tags}]},jm={fields:[{id:{uuid:!0,auto:!0,type:"string",description:"A string representing a UUID (universally unique identifier)."}},{created_at:{description:"An integer representing an automatic Unix timestamp in seconds.",timestamp:!0,auto:!0,type:"integer"}},{consumer:{on_delete:"cascade",type:"foreign",reference:"consumers",required:!0}},{name:{required:!0,type:"string"}},{client_id:{required:!1,hint:"You can optionally set your own unique client_id. If missing, it will be generated for you.",unique:!0,auto:!0,type:"string"}},{client_secret:{required:!1,hint:"You can optionally set your own unique client_secret. If missing, it will be generated for you.",auto:!0,type:"string",encrypted:!0}},{hash_secret:{required:!0,type:"boolean",default:!1}},{redirect_uris:{required:!1,hint:"One or more URLs in your app where users will be sent after authorization (RFC 6742 Section 3.1.2)",type:"array",elements:{type:"string"}}},{tags:{elements:{required:!0,type:"string",description:"A string representing a tag."},type:"set",description:"A set of strings representing tags."}},{client_type:{required:!0,default:"confidential",type:"string",one_of:["confidential","public"]}}]},fs={fields:[{key:{submitWhenNull:!1,hint:`You can optionally set your own unique key to authenticate the
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kong-ui-public/entities-plugins",
3
- "version": "9.100.4",
3
+ "version": "9.100.5",
4
4
  "type": "module",
5
5
  "main": "./dist/entities-plugins.umd.js",
6
6
  "module": "./dist/entities-plugins.es.js",
@@ -52,8 +52,8 @@
52
52
  "vue": "^3.5.13",
53
53
  "vue-router": "^4.4.5",
54
54
  "zod": "^4.0.17",
55
- "@kong-ui-public/entities-vaults": "^3.25.10",
56
55
  "@kong-ui-public/entities-shared": "^3.32.0",
56
+ "@kong-ui-public/entities-vaults": "^3.25.10",
57
57
  "@kong-ui-public/i18n": "^2.4.4"
58
58
  },
59
59
  "repository": {
@@ -74,14 +74,14 @@
74
74
  "lodash-es": "^4.17.21",
75
75
  "marked": "^14.1.4",
76
76
  "@kong-ui-public/entities-consumer-groups": "^4.2.9",
77
+ "@kong-ui-public/entities-consumers": "^4.2.9",
77
78
  "@kong-ui-public/entities-gateway-services": "^3.13.9",
78
- "@kong-ui-public/entities-plugins-icon": "^1.4.2",
79
79
  "@kong-ui-public/entities-plugins-metadata": "^1.10.0",
80
- "@kong-ui-public/entities-consumers": "^4.2.9",
81
80
  "@kong-ui-public/entities-redis-configurations": "^1.4.12",
82
81
  "@kong-ui-public/entities-routes": "^3.16.13",
83
- "@kong-ui-public/forms": "^4.17.11",
84
- "@kong-ui-public/entities-vaults": "^3.25.10"
82
+ "@kong-ui-public/entities-plugins-icon": "^1.4.2",
83
+ "@kong-ui-public/entities-vaults": "^3.25.10",
84
+ "@kong-ui-public/forms": "^4.17.11"
85
85
  },
86
86
  "scripts": {
87
87
  "dev": "cross-env USE_SANDBOX=true vite",