leplusorg / openid-connect-provider-debugger

A docker image to test OpenID Connect Providers (OP) using a simple Relying Party (RP).
https://hub.docker.com/r/leplusorg/openid-connect-provider-debugger
Apache License 2.0
14 stars 7 forks source link

Pin version of lua-resty-openidc #101

Closed thomasleplus closed 2 weeks ago

thomasleplus commented 2 weeks ago
          @thomasleplus : thank you very much!

I tested the updates and I get an error error opening session (missing session audience) on return from authentication. ~The error seems to be introduced by the change from openresty:1.25.3.1 -> 1.25.3.2 (FROM openresty/openresty:1.25.3.1-alpine-fat@sha256:17868b5ec232561bc64862160296c3f8480650bc4cbc19b88e056750bd78f527 to FROM openresty/openresty:1.25.3.2-alpine-fat@sha256:aa8ea52fa35a296558aed8b392fb39d575e39dd4a7717fa44f1fd6fc09c1185d).~ At least if I change that line back, it seems to work again. I will have a look, if I see the problem.

Edit:

To fix the current built the Dockerfile needs to add --pin 1.7.6 to the oidc lib:

&& /usr/local/openresty/luajit/bin/luarocks install lua-resty-openidc --pin 1.7.6 \

What do you think?

Originally posted by @tft7000 in https://github.com/leplusorg/openid-connect-provider-debugger/issues/95#issuecomment-2378817796

thomasleplus commented 2 weeks ago

@tft7000 I have been meaning to pin the version of lua-resty-openidc since it's a best practice anyway. Just never got around to do it (plus I am not looking forward to have one more version to track and bump regularly). But we just saw a clear demonstration that it's worth it so now it's done. If I could request your help in testing again, I would greatly appreciate it.

tft7000 commented 2 weeks ago

@thomasleplus :

I tested #102 locally:

meanwhile the image is out on docker hub:

thank you very much!

thomasleplus commented 2 weeks ago

Thank you! I still have to figure out what's the issue with lua-resty-openidc 1.8.0. I'd like to solve that before releasing but if I am stalled I'll release as it is now and make it the new latest docker tag.

Cheers

thomasleplus commented 2 weeks ago

@thomasleplus :

I tested #102 locally:

  • clone the project
  • adapt the build script (add --no-cache)
  • tested main -> it worked -> I later realized that the branch was merged already
  • tested 101-pin-lua-resty-openidc -> it worked (login and logout in an automated test)

meanwhile the image is out on docker hub:

  • testing the image leplusorg/openid-connect-provider-debugger:main -> it worked the same way

thank you very much!

You mentioned an automated test. Do you think that's something that you could contribute as well? If not it's OK but I am unhappy with the current test (it's just checking that the container starts and responds to a curl HTTP request). I meant to improve it but haven't found the time so far.

tft7000 commented 2 weeks ago

@thomasleplus :

You mentioned an automated test. Do you think that's something that you could contribute as well? If not it's OK but I am unhappy with the current test (it's just checking that the container starts and responds to a curl HTTP request). I meant to improve it but haven't found the time so far.

Unfortunately that is not possible, as I use this OIDC client to test our company product.

I was shortly looking around and I probably would do it in the following way:

I hope this helps as a starter.

thomasleplus commented 2 weeks ago

OK, no worries I totally understand. I will revisit soon.