security documentation
[kdebase.git] / workspace / plasma / design / security
blobdcfa2ed2824673c0cfad65ca4ad66e7f6f2a4ab4
2 three types of security:
3 -co-operative
4 -trust-based
5 -enforced
7 co-operative security
8 ---------------------
10 this is fairly basic security for plasmoids.
11 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 isAllowed() and turn it off when it's not allowed.
12 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. Example: X-Plasma-Requires-FileDialog=true.
13 Features the plasmoid would like but does not require should be guarded by isAllowed. [example](http://websvn.kde.org/trunk/KDE/kdeplasma-addons/applets/comic/comic.cpp?r1=934858&r2=935224).
14 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.
16 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.
17 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.
19 Existing constraints:
20 -FileDialog. When this is in effect, use of open or save dialogs is forbidden. Reason: users can delete files from there and cause all kinds of havoc.
22 ^^ this is obviously not a final list. more will be added soon.
24 possible problems:
25 -the API isn't designed for constraints changing at runtime. does anyone think that's likely to matter someday?
26 -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.
29 trust-based security
30 --------------------
32 gpg signing of plasmoids
35 enforced security
36 ----------------
38 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.
40 it'd be nice if we could use KAuthorized to enforce some stuff on the c++ applets... I tried, but didn't get anywhere.
43 misc
44 ----
46 I'm not sure what categories these fall under.
48 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.
50 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.