-
-
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
Swarm Addrs, Disable secio opt, + tests #1399
Conversation
(secio) this is to put less load on tests/debugs/interop? Is it that significant? |
@rht it's much easier to debug the protocol if you can |
Or just put a backdoor like usual. |
I've also already gotten requests for an "unencrypted transport" for a particular network. I dont want those to mix with the public nodes though, so hence the total switch. |
(and probably should still sign it-- can probably resurface that "signed io" pipe) |
@whyrusleeping or @cryptix CR pls? |
Btw, the test indicators look terrible because Travis-CI had a field day with the mac testing. But if you look closely, all the tests in every commit pass correctly on linux. |
Travis is undergoing a bunch of maintenance for mac builds, so the indicators are all a mess. if you look at the actual results for all the commits, they all passed fine. |
this LGTM, weird that theres a bunch of different stuff all in the same PR, but i guess that makes testing easier? |
@whyrusleeping yeah added it all in one PR as one thing motivated another. i can split it up if you want |
If anyone can take a look at why
in the failing case, the to test manually, will want to add: echo "$PORT_SWARM" &&
go-sleep 10s && observe the port outout, and
|
if unencrypted { | ||
log.Warningf(`Running with --%s: All connections are UNENCRYPTED. | ||
You will not be able to connect to regular encrypted networks.`, unencryptTransportKwd) | ||
conn.EncryptConnections = false |
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.
Exposed package globals like this frighten me. Will we remove this once node interop works?
If it stays around, I'd prefer conn.DisableEncryption()
and print a warning on each dial as well. Found 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.
I'd still prefer if this was an opt-in for the lifetime of the process. No funky on/off switching.
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.
Exposed package globals like this frighten me. Will we remove this once node interop works?
If it stays around, I'd prefer conn.DisableEncryption()
I imagine with a function we can also make it one-way-- i.e. can only disable it or something.
btw, nothing prevents people from writing different implementations -- or, if they have access to the process, overwrite random memory. Even without this switch, if you can manipulate the process everything's done.
I'd still prefer if this was an opt-in for the lifetime of the process. No funky on/off switching.
yeah it is
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.
I just want to guard (package) users from using this in unintended ways and make it clear to them that this is a development feature. A func could disallow you to switch encryption back on.
The rest is fine by me. Of course we can't do anything meaningful about corruption from the outside.
f0d3d19
to
a390541
Compare
fixed it in a390541 |
License: MIT Signed-off-by: Juan Batiz-Benet <juan@benet.ai>
- added <addrs> field to `ipfs id -f` - added \n and \t conversion in `ipfs id -f` License: MIT Signed-off-by: Juan Batiz-Benet <juan@benet.ai>
Add a command to return local addresses. License: MIT Signed-off-by: Juan Batiz-Benet <juan@benet.ai>
daemon output now includes initial swarm addresses. this is not a full solution, as a change in network will not trigger re-printing. We need a good way to do that. This made me re-think how we're outputting these messages, perhaps we should be throwing them as log.Events, and capturing some with a special keyword to output to the user on stdout. Things like network addresses being rebound, NATs being holepunched, external network addresses being figured out, connections established, etc may be valuable events to show the user. Of course, these should be very few, as a noisy daemon is an annoying daemon. License: MIT Signed-off-by: Juan Batiz-Benet <juan@benet.ai>
This commit adds an option to turn off all encryption. This is a mode used for tests, debugging, achieving protocol implementation interop, learning about how the protocol works (nc ftw), and worst case networks which _demand_ to be able to snoop on all the traffic. (sadly, there are some private intranets like this...). (We should consider at least _signing_ all this traffic.) Because of the severity of this sort of thing, this is an all-or-nothing deal. Either encryption is ON or OFF _fully_. This way, partially unencrypted nodes cannot be accidentally left running without the user's understanding. Nodes without encrypted connections will simply not be able to speak to any of the global bootstrap nodes, or anybody in the public network. License: MIT Signed-off-by: Juan Batiz-Benet <juan@benet.ai>
Test odd daemon options, like: - unrestricted-api - disable-transport-encryption (known breakage atm) License: MIT Signed-off-by: Juan Batiz-Benet <juan@benet.ai>
fix the nc wait. the issue was that stdin needs to remain _open_ but not receive any input for some time. If stdin receives (invalid) input or closes, the other side terminates the connection before writing out the muxer frames + identify handshake. This commit also changes the use of `!` for `test_must_fail` License: MIT Signed-off-by: Juan Batiz-Benet <juan@benet.ai>
a390541
to
6b8e9f5
Compare
License: MIT Signed-off-by: Juan Batiz-Benet <juan@benet.ai>
e77cda6
to
f796615
Compare
they were failing intermittently License: MIT Signed-off-by: Juan Batiz-Benet <juan@benet.ai>
5cbfb6e
to
59d6a9a
Compare
Swarm Addrs, Disable secio opt, + tests
This PR adds:
ipfs swarm addrs local
- command to list out local addressesipfs id -f=<addrs>
- format to print out addrs tooipfs id -f=\n\t
- handle\n
and\t
correctly--disable-transport-encryption
daemon option (see below)--unrestricted-api
Left TODO:
Changes: