Agent.mesa
Last modified by D. Swinehart, August 31, 1983 9:20 am
Provides in RPC a number of services that are currently otherwise provided by other protocols, or not yet at all.
Clients may bind to this interface using broadcast binding techniques; all servers that support broadcast binding must export an equivalent Agent interface.
DIRECTORY
DESFace USING [ Key ],
RPC USING [ matchAllVersions, ShortROPE, VersionRange ],
RPCPkt USING [ Machine ];
Agent: DEFINITIONS = {
Authenticate: A "Needham-Schroeder" Authentication Service for RPC
Clients may call Authenticate using a "clear" conversation, since all needed
security is provided by encryption of the authentication data.
Authentication: TYPE = LONG POINTER TO AuthenticationRecord;
for A talking to B using key CK, contains:
{KX}KA, spare, { {CK}KA, spare, nonce, B }KX .
The keys are single cipher blocks.
The rest is encrypted with CBC-check using a zero IV
-- Intended to be returned along with an authenticator, also encrypted under KX (!) --
AuthenticationRecord: TYPE = MACHINE DEPENDENT RECORD [
kx:   DESFace.Key,
kxSpare: DESFace.Key,
ck:   DESFace.Key,
ckSpare: DESFace.Key,
nonceId:  LONG INTEGER,
String Body for b
b: CARDINAL, -- length
bText: PACKED SEQUENCE maxLength: CARDINAL OF CHAR
];
Authenticator: TYPE = LONG POINTER TO AuthenticatorLayout;
This is extracted from RPCSecurity, since it is not in any RPC Definitions
for A talking to B using key CK, contains:
{KY}KB, spare, { {CK}KB, spare, time, A }KY .
The keys are single cipher blocks.
-- The rest is encrypted with CBC-check using a zero IV --
AuthenticatorLayout: TYPE = MACHINE DEPENDENT RECORD[
ky: DESFace.Key,
kySpare: DESFace.Key, -- space for larger keys! --
ck: DESFace.Key,
ckSpare: DESFace.Key, -- space for larger keys! --
time: LONG CARDINAL,
-- String body for a --
a: CARDINAL, -- length
aText: PACKED SEQUENCE maxLength: CARDINAL OF CHAR
];
Principal: TYPE = RPC.ShortROPE;
Returns results in two arguments because each contains a variable-length sequence.
Authenticate: PROC [nonceId: LONG INTEGER, a, b: Principal ]
RETURNS [
an: Frob -- an encrypted authentication record--,
ar: Frob -- an encrypted authenticator record-- ];
-- Length fields in authentication records will be encrypted! --
Frob: TYPE = REF FrobRecord;
FrobLength: TYPE = [0..64); -- Prevents Frob-containing packets from getting too large --
FrobRecord: TYPE = RECORD [
s: SEQUENCE length: FrobLength OF WORD ];
Vitae: Uses standard and Thrush-specific values, along with defaults in Agent's user.profile, to provide a C RPC-based system with all that it needs to reach the desired server with the right authentication and so forth (in conjunction with a call to Authenticate.) It is assumed that the Teledeb program downloaded the proper program, and started it in the right mode.
Failure to find an instance for the specified interface is indicated by a serverInstance value of NIL and a serverMachine value of [0,0] .
Vitae: PROC[
clientMachine: RPCPkt.Machine, -- Lark or other machine with GV database entry
range: RPC.VersionRange←RPC.matchAllVersions, -- acceptable versions
interfaceType: RPC.ShortROPE] -- e.g., LarkSmarts.Lark
RETURNS [
serverMachine: RPCPkt.Machine, -- e.g., 3#333# in binary form, used by C RPC to bind
clientRname: Principal, -- client machine's own RName (e.g., Swinehart.pa.lark)
clientInstance: RPC.ShortROPE, -- e.g., "Skylark" or "173#100#"
serverInstance: RPC.ShortROPE -- e.g., "Morley.Lark", corr. to "LarkSmarts.Lark", NIL if none
This value should also be used as the server Rname in authentication contexts (e.g., as the variable "b" in Agent.Authenticate)
];
}.