From 1150ec0971fbc1a6e4617a2d6017ebb6ac2368e9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Anders=20Fredrik=20Ki=C3=A6r?= <31612826+anders-kiaer@users.noreply.github.com> Date: Sun, 24 Oct 2021 20:14:19 +0200 Subject: [PATCH] Shorten AD secret lifetime (#541) --- webviz_config/_deployment/azure_cli.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/webviz_config/_deployment/azure_cli.py b/webviz_config/_deployment/azure_cli.py index 58128cd7..b596c749 100644 --- a/webviz_config/_deployment/azure_cli.py +++ b/webviz_config/_deployment/azure_cli.py @@ -366,13 +366,11 @@ def create_app_registration(display_name: str) -> str: return app_id -def create_secret( - app_registration_id: str, secret_description: str, years: int = 100 -) -> str: +def create_secret(app_registration_id: str, secret_description: str) -> str: object_id = _object_id_from_app_id(app_registration_id) - end_datetime = datetime.datetime.now() + datetime.timedelta(days=365.242 * years) + end_datetime = datetime.datetime.now() + datetime.timedelta(days=365) data = requests.post( f"{GRAPH_BASE_URL}/v1.0/applications/{object_id}/addPassword", json={