object key encoding



Hi there,
	I have a patch that implements persistent references, but
the encoding of the object_key presents problems.

At the moment the object key is encoded as follows..

If the object is in the Active Object Map, i.e. the object is active :

      +-----+-----------+--------+------------------+
      | POA |    POA    | objnum |  Active Object's |
      | Id  | rand_data |        |    rand_data     |
      +-----+-----------+--------+------------------+
      0     4           12       16                 24

If the object is not yet active :

      +---------------------------------------------+
      | POA |    POA    | - oid  |      Object      |
      | Id  | rand_data | length |        ID        |
      +-----+---------------------------------------+
      0     4           12       16                 16 + oid
                                                    length

(Note this is assuming that ORBIT_RAND_KEY_LEN is 8)

This falls down in the following ways :

   o Because an active object's identity is also verified using a
rand_data field, if that object is de-activated and then re-activated,
the servant cannot be located.

   o The POA is always located using the POAId, an index into a flat
representation of the POA hierarchy. With Persistent references it
should be possible for another POA (in a different process) with the
same full name to be located. This is not possible with the POAId
because the POA hierarchy may be constructed in a different order.

   o The POA identity is verified using the rand_data field. Again it
is not possible for a different POA with the same name to have the
same rand_data field.

How about something like this :

For persistent references :

   +-------------+----------------+--------+------------------+
   |  POA full   | Zero Seperated |  oid   |      Object      |
   | name length | POA full name  | length |        ID        |
   +-------------+----------------+--------+------------------+
   <---- 4 -----><- name length -><-- 4 --><--- OID length --->

For transient references :

   +-------------+----------------+--------+------------------+
   |    POA      |      POA       |  oid   |      Object      |
   |    Id       |   rand_data    | length |        ID        |
   +-------------+----------------+--------+------------------+
   <---- 4 -----><------ 8 ------><-- 4 --><--- OID length --->

	I'm pretty sure there is uniqueness or security problems with
this - but what are the problems?

	I'm just thowing this out there for comments. Also the FAQ
mentions an -ORBIPv4Port option - so were persistent references
implemented previously?

Good Luck,
Mark.





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]