Это ошибка, которую я получаю
lua entry thread aborted: runtime error: /usr/local/share/lua/5.1/resty/session.lua:183: loop or previous error loading module 'resty.session.ciphers.aes'
stack traceback:
coroutine 0:
[C]: in function 'require'
/usr/local/share/lua/5.1/resty/session.lua:183: in function 'new'
/usr/local/share/lua/5.1/resty/session.lua:222: in function 'open'
/usr/local/share/lua/5.1/resty/session.lua:286: in function 'start'
/usr/local/share/lua/5.1/resty/openidc.lua:1361: in function 'authenticate'
access_by_lua(keycloak.conf:25):15: in function <access_by_lua(keycloak.conf:25):1>
и вот мой файл keycloak.conf
server {
listen 80 default_server;
server_name www.keycloak.com;
root /opt/nginx/html;
access_by_lua '
local opts = {
redirect_uri_path = "/redirect_uri",
accept_none_alg = true,
discovery = "http://www.keyclock.com:8080/auth/realms/test/.well-known/openid-configuration",
client_id = "nginx",
client_secret = "84a5616b-9cee-4feeecc-836f-8856c958ef54",
redirect_uri_scheme = "http",
logout_path = "/logout",
redirect_after_logout_uri = "http://www.keycloak.com:8080/auth/realms/test/protocol/openid-connect/logout?redirect_uri=http://www.keyclock.com/",
redirect_after_logout_with_id_token_hint = false,
session_contents = {id_token=true}
}
-- call introspect for OAuth 2.0 Bearer Access Token validation
local res, err = require("resty.openidc").authenticate(opts)
if err then
ngx.status = 403
ngx.say(err)
ngx.exit(ngx.HTTP_FORBIDDEN)
end
';
# I disabled caching so the browser won't cache the site.
expires 0;
add_header Cache-Control private;
location / {
}
# redirect server error pages to the static page /40x.html
#
error_page 404 /404.html;
location = /40x.html {
}
# redirect server error pages to the static page /50x.html
#
error_page 500 502 503 504 /50x.html;
location = /50x.html {
}
}
Установленные LUA пакеты lua -cjson luaffi lua -resty-http lua -resty-jwt lua -resty-openidc lua -resty-session
Надеюсь, я установил необходимые пакеты lua, возможно, проблема в nginx конфигурационном файле в строке 25 local res, err = require ("resty.openid c"). authenticate (опции)