good chemistry is complicated, and a little bit messy -LW |
|
PerlMonks |
Re: Re: 'Restricted' data, an additional security mechanism for Perl.by rdm (Hermit) |
on Feb 09, 2004 at 08:55 UTC ( [id://327573]=note: print w/replies, xml ) | Need Help?? |
A way to approach this would be to create a pair of facilities - a 'restricted-datasource' and a 'restrict-output'. The first causes any data obatained from that a specified source is 'auto-tainted' (to coin a phrase) - essentially one half of your I/O handle layer. Note that default input operations remain untainted (unless tainted by other means). The second overloads the various output functions, and prevents output of any tainted data (and should throw a compile-time error). The downside of this sort of approach, however, is that you can still fall prey to the '$a=taintsource; $b=$a; print $b;' problem. The only way to prevent that is to move all data into a complex object (that contains sensitivity information along with the data), and write operator/function overloads to operate on that object - as well as a set of new functions to raise/lower the sensitivity of an object. The performance impact is left as an exercise...although it offers the basis for a very secure language - where you could only output data specifically flagged as outputable for that destination. -R
In Section
Meditations
|
|