Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add previous_in_topic field to all certificates schemas #7577

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@
"label": "DeviceCertificate",
"type": "device_certificate",
"other_fields": [
{
// SHA256 digest of the raw content (i.e. serialized and signed) of the
// previous certificate in the topic.
"name": "previous_in_topic",
"type": "HashDigest"
},
{
"name": "author",
"type": "CertificateSignerOwned"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@
"label": "RealmArchivingCertificate",
"type": "realm_archiving_certificate",
"other_fields": [
{
// SHA256 digest of the raw content (i.e. serialized and signed) of the
// previous certificate in the topic.
"name": "previous_in_topic",
"type": "HashDigest"
},
{
"name": "author",
"type": "DeviceID"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@
"label": "RealmKeyRotationCertificate",
"type": "realm_key_rotation_certificate",
"other_fields": [
{
// SHA256 digest of the raw content (i.e. serialized and signed) of the
// previous certificate in the topic.
"name": "previous_in_topic",
"type": "HashDigest"
},
{
"name": "author",
"type": "DeviceID"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@
"label": "RealmNameCertificate",
"type": "realm_name_certificate",
"other_fields": [
{
// SHA256 digest of the raw content (i.e. serialized and signed) of the
// previous certificate in the topic.
"name": "previous_in_topic",
"type": "HashDigest"
},
{
"name": "author",
"type": "DeviceID"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,13 @@
"label": "RealmRoleCertificate",
"type": "realm_role_certificate",
"other_fields": [
{
// SHA256 digest of the raw content (i.e. serialized and signed) of the
// previous certificate in the topic.
// `None` in case the certificate is the first in the topic.
"name": "previous_in_topic",
"type": "RequiredOption<HashDigest>"
},
{
"name": "author",
"type": "DeviceID"
Expand All @@ -19,6 +26,8 @@
"type": "UserID"
},
{
// `role` and `previous_in_topic` cann be both `None` (i.e. a realm
// cannot start by removing access to somebody !).
"name": "role",
"type": "RequiredOption<RealmRole>"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@
"label": "RevokedUserCertificate",
"type": "revoked_user_certificate",
"other_fields": [
{
// SHA256 digest of the raw content (i.e. serialized and signed) of the
// previous certificate in the topic.
"name": "previous_in_topic",
"type": "HashDigest"
},
{
"name": "author",
"type": "DeviceID"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"label": "SequesterAuthorityCertificate",
"type": "sequester_authority_certificate",
"other_fields": [
// No `previous_in_topic` field given this certificate must always be the first in topic.
// Override author field to always uses None given this certificate can only be signed by the root key
{
"name": "author",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@
"label": "SequesterRevokedServiceCertificate",
"type": "sequester_revoked_service_certificate",
"other_fields": [
{
// SHA256 digest of the raw content (i.e. serialized and signed) of the
// previous certificate in the topic.
"name": "previous_in_topic",
"type": "HashDigest"
},
// No author field here given we are signed by the sequester authority
{
"name": "timestamp",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@
"label": "SequesterServiceCertificate",
"type": "sequester_service_certificate",
"other_fields": [
{
// SHA256 digest of the raw content (i.e. serialized and signed) of the
// previous certificate in the topic.
"name": "previous_in_topic",
"type": "HashDigest"
},
// No author field here given we are signed by the sequester authority
{
"name": "timestamp",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,13 @@
"label": "ShamirRecoveryBriefCertificate",
"type": "shamir_recovery_brief_certificate",
"other_fields": [
{
// SHA256 digest of the raw content (i.e. serialized and signed) of the
// previous certificate in the topic.
// `None` in case the certificate is the first in the topic.
"name": "previous_in_topic",
"type": "RequiredOption<HashDigest>"
},
{
"name": "author",
"type": "DeviceID"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@
"label": "ShamirRecoveryShareCertificate",
"type": "shamir_recovery_share_certificate",
"other_fields": [
{
// SHA256 digest of the raw content (i.e. serialized and signed) of the
// previous certificate in the topic.
"name": "previous_in_topic",
"type": "HashDigest"
},
{
"name": "author",
"type": "DeviceID"
Expand Down
8 changes: 8 additions & 0 deletions libparsec/crates/types/schema/certif/user_certificate.json5
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,14 @@
"label": "UserCertificate",
"type": "user_certificate",
"other_fields": [
{
// SHA256 digest of the raw content (i.e. serialized and signed) of the
// previous certificate in the topic.
// `None` in case the certificate is the first in the topic
// (in which case `author` must be the root verify key).
"name": "previous_in_topic",
"type": "RequiredOption<HashDigest>"
},
{
"name": "author",
"type": "CertificateSignerOwned"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@
"label": "UserUpdateCertificate",
"type": "user_update_certificate",
"other_fields": [
{
// SHA256 digest of the raw content (i.e. serialized and signed) of the
// previous certificate in the topic.
"name": "previous_in_topic",
"type": "HashDigest"
},
{
"name": "author",
"type": "DeviceID"
Expand Down
Loading