You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This document is the authoritative reference for all messages the committee service sends to the fga-sync service, which writes and deletes [OpenFGA](https://openfga.dev/) relationship tuples to enforce access control.
4
+
5
+
The full OpenFGA type definitions (relations, schema) for all object types are defined in the [platform model](https://github.com/linuxfoundation/lfx-v2-helm/blob/main/charts/lfx-platform/templates/openfga/model.yaml).
6
+
7
+
**Update this document in the same PR as any change to FGA message construction.**
8
+
9
+
---
10
+
11
+
## Object Types
12
+
13
+
-[Committee](#committee)
14
+
15
+
---
16
+
17
+
## Message Format
18
+
19
+
All messages use the generic FGA message format on the following NATS subjects:
20
+
21
+
| Subject | Used for |
22
+
|---|---|
23
+
|`lfx.fga-sync.update_access`| Create and update operations |
**Synced on:** create, update of committee base, update of committee settings, delete of a committee. Committee member changes are synced separately via `member_put`.
37
+
38
+
### update_access
39
+
40
+
Published to `lfx.fga-sync.update_access` on committee create or update (base or settings).
41
+
42
+
#### Message Envelope
43
+
44
+
| Field | Value |
45
+
|---|---|
46
+
|`object_type`|`committee`|
47
+
|`operation`|`update_access`|
48
+
49
+
#### Data Fields
50
+
51
+
These fields are carried inside the message `data` object.
52
+
53
+
| Field | Value |
54
+
|---|---|
55
+
|`uid`|`CommitteeBase.UID`|
56
+
|`public`|`CommitteeBase.Public` (passed through directly) |
57
+
58
+
#### Relations
59
+
60
+
| Relation | Value | Condition |
61
+
|---|---|---|
62
+
|`writer`| Usernames from `CommitteeSettings.Writers`| Only when `Writers` is non-empty |
63
+
|`auditor`| Usernames from `CommitteeSettings.Auditors`| Only when `Auditors` is non-empty |
64
+
65
+
> Usernames are the `Username` field of each `CommitteeUser` entry (Auth0 `sub` values). Users with an empty `Username` are skipped.
66
+
67
+
#### References
68
+
69
+
| Reference | Value | Condition |
70
+
|---|---|---|
71
+
|`project`|`CommitteeBase.ProjectUID`| Always |
72
+
73
+
#### Exclude Relations
74
+
75
+
`exclude_relations: ["member"]` — always set. Individual committee members are managed via `member_put` and must not be overwritten by the `update_access` handler.
76
+
77
+
### member_put (Committee Member Create/Update)
78
+
79
+
Published to `lfx.fga-sync.member_put` when a committee member is created or updated and the member has a non-empty `Username`.
80
+
81
+
The object UID is the **committee UID** (`CommitteeBase.UID`), not the member UID.
|`username`|`CommitteeMember.Username` (Auth0 `sub`) | Always (skipped if `Username` is empty) |
96
+
|`relations`|`["member"]`| Always |
97
+
98
+
### member_remove (Committee Member Delete)
99
+
100
+
Published to `lfx.fga-sync.member_remove` when a committee member is deleted and the member has a non-empty `Username`. Sends an empty `relations` array, which instructs fga-sync to remove all tuples for that user on the committee object.
|`username`|`CommitteeMember.Username` (Auth0 `sub`) | Always (skipped if `Username` is empty) |
115
+
|`relations`|`[]` (empty — remove all) | Always |
116
+
117
+
### Delete
118
+
119
+
On delete, a `delete_access` message is sent to `lfx.fga-sync.delete_access` with only the committee `uid` — all FGA tuples for `committee:{uid}` are removed by the fga-sync service.
120
+
121
+
---
122
+
123
+
## Triggers
124
+
125
+
| Operation | Object Type | Subject | Notes |
126
+
|---|---|---|---|
127
+
| Create committee |`committee`|`lfx.fga-sync.update_access`| Always sent |
128
+
| Update committee base |`committee`|`lfx.fga-sync.update_access`| Always sent |
129
+
| Update committee settings |`committee`|`lfx.fga-sync.update_access`| Always sent |
130
+
| Delete committee |`committee`|`lfx.fga-sync.delete_access`| Always sent |
131
+
| Create committee member (with username) |`committee`|`lfx.fga-sync.member_put`| Skipped if `Username` is empty |
132
+
| Update committee member (with username) |`committee`|`lfx.fga-sync.member_put`| Skipped if `Username` is empty |
133
+
| Delete committee member (with username) |`committee`|`lfx.fga-sync.member_remove`| Skipped if `Username` is empty; empty relations removes all tuples for the user |
**Indexed on:** create, update, delete of a committee member.
@@ -155,6 +167,8 @@ _(none)_
155
167
|`committee_uid`| string | UID of the committee this member belongs to |
156
168
|`committee_name`| string | Name of the committee |
157
169
|`committee_category`| string | Category of the committee |
170
+
|`project_uid`| string (optional) | UID of the owning project |
171
+
|`project_slug`| string (optional) | Slug of the owning project |
158
172
|`username`| string | Member's username |
159
173
|`email`| string | Member's email address |
160
174
|`first_name`| string | Member's first name |
@@ -189,8 +203,10 @@ _(none)_
189
203
|`organization_id:{value}`|`organization_id:org-789`| Find members by organization ID |
190
204
|`organization_name:{value}`|`organization_name:The Linux Foundation`| Find members by organization name |
191
205
|`organization_website:{value}`|`organization_website:linuxfoundation.org`| Find members by organization website |
206
+
|`project_uid:{value}`|`project_uid:cbef1ed5-17dc-4a50-84e2-6cddd70f6878`| Find members by project UID |
207
+
|`project_slug:{value}`|`project_slug:test-project`| Find members by project slug |
192
208
193
-
> Tags for `username`, `email`, `voting_status`, `organization_id`, `organization_name`, and `organization_website` are only emitted when the value is non-empty.
209
+
> Tags for `username`, `email`, `voting_status`, `organization_id`, `organization_name`, `organization_website`, `project_uid`, and `project_slug` are only emitted when the value is non-empty.
0 commit comments