From a4eae9056152335662f1115f97bf35fb00ab6d23 Mon Sep 17 00:00:00 2001 From: Meta Vens Date: Wed, 28 Oct 2026 02:07:59 +0100 Subject: [PATCH] Unity CHANGELOG: remote writes to a CultNetDatabaseServer need a granting authority Co-Authored-By: Claude Opus 5.5 --- unity/org.gamecult.cultlib/CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/unity/org.gamecult.cultlib/CHANGELOG.md b/unity/org.gamecult.cultlib/CHANGELOG.md index 126fcfa5..390ece2a 100644 --- a/unity/org.gamecult.cultlib/CHANGELOG.md +++ b/unity/org.gamecult.cultlib/CHANGELOG.md @@ -20,6 +20,7 @@ Releases as 3.0.0 (major). - `GameCult.Mesh`: `AsSchemaAlias()` is removed from the interfaces `ICultMeshDocumentHandle` and `ICultMeshCollectionHandle` and from the classes `CultMeshDocumentHandle` and `CultMeshCollectionHandle`. Read the handle by the schema you mean. - The element types of owned lists gain a public string `Id` member with `[CultElementId]`, so their lists merge by identity: in `GameCult.Mesh`, `CultMeshBodyDescriptor`, `CultMeshCdnChunkRef`, `CultMeshDiscoveryCandidateDocument`, `CultMeshEntityPrefabComponent`, `CultMeshEntityPrefabAssetRef` and `CultMeshEntityPrefabNode`; in `GameCult.Networking`, `CultWitnessContractPin`, `CultWitnessArtifactEntry` and `CultWitnessTimingEntry`; in `GameCult.Geometry`, `CultGeometryDomainNode`, `CultGeometryFeatureClaim` and `CultGeometryContributionRow`. Code that matched those elements positionally by shape must set or read `Id`. - `CultNetDocumentRegistry.Register` refuses a binding that claims a document type or a schema id another binding already holds, with `CultSchemaConflictException`; binding a type to the schema id it already holds still replaces that binding. +- `GameCult.Networking`: a `CultNetDatabaseServer` refuses every put and delete a peer sends unless `CultNetDatabaseServerOptions.RemoteWriteAuthority` grants it. The authority is an `ICultNetRemoteWriteAuthority` you supply; it is asked once per write with the resolved schema id (never the alias the peer sent), before the write is applied, published or forwarded. With no authority, or a null decision, or an authority that throws, the peer receives the typed error `write_not_authorized` and the store is unchanged. Writes the host makes through its own `CultNetDatabase` are not gated. The library ships no authority that grants everything: a server that took peer writes before must now say who may write. - `InternalsVisibleTo GameCult.Mesh` is removed from `GameCult.Caching`: CultMesh's single-file document helpers use the public `ReadStoreSnapshot`, `WriteDocument`, `WriteRecord` and `CultCodec.DecodeDocument` below. ### Added