API Key 인증 완전 제거
사내 운영 전제로 X-API-Key 인증을 전면 제거. - app/core/auth.py 삭제 - routes.py에서 Depends(require_api_key) 모두 제거 - config.Settings에서 api_keys / api_key_set 제거 - .env / .env.example에서 API_KEYS 제거 - docker-compose.yml에서 API_KEYS 환경변수 제거 (KOSIMCSE_MODEL 추가) - UI(index.html)에서 DEFAULT_API_KEY 상수 + X-API-Key 헤더 모두 제거 - scripts/sample_curl.sh, sample_python.py에서 키 헤더 제거 - tests: test_detect_requires_api_key → test_detect_no_auth_required로 갱신 - README: 인증 컬럼 제거, curl 예시에서 헤더 제거
This commit is contained in:
1 parent
f31ef142e8
commit
4913bf3ecc
10 files changed
+27
-78
No files matched your search
@@ -3,7 +3,6 @@
|
||||
set -euo pipefail
|
||||
|
||||
API_HOST="${API_HOST:-http://localhost:8000}"
|
||||
API_KEY="${API_KEY:-combooks-key-change-me}"
|
||||
|
||||
echo "--- 1) Health ---"
|
||||
curl -sS "${API_HOST}/v1/health" | python3 -m json.tool
|
||||
@@ -12,7 +11,6 @@ echo
|
||||
echo "--- 2) 단건 탐지: 어린왕자 유사 텍스트 ---"
|
||||
curl -sS -X POST "${API_HOST}/v1/plagiarism/detect" \
|
||||
-H "Content-Type: application/json" \
|
||||
-H "X-API-Key: ${API_KEY}" \
|
||||
-d '{
|
||||
"doc_id": "test-001",
|
||||
"text": "어린왕자는 작은 별에서 온 소년이다. 그는 별을 떠나 여러 행성을 여행하며 다양한 어른들을 만난다. 마침내 지구에 도착해 여우를 만나고 길들임의 의미를 배운다.",
|
||||
@@ -23,7 +21,6 @@ echo
|
||||
echo "--- 3) 배치 등록 ---"
|
||||
JOB_RESPONSE=$(curl -sS -X POST "${API_HOST}/v1/plagiarism/batch" \
|
||||
-H "Content-Type: application/json" \
|
||||
-H "X-API-Key: ${API_KEY}" \
|
||||
-d '{
|
||||
"items": [
|
||||
{"doc_id": "b-001", "text": "앤 셜리는 상상력이 풍부한 고아 소녀로 초록 지붕 집에 입양된다."},
|
||||
@@ -36,5 +33,4 @@ JOB_ID=$(echo "${JOB_RESPONSE}" | python3 -c 'import json,sys; print(json.load(s
|
||||
echo
|
||||
echo "--- 4) 배치 결과 조회 ---"
|
||||
sleep 1
|
||||
curl -sS "${API_HOST}/v1/plagiarism/batch/${JOB_ID}" \
|
||||
-H "X-API-Key: ${API_KEY}" | python3 -m json.tool
|
||||
curl -sS "${API_HOST}/v1/plagiarism/batch/${JOB_ID}" | python3 -m json.tool
|
||||
Reference in new issue
Block a user