Making What You Want to Do Easy
If the access matrix was static, there wouldn’t be much more to say about the
differences. However, you do need to make changes to get your work done. Alice
would like Carol to edit File2, and Carol would like Dave to help her. When the work is
done, Alice would like to remove Carol’s permission. !
A big problem with ACLs is that the model doesn’t include updates to the access
matrix. New mechanisms had to be added. That’s why Linux has the concept of root,
a special user with the ability to change ACL entries.!
Alice has to find someone with root privileges in order to give Carol read and write
permission to File2. One problem is that the audit log shows that root made the
change. Nowhere does it say the change was made because Alice asked. When Alice
asks root to revoke Carol’s permission, how does root know whether or not Alice has
that permission? The answer is not part of the ACL model.!
There’s another problem. Carol asks the root user to give Dave read permission to
File2, and root will almost certainly do that, since Carol has read permission. The
problem comes when Alice revokes Carol’s permission. There’s nothing to say that
Dave’s permission should be revoked too. If you don’t, Dave could give permission
back to Carol, subverting Alice’s revocation request.!
Sure, you say, but at least root has ultimate control over these delegations. In fact, that
control is an illusion. If root refuses Alice’s request, and Alice thinks it’s really
important, she’ll just share her credentials with Carol. Now, you’ve got worse security,
because Carol has all of Alice’s permissions when she only needs one of them. All of
this has become so complex as to be completely unmanageable. !
Using capabilities makes it all simple. I’ll use some pseudo code to illustrate.!
main() {!
let a = A::new(); // a is an object reference and a capability!
let b = B::new(a); // capability b has a capability to a!
}!
The variable a is an object reference. In a language like C or C++ that has pointer
arithmetic, a is not a capability because it’s not unforgeable. In a memory safe
language, such as Java or JavaScript, a is a capability.!
The next snippet shows delegation.!