import json


def rule(event):
    if all(
        [
            event.deep_get("cs-method", default="") == "GET",
            "/access/set" in event.deep_get("cs-uri-stem", default=""),
            "param=enableapi" in event.deep_get("cs-uri-stem", default=""),
            "value=1" in event.deep_get("cs-uri-stem", default=""),
            any(
                [
                    "Basic Jz" in json.dumps(event.to_dict()),
                    "Basic c7" in json.dumps(event.to_dict()),
                    "Basic nO" in json.dumps(event.to_dict()),
                    "Basic ';" in json.dumps(event.to_dict()),
                ]
            ),
        ]
    ):
        return True
    return False
