Skip to content

Comments

upgrade lua-resty-session to v4 and lua-resty-openidc to 1.8#702

Open
jtmkrueger wants to merge 6 commits intomainfrom
697-session-openidc-upgrades
Open

upgrade lua-resty-session to v4 and lua-resty-openidc to 1.8#702
jtmkrueger wants to merge 6 commits intomainfrom
697-session-openidc-upgrades

Conversation

@jtmkrueger
Copy link
Collaborator

@jtmkrueger jtmkrueger commented Feb 18, 2026

resolves 18F/api.data.gov#697

There's a number of things that had to happen here in order to get these upgrades going

  • remove all the plugins, since those are not a thing in v4. This required a good bit of refactoring
  • update to new session api. This was a big refactor in v4. Had to change a number of things to accommodate.
  • sessions table changed quite a bit. There's a migration here to update, and all the references in the code are touched.
  • v4 creates its own pgmoon connections without search_path set, then returns them to the shared pool. When the code picked up those reused connections, it skipped re-running SET search_path (it only ran setup on fresh connections), causing stuff like "relation admins does not exist" errors. There's some refactoring to deal with this.
  • cookies changed a lot. There's a number of changes to update to v4.

I tried to be verbose with comments in test/support/api_umbrella_test_helpers/admin_auth.rb, because it's kinda math-heavy. Leaned on built in libs as much as possible, but wanted to be clear about what's happening in that stuff.

@jtmkrueger jtmkrueger requested a review from GUI February 18, 2026 18:24
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.

Update admin to lua-resty-session v4

1 participant