From: Adurti Date: Tue, 14 Nov 2023 11:14:53 +0000 (+0000) Subject: Fix Bug 2313: Development of User Management environmental variable X-Git-Url: https://osm.etsi.org/gitweb/?a=commitdiff_plain;h=3cbec01d14710810232b2d1053ad1f706a041f2f;p=osm%2FNBI.git Fix Bug 2313: Development of User Management environmental variable Change-Id: Id21a297b9610429e96976cc8642d9de1a942bec2 Signed-off-by: Adurti --- diff --git a/osm_nbi/nbi.py b/osm_nbi/nbi.py index 07219bc..5e04371 100644 --- a/osm_nbi/nbi.py +++ b/osm_nbi/nbi.py @@ -1942,6 +1942,15 @@ def _start_service(): if k == "OSMNBI_USER_MANAGEMENT": feature_state = eval(v.title()) engine_config["authentication"]["user_management"] = feature_state + elif k == "OSMNBI_PWD_EXPIRE_DAYS": + pwd_expire_days = int(v) + engine_config["authentication"]["pwd_expire_days"] = pwd_expire_days + elif k == "OSMNBI_MAX_PWD_ATTEMPT": + max_pwd_attempt = int(v) + engine_config["authentication"]["max_pwd_attempt"] = max_pwd_attempt + elif k == "OSMNBI_ACCOUNT_EXPIRE_DAYS": + account_expire_days = int(v) + engine_config["authentication"]["account_expire_days"] = account_expire_days if not k.startswith("OSMNBI_"): continue k1, _, k2 = k[7:].lower().partition("_")