-
-
Notifications
You must be signed in to change notification settings - Fork 49
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
Device "self-identity oriented" assignment #9325
Comments
It will be great to have some autoattach controls :) Right now on SecureDrop Workstation we hack together some autoattach behaviour via udev rules, but it's a blunt instrument - I'm chiming in after a nudge from marek in case any of this info about our use-case is helpful.
Some last notes about user feedback:
Hope this information is helpful! |
On the specific USB port side, the problem is that if you don't limit attaching to a specific USB port, we can have a huge security issue - devices can lie about their identity, a USB hub complicates things etc. I think the security team had a lot of opinions on why we can't have "any port" here. |
Proposal: Device Assignment PolicyFor now, a device is represented by the pair (backend-vm, ident), which aligns more with a Port. In the user's mental model, we equate a Device with what is plugged into the Port. The issue is that only (backend-vm, ident) can be trusted, while all information about the device is obtained from the Device itself, which is less trustworthy. Proposed solution: A set of rules as follows:
Allowed Values::
devclass:
port_id:
device (self_identity):
action:
Pros:
Security Level Comparison to the Current Level:Possible attack: A device can pose as a trusted device and be set to auto-attach to a sensitive VM.
Additionally, device interfaces are checked, so auto-attach limited to mass data could be even safer than manual configuration. When a user plugs in a pendrive with a keyboard interface, it will not be automatically attached, whereas an unaware user might miss this and manually attach the device. This proposal still introduces some risk, but less than using a USB keyboard. More granural Security Control:
This policy automatically attaches only devices declaring mass data type to Using automation is practically safer than relying on manual configuration. |
I think I like it, although I'm already thinking about how non-simple it's going to be to expose simple GUI config options :D But that's my problem - this looks like good backend. |
I think I'm missing some higher level context. Currently device assignments are stored in The proposed idea for rules (especially actions and identity properties) as a concept looks fine, but there should be some connection to the current model. And here, I'm not sure if the idea of a single flat table as the user-facing (or even an API) approach is a good one. We'll run into various issues regarding presenting this to users, rules ordering (especially when changed both by the users manually, and using some CLI/GUI tools) etc. Maybe a better approach would be to still consider this in terms of objects attached to appropriate qube (either frontend or backend, may depend on the rule?) possibly at the cost of some flexibility. But then, we may have cases where not having explicit rules order will be a problem, especially in case of conflicting rules ("allow only specific device and deny all others" or "deny specific class of devices but allow others"). This could be solved with rules (objects attached to VMs) having a priority (a number). That said, it feels like re-introducing weaker version of rules order, compared to the flat table giving full ordering... To put this all in other words: I think the flat table you propose gives too much flexibility, that will make supposedly simple cases (like "click here to always attach this device to qube X") significantly harder due to potential interaction with other rules. We had this problem before already, twice (firewall, and qrexec policy). And in both cases it ended up with GUI tools more or less giving up if user added any non-default rule manually (in case of firewall, it literally tells you to go to CLI and disables any kind of editing; in case of qrexec, it complains about the custom rules, and depending where you put them, warns you they will get removed if you continue). I'd like to avoid this situation with this API... Maybe we should start with collecting use cases we want to support? Do you have a list like this already somewhere? If not, here are some ideas (partially based on earlier comments here):
I'm probably missing many cases... |
Ok, I see the problem. I agree that reducing the flexibility of the solution would be the best approach. Currently, when a device is connected, we rely on information from the Let's introduce the following restrictions:
AlgorithmSo, the mechanism would work as follows: This method might not be super intuitive, but it meets the basic needs:
We need add command to change the rule no.
Assignment is still tied to the frontend. It should be considered of as a request from frontend-vm to attach a device with specific parameters.
We can introduce a new file or keep all this information in
No, we will maintain the current behavior. TablesModified tables can looks as follows (it is hidden in Auto-attach rules:
rule no.:
frontend-vm:
backend-vm:port_id:
device:
action:
options:
Device attachemnt restriction:
frontend-vm:
interfaces:
Interfaces can be easily translated to user-language like: mouse, keyboard, mass-data. From the point of GUI it can be represented as tree, where the user can choose which nodes/branches are allowed or not:
|
The devices API changes in R4.3 makes it complicated to use the same code base for both R4.2 and R4.3. Use separate branches. QubesOS/qubes-issues#9325
The devices API changes in R4.3 makes it complicated to use the same code base for both R4.2 and R4.3. Use separate branches. QubesOS/qubes-issues#9325
Device with specific device_id doesn't equal device with wildcard device_id, so `dev in old_devs` check cannot be used. Fix this by using DeviceAssignment.matches method. A side effect is getting old assignment earlier. QubesOS/qubes-issues#9325
Device with specific device_id doesn't equal device with wildcard device_id, so `dev in old_devs` check cannot be used. Fix this by using DeviceAssignment.matches method. A side effect is getting old assignment earlier. QubesOS/qubes-issues#9325
Device with specific device_id doesn't equal device with wildcard device_id, so `dev in old_devs` check cannot be used. Fix this by using DeviceAssignment.matches method. A side effect is getting old assignment earlier. QubesOS/qubes-issues#9325
Device with specific device_id doesn't equal device with wildcard device_id, so `dev in old_devs` check cannot be used. Fix this by using DeviceAssignment.matches method. A side effect is getting old assignment earlier. QubesOS/qubes-issues#9325
Device with specific device_id doesn't equal device with wildcard device_id, so `dev in old_devs` check cannot be used. Fix this by using DeviceAssignment.matches method. A side effect is getting old assignment earlier. QubesOS/qubes-issues#9325
Device with specific device_id doesn't equal device with wildcard device_id, so `dev in old_devs` check cannot be used. Fix this by using DeviceAssignment.matches method. A side effect is getting old assignment earlier. QubesOS/qubes-issues#9325
Avoid installing this package in dom0 without updating also other parts of this API. QubesOS/qubes-issues#9325
... for new devices API QubesOS/qubes-issues#9325
Introduction
Currently, we can make one assignment of a selected port to a single VM in two ways:
identity='any'
, which means that anything plugged into the designated port will be automatically attached to the VM, as it has been functioning thus far.Proposed enhancement
More:
QubesOS/qubes-core-admin#579 (review)
The value to a user, and who that user might be
Increased security (less error-prone manual clicking/typing) and user convenience.
TODO
The text was updated successfully, but these errors were encountered: