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
{{ message }}
Repository navigation
Read-only server by default with authenticated write access #312
Summary
The cook server command should operate in read-only (consultation) mode by default. Any mutating operation — adding or editing a recipe, modifying the shopping list/cart, or any other state-changing action — must require prior authentication. The authenticated session must persist across browser restarts (no re-login on page refresh or next visit).
Motivation
Currently, the server exposes all operations without any access control. This is a problem for users who self-host and want to share their cookbook publicly (read access) while keeping write operations private. A two-tier access model (anonymous read / authenticated write) is the standard pattern for self-hosted tools and would make cook server production-ready for personal or family use.
Operation
Anonymous
Authenticated
Browse / view recipes
✅
✅
Search recipes
✅
✅
View shopping list / cart
✅
✅
Add or edit a recipe
❌ 401
✅
Delete a recipe
❌ 401
✅
Add / modify / clear the cart
❌ 401
✅
Any other write operation
❌ 401
✅
for example
[server.auth]
username = "admin"# bcrypt hash or plain text with a warningpassword_hash = "$2b$12$..."
and
# Start with auth enabled (write-protected)
cook server --auth
# Disable auth entirely for local/trusted networks (current behavior, opt-in)
cook server --no-auth
Eric
Reacted by Anthony Byrne, Yann D'Isanto and Romain Hild
changed the title [-]New feature ; Read-only server by default with persistent authenticated write access[/-][+]New feature : Read-only server by default with persistent authenticated write access[/+]on Apr 6, 2026
Yes please. Just upgraded to the latest version and was surprised to find that my recipes were editable to the open internet. Not catastrophic, I can just throw htauth or something on my reverse proxy but it would be nice to have a safer default.
Reacted by messeant, Anthony Byrne and Yann D'Isanto
changed the title [-]New feature : Read-only server by default with persistent authenticated write access[/-][+]Read-only server by default with authenticated write access[/+]on Aug 7, 2026
Activity
[-]New feature ; Read-only server by default with persistent authenticated write access[/-][+]New feature : Read-only server by default with persistent authenticated write access[/+]therealfakemoot commentedon Apr 6, 2026
Yes please. Just upgraded to the latest version and was surprised to find that my recipes were editable to the open internet. Not catastrophic, I can just throw htauth or something on my reverse proxy but it would be nice to have a safer default.
[-]New feature : Read-only server by default with persistent authenticated write access[/-][+]Read-only server by default with authenticated write access[/+]feat(server): opt-in sign-in before anything can be changed
feat(server): opt-in sign-in before anything can be changed
feat(server): opt-in sign-in before anything can be changed (cooklang…