ziti icon indicating copy to clipboard operation
ziti copied to clipboard

Consider removing configs filtering and adding configType filtering for services Edge client endpoint

Open sabedevops opened this issue 2 years ago • 0 comments

An authenticated Edge client can filter for configs as follows GET /services?filter=anyOf(configs) contains ":configId".

The issue with this pattern is that the client has no criteria by which to determine with configId to filter for. This is because the endpoint GET /services/:id/configs is privileged. It begs the question whether a ServiceDetail.configs field is useful for edge clients altogether.

Currently, edge clients generally desire access to services with specific config types (e.g. tunnelers want services which implement host.v1 or intercept.v1, etc). It would be useful to be able to list services which implement a specific config type to remove the need for client side filtering of ServiceList results.

GET /services?filter=anyOf(config.type.name) = "my-custom-type.v1"

It may also be desirable to allow set operations like filtering for services which have a subset of configs.

Some suggestions:

GET /services?filter=anyOf(config.type.name) superset ("my-custom-type.v1", "host.v1", ...)

GET /services?filter=anyOf(config.type.name) >= ("my-custom-type.v1", "host.v1", ...)

sabedevops avatar Dec 06 '22 20:12 sabedevops