add generate-salt task and remove deploy rotate-secret

This commit is contained in:
Kenneth Kehl
2024-08-23 07:23:35 -07:00
parent 4f62d1486d
commit 861d604a58
2 changed files with 13 additions and 27 deletions

View File

@@ -1053,3 +1053,15 @@ def add_test_users_to_db(generate, state, admin):
platform_admin=admin,
)
print(f"{num} {user.email_address} created")
# generate a new salt value
@notify_command(name="generate-salt")
def generate_salt():
salt = secrets.token_hex(16)
# We want to print here. This value is
# generated locally for the developer doing
# the salt rotation task, so we don't care if
# the task is somehow run on production tier and
# appears in the logs, because that will not be
# the correct value.
print(salt)