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:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user