-
Notifications
You must be signed in to change notification settings - Fork 48
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
Discussion of long term methods of addressing 2FA Account Recovery Requests #796
Comments
Thank you Ee for taking the time to bring this up ! I'd like to summarize publicly the ideas that I suggested when we discussed this issue earlier:
Of course, we can imagine exceptions in cases where not making one would have an effect on the Python community at large but it's not that simple. The more popular a package is, the more breaking it would be if its maintainers couldn't upload it anymore and had to switch to a new name, but at the same time, the more attractive it would be for hackers and the more catastrophic handing it over to the wrong person would be. Has the case ever happened of all owners of a popular package loosing access to their PyPI account ? With solution 2 (the one I'd favor), we're making Warehouse a little bit less user friendly, but more secure, in that we're removing official ways to bypass our own security measures. I'd find this reassuring. |
Does this need to be a secret or an email? Otherwise, it seems like everything except for step 7 could be done in the issue thread by moderators, at which point it could be transferred to admins for reset (similar to PEP 541 requests). |
It is delivered to the primary email address on the account via email to confirm that the person requesting here controls the account there. If we don’t perform the request via email it doesn’t offer the chance for a invalid request to be flagged by the real owner. |
That being said, if we want to continue down this path, we could make a one-click button in the admin that sends the email and adds the secret string to the security logs that are displayed on the page. And add a saved reply in GitHub so that we can quickly answer on the ticket. |
|
Just dumping the tooling I use to generate the email templates and tokens, in case anyone wanted to implement an admin button. |
Until we have the admin button implemented, we can also start making progress on the backlog today by having a workflow that requires less admin time and can be collaboratively used. I propose that:
With that, the process is basically: flowchart TD
A[[New ticket]] --> B{{user exists}}
B --> |no| close
B --> |yes| C{{reported status matches 2FA enrollment}}
C --> |no| close
C --> |yes| D{{Does the user have other 2FA methods?}}
D --> |yes| E[Ask the user to use the alternative methods.]
E --> |has access| close
E --> |no access| F
D --> |no| F{{Does the user have any projects registered?}}
F --> |no| L[Make a comment\nthat no projects are registered]
L --> admin-reset[Mark for an admin to reset the password]
F --> |yes| G("Determine all 'security boundaries'\n(eg: GitHub org or code hosting service)\nbased on public source code repositories\n associated with the Users' Projects, from releases\nof the Project from before the request")
G --> H[For each security boundary,\nrequest a branch to be pushed to a repository\nwith a unique randomly generated secret\nvia the registered email]
H --> |user confirms that they've pushed branches| J[Validate that the branches are pushed]
J --> K[Make a comment\nlisting the validated security boundaries]
K --> admin-reset
admin-reset --> resolved
style close fill:#f99
style admin-reset fill:#ff9
style resolved fill:#9f9
(yay, mermaid support on GitHub) The only thing that needs the admin bit on PyPI is the admin-reset, who should be able to action on the issue based on the final comment in the issue. If we can't have a shared inbox, that'd make this less appealing. OTOH, we can work around that by sharing the tokens on one of our shared moderator+admin non-public discussion forums, or by having the moderator/admin who sent the verification emails assign themselves on the issue making it clear who knows the verification information and is responsible for validating it. |
I’ve gone ahead and pinned this for visibility. It’s still a locked issue. |
The PSF has hired a full-time support role, and 2FA/Account Recovery request are now being processed consistently. Closing. |
Opening this as a follow on from #679 for @pypa/warehouse-team to discuss possible methods for addressing 2FA requests, which were honestly an overwhelming task.
There were some suggestions in the thread that may be worth bringing over to this discussion, but to start things off
Here is the basic flow I use:
Template:
The text was updated successfully, but these errors were encountered: