Hi Celian,
If you look at our public github repo of sample v10 user defined policies, see this one https://github.com/ibm-apiconnect/policy-apigw/blob/master/user-defined-policies/clientip-filter/clientip-filter-policy.yaml that has an array of objects in its properties where the object has two string properties which different restrictions. Notice that each property has a type, whether it be array, object, or string. If you specify the type, then those dropdowns that are asking for the data type will not show up in the UI. The array UI interface allows you to enter 0..n array items, and to move each item around to reorder them if needed.
As for password fields in the clear in the policy properties, that would be a request for enhancement not only for the UI to not show what was being typed, but the yaml to have some type of encrypted value that the Gateway would need to decrypt.
Regards,
Steve Linn
------------------------------
Steve Linn
Senior Consulting I/T Specialist
IBM
------------------------------
Original Message:
Sent: Mon July 15, 2024 03:52 AM
From: Celian Toureille
Subject: User Defined Policies (UDP) parameters types shenanigans
Hi Steve,
In the end I didn't like the array, the interface it gives is too messy.
When I looked at http://json-schema.org/draft-04/schema# I only see stringArray as another type of array.
We have a lot of options to create UDPs, I guess it's alright. The only downside is passwords. I don't fell alright passing a brut string as a password. Maybe you would add a new type for it ?
------------------------------
Celian Toureille
------------------------------
Original Message:
Sent: Fri July 12, 2024 05:24 PM
From: Steve Linn
Subject: User Defined Policies (UDP) parameters types shenanigans
Hi Celian,
This is all based upon your policy yaml. Can you share your policy properties from the yaml? In your screen shot you have the dropdowns for string, object, etc. Your properties, specifically the array item, must not be specifying a type. You have an array for parameter1, but are the items of this array of different data types? Typically they would all be the same.
Best Regards,
Steve Linn
------------------------------
Steve Linn
Senior Consulting I/T Specialist
IBM