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
all: Add untrusted config for devices #6787
Conversation
<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> |
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.
such that all sent data is unreadable without the given password
?
Encrypted might just mean TLS...
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"` |
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.
Could add UR stats straight away :D
lib/ur/contract/contract.go
Outdated
@@ -237,6 +241,8 @@ func (r *Report) FieldPointers() []interface{} { | |||
&r.FolderUsesV3.AlwaysWeakHash, &r.FolderUsesV3.CustomWeakHashThreshold, | |||
&r.FolderUsesV3.FsWatcherEnabled, | |||
|
|||
&r.DeviceUsesV3.Untrusted, |
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.
This is not needed, but if you're adding it, you should also add the column name,
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.
Ah yeah right, lazily searched for the wrong term (FolderUsesV3).instead of trying to understand. Why not necessary though?
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.
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.
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.
Removed it. Maybe that code should be pruned or moved to a file with "legacy" in its name just to make it clear?
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.
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.
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.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.