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

all: Add untrusted config for devices #6787

Merged
merged 8 commits into from Jul 2, 2020

Conversation

imsodin
Copy link
Member

@imsodin imsodin commented Jun 22, 2020

PR for the encryption branch

Adds an Untrusted config option to devices. If set it ensures that no data is sent to that device without being encrypted.

image
image

The first commit is a convenience change: We already do keep folder configs as a map in $scope, now we do the same for devices.

@imsodin imsodin changed the title Encryption untrusted device all: Add untrusted config for devices Jun 22, 2020
<div class="form-group col-md-6">
<input type="checkbox" id="untrusted" ng-model="currentDevice.untrusted" />
<label for="untrusted" translate>Untrusted</label>
<p translate class="help-block">All folders shared with this device must be protected by a password, such that all sent data is encrypted.</p>
Copy link
Member

Choose a reason for hiding this comment

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

such that all sent data is unreadable without the given password?

Encrypted might just mean TLS...

@imsodin
Copy link
Member Author

imsodin commented Jun 29, 2020

Is this good to merge into the main encryption branch?

@@ -30,6 +30,7 @@ type DeviceConfiguration struct {
IgnoredFolders []ObservedFolder `xml:"ignoredFolder" json:"ignoredFolders"`
PendingFolders []ObservedFolder `xml:"pendingFolder" json:"pendingFolders"`
MaxRequestKiB int `xml:"maxRequestKiB" json:"maxRequestKiB"`
Untrusted bool `xml:"untrusted" json:"untrusted"`
Copy link
Member

Choose a reason for hiding this comment

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

Could add UR stats straight away :D

@@ -237,6 +241,8 @@ func (r *Report) FieldPointers() []interface{} {
&r.FolderUsesV3.AlwaysWeakHash, &r.FolderUsesV3.CustomWeakHashThreshold,
&r.FolderUsesV3.FsWatcherEnabled,

&r.DeviceUsesV3.Untrusted,
Copy link
Member

Choose a reason for hiding this comment

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

This is not needed, but if you're adding it, you should also add the column name,

Copy link
Member Author

Choose a reason for hiding this comment

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

Ah yeah right, lazily searched for the wrong term (FolderUsesV3).instead of trying to understand. Why not necessary though?

Copy link
Member

Choose a reason for hiding this comment

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

This was used for reading columns, and inserting into json tables. The migration is done, we don't have the data that was behind those columns.

Copy link
Member Author

Choose a reason for hiding this comment

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

Removed it. Maybe that code should be pruned or moved to a file with "legacy" in its name just to make it clear?

Copy link
Member

Choose a reason for hiding this comment

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

Agree, we can delete the code given the migration is done, I guess unless someone builds from source, or does a major version jump on their own UR server.

@imsodin imsodin merged commit 8d40185 into syncthing:encryption Jul 2, 2020
@imsodin imsodin deleted the encryption-untrustedDevice branch July 2, 2020 18:48
@st-review st-review added the frozen-due-to-age Issues closed and untouched for a long time, together with being locked for discussion label Jul 3, 2021
@syncthing syncthing locked and limited conversation to collaborators Jul 3, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
frozen-due-to-age Issues closed and untouched for a long time, together with being locked for discussion
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants