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

Straiker Coding Agent Buffered 활성화

원문 보기 위키 갱신

Straiker Coding Agent Buffered 활성화 (Enable Straiker Coding Agent Buffered)

Straiker Coding Agent Buffered 플러그인은 Anthropic Messages 트래픽(예: Claude Code)을 프록시하는 Route에 적용해요. 응답을 점수가 매겨질 때까지 보관해서 클라이언트가 tool_use를 실행하기 전에 차단할 수 있지만, 첫 번째 토큰까지 시간이 추가된다는 점을 고려해야 해요. 설정 전에 nginx_http_client_body_buffer_size를 32m 이상으로 올리고 Straiker Defend API 키를 준비해야 하며, AI Proxy 플러그인과 같은 Route에 함께 사용하면 안 돼요.

출처: 문서

본문

Straiker Coding Agent Buffered 활성화v3.14+

Anthropic Messages 트래픽을 프록시하는 Route, 예를 들어 Claude Code에서 Straiker Coding Agent Buffered 플러그인을 활성화하세요.

이 구성은 Straiker Defend에 연결할 수 없을 때 열린 상태로 실패하며, 요청 및 응답 단계를 모두 포함하므로 Straiker 중단 시 모델이 이미 생성한 응답에 대해 503을 반환하지 않아요. 응답이 점수가 매겨질 때까지 보류되기 때문에, 이 플러그인은 클라이언트가 실행하기 전에 tool_use를 중지할 수 있는 유일한 Straiker 플러그인이에요. 단, 첫 번째 토큰까지 시간이 추가되는 비용이 들어요. 같은 Route에 AI Proxy를 연결하지 마세요. 작동 방식을 참조하세요.

이 플러그인은 nginx_http_client_body_buffer_size를 최소 32m로 올려야 해요. 본문 버퍼를 참조하세요.

사전 요구 사항

  • Straiker Coding Agent Buffered 플러그인이 설치되어 있고, nginx_http_client_body_buffer_size가 올라가 있어야 해요.
  • Straiker Defend API 키가 필요해요. 엔터프라이즈 API 키와 샌드박스 액세스는 Straiker 팀에 문의하세요.
  • Anthropic Messages API를 가리키는 Service가 필요해요. 예를 들어 https://api.anthropic.com이며, AI Proxy가 연결되지 않아야 해요. read_timeout을 넉넉하게 설정하세요. 예를 들어 600000으로요. 이는 읽기 간 타임아웃이지 전체 타임아웃이 아니에요. 하지만 버퍼링된 응답은 생성이 완료된 후에만 전달돼요.

환경 변수

  • STRAIKER_API_KEY: Straiker Defend API 키예요.

플러그인 설정하기

Global

decK

이 섹션을 kong.yaml 구성 파일에 추가하세요:

_format_version: "3.0"
plugins:
  - name: straiker-coding-agent-buffered
    config:
      api_key: ${{ env "DECK_STRAIKER_API_KEY" }}
      fail_open: true

{: data-file="kong.yaml" data-tool="deck" }

Admin API

다음 요청을 보내세요:

curl -i -X POST http://localhost:8001/plugins/ \
    --header "Accept: application/json" \
    --header "Content-Type: application/json" \
    --data '
    {
      "name": "straiker-coding-agent-buffered",
      "config": {
        "api_key": "'$STRAIKER_API_KEY'",
        "fail_open": true
      }
    }
    '
Konnect API

다음 요청을 보내세요:

curl -X POST https://{region}.api.konghq.com/v2/control-planes/{controlPlaneId}/core-entities/plugins/ \
    --header "accept: application/json" \
    --header "Content-Type: application/json" \
    --header "Authorization: Bearer $KONNECT_TOKEN" \
    --data '
    {
      "name": "straiker-coding-agent-buffered",
      "config": {
        "api_key": "'$STRAIKER_API_KEY'",
        "fail_open": true
      }
    }
    '

다음 자리표시자를 자신의 값으로 바꾸는 것을 잊지 마세요:

  • region: Kong Konnect가 호스팅되고 운영되는 지리적 리전이에요.
  • KONNECT_TOKEN: Konnect 계정과 연결된 Personal Access Token (PAT)이에요.
  • controlPlaneId: 컨트롤 플레인의 id예요.

리전별 URL과 personal access token에 대한 자세한 내용은 Konnect Control Planes Config API 참조를 확인하세요.

KIC
echo "
apiVersion: configuration.konghq.com/v1
kind: KongClusterPlugin
metadata:
  name:
  namespace: kong
  annotations:
    kubernetes.io/ingress.class: kong
  labels:
    global: 'true'
config:
  api_key: '$STRAIKER_API_KEY'
  fail_open: true
plugin: straiker-coding-agent-buffered
" | kubectl apply -f -
Terraform
사전 요구 사항: Personal Access Token을 구성하세요
terraform {
  required_providers {
    konnect = {
      source  = "kong/konnect"
    }
  }
}

provider "konnect" {
  personal_access_token = "$KONNECT_TOKEN"
  server_url            = "https://us.api.konghq.com/"
}

Konnect Gateway Plugin을 생성하려면 Terraform 구성에 다음을 추가하세요:

resource "konnect_gateway_plugin_straiker_coding_agent_buffered" "my_straiker_coding_agent_buffered" {
  enabled = true

  config = {
    api_key = var.straiker_api_key
    fail_open = true
  }

  control_plane_id = konnect_gateway_control_plane.my_konnect_cp.id
}

이 예제에서는 매니페스트에 다음 변수를 추가해야 해요. TF_VAR_name=value를 설정하여 런타임에 값을 지정할 수 있어요.

variable "straiker_api_key" {
  type = string
}

Service

decK

이 섹션을 kong.yaml 구성 파일에 추가하세요:

_format_version: "3.0"
plugins:
  - name: straiker-coding-agent-buffered
    service: serviceName|Id
    config:
      api_key: ${{ env "DECK_STRAIKER_API_KEY" }}
      fail_open: true

{: data-file="kong.yaml" data-tool="deck" }

다음 자리표시자를 자신의 값으로 바꾸는 것을 잊지 마세요:

  • serviceName|Id: 플러그인 구성이 대상으로 하는 서비스의 id 또는 name이에요.
Admin API

다음 요청을 보내세요:

curl -i -X POST http://localhost:8001/services/{serviceName|Id}/plugins/ \
    --header "Accept: application/json" \
    --header "Content-Type: application/json" \
    --data '
    {
      "name": "straiker-coding-agent-buffered",
      "config": {
        "api_key": "'$STRAIKER_API_KEY'",
        "fail_open": true
      }
    }
    '

다음 자리표시자를 자신의 값으로 바꾸는 것을 잊지 마세요:

  • serviceName|Id: 플러그인 구성이 대상으로 하는 서비스의 id 또는 name이에요.
Konnect API

다음 요청을 보내세요:

curl -X POST https://{region}.api.konghq.com/v2/control-planes/{controlPlaneId}/core-entities/services/{serviceId}/plugins/ \
    --header "accept: application/json" \
    --header "Content-Type: application/json" \
    --header "Authorization: Bearer $KONNECT_TOKEN" \
    --data '
    {
      "name": "straiker-coding-agent-buffered",
      "config": {
        "api_key": "'$STRAIKER_API_KEY'",
        "fail_open": true
      }
    }
    '

다음 자리표시자를 자신의 값으로 바꾸는 것을 잊지 마세요:

  • region: Kong Konnect가 호스팅되고 운영되는 지리적 리전이에요.
  • KONNECT_TOKEN: Konnect 계정과 연결된 Personal Access Token (PAT)이에요.
  • controlPlaneId: 컨트롤 플레인의 id예요.
  • serviceId: 플러그인 구성이 대상으로 하는 서비스의 id예요.

리전별 URL과 personal access token에 대한 자세한 내용은 Konnect Control Planes Config API 참조를 확인하세요.

KIC
echo "
apiVersion: configuration.konghq.com/v1
kind: KongPlugin
metadata:
  name:
  namespace: kong
  annotations:
    kubernetes.io/ingress.class: kong
config:
  api_key: '$STRAIKER_API_KEY'
  fail_open: true
plugin: straiker-coding-agent-buffered
" | kubectl apply -f -

다음으로, service 리소스에 어노테이션을 추가하여 KongPlugin 리소스를 적용하세요:

kubectl annotate -n kong service SERVICE_NAME konghq.com/plugins=
Terraform
사전 요구 사항: Personal Access Token을 구성하세요
terraform {
  required_providers {
    konnect = {
      source  = "kong/konnect"
    }
  }
}

provider "konnect" {
  personal_access_token = "$KONNECT_TOKEN"
  server_url            = "https://us.api.konghq.com/"
}

Konnect Gateway Plugin을 생성하려면 Terraform 구성에 다음을 추가하세요:

resource "konnect_gateway_plugin_straiker_coding_agent_buffered" "my_straiker_coding_agent_buffered" {
  enabled = true

  config = {
    api_key = var.straiker_api_key
    fail_open = true
  }

  control_plane_id = konnect_gateway_control_plane.my_konnect_cp.id
  service = {
    id = konnect_gateway_service.my_service.id
  }
}

이 예제에서는 매니페스트에 다음 변수를 추가해야 해요. TF_VAR_name=value를 설정하여 런타임에 값을 지정할 수 있어요.

variable "straiker_api_key" {
  type = string
}

Route

decK

이 섹션을 kong.yaml 구성 파일에 추가하세요:

_format_version: "3.0"
plugins:
  - name: straiker-coding-agent-buffered
    route: routeName|Id
    config:
      api_key: ${{ env "DECK_STRAIKER_API_KEY" }}
      fail_open: true

{: data-file="kong.yaml" data-tool="deck" }

다음 자리표시자를 자신의 값으로 바꾸는 것을 잊지 마세요:

  • routeName|Id: 플러그인 구성이 대상으로 하는 라우트의 id 또는 name이에요.
Admin API

다음 요청을 보내세요:

curl -i -X POST http://localhost:8001/routes/{routeName|Id}/plugins/ \
    --header "Accept: application/json" \
    --header "Content-Type: application/json" \
    --data '
    {
      "name": "straiker-coding-agent-buffered",
      "config": {
        "api_key": "'$STRAIKER_API_KEY'",
        "fail_open": true
      }
    }
    '

다음 자리표시자를 자신의 값으로 바꾸는 것을 잊지 마세요:

  • routeName|Id: 플러그인 구성이 대상으로 하는 라우트의 id 또는 name이에요.
Konnect API

다음 요청을 보내세요:

curl -X POST https://{region}.api.konghq.com/v2/control-planes/{controlPlaneId}/core-entities/routes/{routeId}/plugins/ \
    --header "accept: application/json" \
    --header "Content-Type: application/json" \
    --header "Authorization: Bearer $KONNECT_TOKEN" \
    --data '
    {
      "name": "straiker-coding-agent-buffered",
      "config": {
        "api_key": "'$STRAIKER_API_KEY'",
        "fail_open": true
      }
    }
    '

다음 자리표시자를 자신의 값으로 바꾸는 것을 잊지 마세요:

  • region: Kong Konnect가 호스팅되고 운영되는 지리적 리전이에요.
  • KONNECT_TOKEN: Konnect 계정과 연결된 Personal Access Token (PAT)이에요.
  • controlPlaneId: 컨트롤 플레인의 id예요.
  • routeId: 플러그인 구성이 대상으로 하는 라우트의 id예요.

리전별 URL과 personal access token에 대한 자세한 내용은 Konnect Control Planes Config API 참조를 확인하세요.

KIC
echo "
apiVersion: configuration.konghq.com/v1
kind: KongPlugin
metadata:
  name:
  namespace: kong
  annotations:
    kubernetes.io/ingress.class: kong
config:
  api_key: '$STRAIKER_API_KEY'
  fail_open: true
plugin: straiker-coding-agent-buffered
" | kubectl apply -f -

다음으로, httproute 또는 ingress 리소스에 어노테이션을 추가하여 KongPlugin 리소스를 적용하세요:

Gateway API
kubectl annotate -n kong httproute  konghq.com/plugins=
Ingress
kubectl annotate -n kong ingress  konghq.com/plugins=
Terraform
사전 요구 사항: Personal Access Token을 구성하세요
terraform {
  required_providers {
    konnect = {
      source  = "kong/konnect"
    }
  }
}

provider "konnect" {
  personal_access_token = "$KONNECT_TOKEN"
  server_url            = "https://us.api.konghq.com/"
}

Konnect Gateway Plugin을 생성하려면 Terraform 구성에 다음을 추가하세요:

resource "konnect_gateway_plugin_straiker_coding_agent_buffered" "my_straiker_coding_agent_buffered" {
  enabled = true

  config = {
    api_key = var.straiker_api_key
    fail_open = true
  }

  control_plane_id = konnect_gateway_control_plane.my_konnect_cp.id
  route = {
    id = konnect_gateway_route.my_route.id
  }
}

이 예제에서는 매니페스트에 다음 변수를 추가해야 해요. TF_VAR_name=value를 설정하여 런타임에 값을 지정할 수 있어요.

variable "straiker_api_key" {
  type = string
}

Consumer

decK

이 섹션을 kong.yaml 구성 파일에 추가하세요:

_format_version: "3.0"
plugins:
  - name: straiker-coding-agent-buffered
    consumer: consumerName|Id
    config:
      api_key: ${{ env "DECK_STRAIKER_API_KEY" }}
      fail_open: true

{: data-file="kong.yaml" data-tool="deck" }

다음 자리표시자를 자신의 값으로 바꾸는 것을 잊지 마세요:

  • consumerName|Id: 플러그인 구성이 대상으로 하는 컨슈머의 id 또는 name이에요.
Admin API

다음 요청을 보내세요:

curl -i -X POST http://localhost:8001/consumers/{consumerName|Id}/plugins/ \
    --header "Accept: application/json" \
    --header "Content-Type: application/json" \
    --data '
    {
      "name": "straiker-coding-agent-buffered",
      "config": {
        "api_key": "'$STRAIKER_API_KEY'",
        "fail_open": true
      }
    }
    '

다음 자리표시자를 자신의 값으로 바꾸는 것을 잊지 마세요:

  • consumerName|Id: 플러그인 구성이 대상으로 하는 컨슈머의 id 또는 name이에요.
Konnect API

다음 요청을 보내세요:

curl -X POST https://{region}.api.konghq.com/v2/control-planes/{controlPlaneId}/core-entities/consumers/{consumerId}/plugins/ \
    --header "accept: application/json" \
    --header "Content-Type: application/json" \
    --header "Authorization: Bearer $KONNECT_TOKEN" \
    --data '
    {
      "name": "straiker-coding-agent-buffered",
      "config": {
        "api_key": "'$STRAIKER_API_KEY'",
        "fail_open": true
      }
    }
    '

다음 플레이스홀더를 자신의 값으로 바꾸는 것을 잊지 마세요:

  • region: Kong Konnect가 호스팅되고 운영되는 지리적 리전입니다.

  • KONNECT_TOKEN: Konnect 계정과 연결된 개인 액세스 토큰(PAT)입니다.

  • controlPlaneId: 컨트롤 플레인의 id입니다.

  • consumerId: 플러그인 구성이 대상으로 하는 소비자의 id입니다.

리전별 URL과 개인 액세스 토큰에 대한 자세한 내용은 Konnect Control Planes Config API 참조를 확인하세요.

KIC
echo "
apiVersion: configuration.konghq.com/v1
kind: KongPlugin
metadata:
  name:
  namespace: kong
  annotations:
    kubernetes.io/ingress.class: kong
config:
  api_key: '$STRAIKER_API_KEY'
  fail_open: true
plugin: straiker-coding-agent-buffered
" | kubectl apply -f -

다음으로, KongConsumer 리소스에 주석을 달아 KongPlugin 리소스를 적용하세요:

kubectl annotate -n kong kongconsumer CONSUMER_NAME konghq.com/plugins=
Terraform
필수 조건: 개인 액세스 토큰 구성
terraform {
  required_providers {
    konnect = {
      source  = "kong/konnect"
    }
  }
}

provider "konnect" {
  personal_access_token = "$KONNECT_TOKEN"
  server_url            = "https://us.api.konghq.com/"
}

Terraform 구성에 다음을 추가하여 Konnect Gateway Plugin을 생성하세요:

resource "konnect_gateway_plugin_straiker_coding_agent_buffered" "my_straiker_coding_agent_buffered" {
  enabled = true

  config = {
    api_key = var.straiker_api_key
    fail_open = true
  }

  control_plane_id = konnect_gateway_control_plane.my_konnect_cp.id
  consumer = {
    id = konnect_gateway_consumer.my_consumer.id
  }
}

이 예제에서는 매니페스트에 다음 변수를 추가해야 합니다. TF_VAR_name=value를 설정하여 런타임에 값을 지정할 수 있습니다.

variable "straiker_api_key" {
  type = string
}

소비자 그룹

decK

kong.yaml 구성 파일에 이 섹션을 추가하세요:

_format_version: "3.0"
plugins:
  - name: straiker-coding-agent-buffered
    consumer_group: consumerGroupName|Id
    config:
      api_key: ${{ env "DECK_STRAIKER_API_KEY" }}
      fail_open: true

{: data-file="kong.yaml" data-tool="deck" }

다음 플레이스홀더를 자신의 값으로 바꾸는 것을 잊지 마세요:

  • consumerGroupName|Id: 플러그인 구성이 대상으로 하는 소비자 그룹의 id 또는 name입니다.
Admin API

다음 요청을 보내세요:

curl -i -X POST http://localhost:8001/consumer_groups/{consumerGroupName|Id}/plugins/ \
    --header "Accept: application/json" \
    --header "Content-Type: application/json" \
    --data '
    {
      "name": "straiker-coding-agent-buffered",
      "config": {
        "api_key": "'$STRAIKER_API_KEY'",
        "fail_open": true
      }
    }
    '

다음 플레이스홀더를 자신의 값으로 바꾸는 것을 잊지 마세요:

  • consumerGroupName|Id: 플러그인 구성이 대상으로 하는 소비자 그룹의 id 또는 name입니다.
Konnect API

다음 요청을 보내세요:

curl -X POST https://{region}.api.konghq.com/v2/control-planes/{controlPlaneId}/core-entities/consumer_groups/{consumerGroupId}/plugins/ \
    --header "accept: application/json" \
    --header "Content-Type: application/json" \
    --header "Authorization: Bearer $KONNECT_TOKEN" \
    --data '
    {
      "name": "straiker-coding-agent-buffered",
      "config": {
        "api_key": "'$STRAIKER_API_KEY'",
        "fail_open": true
      }
    }
    '

다음 플레이스홀더를 자신의 값으로 바꾸는 것을 잊지 마세요:

  • region: Kong Konnect가 호스팅되고 운영되는 지리적 리전입니다.

  • KONNECT_TOKEN: Konnect 계정과 연결된 개인 액세스 토큰(PAT)입니다.

  • controlPlaneId: 컨트롤 플레인의 id입니다.

  • consumerGroupId: 플러그인 구성이 대상으로 하는 소비자 그룹의 id입니다.

리전별 URL과 개인 액세스 토큰에 대한 자세한 내용은 Konnect Control Planes Config API 참조를 확인하세요.

KIC
echo "
apiVersion: configuration.konghq.com/v1
kind: KongPlugin
metadata:
  name:
  namespace: kong
  annotations:
    kubernetes.io/ingress.class: kong
config:
  api_key: '$STRAIKER_API_KEY'
  fail_open: true
plugin: straiker-coding-agent-buffered
" | kubectl apply -f -

다음으로, KongConsumerGroup 리소스에 주석을 달아 KongPlugin 리소스를 적용하세요:

kubectl annotate -n kong kongconsumergroup CONSUMERGROUP_NAME konghq.com/plugins=
Terraform
필수 조건: 개인 액세스 토큰 구성
terraform {
  required_providers {
    konnect = {
      source  = "kong/konnect"
    }
  }
}

provider "konnect" {
  personal_access_token = "$KONNECT_TOKEN"
  server_url            = "https://us.api.konghq.com/"
}

Terraform 구성에 다음을 추가하여 Konnect Gateway Plugin을 생성하세요:

resource "konnect_gateway_plugin_straiker_coding_agent_buffered" "my_straiker_coding_agent_buffered" {
  enabled = true

  config = {
    api_key = var.straiker_api_key
    fail_open = true
  }

  control_plane_id = konnect_gateway_control_plane.my_konnect_cp.id
  consumer_group = {
    id = konnect_gateway_consumer_group.my_consumer_group.id
  }
}

이 예제에서는 매니페스트에 다음 변수를 추가해야 합니다. TF_VAR_name=value를 설정하여 런타임에 값을 지정할 수 있습니다.

variable "straiker_api_key" {
  type = string
}

관련 리소스

더 알아보기 (Learn more)

  • 이 플러그인의 동작 방식과 상세한 작동 원리를 설명해요. — How it works
  • 같은 Route에 AI Proxy 플러그인을 함께 사용하면 안 되는 이유를 확인해요. — AI Proxy
  • 실시간 스트리밍 방식이 필요하다면 Straiker Coding Agent Streaming 플러그인을 살펴보세요. — Straiker coding agent streaming plugin
  • 채팅 애플리케이션을 위한 Straiker 플러그인의 전체적인 개요를 확인해요. — Straiker plugin (chat applications)
  • decK를 사용한 글로벌 설정 방법을 자세히 알아봐요. — kong.yaml