Files

5.8 KiB
Raw Permalink Blame History

OpenGenesisLINK Generation 1 – Simulator Control (os_webinterface.dll)

Status: Opt-in addon, developer preview. Not enabled in production.

Independent DLL

os_webinterface.dll is a .NET 10 Mono.Addins ISharedRegionModule, loaded by the simulator's existing region-module manager. No additional web administration handlers are added to OpenSim.dll. Each simulator has its own panel and own port.

The HTTP listener binds ONLY to 127.0.0.1. For remote access use an HTTPS reverse proxy with firewall and certificate, never expose the raw port through Fritz!Box. Because HttpListener matches the local Host header, the reverse proxy MUST overwrite Host to 127.0.0.1:9847 and explicitly set X-Forwarded-Host to the public domain plus X-Forwarded-Proto=https. Configure PublicOrigin as that exact public HTTPS origin (https://sim-admin.example.org); without this option external browser login is intentionally rejected.

Example Nginx location block (in an existing HTTPS virtual host for sim-admin.example.org):

location / {
    proxy_pass http://127.0.0.1:9847;
    proxy_set_header Host 127.0.0.1:9847;
    proxy_set_header X-Forwarded-Host sim-admin.example.org;
    proxy_set_header X-Forwarded-Proto https;
}

Configure PublicOrigin = "https://sim-admin.example.org" and ensure Nginx never forwards client-supplied Forwarded headers unmodified. You must configure real TLS certificates and outside firewall separately.

Configuration (simulator bin/OpenSim.ini)

[OSWebInterface]
    Enabled = true
    Port = 9847
    DataDirectory = "os-webinterface-data"
    BackupRetention = 5
    AllowLiveUpdates = false
    PublicOrigin = ""

Default Enabled=false; activating requires ONE planned simulator restart. Every simulator process must use a distinct port.

Avatar authentication and authorization

Login with the local avatar first + last name (or First.Last) and its password. The simulator's native account and authentication services validate credentials. Only active avatars with UserLevel > 0 can log in. A valid avatar with UserLevel <= 0 receives HTTP 403: Access Denied – Keine Berechtigung.

Security: cryptographically random one-hour HttpOnly SameSite=Strict sessions; Secure cookies behind HTTPS; permissions revalidated on every request; CSRF and Origin checks for mutations; anti-bruteforce backoff; restrictive CSP. Passwords are never stored or echoed.

UserLevel > 0 is full simulator administrative authority in this module. Do not elevate untrusted accounts or publish the panel without strong TLS/firewall protection.

Functionality

  • Overview: Region ID/name, grid coordinates, size, readiness, root avatars, scripts/physics settings, RAM, uptime, UDP/TCP ports.
  • Region actions: restart a single local scene after explicit confirmation. Other simulator instances are not controlled by this DLL.
  • OAR: asynchronous export to a local archive, download, upload and import with job status and byte count (2 GiB limit). Existing OGL archive feature gates are enforced by the underlying archiver and NOT bypassed.
  • Logs: last 90,000 characters of OpenSim.log or the newest log inside the logs directory.
  • Services: probes configured ROBUST/Grid/Asset/Inventory/User/Authentication/Presence/Friends/Hypergrid endpoint TCP reachability (not application-level correctness).
  • Network: checks local TCP/UDP listeners. External reachability cannot be inferred from this alone: Fritz!Box, NAT/CGNAT, ISP inbound restrictions and firewall must be independently probed from outside the LAN.
  • Git: check current SHA and latest commit titles on official OpenGenesisLINK main.
  • Safe update staging: explicitly download a pinned latest-GitHub source snapshot, create private ZIP backup of config including keyfiles, and rotate old staging backups. Staging does not compile or overwrite binaries.
  • Optional live installation: when [OSWebInterface] AllowLiveUpdates=true AND [NexVerseNodeAgent] Enabled=true AND LiveUpdateEnabled=true, and the independent, preinstalled OGL G1 node-updater.service is running on loopback with OGL_NODE_UPDATER_TOKEN, the panel can submit an explicit, confirmed live-update operation. The independent updater backs up configs, fetches official main, runs the .NET 10 build and reports 7 phases. It does NOT restart the simulator. This is an in-place update with potential service disturbance; use a maintenance window and verify rollback before activation. The external updater's backup-retention policy is separate from BackupRetention for web staging.

Tests

python3 tools/ci/verify_os_webinterface.py
dotnet build addons/OSWebInterface/os_webinterface.csproj -c Release
dotnet build OpenSim.sln -c Release

Perform local Bomlitz acceptance before enabling on production, including valid/invalid UserLevel login, disposable-region restart, OAR roundtrip, HTTPS reverse proxy and external connectivity testing.

Note: Update snapshot staging is currently restricted to Linux due to required NTFS ACL enforcement for backups containing secrets on Windows. On Windows, the monitoring and admin functions remain available.

Live update installation (optional; Linux only)

Read the existing standalone updater documentation: doc/OpenGenesisLINK/G1_STANDALONE_NODE_UPDATER.md. Install its systemd unit outside the source checkout, configure the same OGL_NODE_UPDATER_TOKEN (minimum 32 bytes), a valid NodeId and the loopback URL (typically http://127.0.0.1:19090/). This module NEVER runs arbitrary shell commands or accepts browser-supplied repo roots, commands or update URLs. The administrator explicitly confirms the live update; only the independent service performs git reset --hard and builds after backing up the checkout config. Always schedule downtime, back up the database separately, and restart the simulator manually when the independent service shows completed.