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

configurable pubsub signing #5647

Merged
merged 1 commit into from
Oct 26, 2018
Merged

configurable pubsub signing #5647

merged 1 commit into from
Oct 26, 2018

Conversation

Stebalien
Copy link
Member

@Stebalien Stebalien commented Oct 25, 2018

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.

@ghost ghost assigned Stebalien Oct 25, 2018
@ghost ghost added the status/in-progress In progress label Oct 25, 2018
@Stebalien Stebalien changed the title configurable pubsub singing configurable pubsub signing Oct 25, 2018
@@ -475,14 +475,23 @@ func (n *IpfsNode) startOnlineServicesWithHost(ctx context.Context, host p2phost

var service *pubsub.PubSub

var pubsubOptions []pubsub.Option
Copy link
Contributor

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?

Copy link
Member Author

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...

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor

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.

Copy link
Member Author

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.

Copy link
Member Author

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)

Copy link
Contributor

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.

Copy link
Member Author

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
Copy link
Contributor

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?)

Copy link
Member Author

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.

Copy link
Contributor

@schomatis schomatis left a 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
Copy link
Contributor

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.

@Stebalien
Copy link
Member Author

it's a string, but does it carry some special meaning?

It's an arbitrary (binary) string. At one point, it was the hash of a topic descriptor but that never really got finished.

@Stebalien
Copy link
Member Author

@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>
@Stebalien Stebalien merged commit bf1aeac into master Oct 26, 2018
@ghost ghost removed the status/in-progress In progress label Oct 26, 2018
@Stebalien Stebalien deleted the feat/pubsub-signing branch February 28, 2019 22:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants