use a proper kanidm user for api

This commit is contained in:
Inex Code 2025-01-10 04:31:19 +03:00
parent 178afef625
commit 7436dc3e53
No known key found for this signature in database

View file

@ -62,7 +62,7 @@ class KanidmAdminToken:
@staticmethod @staticmethod
def get() -> str: def get() -> str:
kanidm_admin_token: str | None = redis.get(REDIS_TOKEN_KEY) # type: ignore kanidm_admin_token: str | None = redis.get(REDIS_TOKEN_KEY) # type: ignore
if kanidm_admin_token is None or not KanidmAdminToken._is_token_valid( if kanidm_admin_token is None or not KanidmAdminToken._is_token_valid(
kanidm_admin_token kanidm_admin_token
@ -90,8 +90,8 @@ class KanidmAdminToken:
"api-token", "api-token",
"generate", "generate",
"--rw", "--rw",
"selfprivacy", "sp.selfprivacy-api.service-account",
"token2", "selfprivacy_api_token",
], ],
text=True, text=True,
) )