annotate MANIFEST.in @ 5457:f629e9a0c376

auth: secure password reset implementation This is a better implementation of password reset function, which doesn't involve sending a new password to the user's email address in clear text, and at the same time is stateless. The old implementation generated a new password and sent it in clear text to whatever email assigned to the user currently, so that any user, possibly unauthenticated, could request a reset for any username or email. Apart from potential insecurity, this made it possible for anyone to disrupt users' workflow by repeatedly resetting their passwords. The idea behind this implementation is to generate an authentication token which is dependent on the user state at the time before the password change takes place, so the token is one-time and can't be reused, and also to bind the token to the browser session. The token is calculated as SHA1 hash of the following: * user's identifier (number, not a name) * timestamp * hashed user's password * session identifier * per-application secret We use numeric user's identifier, as it's fixed and doesn't change, so renaming users doesn't affect the mechanism. Timestamp is added to make it possible to limit the token's validness (currently hard coded to 24h), and we don't want users to be able to fake that field easily. Hashed user's password is needed to prevent using the token again once the password has been changed. Session identifier is an additional security measure to ensure someone else stealing the token can't use it. Finally, per-application secret is just another way to make it harder for an attacker to guess all values in an attempt to generate a valid token. When the token is generated, an anonymous user is directed to a confirmation page where the timestamp and the usernames are already preloaded, so the user needs to specify the token. User can either click the link in the email if it's really them reading it, or to type the token manually. Using the right token in the same session as it was requested directs the user to a password change form, where the user is supposed to specify a new password (twice, of course). Upon completing the form (which is POSTed) the password change happens and a notification mail is sent. The test is updated to test the basic functionality with a bad and a good token, but it doesn't (yet) cover all code paths. The original work from Andrew has been thorougly reviewed and heavily modified by Søren Løvborg.
author Andrew Shadura <andrew@shadura.me>
date Sun, 17 May 2015 02:07:18 +0200
parents 19267f233d39
children 968f2d4214e8
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
4987
ff08d3cf9aef manifest: include (almost) all repo files in the release tar
Mads Kiilerich <madski@unity3d.com>
parents: 4569
diff changeset
1 include Apache-License-2.0.txt
ff08d3cf9aef manifest: include (almost) all repo files in the release tar
Mads Kiilerich <madski@unity3d.com>
parents: 4569
diff changeset
2 include CONTRIBUTORS
ff08d3cf9aef manifest: include (almost) all repo files in the release tar
Mads Kiilerich <madski@unity3d.com>
parents: 4569
diff changeset
3 include COPYING
ff08d3cf9aef manifest: include (almost) all repo files in the release tar
Mads Kiilerich <madski@unity3d.com>
parents: 4569
diff changeset
4 include LICENSE-MERGELY.html
ff08d3cf9aef manifest: include (almost) all repo files in the release tar
Mads Kiilerich <madski@unity3d.com>
parents: 4569
diff changeset
5 include LICENSE.md
ff08d3cf9aef manifest: include (almost) all repo files in the release tar
Mads Kiilerich <madski@unity3d.com>
parents: 4569
diff changeset
6 include MIT-Permissive-License.txt
ff08d3cf9aef manifest: include (almost) all repo files in the release tar
Mads Kiilerich <madski@unity3d.com>
parents: 4569
diff changeset
7 include README.rst
ff08d3cf9aef manifest: include (almost) all repo files in the release tar
Mads Kiilerich <madski@unity3d.com>
parents: 4569
diff changeset
8 include development.ini
1078
2d7a94f3eaae added docs to manifest, updated setup script
Marcin Kuzminski <marcin@python-works.com>
parents: 1077
diff changeset
9 recursive-include docs *
1143
0e6035a85980 added changes made in production branch back into beta
Marcin Kuzminski <marcin@python-works.com>
parents: 1078
diff changeset
10 recursive-include init.d *
4987
ff08d3cf9aef manifest: include (almost) all repo files in the release tar
Mads Kiilerich <madski@unity3d.com>
parents: 4569
diff changeset
11 include kallithea/bin/ldap_sync.conf
ff08d3cf9aef manifest: include (almost) all repo files in the release tar
Mads Kiilerich <madski@unity3d.com>
parents: 4569
diff changeset
12 include kallithea/bin/template.ini.mako
ff08d3cf9aef manifest: include (almost) all repo files in the release tar
Mads Kiilerich <madski@unity3d.com>
parents: 4569
diff changeset
13 include kallithea/config/deployment.ini_tmpl
ff08d3cf9aef manifest: include (almost) all repo files in the release tar
Mads Kiilerich <madski@unity3d.com>
parents: 4569
diff changeset
14 recursive-include kallithea/i18n *
ff08d3cf9aef manifest: include (almost) all repo files in the release tar
Mads Kiilerich <madski@unity3d.com>
parents: 4569
diff changeset
15 recursive-include kallithea/lib/dbmigrate *.py_tmpl README migrate.cfg
ff08d3cf9aef manifest: include (almost) all repo files in the release tar
Mads Kiilerich <madski@unity3d.com>
parents: 4569
diff changeset
16 recursive-include kallithea/public *
4186
7e5f8c12a3fc First step in two-part process to rename directories to kallithea.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 1512
diff changeset
17 recursive-include kallithea/templates *
4987
ff08d3cf9aef manifest: include (almost) all repo files in the release tar
Mads Kiilerich <madski@unity3d.com>
parents: 4569
diff changeset
18 recursive-include kallithea/tests/fixtures *
ff08d3cf9aef manifest: include (almost) all repo files in the release tar
Mads Kiilerich <madski@unity3d.com>
parents: 4569
diff changeset
19 recursive-include kallithea/tests/scripts *
5416
19267f233d39 tests: move test.ini to kallithea/tests/
Mads Kiilerich <madski@unity3d.com>
parents: 5303
diff changeset
20 include kallithea/tests/test.ini
4987
ff08d3cf9aef manifest: include (almost) all repo files in the release tar
Mads Kiilerich <madski@unity3d.com>
parents: 4569
diff changeset
21 include kallithea/tests/vcs/aconfig