Skip to main content

coven_protocol/objects/
domains.rs

1/// Signed object kind bound into protection AAD and checked against the
2/// semantic path before storage I/O.
3#[derive(Clone, Copy, Debug, PartialEq, Eq)]
4pub enum ProtectedObjectDomain {
5    StoreProtocolRoot,
6    StoreCurrentPublication,
7    StorePublicationEntry,
8    StoreCommit,
9    StoreAck,
10    StoreDeviceRegistration,
11    DeviceJoinAbandonment,
12    DeviceJoinCleanupReceipt,
13    DeviceJoinTransport,
14    StoreDeviceExclusionProposal,
15    StoreDeviceExclusionOutcome,
16    StoreReclaimEvidence,
17    StoreReclaimAuthorization,
18    StoreReclaimReceipt,
19    ProviderAccessGrant,
20    OwnerRecoveryNode,
21    OwnerPromotionRequestPublication,
22    StoreSnapshotMeta,
23    StoreSnapshotImage,
24    StoreMembershipRollup,
25    StoreMembershipEntry,
26    StoreMembershipHead,
27    StoreMembershipHeadAcceptance,
28    StoreWrappedKey,
29    StorePackage,
30    CircleControl,
31    CircleRoster,
32    CircleRosterResolution,
33    CircleMetadata,
34    CirclePackage,
35    CircleBootstrapImage,
36    CircleEpochCloseIntent,
37    CircleEpochCloseOutcome,
38    CircleEpochCloseResponse,
39    CircleAccessLeaf,
40    CircleAccessEnvelope,
41    CircleAcknowledgement,
42    CircleSnapshotMeta,
43    CircleSnapshotImage,
44}
45
46#[derive(Clone, Copy)]
47pub(super) struct ProtocolObjectMetadata {
48    pub(super) aad_label: &'static [u8],
49    pub(super) path: ProtocolPathRule,
50    pub(super) extension: &'static str,
51}
52
53#[derive(Clone, Copy)]
54pub(super) enum ProtocolPathRule {
55    Exact(&'static [ExactPathShape]),
56    StoreDeviceRegistration,
57    StoreMembershipHead,
58    StoreCandidate {
59        kind: &'static str,
60        component_count: usize,
61    },
62    CircleCandidate {
63        kind: &'static str,
64        component_count: usize,
65    },
66}
67
68#[derive(Clone, Copy)]
69pub(super) struct ExactPathShape {
70    component_count: usize,
71    fixed_components: &'static [(usize, &'static str)],
72}
73
74impl ProtocolPathRule {
75    pub(super) fn accepts(self, semantic_prefix: &str) -> bool {
76        match self {
77            Self::Exact(shapes) => shapes
78                .iter()
79                .any(|shape| accepts_path_shape(semantic_prefix, *shape)),
80            Self::StoreDeviceRegistration => {
81                (accepts_path_shape(
82                    semantic_prefix,
83                    ExactPathShape {
84                        component_count: 3,
85                        fixed_components: &[(0, "store-v1"), (1, "devices")],
86                    },
87                ) && semantic_prefix.split('/').nth(2) != Some("founder"))
88                    || accepts_path_shape(
89                        semantic_prefix,
90                        ExactPathShape {
91                            component_count: 5,
92                            fixed_components: &[
93                                (0, "store-v1"),
94                                (1, "devices"),
95                                (2, "founder"),
96                                (4, "registration"),
97                            ],
98                        },
99                    )
100            }
101            Self::StoreMembershipHead => {
102                (accepts_path_shape(
103                    semantic_prefix,
104                    ExactPathShape {
105                        component_count: 7,
106                        fixed_components: &[(0, "store-v1"), (1, "membership"), (2, "heads")],
107                    },
108                ) && semantic_prefix.split('/').nth(3) != Some("founder"))
109                    || accepts_path_shape(
110                        semantic_prefix,
111                        ExactPathShape {
112                            component_count: 6,
113                            fixed_components: &[
114                                (0, "store-v1"),
115                                (1, "membership"),
116                                (2, "heads"),
117                                (3, "founder"),
118                                (5, "1"),
119                            ],
120                        },
121                    )
122            }
123            Self::StoreCandidate {
124                kind,
125                component_count,
126            } => accepts_candidate_path(
127                semantic_prefix,
128                component_count,
129                &[(0, "store-v1"), (1, "candidates"), (3, kind)],
130            ),
131            Self::CircleCandidate {
132                kind,
133                component_count,
134            } => accepts_candidate_path(
135                semantic_prefix,
136                component_count,
137                &[(0, "circles"), (2, "candidates"), (4, kind)],
138            ),
139        }
140    }
141}
142
143fn accepts_path_shape(semantic_prefix: &str, shape: ExactPathShape) -> bool {
144    let components = semantic_prefix.split('/').collect::<Vec<_>>();
145    components.len() == shape.component_count
146        && components.iter().all(|component| !component.is_empty())
147        && shape
148            .fixed_components
149            .iter()
150            .all(|(index, expected)| components[*index] == *expected)
151}
152
153fn accepts_candidate_path(
154    semantic_prefix: &str,
155    component_count: usize,
156    fixed_components: &[(usize, &str)],
157) -> bool {
158    let components = semantic_prefix.split('/').collect::<Vec<_>>();
159    components.len() == component_count
160        && components.iter().all(|component| !component.is_empty())
161        && fixed_components.iter().all(|(index, expected)| {
162            components[*index] == *expected
163                && components
164                    .iter()
165                    .filter(|component| **component == *expected)
166                    .count()
167                    == 1
168        })
169}
170
171impl ProtectedObjectDomain {
172    pub(super) fn metadata(self) -> ProtocolObjectMetadata {
173        match self {
174            Self::StoreProtocolRoot => ProtocolObjectMetadata {
175                aad_label: b"store-protocol-root",
176                path: ProtocolPathRule::Exact(&[ExactPathShape {
177                    component_count: 2,
178                    fixed_components: &[(0, "store-v1"), (1, "store-protocol-root")],
179                }]),
180                extension: ".json",
181            },
182            Self::StoreCurrentPublication => ProtocolObjectMetadata {
183                aad_label: b"store-current-publication",
184                path: ProtocolPathRule::Exact(&[ExactPathShape {
185                    component_count: 3,
186                    fixed_components: &[(0, "store-v1"), (1, "publications"), (2, "current")],
187                }]),
188                extension: ".json",
189            },
190            Self::StorePublicationEntry => ProtocolObjectMetadata {
191                aad_label: b"store-publication-entry",
192                path: ProtocolPathRule::Exact(&[ExactPathShape {
193                    component_count: 5,
194                    fixed_components: &[(0, "store-v1"), (1, "publications"), (2, "entries")],
195                }]),
196                extension: ".json",
197            },
198            Self::StoreCommit => ProtocolObjectMetadata {
199                aad_label: b"store-commit",
200                path: ProtocolPathRule::StoreCandidate {
201                    kind: "commits",
202                    component_count: 7,
203                },
204                extension: ".json",
205            },
206            Self::StoreAck => ProtocolObjectMetadata {
207                aad_label: b"store-ack",
208                path: ProtocolPathRule::Exact(&[ExactPathShape {
209                    component_count: 4,
210                    fixed_components: &[(0, "store-v1"), (1, "acks")],
211                }]),
212                extension: ".json",
213            },
214            Self::StoreDeviceRegistration => ProtocolObjectMetadata {
215                aad_label: b"store-device-registration",
216                path: ProtocolPathRule::StoreDeviceRegistration,
217                extension: ".json",
218            },
219            Self::DeviceJoinAbandonment => ProtocolObjectMetadata {
220                aad_label: b"device-join-abandonment",
221                path: ProtocolPathRule::Exact(&[ExactPathShape {
222                    component_count: 3,
223                    fixed_components: &[(0, "store-v1"), (1, "device-join-abandonments")],
224                }]),
225                extension: ".json",
226            },
227            Self::DeviceJoinCleanupReceipt => ProtocolObjectMetadata {
228                aad_label: b"device-join-cleanup-receipt",
229                path: ProtocolPathRule::Exact(&[ExactPathShape {
230                    component_count: 3,
231                    fixed_components: &[(0, "store-v1"), (1, "device-join-cleanup-receipts")],
232                }]),
233                extension: ".json",
234            },
235            Self::DeviceJoinTransport => ProtocolObjectMetadata {
236                aad_label: b"device-join-transport",
237                path: ProtocolPathRule::Exact(&[ExactPathShape {
238                    component_count: 4,
239                    fixed_components: &[(0, "store-v1"), (1, "device-join-transport")],
240                }]),
241                extension: ".json",
242            },
243            Self::StoreDeviceExclusionProposal => ProtocolObjectMetadata {
244                aad_label: b"store-device-exclusion-proposal",
245                path: ProtocolPathRule::Exact(&[ExactPathShape {
246                    component_count: 5,
247                    fixed_components: &[(0, "store-v1"), (1, "device-exclusion-proposals")],
248                }]),
249                extension: ".json",
250            },
251            Self::StoreDeviceExclusionOutcome => ProtocolObjectMetadata {
252                aad_label: b"store-device-exclusion-outcome",
253                path: ProtocolPathRule::Exact(&[ExactPathShape {
254                    component_count: 4,
255                    fixed_components: &[(0, "store-v1"), (1, "device-exclusion-outcomes")],
256                }]),
257                extension: ".json",
258            },
259            Self::StoreReclaimEvidence => ProtocolObjectMetadata {
260                aad_label: b"store-reclaim-evidence",
261                path: ProtocolPathRule::Exact(&[ExactPathShape {
262                    component_count: 4,
263                    fixed_components: &[(0, "store-v1"), (1, "reclaim"), (2, "evidence")],
264                }]),
265                extension: ".json",
266            },
267            Self::StoreReclaimAuthorization => ProtocolObjectMetadata {
268                aad_label: b"store-reclaim-authorization",
269                path: ProtocolPathRule::Exact(&[ExactPathShape {
270                    component_count: 4,
271                    fixed_components: &[(0, "store-v1"), (1, "reclaim"), (2, "authorizations")],
272                }]),
273                extension: ".json",
274            },
275            Self::StoreReclaimReceipt => ProtocolObjectMetadata {
276                aad_label: b"store-reclaim-receipt",
277                path: ProtocolPathRule::Exact(&[ExactPathShape {
278                    component_count: 4,
279                    fixed_components: &[(0, "store-v1"), (1, "reclaim"), (2, "receipts")],
280                }]),
281                extension: ".json",
282            },
283            Self::ProviderAccessGrant => ProtocolObjectMetadata {
284                aad_label: b"provider-access-grant",
285                path: ProtocolPathRule::Exact(&[ExactPathShape {
286                    component_count: 4,
287                    fixed_components: &[(0, "store-v1"), (1, "provider-access"), (2, "grants")],
288                }]),
289                extension: ".json",
290            },
291            Self::OwnerPromotionRequestPublication => ProtocolObjectMetadata {
292                aad_label: b"owner-promotion-request-publication",
293                path: ProtocolPathRule::Exact(&[ExactPathShape {
294                    component_count: 3,
295                    fixed_components: &[(0, "store-v1"), (1, "owner-promotion-publications")],
296                }]),
297                extension: ".json",
298            },
299            Self::OwnerRecoveryNode => ProtocolObjectMetadata {
300                aad_label: b"owner-recovery-node",
301                path: ProtocolPathRule::Exact(&[ExactPathShape {
302                    component_count: 5,
303                    fixed_components: &[(0, "store-v1"), (1, "recovery")],
304                }]),
305                extension: ".json",
306            },
307            Self::StoreSnapshotMeta => ProtocolObjectMetadata {
308                aad_label: b"store-snapshot-meta",
309                path: ProtocolPathRule::Exact(&[ExactPathShape {
310                    component_count: 4,
311                    fixed_components: &[(0, "store-v1"), (1, "snapshots")],
312                }]),
313                extension: ".json",
314            },
315            Self::StoreMembershipRollup => ProtocolObjectMetadata {
316                aad_label: b"store-membership-rollup",
317                path: ProtocolPathRule::Exact(&[ExactPathShape {
318                    component_count: 4,
319                    fixed_components: &[(0, "store-v1"), (1, "membership-rollups")],
320                }]),
321                extension: ".json",
322            },
323            Self::StoreSnapshotImage => ProtocolObjectMetadata {
324                aad_label: b"store-snapshot-image",
325                path: ProtocolPathRule::Exact(&[ExactPathShape {
326                    component_count: 4,
327                    fixed_components: &[(0, "store-v1"), (1, "snapshot-images")],
328                }]),
329                extension: ".db",
330            },
331            Self::StoreMembershipEntry => ProtocolObjectMetadata {
332                aad_label: b"store-membership-entry",
333                path: ProtocolPathRule::Exact(&[ExactPathShape {
334                    component_count: 8,
335                    fixed_components: &[(0, "store-v1"), (1, "membership"), (2, "entries")],
336                }]),
337                extension: ".json",
338            },
339            Self::StoreMembershipHead => ProtocolObjectMetadata {
340                aad_label: b"store-membership-head",
341                path: ProtocolPathRule::StoreMembershipHead,
342                extension: ".json",
343            },
344            Self::StoreMembershipHeadAcceptance => ProtocolObjectMetadata {
345                aad_label: b"store-membership-head-acceptance",
346                path: ProtocolPathRule::Exact(&[ExactPathShape {
347                    component_count: 7,
348                    fixed_components: &[(0, "store-v1"), (1, "membership"), (2, "acceptances")],
349                }]),
350                extension: ".json",
351            },
352
353            Self::StoreWrappedKey => ProtocolObjectMetadata {
354                aad_label: b"store-wrapped-key",
355                path: ProtocolPathRule::Exact(&[ExactPathShape {
356                    component_count: 5,
357                    fixed_components: &[(0, "keys")],
358                }]),
359                extension: ".json",
360            },
361            Self::StorePackage => ProtocolObjectMetadata {
362                aad_label: b"store-package",
363                path: ProtocolPathRule::StoreCandidate {
364                    kind: "packages",
365                    component_count: 7,
366                },
367                extension: ".pkg",
368            },
369            Self::CircleControl => ProtocolObjectMetadata {
370                aad_label: b"circle-control",
371                path: ProtocolPathRule::Exact(&[
372                    ExactPathShape {
373                        component_count: 10,
374                        fixed_components: &[(0, "circle-control"), (2, "merge"), (3, "entries")],
375                    },
376                    ExactPathShape {
377                        component_count: 9,
378                        fixed_components: &[(0, "circle-control"), (2, "merge"), (3, "heads")],
379                    },
380                ]),
381                extension: ".json",
382            },
383            Self::CircleRoster => ProtocolObjectMetadata {
384                aad_label: b"circle-roster",
385                path: ProtocolPathRule::Exact(&[
386                    ExactPathShape {
387                        component_count: 10,
388                        fixed_components: &[(0, "circles"), (2, "roster"), (3, "entries")],
389                    },
390                    ExactPathShape {
391                        component_count: 9,
392                        fixed_components: &[(0, "circles"), (2, "roster"), (3, "heads")],
393                    },
394                ]),
395                extension: ".json",
396            },
397            Self::CircleRosterResolution => ProtocolObjectMetadata {
398                aad_label: b"circle-roster-resolution",
399                path: ProtocolPathRule::Exact(&[ExactPathShape {
400                    component_count: 7,
401                    fixed_components: &[(0, "circles"), (2, "roster"), (3, "resolutions")],
402                }]),
403                extension: ".json",
404            },
405            Self::CircleMetadata => ProtocolObjectMetadata {
406                aad_label: b"circle-metadata",
407                path: ProtocolPathRule::Exact(&[
408                    ExactPathShape {
409                        component_count: 10,
410                        fixed_components: &[(0, "circles"), (2, "metadata"), (3, "entries")],
411                    },
412                    ExactPathShape {
413                        component_count: 9,
414                        fixed_components: &[(0, "circles"), (2, "metadata"), (3, "heads")],
415                    },
416                ]),
417                extension: ".json",
418            },
419            Self::CirclePackage => ProtocolObjectMetadata {
420                aad_label: b"circle-package",
421                path: ProtocolPathRule::CircleCandidate {
422                    kind: "packages",
423                    component_count: 8,
424                },
425                extension: ".pkg",
426            },
427            Self::CircleBootstrapImage => ProtocolObjectMetadata {
428                aad_label: b"circle-bootstrap-image",
429                path: ProtocolPathRule::CircleCandidate {
430                    kind: "bootstraps",
431                    component_count: 9,
432                },
433                extension: ".db",
434            },
435            Self::CircleEpochCloseIntent => ProtocolObjectMetadata {
436                aad_label: b"circle-epoch-close-intent",
437                path: ProtocolPathRule::Exact(&[ExactPathShape {
438                    component_count: 6,
439                    fixed_components: &[(0, "circles"), (2, "epoch-close"), (4, "intent")],
440                }]),
441                extension: ".json",
442            },
443            Self::CircleEpochCloseOutcome => ProtocolObjectMetadata {
444                aad_label: b"circle-epoch-close-outcome",
445                path: ProtocolPathRule::Exact(&[ExactPathShape {
446                    component_count: 5,
447                    fixed_components: &[(0, "circles"), (2, "epoch-close"), (4, "outcome")],
448                }]),
449                extension: ".json",
450            },
451            Self::CircleEpochCloseResponse => ProtocolObjectMetadata {
452                aad_label: b"circle-epoch-close-response",
453                path: ProtocolPathRule::Exact(&[ExactPathShape {
454                    component_count: 6,
455                    fixed_components: &[(0, "circles"), (2, "epoch-close"), (4, "responses")],
456                }]),
457                extension: ".json",
458            },
459            Self::CircleAccessLeaf => ProtocolObjectMetadata {
460                aad_label: b"circle-access-leaf",
461                path: ProtocolPathRule::CircleCandidate {
462                    kind: "access-leaves",
463                    component_count: 9,
464                },
465                extension: "",
466            },
467            Self::CircleAccessEnvelope => ProtocolObjectMetadata {
468                aad_label: b"circle-access-envelope",
469                path: ProtocolPathRule::CircleCandidate {
470                    kind: "access-envelopes",
471                    component_count: 8,
472                },
473                extension: ".json",
474            },
475            Self::CircleAcknowledgement => ProtocolObjectMetadata {
476                aad_label: b"circle-acknowledgement",
477                path: ProtocolPathRule::Exact(&[ExactPathShape {
478                    component_count: 5,
479                    fixed_components: &[(0, "circles"), (2, "acks")],
480                }]),
481                extension: ".json",
482            },
483            Self::CircleSnapshotMeta => ProtocolObjectMetadata {
484                aad_label: b"circle-snapshot-meta",
485                path: ProtocolPathRule::Exact(&[ExactPathShape {
486                    component_count: 5,
487                    fixed_components: &[(0, "circles"), (2, "snapshots")],
488                }]),
489                extension: ".json",
490            },
491            Self::CircleSnapshotImage => ProtocolObjectMetadata {
492                aad_label: b"circle-snapshot-image",
493                path: ProtocolPathRule::Exact(&[ExactPathShape {
494                    component_count: 5,
495                    fixed_components: &[(0, "circles"), (2, "snapshot-images")],
496                }]),
497                extension: ".db",
498            },
499        }
500    }
501
502    pub fn aad_label(self) -> &'static [u8] {
503        self.metadata().aad_label
504    }
505
506    pub fn extension(self) -> &'static str {
507        self.metadata().extension
508    }
509}
510
511/// A domain protected by the Store key.
512#[derive(Clone, Copy, Debug, PartialEq, Eq)]
513pub struct StoreEncryptedProtocolObjectDomain(pub(super) ProtectedObjectDomain);
514
515/// A signed Store control-plane domain whose bytes must remain readable before
516/// the reader has adopted the Store data key named by those bytes.
517#[derive(Clone, Copy, Debug, PartialEq, Eq)]
518pub struct SignedStoreProtocolObjectDomain(pub(super) ProtectedObjectDomain);
519
520/// A domain protected by a Circle epoch key.
521#[derive(Clone, Copy, Debug, PartialEq, Eq)]
522pub struct CircleProtocolObjectDomain(pub(super) ProtectedObjectDomain);
523
524/// A domain whose canonical bytes already carry recipient-specific encryption.
525#[derive(Clone, Copy, Debug, PartialEq, Eq)]
526pub struct RecipientSealedProtocolObjectDomain(pub(super) ProtectedObjectDomain);
527
528/// Typed protocol-object domain names. Each name's value carries the only
529/// protection class its object kind permits.
530pub struct ProtocolObjectDomain;
531
532#[allow(non_upper_case_globals)]
533impl ProtocolObjectDomain {
534    pub const StoreProtocolRoot: SignedStoreProtocolObjectDomain =
535        SignedStoreProtocolObjectDomain(ProtectedObjectDomain::StoreProtocolRoot);
536    pub const StoreCurrentPublication: SignedStoreProtocolObjectDomain =
537        SignedStoreProtocolObjectDomain(ProtectedObjectDomain::StoreCurrentPublication);
538    pub const StorePublicationEntry: SignedStoreProtocolObjectDomain =
539        SignedStoreProtocolObjectDomain(ProtectedObjectDomain::StorePublicationEntry);
540    pub const StoreCommit: SignedStoreProtocolObjectDomain =
541        SignedStoreProtocolObjectDomain(ProtectedObjectDomain::StoreCommit);
542    pub const StoreAck: SignedStoreProtocolObjectDomain =
543        SignedStoreProtocolObjectDomain(ProtectedObjectDomain::StoreAck);
544    pub const StoreDeviceRegistration: SignedStoreProtocolObjectDomain =
545        SignedStoreProtocolObjectDomain(ProtectedObjectDomain::StoreDeviceRegistration);
546    pub const DeviceJoinAbandonment: SignedStoreProtocolObjectDomain =
547        SignedStoreProtocolObjectDomain(ProtectedObjectDomain::DeviceJoinAbandonment);
548    pub const DeviceJoinCleanupReceipt: SignedStoreProtocolObjectDomain =
549        SignedStoreProtocolObjectDomain(ProtectedObjectDomain::DeviceJoinCleanupReceipt);
550    /// Device-join artifacts in transit. The bytes carry their own per-attempt
551    /// seal, so the storage layer stores them as it received them.
552    pub const DeviceJoinTransport: RecipientSealedProtocolObjectDomain =
553        RecipientSealedProtocolObjectDomain(ProtectedObjectDomain::DeviceJoinTransport);
554    pub const StoreDeviceExclusionProposal: SignedStoreProtocolObjectDomain =
555        SignedStoreProtocolObjectDomain(ProtectedObjectDomain::StoreDeviceExclusionProposal);
556    pub const StoreDeviceExclusionOutcome: SignedStoreProtocolObjectDomain =
557        SignedStoreProtocolObjectDomain(ProtectedObjectDomain::StoreDeviceExclusionOutcome);
558    pub const StoreReclaimEvidence: StoreEncryptedProtocolObjectDomain =
559        StoreEncryptedProtocolObjectDomain(ProtectedObjectDomain::StoreReclaimEvidence);
560    pub const StoreReclaimAuthorization: SignedStoreProtocolObjectDomain =
561        SignedStoreProtocolObjectDomain(ProtectedObjectDomain::StoreReclaimAuthorization);
562    pub const StoreReclaimReceipt: SignedStoreProtocolObjectDomain =
563        SignedStoreProtocolObjectDomain(ProtectedObjectDomain::StoreReclaimReceipt);
564    pub const ProviderAccessGrant: SignedStoreProtocolObjectDomain =
565        SignedStoreProtocolObjectDomain(ProtectedObjectDomain::ProviderAccessGrant);
566    pub const OwnerRecoveryNode: SignedStoreProtocolObjectDomain =
567        SignedStoreProtocolObjectDomain(ProtectedObjectDomain::OwnerRecoveryNode);
568    pub const OwnerPromotionRequestPublication: SignedStoreProtocolObjectDomain =
569        SignedStoreProtocolObjectDomain(ProtectedObjectDomain::OwnerPromotionRequestPublication);
570    pub const StoreSnapshotMeta: SignedStoreProtocolObjectDomain =
571        SignedStoreProtocolObjectDomain(ProtectedObjectDomain::StoreSnapshotMeta);
572    pub const StoreSnapshotImage: StoreEncryptedProtocolObjectDomain =
573        StoreEncryptedProtocolObjectDomain(ProtectedObjectDomain::StoreSnapshotImage);
574    pub const StoreMembershipRollup: SignedStoreProtocolObjectDomain =
575        SignedStoreProtocolObjectDomain(ProtectedObjectDomain::StoreMembershipRollup);
576    pub const StoreMembershipEntry: SignedStoreProtocolObjectDomain =
577        SignedStoreProtocolObjectDomain(ProtectedObjectDomain::StoreMembershipEntry);
578    pub const StoreMembershipHead: SignedStoreProtocolObjectDomain =
579        SignedStoreProtocolObjectDomain(ProtectedObjectDomain::StoreMembershipHead);
580    pub const StoreMembershipHeadAcceptance: SignedStoreProtocolObjectDomain =
581        SignedStoreProtocolObjectDomain(ProtectedObjectDomain::StoreMembershipHeadAcceptance);
582    pub const StoreWrappedKey: RecipientSealedProtocolObjectDomain =
583        RecipientSealedProtocolObjectDomain(ProtectedObjectDomain::StoreWrappedKey);
584    pub const CircleAccessLeaf: RecipientSealedProtocolObjectDomain =
585        RecipientSealedProtocolObjectDomain(ProtectedObjectDomain::CircleAccessLeaf);
586    pub const StorePackage: StoreEncryptedProtocolObjectDomain =
587        StoreEncryptedProtocolObjectDomain(ProtectedObjectDomain::StorePackage);
588    pub const CircleControl: StoreEncryptedProtocolObjectDomain =
589        StoreEncryptedProtocolObjectDomain(ProtectedObjectDomain::CircleControl);
590    pub const CircleAccessEnvelope: StoreEncryptedProtocolObjectDomain =
591        StoreEncryptedProtocolObjectDomain(ProtectedObjectDomain::CircleAccessEnvelope);
592    pub const CircleRoster: CircleProtocolObjectDomain =
593        CircleProtocolObjectDomain(ProtectedObjectDomain::CircleRoster);
594    pub const CircleRosterResolution: CircleProtocolObjectDomain =
595        CircleProtocolObjectDomain(ProtectedObjectDomain::CircleRosterResolution);
596    pub const CircleMetadata: CircleProtocolObjectDomain =
597        CircleProtocolObjectDomain(ProtectedObjectDomain::CircleMetadata);
598    pub const CirclePackage: CircleProtocolObjectDomain =
599        CircleProtocolObjectDomain(ProtectedObjectDomain::CirclePackage);
600    pub const CircleBootstrapImage: CircleProtocolObjectDomain =
601        CircleProtocolObjectDomain(ProtectedObjectDomain::CircleBootstrapImage);
602    pub const CircleEpochCloseIntent: CircleProtocolObjectDomain =
603        CircleProtocolObjectDomain(ProtectedObjectDomain::CircleEpochCloseIntent);
604    pub const CircleEpochCloseOutcome: StoreEncryptedProtocolObjectDomain =
605        StoreEncryptedProtocolObjectDomain(ProtectedObjectDomain::CircleEpochCloseOutcome);
606    pub const CircleEpochCloseResponse: StoreEncryptedProtocolObjectDomain =
607        StoreEncryptedProtocolObjectDomain(ProtectedObjectDomain::CircleEpochCloseResponse);
608    pub const CircleAcknowledgement: CircleProtocolObjectDomain =
609        CircleProtocolObjectDomain(ProtectedObjectDomain::CircleAcknowledgement);
610    pub const CircleSnapshotMeta: CircleProtocolObjectDomain =
611        CircleProtocolObjectDomain(ProtectedObjectDomain::CircleSnapshotMeta);
612    pub const CircleSnapshotImage: CircleProtocolObjectDomain =
613        CircleProtocolObjectDomain(ProtectedObjectDomain::CircleSnapshotImage);
614}