Conversation
|
Hello @Hockenba,
Update: This PR depends on bungle/lua-resty-session#208 status https://the-asf.slack.com/archives/CUC5MN17A/p1783014722148709 |
|
Some comments that you can address or state your reasoning on why you think the current approaches should remain:
"session": {
"storage": "cookie",
"redis": { "host": "127.0.0.1" },
"revocation": "redis",
"revocation_fail_mode": "closed"
}
|
You make a lot of great points. It is a little late in my time zone, so I'll refine this tomorrow based on your comments. One thing: the Chinese documentation needs to the created and pushed to this PR by someone who actually knowns Chinese. I do not know a lick of Chinese and I am sure we want better than what Google Translate will spit out for me. |
Thanks for the fast reply. For Chinese translation u can ask your agent to do it on your behalf, it usually does it right the first time if the change is not so complex. If there's any issue then maintainers will give some feedback. |
I wasn't sure how good agents are at English to Chinese translation. Sounds good. Will do. I'll be spending my workday tomorrow refactoring and addressing your comments with either commits or follow up discussion (Eastern Standard Time). So be on the look out for that. Thanks. |
7e084f2 to
72f7000
Compare
Done. Refactored it quite a bit. Cut out all the unnecessary bloat. Ready for review again. |
|
Thanks for addressing my concerns, however few issues remain:
|
05f98a6 to
4c92d96
Compare
1-4 should be addressed. |
|
Thanks, 1-4 look good and |
2ea49cd to
2548150
Compare
Should be all addressed now. I ran all the openid-connect tests, and they all passed. No idea why the CI tests failed, but none are related to my changes or even the openid-connect plugin. |
7de0bcc to
0c3c35c
Compare
|
could u rebase/merge with master to fix CI |
@janiussyafiq Done. |
membphis
left a comment
There was a problem hiding this comment.
This introduces a Redis lookup on every request that opens an existing cookie session when session.revocation is redis, not only on logout. For example, 100 requests using the same session within 3–5 seconds can generate roughly 100 Redis GETs.
Could we add a small, short-lived local cache keyed by the hashed session ID? On a cache miss, query Redis and cache the result for around 3–5 seconds. Logout should update or invalidate the local cache after writing the revocation marker. This keeps the implementation simple while avoiding dense repeated lookups for the same session. The TTL would be the maximum local stale window for a just-revoked session.
@membphis PR for this: bungle/lua-resty-session#213. Please take a quick peak when you have the time to review. |
e9022c1
There was a problem hiding this comment.
🟡 Changes recommended
Two exposed cache TTL options are unsupported by the pinned session library and are silently ignored.
Get a fresh assessment by requesting another Copilot review.
Review details
- Files reviewed: 5/5 changed files
- Comments generated: 1
- Review effort level: Balanced
| "Worker-local TTL in seconds for successful revocation " | ||
| .. "lookups. 0 disables. Default is 5 in lua-resty-session.", | ||
| }, | ||
| revocation_error_cache_ttl = { |
There was a problem hiding this comment.
Yes. Still feel free to take a peak at to make sure that I implemented what was requested :)
3ffbfcb to
e9022c1
Compare
…penid-connect-stateless-session-revocation
Description
Adds opt-in Redis-backed revocation for OpenID Connect cookie sessions.
Setting
session.revocationtoredisenables lua-resty-session's Redis revocation backend.session.revocation_fail_modedefaults toopenand can be set toclosed. Redis-backed session storage remains unchanged, and incompatible or incomplete configurations are rejected.Session options remain a direct pass-through to lua-resty-session. The deprecated
session.cookie.lifetimealias continues to writeabsolute_timeoutto the shared configuration, so its warning is not emitted on every request.This also upgrades
lua-resty-sessionto4.2.0-1and lua-resty-openidc to1.9.1-1and documents the feature in English and Chinese.Which issue(s) this PR fixes:
N/A
Test plan
open, explicitclosed, and omitted revocation configurations.Checklist