Inside Java™ 2 Platform Security: Architecture, API Design, and Implementation, Second Edition
by Li Gong, Gary Ellison, Mary Dageforde
9.11. Guarding Objects
Apart from SignedObject, which provides object authenticity, J2SDK 1.2 introduced an interface, java.security.Guard, and a class, java.security.GuardedObject, that may be used for object-level access control. A GuardedObject is used to protect access to another object. A GuardedObject encapsulates a target object and a Guard object. Once a target object is encapsulated by a GuardedObject, access to that object is controlled by the getObject method. This method invokes the checkGuard method on the java.security.Guard object that is guarding access. If access is allowed, checkGuard returns silently; if access is not allowed, it throws a SecurityException. A GuardedObject and protection of access to the target object via ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access