Repository navigation
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files☔ View full report in Codecov by Harness. |
|
@rosylilly: sorry for the silence on this one. Even though it looks promising, I would like to sleep over it for a couple of nights. ... and I would like to resolve the simpler challenges your are looking for first :) |
|
Since the |
WithSignatureSelection makes Verify check only the signature named by WithLabel, so other signatures on the message don't affect the result.
15f6cbd to
36ff8e1
Compare
|
@dadrus I've rebased this branch onto the latest |
|
@rosylilly: I finally found some time to merge the current There is, however, one behavioral change I'd like to understand: On Additionally, I'd like to discuss some broader API design considerations. Since our initial discussion in #169, and thanks in part to your PR, I've been thinking about a more general signature selection model, which would replace Additionally, multiple The semantics would be quite simple: Each expected signature profile requires at least one matching signature, and all matching signatures must pass its verification policy. If a signature matches multiple selectors, all applicable policies must be satisfied. Signatures not matching any selector are not verified. The existing functionality to select all signatures would still be possible with an empty selector. The verification options would work as they do today, including the existing security defaults (required Signature negotiation would also be configured per expected signature. The selector criteria would automatically become part of the corresponding IMO, this would result in a much cleaner and more flexible API, without introducing yet another mutually exclusive selection mode. It would also allow to get rid of the current distinction between global and tag-specific verification policies. That brings me to my concern with merging this PR. I'd really like to implement this more general approach, but doing so would mean removing most of the API and selection logic introduced by your PR again. There is, however, one thing I'd like to clarify before going down that road. One consequence of your implementation is that the label can be selected independently for each Verify() call. I'm wondering whether there are practical use cases where the label actually needs to change between requests, and whether this is the case for your ActivityPub server. Does the label of the first signature vary between requests, or could it be specified when constructing the verifier? And what do you think about the alternative API? Thanks again, and sorry for the novel ;) |
|
@dadrus Thanks for the detailed write-up.
I like the |
|
Thank you for sharing your view and sorry for the belated answer. Then, let's do so. I'll add yet another comment to #169 describing the agreed API and will address it asap in a new PR which will replace this one. Therefore, I'm closing this PR for now. FYI: it might take a week or two until the new PR is there. |
WithSignatureSelection makes Verify check only the signature named by WithLabel, so other signatures on the message don't affect the result.
Closes #169