File storage and encryption
Identity documents are personal data. This page explains where JoomIdentity keeps them, how they are protected and how to remove them.
Where the files are
All files go to the folder in Path to Files on the Basic tab of the options. The installer creates it in the root folder of your site with a random name that starts with ip, and writes an .htaccess file with Deny from all into it.
On the way there, an upload is first saved in the temporary folder of Joomla (Path to Temp Folder in the Global Configuration), checked, encrypted into the files folder and then deleted from the temporary folder.
How the files are protected
- Encryption. Every file is encrypted before it is written to the files folder. The key is the
secretvalue in your site'sconfiguration.php. A copy of the files folder cannot be opened without it. - Random names. Stored files get a random 16 character name. The title the user typed is kept in the database, not in the file name.
- No direct link. There is no web address that opens a stored file. Files are decrypted only by JoomIdentity: for the owner after entering their password, and for administrators in the Files manager.
- Deny rule. The
.htaccessfile blocks web access to the folder on Apache servers. On Nginx or other servers it has no effect. The files are still encrypted, but you can also move the folder.
Move the folder outside the web root
For more safety, keep the files in a folder that the web server does not serve at all.
- Create a folder outside your public folder, for example
/home/user/identity-files, writable by PHP. - Move the existing files from the old folder into it.
- Enter the full path in Path to Files and save the options.
Keep the secret key
If the secret value in configuration.php changes, JoomIdentity cannot decrypt any existing file. This can happen when you rebuild the site, move it with a new configuration file or restore only the database. Keep a copy of the value with your backups, and keep the same value when you move the site.
Use HTTPS
Run the proof page over HTTPS so documents are encrypted on the way to your server. Set Redirect to HTTPS to Yes once your site has a certificate. See Options.
Delete files
- Users delete their own files with Remove on the proof page, if allowed.
- Administrators trash files and delete them for good with Empty trash in the Files manager.
- The JoomIdentity - user plugin can delete old files automatically. See below.
Deleting removes the encrypted file and its record. Downloaded copies on your computer are not affected, so delete those yourself.
Automatic deletion
The JoomIdentity - user plugin deletes old files when an administrator logs in to the backend.
- Open Extensions > Plugins and search for JoomIdentity - user.
- Set Days, for example
30. Files older than this number of days are deleted. Default 14. - Enable the plugin and save.
The plugin deletes every file older than Days, whatever its state, also reviewed files of verified users. The users keep their status. Set Days to 0 to keep files while the plugin is enabled.