On 02.06.2014 14:44, Joanna Rutkowska wrote:
> On 05/30/14 15:05, Vincent Penquerc'h wrote:
>> On 30/05/14 13:48, Joanna Rutkowska wrote:
>>>> I'm thinking whether vm name and label will be "enough for
>>>> everybody" or should we consider introduction of also additional
>>>> properties to VMs? Perhaps user definable properties? E.g.:
>>
>> I really like this idea. It is simple and flexible, assuming the user
>> can assign more than one tag to a VM. One could also have a Qubes
>> reserved tag namespace, which could include a "running" tag only if
>> the VM is running (could be used to differentiate between new dispvms
>> and already running ones, for dispvms having otherwise identical tag
>> sets).
>>
>
> VM tags might also be handy for other tasks -- e.g. 3rd party tools
> might be able to e.g. backup only VMs with a specific tag defined, etc.
Currently there is a way to write plugin, which introduce additional VM
attributes. Appmenus handling is done that way for example. But it is far from
ideal.
> So, considering a VM in Qubes, we can see a few namespaces:
>
> 1) the VM name namespace (e.g. "work")
> 2) the labels namespace (red, yellow, green, etc)
> 3) the user-assignable tags or attributes
> 4) the Qubes internal attributes (as displayed currently by qvm-prefs),
> which includes both user-settable ones, as well as read-only ones (e.g.
> state)
>
> Some questions:
>
> 1) Do we want to somehow unify the above? This might include unification
> for how we store those tags/attributes internally in classes, as well as
> unification from the user point of view (should we introduce new
> commands/API like qvm-tag)?
>
> E.g. VM labels (#2) might be a special case of user-assignable tags or
> attributes (#3)
I would not mix "tags/attributes" (like label, name) with "settings/runtime
info" (like template, netvm, kernel, state, disk usage). Also when introducing
user-settable attributes, IMO every such attribute should be somewhere
defined, including allowed values (if we choose attributes over tags). IOW no
free-style attributes. Otherwise it would be very easy to make a typo, which
would have fatal security consequence. Also user-defined attributes should
have somewhow separated namespace (to not conflict with possible future
Qubes-defined ones). Common practice is force user-defined properties to have
"X-" prefix - IMO it is a good idea here.
BTW Current qubes-rpc policies have this problem - user have no easy way to
validate it after editing. So errors like typos in VM name can be very easily
unnoticed.
But some unification would be helpful. Problems with current configuration:
1. it is spread on multiple locations (qubes.xml, firewall.xml, guid.conf,
/etc/qubes-rpc/policy etc),
2. different configuration formats, naming schemes,
3. qubes.xml parsing is very complex (this is one of main reasons why some
configuration is kept outside of it),
4. qubes.xml layout is ugly - all VM settings in attributes (not child
entries), flat structure, all VMs directly under root element, global settings
in root element attributes and many many more,
5. there is no easy way to notice what was changed when qubes.xml got updated
- especially painful for Qubes Manager, which currently need to reload all the
VMs when one attribute was changed.
I think qubes.xml should be completely redesigned from scratch to solve above
problems (perhaps not even XML based? to solve fifth problem). IMO we should
first work out some initial version internally and only then possibly start
discussion about it on qubes-devel (with some starting point). Otherwise the
discussion will be very long and mostly unproductive...
> 2) Do we want to let the user assign tags or attributes (= a tag with a
> value)?
If attributes at all, only with predefined allowed values, which BTW can be
done with tags - instead of attribute "x-security-level=high" one can use tag
"x-security-level-high". The only difference would be forcing only one value
of given attribute at once (so tag "x-security-level-high" would be mutually
exclusive with tag "x-security-level-low").
--
Best Regards,
Marek Marczykowski-Górecki
Invisible Things Lab
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?