Javascript Middleware vs Rich Plugin

Aside from modifying the tyk code, there seem to be two very different ways of customizing tyk: javascript middleware, which is deployed on the filesystem along with the config files, and rich plugins, which apparently are also custom middleware, and which must be deployed in bundles via an external server. Is this distinction an artifact of tyk’s history, or there some design intent behind the distinction? I can see the advantage of the plugin bundle deployment method, but it also seems a bit inconvenient. Is there any way to deploy tyk with python middleware directly (baked into a docker image, say) like with javascript, or must a bundle be prepared and served externally?

Do either javascript middleware or rich plugins have access to the request context? Specifically to claims captured from an oidc token?


For clarity:
Python, Javascript and LuaJIT can all be deployed directly onto the gateway and run natively.
We also support gRPC middleware, which is called from a separate server.

So for your python example above, yes, you can use that natively on the gateway, but its still “bundled”: GitHub - TykTechnologies/tyk-plugin-demo-python: Custom Authentication With a Python Plugin

Thanks @James, I will give that a try.