Repository navigation
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. |
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
|
@juzhiyuan @membphis Hey, the lua-resty-session maintainer told me he won’t cut a new release until he’s made a few more changes on top of my in-memory cache PR (which is already merged). He didn’t give a timeline, but he’s actively working on it. So this PR isn’t abandoned, just stalled for now. Once the new version is published, it’s ready to go after I update the version file here. |
…penid-connect-stateless-session-revocation # Conflicts: # apisix-master-0.rockspec
20e13f8 to
df39083
Compare
|
@juzhiyuan @membphis Ready for review. Bungle updated the version. We now have a in memory cache that sits in front of the redis revocation store. |
Done. |
…ache lua-resty-session 4.3.0 allocates its revocation cache only when revocation_cache_ttl > 0, but reads it when either TTL is set. A zero lookup TTL with the default error TTL therefore indexed a nil cache. Force the error TTL to 0 in that case, and add a test that counts store lookups across repeated opens of one session.
ad0aba6 to
07ecd1f
Compare
The session library reads its cookie through an nginx variable that is cached per request, so saving and re-opening in one request never sees the new cookie. Split the test into a save request and open requests.
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.3.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