-
Notifications
You must be signed in to change notification settings - Fork 108
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
Implement labels #514
Implement labels #514
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #514 +/- ##
==========================================
- Coverage 51.31% 50.71% -0.61%
==========================================
Files 42 42
Lines 3946 4058 +112
==========================================
+ Hits 2025 2058 +33
- Misses 1921 2000 +79 ☔ View full report in Codecov by Sentry. |
befd8b3
to
f130a4f
Compare
} | ||
} | ||
(Ok(false), false) => Err(vec![Error::Internal { | ||
message: "Plugin requires labels but client does not support them".into(), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm, this is an interesting decision, should a postquantum plugin refuse to work with older versions of age(1)?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That was my interpretation, given this language in C2SP/C2SP#37:
- Clients MUST check that all recipient stanzas wrapping a given file key have the exact same label set. Clients MUST NOT permit partial overlapping sets.
- If the plugin does not respond with a
labels
command in phase 2, clients MUST treat the plugin's recipient stanzas has having an empty label set.
That means if the client does not advertise support for the labels extension, the plugin knows that if it proceeds apace, it will be forced to use the empty label set, which would be in violation of its desired non-empty label set. Maybe some plugins would accept that kind of fallback? But because plugins only see their relevant recipients, they cannot know what other recipients they will be combined with (the precise reason we designed the labels extension).
If we think this should be a per-plugin decision, I could add an associated constant to the trait (or alter the new labels
method to return a boolean) that forces the plugin to declare whether it would allow its labels to be ignored by older clients. But that feels a bit weird.
I want to add plugins to the interoperability testing in order to test these changes between |
Closes #403.