def rule(event):
    if all(
        [
            "/api/v2.0/user/remoteserver.saml" in event.deep_get("cs-uri-query", default=""),
            event.deep_get("cs-method", default="") == "POST",
            not "/root/user/remote-user/saml-user/" in event.deep_get("cs-referer", default=""),
            not event.deep_get("cs-referer", default="") == "",
        ]
    ):
        return True
    return False
