~ubuntu-branches/ubuntu/utopic/kde-workspace/utopic-proposed

« back to all changes in this revision

Viewing changes to plasma/design/security

  • Committer: Bazaar Package Importer
  • Author(s): Michał Zając
  • Date: 2011-07-09 08:31:15 UTC
  • Revision ID: james.westby@ubuntu.com-20110709083115-ohyxn6z93mily9fc
Tags: upstream-4.6.90
Import upstream version 4.6.90

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
Security
 
2
========
 
3
 
 
4
overview
 
5
--------
 
6
 
 
7
plasma will have three types of security:
 
8
-co-operative
 
9
-trust-based
 
10
-enforced
 
11
 
 
12
co-operative security
 
13
---------------------
 
14
 
 
15
this is fairly basic security for plasmoids.
 
16
the idea is, shells (like plasma-overlay) can specify a list of constraints in their desktop file, and then all plasmoids that require the disabled feature don't show up in the appletbrowser. also, plasmoids that would like a certain feature but don't *need* it can check hasAuthorization() and turn it off when it's not allowed.
 
17
This type of security relies heavily on plasmoid developers. Each plasmoid's .desktop file must list what features the plasmoid requires, and be kept up to date with the code. X-Plasma-Requires-<feature> can be set to Required, Unused, or Optional. Example: X-Plasma-Requires-FileDialog=Required
 
18
Features the plasmoid would like but does not require should be guarded by hasAuthorization, and set to Optional in the .desktop. [example](http://websvn.kde.org/?view=rev&revision=967792).
 
19
All the plasmoids in workspace and kdeplasma-addons should probably be reviewed before release. some of them don't have an active maintainer to take responsibility.
 
20
 
 
21
Currenly, plasmoids that don't mention a constraint are assumed to not use it. however, by release time the opposite should be true. this is just so that they don't *all* disappear from the screensaver before anyone has a chance to review their plasmoids.
 
22
Note that this will not remove existing instances of plasmoids. It only hides them from the appletbrowser. Users who really really want to can edit the config file to add unsafe applets.
 
23
 
 
24
Existing constraints/features:
 
25
-FileDialog. When this is restricted, use of open or save dialogs is forbidden. Reason: users can delete files from there and cause all kinds of havoc.
 
26
-LaunchApp. When this is restricted, running other applications or opening urls (generally done through KRun) is forbidden. Reason: although they're not accessible from the screensaver, they can still pile up and need to be closed after the screen's unlocked.
 
27
 
 
28
^^ this is obviously not a final list. more will be added soon.
 
29
 
 
30
possible problems:
 
31
-the API isn't designed for constraints changing at runtime. does anyone think that's likely to matter someday?
 
32
-I have no idea how this will affect alien widgets (google gadgets etc). personally I'd be fine with banning those from the screensaver until proper, full security can be implemented.
 
33
 
 
34
 
 
35
trust-based security
 
36
--------------------
 
37
 
 
38
gpg signing of plasmoids
 
39
 
 
40
 
 
41
enforced security
 
42
----------------
 
43
 
 
44
This is security that doesn't rely on plasmoid developers. Mostly it's about disabling access to features via the scripting API, so that plasmoids using that API absolutely cannot use the disabled features.
 
45
 
 
46
it'd be nice if we could use KAuthorized to enforce some stuff on the c++ applets... I tried, but didn't get anywhere.
 
47
 
 
48
 
 
49
misc
 
50
----
 
51
 
 
52
I'm not sure what categories these fall under.
 
53
 
 
54
category exclusion: entire categories of plasmoids can be excluded from hte appletbrowser. for example, application launchers are excluded from the screensaver because they'd never ever be wanted there.
 
55
 
 
56
configuration locking: on the screensaver, config dialogs can't be accessed while the screen is locked. however, it's possible for a c++ plasmoid to override showConfigurationInterface and circumvent this.
 
57