Version 0.2.0

Changes:
- forbid to overwrite secrets of other users
- add some logs of success
- add validation on code (length 50)
- use same limiter for POST requests
This commit is contained in:
2026-08-17 21:13:15 +00:03
parent 6ee80f1c8f
commit 1ccf40396f
16 changed files with 184 additions and 38 deletions

View File

@@ -58,7 +58,7 @@ server:
database:
path: ./codevault.db
rate_limit:
max_failures: 10 # failed getValue lookups per IP before 404-ing everything
max_failures: 10 # failed getValue lookups per IP before 404/401-ing get/post requests
window: 1m0s # sliding window for max_failures
observability:
logging:
@@ -83,7 +83,7 @@ raw spec from `/api/openapi.json`.
- `POST /api/v1/getValue` `{"code": "..."}` → `200 {"value": "..."}` /
`404` (not found or rate-limited) / `400` (bad body).
- `POST /api/v1/setValue` `{"code": "...", "value": "..."}` (Basic Auth) →
`204` / `400` (bad body) / `401` (bad credentials).
`204` / `400` (bad body) / `401` (bad credentials or rate-limited) / '403' (owned by other user).
## Metrics