{
  "schema_version": "1.0",
  "publisher": "AI Release",
  "article": {
    "title": "How to Secure an LLM Application: Step-by-Step Setup of an LLM Secure Gateway, WAF and Prompt Filtering",
    "canonical_url": "https://ai-release.org/guides/kak-zaschitit-llm-prilozhenie-poshagovaya-nastroyka-llm_en.html",
    "language": "en",
    "article_type": "guide",
    "published_at": null,
    "updated_at": "2026-11-22T00:00:00+00:00"
  },
  "summary": "Time to complete: 45 minutes Difficulty: Intermediate",
  "topics": [
    "LLM Secure Gateway",
    "как защитить LLM приложение",
    "WAF для LLM",
    "защита от prompt injection",
    "фильтрация промптов"
  ],
  "entities": [
    {
      "id": "E1",
      "name": "LLM Secure Gateway",
      "type": "тема/инструмент",
      "description": "упоминается в заголовке, TL;DR или разделах гайда",
      "url": null
    },
    {
      "id": "E2",
      "name": "как защитить LLM приложение",
      "type": "тема/инструмент",
      "description": "упоминается в заголовке, TL;DR или разделах гайда",
      "url": null
    },
    {
      "id": "E3",
      "name": "WAF для LLM",
      "type": "тема/инструмент",
      "description": "упоминается в заголовке, TL;DR или разделах гайда",
      "url": null
    },
    {
      "id": "E4",
      "name": "защита от prompt injection",
      "type": "тема/инструмент",
      "description": "упоминается в заголовке, TL;DR или разделах гайда",
      "url": null
    },
    {
      "id": "E5",
      "name": "фильтрация промптов",
      "type": "тема/инструмент",
      "description": "упоминается в заголовке, TL;DR или разделах гайда",
      "url": null
    },
    {
      "id": "E6",
      "name": "Linux",
      "type": "платформа/технология",
      "description": "упоминается в заголовке, TL;DR или разделах гайда",
      "url": null
    },
    {
      "id": "E7",
      "name": "Python",
      "type": "платформа/технология",
      "description": "упоминается в заголовке, TL;DR или разделах гайда",
      "url": null
    }
  ],
  "claims": [
    {
      "id": "AR-GUIDE-KAKZASCHIT-001",
      "statement": "Time to complete: 45 minutes",
      "claim_type": "guide_fact",
      "confidence": "not_assessed",
      "source_type": "заявление источника",
      "verification_status": "reported_unverified",
      "source_url": "https://ai-release.org/guides/kak-zaschitit-llm-prilozhenie-poshagovaya-nastroyka-llm_en.html",
      "article_anchor": "#tldr",
      "evidence_excerpt": "Time to complete: 45 minutes"
    },
    {
      "id": "AR-GUIDE-KAKZASCHIT-002",
      "statement": "Difficulty: Intermediate",
      "claim_type": "guide_fact",
      "confidence": "not_assessed",
      "source_type": "заявление источника",
      "verification_status": "reported_unverified",
      "source_url": "https://ai-release.org/guides/kak-zaschitit-llm-prilozhenie-poshagovaya-nastroyka-llm_en.html",
      "article_anchor": "#tldr",
      "evidence_excerpt": "Difficulty: Intermediate"
    },
    {
      "id": "AR-GUIDE-KAKZASCHIT-003",
      "statement": "You will need: a Linux host with systemd (Debian/Ubuntu family — for other distributions, check which package ships the nginx ModSecurity module in the official documentation), nginx, the ModSecurity connector for nginx, the OWASP Core Rule Set (CRS), Python 3 with venv, a TLS certificate for <your-domain>, and an API key from your LLM provider.",
      "claim_type": "guide_fact",
      "confidence": "not_assessed",
      "source_type": "заявление источника",
      "verification_status": "reported_unverified",
      "source_url": "https://ai-release.org/guides/kak-zaschitit-llm-prilozhenie-poshagovaya-nastroyka-llm_en.html",
      "article_anchor": "#tldr",
      "evidence_excerpt": "You will need: a Linux host with systemd (Debian/Ubuntu family — for other distributions, check which package ships the nginx ModSecurity module in the official documentation), nginx, the ModSecurity connector for nginx, the OWASP Core Rule Set (CRS), Python 3 with venv, a TLS certificate for <your-domain>, and an API key from your LLM provider."
    },
    {
      "id": "AR-GUIDE-KAKZASCHIT-004",
      "statement": "Root or sudo on the host; ports 8443 (public) and 8080 (loopback only) reachable as described.",
      "claim_type": "guide_fact",
      "confidence": "not_assessed",
      "source_type": "заявление источника",
      "verification_status": "reported_unverified",
      "source_url": "https://ai-release.org/guides/kak-zaschitit-llm-prilozhenie-poshagovaya-nastroyka-llm_en.html",
      "article_anchor": "#requirements",
      "evidence_excerpt": "Root or sudo on the host; ports 8443 (public) and 8080 (loopback only) reachable as described."
    },
    {
      "id": "AR-GUIDE-KAKZASCHIT-005",
      "statement": "A DNS record for <your-domain> pointing at the host, and a certificate at /etc/letsencrypt/live/<your-domain>/fullchain.pem plus privkey.pem. For a lab run you may swap in a self-signed pair, but curl will then need -k.",
      "claim_type": "guide_fact",
      "confidence": "not_assessed",
      "source_type": "заявление источника",
      "verification_status": "reported_unverified",
      "source_url": "https://ai-release.org/guides/kak-zaschitit-llm-prilozhenie-poshagovaya-nastroyka-llm_en.html",
      "article_anchor": "#requirements",
      "evidence_excerpt": "A DNS record for <your-domain> pointing at the host, and a certificate at /etc/letsencrypt/live/<your-domain>/fullchain.pem plus privkey.pem. For a lab run you may swap in a self-signed pair, but curl will then need -k."
    },
    {
      "id": "AR-GUIDE-KAKZASCHIT-006",
      "statement": "The provider key in an environment file, never in the nginx config: LLM_API_KEY=<provider-key>.",
      "claim_type": "guide_fact",
      "confidence": "not_assessed",
      "source_type": "заявление источника",
      "verification_status": "reported_unverified",
      "source_url": "https://ai-release.org/guides/kak-zaschitit-llm-prilozhenie-poshagovaya-nastroyka-llm_en.html",
      "article_anchor": "#requirements",
      "evidence_excerpt": "The provider key in an environment file, never in the nginx config: LLM_API_KEY=<provider-key>."
    }
  ],
  "relationships": [
    {
      "subject": "Guide",
      "predicate": "describes",
      "object": "How to Secure an LLM Application: Step-by-Step Setup of an LLM Secure Gateway, WAF and Prompt Filtering",
      "claim_id": "AR-GUIDE-KAKZASCHIT-001"
    },
    {
      "subject": "Guide",
      "predicate": "includes step",
      "object": "Step 1. Put a gateway in front of the model API",
      "claim_id": "AR-GUIDE-KAKZASCHIT-001"
    }
  ],
  "questions_and_answers": [
    {
      "question": "What is required?",
      "answer": "Root or sudo on the host; ports 8443 (public) and 8080 (loopback only) reachable as described.; A DNS record for <your-domain> pointing at the host, and a certificate at /etc/letsencrypt/live/<your-domain>/fullchain.pem plus privkey.pem. For a lab run you may swap in a self-signed pair, but curl will then need -k.;…",
      "claim_ids": [
        "AR-GUIDE-KAKZASCHIT-003"
      ],
      "article_anchor": "#requirements"
    },
    {
      "question": "How to do it?",
      "answer": "Step 1. Put a gateway in front of the model API → Step 2. Turn on the WAF and the prompt filter → Step 3. Run the acceptance test",
      "claim_ids": [
        "AR-GUIDE-KAKZASCHIT-004"
      ],
      "article_anchor": "#step-1"
    },
    {
      "question": "Which topics does it cover?",
      "answer": "LLM Secure Gateway, как защитить LLM приложение, WAF для LLM, защита от prompt injection, фильтрация промптов",
      "claim_ids": [
        "AR-GUIDE-KAKZASCHIT-002"
      ],
      "article_anchor": "#entities"
    },
    {
      "question": "What are the key points?",
      "answer": "Time to complete: 45 minutes Difficulty: Intermediate",
      "claim_ids": [
        "AR-GUIDE-KAKZASCHIT-007"
      ],
      "article_anchor": "#tldr"
    }
  ],
  "limitations": [
    "Current versions, prices and limits.",
    "Independent benchmarks and quality checks.",
    "Terms of use and data policy."
  ],
  "citation": {
    "preferred_citation": "AI Release. Как защитить LLM-приложение: пошаговая настройка LLM Secure Gateway, WAF и фильтрации промптов. https://ai-release.org/guides/kak-zaschitit-llm-prilozhenie-poshagovaya-nastroyka-llm_en.html",
    "canonical_url": "https://ai-release.org/guides/kak-zaschitit-llm-prilozhenie-poshagovaya-nastroyka-llm_en.html",
    "publisher": "AI Release"
  }
}