DIRECTORY AuthenticationP14V2 USING [CallProblem, Credentials, CredentialsType, HashedPassword, Key, Problem, Verifier, Which], BasicTime USING [GMT], CHNameP2V0 USING [Name], Rope USING [ROPE], XNS USING [Host] ; XNSAuth: CEDAR DEFINITIONS ~ { OPEN Auth: AuthenticationP14V2, CHName: CHNameP2V0; ROPE: TYPE ~ Rope.ROPE; GMT: TYPE ~ BasicTime.GMT; Name: TYPE ~ CHName.Name; HostNumber: TYPE ~ XNS.Host; CredentialsType: TYPE ~ Auth.CredentialsType; Credentials: TYPE ~ Auth.Credentials; Verifier: TYPE ~ Auth.Verifier; HashedPassword: TYPE ~ Auth.HashedPassword; Key: TYPE ~ Auth.Key; AuthenticationError: VAR ERROR [problem: Auth.Problem]; Problem: TYPE ~ Auth.Problem; CallError: VAR ERROR[problem: Auth.CallProblem, whichArg: Auth.Which]; CallProblem: TYPE ~ Auth.CallProblem; Which: TYPE ~ Auth.Which; Identity: TYPE ~ REF; MakeIdentity: PROC[name: Name, password: ROPE, credentialsType: CredentialsType _ strong, check: BOOL _ TRUE] RETURNS [identity: Identity]; MakeStrongIdentityUsingKey: PROC[name: Name, key: Key, check: BOOL _ TRUE] RETURNS [identity: Identity]; DestroyIdentity: PROC [identity: Identity]; GetNullIdentity: PROC RETURNS [identity: Identity]; Conversation: TYPE ~ REF; defaultCredentialsLifetime: CARD ~ (120*60); Initiate: PROC [identity: Identity, recipientName: Name, seconds: CARD _ defaultCredentialsLifetime] RETURNS [conversation: Conversation]; Refresh: PROC [conversation: Conversation, seconds: CARD _ defaultCredentialsLifetime]; Terminate: PROC [conversation: Conversation]; GetCredentials: PROC [conversation: Conversation] RETURNS [credentials: Credentials]; SetRecipientHostNumber: PROC [conversation: Conversation, recipientHostNumber: HostNumber]; GetNextVerifier: PROC [conversation: Conversation] RETURNS [verifier: Verifier]; ReplyVerifierChecks: PROC [conversation: Conversation, verifier: Verifier] RETURNS [ok: BOOL]; Authenticate: PROC [myIdentity: Identity, hisCredentials: Credentials, hisVerifier: Verifier, allowSimpleCredentials: BOOL _ FALSE, useExpiredCredentials: BOOL _ FALSE] RETURNS [hisName: Name]; AuthenticateAndReply: PROC [myIdentity: Identity, hisCredentials: Credentials, hisVerifier: Verifier, useExpiredCredentials: BOOL _ FALSE] RETURNS [hisName: Name, replyVerifier: Verifier]; CreateStrongKey: PROC [myIdentity: Identity, name: Name, newKey: Key]; DeleteStrongKey: PROC [myIdentity: Identity, name: Name]; CreateSimpleKey: PROC [myIdentity: Identity, name: Name, newKey: HashedPassword]; DeleteSimpleKey: PROC [myIdentity: Identity, name: Name]; ChangeMyPasswords: PROC [myIdentity: Identity, newPassword: ROPE, changeStrong: BOOL _ TRUE, changeSimple: BOOL _ TRUE]; ChangeMyStrongKey: PROC [myIdentity: Identity, newKey: Key]; ChangeMySimpleKey: PROC [myIdentity: Identity, newKey: HashedPassword]; StrongKeyFromPassword: PROC [password: ROPE] RETURNS [key: Key]; SimpleKeyFromPassword: PROC [password: ROPE] RETURNS [HashedPassword]; GetCredentialsType: PROC [credentials: Credentials] RETURNS [CredentialsType]; GetConversationDetails: PROC [conversation: Conversation] RETURNS [ recipientName: Name, recipientHostNumber: HostNumber, credentials: Credentials, conversationKey: Key, owner: Identity]; GetIdentityDetails: PROC [identity: Identity] RETURNS [ name: Name, password: ROPE, credentialsType: CredentialsType]; GetCredentialsDetails: PROC [myKey: Key, hisCredentials: Credentials] RETURNS [ ok: BOOL, credentialsType: CredentialsType, conversationKey: Key, expirationTime: GMT, hisName: Name]; }. ΈXNSAuth.mesa Demers, November 20, 1986 9:17:17 am PST Introduction This interface is copied almost verbatim from Services 8.0. Refer to the Services 8.0 Prograammer's Guide for details. See also the Courier Authentication program, version 2 (XSIS 098404). Copied Types Errors Nearly every procedure in this interface will raise ERROR ERROR if given a NIL or bogus Identity or Conversation. The following ERRORs are "inherited" from the Courier program. _ Auth.AuthenticationError; _ Auth.CallError; Identities An Identity consists of a pair and some cached information. You need an identity to initiate a conversation with a server. The correct way to get an identity for the currently logged in Cedar user is to call UserCredentials.GetIdentity  this returns a single identity that is shared among all clients (and so is guaranteed to have a big cache of initiator credentials as described below) and is guaranteed to be destroyed on rollback. For other uses  e.g. Cedar-based servers  identities can be created and destroyed with the following procedures. Create an identity. Each call creates an independent identity, with an independent cache of conversations. For efficiency, processes should share a single identity whenever possible rather than use separate identities. The simple CredentialsType is intended for things like typewriters that aren't smart enough to do DES encryption; its use in Cedar is discouraged. ERRORS: AuthenticationError, CallError (only if check is TRUE). Destroy the identity, making it (and any conversations created with it) unusable by anybody else with a REF to it. Don't call DestroyIdentity unless that's really what you want  it's safe just to drop the identity on the floor. ERRORS: None. Returns a "null" identity  a simple identity with a null user name and password. A few services/operations are willing to accept this. Initiator A Conversation contains credentials that identify me (the initiator of the conversation) to a specific conversant (the recipient of the conversation). Conversations are cached per identity. Create a conversation for the specified recipient. The credentials in the conversation are guaranteed not to expire before seconds have elapsed. ERRORS: AuthenticationError, CallError (for strong identities); None (for simple identities). Guarantee the credentials in conversation won't expire before seconds have elapsed, . A new set of strong credentials doesn't expire for a long time (~ a day), and simple credentials never expire. Thus, for reasonable values of seconds, calling Refresh is essentially free. ERRORS: AuthenticationError, CallError (for strong conversations); None (for simple conversations). It's okay to drop a conversation on the floor, but calling Terminate gets it back into the conversation cache sooner. ERRORS: None. Extract credentials from a conversation. ERRORS: None. The recipient host number is used in constructing strong verifiers. For strong credentials, SetRecipientHostNumber must be called before calling GetNextVerifier. ERRORS: None. ERRORS: None. ERRORS: AuthenticationError[inappropriateCredentials] if simple credentials are used; any other problems just return FALSE. Recipient Test whether hisCredentials and hisVerifier are legitimate. myIdentity must be strong unless hisCredentials are known to be simple  it is possible to authenticate his simple credentials with my strong identity, but not the other way around. If useExpiredCredentials is true, the expiration date on his strong credentials is not checked (simple credentials never expire). ERRORS: CallError (for simple credentials only); AuthenticationError (for simple or strong credentials). Like Authenticate, but compute a reply verifier as well. myIdentity and hisCredentials must be strong (reply verifiers don't make sense with simple credentials). ERRORS: AuthenticationError. Key and password administration For all the following procedures, myIdentity must be strong. The Create... and Delete... procedures require that myIdentity be an Authentication Service Wheel. ERRORS: AuthenticationError, CallError. Utilities ERRORS: None. If hisCredentials are simple, myKey is not used and the returned conversationKey and expirationTime are uninteresting. Κω˜™ J™(—Icode˜šΟk ˜ Kšœœ\˜uKšœ œœ˜Kšœ œ˜Kšœœœ˜Kšœœ˜Kšœ˜—šΟnœœ ˜K˜Kšœžœžœ ˜3head™ Iblock™Ύ—™ Kšœœœ˜Kšœœ œ˜Kšœœ˜Kšœ œœ˜K˜Kšœœ˜-Kšœ œ˜%Kšœ œ˜Kšœœ˜+Kšœœ ˜K˜—™Kšœ4œœ œ#™qK™K™>K˜šžœ œ˜7Kšœ™—Kšœ œ˜K˜šž œ œ2˜FK™—Kšœ œ˜%Kšœœ˜—™ K™ΊK˜Kšœ œœ˜Kš ž œœœ4œœœ˜‹š žœœœœœ˜hKšœά™άKšœ’™’Kšœ3œ™?—K˜šžœœ˜+KšœžœW™εKšœ™ K˜—šžœœœ˜3K™ˆ——™ K™ΎK˜Kšœœœ˜Kšœœ ˜,K˜šžœœ4œœ˜ŠK™‘KšœW™]K˜—šžœœ'œ˜WKšœ“™“Kšœ]™cK˜—šž œœ˜-Kšœu™uKšœ™ K˜—šžœœœ˜UK™(Kšœ™ K˜—šžœœ?˜[Kšœ’™’Kšœ™ K˜—šžœœœ˜PKšœ™ K˜—šžœœ2œœ˜^Kšœoœ™{——™ šž œœdœœœœœ˜ΑKšœυ™υKšœb™hK˜—š žœœcœœœ*˜ΌKšœ’™’Kšœ™——™K™ Kšœ!™'K˜Kšžœœ1˜FKšžœœ$˜9K˜Kšžœœ<˜QKšžœœ$˜9K˜Kšžœœ%œœœœœ˜xKšžœœ%˜