Skip to content

Commit 05a1ee8

Browse files
committed
feat(backend): introduce basic FGA model
Introduce a skeleton for the FGA model, to be expanded when all the requirements are defined. Signed-off-by: Damiano Mason <damiano.mason@secomind.com>
1 parent 6231376 commit 05a1ee8

2 files changed

Lines changed: 118 additions & 0 deletions

File tree

REUSE.toml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,3 +92,9 @@ path = "renovate.json"
9292
precedence = "aggregate"
9393
SPDX-FileCopyrightText = "2026 Seco Mind Srl"
9494
SPDX-License-Identifier = "Apache-2.0"
95+
96+
[[annotations]]
97+
path = "backend/priv/fga/model.fga"
98+
precedence = "aggregate"
99+
SPDX-FileCopyrightText = "2026 Seco Mind Srl"
100+
SPDX-License-Identifier = "CC0-1.0"

backend/priv/fga/model.fga

Lines changed: 112 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,112 @@
1+
model
2+
schema 1.1
3+
4+
type user
5+
relations
6+
define realm: [realm]
7+
define device: [device, realm#device, group#member_device]
8+
define system_model: [system_model, realm#system_model, device#system_model, hardware_type#system_model]
9+
define hardware_type: [hardware_type, realm#hardware_type, system_model#hardware_type]
10+
define tag: [tag, realm#tag, group#tag, device#tag]
11+
define application: [application, realm#application]
12+
define release: [release, realm#release, application#release, container#release, deployment#deployed_release]
13+
define container: [container, realm#container, release#container]
14+
define volume: [volume, realm#volume, container#volume]
15+
define network: [network, realm#network, container#network]
16+
define device_mapping: [device_mapping, realm#device_mapping, container#device_mapping]
17+
define base_image_collection: [base_image_collection, base_image#collection, realm#base_image_collection]
18+
define base_image: [base_image, realm#base_image, base_image_collection#image]
19+
define campaign: [campaign, realm#campaign]
20+
define channel: [channel, realm#channel, campaign#channel]
21+
define group: [group, realm#group, channel#group]
22+
23+
type realm
24+
relations
25+
define device: [device]
26+
define system_model: [system_model, device#system_model, hardware_type#system_model]
27+
define tag: [tag, group#tag, device#tag]
28+
define application: [application]
29+
define release: [release, application#release, container#release, deployment#deployed_release]
30+
define container: [container, release#container]
31+
define volume: [volume, container#volume]
32+
define network: [network, container#network]
33+
define device_mapping: [device_mapping, container#device_mapping]
34+
define base_image_collection: [base_image_collection, base_image#collection]
35+
define base_image: [base_image, base_image_collection#image]
36+
define campaign: [campaign]
37+
define channel: [channel, campaign#channel]
38+
define group: [group, channel#group]
39+
40+
type device
41+
relations
42+
define system_model: [system_model]
43+
define tag: [tag, group#tag, device#tag]
44+
45+
type system_model
46+
relations
47+
define hardware_type: [hardware_type]
48+
49+
type hardware_type
50+
relations
51+
define system_model: [system_model]
52+
53+
type tag
54+
relations
55+
define device: [device]
56+
57+
type application
58+
relations
59+
define release: [release]
60+
61+
type release
62+
relations
63+
define container: [container]
64+
65+
type container
66+
relations
67+
define release: [release]
68+
define volume: [volume]
69+
define network: [network]
70+
define device_mapping: [device_mapping]
71+
72+
type volume
73+
relations
74+
define container: [container]
75+
76+
type network
77+
relations
78+
define container: [container]
79+
80+
type device_mapping
81+
relations
82+
define container: [container]
83+
84+
type deployment
85+
relations
86+
define device: [device]
87+
define deployed_application: [application]
88+
define deployed_release: release from deployed_application
89+
90+
type base_image_collection
91+
relations
92+
define image: [base_image]
93+
94+
type base_image
95+
relations
96+
define collection: [base_image_collection]
97+
98+
type campaign
99+
relations
100+
define ota_campaign: [base_image_collection, channel]
101+
define deployment_campaigns: [application, channel]
102+
define channel: [channel]
103+
104+
type channel
105+
relations
106+
define group: [group]
107+
108+
type group
109+
relations
110+
define tag: [tag]
111+
define member_device: device from tag
112+

0 commit comments

Comments
 (0)