Skip to main content

한국어 PII 차단 OpenAI 호환 LLM 프록시 게이트웨이

Project description

korean-pii-gateway

LLM API로 나가는 요청에서 한국어 개인정보(주민등록번호·전화번호·계좌번호 등)를 탐지해 마스킹하거나 차단하는 셀프호스팅 OpenAI 호환 프록시 게이트웨이입니다. 탐지 엔진은 korean-pii를 사용합니다.

pip install korean-pii-gateway
uvicorn --factory korean_pii_gateway.app:create_app --port 8500

클라이언트는 base URL만 바꾸면 됩니다:

from openai import OpenAI
client = OpenAI(base_url="http://localhost:8500/v1", api_key="sk-...")  # 키는 업스트림으로 패스스루
  • BYOK: Authorization 헤더를 업스트림에 그대로 전달하며 게이트웨이는 키를 저장하지 않습니다.
  • 감사 로그: 탐지 타입·개수만 JSONL로 기록 — 원문 개인정보 값은 절대 기록하지 않습니다.
  • fail-closed 기본: 검사 실패 시 요청을 차단합니다.
  • 환경변수(KPG_UPSTREAM_BASE_URL, KPG_ACTION 등)·Docker 배포·어댑터는 저장소 문서를 참고하세요.

중요: 이 게이트웨이는 보조 방어 계층입니다. 모든 개인정보 탐지를 보장하지 않으며, 법적 컴플라이언스 충족을 보장하지 않습니다.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

korean_pii_gateway-0.1.0.tar.gz (6.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

korean_pii_gateway-0.1.0-py3-none-any.whl (6.0 kB view details)

Uploaded Python 3

File details

Details for the file korean_pii_gateway-0.1.0.tar.gz.

File metadata

  • Download URL: korean_pii_gateway-0.1.0.tar.gz
  • Upload date:
  • Size: 6.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.28 {"installer":{"name":"uv","version":"0.11.28","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for korean_pii_gateway-0.1.0.tar.gz
Algorithm Hash digest
SHA256 baec3c1bd77ad343466b2b966c4672f3a1406a5a94b7bbc6d5225e455d1d91b3
MD5 9dacb4f5f83b43755d2dc2569348c2b1
BLAKE2b-256 08bdf06d61bf63b2cdba55f125470f631d08a16f8ce7c92793b5c725f02aee68

See more details on using hashes here.

File details

Details for the file korean_pii_gateway-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: korean_pii_gateway-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 6.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.28 {"installer":{"name":"uv","version":"0.11.28","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for korean_pii_gateway-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 61a585ab48329c13e735d1b09a86c454fc294acc1c46c45c887a38a25062039d
MD5 8a58017b26918c9b03c370d1274401cd
BLAKE2b-256 bb79606246c4858bbcd7496eee2479ef23b97e70b06ab2e0f31d732445f9e37a

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page