-
Notifications
You must be signed in to change notification settings - Fork 249
COSE-only ledgers #7772
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
Merged
Merged
COSE-only ledgers #7772
Changes from all commits
Commits
Show all changes
30 commits
Select commit
Hold shift + click to select a range
f980687
COSE-only ledgers
maxtropets 462c454
Review
maxtropets 8dbdcba
Review
maxtropets a235b84
Tidy, tidy, tidy...
maxtropets fac0afe
Comment
maxtropets e669ebe
Cose only as appl setting
maxtropets ef19eaf
More changes. Polishing
maxtropets 1189551
Recovery test
maxtropets 358cf02
Merge branch 'main' into f/COSE-only-sig
maxtropets bee192a
Recovery fix and test for seqnos
maxtropets 8456759
Fix recovery
maxtropets fd5f58c
Changelog
maxtropets ccb2683
Changelog
maxtropets 36602ce
Merge branch 'main' into f/COSE-only-sig
maxtropets e45c6ae
Update, more recovrey test
maxtropets cea8f12
Ok
maxtropets 6bc1eb7
Fix recovery test
maxtropets 5bed927
Merge branch 'main' into f/COSE-only-sig
achamayou 3e31f1e
Merge branch 'main' into f/COSE-only-sig
maxtropets ff3c418
Unite configs. move out from research subfolder
maxtropets 8f598e2
Apply suggestion from @achamayou
achamayou 83e46a5
Apply suggestion from @achamayou
achamayou a12242d
Merge branch 'main' into f/COSE-only-sig
achamayou f02126f
Revert "Apply suggestion from @achamayou"
maxtropets a3b816e
Revert "Apply suggestion from @achamayou"
maxtropets 05e450a
Revert public python api, force claims, build fix, schema manual fix
maxtropets 81bf35f
Merge branch 'main' into f/COSE-only-sig
maxtropets e15cde5
Update error message
maxtropets e3e7e3f
Fixup two missed signature lookups
maxtropets cfa3a56
Merge branch 'main' into f/COSE-only-sig
achamayou File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,40 @@ | ||
| // Copyright (c) Microsoft Corporation. All rights reserved. | ||
| // Licensed under the Apache 2.0 License. | ||
| #pragma once | ||
|
|
||
| #include "ccf/ds/json.h" | ||
|
|
||
| #include <cstdint> | ||
|
|
||
| namespace ccf | ||
| { | ||
| enum class LedgerSignMode : uint8_t | ||
| { | ||
| // Emit both traditional node signatures and COSE Sign1 signatures. | ||
| // Accept join requests from nodes in any signing mode. | ||
| Dual = 0, | ||
|
|
||
| // Emit only COSE Sign1 signatures, but accept join requests from | ||
| // nodes still running in Dual mode. Use during rolling upgrades. | ||
| CoseAllowDualJoin = 1, | ||
|
|
||
| // Emit only COSE Sign1 signatures and reject join requests from | ||
| // nodes running in Dual mode. Final state after a completed upgrade. | ||
| CoseOnly = 2 | ||
| }; | ||
|
|
||
| DECLARE_JSON_ENUM( | ||
| LedgerSignMode, | ||
| {{LedgerSignMode::Dual, "Dual"}, | ||
| {LedgerSignMode::CoseAllowDualJoin, "CoseAllowDualJoin"}, | ||
| {LedgerSignMode::CoseOnly, "CoseOnly"}}); | ||
|
|
||
| /** Can be optionally implemented by the application to set the ledger | ||
| * signing mode. | ||
| * | ||
| * The default (weak) implementation returns LedgerSignMode::Dual. | ||
| * | ||
| * @return the desired ledger signing mode | ||
| */ | ||
| LedgerSignMode get_ledger_sign_mode(); | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| // Copyright (c) Microsoft Corporation. All rights reserved. | ||
| // Licensed under the Apache 2.0 License. | ||
|
|
||
| #include "ccf/node/ledger_sign_mode.h" | ||
|
|
||
| namespace ccf | ||
| { | ||
| LedgerSignMode get_ledger_sign_mode() | ||
| { | ||
| return LedgerSignMode::CoseOnly; | ||
| } | ||
| } |
12 changes: 12 additions & 0 deletions
12
samples/apps/logging/get_ledger_sign_mode_cose_allow_join_dual.cpp
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| // Copyright (c) Microsoft Corporation. All rights reserved. | ||
| // Licensed under the Apache 2.0 License. | ||
|
|
||
| #include "ccf/node/ledger_sign_mode.h" | ||
|
|
||
| namespace ccf | ||
| { | ||
| LedgerSignMode get_ledger_sign_mode() | ||
| { | ||
| return LedgerSignMode::CoseAllowDualJoin; | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.