Highlights
Support for self keyword added to permissions
Previously, if you wanted to represent something like "a user should be able to view themselves," this required adding a relation to the schema and then writing a relation from the user to itself. We've added support for a self keyword in permissions that represents this directly, which reduces storage requirements, removes the need for a trip to the database, and removes a relationship that needs to be synced.
For more information, see the Docs and the PR: #2785
Experimental
Postgres Foreign Data Wrapper
In #2806, we added a new experimental command to SpiceDB that serves a Postgres Foreign Data Wrapper: spicedb postgres-fdw [flags].
If you configure your Postgres instance accordingly, it can speak to SpiceDB through the FDW as a proxy, allowing you to write queries like:
-- Check if user:alice has permission to view document:readme
SELECT has_permission
FROM permissions
WHERE resource_type = 'document'
AND resource_id = 'readme'
AND permission = 'view'
AND subject_type = 'user'
AND subject_id = 'alice';You can now express checks and lookups as SELECTs and JOINs in your main application code, and you can read, write, and delete relationships using Postgres as the client.
For more information, see the documentation in the repo.
Warnings
- This feature is experimental. We'd welcome you trying it out and providing feedback, but it will likely change before its final GA'd form.
- This feature DOES NOT solve the Dual-Write Problem. You can make updates in the context of a Postgres transaction, but Postgres's FDW protocol doesn't support a two-phase commit semantic, which means there are still failure modes where a transactional write will land in SpiceDB but not Postgres or vice-versa.
Query Planner
This release includes the first experimental handle on our new Query Planner. If you run SpiceDB with the new --experimental-query-plan flag, SpiceDB will use the query planner to resolve queries.
This is mostly provided for the curious; there's still work to do on statistics sources and optimizations before we expect that it will provide performance benefits across most workloads.
We don't yet recommend turning on this flag in your system outside of experiments in your local or development environments. We'll continue work and let you know when it's ready for production.
Smaller Things
- A fix for cockroach's connection pooler where the pooler won't report itself as ready until all connections are ready to be used: #2766
- A fix for a segfault when providing datastore bootstrap files with caveats in them: #2784
- Touching an existing relationship and providing an empty expiration field will now clear an existing expiration value in CRDB and MySQL: #2796
- A fix for lexing Unicode characters in string literals in schemas: #2836
- We've deprecated datastore hedging, as it didn't provide performance gains and led to a less stable system: #2819
- There's a new
--datastore-watch-change-buffer-maximum-sizeflag for the Watch API that determines how many changes SpiceDB will buffer in memory before it emits an error. This protects against OOMkills when the backing datastore fails to produce a checkpoint: #2859
What's Changed
- quic CVE fix in magefiles by @tstirrat15 in #2762
- ci: fix when benchmarks run by @miparnisari in #2759
- test: refactor GC and GC tests to be more reliable using synctest by @tstirrat15 in #2645
- chore: fix some testifylint issues by @tstirrat15 in #2768
- fix: Translate and preserve metadata in schema/v2 by @barakmich in #2767
- Reenable testifylint by @tstirrat15 in #2770
- fix: change crdb ready check to measure idle conns by @tstirrat15 in #2766
- chore: add context to test failure by @tstirrat15 in #2773
- fix(metrics): inverted values for pgxpool_max_conns{read} and pgxpool… by @miparnisari in #2772
- test: fix flaky TestExecuteRepair by @miparnisari in #2750
- Fixes for schema v2 conversion by @josephschorr in #2777
- Fix composable schema interactions with expiration feature by @tstirrat15 in #2780
- chore: improve error message when WriteRelationships has too many upd… by @miparnisari in #2781
- fix: segfault with datastore bootstrap files by @tstirrat15 in #2784
- fix: incorrect validation on WriteRelationships when using wildcard, … by @miparnisari in #2792
- chore: update datastore link in README by @cduruk in #2795
- fix(mysql,crdb): touch without expiration should remove the expiration by @miparnisari in #2796
- test: assert delete caveat by @miparnisari in #2797
- ci: fix docs update workflow by @miparnisari in #2798
- fix (migrate): Improve UX of error msg by @Meyazhagan in #2756
- chore(deps): bump the github-actions group across 1 directory with 10 updates by @dependabot[bot] in #2800
- ci: add more entries to codecov ignores by @miparnisari in #2799
- chore(deps): bump golang from
2611181toac09a5fin the docker group by @dependabot[bot] in #2789 - fix: issue with multiple imports leading to empty output by @tstirrat15 in #2804
- test: Set up integration testing to finish implementation of the iterator tree functionality by @barakmich in #2787
- feat: introduce evaluation analysis for query plans by @barakmich in #2774
- Support reading Composable Schemas from fs.FS by @drew-richardson in #2808
- feat: finish initial implementation of IterSubjects by @barakmich in #2809
- chore: use EmptyPathSeq() everywhere and NewLocalContext() for tests by @barakmich in #2811
- chore: improve metrics middleware test by @tstirrat15 in #2812
- chore: fix prealloc lints by @tstirrat15 in #2813
- chore: give more resources to wasm tests by @tstirrat15 in #2818
- chore: intersection lr implementation by @tstirrat15 in #2816
- chore: add exclusion lr operation by @tstirrat15 in #2815
- chore: add datastore LR implementation by @tstirrat15 in #2814
- chore: query arrow LR implementation by @tstirrat15 in #2817
- feat: add arrow reversal optimization by @barakmich in #2821
- chore: intersection arrow LR implementation by @tstirrat15 in #2823
- chore: add LR implementation for Relation iterator by @tstirrat15 in #2824
- chore: fix the combine operation for Expiration and Integrity paths by @barakmich in #2825
- chore: fix query plan alias iterator LR behavior by @tstirrat15 in #2826
- chore: fix query plan intersection arrow LR behavior by @tstirrat15 in #2827
- chore: fix wildcard subject agreement in datastore LR by @tstirrat15 in #2831
- feat: Initial implementation of the PostgresFDW by @josephschorr in #2806
- chore: fix datastore query behavior for LR by @tstirrat15 in #2830
- chore: remove datastore hedging by @tstirrat15 in #2819
- makes clearer pg timestamps should not be used for ordering txs by @vroldanbet in #2832
- fix: lexing utf-8 characters by @tstirrat15 in #2836
- Prepare for single stored schema by @josephschorr in #2805
- chore: update glibc by @tstirrat15 in #2839
- chore: fix gosec issues by @tstirrat15 in #2840
- chore: bump optgen to v0.2.3 by @ecordell in #2837
- feat: implement a proper BFS when doing IterSubjects/IterResources for recursive nodes by @barakmich in #2838
- chore: unhide the --experimental-query-plan flag by @barakmich in #2842
- feat: Add support for
selfkeyword in schema for referencing a resource as a subject by @tstirrat15 in #2785 - feat(schema): add support for parent namespace in arrow information by @mazdakb in #2844
- chore: fix trace logging of non-checks by @tstirrat15 in #2845
- fix: goroutine leaks by @miparnisari in #2757
- fix: improve wildcard support when doing IterSubjects by @barakmich in #2843
- chore: use fork of jitterbug by @miparnisari in #2846
- chore: update cost estimates for intersectionarrow lr by @tstirrat15 in #2848
- chore: refactor resolvers by @miparnisari in #2794
- chore: take glibc cve fix by @tstirrat15 in #2854
- fix: make schemautil.ApplySchemaChangesOverExisting preserve existing stuff by @tstirrat15 in #2852
- chore: replace miparnisari/jitterbug with authzed/jitterbug by @miparnisari in #2855
- chore: remove old dependency by @miparnisari in #2856
- chore: bump Go version to 1.25.6 for CVE fix by @barakmich in #2858
- feat: each iterator can report its types on either end now by @barakmich in #2849
- Remove CGO Dependency from PostgreSQL FDW by @ecordell in #2860
- feat: plumb through datastore buffer margin by @tstirrat15 in #2859
- ci: compare Go benchmarks properly by @miparnisari in #2865
- ci: publish benchmarks by @miparnisari in #2866
- feat: add type filtering to the query plan by @barakmich in #2850
- chore: go through other proxies by @tstirrat15 in #2871
- fix: hook up schema caching proxies with schemareader by @tstirrat15 in #2868
New Contributors
Full Changelog: v1.48.0...v1.49.0
Docker Images
This release is available at authzed/spicedb:v1.49.0, quay.io/authzed/spicedb:v1.49.0, ghcr.io/authzed/spicedb:v1.49.0