open-webui/backend/open_webui/models
ethan-l-geotab 8cf75e5c18 feat: encrypt user valve values at rest using Fernet
User valves (per-user API keys/config for tools and functions) were
stored as plaintext JSON in the database. This adds Fernet symmetric
encryption at the model layer so valve data is encrypted at rest.

- Uses WEBUI_SECRET_KEY for encryption (no extra env var needed)
- Add valve_encryption.py with encrypt/decrypt helpers using Fernet
- Wire encrypt/decrypt in tools and functions model get/update methods
- Add migration 019 to encrypt existing plaintext valve data
- Backward compatible: decrypt_user_valves handles legacy plaintext dicts

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-14 10:30:29 -04:00
..
access_grants.py chore: format 2026-04-12 18:12:59 -05:00
auths.py chore: format 2026-04-12 18:12:59 -05:00
automations.py chore: format 2026-04-12 18:12:59 -05:00
channels.py chore: format 2026-04-12 18:12:59 -05:00
chat_messages.py chore: format 2026-04-12 18:12:59 -05:00
chats.py chore: format 2026-04-12 18:12:59 -05:00
feedbacks.py chore: format 2026-04-12 18:12:59 -05:00
files.py chore: format 2026-04-12 18:12:59 -05:00
folders.py chore: format 2026-04-12 18:12:59 -05:00
functions.py feat: encrypt user valve values at rest using Fernet 2026-04-14 10:30:29 -04:00
groups.py chore: format 2026-04-12 18:12:59 -05:00
knowledge.py chore: format 2026-04-12 18:12:59 -05:00
memories.py refac: async db 2026-04-12 14:22:11 -05:00
messages.py chore: format 2026-04-12 18:12:59 -05:00
models.py refac 2026-04-12 19:34:45 -05:00
notes.py refac 2026-04-12 18:48:06 -05:00
oauth_sessions.py chore: format 2026-04-12 18:12:59 -05:00
prompt_history.py refac: async db 2026-04-12 14:22:11 -05:00
prompts.py refac 2026-04-12 19:34:45 -05:00
skills.py chore: format 2026-04-12 18:12:59 -05:00
tags.py chore: format 2026-04-12 18:12:59 -05:00
tools.py feat: encrypt user valve values at rest using Fernet 2026-04-14 10:30:29 -04:00
users.py refac 2026-04-12 18:49:34 -05:00