Close group-accounting and invitation authorization gaps; prevent scoped-service actor spoofing; make wallet provisioning outcomes explicit; harden viewer balance conversion; add CI contracts and operator notes.
3.2 KiB
NexGroups security and wallet consistency hardening
Date: 2026-10-22. Target: OpenGenesisLINK World API / native GroupsService / Firestorm.
Authorization fixes
GET /api/v1/groups/{group_id}/accountingrequires a local resident's real group membership and the union of the resident's assigned group roles to includeGroupPowers.Accountable. An explicitly privilegedadmin:*principal can inspect accounts for support.GETandDELETE /api/v1/groups/{group_id}/invites/{invite_id}validate the invitation's group against the URL. The underlying native GroupsService now permits retrieval or deletion only by the invitation recipient or an actual group member with Invite/owner authority.- Scoped service principal tokens with
groups:managecannot impersonate arbitrary group members by providingactor_id. Delegated group mutations requireadmin:*; resident mutations use the authenticated resident UUID. requester_idquery impersonation is likewise accepted only withadmin:*. Ordinary resident and scoped-service tokens use their own subject.- Native GroupsService group invitations still support invited Hypergrid identities: the check compares the canonical requesting agent ID with the stored invitee ID.
Transaction boundary
Native group storage and NV$ account storage are separate authorities.
When group creation succeeds but wallet provisioning is unavailable or fails,
the API now returns HTTP 201 with the committed group ID and
wallet_status: "pending" instead of incorrectly returning HTTP 500.
wallet_status: "ready" means both the Ledger group wallet and its NVBAN
mapping were ensured. Group accounting can idempotently provision a pending
group wallet on the next authorized request. Operator logs record failures
without leaking connection strings or sensitive data.
Neither this patch nor the account self-deletion service removes historical financial ledger entries, deeds, or external portal data.
Firestorm money range
Firestorm group summary packets carry a 32-bit unsigned balance. A negative or > UINT32_MAX ledger value is now explicitly rejected with a service warning and an unavailable-account reply instead of silent clamping.
Operational verification
- Build ROBUST and simulator from the same commit and restart both.
- As group accountant, check accounting endpoint and Firestorm group balance.
- As a member without Accountable, as a nonmember, and using scoped service credentials, verify accounting is denied.
- Verify an invited avatar can read/decline its own invite; a stranger cannot read or delete that invite, even with a known UUID.
- Test a group creation with the Economy service intentionally unavailable:
it must return HTTP 201 and
wallet_status=pending; after recovery, an authorized accounting call must complete wallet provisioning. - Test
groups:manageservice token plusactor_idon create, group deletion, role mutation, ban and membership routes: must reject. - Run
python3 tools/ci/verify_nexgroups_security.py; GitHub CI also runsdotnet build --configuration Release OpenSim.sln.
These are recommended live/CI test cases, not claims that they have already run against the production grid.