Hello.
We have problem with kong plugins reusability.
Let’s assume that we have structure like
service:
route1:
route2:
route3:
On route 1 and route 2 we have to apply key auth
On route 3 - no key auth needed.
Since kong does not allow us to configure plugins like
requests.put(KONG_ADMIN_URL + 'routes/awesome-service/plugins/<plugin_configuration_name>', {
'name': 'key-auth',
'config.key_names': ['Authorization'],
})
And we have to use ids:
requests.put(KONG_ADMIN_URL + 'routes/awesome-service/plugins/7cd47c78-1f45-4805-b8f2-76adcf619bd8', {
'name': 'key-auth',
'config.key_names': ['Authorization'],
})
We keep local map of “plugin_configuration” → “plugin_id”
But it leads to huge config duplication. Can we use somehow one plugin config on several routes (without service level usage)?