3.1.1 Abstract Data Model

This section describes a conceptual model of possible data organization that an implementation maintains to participate in this protocol. The described organization is provided to facilitate the explanation of how the protocol behaves. This document does not mandate that implementations adhere to this model, as long as their external behavior is consistent with that described in this document.

Clients of the User Name Mapping Protocol can maintain copies of user mappings (and group mappings) enumerated from the server. Clients can use the DUMPALLMAPSXXX_PROC procedures to enumerate all individual maps from the server. The server treats account mappings as an unordered array of mapping records of total count equal to TotalMappingRecordCount, as explained in sections 2.2.3.1 and 2.2.3.3. The index of records begins at zero, and MappingRecordCount indicates the number of map records returned by the server in the current RPC response packet.

Clients can cache CurrentVersionTokenHighPart and CurrentVersionTokenLowPart values returned by the DUMPALLMAPSXXX_PROC response to implement cache consistency. Cache consistency is implemented on clients by periodically polling the server's GETCURRENTVERSIONTOKEN_PROC procedure to know when to refresh their locally cached copies of mappings.

As an alternative to the enumeration request (DUMPALLMAPSXXX_PROC), the clients can cache the results of individual account lookup requests and use GETCURRENTVERSIONTOKEN_PROC to know when to refresh their locally cached copies of mappings.

Clients of the User Name Mapping Protocol are at liberty to implement caching and persistence in any way they please. The User Name Mapping Protocol server functions as a read-only lookup service of account mappings.

The following figure shows the data model for a client of the User Name Mapping Protocol.

User Name Mapping Protocol data model: Client

Figure 1: User Name Mapping Protocol data model: Client

There are three elements in the model: MapCache, MapRecord, and CurrentVersionToken.

MapCache: The MapCache element models the information that the client has collected from the server by enumerating maps using the DUMPALLMAPSXXX_PROC. The MapCache element contains a list (or array) of MapRecord elements, each of which describes the mapping between a Windows and a UNIX account.

MapRecord: The MapRecord element models the information for a single Windows-to-UNIX user account mapping or group account mapping. It contains the UNIX account name and UID, a GID, and the supplementary GID details that correspond to a Windows account name and domain.

CurrentVersionToken: This element models the version of the cache as a whole. This element is guaranteed by the server to be different for different versions of the MapCache. Clients can use this element to implement cache consistency with respect to the server by periodically polling this token by using the GETCURRENTVERSIONTOKEN_PROC procedure.