Skip to content

Commit cf54084

Browse files
feat: ensure all objects, files, and history are hard deleted on org deletion (#2668)
* fix: ensure all objects, files, and history are hard deleted on org cascade delete Signed-off-by: Sarah Funkhouser <147884153+golanglemonade@users.noreply.github.com> * cleanup Signed-off-by: Sarah Funkhouser <147884153+golanglemonade@users.noreply.github.com> * fix tests Signed-off-by: Sarah Funkhouser <147884153+golanglemonade@users.noreply.github.com> * openfga updates, cleanup, tuple cascade Signed-off-by: Sarah Funkhouser <147884153+golanglemonade@users.noreply.github.com> * at least use contextx Signed-off-by: Sarah Funkhouser <147884153+golanglemonade@users.noreply.github.com> * I dont think this is needed, need to add more tests to ensure Signed-off-by: Sarah Funkhouser <147884153+golanglemonade@users.noreply.github.com> * shouldnt' need privacy allow either Signed-off-by: Sarah Funkhouser <147884153+golanglemonade@users.noreply.github.com> * fix feature tuple deletion Signed-off-by: Sarah Funkhouser <147884153+golanglemonade@users.noreply.github.com> * regen Signed-off-by: Sarah Funkhouser <147884153+golanglemonade@users.noreply.github.com> * rename file Signed-off-by: Sarah Funkhouser <147884153+golanglemonade@users.noreply.github.com> --------- Signed-off-by: Sarah Funkhouser <147884153+golanglemonade@users.noreply.github.com>
1 parent 2131fa2 commit cf54084

35 files changed

Lines changed: 3374 additions & 119 deletions

.task/checksum/generate-ent-smart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
89fc2bb10974a78331af25af3e6356b2
1+
e05d116ed09cfadfeb4389f80f447b06
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
8f91ac57f215f32a3ca106419a6acb64
1+
83b56f56a3dbe19e20431c23deef3c9b
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
750124ab9bc37d5c92fe13f7f73811cc
1+
ea6b375ad70ff3d16b671f9c17e8f609

cli/go.mod

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ require (
2121
github.com/theopenlane/core/common v1.0.25
2222
github.com/theopenlane/go-client v0.13.0
2323
github.com/theopenlane/httpsling v0.3.0
24-
github.com/theopenlane/iam v0.35.7
24+
github.com/theopenlane/iam v0.35.8
2525
github.com/theopenlane/utils v0.7.1
2626
golang.org/x/oauth2 v0.36.0
2727
golang.org/x/term v0.45.0
@@ -37,7 +37,6 @@ require (
3737
github.com/decred/dcrd/dcrec/secp256k1/v4 v4.4.1 // indirect
3838
github.com/envoyproxy/protoc-gen-validate v1.3.3 // indirect
3939
github.com/fatih/color v1.19.0 // indirect
40-
github.com/felixge/httpsnoop v1.1.0 // indirect
4140
github.com/fsnotify/fsnotify v1.10.1 // indirect
4241
github.com/fumiama/go-docx v0.0.0-20250506085032-0c30fd09304b // indirect
4342
github.com/fumiama/imgsz v0.0.4 // indirect
@@ -76,7 +75,7 @@ require (
7675
github.com/olekukonko/tablewriter v1.1.4 // indirect
7776
github.com/openfga/api/proto v0.0.0-20260319214821-f153694bfc20 // indirect
7877
github.com/openfga/go-sdk v0.8.2 // indirect
79-
github.com/openfga/language/pkg/go v0.3.1 // indirect
78+
github.com/openfga/language/pkg/go v0.3.2-0.20260730144454-83fedf8a4e70 // indirect
8079
github.com/philhofer/fwd v1.2.0 // indirect
8180
github.com/pkg/errors v0.9.1 // indirect
8281
github.com/redis/go-redis/v9 v9.21.0 // indirect

cli/go.sum

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -151,8 +151,7 @@ github.com/openfga/api/proto v0.0.0-20260319214821-f153694bfc20 h1:xdVG0EDz9Z9Uh
151151
github.com/openfga/api/proto v0.0.0-20260319214821-f153694bfc20/go.mod h1:XDX4qYNBUM2Rsa2AbKPh+oocZc2zgme+EF2fFC6amVU=
152152
github.com/openfga/go-sdk v0.8.2 h1:eX2RJ7RD9sbxC4Oe8ZAFDZu6n/qYuO9SDrk7XAOE0Fg=
153153
github.com/openfga/go-sdk v0.8.2/go.mod h1:epiUE6IfG7Ezr3cYLepiUbCasChNowgP8AtJsN4HSpI=
154-
github.com/openfga/language/pkg/go v0.3.1 h1:o+m3s0aHyjjLH27wqu6/7vL6VWOL8sBqyrNXV87t/e8=
155-
github.com/openfga/language/pkg/go v0.3.1/go.mod h1:YVuB65nNynhIA5IT8AcBxuRGZYA/Wr8lI2PFyU+jMwA=
154+
github.com/openfga/language/pkg/go v0.3.2-0.20260730144454-83fedf8a4e70 h1:9RtXJ5iSKUnIFB+OduCFEY+TEDqpOKOJRZcD8LZB7Ng=
156155
github.com/pborman/getopt v0.0.0-20170112200414-7148bc3a4c30/go.mod h1:85jBQOZwpVEaDAr341tbn15RS4fCAsIst0qp7i8ex1o=
157156
github.com/philhofer/fwd v1.2.0 h1:e6DnBTl7vGY+Gz322/ASL4Gyp1FspeMvx1RNDoToZuM=
158157
github.com/philhofer/fwd v1.2.0/go.mod h1:RqIHx9QI14HlwKwm98g9Re5prTQ6LdeRQn+gXJFxsJM=
@@ -204,8 +203,7 @@ github.com/theopenlane/go-client v0.13.0 h1:/jSEZLu1urijrmM1skYo9kf0MsVJwe3DNpuy
204203
github.com/theopenlane/go-client v0.13.0/go.mod h1:g5i+gYjkih1SSgY/lFi4p302cLZBOJ8pgCFf02eZKaI=
205204
github.com/theopenlane/httpsling v0.3.0 h1:Bad0dGdqCqAB8UVDyVo+YCevzRvGHhmkK22F7T3pXtY=
206205
github.com/theopenlane/httpsling v0.3.0/go.mod h1:iJc3XRLYTFIpfCnPpLZVMBP0xsWIPAb7ozARtQoclAE=
207-
github.com/theopenlane/iam v0.35.7 h1:avxRd4HSzjoG056Kd7LcZ4qC7xPIsbEcJw80nHGOCBc=
208-
github.com/theopenlane/iam v0.35.7/go.mod h1:KqpLIxEhMsow3q2wGHFn7q7OH4JoN5GcBUrZpd3yVfk=
206+
github.com/theopenlane/iam v0.35.8 h1:tRkO96NUfG57fgyTWFZwpyzXiKf/1Av/jx5gjFZlXZg=
209207
github.com/theopenlane/utils v0.7.1 h1:x+9kVMgOALYqAH6GaLaDb9tj16nzasoGM8X0v0XNTn8=
210208
github.com/theopenlane/utils v0.7.1/go.mod h1:uxiLqjtcqgH57yOpYl3tTfKuenGYyAROxHFMpXx6mDY=
211209
github.com/tinylib/msgp v1.6.4 h1:mOwYbyYDLPj35mkA2BjjYejgJk9BuHxDdvRnb6v2ZcQ=

common/go.mod

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ require (
2121
)
2222

2323
require (
24-
ariga.io/atlas v1.2.3 // indirect
24+
ariga.io/atlas v1.3.0 // indirect
2525
entgo.io/contrib v0.7.0 // indirect
2626
github.com/99designs/gqlgen v0.17.94 // indirect
2727
github.com/XSAM/otelsql v0.43.0 // indirect
@@ -54,7 +54,7 @@ require (
5454
github.com/muhlemmer/gu v0.3.1 // indirect
5555
github.com/openfga/api/proto v0.0.0-20260319214821-f153694bfc20 // indirect
5656
github.com/openfga/go-sdk v0.8.2 // indirect
57-
github.com/openfga/language/pkg/go v0.3.1 // indirect
57+
github.com/openfga/language/pkg/go v0.3.2-0.20260730144454-83fedf8a4e70 // indirect
5858
github.com/philhofer/fwd v1.2.0 // indirect
5959
github.com/pkg/errors v0.9.1 // indirect
6060
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect

common/go.sum

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
ariga.io/atlas v1.2.3 h1:DLNK5kiz48XGv4Dbv8sJxPHncmmwUm43PoSA7UMZXEU=
2-
ariga.io/atlas v1.2.3/go.mod h1:v8ltuOKxFAU8ZF33HNfQs1iRWKuP3hJfu+dU0VE5O0Y=
1+
ariga.io/atlas v1.3.0 h1:/ZQLypoRURfNO0VJmXUNz8k6lGoeJLDPlSOZOhxG/1U=
32
entgo.io/contrib v0.7.0 h1:4Ghx8O0rqSMmca3FIJ6QyZbQAoLvdzWqLMl1MbHFEEw=
43
entgo.io/contrib v0.7.0/go.mod h1:zbPSUrbn+6dfyv8S9HWEvn1MyGpO95ik2lUNgaqWTt4=
54
entgo.io/ent v0.14.6 h1:/f2696BpwuWAEEG6PVGWflg6+Inrpq4pRWuNlWz/Skk=
@@ -105,8 +104,7 @@ github.com/openfga/api/proto v0.0.0-20260319214821-f153694bfc20 h1:xdVG0EDz9Z9Uh
105104
github.com/openfga/api/proto v0.0.0-20260319214821-f153694bfc20/go.mod h1:XDX4qYNBUM2Rsa2AbKPh+oocZc2zgme+EF2fFC6amVU=
106105
github.com/openfga/go-sdk v0.8.2 h1:eX2RJ7RD9sbxC4Oe8ZAFDZu6n/qYuO9SDrk7XAOE0Fg=
107106
github.com/openfga/go-sdk v0.8.2/go.mod h1:epiUE6IfG7Ezr3cYLepiUbCasChNowgP8AtJsN4HSpI=
108-
github.com/openfga/language/pkg/go v0.3.1 h1:o+m3s0aHyjjLH27wqu6/7vL6VWOL8sBqyrNXV87t/e8=
109-
github.com/openfga/language/pkg/go v0.3.1/go.mod h1:YVuB65nNynhIA5IT8AcBxuRGZYA/Wr8lI2PFyU+jMwA=
107+
github.com/openfga/language/pkg/go v0.3.2-0.20260730144454-83fedf8a4e70 h1:9RtXJ5iSKUnIFB+OduCFEY+TEDqpOKOJRZcD8LZB7Ng=
110108
github.com/philhofer/fwd v1.2.0 h1:e6DnBTl7vGY+Gz322/ASL4Gyp1FspeMvx1RNDoToZuM=
111109
github.com/philhofer/fwd v1.2.0/go.mod h1:RqIHx9QI14HlwKwm98g9Re5prTQ6LdeRQn+gXJFxsJM=
112110
github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4=

docker/all-in-one/Dockerfile.all-in-one

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ COPY --from=ghcr.io/theopenlane/riverboat:amd64-latest /bin/riverboat /bin/river
2121
COPY --from=redis:7.4.9 /usr/local/bin/redis-server /bin/redis-server
2222

2323
# Copy FGA binary
24-
COPY --from=openfga/openfga:v1.18.1 /openfga /bin/openfga
24+
COPY --from=openfga/openfga:v1.18.3 /openfga /bin/openfga
2525

2626
# Copy default model into image
2727
COPY fga/model/ fga/model/
@@ -43,9 +43,6 @@ EXPOSE 8080
4343
EXPOSE 8081
4444
EXPOSE 2112
4545

46-
#Expose dbx ports
47-
EXPOSE 1337
48-
4946
# Expose redis ports
5047
EXPOSE 6379
5148

docker/docker-compose-fga.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ include:
22
- docker-compose-pg.yml
33
services:
44
migrate:
5-
image: openfga/openfga:v1.18.1
5+
image: openfga/openfga:v1.18.3
66
command: migrate
77
depends_on:
88
postgres:
@@ -16,7 +16,7 @@ services:
1616
depends_on:
1717
migrate:
1818
condition: service_completed_successfully
19-
image: openfga/openfga:v1.18.1
19+
image: openfga/openfga:v1.18.3
2020
environment:
2121
- OPENFGA_DATASTORE_ENGINE=postgres
2222
- OPENFGA_DATASTORE_URI=postgres://postgres:password@postgres:5432/openfga?sslmode=disable

go.mod

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ require (
8686
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2
8787
github.com/pquerna/otp v1.5.0
8888
github.com/pressly/goose/v3 v3.27.3
89-
github.com/prometheus/client_golang v1.23.2
89+
github.com/prometheus/client_golang v1.24.0
9090
github.com/redis/go-redis/v9 v9.21.0
9191
github.com/riverqueue/river v0.43.0
9292
github.com/riverqueue/river/riverdriver/riverpgxv5 v0.43.0
@@ -108,7 +108,7 @@ require (
108108
github.com/theopenlane/go-client v0.13.0
109109
github.com/theopenlane/gqlgen-plugins v0.14.7
110110
github.com/theopenlane/httpsling v0.3.0
111-
github.com/theopenlane/iam v0.35.7
111+
github.com/theopenlane/iam v0.35.8
112112
github.com/theopenlane/newman v0.4.2
113113
github.com/theopenlane/riverboat v0.13.1
114114
github.com/theopenlane/utils v0.7.1
@@ -126,7 +126,7 @@ require (
126126
golang.org/x/sync v0.22.0
127127
golang.org/x/text v0.40.0
128128
golang.org/x/tools v0.48.0
129-
google.golang.org/api v0.290.0
129+
google.golang.org/api v0.291.0
130130
gopkg.in/yaml.v3 v3.0.1
131131
gotest.tools/v3 v3.5.2
132132
)
@@ -202,7 +202,7 @@ require (
202202
ariga.io/atlas v1.3.0
203203
cel.dev/expr v0.25.2 // indirect
204204
cloud.google.com/go v0.123.0 // indirect
205-
cloud.google.com/go/auth v0.20.0 // indirect
205+
cloud.google.com/go/auth v0.22.0 // indirect
206206
cloud.google.com/go/auth/oauth2adapt v0.2.8 // indirect
207207
cloud.google.com/go/compute/metadata v0.9.0 // indirect
208208
cloud.google.com/go/iam v1.11.0 // indirect
@@ -326,7 +326,7 @@ require (
326326
github.com/google/go-querystring v1.2.0 // indirect
327327
github.com/google/go-tpm v0.9.8 // indirect
328328
github.com/google/s2a-go v0.1.9 // indirect
329-
github.com/googleapis/enterprise-certificate-proxy v0.3.18 // indirect
329+
github.com/googleapis/enterprise-certificate-proxy v0.3.19 // indirect
330330
github.com/googleapis/gax-go/v2 v2.23.0 // indirect
331331
github.com/gorilla/css v1.0.1 // indirect
332332
github.com/gorilla/securecookie v1.1.2 // indirect
@@ -360,12 +360,12 @@ require (
360360
github.com/opencontainers/image-spec v1.1.1 // indirect
361361
github.com/opencontainers/runc v1.3.6 // indirect
362362
github.com/openfga/api/proto v0.0.0-20260319214821-f153694bfc20 // indirect
363-
github.com/openfga/language/pkg/go v0.3.1
364-
github.com/openfga/openfga v1.18.1 // indirect
363+
github.com/openfga/language/pkg/go v0.3.2-0.20260730144454-83fedf8a4e70
364+
github.com/openfga/openfga v1.18.3 // indirect
365365
github.com/ory/dockertest v3.3.5+incompatible // indirect
366366
github.com/pelletier/go-toml/v2 v2.3.1 // indirect
367367
github.com/prometheus/client_model v0.6.2 // indirect
368-
github.com/prometheus/common v0.67.5 // indirect
368+
github.com/prometheus/common v0.70.0 // indirect
369369
github.com/prometheus/procfs v0.21.1 // indirect
370370
github.com/resend/resend-go/v3 v3.10.1
371371
github.com/riverqueue/river/riverdriver v0.43.0 // indirect
@@ -401,7 +401,6 @@ require (
401401
go.opentelemetry.io/otel/trace v1.44.0 // indirect
402402
go.uber.org/goleak v1.3.0 // indirect
403403
go.uber.org/multierr v1.11.0 // indirect
404-
go.yaml.in/yaml/v2 v2.4.4 // indirect
405404
golang.org/x/exp v0.0.0-20260718201538-764159d718ef // indirect
406405
golang.org/x/net v0.57.0
407406
golang.org/x/sys v0.47.0 // indirect

0 commit comments

Comments
 (0)