-
-
Notifications
You must be signed in to change notification settings - Fork 3k
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
configurable pubsub signing #5647
Conversation
@@ -475,14 +475,23 @@ func (n *IpfsNode) startOnlineServicesWithHost(ctx context.Context, host p2phost | |||
|
|||
var service *pubsub.PubSub | |||
|
|||
var pubsubOptions []pubsub.Option |
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.
What happens if they are both set?
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.
The user won't be able to send any messages. We should error in that case, shouldn't we...
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.
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.
Re-reading this now with some more context it seems like a valid case (although I'm not sure how useful it is), that is, we are requiring signed messages but we don't sign them ourselves.
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.
It is a valid case, technically. But it's so useless that we should probably get rid of it.
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.
(actually, I may just do that in a followup patch once someone takes a look at that PR)
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.
if strict signing is set but signing is disabled, then it will be ignored.
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.
Got it. Now that the option validation patch has been merged, it should return an error on construction. That should be the least surprising result.
# ipfs pubsub sub is long-running so we need to start it in the background and | ||
# wait put its output somewhere where we can access it | ||
( | ||
ipfsi 0 pubsub sub --enc=ndpayload testTopic | if read line; then |
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.
What is ipfsi
? (I mean, where can I read some information about it?)
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.
It's a function defined in test/sharness/lib/iptb-lib.sh
.
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.
LGTM (bonus question: what is a topic? it's a string, but does it carry some special meaning? I'm reading this spec but I'm not fully grasping the concept).
@@ -475,14 +475,23 @@ func (n *IpfsNode) startOnlineServicesWithHost(ctx context.Context, host p2phost | |||
|
|||
var service *pubsub.PubSub | |||
|
|||
var pubsubOptions []pubsub.Option |
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.
Re-reading this now with some more context it seems like a valid case (although I'm not sure how useful it is), that is, we are requiring signed messages but we don't sign them ourselves.
It's an arbitrary (binary) string. At one point, it was the hash of a topic descriptor but that never really got finished. |
@schomatis mind ticking ipfs/go-ipfs-config#18 as well? |
I'd like to sneak this into the release so we can turn on strict verification ASAP. License: MIT Signed-off-by: Steven Allen <steven@stebalien.com>
95935fb
to
2b0bc7e
Compare
I'd like to sneak this into the release so we can turn on strict verification ASAP.
Depends on ipfs/go-ipfs-config#18 and a gx update.