Work in progress

This site is in the process of being reviewed and updated.

Introduction

We need a way to store OIDs and associated names, with some methods to access them. This will be available from everywhere in the server, so we have to facade it with a class.

The relation bewteen OIDs and names is shown by the following schema :


Basically, OIDs and names are unique, while a name is always associated with a single OID but an OID may have more than one name (for instance, cn and CommonName have the same OID, which is : 2.5.4.3 )

The  needed access methods are the following :

  • register( name, oid ) -> void : add a relation between this OID and a name
  • register( names, oid ) -> void : add a relation wetween this OID and a List of names (or a Set of names)
  • getOid( name ) -> String : returns the OID associated with a name
  • getOids() -> List : returns all the registred OIDs as a List
  • getOidSet() -> Set : returns all the registred OIDs as a Set
  • getName( oid ) -> String : returns the principal name of an OID. The principal name is conventiannaly the first registred name
  • getNames( oid ) -> List : returns a list of names associated with an OID
  • getNameSet( oid ) -> Set : returns a set of names associated with an OID
  • getNames() -> List : returns all the registred names as a List
  • getNameSet() -> set : returns all the registred names as a Set
  • exists( id ) -> boolean : tells if this oid or the name is registred

Implementation

Has we must provide fast access to all the elements, we will have to store them in hashed structures. They don't change very often (actually, they don't change at all (smile), and we don't have a lot of this kind of object, so we can balance toward performance against memory consumption.

We will use :

  • a map to store OIDs and which returns either a list of names or a single name (if the primary name is asked for, we return the first element of the list)
  • a map to store names and which returns the associated OID

We don't need anything else. getting all the OIDs or all the names will be done using the maps, because this is not an operation that is very frequently used.

These maps will be initialized when the server is launched, by reading the schema files and the static definitions (those that are necessary for the server to boot).

We won't do anymore a distinction between BootstrapOidRegistry and GlobalOidRegistry.

The following picture shows what will be the new inheritence scheme in ADS 1.5 ( we will remover the GlobalOidRegistry ) :.

  • No labels