-
Notifications
You must be signed in to change notification settings - Fork 2
Command Reference
This page contains an in-depth description of the management commands provided by django_pph.
### promote_user$ ./manage.py promote_user [username]
Promote user only takes the desired username to promote as its first argument; further arguments will be ignored by the command.
The context doesn't need to be unlocked in order for the command to succeed.
This command will fail under the following scenarios:
- The username does not exist.
- There are repeated usernames (this means your database is malformed).
- The username is already part of the threshold accounts.
./manage.py demote_user [username]
This command removes a user from the accounts that count towards the threshold in the secret-recombination phase. In case a user becomes inactive or shouldn't be trusted, we advise to run this command right away.
In contrast to promote_user, this command needs an unlocked store in order to demote a user.
Promote user only takes the desired username to promote as its first argument; further arguments will be ignored by the command.
Demote user will fail in the following scenarios
- There are not enough threshold accounts to unlock the store after demoting the target user
- There are more than one usernames (the database is inconsistent)
- The username didn't belong to a threshold account
- The store is not unlocked.
$ ./manage.py migrate_user [username]
This command takes a user account that has been stored using a hash algorithm that's not Django_pph. In this case, we will attempt to turn the existing hash into a proper Django_pph thresholdless account. After this, we can also promote it to be a threshold account using promote_user.
Update_user only takes the desired username to update as its first argument; further arguments will be ignored by the command.
Demote user will fail in the following scenarios
- There are more than one usernames (the database is inconsistent)
- The username's passsword is already a Django_pph compliant hash.
- The username's password has been stored in a hash that's not supported by Django_pph for migration.
*** Warning, this command is intended to be called only once! ***
./manage.py setup_store username1 username2 ... usernameN
A list of threshold users for the initial PolyPasswordHasher setup.
Setup store will fail in the following scenarios:
- If the list provided doesnt comprise enough accounts to meet the threshold
- If it is not possible to update the database.
- The original hashes are not supported by PolyPasswordHasher