ostore.tapestry.api
Class TapestryMacRouteMsg

java.lang.Object
  |
  +--ostore.tapestry.api.TapestryRouteMsg
        |
        +--ostore.tapestry.api.TapestryMacRouteMsg
All Implemented Interfaces:
QueueElementIF, QuickSerializable

public abstract class TapestryMacRouteMsg
extends TapestryRouteMsg

Messages sent from one OceanStore machine to any other, which are guarenteed to have come from the listed sender. To send a message from one OceanStore machine to any other, one simply inherits from this class, filling in the proper serialization code for the inherited class's data. (The Tapestry stage will take care of the fields in this class itself.)

Implementation-wise, this is simply a route-to-root operation, with a MAC concatenated to the message.

Messages with MACs that do not verify correctly will not be dispatched within the machine. The old Tapestry interface allowed messages with failing MACs to be dispatched, on the assumption that they might still contain useful information. I have since come to believe that such an interface will invariably lead to security holes; it is simply too easy to forget to check whether the MAC was correctly verified before reading the message. If the same functionality is still desired, we can add a new event to the API for it--something like TapestryUnVerifiedRouteMsg.

For the same reason, this message is an different type than TapestryRouteMsg. I do not want to give clients of this interface the opportunity to fail to check whether each message included a MAC or not. It is generally the case that a certain message type must always be MAC'ed, or it should never be. I have yet to see a case where either option fit a single message.


Fields inherited from class ostore.tapestry.api.TapestryRouteMsg
hopCount, inbound, peer, qos, TTL
 
Constructor Summary
protected TapestryMacRouteMsg()
          Empty constructor.
protected TapestryMacRouteMsg(InputBuffer buffer)
           
  TapestryMacRouteMsg(SecureHash peer)
          Construct with the given destination.
 
Methods inherited from class ostore.tapestry.api.TapestryRouteMsg
serialize
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TapestryMacRouteMsg

public TapestryMacRouteMsg(SecureHash peer)
Construct with the given destination. Use for new outbound messages.

TapestryMacRouteMsg

protected TapestryMacRouteMsg()
Empty constructor. For use by derived types when reconstructing themselves from a byte array.

TapestryMacRouteMsg

protected TapestryMacRouteMsg(InputBuffer buffer)