The Middleman Plugin Announcement

Hi Guys,

I just released a plugin based on kong-external-auth and kong-middleman-plugin. The reason to create a new one was due to the missing features and lack of updates.

This is the plugin’s link:
https://github.com/udleinati/kong-plugin-the-middleman

I’ve been using it in production for the past few hours and so far no issue and I’m very happy :slight_smile:. I’d be pleased if you give your considerations and help to improve it.

Best

1 Like

Thanks @Udlei_Nati for sharing your work.

I have a few questions,

  1. Can you give some examples of JSON body response from middle-service, for the sake of understanding how the key names are split to kebab-case.
  2. What is done by config.streamdown_injected_headers ?
  3. How does the caching works here? Is it what maybe implemented by Kong? Or something has been implemented in the plugin?

Hi @hassanfarid,

  1. Suppose that you get this JSON body response from middle-service:

{“tenantId”: “123”, “role”: “admin”, “accountId”: “112233”}

If you have the header prefix configured as X-, the new headers are going to be:

X-Tenant-Id: 123
X-Role: admin
X-AccountId: 112233

If you want, you can simulate the whole flow using the docker-composer inside the folder playground.

  1. I’m not sure if streamdown_injected_headers is the best name for it… do you have a better idea? That’s the new explanation that I added in the README.md

When this option is enabled, the-middleman will add to the response header all headers added by the-middleman and by the middle-service.

I use this feature for debugging. It’s just an easy way to see the headers that your destination service are going to receive.

  1. It’s the same cache implemented by kong: kong.cache

Let me know if something still not clear. Thanks

@Udlei_Nati Great work on the plugin! Found it very useful.
I’m moving from apis to services from Kong and looking for a similar plugin for services. Are you looking to extend this plugin for services or have context on any existing ones?