0

I found a tutorial how to setup kong with two open source plugins to get keycloak working with kong, but unfortunately it is 2 years old and I ran in troubles.

Most of the steps still worked and I was able to install the plugin versions in the tutorial via luarocks. unfortunately, the kong did not restart after configuring it to work with the plugins:

plungins = bundeld,oidc,jwt-keycloak

running in the error, that the kong.plugins.base_plugin cannot be found:

Error: /usr/local/share/lua/5.1/kong/tools/utils.lua:708: error loading module 'kong.plugins.oidc.handler':
/usr/local/share/lua/5.1/kong/plugins/oidc/handler.lua:1: module 'kong.plugins.base_plugin' not found:No LuaRocks module found for kong.plugins.base_plugin
    no field package.preload['kong.plugins.base_plugin']

What I tried

  • I tried to install a base_plugin but lua does not find any.
  • I was googling a lot, but did't quite found the same issue.

Well, I am quite stuck and was wondering if there is an other way (maybe directly with the oAuth plugin?), or how I can fix this issue. Also I don't really know how debug that issue and am happy for ideas!

helle
  • 51
  • 5

1 Answers1

1

The root cause is BasePlugin is deprecated and removed from kong 3.x,see it here.The jwt-keycloak plugin imported BasePlugin in handler.lua, so you have to do the migration by yourself,it's easy,just fork its repo,change code,install it from source in Dockerfile。

资俊杰
  • 11
  • 1