Feature request: REST api to verify password

Bug #1065447 reported by Dieter Maurer
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
GNU Mailman
Fix Released
High
Barry Warsaw

Bug Description

"mailman" manages users with their individual passwords. It is supposed to be controlled via a REST api which uses a global (user independent) authentication. Obviously, an arbitrary user should not be allowed to change preferences (and other settings) for a different user. This implies that a REST client has to check user access rights and (especially) verify the user's identity. The typical way for user identity verification would be to check that the user knows the password registered with this user in "mailman". However, the REST api lacks a corresponding operation.

The REST api should probably be extended by a "verify_password" user subresource. To avoid passwords being logged by typical webserver logging, the password to be verified should probably be submitted via "POST" (not transmitted as part of the "URL").

If the project does not want to go this route (password verification via a REST operation), then it must document how a client can verify a given cleartext password against the encrypted password information available as user attribute.

Tags: mailman3 rest

Related branches

Barry Warsaw (barry)
tags: added: mailman3 rest
Revision history for this message
Barry Warsaw (barry) wrote :

Here's how I'm going to do this. You post to http://.../users/{id}/login and the form data must contain exactly one parameter `cleartext_password`. If the value matches the stored, hashed password, an HTTP 204 (No Content) is returned. If they do not match, an HTTP 403 (Forbidden) is returned. There is no content body in either case, and thus the POST creates no addressable resource.

The nice thing is that this will support hash migration as per passlib.

Changed in mailman:
milestone: none → 3.0.0b3
assignee: nobody → Barry Warsaw (barry)
importance: Undecided → High
status: New → In Progress
Barry Warsaw (barry)
Changed in mailman:
status: In Progress → Fix Committed
Barry Warsaw (barry)
Changed in mailman:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.