Skip to content

Commit

Permalink
update automation user secret generation
Browse files Browse the repository at this point in the history
use our own Password module

Change-Id: Ibaecc8d15cbb14c7a6e560ff1521073960373fe2
  • Loading branch information
kain88-de committed Oct 17, 2023
1 parent 8697bde commit 4a3e1ff
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions cmk/gui/userdb/store.py
Original file line number Diff line number Diff line change
Expand Up @@ -529,13 +529,13 @@ def _save_auth_serials(updated_profiles: Users) -> None:


def create_cmk_automation_user(now: datetime) -> None:
secret = utils.gen_id()
secret = Password.random(24)
users = load_users(lock=True)
users[UserId("automation")] = {
"alias": "Check_MK Automation - used for calling web services",
"contactgroups": [],
"automation_secret": secret,
"password": password_hashing.hash_password(Password(secret)),
"automation_secret": secret.raw,
"password": password_hashing.hash_password(secret),
"roles": ["admin"],
"locked": False,
"serial": 0,
Expand Down

0 comments on commit 4a3e1ff

Please sign in to comment.