forked from openid/sharedsignals
-
Notifications
You must be signed in to change notification settings - Fork 0
/
subject-identifier-scenarios.txt
392 lines (216 loc) · 7.64 KB
/
subject-identifier-scenarios.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
Shared Signals Working Group A. Backman
Amazon
9 February 2023
Subject Identifier Scenarios
subject-identifier-scenarios-00
Abstract
This document presents different ways subject identifiers could be
defined to support use cases where we need to identify multiple
principals related to an event.
Table of Contents
1. Syntax Options . . . . . . . . . . . . . . . . . . . . . . . 1
1.1. Array of Subject Identifiers . . . . . . . . . . . . . . 1
1.2. Map of Subject Identifiers . . . . . . . . . . . . . . . 2
1.3. Specific Payload Properties . . . . . . . . . . . . . . . 3
1.4. Nested Subject Identifiers . . . . . . . . . . . . . . . 3
2. Test Case Scenarios . . . . . . . . . . . . . . . . . . . . . 4
2.1. Multiple Principals of the Same Type . . . . . . . . . . 4
Author's Address . . . . . . . . . . . . . . . . . . . . . . . . 7
1. Syntax Options
This section presents three different syntax options that have been
discussed as ways to present multiple subject identifiers.
1.1. Array of Subject Identifiers
1. Redefine the subject within the event payload to be an array of
subject identifiers, rather than a single subject identifier.
2. Add a category property to each subject identifier that describes
the subject identifier's relationship to the event.
Backman Informational [Page 1]
Subject Identifier Scenarios February 2023
{
...
"events": {
"https://event.example.com/session_revoked": {
"subject": [
{
"subject_type": "email",
"category": "user",
"email": "[email protected]",
},
{
"subject_type": "mac",
"category": "device",
"mac_address": "00:11:22:33:44:55:66",
},
],
...
}
}
}
Figure 1: Example partial SET demonstrating Array syntax
1.2. Map of Subject Identifiers
1. Redefine the subject within the event payload to be a JSON object
containing key/value pairs where each value is a subject
identifier and each key describes the relationship of the subject
identifier to the event.
{
...
"events": {
"https://event.example.com/session_revoked": {
"subject": {
"user": {
"subject_type": "email",
"email": "[email protected]",
},
"device": {
"subject_type": "mac",
"mac_address": "00:11:22:33:44:55:66",
},
},
...
}
}
}
Backman Informational [Page 2]
Subject Identifier Scenarios February 2023
Figure 2: Example partial SET demonstrating Map syntax
1.3. Specific Payload Properties
1. Leave subject defined as is.
2. When an event calls for specifying multiple principals, define
specific properties within the event payload for each principal.
{
...
"events": {
"https://event.example.com/session_revoked": {
"user": {
"subject_type": "email",
"email": "[email protected]",
},
"device": {
"subject_type": "mac",
"mac_address": "00:11:22:33:44:55:66",
},
...
}
}
}
Figure 3: Example partial SET demonstrating Specific Payload
Properties syntax
1.4. Nested Subject Identifiers
1. Leave subject defined as is.
2. Define additional subject identifier types that describe how to
identify a subject using tuples of subject identifiers, e.g., a
subject identifier for a user and a subject identifier for a
device.
Backman Informational [Page 3]
Subject Identifier Scenarios February 2023
{
...
"events": {
"https://event.example.com/session_revoked": {
"subject": {
"subject_type": "user_device",
"user": {
"subject_type": "email",
"email": "[email protected]",
},
"device": {
"subject_type": "mac",
"mac_address": "00:11:22:33:44:55:66",
},
},
...
}
}
}
Figure 4: Example partial SET demonstrating Nested Subject
Identifiers syntax
2. Test Case Scenarios
2.1. Multiple Principals of the Same Type
Consider the scenario where we also want to indicate the user that
revoked the session in our hypothetical session_revoked event. How
would we encode that for each of the syntaxes above?
Backman Informational [Page 4]
Subject Identifier Scenarios February 2023
{
...
"events": {
"https://event.example.com/session_revoked": {
"subject": [
{
"subject_type": "email",
"category": "user",
"email": "[email protected]",
},
{
"subject_type": "mac",
"mac_address": "00:11:22:33:44:55:66",
},
{
"subject_type": "email",
"category": "revoker",
"email": "[email protected]",
},
},
...
}
}
}
Figure 5: Array: Define new category names
Backman Informational [Page 5]
Subject Identifier Scenarios February 2023
{
...
"events": {
"https://event.example.com/session_revoked": {
"subject": {
"user": {
"subject_type": "email",
"email": "[email protected]",
},
"device": {
"subject_type": "mac",
"mac_address": "00:11:22:33:44:55:66",
},
"revoker": {
"subject_type": "email",
"email": "[email protected]",
},
},
...
}
}
}
Figure 6: Map: Define new map keys
{
...
"events": {
"https://event.example.com/session_revoked": {
"user": {
"subject_type": "email",
"email": "[email protected]",
},
"device": {
"subject_type": "mac",
"mac_address": "00:11:22:33:44:55:66",
},
"revoker": {
"subject_type": "email",
"email": "[email protected]",
},
...
}
}
}
Figure 7: Payload Properties: Define new properties
Backman Informational [Page 6]
Subject Identifier Scenarios February 2023
Nested Subject Identifiers does not address this use case, as it only
describes how to identify a single subject by identifying multiple
principals. In this case, the subject is the set of sessions for the
user and device. The revoker is not part of the subject, but a
separate principal related to the event.
Author's Address
Annabelle Backman
Amazon
Email: [email protected]
Backman Informational [Page 7]