> The problem is the number of capabilities I need to deal with. After all,
> my PC has over 60,000 files on it. In the most general case, I need a
> conventional capability for each operation, e.g., read, write, execute,
for
> each file. Some applications, SAP comes to mind, have hundreds or
thousands
> of methods, each of which I might want to control separately.
There are really two issues hiding in this statement: total capability count and manageability.
I think that the total count is not per-se a problem. To expand on your example, your file system on your PC currently *has* 60,000 capabilities, only they are called inodes or vfat entries. Encrypting these entries does not inherently alter any of the issues arising from the number of them you have. Distribution may, and I haven't thought that issue through.
Finally, I think that the "general case of one capability per method" claim
is mistaken, though it's a natural mistake given the way that the literature
has presented capabilities. Contrary to what the historical presentation has
claimed, capabilities do not authorize operations in real systems. I think
that the following is a better way to think about what is going on:
Each object has an interface containing all
of the methods that exist on that object.
For each object, there are some number
While shifting to this model doesn't change your claim in abstract, it does
shift attention in a way that makes clearer why the abstract claim doesn't
matter. Databases may have thousands of methods, but if they *were*
individually controlled the database would have too many interfaces to be an
engineerable software artifact, and the product would soon die for reasons
having nothing to do with capabilities.
of "thinnings" of that interface. For
example, there may be a thinning for
operations that can be performed under
read-only authority.
Each of these thinnings has a corresponding
capability.
> Wildcards are often used to reduce the number of capabilities needed, but
> this approach is dangerous and not general enough. What happens if I put
a
> private file in a directory that has an outstanding wildcard capability
> granting read access to general users?
By wildcard, I assume that you mean wildcard on user identity. This implies a hybrid access control design. I'm not inherently opposed to hybrid systems, except insofar as bastardizing the protection model leads to the kinds of problems you identify (along with a host of others). Wildcards have been used in a few hybrid systems, but not in any capability system, because there is nothing to wildcard *on*.
> We could also
> list all the relevant objects in the capability, but I don't think I want
to
> pass around a capability listing the 50,000 files on my system that you
can
> read.
You seem to be assuming that this is frequently necessary. In my experience it is not. These capabilities can almost invariably be stored in some "directory" object, and then a single capability to the directory object can be generated.
> The repository has an entry containing a number of fields for each
> registered resource. One of these fields is a list of pairs each
> consisting of a reference to an e-speak capability and the access
> rights granted when that capability is presented.
I think this is an interesting design. It's not appropriate in an operating system because of the number of dynamically allocated access records involved, but it has much to recommend it at the language level. A few questions:
> In the case of multilevel security, I can cover
> all cases with only one e-speak capability per
> security level, and each user gets only one
> capability.
I think that this illustrates a flaw, and possibly a fatal flaw. If there is one fundamental advantage to true capabilities, it is that they make exactly this sort of aggregation hard. The aggregation you propose violates the principal of least privilege. Worse, it encourages the construction of programs that violate this principal routinely.
> There's still a problem with the approach you describe. Namely, over time
> I'll accumulate a large number of capabilities. Either I'll have to
present
> them all on each request, in which case the permission checking will take
a
> long time, or I'll need a way to track which ones I need for each request.
> Besides, we can't really use that approach [the directory of capabilities
> approach] in e-speak because of the
> additional latency. The two step process you describe doubles the
latency.
> That's because in e-speak the holder of the strong capability is a
service,
> not an object.
In KeyKOS/EROS it's also a service, though it helps that the systems are not distributed.
Jonathan Shapiro