Security: Permits
|
Example
|
Permits are the object which the client code requested, and therefore
require careful handling. They should never be stored in a public or
protected variable.
Permits are rarely the actual implementation of some right, but are
typically forwarders to an implementation in another object. For
example, in the JECF database, the ability to read a row in a table
and the ability to write a row in a table are both implemented in a
private class. Access to the implementation from outside the
TableImplementation is granted by a pair of objects named ReadTablePermit
and WriteTable Permit. These permits follow the Delegater pattern [GHJV95]
to the actual implementation object. Both the permits and the implementation
are in the same package. The implementation, however, will only have package
private constructors. So the client package will need to obtain the
a permit to have useful access to the implementation.
You can see why Java's inherent security mechanisms are so
important to the implementation of the Gateway Security Model.
- Java Objects to be unforgeable,
- Java's language visibility rules for private and package-private
scope provide address space-like protection against unauthorized
access
The only missing component is some form of authorization method
to allow or deny access.
Return to Tracks