Repository navigation
Conversation
* master: lib/db, lib/protocol: Compact FileInfo and BlockInfo alignment (#6215)
|
Sorry, I got a busy week ahead of me, so not sure how quickly I'll turn around resolving them. |
I believe this applies to me too, but github doesn't allow me to mark my comments as such. I am happy to comment "LGTM" on things I believe are resolved. |
|
That's weird. Anyway, to not generate more comments/notifications just to mark them as done, you could also put a reaction/emoji on those comments which are done :) |
I guess that's only to members/maintainers of syncthing, but I agree everyone who left a review should be able to mark their comments as done. Can this be configurable in project settings?
I'll use 🚀 for "done". |
| "Introduced By": "Introduced By", | ||
| "Introducer": "Introducer", | ||
| "Inversion of the given condition (i.e. do not exclude)": "Inversion of the given condition (i.e. do not exclude)", | ||
| "Items have been added to this folder which are not encrypted.": "Items have been added to this folder which are not encrypted.", |
There was a problem hiding this comment.
Unexpected items found in folder as we don't know for sure if they are encrypted or not.
I guess some numpty might copy files encrypted with different passwords and expect that to work.
| "Start Browser": "Start Browser", | ||
| "Statistics": "Statistics", | ||
| "Stopped": "Stopped", | ||
| "Stores and syncs only encrypted data. Folders on all connected devices need to be set up with the same password or be of type \"{%receiveEncrypted%}\" too.": "Stores and syncs only encrypted data. Folders on all connected devices need to be set up with the same password or be of type \"{{receiveEncrypted}}\" too.", |
There was a problem hiding this comment.
The stores part is a false statement. My local data is not encrypted.
I guess the right term is encrypts outgoing, decrypts incoming data
There was a problem hiding this comment.
This describes the receive-only folder type. It does receive encrypted data, not decrypt, and stores encrypted data.
| "Unavailable": "Unavailable", | ||
| "Unavailable/Disabled by administrator or maintainer": "Unavailable/Disabled by administrator or maintainer", | ||
| "Undecided (will prompt)": "Undecided (will prompt)", | ||
| "Unencrypted Items": "Unencrypted Items", |
There was a problem hiding this comment.
Again, we don't know if they are encrypted or not, might just be the wrong password.
| "You should never add or change anything locally in a \"{%receiveEncrypted%}\" folder.": "You should never add or change anything locally in a \"{{receiveEncrypted}}\" folder.", | ||
| "days": "days", | ||
| "directories": "directories", | ||
| "enter password to encrypt data to be sent": "enter password to encrypt data to be sent", |
There was a problem hiding this comment.
Strange that this starts with a lowercase.
Also, this password is used for decryption as well, so "encrypt data to be sent" is just part of the story?
"Enter encryption password" ?
| "full documentation": "full documentation", | ||
| "items": "items", | ||
| "not shared": "not shared", | ||
| "received data is already encrypted": "received data is already encrypted", |
There was a problem hiding this comment.
again, lowercase for both of these?
| } | ||
| } else { | ||
| if len(ccDeviceRemote.EncryptionPasswordToken) > 0 || len(ccDeviceLocal.EncryptionPasswordToken) > 0 { | ||
| l.Infof("Failed to auto-accept folder %s from %s as the remote wants to send us encrypted data, but we are not encrypted", folder.Description(), deviceID) |
There was a problem hiding this comment.
What does "we are not encrypted" mean?
| l.Infof("Auto-accepted %s folder %s at path %s", deviceCfg.DeviceID, folder.Description(), fcfg.Path) | ||
| if len(ccDevice.EncPwToken) > 0 || len(ccDeviceUs.EncPwToken) > 0 { | ||
| fcfg.Type = config.FolderTypeReceiveEncrypted | ||
| } |
There was a problem hiding this comment.
Why can't I have:
<untrusted> <-> <untrusted> but both know/use the password, effectively adding an extra encryption layer on top of the transport?
In that case you'd have tokens from both sides, and that would be fine, as long as they match.
| isEncRemote := folderDevice.EncryptionPassword != "" | ||
| isEncLocal := fcfg.Type == config.FolderTypeReceiveEncrypted | ||
|
|
||
| if !isEncRemote && !isEncLocal && deviceUntrusted { |
There was a problem hiding this comment.
So I need to think more about this, but something smells to me here.
| } | ||
|
|
||
| func encTokenPath(cfg config.FolderConfiguration) string { | ||
| return filepath.Join(cfg.MarkerName, "syncthing-enc_pw_token") |
There was a problem hiding this comment.
I guess this sort of reduces the usefulness of per-device-per-folder passwords, as for two plaintext devices to sync to a third encrypted device, they would have to use the same password.
Sure for a 4th encrypted device they could use a different one, which I guess is why we have this, but I wonder if it's worth it.
AudriusButkevicius
left a comment
There was a problem hiding this comment.
More naming moaning. The most important stuff. Resolved stuff that was not relevant, and things that are still relevant and became outdated and hidden, recommented on them. There are still a few old outdated comment threads that are still relevant and not resolved.
| } | ||
|
|
||
| func (e encryptedModel) ClusterConfig(deviceID DeviceID, config ClusterConfig) error { | ||
| // TODO: Filter/clean the incoming ClusterConfig? |
There was a problem hiding this comment.
The todo should go if we're not todoing anything?
| } else { | ||
| m.folderEncryptionFailures[folder.ID] = make(map[protocol.DeviceID]error) | ||
| } | ||
| m.folderEncryptionFailures[folder.ID][deviceID] = err |
There was a problem hiding this comment.
Can this live in the folder rather than the model somehow?
There was a problem hiding this comment.
These are connection/cluster config level errors. And folders do not handle that let allow know anything about it. Changing that would be entirely out of scope of this PR.
This PR is the continuation/equivalent of #6214 on a branch in the syncthing/syncthing repo. Everything on there still applies.
For a list of ongoing/outstanding tasks and more notes, please refer to this wiki page (and extend/update as appropriate): https://github.com/syncthing/syncthing/wiki/Untrusted-devices-(encryption)-status
Companion docs PR: syncthing/docs#480