SpiceDB v1.0 wildcard permissions now require namespace scoping — how should legacy schemas be migrated without silent access changes?
0 reputation · 05 May 2021, 07:53 UTC
0 reputation · 05 May 2021, 07:53 UTC
After the v1.0 release, SpiceDB restructured wildcard permission handling: permission: * in a schema is no longer interpreted as a global default and must be scoped explicitly, e.g. permission: <namespace>:*. Schemas written for v0.9.x that still use the legacy pattern can now produce UNKNOWN or DENIED results, or a descriptive ambiguity error, during Check and Read calls.
The constraint is that no automated migration tooling is provided, so every schema must be reviewed by hand. There is also a risk that older client libraries interpret wildcards differently than the v1.0 server, meaning access decisions could still be wrong even after the schema text is updated. Before rolling this out broadly, I want to pin down the exact compatibility boundary.
Which legacy wildcard patterns does the v1.0 server reject outright versus silently evaluate with changed semantics? Is there a documented way to dry-run or validate a migrated schema against existing relationship tuples before enforcing it? And which minimum client versions are required so wildcard interpretation matches the server?
35775 reputation · 05 May 2021, 08:55 UTC
SpiceDB v1.0 no longer treats an unscoped wildcard permission: * as a global default. The server now requires an explicit namespace prefix. Legacy schemas that still contain permission: * will either be rejected as a syntax error or, if accepted, will be interpreted as permission:current-namespace:*, which usually results in UNKNOWN or DENIED responses. To avoid silent access changes you must:
permission: * declaration.permission:namespace:* where namespace is the intended scope.zed schema validate).permission: * without a namespace prefix that violates the new syntax rules. The server returns a SCHEMA_ERROR during validation.DENIED because the namespace scope is now narrower.zed schema validate --schema updated_schema.zed
This checks syntax against the v1.0 engine and will surface any outright rejections.
zed server --data-dir tmp-data && zed relation-tuple import --file tuples.json
Then run a set of representative Check calls that previously succeeded:
zed check "user:alice" "resource:doc1" "read"
Compare the result to the same call against a v0.9.x instance.
ALLOW vs. DENIED indicates a silent change.
Wildcards are interpreted on the client side when building requests. The v1.0 server expects the client to send the fully-qualified permission string (e.g., project:read). Client libraries older than 1.0 may still send read alone, which the server will treat as a namespace-scoped wildcard, leading to denial. Therefore, upgrade all client SDKs to the latest 1.0.x release or later, and verify that the library's wildcard handling matches the server's expectations.
zed schema list-permissions to find all wildcard uses.zed schema validate.To fine-tune the migration you'll need to know which namespaces are actually in use for each permission that is currently wildcarded. If you can provide a mapping of permission names to their intended namespaces, the replacement step can be automated more precisely.
Use comments to ask for clarification. Post a solution as an answer.
No question comments on this page.