Yes, I know that this is a common way to think. What
bothers me is
this (from a naive point of view):
- security should not something which is only be added (thats the
nature of decoration), because what was added can also be removed or
forget to add.
Well, as soon as the unix security package is loaded, the security
decoration adds itself automatically to all newly created structures.
There is no easy way, except by manually editing the object-graph
from the inspector, to add or remove security decorations.
It seems more natural to me that security is deep in
the mechanism of objects (or better message send), like the vats in E
or Islands in Croquet.
In my opinion this is something different. I want to keep as much as
possible pluggable in Pier, so that users with different needs can
use different security systems. There are already two security
frameworks that both work nicely, that both have advantages and
disadvantages, and that every user can decide to use or not to use.
- if one say model or buisness logic, one could easily
think at the
multi tier architectures. Here it is a common way to say, security
must handled be the database objects (for example), not by the
objects which are only a viewer. My problem is 1) that these viewers
are mediators of security and 2) that in complex systems this
viewers can be itself complex object with model-view architecture.
In Pier the security is not handled by the view, but by the model.
That is also the reason why it works in the Seaside view and in the
OmniBrowser view without additional code.
From this I would naively think, that looking at
security of
buisness logic objects is not enough, or in other words, the
partitioning in model-view is not unambiguous and (in some way)
fractal. BTW, thats one point why I like Tweak, because it's
architecture adresses this problem.
Yeah, this is true for Pier. Some logic had to be duplicated in
different views, because the (meta-)model (Magritte) is unable to
handle it in a generic way, e.g. when rendering links to HTML or a
pretty printed Text-Stream I have in both cases to manually check the
permission to be able to render the link disabled, however even it
would not be rendered disabled users would be unable to navigate
there because this would activate an invalid-context and the context
is part of the model.
Hope this clarifies some things,
Lukas
Side-note: I do not claim that the security model of Pier is secure
and impossible to break, as with everything I write as open-source it
suits my personal needs. Bug-reports, fixes and enhancements are
always welcome.
--
Lukas Renggli
http://www.lukas-renggli.ch