added log audit message after _get_one_by_scope_and_name
@@ -274,6 +274,18 @@ class KeyValuePairController(ResourceController):
scope=FULL_SYSTEM_SCOPE,
name=key,
)
+ if decrypt:
+ LOG.audit(
+ "User %s decrypted the value %s ",
+ user,
+ name,
+ extra={
+ "user": user,
+ "scope": FULL_SYSTEM_SCOPE,
+ "key_name": key,
+ "operation": "decrypt",
+ },
+ )
kvp_apis_system.append(item)
except Exception as e:
LOG.error("Unable to get key %s: %s", key, str(e))
