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.2.0.tar.gz (23.5 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.2.0-py3-none-any.whl (14.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: korean_pii_gateway-0.2.0.tar.gz
  • Upload date:
  • Size: 23.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.14

File hashes

Hashes for korean_pii_gateway-0.2.0.tar.gz
Algorithm Hash digest
SHA256 31c7ff01ab7c1d357821f1828c33922bf220bfaca14133168261f413b9ade020
MD5 b283cfe87edc81756ae4eb20e24a52a3
BLAKE2b-256 952ccb427e6bd9950ad55f197e6454583b878cb010d3322ecd345e6e1e63b499

See more details on using hashes here.

Provenance

The following attestation bundles were made for korean_pii_gateway-0.2.0.tar.gz:

Publisher: release.yml on asdqweasdzxcasd/korean-pii-gateway

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

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

File metadata

File hashes

Hashes for korean_pii_gateway-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 b9c3da165cc01476c4e433ace73e88edb18a9190493fdd10e9354d5cb18d9d46
MD5 efdb03169c4b7196c08c551a1a140968
BLAKE2b-256 9cd4c8e8eb571a7c19dc5d14637f32ecc233cbbbe815b75f2be6effc37fe84b4

See more details on using hashes here.

Provenance

The following attestation bundles were made for korean_pii_gateway-0.2.0-py3-none-any.whl:

Publisher: release.yml on asdqweasdzxcasd/korean-pii-gateway

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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