Mod-based web page access control
This mod is primarily for users of Fika, who want to restrict access to mod-based web configuration panels such as APBS and ABPS. It will add a very simple login form for any configured route, and require a valid username/password to access any protected routes.
Installation
1) Open the downloaded zip file in 7-zip
2) Select the folder in the zip file in 7-zip
3) Drag the selected folder from 7-zip into your SPT folder
Demonstration Video (Yes, it’s Live Flea Prices, but the same concept applies to all of my mods, I’m not making mod-specific extraction example videos):

Configuration
The mod ships with a “config.default.json” file, this file is copied to “config.json” on first run if one doesn’t exist. This allows mod updates without overwriting user configuration, however this also means you should run the server once after installation before configuring.
There are only two properties in the configuration file:
users: A key/value object where the key is the username, and value is the password. For example:
"drakia": "password"
routes: An array of strings containing routes to authenticate. This is used in a “startsWith” check, so must be the leftmost part of the mod’s route(s). For example:
/progressivebotsystem
Notes
- Credentials are stored in plaintext in the config JSON file, this is not a cryptographically secure mod, it is a simple interface to keep your server config moderately safer than leaving the control panels fully exposed
- Sessions are only valid until a server restart, they are stored in-memory and not written to disk
- Sessions in the browser are only valid until you restart your browser, they are using session cookies
- Lockdown only works for mod-based pages that use Blazor. It will not work for base SPT routes, or mods that are using the SPT HttpRouter
13.01 KB
55 Downloads
Released Monday at 7:20 AM
Initial release, please read the mod description for usage instructions
REQUIRES SPT 4.0.4, it will not work with earlier releases
No Addons Yet
This mod doesn't have any addons yet.
Details
-
GUID
xyz.drakia.lockdown
-
Category
-
License
-
Source Code
-
Latest Version VirusTotal Results
-
Fika Compatible Version Available
Brilliant. Thank you for creating this!
Thank you very much for creating this, mentioned this the other day so appreciate you putting this together