mirror of
https://github.com/open-webui/open-webui.git
synced 2026-05-07 03:18:23 -05:00
[PR #15458] feat: Add File Decryption Feature with Admin Panel Configuration and Enhanced Upload Workflow #23841
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/open-webui/open-webui/pull/15458
Author: @decent-engineer-decent-datascientist
Created: 7/1/2025
Status: 🔄 Open
Base:
dev← Head:dev-add-encryption📝 Commits (1)
5788293updated decryption patch to 0.6.18📊 Changes
6 files changed (+191 additions, -1 deletions)
View changed files
📝
backend/open_webui/config.py(+22 -0)📝
backend/open_webui/main.py(+10 -0)📝
backend/open_webui/routers/retrieval.py(+38 -0)📝
backend/open_webui/storage/provider.py(+33 -0)📝
src/lib/components/admin/Settings/Documents.svelte(+68 -0)📝
src/lib/components/chat/MessageInput.svelte(+20 -1)📄 Description
Pull Request Checklist
Note to first-time contributors: Please open a discussion post in Discussions and describe your changes before submitting a pull request.
Before submitting, make sure you've checked the following:
devbranch.Changelog Entry
Description
This pull request introduces a new feature that allows for the decryption of uploaded files via an external Azure function endpoint. When enabled, files are decrypted immediately after upload and before being processed by the RAG pipeline. The decrypted content then replaces the original encrypted file. This feature is configurable through new settings in the admin panel. This is a mandatory feature for Open WebUI to be leveraged in organizations that have Microsoft's AIP/MIP enabled. https://learn.microsoft.com/en-us/azure/information-protection/what-is-information-protection
Added
open_webui/utils/decryption.pyto handle the communication with an Azure function for file decryption.ENABLE_FILE_DECRYPTIONFILE_DECRYPTION_ENDPOINTFILE_DECRYPTION_API_KEYFILE_DECRYPTION_TIMEOUTChanged
routers/files.py) to include the decryption logic. If enabled, it reads the uploaded file, sends it for decryption, and overwrites the original file with the decrypted content.routers/retrieval.py) to get and update the new decryption settings.text-rightalignment for a consistent look.decryption_enabledflag to inform the frontend.Removed
Fixed
Security
SensitiveInputcomponent in the UI to mask its value.x-functions-keyheader.Breaking Changes
Additional Information
requestsis used inbackend/open_webui/utils/decryption.pyfor making HTTP requests to the Azure function.DecryptionErrorexception class was created to handle specific decryption-related failures gracefully.Screenshots or Videos
Contributor License Agreement
By submitting this pull request, I confirm that I have read and fully agree to the Contributor License Agreement (CLA), and I am providing my contributions under its terms.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.