Setup, Configuration, and Security for Cloud File Manager
This application is a local file manager that allows you to organize your files and optionally back them up or synchronize an index of them with cloud storage services like Google Drive and Microsoft OneDrive. It features client-side encryption for enhanced privacy and security. It also uses your browser's local database (IndexedDB
) to temporarily cache encrypted file content for fast previews, reducing the need to re-download data from the cloud for recently accessed files.
When you choose to encrypt a file in the current version:
.json
file (containing the encrypted data, salt, and IV) on your Google Drive (in the configured folder)._frag.json
file on your Microsoft OneDrive (in the configured folder)._pwd.json
file on your Microsoft OneDrive (in the configured folder).
To decrypt and view a file, the application will need to access Google Drive (for the main encrypted chunk, salt, and IV), and Microsoft OneDrive (for the fragment and the _pwd.json
file containing the File-Specific Password).
This means an attacker would currently need access to both your Google account and your Microsoft account to gather all components and decrypt an encrypted file. The application itself has zero knowledge of your cloud account passwords; it uses secure OAuth 2.0 for authorization.
Upcoming Security Enhancement: A future update will introduce a "Session Master Password." This user-provided password will be used to encrypt the _pwd.json
file (containing the File-Specific Password) before it's stored on OneDrive. This will add another layer of security, requiring an attacker to also know your Session Master Password, in addition to gaining access to both your cloud accounts.
This application uses OAuth 2.0 to connect to your Google Drive and Microsoft OneDrive accounts. This is a standard and secure industry protocol.
Configuration is necessary to allow the application to connect to your cloud accounts for storing and retrieving files. You can customize the Client IDs and folder names used by the application via its Settings page.
Configuration is necessary to:
_pwd.json
files) to your Microsoft OneDrive.Without configuration (or if the default public IDs are used with many users), the application will work locally, but cloud-dependent features, especially encryption backup and restore, will be unavailable, severely limited, or might conflict with other users if using shared public developer credentials.
It is highly recommended to create your own Client IDs for Google and Microsoft for private and reliable use.
To use Google Drive with this application, you'll ideally create your own Google Client ID and can optionally specify a custom folder name. These are configured through the application's Settings page.
You can set two main pieces of information via the application's Settings page:
Values entered on the Settings page are stored in your browser's `localStorage` and will override the application's default values.
Follow these steps in the Google Cloud Console:
http://localhost:8000
, http://127.0.0.1:8000
, https://yourdomain.com
). The main.js
uses window.location.origin
.
window.location.origin
for its redirect mechanism.
The primary way to set these values is through the application's Settings page, accessible from the application's main interface or by navigating to it directly if you know the URL).
The application also has default values defined in a file named js/env.js
(located in the js/
directory relative to index.html
). If you haven't set custom values on the Settings page, or if you reset them using the "Reset Config to Defaults" button on the Settings page, these defaults from js/env.js
will be used. For reference, the default Google settings in js/env.js
look like this:
To use Microsoft OneDrive, you'll ideally create your own Microsoft Application (client) ID and can specify a custom folder name. These are configured through the application's Settings page
You can set two main values via the application's Settings page
_pwd.json
files.Values entered on the Settings page override the application's defaults.
Follow these steps in the Azure portal:
http://localhost:8000
, https://yourdomain.com
). The main.js
uses window.location.origin
as the redirectUri
in its MSAL configuration.
Files.ReadWrite
and User.Read
from Microsoft Graph. These are delegated permissions.
Files.ReadWrite
and User.Read
.The primary way to set these values is through the application's Settings page
The application falls back to default values defined in js/env.js
if no custom settings are found or if they are reset. For reference, the OneDrive related defaults in js/env.js
are:
To open an encrypted preview, the app first downloads the necessary encrypted parts (the main JSON from Google Drive, the fragment from OneDrive, and the password file from OneDrive) and stores them temporarily in your browser's local database (IndexedDB
). If the preview page can't find this data, decryption will fail. Here are the most common reasons:
IndexedDB
in private browsing or incognito mode. The application cannot cache the required data in this mode. Please use a normal browser window.IndexedDB
cache, for security. You will need to re-cache any files you wish to preview after logging back in.http://localhost:8000
). Remember main.js
often uses window.location.origin
.invalid_client
, redirect_uri_mismatch
).accounts.google.com
and login.microsoftonline.com
or consider adding exceptions if issues persist. Modern libraries often use flows that are less reliant on third-party cookies.This application uses robust client-side encryption (AES-GCM-256). Key aspects of its security model:
_pwd.json
file on your Microsoft OneDrive. While this means an attacker needs access to both your Google Drive (for data) and OneDrive (for the password file) to decrypt a file, we plan to enhance this.Upcoming "Session Master Password" Enhancement:
A future update will significantly improve the security of the File-Specific Passwords. You will be able to set a "Session Master Password" in your browser. This master password will be used to encrypt the File-Specific Password before the _pwd.json
file is saved to OneDrive. This means that even if an attacker gains access to both your Google Drive and OneDrive accounts, they *still* wouldn't be able to decrypt your files without also knowing your Session Master Password.
Current Security Relies on:
No system is 100% unbreachable, but the multi-provider approach and client-side encryption offer a strong defense. The upcoming Session Master Password feature will elevate this further.