-
Notifications
You must be signed in to change notification settings - Fork 553
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix idempotency error with signing (#3371)
The expected behavior is to fetch an existing entry from the log when signing generates the same signature, so that signing is idempotent. The bug was that the prepended shard ID was compared to the log ID. The log ID is a sha256 hash of the log's public key, which is not the same as the shard ID. Now we compare the prepended shard IDs from both the request and response entry UUID when present. This was not caught in tests since we used a valid shard ID as input rather than the log ID. Verified by generating an RSA key (which will generate the same signature given the same input) and signing a container. Signed-off-by: Hayden Blauzvern <[email protected]>
- Loading branch information
1 parent
ef0877d
commit 2a34b4c
Showing
2 changed files
with
19 additions
and
28 deletions.
There are no files selected for viewing
This file contains 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 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