DIRECTORY BasicTime USING [ GMT, nullGMT ], LoganBerry USING [ Entry ], Rope USING [ ROPE ], RPC USING [ EncryptionKey ] ; NameDB: CEDAR DEFINITIONS = { ROPE: TYPE = Rope.ROPE; AttributeSeq: TYPE = LoganBerry.Entry; Authenticity: TYPE = ATOM; -- { $unknown, $authentic, $bogus, $nonexistent, $perhaps }; GetAttributes: PROC[rName: ROPE, key: ATOM¬$rname, dbType: ATOM ¬ $white] RETURNS [value: AttributeSeq]; GetAttribute: PROC [ rName: ROPE, attribute: ATOM, default: ROPE¬NIL, key: ATOM¬$rname] RETURNS [value: ROPE]; IsAuthenticated: PROC[rName: ROPE] RETURNS [authenticity: Authenticity]; Authenticate: PROC[rName: ROPE, key: RPC.EncryptionKey] RETURNS [authenticity: Authenticity]; SetAttribute: PROC [rName: ROPE, attribute: ATOM, value: ROPE]; SetAttributeTimed: PROC [ rName: Rope.ROPE, attribute: ATOM, value: Rope.ROPE, time: BasicTime.GMT¬BasicTime.nullGMT, interval: INT¬0]; Error: ERROR [ec: ATOM, explanation: Rope.ROPE ¬ NIL]; }. t NameDB.Mesa Copyright Σ 1987, 1992 by Xerox Corporation. All rights reserved. Last modified by Swinehart, June 4, 1992 10:26 am PDT Name database functions. Extends a LoganBerry database to include: Automatic choice of database, given a key Dynamic merging of several databases to satisfy queries Automatic caching of Grapevine-supplied information (for connect sites and keys) Several databases contain telephone numbers, Etherphone system mappings, user authentications, RPC connect-side caches, etc. Some of this information comes from outside locations, some from locally-maintained values, some from caching Grapevine entries. Some of the queries below will select the proper database, sometimes searching more than one. The update operations do some validation and then select the right database to update. Other functions require a database specification. Keys are stored in encrypted form. This allows the user who knows a key to validate it quickly (once it's in the database), without revealing it to others. Queries for connect sites and key validations are followed up with the corresponding Grapevine requests, to keep the cache current. But the queries are answered immediately, when possible. As of March 24, 1987, there were three distinct LoganBerry databases, with the following keys: whitePages: logs produced from existing PARC/DSBU telephone databases. rname: Swinehart.pa (primary key) name: Swinehart, Dan (secondary key) fnm: 794634278172 (secondary key -- feep name) rgnm: pa.Swinehart (secondary key -- registry first) fstnm: Dan Swinehart (secondary key -- first name first) officenumber: 8*923-4473 bluePages: logs produced from existing PARC/DSBU telephone databases. rname: Swinehart.pa (primary key) larkhost: 173#155# (secondary key) [these two together relate workstationhost: 3#333# (secondary key) user to default Lark to default Workstation ] dotune: both instance: Strowger.Lark interface: LarkSmarts.Lark mode: O multiring: 40 program: LarkB ringmode: S ringtune: @300;*%/%+g-G%-G->*C+/%/EDEDEDCD**e+//%F**edC@2400;% N.B. larkhost and workstationhost must be unique; SetAttribute must clear these attributes from any previous entry before entering them anywhere else. redPages: logs produced as cache of Grapevine entries (RPC instances and authenticated indivs.) rname: Swinehart.pa (primary key) key: 32107654321B 54321076543B rname: Curie.lark (primary key) connect: 3#30# key: 33563155214B 12112115367B As a return from GVAuthenticate or GVIsAuthenticated, unknown indicates system/communications failure; perhaps indicates that the RName exists, but no one has demanded authentication. nonexistent indicates that the RName doesn't exist authentic and bogus denote the results of an authentication attempt. This is experimental. If the key is not $rname, the key will be used to determine which database to query to obtain the corresponding $name. If the specified attribute (for GetAttribute) is in a different database, the process will be repeated. GetAttributes repeats the process for all databases to produce a merged set of attributes and values. The authentication and HostFromInstance routines only accept rNames as arguments, at present. Returns a list of [$attributeName, attributeValue] pairs. dbType is $white, $blue, or $red, corresponding to the three databases described above. Look up entry as specified key, then obtain the specified attribute. Default if rName or attribute not found. rName is a misnomer if key # $rname. This is of questionable value. The first time around, anyhow, the answer could be based on arbitrarily old information. Supply the key to Grapevine, and remember the results. Once authenticated, one remains authenticated until the name is forgotten. Authenticity is retained over local cache saving and restoration. The key is stored in an encrypted form, for security. key is always $rname. NIL value deletes the attribute. Produces a temporary value for the attribute, which will expire after