본문으로 바로가기 본문 바로가기
WIKI 기술 지식 베이스

AI GCP Model Armor 플러그인 구성 레퍼런스

원문 보기 위키 갱신

AI GCP Model Armor 플러그인 구성 레퍼런스 (AI GCP Model Armor Plugin Configuration Reference)

이 문서는 Kong의 AI GCP Model Armor 플러그인에서 설정할 수 있는 모든 파라미터를 정리한 구성 참조 문서예요. GCP 서비스 계정 인증 필드부터 가드레일 동작 방식을 정하는 guarding_mode, 다국어 탐지, 차단된 콘텐츠 로깅 같은 옵션까지 각 필드의 설명, 기본값, 타입을 한눈에 확인할 수 있어요. 시크릿 참조나 암호화가 적용되는 필드도 함께 표시되어 있어서 운영 환경에 맞게 안전하게 설정값을 구성할 때 유용해요

출처: 문서

본문

{
  "properties": {
    "config": {
      "properties": {
        "enable_multi_language_detection": {
          "default": false,
          "description": "Enables multi-language detection mode. Must be used with 'source_language'.",
          "type": "boolean"
        },
        "gcp_metadata_url": {
          "description": "Custom metadata URL for GCP authentication. Useful for restricted network environments or custom GCP endpoints. If null, Kong will use the default Google metadata endpoint. \nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).",
          "type": "string",
          "x-referenceable": true
        },
        "gcp_oauth_token_url": {
          "description": "Custom OAuth token URL for GCP authentication. Useful for restricted network environments or custom GCP endpoints. If null, Kong will use the default Google OAuth token endpoint. \nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).",
          "type": "string",
          "x-referenceable": true
        },
        "gcp_service_account_json": {
          "description": "Set this field to the full JSON of the GCP service account to authenticate, if required. If null (and gcp_use_service_account is true), Kong will attempt to read from environment variable `GCP_SERVICE_ACCOUNT` or from the instance/container metadata service. \nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault). \nThis field is [encrypted](/gateway/keyring/).",
          "type": "string",
          "x-encrypted": true,
          "x-referenceable": true
        },
        "gcp_use_service_account": {
          "default": false,
          "description": "Use service account auth for GCP-based providers and models.",
          "type": "boolean"
        },
        "guarding_mode": {
          "default": "INPUT",
          "description": "The guardrail mode to use for the request",
          "enum": [
            "BOTH",
            "INPUT",
            "OUTPUT"
          ],
          "type": "string"
        },
        "location_id": {
          "description": "GCP Location ID for the GCP Model Armor subscription.",
          "type": "string"
        },
        "log_blocked_content": {
          "default": false,
          "description": "Whether to log prompts and responses that are blocked by the guardrail.",
          "type": "boolean"
        },
        "project_id": {
          "description": "GCP Project ID for the GCP Model Armor subscription.",
          "type": "string"
        },
        "request_failure_message": {
          "default": "Request was filtered by GCP Model Armor",
          "description": "The message to return when a failure occurs on the request phase.",
          "type": "string"
        },
        "response_buffer_size": {
          "default": 100,
          "description": "The amount of bytes receiving from upstream to be buffered before sending to the model armor service. This only applies to the response content guard.",
          "type": "number"
        },
        "response_failure_message": {
          "default": "Response was filtered by GCP Model Armor",
          "description": "The message to return when a failure occurs on the response phase.",
          "type": "string"
        },
        "reveal_failure_categories": {
          "default": false,
          "description": "Whether to reveal failure categories in the response to the caller.",
          "type": "boolean"
        },
        "source_language": {
          "description": "Source language (ISO code) to use when 'enable_multi_language_detection' is enabled.",
          "type": "string"
        },
        "stop_on_error": {
          "default": true,
          "description": "Stop processing if an error occurs.",
          "type": "boolean"
        },
        "template_id": {
          "description": "GCP Model Armor Template ID to enforce.",
          "type": "string"
        },
        "text_source": {
          "default": "last_message",
          "description": "Select where to pick the 'text' for the GCP Model Armor Services request.",
          "enum": [
            "concatenate_all_content",
            "concatenate_user_content",
            "last_message"
          ],
          "type": "string"
        },
        "timeout": {
          "default": 10000,
          "description": "Connection timeout with the GCP Model Armor service",
          "type": "number"
        }
      },
      "required": [
        "location_id",
        "project_id",
        "template_id"
      ],
      "type": "object"
    },
    "consumer": {
      "additionalProperties": false,
      "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.",
      "properties": {
        "id": {
          "type": "string"
        }
      },
      "type": "object"
    },
    "consumer_group": {
      "additionalProperties": false,
      "description": "If set, the plugin will activate only for requests where the specified consumer group has been authenticated. (Note that some plugins can not be restricted to consumers groups this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer Groups",
      "properties": {
        "id": {
          "type": "string"
        }
      },
      "type": "object"
    },
    "expressions": {
      "additionalProperties": true,
      "type": "object"
    },
    "protocols": {
      "default": [
        "grpc",
        "grpcs",
        "http",
        "https"
      ],
      "description": "A set of strings representing HTTP protocols.",
      "items": {
        "enum": [
          "grpc",
          "grpcs",
          "http",
          "https"
        ],
        "type": "string"
      },
      "type": "array"
    },
    "route": {
      "additionalProperties": false,
      "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.",
      "properties": {
        "id": {
          "type": "string"
        }
      },
      "type": "object"
    },
    "service": {
      "additionalProperties": false,
      "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.",
      "properties": {
        "id": {
          "type": "string"
        }
      },
      "type": "object"
    }
  },
  "required": [
    "config"
  ]
}

다음 단계

더 알아보기 (Learn more)

  • 필드가 볼트에 저장된 시크릿을 참조할 수 있는 방법은 이 문서에서 확인할 수 있어요 — referenceable
  • 필드 암호화 동작이 궁금하다면 키링 문서를 참고하세요 — encrypted
  • 실제로 플러그인을 설정하고 사용하는 방법은 이 가이드를 따라 해 보세요 — Use the AI GCP Model Armor plugin