-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Replace console output by monitoring events for curve security issues #2645
Merged
Conversation
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
* Mechanisms can implement a new method `error_detail()` * This error detail have three values for the moment: no_detail (default), protocol, encryption. + generic enough to make sense for all mechanisms. - low granularity level on information.
The ZMQ_EVENT_HANDSHAKE_FAILED event carries the error details as value.
This was leading to compilation error under linux.
Removed ZMQ_EVENT_HANDSHAKE_FAILED and replaced it by: - ZMQ_EVENT_HANDSHAKE_FAILED_NO_DETAIL, - ZMQ_EVENT_HANDSHAKE_FAILED_PROTOCOL, - ZMQ_EVENT_HANDSHAKE_FAILED_ENCRYPTION Adaptation of text case `security_curve`
This was introduced for the previous API model adaptation
`current_error_detail` was not set in every protocol error cases
The handshake failure due to mechanism mismatch in greeting is actually a protocol error. The error handling method consider it like so and send a protocol handshake failure monitoring event instead of no_detail. Fixed the test_security_curve expectation as well.
The tests check the number of monitoring events received
Solution: - properly use ZMQ_DRAFT_API conditional compilation - use receive timeouts instead of Sleep
Solution: merged definitions
Solution: reduce timing dependency by using timeouts at more places
Solution: output event type to aid debugging
…third event Solution: changed assertion to expect three events (needs to be checked)
Solution: removed include directive
Solution: improve debug output
Solution: add build configurations with libsodium and draft api
Solution: change assertion to reflect actual behaviour on CI (at least temporarily)
Solution: generalize assertion to match behavior on CI
Solution: removed inconsistent assertion on no monitor events before flushing improved debuggability by converting function into macro
…age key Solution: extract common code into function
Solution: introduce dummy variable
…ta in inbuffer Solution: Skip tcp_read attempt in that case
Solution: use stream_engine_t::handshaking instead of mechanism_t::status() to determine whether still handshaking
…_FAILED_ZMTP and ZMQ_EVENT_HANDSHAKE_FAILED_ZAP
…for language consistency
…for language consistency
…for language consistency
Reverted erroneous change to handshaking condition Renamed test_wrong_key to test_garbage_key Generalized assumption in test_garbage_key to allow for ZMQ_EVENT_HANDSHAKE_FAILED_NO_DETAIL with error == EPIPE
…t & server for each
Thanks @sigiesec ! |
This was referenced Aug 23, 2017
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Problem: libzmq writes on console in case of curve security issues (#2002)
Solution: refine defined ZMQ_EVENT_HANDSHAKE_FAILED event into several subtypes
replace console output by those refined events
added tests for ZMQ_EVENT_HANDSHAKE_FAILED_*