prevent unauthorized access to administrative db0 when connection to redis-cli

This commit is contained in:
Maxime Van Hees
2025-10-07 10:52:30 +02:00
parent 2139deb85d
commit a8720c06db
5 changed files with 525 additions and 5 deletions

View File

@@ -80,6 +80,7 @@ Keys in `DB 0` (internal layout, but useful to understand how things work):
- Requires the exact admin secret as the `KEY` argument to `SELECT 0`
- Permission is `ReadWrite` when the secret matches
Connections start with no database selected. Any command that requires storage (GET, SET, H*, L*, SCAN, etc.) will return an error until you issue a SELECT to choose a database. Admin DB 0 is never accessible without authenticating via SELECT 0 KEY <admin_secret>.
### How to select databases with optional `KEY`
- Public DB (no key required)