Skip to content
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

Replace repoze.who-friendlyform with a modern alternative #4796

Closed
amercader opened this issue May 23, 2019 · 0 comments · Fixed by #4912
Closed

Replace repoze.who-friendlyform with a modern alternative #4796

amercader opened this issue May 23, 2019 · 0 comments · Fixed by #4912
Assignees

Comments

@amercader
Copy link
Member

We use the repoze.who-friendlyform plugin during our authentication process. This plugin was last updated on 2010 and it's not py3 ready. More specifically we use it as Indentifier (extract user name and password from the WSGI env) and as a Challenger (present the user with a login/logout page). See the who.ini file.

The FriendlyForm plugin extends a default repoze.who one, RedirectorPlugin with some extra functionality. The one that we use is

Developers may define post-login and/or post-logout pages.

Approach

This is a pretty critical functionality so we need to come up with a good replacement strategy. It might be tempting to try to replace the whole repoze.who authenticating system with something like Flask-login, which has a much simpler and straight-forward integration and is better supported, but that is a big change, as we use some of the repoze.who assumptions at differents parts of the code (eg relying on the REMOTE_USER environ variable). So I'd suggest to plan that for a later stage and keep repoze.who in place for at least 2.9.

This means replacing or upgrading repoze.who-friendlyform. The plugin itself is not massive:

https://gist.github.com/amercader/0643f17f3d9641a49c3ed9f630d545df

So perhaps the best solution for now is to include this as part of the CKAN code base and upgrade it to run on Python 3

Story points

5

@amercader amercader added this to To do in Python 3 Support May 23, 2019
amercader added a commit that referenced this issue Jul 19, 2019
amercader added a commit that referenced this issue Jul 19, 2019
* Change urllib imports to six ones
* Replace usage of paster methods
amercader added a commit that referenced this issue Jul 19, 2019
@amercader amercader moved this from To do - Enabling to In Progress in Python 3 Support Jul 19, 2019
@amercader amercader self-assigned this Jul 19, 2019
amercader added a commit that referenced this issue Jul 26, 2019
amercader added a commit that referenced this issue Aug 2, 2019
smotornyuk added a commit that referenced this issue Aug 13, 2019
@amercader amercader moved this from In Progress to Done in Python 3 Support Aug 22, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Development

Successfully merging a pull request may close this issue.

1 participant