fix(gen1): preserve Hypergrid purchases and normal asset delivery (#329)

* fix(gen1): keep Hypergrid asset commerce enabled in bin/Robust.HG.OGLAsset.ini.example

* fix(gen1): keep Hypergrid asset commerce enabled in bin/Robust.HG.ini

* fix(gen1): keep Hypergrid asset commerce enabled in bin/Robust.HG.ini.example

* fix(gen1): keep Hypergrid asset commerce enabled in bin/config-include/GridCommon.ini

* fix(gen1): keep Hypergrid asset commerce enabled in bin/config-include/GridCommon.ini.example

* fix(gen1): keep Hypergrid asset commerce enabled in bin/config-include/StandaloneCommon.ini.example

* docs/test(gen1): distinguish HG trade from emergency lockdown

* docs/test(gen1): distinguish HG trade from emergency lockdown
This commit is contained in:
OpenGenesis (MPL 2.0) authored and GitHub committed 2026-10-28 13:55:50 +01:00
1 parent 830964c74b
commit 09d329eb56
8 files changed
+70 -61

No files matched your search

+3 -3
View File
@@ -1019,9 +1019,9 @@
; * the assets of this world.
; *
[HGAssetService]
; Generation 1: deny all public Hypergrid asset reads/metadata.
; HG asset POST/import stays available (only import licensed content).
DisallowAllExport = true
; Generation 1: allow normal Hypergrid commerce and delivery of purchased assets.
; Emergency opt-in lockdown: true denies ALL public HG reads (including sales).
DisallowAllExport = false
;; Use the second option if you have FSAsset service enabled
LocalServiceModule = "OpenSim.Services.HypergridService.dll:HGAssetService"
;LocalServiceModule = "OpenSim.Services.HypergridService.dll:HGFSAssetService"
+3 -3
View File
@@ -934,9 +934,9 @@
; * the assets of this world.
; *
[HGAssetService]
; Generation 1: deny all public Hypergrid asset reads/metadata.
; HG asset POST/import stays available (only import licensed content).
DisallowAllExport = true
; Generation 1: allow normal Hypergrid commerce and delivery of purchased assets.
; Emergency opt-in lockdown: true denies ALL public HG reads (including sales).
DisallowAllExport = false
;; Use the second option if you have FSAsset service enabled
; FSAssets-aware Hypergrid asset service.
;LocalServiceModule = "OpenSim.Services.HypergridService.dll:HGAssetService"
+3 -3
View File
@@ -983,9 +983,9 @@
; * the assets of this world.
; *
[HGAssetService]
; Generation 1: deny all public Hypergrid asset reads/metadata.
; HG asset POST/import stays available (only import licensed content).
DisallowAllExport = true
; Generation 1: allow normal Hypergrid commerce and delivery of purchased assets.
; Emergency opt-in lockdown: true denies ALL public HG reads (including sales).
DisallowAllExport = false
;; Use the second option if you have FSAsset service enabled
LocalServiceModule = "OpenSim.Services.HypergridService.dll:HGAssetService"
;LocalServiceModule = "OpenSim.Services.HypergridService.dll:HGFSAssetService"
+6 -6
View File
@@ -204,10 +204,10 @@
; Change this to your server
; accessible from other grids
;
;; If you want to protect your assets from being copied by foreign visitors
;; set this to false. You may want to do this on sims that have licensed content.
;; Leave enabled for permitted Hypergrid sales, suitcase transfer, and deliveries.
;; Disabling blocks foreign inventory transfer; this is NOT a Copybot defense.
;; Default is true.
OutboundPermission = false
OutboundPermission = true
;; Send visual reminder to local users that their inventories are unavailable while they are traveling
;; and available when they return. True by default.
@@ -222,9 +222,9 @@
[HGAssetService]
; Generation 1: deny all public Hypergrid asset reads/metadata.
; HG asset POST/import stays available (only import licensed content).
DisallowAllExport = true
; Generation 1: allow normal Hypergrid commerce and delivery of purchased assets.
; Emergency opt-in lockdown: true denies ALL public HG reads (including sales).
DisallowAllExport = false
;
; === HG ONLY ===
;; The asset types that this grid can export to / import from other grids.
+6 -6
View File
@@ -182,10 +182,10 @@
; Change this to your server
; accessible from other grids
;
;; If you want to protect your assets from being copied by foreign visitors
;; set this to false. You may want to do this on sims that have licensed content.
;; Leave enabled for permitted Hypergrid sales, suitcase transfer, and deliveries.
;; Disabling blocks foreign inventory transfer; this is NOT a Copybot defense.
;; Default is true.
OutboundPermission = false
OutboundPermission = true
;; Send visual reminder to local users that their inventories are unavailable while they are traveling
;; and available when they return. True by default.
@@ -200,9 +200,9 @@
[HGAssetService]
; Generation 1: deny all public Hypergrid asset reads/metadata.
; HG asset POST/import stays available (only import licensed content).
DisallowAllExport = true
; Generation 1: allow normal Hypergrid commerce and delivery of purchased assets.
; Emergency opt-in lockdown: true denies ALL public HG reads (including sales).
DisallowAllExport = false
;
; === HG ONLY ===
;; The asset types that this grid can export to / import from other grids.
@@ -310,9 +310,9 @@
; ShowUserDetailsInHGProfile = True
[HGAssetService]
; Generation 1: deny all public Hypergrid asset reads/metadata.
; HG asset POST/import stays available (only import licensed content).
DisallowAllExport = true
; Generation 1: allow normal Hypergrid commerce and delivery of purchased assets.
; Emergency opt-in lockdown: true denies ALL public HG reads (including sales).
DisallowAllExport = false
;; The asset types that this grid can export to / import from other grids.
;; Comma separated.
;; Valid values are all the asset types in OpenMetaverse.AssetType, namely:
@@ -329,7 +329,7 @@
;; If you want to protect your assets from being copied by foreign visitors
;; uncomment the next line. You may want to do this on sims that have licensed content.
;; true = allow exports, false = disallow exports. True by default.
OutboundPermission = false
OutboundPermission = true
;; Send visual reminder to local users that their inventories are unavailable while they are traveling
;; and available when they return. True by default.
+40 -31
View File
@@ -1,46 +1,55 @@
# OpenGenesisLINK Generation 1 – Hypergrid Asset Egress Lockdown (Phase 1)
# OpenGenesisLINK Generation 1 – Hypergrid commerce and optional egress lockdown
**Technical build:** 0.9.4.0 Dev
**Public product:** OpenGenesisLINK Generation 1
**Scope:** Strict server-side outbound **Hypergrid asset exchange** blocking on the public HG connector; authorized inbound asset upload is independent.
**Normal policy:** Open Hypergrid commerce and authorized inbound imports.
## Explicit technical limit
## Policy correction to PR #328
This is **not** 100% Copybot prevention. A viewer must receive mesh, texture, animation and scene information to render a world; a malicious viewer can record delivered data without using the official inventory/export APIs. Hiding the export button, detecting a viewer name or blocking one HTTP route cannot fix this fundamental limitation.
The PR #328 initial settings `[HGInventoryAccessModule] OutboundPermission = false` and `[HGAssetService] DisallowAllExport = true` blocked ordinary outgoing Hypergrid inventory and asset delivery. They would prevent a visiting user from reliably taking a legitimately purchased item home and rezzing it there. That is *not* the Generation 1 marketplace policy.
This measure blocks **defined server-side export channels**, not client-side reconstruction or photography/screen capture. It does not change legal ownership or grant permission to import third-party content from Second Life. Only creator-owned or appropriately licensed imports may be accepted.
The active configurations and distributed examples now use:
## Controls introduced
```ini
[HGInventoryAccessModule]
OutboundPermission = true
1. `[HGInventoryAccessModule] OutboundPermission = false` on active GridCommon and distributed configuration examples, to prevent normal foreign-visitor inventory transfers and HG asset posting.
2. `[HGAssetService] DisallowAllExport = true` on the ROBUST public Hypergrid FSAsset endpoint, sample ROBUST configs, GridCommon and standalone sample.
3. The shared `AssetPermissions` contract blocks outbound assets **of every type**, including unknown/future enum values. `AllowedImport` is unchanged.
4. The public `HGAssetService` HTTP connector skips registration of `GET /assets` (raw content + metadata) and `POST /get_assets_exist` entirely when lockdown is enabled; `POST /assets` is retained for authorized **inbound** asset storage.
5. The Hypergrid implementations `HGFSAssetService`, `HGAssetService` and `HGRemoteAssetService` deny regular/cached read and metadata/existence enumeration where applicable, even through their in-process interfaces.
[HGAssetService]
DisallowAllExport = false
```
## What remains reachable / considerations
These settings live in **different service configurations**: GridCommon for regions and the public HGAssetService for ROBUST (including its FSAssets-backed `HGFSAssetService`). Check both on the production host: a repository change is not an automatic deployment. Protect the private local `[AssetService]` listener with a firewall.
- The **private local [AssetService]** is not disabled: simulator/ROBUST communication and normal Firestorm rendering require internal reads. Its private HTTP listener MUST remain behind a firewall/private networking or authenticated network access. An exposed private AssetService would circumvent the public HG lockdown.
- Local viewer CAPS `GetMesh`/`GetTexture`/`ViewerAsset` still deliver assets needed for rendering. This is not an anti-viewer-extraction guarantee.
- Local user and administrator IAR/OAR/console exports, filesystem copies and DB backups are intentionally **not** removed in Phase 1. Those require a separate operator policy and may be essential for disaster recovery.
- Outbound HG suitcase items and attachments may cease to function on foreign grids. Foreign avatars may lose access to assets originally hosted by this grid. Inbound cross-grid teleports can still work, but asset availability must be tested.
- Authorized imports remain possible through existing upload flows, but importing foreign copyrighted content without permission is not authorized by this feature.
- Do not expose the public untrusted HG POST endpoint without considering upload/abuse rate limits and owner verification; these are separate controls.
The default allows ordinary HG asset transfer subject to the existing item, creator, next-owner and grid permissions. It does not guarantee transfer of every item; the originating seller must grant the appropriate rights.
## Tests and staged acceptance
## Optional emergency mode: NOT a Copybot-only switch
- Build and run the full repository NexVerse CI; its static egress guard checks all code/config variants.
- On a **staging** ROBUST with both connectors, check that on the public HG listener `GET /assets/{uuid}`, `GET /assets/{uuid}/data`, `GET /assets/{uuid}/metadata` and `POST /get_assets_exist` cannot return a local asset or its metadata. Expect an unregistered route/not-found (exact HTTP code depends on server routing).
- Check that local private `AssetService` reads and Firestorm mesh/texture loading continue to function; do **not** test by exposing the private port publicly.
- Check authorized asset upload/ordinary viewer upload and permitted IAR import; verify the HG public asset POST only accepts the expected input format and cannot fetch unrelated assets.
- Verify denied outbound asset transfers (objects, meshes, textures, scripts and unusual/unknown types), outgoing HG suitcase behavior, inbound HG visitors, border crossing and teleport return.
- Confirm no accidental exports through supplementary World API/portal endpoints. Every export route must have its own authorization and ownership checks.
- Confirm local operator backups and restore work. Investigate any feature regression before production activation.
The code introduced in PR #328 remains as an **opt-in, grid-wide emergency control**:
## Next protection blocks
- `DisallowAllExport = true` blocks public Hypergrid asset-content, metadata and existence reads for all asset types, including future/unknown types. The inbound HG POST path is independent.
- `OutboundPermission = false` prevents normal outbound Hypergrid inventory/asset delivery.
Phase 2: audit World API inventory/media and asset HTTP endpoints for owner scope, capability token lifetime, abuse/rate limiting and signing, logging and export authorization.
Phase 3: optional audited IAR/OAR user-export policy (retain secure operator backups), content provenance/licensing and watermarking.
Phase 4: in-world anomalous scrape monitoring for investigation, not automatic untrusted viewer bans.
These controls are deliberately **disabled by default** because they block authorized HG commerce. If temporarily activated for emergency containment, warn visitors and sellers that purchases, attachments and suitcases may fail. Do not advertise this as routine anti-Copybot functionality.
**Do not advertise this as complete Copybot protection.** Security expectation: server-side HG egress closed, viewer-data capture still possible.
## Copybot technical limit
The viewer tells the server its name/channel/version; these fields can be forged. Existing region `AllowedClients`/`DeniedClients`/`BannedClients` can restrict self-identified clients, but banning a viewer prevents its normal use, not just its export button.
A viewer must receive scene, texture, animation and mesh data to render the world. A modified viewer may save those bytes without invoking any server-side “export” operation. Consequently, there is **no secure server-side switch** that can guarantee “copybot viewer may import and view everything, but cannot export anything” while normal content loading stays available.
The intended protection roadmap is therefore:
1. Audit and enforce real server-side inventory permissions for take, take-copy, give, attachments and transfer (including HG ownership transitions), independent of reported viewer type.
2. Audit the World API, portal, asset/texture/mesh CAPS and privileged IAR/OAR export surfaces for strict authorization, owner scope, signed tokens, limits, and export logging.
3. Consider opt-in detection of excessive bulk asset fetching with operator review, rather than trusting viewer strings or blocking entire grids.
4. Add product provenance/licensing policies for Marketplace deliveries and retain secure administrator backup/restore.
## Required staging acceptance
1. Hypergrid guest using Firestorm visits Stadt-NexVerse, buys or receives a permitted outfit and mesh object, and sees them in inventory.
2. Guest returns to the home grid and can wear/rez the items with complete textures, meshes and permitted scripts.
3. Ordinary cross-grid teleport, attachments, inventory delivery, inbound uploads and authorized import continue to work.
4. Negative permission tests: unauthorized give/copy/take and unsuitable next-owner rights remain blocked independent of viewer name.
5. Confirm private asset service ports remain nonpublic and World API endpoints do not expose private asset data unauthenticated.
6. Optionally test the emergency lockdown on an isolated disposable stage; restore the **open** default afterwards.
**No production rollout is performed by this code change.** Stable `v0.9.3.13` remains unchanged.
@@ -1,5 +1,5 @@
#!/usr/bin/env python3
"""Static safeguards for Generation 1's public Hypergrid asset egress lockdown.
"""Static safeguards for Generation 1 open HG commerce and optional egress lockdown.
These assertions complement (do not replace) live negative HTTP, viewer, and
HG tests. No endpoint access is attempted from CI.
@@ -62,7 +62,7 @@ for name in (
"bin/config-include/StandaloneCommon.ini.example",
):
hg = section(name, "HGAssetService")
assert "DisallowAllExport = true" in hg, name
assert "DisallowAllExport = false" in hg, name
assert not any(line.strip().startswith("DisallowImport =")
for line in hg.splitlines()), name
@@ -72,8 +72,8 @@ for name in (
"bin/config-include/StandaloneCommon.ini.example",
):
section_data = section(name, "HGInventoryAccessModule")
assert "OutboundPermission = false" in section_data, name
assert "OutboundPermission = true" in section_data, name
notes = read("doc/NexVerse/GEN1_ASSET_EGRESS_LOCKDOWN.md")
assert "not" in notes.lower() and "100% Copybot prevention" in notes
print("Generation 1 HG egress safeguards: policy, HTTP routes, services, configuration, threat model OK")
assert "no secure server-side switch" in notes and "Open Hypergrid commerce" in notes
print("Generation 1 HG: commerce defaults open; emergency lockdown code and policy verified")