Mod Details

Lockdown

Lockdown 1.0.0

Created by DrakiaXYZ

55 Downloads

SPT 4.0.6 Compatible

Mod-based web page access control

Latest Version 1.0.0
SPT 4.0.6

Updated Monday at 7:21 AM

13.01 KB

Version Notes

Initial release, please read the mod description for usage instructions

REQUIRES SPT 4.0.4, it will not work with earlier releases

This download is externally hosted.
Always scan for viruses.

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):

Install Gif

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
Version 1.0.0
Download Mod Version
SPT 4.0.6 +2 more
All Compatible SPT Versions:
4.0.6 4.0.5 4.0.4

13.01 KB

55 Downloads

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.

swiftxp

Brilliant. Thank you for creating this!

0 Likes
mrfums

Thank you very much for creating this, mentioned this the other day so appreciate you putting this together

0 Likes

Details