#12592 closed enhancement (fixed)
Avoid disabling login/logout in slave projects
Reported by: | Ryan J Ollos | Owned by: | Ryan J Ollos |
---|---|---|---|
Priority: | normal | Component: | SharedCookieAuthPlugin |
Severity: | normal | Keywords: | |
Cc: | Trac Release: |
Description (last modified by )
The Configuration directives state that LoginModule
must be disabled in slave projects. This is also discussed in #5566. However, it would be ideal if we could prevent expiring the cookie, and thus avoid the need to disable the LoginModule
in slave projects.
The proposed change will work-around the existing behavior. Ideally though, we could do a bit better by adding the feature to Trac, as an optional Component residing in tracopt.web.auth
(trac:#12257).
Attachments (0)
Change History (10)
comment:1 Changed 9 years ago by
Description: | modified (diff) |
---|
comment:2 Changed 9 years ago by
Resolution: | → fixed |
---|---|
Status: | new → closed |
comment:3 Changed 9 years ago by
Owner: | changed from agitronic to Ryan J Ollos |
---|
I'd be interested to know if anyone sees a better way to avoid expiring the cookie. I considered subclassing LogingModule
, but felt that [15075] was a simpler solution.
Documentation modified in SharedCookieAuthPlugin@14.
comment:5 Changed 9 years ago by
I don't look closely however I think use_cache=True
argument should be used for open_environment()
. In [15076], it seems Environment
instance is created on every request and every Trac environment. That would be very slow.
comment:6 follow-up: 8 Changed 9 years ago by
The list of RequestDispatcher
objects is cached: sharedcookieauthplugin/trunk/sharedcookieauth/sharedcookieauth.py@15076:24,37-38#L23, so open_environment
will only be called once for each environment.
comment:8 Changed 9 years ago by
Replying to rjollos:
The list of
RequestDispatcher
objects is cached: sharedcookieauthplugin/trunk/sharedcookieauth/sharedcookieauth.py@15076:24,37-38#L23, soopen_environment
will only be called once for each environment.
Okay. I consider there is another issue. The cached RequestDispatcher
instances have Environment
instance which has old configurations if trac.ini
of the environment is changed. The Environment
instances wouldn't be reloaded forever.
comment:9 Changed 9 years ago by
Thanks for spotting the issue. The issue also exists in version 0.1.4, which I tagged before starting work. I created ticket #12596 to address the issue.
In 15075: