-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(setup): Zope root cookie auth and login form #65
Conversation
@rpatterson thanks for creating this Pull Request and help improve Plone! To ensure that these changes do not break other parts of Plone, the Plone test suite matrix needs to pass. Whenever you feel that the pull request is ready to be tested, either start all jenkins jobs pull requests by yourself, or simply add a comment in this pull request stating:
With this simple comment all the jobs will be started automatically. Happy hacking! |
The GenericSetup "various" import step that originally installs PAS into a Plone portal also migrates the Zope root `/acl_users`. Probably an accident over time, but it results in a cookie auth plugin that doesn't work outside of the Plone portal: 2021-12-27 11:12:02,243 ERROR [Zope.SiteErrorLog:22][waitress-0] ComponentLookupError: http://localhost:49080/api/acl_users/credentials_cookie_auth/login Traceback (innermost last): Module ZPublisher.WSGIPublisher, line 162, in transaction_pubevents Module ZPublisher.WSGIPublisher, line 372, in publish_module Module ZPublisher.WSGIPublisher, line 266, in publish Module ZPublisher.mapply, line 85, in mapply Module ZPublisher.WSGIPublisher, line 63, in call_object Module Products.PlonePAS.plugins.cookie_handler, line 106, in login Module Products.PluggableAuthService.PluggableAuthService, line 1153, in updateCredentials Module Products.PlonePAS.plugins.cookie_handler, line 74, in updateCredentials Module zope.component._api, line 165, in getUtility zope.interface.interfaces.ComponentLookupError: (<InterfaceClass plone.registry.interfaces.IRegistry>, '') This import step also removes the `login_form` template which breaks the challenge response. Add an interface check to decide whether to install Plone's `ExtendedCookieAuthHelper` or PAS's vanilla `CookieAuthHelper`.
ac0f396
to
17deb97
Compare
@jenkins-plone-org please run jobs |
Everything is green, @jensens. LMK if there's anything I can do to move this forward. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall LGTM. Suggested minor change would be nice to get rid of old format strings.
LMK if I should merge this myself or if there's otherwise anything I should do to get this merged, @jensens. |
Wow, this is astonishingly good work. Not only is the code clearer, it must have taken a helluva lot of work to understand the old one (in particular with the amount of context needed from back in the Zope 2 days) and get it working again. Thanks. |
The GenericSetup "various" import step that originally installs PAS into a Plone portal
also migrates the Zope root
/acl_users
. Probably an accident over time, but itresults in a cookie auth plugin that doesn't work outside of the Plone portal:
This import step also removes the
login_form
template which breaks the challengeresponse.
Add an interface check to decide whether to install Plone's
ExtendedCookieAuthHelper
or PAS's vanilla
CookieAuthHelper
.