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
@@ -74,7 +74,6 @@ uvicorn app.main:app --host 0.0.0.0 --port 8000 --reload
|
||||
# 탐지
|
||||
curl -X POST http://localhost:8000/v1/plagiarism/detect \
|
||||
-H "Content-Type: application/json" \
|
||||
-H "X-API-Key: combooks-key-change-me" \
|
||||
-d '{
|
||||
"doc_id": "test-001",
|
||||
"text": "검사할 본문 텍스트…",
|
||||
@@ -84,17 +83,15 @@ curl -X POST http://localhost:8000/v1/plagiarism/detect \
|
||||
# 자서전 업로드
|
||||
curl -X POST http://localhost:8000/v1/corpus \
|
||||
-H "Content-Type: application/json" \
|
||||
-H "X-API-Key: combooks-key-change-me" \
|
||||
-d '{"title": "김OO 자서전", "text": "본문…"}'
|
||||
|
||||
# .txt 파일 업로드
|
||||
curl -X POST http://localhost:8000/v1/corpus/file \
|
||||
-H "X-API-Key: combooks-key-change-me" \
|
||||
-F "title=김OO 자서전" \
|
||||
-F "file=@autobiography.txt"
|
||||
|
||||
# 코퍼스 목록
|
||||
curl -H "X-API-Key: combooks-key-change-me" http://localhost:8000/v1/corpus
|
||||
curl http://localhost:8000/v1/corpus
|
||||
|
||||
# 분류체계 조회 (10종 태그 + 39 케이스)
|
||||
curl http://localhost:8000/v1/taxonomy
|
||||
@@ -102,21 +99,19 @@ curl http://localhost:8000/v1/taxonomy
|
||||
|
||||
## 엔드포인트 요약
|
||||
|
||||
| Method | Path | 용도 | 인증 |
|
||||
|---|---|---|---|
|
||||
| GET | `/` | 검토 콘솔 (HTML) | - |
|
||||
| GET | `/docs` | Swagger UI | - |
|
||||
| GET | `/v1/health` | 헬스체크 + 엔진 정보 | - |
|
||||
| GET | `/v1/taxonomy` | 분류체계 조회 | - |
|
||||
| POST | `/v1/plagiarism/detect` | 단건 동기 탐지 | ✅ |
|
||||
| POST | `/v1/plagiarism/batch` | 배치 잡 등록 (≤500건) | ✅ |
|
||||
| GET | `/v1/plagiarism/batch/{job_id}` | 배치 결과 조회 | ✅ |
|
||||
| GET | `/v1/corpus` | 코퍼스 목록 | ✅ |
|
||||
| POST | `/v1/corpus` | JSON 업로드 | ✅ |
|
||||
| POST | `/v1/corpus/file` | .txt 파일 업로드 | ✅ |
|
||||
| DELETE | `/v1/corpus/{doc_id}` | 삭제 | ✅ |
|
||||
|
||||
인증: `X-API-Key` 헤더에 발급된 키 (기관별 분리 발급 가능, 콤마 구분).
|
||||
| Method | Path | 용도 |
|
||||
|---|---|---|
|
||||
| GET | `/` | 검토 콘솔 (HTML) |
|
||||
| GET | `/docs` | Swagger UI |
|
||||
| GET | `/v1/health` | 헬스체크 + 엔진 정보 |
|
||||
| GET | `/v1/taxonomy` | 분류체계 조회 |
|
||||
| POST | `/v1/plagiarism/detect` | 단건 동기 탐지 |
|
||||
| POST | `/v1/plagiarism/batch` | 배치 잡 등록 (≤500건) |
|
||||
| GET | `/v1/plagiarism/batch/{job_id}` | 배치 결과 조회 |
|
||||
| GET | `/v1/corpus` | 코퍼스 목록 |
|
||||
| POST | `/v1/corpus` | JSON 업로드 |
|
||||
| POST | `/v1/corpus/file` | .txt 파일 업로드 |
|
||||
| DELETE | `/v1/corpus/{doc_id}` | 삭제 |
|
||||
|
||||
## 응답 스키마 (탐지 결과)
|
||||
|
||||
@@ -159,7 +154,6 @@ curl http://localhost:8000/v1/taxonomy
|
||||
|
||||
| 변수 | 기본 | 설명 |
|
||||
|---|---|---|
|
||||
| `API_KEYS` | `combooks-key-…,baikal-key-…` | 콤마 구분 다중 키 |
|
||||
| `SIMILARITY_THRESHOLD` | `0.85` | 침해 판정 임계값 (정밀도 우선) |
|
||||
| `AUTOBIOGRAPHY_MODE` | `true` | 자서전 특화 전처리 (공통표현+NER) |
|
||||
| `USE_LSH_FILTER` | `true` | MinHash+LSH 1차 필터 |
|
||||
|
||||
Reference in new issue
Block a user