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

Fix idempotency error with signing #3371

Merged
merged 1 commit into from
Nov 18, 2023

Commits on Nov 17, 2023

  1. Fix idempotency error with signing

    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 <hblauzvern@google.com>
    haydentherapper committed Nov 17, 2023
    Configuration menu
    Copy the full SHA
    e7dd433 View commit details
    Browse the repository at this point in the history