NSS Shared DB: Difference between revisions

Jump to navigation Jump to search
Line 88: Line 88:
This design assumes that new NSS init functions will be defined for applications wanting to do 'standard user initialization', rather than building special knowledge into softoken or the database model. Note: This is different from the 2001 design, or and earlier prototype shared database, where the database code knew the location of the shared database.
This design assumes that new NSS init functions will be defined for applications wanting to do 'standard user initialization', rather than building special knowledge into softoken or the database model. Note: This is different from the 2001 design, or and earlier prototype shared database, where the database code knew the location of the shared database.


==== Other issues ====
==== Database Upgrade ====


<font color=red> Review Input Requested: Question, should we 'mark' old cert8/key3 databases as having been used to upgrade the shared database? </font>
NSS will automatically upgrade from old databases to new databases if the following conditions are met:
# The application (either explicitly or implicitly) opens an sql style database read write.
# The sql database does not exist.
# A legacy dbm database exists in the same directory of the sql database.
# The application logs into the softoken (supplies the database password for the existing legacy database). If there is no password this condition is met automatically.


The issue here is applications that were once separated, but now combined. It would be nice if the keys and certs in each of these databases were properly merged into the overall shared database.
This upgrade handles the initial case where applications want to get the new features of the new database, but not necessarily want to participate in any sharing scheme.


Upgrade itself is an issue. Do we want to support automatic upgrade (as we do today for older cert db types), or do we want to supply the application with an upgrade tool. The complication comes when we need to upgrade multiple old databases into a new one.
A more natural tact an application may take is move from it's own database instance to a common database instance, shared among several applications. In this case, the application will need to participate in the database upgrade, as it may be necessary to actually merge entries from several databases. In this case NSS will provide services for the application to determine if the shared database it opened had already been updated by the application itself. If not, NSS will provide the application with a function (to be defined), which will read records from the old database and merge them into the new database. NOTE: we may need a couple of functions here to allow recoding such things as passwords encoded with sdr keys which the application may have.


==== Layering ====
==== Layering ====
439

edits

Navigation menu