From 4b32646bf2f478e356998c0cfb66567eb0d40be7 Mon Sep 17 00:00:00 2001
From: "OpenGenesis (MPL 2.0)"
<153564363+opengenesislink@users.noreply.github.com>
Date: Wed, 28 Oct 2026 14:28:37 +0100
Subject: [PATCH] security(gen1): allow only Firestorm and OpenGenesisLINK
viewers at all admission points (#331)
* security(gen1): define unified Firestorm and OpenGenesisLINK viewer admission policy
* build(gen1): include shared viewer admission policy in OpenSim.Framework
* security(gen1): enforce approved-viewer admission in OpenSim/Services/LLLoginService/LLLoginService.cs
* security(gen1): enforce approved-viewer admission in OpenSim/Services/HypergridService/GatekeeperService.cs
* security(gen1): enforce approved-viewer admission in OpenSim/Region/Framework/Scenes/Scene.cs
* config(gen1): enable Firestorm and OpenGenesisLINK viewer-only admission
* config(gen1): enable Firestorm and OpenGenesisLINK viewer-only admission
* config(gen1): enable Firestorm and OpenGenesisLINK viewer-only admission
* config(gen1): enable Firestorm and OpenGenesisLINK viewer-only admission
* config(gen1): enable Firestorm and OpenGenesisLINK viewer-only admission
* config(gen1): enable Firestorm and OpenGenesisLINK viewer-only admission
* test(gen1): approved Firestorm/OpenGenesisLINK viewer admission regression
* test(gen1): approved Firestorm/OpenGenesisLINK viewer admission regression
* test(gen1): approved Firestorm/OpenGenesisLINK viewer admission regression
* ci(gen1): run viewer whitelist regression and all admission-path guards
* docs(gen1): document official viewer-only policy and spoofing limitations
* test(gen1): accept regenerated Prebuild compile-entry form in viewer guard
---
.github/workflows/nexjast-ci.yml | 7 ++
OpenSim/Framework/OglApprovedViewerPolicy.cs | 88 +++++++++++++++++++
OpenSim/Framework/OpenSim.Framework.csproj | 1 +
OpenSim/Region/Framework/Scenes/Scene.cs | 14 +++
.../HypergridService/GatekeeperService.cs | 13 +++
.../Services/LLLoginService/LLLoginService.cs | 13 +++
bin/OpenSim.ini | 6 ++
bin/OpenSim.ini.example | 6 ++
bin/Robust.HG.OGLAsset.ini.example | 6 ++
bin/Robust.HG.ini | 6 ++
bin/Robust.HG.ini.example | 6 ++
bin/Robust.ini.example | 6 ++
doc/NexVerse/GEN1_APPROVED_VIEWERS.md | 60 +++++++++++++
.../OglApprovedViewerRegression.csproj | 11 +++
.../ci/OglApprovedViewerRegression/Program.cs | 51 +++++++++++
.../ci/verify_gen1_approved_viewer_access.py | 59 +++++++++++++
16 files changed, 353 insertions(+)
create mode 100644 OpenSim/Framework/OglApprovedViewerPolicy.cs
create mode 100644 doc/NexVerse/GEN1_APPROVED_VIEWERS.md
create mode 100644 tools/ci/OglApprovedViewerRegression/OglApprovedViewerRegression.csproj
create mode 100644 tools/ci/OglApprovedViewerRegression/Program.cs
create mode 100644 tools/ci/verify_gen1_approved_viewer_access.py
diff --git a/.github/workflows/nexjast-ci.yml b/.github/workflows/nexjast-ci.yml
index e85d8eca..c18a5d03 100644
--- a/.github/workflows/nexjast-ci.yml
+++ b/.github/workflows/nexjast-ci.yml
@@ -827,6 +827,13 @@ jobs:
shell: bash
run: python3 tools/ci/verify_gen1_hg_asset_egress_lockdown.py
+ - name: Verify Generation 1 approved-viewer admission policy
+ shell: bash
+ run: |
+ set -euo pipefail
+ python3 tools/ci/verify_gen1_approved_viewer_access.py
+ dotnet run --project tools/ci/OglApprovedViewerRegression/OglApprovedViewerRegression.csproj --configuration Release
+
- name: Runtime smoke test LLLogin protocol
shell: bash
run: bash tools/ci/smoke_lllogin_protocol.sh
diff --git a/OpenSim/Framework/OglApprovedViewerPolicy.cs b/OpenSim/Framework/OglApprovedViewerPolicy.cs
new file mode 100644
index 00000000..f1c62a72
--- /dev/null
+++ b/OpenSim/Framework/OglApprovedViewerPolicy.cs
@@ -0,0 +1,88 @@
+// SPDX-License-Identifier: MPL-2.0
+using System;
+
+namespace OpenSim.Framework
+{
+ ///
+ /// Generation 1 admission policy for self-reported viewer names.
+ /// This is a compatibility allowlist, NOT verified client attestation:
+ /// a modified viewer can forge both the channel and version strings.
+ ///
+ public static class OglApprovedViewerPolicy
+ {
+ private static readonly string[] s_AllowedNames =
+ {
+ "Firestorm", "OpenGenesisLINK", "OGL Viewer"
+ };
+
+ private static readonly string[] s_KnownCopybotNames =
+ {
+ "Darkstorm", "Hydrastorm", "Copybot"
+ };
+
+ public static bool IsAllowed(string viewer, string channel)
+ {
+ if (ContainsKnownCopybotName(viewer) || ContainsKnownCopybotName(channel))
+ return false;
+
+ if (StartsWithApprovedName(viewer))
+ return string.IsNullOrWhiteSpace(channel) ||
+ StartsWithApprovedName(channel) ||
+ IsNumericVersion(channel);
+
+ return StartsWithApprovedName(channel) && IsNumericVersion(viewer);
+ }
+
+ private static bool ContainsKnownCopybotName(string value)
+ {
+ if (string.IsNullOrWhiteSpace(value))
+ return false;
+
+ foreach (string name in s_KnownCopybotNames)
+ {
+ if (value.Contains(name, StringComparison.OrdinalIgnoreCase))
+ return true;
+ }
+ return false;
+ }
+
+ private static bool StartsWithApprovedName(string value)
+ {
+ if (string.IsNullOrWhiteSpace(value))
+ return false;
+
+ string normalized = value.Trim();
+ foreach (string name in s_AllowedNames)
+ {
+ if (!normalized.StartsWith(name, StringComparison.OrdinalIgnoreCase))
+ continue;
+
+ if (normalized.Length == name.Length)
+ return true;
+
+ char next = normalized[name.Length];
+ if (char.IsWhiteSpace(next) || next == '-' || next == '_')
+ return true;
+ }
+ return false;
+ }
+
+ private static bool IsNumericVersion(string value)
+ {
+ if (string.IsNullOrWhiteSpace(value))
+ return true;
+
+ string normalized = value.Trim();
+ if (!char.IsDigit(normalized[0]))
+ return false;
+
+ foreach (char c in normalized)
+ {
+ if (!char.IsDigit(c) && c != '.' && c != '-' &&
+ c != '_' && c != '(' && c != ')' && !char.IsWhiteSpace(c))
+ return false;
+ }
+ return true;
+ }
+ }
+}
diff --git a/OpenSim/Framework/OpenSim.Framework.csproj b/OpenSim/Framework/OpenSim.Framework.csproj
index befe893e..88eec4c4 100644
--- a/OpenSim/Framework/OpenSim.Framework.csproj
+++ b/OpenSim/Framework/OpenSim.Framework.csproj
@@ -252,6 +252,7 @@
Code
+
Code
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs
index 07c5fc39..13ab4d93 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.cs
@@ -275,6 +275,7 @@ namespace OpenSim.Region.Framework.Scenes
get { return m_minRegionViewDistance; }
}
+ private bool m_OglApprovedViewersOnly;
private readonly List m_AllowedViewers = new();
private readonly List m_BannedViewers = new();
@@ -1076,6 +1077,8 @@ namespace OpenSim.Region.Framework.Scenes
}
string[] possibleAccessControlConfigSections = new string[] { "Startup", "AccessControl"};
+ m_OglApprovedViewersOnly = Util.GetConfigVarFromSections(config,
+ "OGLApprovedViewersOnly", possibleAccessControlConfigSections, false);
string grant = Util.GetConfigVarFromSections(
config, "AllowedClients", possibleAccessControlConfigSections, string.Empty);
@@ -4046,6 +4049,17 @@ namespace OpenSim.Region.Framework.Scenes
return false;
}
+ // Enforce again at region entry, including direct travel and crossings.
+ // Viewer strings can be forged; this is not cryptographic attestation.
+ if (m_OglApprovedViewersOnly &&
+ !OglApprovedViewerPolicy.IsAllowed(acd.Viewer, acd.Channel))
+ {
+ reason = "Only Firestorm or OpenGenesisLINK Viewer is permitted";
+ m_log.InfoFormat("[OGL VIEWER ACCESS]: Region {0} rejected viewer {1}, channel {2}",
+ RegionInfo.RegionName, acd.Viewer, acd.Channel);
+ return false;
+ }
+
//Check if the viewer is banned or in the viewer access list
//We check if the substring is listed for higher flexebility
bool ViewerDenied = true;
diff --git a/OpenSim/Services/HypergridService/GatekeeperService.cs b/OpenSim/Services/HypergridService/GatekeeperService.cs
index 92953805..1187c978 100644
--- a/OpenSim/Services/HypergridService/GatekeeperService.cs
+++ b/OpenSim/Services/HypergridService/GatekeeperService.cs
@@ -58,6 +58,7 @@ namespace OpenSim.Services.HypergridService
private static IGridUserService m_GridUserService;
private static IBansService m_BansService;
+ private static bool m_OglApprovedViewersOnly;
private static Regex m_AllowedClientsRegex = null;
private static Regex m_DeniedClientsRegex = null;
private static string m_DeniedMacs = string.Empty;
@@ -151,6 +152,8 @@ namespace OpenSim.Services.HypergridService
m_SimulationService = ServerUtils.LoadPlugin(simulationService, args);
string[] possibleAccessControlConfigSections = new string[] { "AccessControl", "GatekeeperService" };
+ m_OglApprovedViewersOnly = Util.GetConfigVarFromSections(config,
+ "OGLApprovedViewersOnly", possibleAccessControlConfigSections, false);
string AllowedClients = Util.GetConfigVarFromSections(config, "AllowedClients", possibleAccessControlConfigSections, string.Empty);
if (!string.IsNullOrEmpty(AllowedClients))
{
@@ -331,6 +334,16 @@ namespace OpenSim.Services.HypergridService
string curViewer = Util.GetViewerName(aCircuit);
string curMac = aCircuit.Mac.ToString();
+ // Reject before foreign presence registration, avatar placement or HG asset activity.
+ if (m_OglApprovedViewersOnly &&
+ !OglApprovedViewerPolicy.IsAllowed(aCircuit.Viewer, aCircuit.Channel))
+ {
+ reason = "Only Firestorm or OpenGenesisLINK Viewer is permitted";
+ m_log.InfoFormat("[OGL VIEWER ACCESS]: Rejected Hypergrid arrival using viewer {0}, channel {1}",
+ aCircuit.Viewer, aCircuit.Channel);
+ return false;
+ }
+
//
// Check client
diff --git a/OpenSim/Services/LLLoginService/LLLoginService.cs b/OpenSim/Services/LLLoginService/LLLoginService.cs
index 718ce8b6..27d83085 100644
--- a/OpenSim/Services/LLLoginService/LLLoginService.cs
+++ b/OpenSim/Services/LLLoginService/LLLoginService.cs
@@ -86,6 +86,7 @@ namespace OpenSim.Services.LLLoginService
protected int m_MaxAgentGroups = 42;
protected string m_DestinationGuide;
protected string m_AvatarPicker;
+ protected bool m_OglApprovedViewersOnly;
protected Regex m_AllowedClientsRegex;
protected Regex m_DeniedClientsRegex;
protected string m_DeniedMacs;
@@ -158,6 +159,8 @@ namespace OpenSim.Services.LLLoginService
m_allowLoginFallbackToAnyRegion = m_LoginServerConfig.GetBoolean("AllowLoginFallbackToAnyRegion", m_allowLoginFallbackToAnyRegion);
string[] accessControlConfigSections = new string[] { "AccessControl", "LoginService" };
+ m_OglApprovedViewersOnly = Util.GetConfigVarFromSections(config,
+ "OGLApprovedViewersOnly", accessControlConfigSections, false);
string AllowedClients = Util.GetConfigVarFromSections(config, "AllowedClients", accessControlConfigSections, string.Empty);
if (!string.IsNullOrEmpty(AllowedClients))
{
@@ -401,6 +404,16 @@ namespace OpenSim.Services.LLLoginService
try
{
+ // The server refuses nonapproved self-reported viewers before
+ // authentication, account/presence creation or asset traffic.
+ if (m_OglApprovedViewersOnly &&
+ !OglApprovedViewerPolicy.IsAllowed(clientVersion, channel))
+ {
+ m_log.InfoFormat("[OGL VIEWER ACCESS]: Rejected local login: viewer {0}, channel {1}",
+ clientVersion, channel);
+ return LLFailedLoginResponse.LoginBlockedProblem;
+ }
+
//
// Check client
//
diff --git a/bin/OpenSim.ini b/bin/OpenSim.ini
index a9f412e2..3d2d5cbf 100644
--- a/bin/OpenSim.ini
+++ b/bin/OpenSim.ini
@@ -80,6 +80,12 @@
CertHostIp = "127.0.0.1"
[AccessControl]
+ ; Generation 1 viewer admission: local login, Hypergrid arrival and region entry.
+ ; Approved product families: Firestorm, OpenGenesisLINK (including OGL Viewer).
+ ; Unknown, Darkstorm, Hydrastorm and other nonapproved viewer names are refused.
+ ; WARNING: viewer-reported channel/version can be spoofed. Not DRM or proof of identity.
+ OGLApprovedViewersOnly = true
+
[Map]
GenerateMaptiles = true
diff --git a/bin/OpenSim.ini.example b/bin/OpenSim.ini.example
index 0b91ad2b..c039c208 100644
--- a/bin/OpenSim.ini.example
+++ b/bin/OpenSim.ini.example
@@ -79,6 +79,12 @@
CertHostIp = "127.0.0.1"
[AccessControl]
+ ; Generation 1 viewer admission: local login, Hypergrid arrival and region entry.
+ ; Approved product families: Firestorm, OpenGenesisLINK (including OGL Viewer).
+ ; Unknown, Darkstorm, Hydrastorm and other nonapproved viewer names are refused.
+ ; WARNING: viewer-reported channel/version can be spoofed. Not DRM or proof of identity.
+ OGLApprovedViewersOnly = true
+
[Map]
GenerateMaptiles = true
diff --git a/bin/Robust.HG.OGLAsset.ini.example b/bin/Robust.HG.OGLAsset.ini.example
index 0523d97a..d5ac71d6 100644
--- a/bin/Robust.HG.OGLAsset.ini.example
+++ b/bin/Robust.HG.OGLAsset.ini.example
@@ -267,6 +267,12 @@
; GatekeeperURIAlias = "login.osgrid.org"
[AccessControl]
+ ; Generation 1 viewer admission: local login, Hypergrid arrival and region entry.
+ ; Approved product families: Firestorm, OpenGenesisLINK (including OGL Viewer).
+ ; Unknown, Darkstorm, Hydrastorm and other nonapproved viewer names are refused.
+ ; WARNING: viewer-reported channel/version can be spoofed. Not DRM or proof of identity.
+ OGLApprovedViewersOnly = true
+
;# {AllowedClients} {} {Bar (|) separated list of allowed clients} {}
;; Bar (|) separated list of viewers which may gain access to the regions.
;; One can use a substring of the viewer name to enable only certain
diff --git a/bin/Robust.HG.ini b/bin/Robust.HG.ini
index 5e89f869..752014fb 100644
--- a/bin/Robust.HG.ini
+++ b/bin/Robust.HG.ini
@@ -247,6 +247,12 @@
; GatekeeperURIAlias = "login.osgrid.org"
[AccessControl]
+ ; Generation 1 viewer admission: local login, Hypergrid arrival and region entry.
+ ; Approved product families: Firestorm, OpenGenesisLINK (including OGL Viewer).
+ ; Unknown, Darkstorm, Hydrastorm and other nonapproved viewer names are refused.
+ ; WARNING: viewer-reported channel/version can be spoofed. Not DRM or proof of identity.
+ OGLApprovedViewersOnly = true
+
;# {AllowedClients} {} {Bar (|) separated list of allowed clients} {}
;; Bar (|) separated list of viewers which may gain access to the regions.
;; One can use a substring of the viewer name to enable only certain
diff --git a/bin/Robust.HG.ini.example b/bin/Robust.HG.ini.example
index dfa9c310..1d19d619 100644
--- a/bin/Robust.HG.ini.example
+++ b/bin/Robust.HG.ini.example
@@ -245,6 +245,12 @@
; GatekeeperURIAlias = "login.osgrid.org"
[AccessControl]
+ ; Generation 1 viewer admission: local login, Hypergrid arrival and region entry.
+ ; Approved product families: Firestorm, OpenGenesisLINK (including OGL Viewer).
+ ; Unknown, Darkstorm, Hydrastorm and other nonapproved viewer names are refused.
+ ; WARNING: viewer-reported channel/version can be spoofed. Not DRM or proof of identity.
+ OGLApprovedViewersOnly = true
+
;# {AllowedClients} {} {Bar (|) separated list of allowed clients} {}
;; Bar (|) separated list of viewers which may gain access to the regions.
;; One can use a substring of the viewer name to enable only certain
diff --git a/bin/Robust.ini.example b/bin/Robust.ini.example
index ca55b6d6..637156f8 100644
--- a/bin/Robust.ini.example
+++ b/bin/Robust.ini.example
@@ -186,6 +186,12 @@
;ConsolePort = 0
[AccessControl]
+ ; Generation 1 viewer admission: local login, Hypergrid arrival and region entry.
+ ; Approved product families: Firestorm, OpenGenesisLINK (including OGL Viewer).
+ ; Unknown, Darkstorm, Hydrastorm and other nonapproved viewer names are refused.
+ ; WARNING: viewer-reported channel/version can be spoofed. Not DRM or proof of identity.
+ OGLApprovedViewersOnly = true
+
;# {AllowedClients} {} {Bar (|) separated list of allowed clients} {}
;; Bar (|) separated list of viewers which may gain access to the regions.
;; One can use a substring of the viewer name to enable only certain
diff --git a/doc/NexVerse/GEN1_APPROVED_VIEWERS.md b/doc/NexVerse/GEN1_APPROVED_VIEWERS.md
new file mode 100644
index 00000000..9a651fce
--- /dev/null
+++ b/doc/NexVerse/GEN1_APPROVED_VIEWERS.md
@@ -0,0 +1,60 @@
+# OpenGenesisLINK Generation 1 – Offizielle Viewer-Zulassung
+
+**Status:** Entwicklung (technischer Build 0.9.4.0 Dev), nach PR-Merge noch kein automatischer Live-Rollout.
+
+## Zugelassene Viewer
+
+- **Firestorm Viewer** – `Firestorm` und Firestorm-Channel wie `Firestorm-Releasex64`
+- **OpenGenesisLINK Viewer** – `OpenGenesisLINK` und der projektinterne Name `OGL Viewer`
+
+Andere selbst gemeldete Viewernamen – einschließlich **Darkstorm**, **Hydrastorm**, Alchemy, Singularity, Cool VL und unbekannter Clients – sind nicht zugelassen.
+
+Der Zugang ist an **drei Stellen** serverseitig geprüft:
+1. lokaler ROBUST LoginService vor erfolgreicher Anmeldung;
+2. ROBUST GatekeeperService vor Hypergrid-Präsenz und Weitergabe an Zielregion;
+3. Simulator Scene beim Eintritt, Direkttransport und Region Crossing.
+
+Dafür nutzt Generation 1 die gemeinsame Implementierung `OpenSim.Framework.OglApprovedViewerPolicy`. Sie erfordert einen passenden offiziellen Namen am Anfang des Viewer-Kanals oder der Viewer-Version, prüft widersprüchliche Namensangaben und verwirft ausdrücklich die bekannten Copybot-Kennungen, selbst wenn ein erlaubter Name zusätzlich vorkommt. Numerische Versionsstrings mit offiziell angegebenem Viewer-Channel werden akzeptiert; komplett fehlende/unbekannte Kennungen nicht.
+
+## Konfiguration
+
+Aktive Profile und Vorlagen:
+
+```ini
+[AccessControl]
+OGLApprovedViewersOnly = true
+```
+
+Das gilt sowohl für ROBUST (LoginService **und** GatekeeperService) als auch für jeden Simulator (`OpenSim.ini`). Nach einem Update müssen tatsächlich geladene Konfigurationen auf allen Nodes geprüft und die betroffenen Dienste neu gestartet werden. Für Tests kann die Option in einer isolierten Umgebung auf `false` gesetzt werden.
+
+Bisherige `AllowedClients`/`DeniedClients`-Regeln werden weiterhin angewandt; diese dürfen die zwei offiziellen Viewer nicht zusätzlich ungewollt ausschließen. Die bestehende OGL Viewer Advisor-Empfehlung ist unabhängig davon und bleibt deaktiviert.
+
+## Hypergrid und Marketplace bleiben offen
+
+```ini
+[HGInventoryAccessModule]
+OutboundPermission = true
+
+[HGAssetService]
+DisallowAllExport = false
+```
+
+Berechtigte ausländische Gäste mit Firestorm/OpenGenesisLINK können Gegenstände kaufen, in ihr eigenes Inventar übertragen, heimreisen und sie im Rahmen der üblichen Objektberechtigungen aufstellen. Die HG-Asset-Endpunkte bleiben für autorisierte Transaktionen offen. Die Begrenzung großer Asset-Existenzabfragen aus PR #330 bleibt erhalten.
+
+## Sicherheitsgrenze (verpflichtend klar kommunizieren)
+
+**Viewer-Kennung ist keine vertrauenswürdige Identität.** Viewer senden Channel und Version selbst; ein modifizierter Darkstorm/Hydrastorm-Client kann sich als Firestorm tarnen. Diese Allowlist sperrt nur nicht freigegebene **gemeldete** Viewer und ihre Sitzungen. Sie stellt keine kryptografische Viewer-Attestierung dar und kann clientseitiges Exportieren empfangener Meshes/Texturen nicht zu 100 % verhindern.
+
+Ebenso ist ein öffentlicher Hypergrid-Asset-HTTP-Endpunkt nicht automatisch einer Viewer-Sitzung zugeordnet: Direkte HTTP-Aufrufe auf Import/Export-Assetrouten können **nicht allein über die Login-Zulassung** abgesichert werden. Eine vollständige Sitzungs-/Asset-Berechtigung benötigt ein zusätzliches protokollkompatibles Authentisierungsdesign, das HG-Handel nicht unterbricht.
+
+## Tests vor Produktivbetrieb
+
+- Anmelden lokal: Firestorm und OpenGenesisLINK (auch interne Aliaskennung) erfolgreich.
+- Ablehnen lokal: Darkstorm, Hydrastorm, nicht freigegebene/fehlende Kennungen und bekannte Spoof-Kombinationen.
+- Gatekeeper: Firestorm-Gast darf hinein, Darkstorm/Hydrastorm sowie unbekannte Gäste werden vor Präsenzanlage abgelehnt.
+- Regionen: Zugelassene lokale/HG-Avatare können teleportieren und Regionen wechseln; sonstige werden abgewiesen.
+- Erhalt der Kaufkette: HG-Gast kauft Mesh/Kleidung, nimmt sie heim und kann sie dort rezzen/tragen. Reguläre Imports bleiben möglich.
+- Live- und Negativtests auf Staging vor Produktion, inklusive Netztopologie und Konfigurationsvererbung.
+- Keine pauschale HG-Exportsperre, kein verfrühter Stable-Rollout.
+
+**Verifikation:** `tools/ci/verify_gen1_approved_viewer_access.py` und `tools/ci/OglApprovedViewerRegression`, zusätzlich zur normalen NexVerse CI.
diff --git a/tools/ci/OglApprovedViewerRegression/OglApprovedViewerRegression.csproj b/tools/ci/OglApprovedViewerRegression/OglApprovedViewerRegression.csproj
new file mode 100644
index 00000000..a14872fa
--- /dev/null
+++ b/tools/ci/OglApprovedViewerRegression/OglApprovedViewerRegression.csproj
@@ -0,0 +1,11 @@
+
+
+ Exe
+ net8.0
+ disable
+ disable
+
+
+
+
+
diff --git a/tools/ci/OglApprovedViewerRegression/Program.cs b/tools/ci/OglApprovedViewerRegression/Program.cs
new file mode 100644
index 00000000..5ed01d02
--- /dev/null
+++ b/tools/ci/OglApprovedViewerRegression/Program.cs
@@ -0,0 +1,51 @@
+using System;
+using OpenSim.Framework;
+
+internal static class Program
+{
+ private static int m_Count;
+
+ private static void Check(string viewer, string channel, bool expected)
+ {
+ bool actual = OglApprovedViewerPolicy.IsAllowed(viewer, channel);
+ if (actual != expected)
+ throw new Exception("Viewer admission regression: viewer='" + viewer +
+ "', channel='" + channel + "', expected=" + expected +
+ ", actual=" + actual);
+ m_Count++;
+ }
+
+ public static void Main()
+ {
+ // Firestorm version/channel reporting used by local and HG login.
+ Check("Firestorm-Release 7.1.0", "Firestorm-Releasex64", true);
+ Check("7.1.0.12345", "Firestorm-Releasex64", true);
+ Check("Firestorm-Release HG CI", "Firestorm-Releasex64", true);
+ Check("Firestorm", "", true);
+ Check("OpenGenesisLINK Viewer 1.0", "OpenGenesisLINK-Release", true);
+ Check("1.0.0.1", "OpenGenesisLINK", true);
+ Check("OGL Viewer 1.0", "OGL Viewer", true);
+ Check("1.0.0", "OGL Viewer-Release", true);
+ Check("OpenGenesisLINK-Release", null, true);
+
+ // Denials: explicit known Copybot labels and every other viewer family.
+ Check("Darkstorm 2.0", "Darkstorm", false);
+ Check("Hydrastorm 1.0", "Hydrastorm", false);
+ Check("DarkStorm-Release", "Firestorm-Releasex64", false);
+ Check("7.1.0", "Hydrastorm", false);
+ Check("Firestorm-Release Darkstorm", "Firestorm-Releasex64", false);
+ Check("Firestorm-copybot", "Firestorm-Releasex64", false);
+ Check("FirestormFake", "", false);
+ Check("Hydrastorm", "Firestorm-Releasex64", false);
+ Check("Cool VL Viewer 1.0", "Cool VL Viewer", false);
+ Check("Singularity 1.0", "Singularity", false);
+ Check("Alchemy 1.0", "Alchemy", false);
+ Check("Unknown", "Unknown", false);
+ Check("", "", false);
+ Check(null, null, false);
+ Check("Firestorm-Release", "OtherViewer", false);
+ Check("NotFirestorm 7", "NotFirestorm", false);
+
+ Console.WriteLine("OGL approved viewer admission: " + m_Count + " regression cases passed");
+ }
+}
diff --git a/tools/ci/verify_gen1_approved_viewer_access.py b/tools/ci/verify_gen1_approved_viewer_access.py
new file mode 100644
index 00000000..1b2b12dc
--- /dev/null
+++ b/tools/ci/verify_gen1_approved_viewer_access.py
@@ -0,0 +1,59 @@
+#!/usr/bin/env python3
+"""Static integration guard: Generation 1 Firestorm/OGL-only admission."""
+from pathlib import Path
+
+root = Path(__file__).resolve().parents[2]
+
+
+def read(name):
+ return (root / name).read_text(encoding="utf-8-sig")
+
+
+def section(data, name):
+ assert data.count("[" + name + "]") == 1, name
+ return data.split("[" + name + "]", 1)[1].split("\n[", 1)[0]
+
+
+policy = read("OpenSim/Framework/OglApprovedViewerPolicy.cs")
+for marker in (
+ '"Firestorm", "OpenGenesisLINK", "OGL Viewer"',
+ '"Darkstorm", "Hydrastorm", "Copybot"',
+ "StartsWithApprovedName",
+ "ContainsKnownCopybotName",
+ "IsNumericVersion",
+):
+ assert marker in policy, marker
+
+project = read("OpenSim/Framework/OpenSim.Framework.csproj")
+assert 'Compile Include="OglApprovedViewerPolicy.cs"' in project
+
+for path, needle in (
+ ("OpenSim/Services/LLLoginService/LLLoginService.cs",
+ "OglApprovedViewerPolicy.IsAllowed(clientVersion, channel)"),
+ ("OpenSim/Services/HypergridService/GatekeeperService.cs",
+ "OglApprovedViewerPolicy.IsAllowed(aCircuit.Viewer, aCircuit.Channel)"),
+ ("OpenSim/Region/Framework/Scenes/Scene.cs",
+ "OglApprovedViewerPolicy.IsAllowed(acd.Viewer, acd.Channel)"),
+):
+ src = read(path)
+ assert needle in src, path
+ assert '"OGLApprovedViewersOnly"' in src, path
+
+for path in (
+ "bin/Robust.HG.ini",
+ "bin/Robust.HG.ini.example",
+ "bin/Robust.HG.OGLAsset.ini.example",
+ "bin/Robust.ini.example",
+ "bin/OpenSim.ini",
+ "bin/OpenSim.ini.example",
+):
+ body = section(read(path), "AccessControl")
+ assert "OGLApprovedViewersOnly = true" in body, path
+
+hg = read("bin/config-include/GridCommon.ini")
+robust = read("bin/Robust.HG.ini")
+assert "OutboundPermission = true" in hg
+assert "DisallowAllExport = false" in robust
+assert "MaxHGAssetExistIds = 16384" in robust
+
+print("Generation 1 approved-viewer access: login + gatekeeper + region + configs OK")