Skip to content

Conversation

@shreemaan-abhishek
Copy link
Contributor

No description provided.

Signed-off-by: Abhishek Choudhary <shreemaan.abhishek@gmail.com>
--- error_code: 200
--- error_log
login callback req with http post
; Path=/; SameSite=None; Secure; HttpOnly,
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

assert cookie attributes

Signed-off-by: Abhishek Choudhary <shreemaan.abhishek@gmail.com>
Signed-off-by: Abhishek Choudhary <shreemaan.abhishek@gmail.com>
Signed-off-by: Abhishek Choudhary <shreemaan.abhishek@gmail.com>
Signed-off-by: Abhishek Choudhary <shreemaan.abhishek@gmail.com>
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This pull request replaces the lua-resty-cookie library with lua-resty-session for session management in the SAML authentication library. This represents a significant architectural change from server-side session storage (using nginx shared dictionaries) to client-side encrypted cookie-based sessions.

Changes:

  • Replaced lua-resty-cookie dependency with lua-resty-session in rockspecs
  • Refactored session management from shared dictionary + cookies to encrypted session cookies
  • Removed lua_shared_dict configuration requirement from tests
  • Updated tests to validate cookie attributes for both HTTP-Redirect and HTTP-POST bindings

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 12 comments.

Show a summary per file
File Description
lua/resty/saml.lua Core refactoring to use lua-resty-session API for all session operations (login, login_callback, logout, logout_callback)
rockspec/lua-resty-saml-main-0-0.rockspec Updated dependency from lua-resty-cookie to lua-resty-session 4.1.5-1
rockspec/lua-resty-saml-0.2.3-0.rockspec Incorrectly downgraded lua-resty-cookie version instead of replacing with lua-resty-session
t/saml.t Removed lua_shared_dict config, added session_config with secret, updated test expectations for cookie attributes
t/saml-post.t Removed lua_shared_dict config, added session_config with secret, updated test expectations for cookie attributes
t/lib/keycloak.lua Added debug logging for cookies

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

shreemaan-abhishek and others added 4 commits January 23, 2026 19:57
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Signed-off-by: Abhishek Choudhary <shreemaan.abhishek@gmail.com>
Signed-off-by: Abhishek Choudhary <shreemaan.abhishek@gmail.com>
Signed-off-by: Abhishek Choudhary <shreemaan.abhishek@gmail.com>
lua_package_path '$pwd/lua/?.lua;$pwd/deps/share/lua/5.1/?.lua;$pwd/t/?.lua;;';
lua_package_cpath '$pwd/?.so;;';

lua_shared_dict saml_sessions 10m;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remember remove this shared dict from gateway repo too.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

added to my todo list

shreemaan-abhishek and others added 4 commits January 23, 2026 20:31
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Signed-off-by: Abhishek Choudhary <shreemaan.abhishek@gmail.com>
…k/lua-resty-saml into feat/use-resty-session

Signed-off-by: Abhishek Choudhary <shreemaan.abhishek@gmail.com>
Signed-off-by: Abhishek Choudhary <shreemaan.abhishek@gmail.com>
@shreemaan-abhishek shreemaan-abhishek merged commit 80c5d89 into api7:main Jan 24, 2026
2 checks passed
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

Successfully merging this pull request may close these issues.

2 participants