Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem with module 'openssl.digest' #5

Open
Xav59 opened this issue Dec 10, 2020 · 5 comments
Open

Problem with module 'openssl.digest' #5

Xav59 opened this issue Dec 10, 2020 · 5 comments
Assignees
Labels
bug Something isn't working waiting feedback

Comments

@Xav59
Copy link

Xav59 commented Dec 10, 2020

Hi,

I'm trying to use kong-oidc-auth plugin in a fresh install of Kong in Docker.
I'm using the latest official Kong Docker image with Kong version 2.2.1.
The installation of the plugin is okay using luarocks install kong-oidc-auth.
But when I startup Kong, I get the following error stack:

2020/12/10 14:56:08 [error] 1#0: init_by_lua error: /usr/local/share/lua/5.1/kong/tools/utils.lua:652: error loading module 'kong.plugins.kong-oidc-auth.handler':
...cal/share/lua/5.1/kong/plugins/kong-oidc-auth/access.lua:7: module 'openssl.digest' not found:No LuaRocks module found for openssl.digest
        no field package.preload['openssl.digest']
        no file './openssl/digest.lua'
        no file './openssl/digest/init.lua'
        no file '/usr/local/openresty/site/lualib/openssl/digest.ljbc'
        no file '/usr/local/openresty/site/lualib/openssl/digest/init.ljbc'
        no file '/usr/local/openresty/lualib/openssl/digest.ljbc'
        no file '/usr/local/openresty/lualib/openssl/digest/init.ljbc'
        no file '/usr/local/openresty/site/lualib/openssl/digest.lua'
        no file '/usr/local/openresty/site/lualib/openssl/digest/init.lua'
        no file '/usr/local/openresty/lualib/openssl/digest.lua'
        no file '/usr/local/openresty/lualib/openssl/digest/init.lua'
        no file '/usr/local/openresty/luajit/share/luajit-2.1.0-beta3/openssl/digest.lua'
        no file '/usr/local/share/lua/5.1/openssl/digest.lua'
        no file '/usr/local/share/lua/5.1/openssl/digest/init.lua'
        no file '/usr/local/openresty/luajit/share/lua/5.1/openssl/digest.lua'
        no file '/usr/local/openresty/luajit/share/lua/5.1/openssl/digest/init.lua'
        no file '/home/kong/.luarocks/share/lua/5.1/openssl/digest.lua'
        no file '/home/kong/.luarocks/share/lua/5.1/openssl/digest/init.lua'
        no file '/usr/local/openresty/site/lualib/openssl/digest.so'
        no file '/usr/local/openresty/lualib/openssl/digest.so'
        no file './openssl/digest.so'
        no file '/usr/local/lib/lua/5.1/openssl/digest.so'
        no file '/usr/local/openresty/luajit/lib/lua/5.1/openssl/digest.so'
        no file '/usr/local/lib/lua/5.1/loadall.so'
        no file '/home/kong/.luarocks/lib/lua/5.1/openssl/digest.so'
        no file '/usr/local/openresty/site/lualib/openssl.so'
        no file '/usr/local/openresty/lualib/openssl.so'
        no file './openssl.so'
        no file '/usr/local/lib/lua/5.1/openssl.so'
        no file '/usr/local/openresty/luajit/lib/lua/5.1/openssl.so'
        no file '/usr/local/lib/lua/5.1/loadall.so'
        no file '/home/kong/.luarocks/lib/lua/5.1/openssl.so'

Do you have any advice?

@Xav59
Copy link
Author

Xav59 commented Dec 10, 2020

I just tested with version 2.0.5 of Kong, also using Docker, and I don't have the problem, the server starts without any error.

@franviera92
Copy link

franviera92 commented Jun 29, 2021

which is the solution on kong 2.2.1?

@saroha87
Copy link

saroha87 commented Nov 7, 2021

Basically openssl-dev is missing. So need to install openssl-dev in your linux of choice, then run "luarocks install luaoss".

Docker image to include this plugin

FROM kong:2.6.0-alpine
USER root
RUN apk update && apk add git unzip build-base luarocks openssl-dev
#RUN luarocks install kong-oidc
RUN luarocks install lua-resty-jwt 0.2.2-0
RUN luarocks install lua-resty-openidc 1.7.2-1
RUN luarocks install luaossl
RUN luarocks install kong-oidc-auth
USER kong

@jeremyjpj0916
Copy link
Collaborator

Hmm I guess Kong removed one of the older dependencies they used to bundle in their installs. Any community members want to take a crack at adding it to this plugins dependencies and we can rebuild and cut another version :) . If not I will give a go at it.

@jeremyjpj0916
Copy link
Collaborator

Actually added:

dependencies = {
  "luaossl == 20220711-0",
}

To the rockspec and latest version build, should be the only dep. needed seems. Let me know if works for yall?

@jeremyjpj0916 jeremyjpj0916 self-assigned this Aug 10, 2023
@jeremyjpj0916 jeremyjpj0916 added bug Something isn't working waiting feedback labels Aug 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working waiting feedback
Projects
None yet
Development

No branches or pull requests

4 participants