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

lua_resty_session > v4.0.0 doesnt work #480

Open
cuotos opened this issue May 17, 2023 · 7 comments
Open

lua_resty_session > v4.0.0 doesnt work #480

cuotos opened this issue May 17, 2023 · 7 comments

Comments

@cuotos
Copy link

cuotos commented May 17, 2023

https://github.com/zmartzone/lua-resty-openidc/blob/v1.7.6/lib/resty/openidc.lua#L1482

lua_resty_session > v4.0.0 removed "present" from the item returned from "session.start()"

This causes this to always fail

err = "request to the redirect_uri path but there's no session state found"

Im using the https://github.com/revomatico/kong-oidc/tree/master plugin for kong and could not get it to work. Im new to lua, but was able to work my way through it and found that the v4.0.0 upgrade to the session library caused the break

@cuotos
Copy link
Author

cuotos commented May 17, 2023

update:
I had just been looking at the latest 1.7.6 tag as this was what was being used, and have just spotted this commit. Is there a plan for this to be released? or is there a way for me to do this manually in the meantime?

4b93164

@bodewig
Copy link
Collaborator

bodewig commented May 17, 2023

this has been released, it is the version that became 1.7.6-3 , it just looks as if there was no corresponding git tag. It is quite possible Kong won't work with lua-resty-session < 4 anymore. There is #478 that I haven't found time to review, yet.

@cuotos
Copy link
Author

cuotos commented May 17, 2023

sorry for my ignorance,

if both 3.10 and >4 are installed at the same time, does the >4 module get used for everything?

If I (to test only) force remove v4 from my docker container, my problem is fixed, but as kong specifies it required >4, I cannot guarantee another area is broken. This would imply that the newer version is being used, even if a module specifies an older one in its rockspec file

@bodewig
Copy link
Collaborator

bodewig commented May 18, 2023

I'm not really an expert when it comes to Lua packaging, but I don't believe there is a way to support multiple versions of the same library at the same time. The modules would need to have different names for this to work IIUC. And I honestly don't know which one would win if two versions are around.

@cuotos
Copy link
Author

cuotos commented May 18, 2023

That seems to be the conclusion my research has lead to too.
This ticket can be closed if there are others covering the same subject and I'll have to reassess the approach I can't take with my project.

@Fabryprog
Copy link

THANK YOU SO MUCH ... I use https://github.com/Kong/kong (3.4.2) and I resolved the error using this command inside my custom kong image (to resolve lua_resty_session duplication

luarocks remove lua-resty-session 4.0.4-1 --force

@jack4it
Copy link

jack4it commented Mar 4, 2024

However the potential side effect on Kong itself is kinda scary :)

zandbelt added a commit that referenced this issue Sep 9, 2024
closes #464 #480 #503; thanks @oldium @balajiv113

Signed-off-by: Hans Zandbelt <hans.zandbelt@openidc.com>
freebsd-git pushed a commit to freebsd/freebsd-ports that referenced this issue Sep 18, 2024
This is based upon www/lua-resty-session (v4), but is needed for
lua-resty-openidc.

The version 3.x is pinned in the lua-resty-openidc dependencies:
    https://github.com/zmartzone/lua-resty-openidc/blob/9f3a4fcade930f6f38ee0cb43cabf50cebffbcc9/lua-resty-openidc-1.7.6-3.rockspec#L27

There is apparently currently no clear plan on when/if lua-resty-openidc
will be updated to include changes for lua-resty-session 4.X, see
discussions on
    zmartzone/lua-resty-openidc#480

Additionally to what the author submitted some changes by me:
 - add conflicts with www/lua-resty-session
 - give up maintainership of www/lua-resty-session

PR:		281142
freebsd-git pushed a commit to freebsd/freebsd-ports that referenced this issue Sep 18, 2024
There is apparently currently no clear plan on when/if lua-resty-openidc
will be updated to include changes for lua-resty-session 4.X, see
discussions on
    zmartzone/lua-resty-openidc#480

Additionally:
 - give up maintainership

PR:		281143, 281142, 281079
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants