ArticleslgStudy

computer science

Object-capability model

Object-capability model is a computer science topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand Object-capability model rather than just read about it. In short: The object-capability model is a computer security model. A capability describes a transferable right to perform one (or more) operations on a given object.

Key takeaways

  • Object-capability model belongs to computer science; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect Object-capability model to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of Object-capability model from memory before moving on to harder problems.

Reference excerpt

The object-capability model is a computer security model. A capability describes a transferable right to perform one (or more) operations on a given object. It can be obtained by the following combination:

An unforgeable reference (in the sense of object references or protected pointers) that can be sent in messages. A message that specifies the operation to be performed. The security model relies on not being able to forge references.

Objects can interact only by sending messages on references. A reference can be obtained by: Initial conditions: In the initial state of the computational world being described, object A may already have a reference to object B. Parenthood: If A creates B, at that moment A obtains the only reference to the newly created B. Endowment: If A creates B, B is born with that subset of A's references with which A chose to endow it. Introduction: If A has references to both B and C, A can send to B a message containing a reference to C. B can retain that reference for subsequent use. In the object-capability model, all computation is performed following the above rules. Advantages that motivate object-oriented programming, such as encapsulation or information hiding, modular programming (modularity), and separation of concerns, correspond to security goals such as least privilege and privilege separation in capability-based programming. The object-capability model was first proposed by Jack Dennis and Earl C. Van Horn in 1966.

Loopholes in object-oriented programming languages

Some object-based programming languages (e.g., JavaScript (criticism), Java, and C#) provide ways to access resources in ways other than according to the rules above, including the following:

Direct assignment to the instance variables of an object in Java and C#. Direct reflective programming (reflection) inspection of the meta-data of an object in Java and C#. The pervasive ability to import primitive modules, e.g., java.io.File that enable external effects. Such use of undeniable authority violates the conditions of the object-capability model. Caja and Joe-E are variants of JavaScript and Java, respectively, that impose restrictions to eliminate these loopholes.

Advantages of object capabilities Computer scientist E. Dean Tribble stated that in smart contracts, identity-based access control did not support well dynamically changing permissions, compared to the object-capability model. He analogized the ocap model with giving a valet the key to a car, without giving the right to car ownership. The structural properties of object capability systems favor modularity in code design and ensure reliable encapsulation in code implementation. These structural properties facilitate the analysis of some security properties of an object-capability program or operating system. Some of these, specifically information flow properties, can be analyzed at the level of object references and connectivity, independent of any knowledge or analysis of the code that determines the behavior of the objects. As a consequence, these security properties can be established and maintained in the presence of new objects that contain unknown and possibly malicious code. These structural properties stem from the two rules governing access to existing objects:

1) An object A can send a message to B only if object A holds a reference to B. 2) An object A can obtain a reference to C only if object A receives a message containing a reference to C. As a consequence of these two rules, an object can obtain a reference to another object only through a preexisting chain of references. In short, "Only connectivity begets connectivity."

Glossary of related terms object-capability system A computational system that implements principles described in this article. object An object has local state and behavior. An object in this sense is both a subject and an object in the sense used in the access control literature. reference An unforgeable communications channel (protected pointer, opaque address) that unambiguously designates one object, and provides permission to send messages to that object. message What is sent on a reference. Depending on the system, messages may or may not be first-class objects. request An operation in which a message is sent on a reference. When the message is received, the receiver will have access to any references included in the message. attenuation A common design pattern in object-capability systems: given one reference of an object, create another reference for a proxy object with certain security restrictions, such as only permitting read-only access or allowing revocation. The proxy object performs security checks on messages that it receives and passes on any that are allowed. Deep attenuation refers to the case where the same attenuation is applied transitively to any objects obtained via the original attenuated object, typically by use of a membrane.

Implementations Almost all historical systems that have been described as capability systems can be modeled as object-capability systems. However, some uses of the term capability are inconsistent with the model, such as POSIX capabilities. KeyKOS, EROS, Integrity (operating system), CapROS, Coyotos, seL4, OKL4 and Fiasco.OC are secure operating systems that implement the object-capability model.

Languages that implement object capabilities Act 1 (1981) Eden (1985) Emerald (1987) Trusty Scheme (1992) W7 (1995) Joule (1996) Original-E (1997) Oz-E (2005) Joe-E (2005) CaPerl (2006) Emily (2006) Caja (2007–2021) Monte (2008–present) Pony (2014–present) Wyvern (2012–present) Newspeak (2007–present) Hack (2021–present) Rholang (2018–present)

See also Capability-based security Capability-based addressing Actor model

References

Worked examples

Example 1 — a first encounter with Object-capability model

Start with the simplest possible case. Write down what Object-capability model claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In computer science, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to Object-capability model before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about Object-capability model ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of Object-capability model

In research
Object-capability model appears in computer science research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses Object-capability model in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
Object-capability model is common in secondary-school and first-year university syllabi. It links to neighbouring topics Computer security models, so understanding it makes those chapters shorter.
In everyday life
Look for Object-capability model outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.
Ask Teacher Smith questions about this articleOpens your AI tutor with a question about “Object-capability model” →

How to study Object-capability model in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what Object-capability model means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain Object-capability model out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is Object-capability model in simple terms?

The object-capability model is a computer security model. A capability describes a transferable right to perform one (or more) operations on a given object.

Why does Object-capability model matter?

Because it connects several computer science ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study Object-capability model?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on Object-capability model.

Tags

  • Computer security models

Keep exploring