You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+40-4Lines changed: 40 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -21,41 +21,77 @@ Can be useful to provide an easy and old-school API key authentication mechanism
21
21
-**Frontend**: Web UI in TypeScript + React + Vite
22
22
-**Storage**: Valkey, a Redis fork, for token storage
23
23
24
+
## Security
25
+
26
+
Static API keys are somewhat less secure than JWT or other modern authentication methods. But they are convenient and widely supported by AI tools.
27
+
28
+
This is about finding the right balance between security and usability.
29
+
30
+
Tokens are generated with a cryptographically secure random generator, and stored as salted blake3 hashes in Valkey. If Valkey is compromised, stolen hashes cannot be used to authenticate.
31
+
32
+
Notably, tokens do not expire. There is no rate limiting or brute-force protection implemented in this service. Brute-forcing 256-bit tokens is not feasible, but consider using additional protections higher up in your stack (e.g., Traefik rate limiting, WAF, etc.).
33
+
24
34
## Quick Start
25
35
26
36
### Prerequisites
27
37
28
38
- Rust 1.90+
29
39
- Node.js 24+
30
40
- Valkey on `localhost:6379`
31
-
- An OAuth2/OIDC provider
41
+
- An OAuth2/OIDC provider. Tested with Keycloak.
32
42
33
43
### Configuration
34
44
35
45
Create `settings.toml` or use environment variables:
36
46
37
47
```toml
38
-
[http]
48
+
# HTTP Server Configuration
39
49
address = "127.0.0.1"
40
50
port = 8080
41
51
42
-
[valkey]
43
-
url = "redis://localhost:6379"
52
+
# Valkey Configuration
53
+
valkey_url = "redis://localhost:6379"
54
+
# valkey_username = "your-username" # Optional
55
+
# valkey_password = "your-password" # Optional
56
+
57
+
# Token hashing salt (32 bytes hex-encoded, 64 characters)
58
+
# IMPORTANT: Keep this secret and consistent across deployments
0 commit comments