Major UI Improvment with blessing

This commit is contained in:
2025-10-30 12:28:56 -04:00
parent 9e8da97ad9
commit b3f48eb4df
17 changed files with 548 additions and 495 deletions
+2 -2
View File
@@ -14,12 +14,12 @@
# along with this program. If not, see <https://www.gnu.org/licenses/>.
from dataclasses import asdict
from datetime import datetime, timedelta
import json
import logging
import os
import re
from dataclasses import asdict
from datetime import datetime, timedelta
from typing import List
import pandas as pd
+9 -2
View File
@@ -21,15 +21,15 @@ import logging
import os
import sys
from bson import ObjectId
import pandas as pd
import tqdm
from bson import ObjectId
from models.policy import Policy
from services.API import AirlockAPIWrapper
from utils.configmanager import get_protected_json
from utils.setup import get_base_directory
from utils.utils import colorText
from utils.utils import areYouSure, colorText, get_sanitized_input
logger = logging.getLogger(__name__)
@@ -235,3 +235,10 @@ def updateAuditPoliciesFromEnforcementPolices(api: AirlockAPIWrapper):
for enforcement_policy, audit_policy in policy_relationship_map.items():
api.policy_clone(enforcement_policy, audit_policy)
api.policy_set_auditmode(audit_policy, "1")
def confirmUpdateAfromE(api: AirlockAPIWrapper):
areYouSure()
confirmation = get_sanitized_input("Type 'I AGREE' to continue: ")
if confirmation.strip() == "I AGREE":
updateAuditPoliciesFromEnforcementPolices(api)
+2 -2
View File
@@ -14,17 +14,17 @@
# along with this program. If not, see <https://www.gnu.org/licenses/>.
import base64
from getpass import getpass
import logging
import os
import platform
import re
import sys
from getpass import getpass
import keyring
from cryptography.hazmat.primitives import hashes
from cryptography.hazmat.primitives.ciphers.aead import AESGCM
from cryptography.hazmat.primitives.kdf.pbkdf2 import PBKDF2HMAC
import keyring
# Constants
KDF_ITERATIONS = 200_000