TSIX(RE) 1.1 SATMP

Security Attribute Token Mapping Protocol

Revision 1.2: August 1, 1996

Introduction

One of the most difficult problems facing Trusted Security Information Exchange for Restricted Environments (TSIX(RE) 1.1) is the need to transport security attributes so that they are understood by both hosts in a network liaison. This is not a straightforward process because there is no standard representation for every possible security attribute used on a network. Any two hosts might use different internal formats for the same attribute, or they might not even define the same attributes within an attribute set: consider, for example, two systems that enforce least privilege based on different privilege sets. When interoperating on a network, how could these systems resolve their privilege differences? TSIX must be able to handle these format differences.

The TSIX Security Attribute Token Mapping Protocol (SATMP) satisfies this need. It allows hosts to reduce security attributes to 32-bit tokens for network transfer, and use the SATMP to agree upon the precise definition of each token. The compact size of the attribute tokens allows them to fit easily within network traffic and facilitates optional attribute caching.

SATMP Architecture

Attribute Representations

There may be many different formats for representing security attributes. We define the following attribute representations in order to clarify the discussions throughout this document:

external representation (ER)
The human readable, ASCII, version of an attribute.
internal representation (IR)
The binary version of an attribute used at the application programming interface. A trusted application that sends or receives attributes via the TSIX protocol stack usually does so by specifying the internal representation to library routines and system calls.
token
A 32-bit, arbitrarily-generated integer that can be mapped to a specific representation of a security attribute. Tokens are used by networked TCBs to indicate the security attributes associated with a network message, while at the same time conserving space and optimizing network performance.
network representation (NR)
A standard format for an attribute, defined by a standards body, a system vendor, or the local administrator, that the local system can map to and from its own internal or external representation.

Attribute Exchange Through Token Mapping

When sending security attribute tokens, the sending system should use the token values native to that system. This is commonly called sender-based token mapping. The sending system may have created these token values itself by acting as its own token server, or obtained them from a network token server. The token values have meaning to the receiving system only if it can map them back into security attributes through an optional cache lookup or an exchange with the token server that created them using the Security Attribute Token Mapping Protocol.

Using the terminology defined in the previous section, attribute transfer between trusted TSIX applications would involve the following series of steps. For any particular implementation of TSIX, some of the steps are null operations. Which operations are not needed depends upon the underlying OS and its native representations for the attributes.

  1. The sending application specifies the attributes in internal representation, using the TSIX API.
  2. After all decision making has been finished and the exchange has been approved by the local system, the internal representations are mapped into attribute tokens. This may be done through a cache lookup or through an SATMP exchange with the host's token server, which is either a local or remote server depending upon system configuration.
  3. The attribute tokens are sent to the destination host in a TSIX Security Attribute Modulation Protocol (SAMP) header which is attached to network messages.
  4. The network message with the SAMP header is received by the destination host.
  5. The tokens associated with the message are mapped back into local internal representation for decision making. This is done through an optionak cache lookup or an exchange with the token server responsible for creating the tokens.
  6. The internal representations are handed to the receiving process using the TSIX API.

    Since the network exchange required for tokenization is a time consuming process, it is strongly recommended that implementations of TSIX SATMP maintain a cache of previously mapped tokens.

    A system may be configured either to create its own token mappings directly, or to defer to some remote token server. Any system that creates its own mappings may also function as a remote token server for other systems. Tokens are mapped over the network using the TSIX Security Attribute Token Mapping Protocol, SATMP, which must be understood by all systems regardless of configuration. Token mapping between systems occurs in two steps:

    1. An initialization handshake between the two hosts in order to agree upon the set of security attributes they include with messages, and the token server responsible for creating token values for each system. If either system is acting as its own token server, the initialization handshake is also used to agree upon the domain of translation (DOT) to use for mapping each attribute. A DOT defines a network representation to use in a token mapping request, and a set of rules for translating between the external or internal representation and the network representation. the security policy to be used with that attribute. The initialization handshake must occur the first time two hosts map tokens. It may, subsequently, be repeated any number of times at the discretion of either correspondent.
    2. Attributes are mapped to tokens or recovered from tokens through a SATMP handshake in which both the client and token server translate to/from the chosen network representation. The token server creates a 32-bit token to represent an attribute, and stores the relationship between the attribute and token for future reference. The rules used by each host to translate to/from the network representation provide the necessary attribute translation between their native formats.

      The transparent translation of security attributes between systems is critical to vendor-independent system interoperability. The ability to transparently translate security attributes depends on the mechanism used to translate the local system's native attribute formats to and from the network_representation specified by a chosen DOT. While the actual mechanism used to perform such translations is an implementation dependency, we describe a number of translation tools designed to handle transparent attribute translations in the TSIX Attribute Translation Tools section. These tools were developed specifically to deal with problems such as:

      • How to map a sensitivity label, (Top Secret Apples Oranges, for example) when the same label implies different levels of protection on two different systems.
      • How to map labels between systems with different compartment sets.
      • How to map privilege sets between different vendor implementations of least privilege.

      Token Mapping Architectures

      The flexibility of the SATMP allows for the intermixing of two token mapping architectures:

      Local Token Server

      This is the most common configuration, where each host locally creates its own mappings between attribute and token, and uses these token values for adding attributes to network messages. If the receiving host does not recognize an attribute token, it uses the SATMP to retrieve the specified attribute from the sender. For optimum performance it is strongly that a token server maintain a cache of the attribute-to-token mappings it has made, as well as a cache of tokens it has received from each remote host (a remote token cache). This architecture works well in any network configuration.


                Figure 2-1. Local Token Server Configuration
      
            ________   SATMP_INIT_REQUEST      ________
           |        |<========================|        |
           |        |  SATMP_INIT_REPLY       |        |
           | Server |========================>| Server |
           |   A    |    (SAMP Tokens)        |   B    |
           |        |<- - - - - - - - - - - - |        |
           |        | SATMP_GET_ATTR_REQUEST  |        |
           |        |========================>|        |
           |        | SATMP_GET_ATTR_REPLY    |        |
           |        |<========================|        |
           |________|                         |________|
      

      Remote Token Server

      In this configuration one or both of a pair of communicating hosts defer to remote server(s) for creating mappings between attributes and tokens. If two hosts are using the same remote token server, the tokens understood on one system are understood by the other without a token mapping exchange between the two end systems (although they both have to resolve the token through an exchange with the token server). This architecture may fit more cleanly with diskless workstations. It also conserves memory resources by removing the need for multiple token databases and optional caches. It also offers slight performance improvements on local subnets of similar hosts, provided the server is robust and there are a limited number of clients. It does not work well if clients and servers are separated by gateways or wide area networks, or if the server is not robust or is overburdened.


              Figure 2-2. Remote Token Server Configuration
        ______  SATMP_INIT_REQUEST  ______ SATMP_INIT_REQUEST/REPLY ______
       |Server|===================>|Client|<======================>|      |
       |  A   |  SATMP_INIT_REPLY  |  B   |                        |Server|
       |      |  (Server=Server C) |      | SATMP_GET_TOK_REQUEST  |   C  |
       |      |<===================|      |=======================>|      |
       |      |   (SAMP Tokens)    |      | SATMP_GET_TOK_REPLY    |      |
       |      |<- - - - - - - - - -|      |<=======================|      |
       |      |                    |______|                        |      |
       |      |                                                    |      |
       |      | SATMP_INIT_REQUEST/REPLY                           |      |
       |      |<==================================================>|      |
       |      | SATMP_GET_ATTR_REQUEST                             |      |
       |      |===================================================>|      |
       |      | SATMP_GET_ATTR_REPLY                               |      |
       |      |<===================================================|      |
       |______|                                                    |______|
      


      These two architectures can be freely mixed within a given network with some hosts acting as their own token server and others deferring to a remote token server. In a mixed environment each host must have a local configuration database specifying its own primary and backup token servers, if not mapping its own tokens. After system initialization, each host begins by assuming that all communications use a local token server. When it receives tokens from a host, it is not be able to map those tokens without first performing a SATMP initialization handshake with the sender. The handshake provides the receiver with information about the sender's token server.

      Token Server Requirements

      TSIX systems map attributes in local internal or external representation to and from a token server's tokens through the SATMP. Any two hosts that use SATMP must have a DOT in common for each of the attributes that the hosts wish to map. A token server need not actually implement any of the security attributes that it can map.

      A token server creates mappings between internal or external representation of an attribute and a token value to represent that attribute. The token value that it selects is arbitrary but once assigned, the server may not reuse that particular token value for that attribute type. In other words, the {server,attribute,token} triple must uniquely identify one and only one attribute mapping.

      When it creates its token mappings database, the token server must record with the database a unique generation number. This number is used to maintain database consistency with those remote systems that might be caching the server's token translations. If a token server loses its database, the new database has a different generation number, which alerts the remote systems to flush their copies. A generation value of zero indicates that a system does not maintain a token database. How a system chooses generation numbers is implementation specific. Generation numbers need only be unique in their low order 24 bits, and must be monotonically increasing. On UNIX-based systems one method of selecting a generation number would be to use the three most significant octets of the 32-bit system time, which is unique assuming that the system maintains its database for more than four minutes.

      Remote Token Server Considerations

      As described above, a TSIX(RE) 1.1 SATMP token server must maintain a generation number with tokens it creates. A host which communicates with a token server or uses it as its remote token server, must keep the server's generation number with any tokens that it caches from the server. Mechanisms are provided in the SATMP to allow hosts to detect a server generation number change and flush any locally cached tokens from that server. Assume the following:

      • Server-A is its own local token server
      • Server-C is its own local token server
      • Client-B uses Server-C as it remote token server
      • Define the form {T,G,S} to uniquely represent a token, where:
        • T is the value of the token
        • G is the generation number of the token
        • S is the token server that created the token
      • Consider {ta,ga,sa} to be any token generated by Server-A
      • Consider {tc,gc,sc}to be any token generated by Server-C

      If we assume that communication is possible between any of the above hosts and that all of them maintain token mapping caches, then they will all eventually have cache entries which map {ta,ga,sa} to {tc,gc,sc}. If Server-C receives {ta,ga,sa} it knows that it corresponds to its local token {tc,gc,sc} which in turn corresponds to its local attribute representation. If Server-A receives {tc,gc,sc} it can make a similar decision. Likewise, if Client-B receives {ta,ga,sa} it knows that it corresponds to the remote server token {tc,gc,sc} which corresponds to its local attribute representation.

      Now, assume that Server-C flushes its local token database and any remote token mapping and creates a new generation of tokens {tc',gc',sc}. A number of situations may occur:

      1. Server-C attempts to communicate with one of the others. In this case, knowing that it has a new generation of tokens, it initiates a new initialization handshake with the other host, sending its new generation number. The other host, detecting the change, should flush from it's cache any of the {tc,gc,sc} to {ta,ga,sa} mappings. Additionally, Client-B should also flush any of its {tc,gc,sc} to attribute mappings.

      2. Server-A sends {ta,ga,sa} to Server-C. This should be handled by the fact that Server-C, having flushed its token cache, will not find a mapping, will initiate a new initialization handshake and things will proceed as above.

      3. Server-C receives a SATMP request before any of the others. The mapping request should be ignored and a new initialization handshake should occur as in the above.

      4. Client-B sends {tc,gc,sc} to one of the others. This can happen because Client-B may very well be blithely unaware of the generation switch unless Server-C attempts to communicate first. If this case occurs, the receiving host should detect that that generation gc is not the same as gc' and should send a SATMP_FLUSH_REMOTE_CACHE message to Client-B. This should cause Client-B to flush all of its {tc,gc,sc} mappings and initiate a new handshake with Server-C.

      5. Server-C and Server-A reestablish the new gc' via an initialization handshake. Then Server-A initiates a a handshake with Client-B, because this is the first attempt to communicate. Client-B is unaware of the generation changes and sends the initialization reply with gc. As in the above case, Server-A should send a SATMP_FLUSH_REMOTE_CACHE message to Client-B.

      SATMP Reliable Datagram Service

      All SATMP services are specified as a two-way (request-response) UDP exchange. Since UDP is a datagram service with no guarantee of delivery, requests and replies may occasionally be lost. Hence, mechanisms must be employed to handle retransmissions according to the following rules:

      1. It is up to the initiator of a request (i.e., the client) to ensure that a transaction is completed correctly.
      2. If the client does not receive a response within a prescribed timeout, it should retransmit the request. The length of the timeout and the number of retries should be configurable.
      3. The responder (i.e., server) need not retain any state concerning previous transactions and should process all client requests, even duplicate requests.
      4. The client need not retain any state after it has received a reply. Duplicate replies may simply be dropped.

      SATMP Deadlock Avoidance

      In any SATMP token mapping exchange, the potential for deadlock exists if another token mapping exchange is needed to complete the exchange. For example, if a SAMTP request or reply is sent and the underlying network protocol stack adds a SAMP header with tokens that need to be mapped, then the transaction will never complete.

      The recommended method to guard against this is to have the network protocol stack consider SATMP exchanges as privileged and to use the reserved value of 1 as the TSIX Session ID token in the Security Attribute Modulation Protocol (SAMP) header and to include no attribute tokens that might need to be mapped.

      SATMP Protocol Specification

      SATMP Messages

      All SATMP messages are implemented with UDP datagrams according to the following rules:

      1. Network byte order is used at all times.
      2. An SATMP server must use the Internet UDP port number 90, which has been assigned to the protocol by the Internet Assigned Numbers Authority (IANA).
      3. The initiator of an SATMP exchange (the client) must always send messages to the assigned port but may use a source port different from the assigned SATMP port.
      4. The server must respond to the client's source port, which may or may not be the same as the assigned SATMP port.

      All SATMP messages must begin with the following header:


      typedef struct { u_char message_number; u_char message_status; u_short message_length; u_char message_esi[8]; } satmp_hdr_t;

      message_number
      Contains the message number selected from the list below. Note, that message numbers in the range 200-255 are available for vendor-specific messages. All other message numbers are reserved and must not be used.


                Figure 3-1. SATMP Message Numbers
      
      
             Name               Number      Description
       
      SATMP_FLUSH_REPLY          162   A reply acknowledging receipt of the 
                                       SATMP_FLUSH_REMOTE_CACHE message. 
      SATMP_GET_ATTR_REQUEST     163   A client request to map a set of 
                                       tokens into a set of attributes.
      SATMP_GET_ATTR_REPLY       164   The server's reply to a SATMP_GET_ATTR_REQUEST
                                       message. The reply contains the set of
                                       requested attributes that could be mapped.
      SATMP_INIT_REQUEST         165   Handshake between a token server and client. 
      SATMP_INIT_REPLY           166   The response to SATMP_INIT_REQUEST. 
      SATMP_FLUSH_REMOTE_CACHE   167   Sent to a remote host when the local host
                                       detects that it is using an out of date cache
                                       of token mappings.  
      SATMP_GET_TOK_REQUEST      173   The client request to map a set of attributes
                                       into a set of tokens.
      SATMP_GET_TOK_REPLY        174   The server's reply to the SATMP_GET_TOK_REQUEST 
                                       message. The reply contains the set of
                                       requested tokens that could be mapped. 
      

      message_status
      Set to one of the following values by the responder to indicate the status of the request.


                Figure 3-2. SATMP Message Status Codes
      
      
          Name                  Value           Meaning
       
       SATMP_REPLY_OK             0      Request was successfully processed
       SATMP_INVALID_VERSION      1      Unsupported version number
       SATMP_INVALID_GENERATION   2      Incorrect generation ID specified for tokens  
       SATMP_UNSUPPORTED_MESSAGE  3      Unsupported message type  
       SATMP_FORMAT_ERROR         4      Message format problem  
       SATMP_TRANSLATION_ERROR    5      Error translating an attribute  
       SATMP_NO_DOT               6      No DOT agreed upon for the requested attribute
       SATMP_NO_MAPPING           7      Mapping doesn't exist  
       SATMP_RESERVED         8-127      Reserved for future use.
       SATMP_VENDOR_STATUS  128-254      Vendor defined status codes.
       SATMP_INTERNAL_ERROR     255      Unexplained internal error 
      

      length
      The length in octets of the entire message including the header.

      message_esi
      An extended session identifier assigned by the initiator of a transaction and normally used by the initiator to uniquely associate a response with the original request. The responder must use the the message_esi from an SATMP request when replying to that request.

      The format of the message_esi is implementation defined and is meaningful only to the initiator of an SATMP exchange. If the initiator uses the message_esi as the only means of correlating messages requests and replies, then it is up to the initiator to ensure that only one transaction using that identifier is outstanding at any given point in time.

      TSIX SATMP Minimum Compliance

      Minimum TSIX compliance requires an implementation of the SATMP to properly handle the following messages:

      • SATMP_INIT_REQUEST
      • SATMP_INIT_REPLY
      • SATMP_GET_ATTR_REQUEST
      • SATMP_GET_ATTR_REPLY
      • SATMP_FLUSH_REMOTE_CACHE
      • SATMP_FLUSH_REPLY

      This set of messages is sufficient if the system implements its own local token server. If using a remote token server, a system must implement the SATMP_GET_TOK_REQUEST and SATMP_GET_TOK_REPLY messages.

      Attribute Identifiers

      The type of security attribute being mapped is specified in SATMP messages by an attribute identifier, which is a 16-bit unsigned integer. The maximum attribute ID is 65,535. Values 0-16,383 are reserved for specification by the TSIG and have well-defined, consistent meanings throughout the Internet community. Values 16,384-32,767 are reserved for site specific security attributes, and are only unique within that community. Values 32,768-65,535 are reserved for dynamic allocation and definition by trusted network applications. The attribute IDS, currently defined by the TSIG, are defined below:

                   Figure 3-3. Attribute Identifiers
      
      
      Attribute Value Description

      Sensitivity Label 0 As defined by the TCSEC Nationality Caveats 1 Nationality caveat set as per the UK CHOTS Integrity Label 2 As defined by the TCSEC Information Label 3 As defined by the DIA's CMW specifications Privilege Set 4 Vendor specific privileges Audit ID 5 The immutable login user identity used for audit purposes Discretionary IDS 6 The collection of user identities used for discretionary access control (DAC). This includes the user ID, the primary group ID, and any supplementary group IDs. Clearance 7 As defined by the TCSEC Audit Info 8 Vendor-specific additional audit information Reserved 9 Access Control List 10 As defined by POSIX unless a vendor-specific access control list format is used Reserved 11-16383 Reserved for future use Site defined 16384-32767 Reserved for site specific security attributes. Application defined 32768-65535 Reserved for application defined security attributes.


      Token Mapping Initialization Sequence

      Before token mapping can occur between TSIX(RE) 1.1 hosts, they must successfully complete an initialization handshake. The handshake is initiated by a host if it has no record of a previous initialization with it's correspondent. It may also be initiated if any databases relevant to token mapping have changed since the last initialization.

      The initialization handshake allows the two hosts to agree upon:

      • The set of security attributes understood by both hosts.
      • Whether or not each host maps its own attributes directly or uses a remote token server. If a host uses a remote server, the handshake establishes the address of the server and any backup server.
      • The DOT to be used for mapping each attribute. By finding a mutually agreeable set of DOTs, the two hosts determine that they have a common interpretation for each other's representation of the attributes in that set of DOTs.
      • The current database generation for each side in case any caches need to be flushed.
      • The version of the token mapping protocol supported by the two hosts. This allows future versions of the protocol to maintain backwards compatibility with older versions.

      The initialization sequence consists of an exchange of messages. The initiator sends a SATMP_INIT_REQUEST message to the responder's SATMP well known UDP port. The responding host replies with a SATMP_INIT_REPLY message.

      If a SATMP initialization handshake (including retries) fails, the remote system is temporarily unavailable. The initiating host should hold off any new initialization handshake with the same remote host for an appropriate interval to prevent excessive network traffic.

      If an SATMP mapping request is received by a host before the initialization handshake is complete, it is permissible for the request to be dropped. The assumption here is that the sender of the request will either retransmit the request once the handshake is complete or will be able to gracefully handle no response to the SATMP request.

      In order to ensure consistency between a token server's database and any caches of that database maintained by its clients, the initialization parameters should not be maintained by either client or server across:

      • Flushing of the server's token cache
      • Rebuilds of the server's token mapping databases
      • Modifications to domain of translation rules

      After any of these events, the host upon which the event occurs should flush the initialization parameters that it has for all remote hosts and not respond to any network traffic with a given host pending successful completion of a new handshake.

      The SATMP_INIT_REQUEST Message

      This message is used to initialize communications between TSIX(RE) 1.1 hosts. The message takes the form:


          typedef struct { 
             satmp_hdr_t hdr; 
             u_int32 generation; 
             u_int16 version; 
             u_char  reserved; 
             u_char  server_state; 
             u_int32 token_server; 
             u_int32 backup_server; 
             satmp_attr_format_spec attr_format[1];  /* Variable size */ 
          } satmp_init_request;
      

      • The generation field gives the current generation ID of the initiator's token database. If it acts as its own token server, this is the generation number of the local database. If using a remote server, this is the generation number of the remote server's database. Only the low order 24 bits are actually used.

      • The version field should be set to hexadecimal 0301, to indicate the TSIX(RE) 1.1 SATMP.

      • The server_state field gives the current state of the token server on the initiating host, and may be set as defined below:

                          Figure 3-4. Server States
        
        Value Description

        0 The initiating host provides its own token server 1 The initiating host is currently using its primary token server 2 The initiating host is currently using its backup token server


      • The reserved field is reserved for future use and must be ignored on current implementations.

      • The token_server field is the Internet address of the initiating host's primary token server. It must be zero if the host acts as its own server.

      • The backup_server field is the Internet address of the initiating host's alternate token server. It must be zero if the host acts as its own server.

      • The attr_format field is an array of attribute mapping specifications with one element per type of attribute supported by the initiating system. The format of the specification as described below.


         typedef struct { 
            u_int16 attribute; 
            u_int16 dot_count; 
            satmp_dot_extern_rep dot[1];  /* Variable size */ 
         } satmp_attr_format_spec; 
      

      • The attribute field is the attribute identifier for this specification. The attribute identifier values are as defined in Section 3.3, above.

      • The dot_count field specifies the number of DOTs understood by the initiating host for this attribute.

      • dot is an array of domain specifiers with dot_count elements. The format of a domain specifier is described below.


         typedef struct { 
            u_char weight; 
            u_char flags; 
            u_int16 length; 
            char dot_name[1];  /* Variable size */   
         } satmp_dot_extern_rep;
      

      • As described above, translating an attribute to another representation may lose security relevant information, or imply a slightly different enforcement of a security policy. The weight field helps the responder choose between the various DOTs for an attribute. This value states the initiator's relative preference for that DOT, and should lie between 0 (absolute last choice, virtually all security information lost, or large mismatch in policy enforcement) and 255 (initiator's native format - no information loss and perfect match in policy enforcement). The responder sums the initiator's weight for each DOT with its own weight value for that DOT, and then selects the DOT with the maximum combined weight. Obviously, if a system cannot accept the use of a DOT for security reasons, it should not advertise that DOT.

      • The Network Representation specified by a DOT may describe how to represent a security attribute in an ASCII and/or binary format. The flags field is a mask that specifies the accepted formats for the network representation in a mapping exchange, and has bit values:

        • 0x01 - Binary format
        • 0x02 - ISO 8859-1 8-bit ASCII format

        Either or both of the flags may be set, but at least one must be set. Although binary mapping is usually more efficient, some attributes might map more naturally in ASCII. Therefore, the choice between the ASCII and binary format should be always made configurable on a per-attribute basis. An example of this case might be discretionary IDS in a closed network in which all users have the same name on all systems, but each system assigns a different user ID to that user. Mapping user IDs using the ASCII user name would provide translation between the different ID values.

      • The length field specifies the length of dot_name including any padding used for alignment.

      • The dot_name field is a null(0) terminated ASCII string padded to a multiple of four in order to maintain alignment to 4-byte boundaries. The DOT name, which is case sensitive, uniquely identifies the domain of translation throughout the entire Internet community. In order to guarantee uniqueness, the DOT name must contain one of three identifiers depending upon the origin of the DOT definition:

        • The name of the recognized standards organization defining the the associated Network Representation (e.g., NIST).
        • The name of the vendor defining the native DOT for a system.
        • The Internet mailing address of the authority defining the DOT (e.g., Chief_Honcho@authority.org).
        • The DOT name INVALID_DOT is reserved for use by the SATMP protocol.

        For example, Vendor A might define the standard representation of a privilege set for their CMW product, along with a definition of the function for each privilege. This native DOT might be called Vendor_A.Privileges Another vendor, Vendor B, might enforce a different set of privileges, and would have their own native DOT, Vendor_B.Privileges. So far we do not have interoperability, except between systems from the same vendor. Interoperability occurs in either of two ways:

        • Someone, whether it be one of the vendors, the two vendors in concert, an accreditation body or a local system administrator, analyzes the two different privilege sets and determines how best to map vendor A's privilege set to and from vendor B's by creating a Vendor_B.Privileges DOT and associated translation tables for Vendor A's systems. Vendor A would then advertise both the Vendor_A.Privileges and Vendor_B.Privileges DOTs, and the two hosts would choose the latter for mapping tokens.

        • Someone, perhaps a standards body such as POSIX, defines a canonical format for an attribute, for example, POSIX.Privileges. Someone, similar to the previous case, must then define how each of the two vendors privilege sets map to and from the canonical set. They would create a POSIX.Privileges DOT and associated translation tables for each system (the translation tables would be different for each system). Vendor A would then advertise both the Vendor_A.Privileges and POSIX.Privileges DOTs, and the two hosts would choose the latter for mapping tokens.

        It should be noted that typically the translation would occur on only one side or the other. The only time translation would occur on both sides, would be in the case of a DOT with a vendor neutral network representation that differed from either vendor's representation.

      The receiver of the SATMP_INIT_REQUEST message processes the message and returns the results in a SATMP_INIT_REPLY message. First the receiver checks the SATMP protocol version to ensure that it can understand the remote host's messages. If not, it returns a SATMP_INIT_REPLY message with the message_status set to SATMP_INVALID_VERSION and message_esi set to the initiator's ESI value. If the SATMP versions are compatible, it then determines the address of the initiator's token server by inspecting the server_state and server address fields. The generation number of the initiator's current token database is then compared against any cache maintained locally of that remote token database. If the initiator's generation number is less than that stored with the local cache, a SATMP_INVALID_GENERATION status code is returned to the initiator, for they are using out of date cached tokens. If the initiator's generation number is greater than that stored with the local cache, the local cache is flushed because it is out of date.

      The receiver then processes the attr_format array, skipping any attributes that it doesn't understand. For each attribute that it understands, the receiver checks the initiator's list of DOTs against the DOTs understood locally. If there is more than one mutually understood DOT, the initiator's and responder's weight values should be summed for each DOT, and the DOT with greatest combined weight should be chosen. The binary and ascii bits in the flags should only be returned if supported by both systems. A single attr_format entry is then written to the reply message specifying the chosen DOT. If none of the DOTs listed for an attribute is understood by the receiving host, it returns an attr_format entry containg INVALID_DOT for that attribute. The receiver continues to process the message in spite of the error, since there might never be a need to map that particular attribute during normal network communications between the two hosts.

      If both the initiating and responding systems use a remote token server, the chosen DOTs are not used in the token mapping process, for both systems map tokens directly with the token servers. The responder should process the attr_format array anyway so that the two systems can identify the set of attributes that they have in common. The SATMP protocol does not make any check upon the agreed upon set of attributes to ensure that it is sufficient for protecting the local host's data.

      If the receiving host decides to permit communications with the initiator, it records the selected DOTs for later token mapping. If the initiator has indicated that it is using a remote token server, the address of the server and its backup are also recorded. If the receiving host is not in fact a server, and itself uses a remote token server, then the server_state, token_server and backup_server fields in the reply message are filled in. The generation field is set with the current generation of the token database, and the reply is sent to the initiator.

      The SATMP_INIT_REPLY Message

      The SATMP_INIT_REPLY acts as an explicit acknowledgement to the SATMP_INIT_REQUEST message. The format of this message and the meaning of the fields are identical to the request message. The attr_format array might not include all of the attribute types found within the original request message, for it is the intersection of the attribute sets understood by the two systems. The list of DOTs for each attribute includes the chosen DOT or an INVALID_DOT entry.

      When this message is received by the initiator of the handshake, it first checks the message_status in the header, to make sure that the transaction completed successfully. The valid status codes in a SATMP_INIT_REPLY message are listed below:

               Figure 3-5. SATMP_INIT_REPLY Status Codes
      
      Status Description

      SATMP_REPLY_OK Produced upon successful completion. Remember that the inability to agree upon a DOT for an attribute is not considered an error. SATMP_INVALID_VERSION The version number in the request message is not supported by this implementation of SATMP. SATMP_INVALID_GENERATION The initiating host is using an out of date cached copy of a token token server's database. If this status code is received, the cached copy of the host's token database should be flushed to force an update from the remote token server. SATMP_FORMAT_ERROR A format error was encountered scanning the request message. SATMP_INTERNAL_ERROR Produced if any internal errors, such as lack of disk space, prevent processing of the request message.


      If no error is indicated, the SATMP protocol version is checked to make sure it is understood by the local system. If not, processing stops. The reply is dropped and communications between the two hosts are not permitted. Subsequent token mapping requests can not succeed, and may propogate an error to the application, though this is implementation-specific detail. If the SATMP versions are compatible, it then determines the address of the responder's token server by inspecting the server_state and server address fields. The generation number of the responder's token database is compared against any cache of that database maintained locally. If the responder's generation number is less than that stored with the local cache, a SATMP_FLUSH_REMOTE_CACHE message is generated and sent to the responding system, since it is using out of date cached tokens, and the received packet that triggered the initialization handshake should be dropped. If the responder's generation number is greater than that stored with the local cache, the local cache is flushed because it is out of date.

      The attr_format array is then processed, checking the chosen DOT for each attribute to make sure that it is valid on the local host and storing it if so. If a common DOT could not be found, no error is generated at this time, for normal network communications between the two hosts might not require mapping of that particular attribute. If the responding host indicates that it uses a remote token server, the addresses of the token server and its backup are stored.

      The SATMP protocol does not make any check upon the agreed upon set of attributes to ensure that it is sufficient for protecting the local host's data.

      Mapping a Security Attribute into a Token

      In order to map a set of security attributes into a set of tokens, the client system translates the attributes into their network representations using the DOT that was chosen for each attribute during the initialization handshake, and then loads the network representations into a SATMP_GET_TOK_REQUEST message. The message is sent to the appropriate token server, which translates the attributes from their network representation into the server's internal representation. It looks up each mapping in turn, creating and recording new tokens if there is no pre-existing mapping. The server returns the token values to the client in a SATMP_GET_TOK_REPLY message.

      The SATMP_GET_TOK_REQUEST Message

      This message is used to request the mapping of a set of security attributes into a set of a tokens by a remote token server. It takes the form:


         typedef struct { 
             satmp_hdr_t              hdr; 
             u_int32                  generation; 
             struct { 
                 u_int16 attr_type;
                 u_int16 nr_length;
                 u_int32 mid;
                 char    nr[1];  /* Variable size */
             }                        attr_spec[1];  /* Variable size */ 
         } satmp_get_tok_request; 
      

      • The generation field is not used and should be set to 0.
      • The attr_spec[1] is a variable length array containing an element for each attribute to be mapped. The elements are processed until the end of the message as determined by the message length field in the message header. Note, that there is no guarantee upon the alignment of an attr_spec element. The format of each element is as follows:

        • The attr_type field specifies the type of attribute to be mapped, and may be one of the attribute identifiers specified in Figure 3-5 above.

        • The mid field is a mapping identifier used to correlate the returned tokens with the original attributes. This allows a client to request multiple tokens for the same attribute type in a single request message to the server. The client may use any value for the field. The server copies it into the reply message to identify the specific instance of a returned token for the attribute type.

        • The nr_length field is the length in bytes of the network representation of the attribute.

        • The nr is the actual attribute presented in the network representation agreed upon during the initialization handshake. The network_representation may either be in ASCII or binary format, its actual composition being defined by the DOT selected for the attribute. Section 3.8 (Network Representation Formats) defines how to construct a network representation for each attribute type.

      The token server receiving the SATMP_GET_TOK_REQUEST message first looks up the client information that it stored during the initialization handshake, which contains the selected DOTs for the attributes to be mapped. It then scans each element of attr_spec in turn, determines the type of attribute to map from the attr_type field, and checks that a valid DOT has been negotiated for that attribute type. If so, it translates the attribute from network_representation to local representation. It looks up the token mapping for the attribute representation in its database, creating a new one if necessary, and stores the token in the reply message, along with the client's mid and the attribute type.

      If a recoverable error occurs while processing the attributes, such as the lack of an agreed upon DOT or the inability to translate one of the attributes, an appropriate status code is written to hdr.message_status in the reply message and processing continues with the next attribute. Only the requested mapping that causes the error condition is skipped, and no entry for it is written to the reply message.

      After all of the attributes have been processed, the server loads its current token database generation number into the reply message and sends the reply back to the client.

      The SATMP_GET_TOK_REPLY Message

      This message is sent in response to a SATMP_GET_TOK_REQUEST message. It takes the following form:


         typedef struct { 
            satmp_hdr_t          hdr; 
            u_int32              generation; 
            struct { 
                u_int16 attr_type;
                u_int32 mid;
                u_int32 token;
            } token_spec[1];  /* Variable size */
         } satmp_get_tok_request;
      

      • The generation field is the current generation ID of the server's token database. If this value does not match that stored with the client's cached copy of the server's database, the client must flush its local cache.

      • The token_spec[1] array contains an element for each attribute that was successfully mapped. If the status code returned in header message_status is equal to SATMP_REPLY_OK, this list corresponds to the request list exactly. Otherwise any mapping that encountered an error is missing. The format of each element is as follows:

        • The attr_type is the attribute type copied directly from the request.

        • The mid field contains the client's reference identifier, copied directly from the request. The client system uses the reference identifier to identify the original attribute value to which the returned token applies.

        • The token field contains the server's token for the mapping.

      • The message_status in the header contains the status of the processed request returned by the server. It may be any of the codes listed in Figure 3.5.1, below. The presence of a status code not equal to SATMP_REPLY_OK does not invalidate the retrieved attributes, but indicates that at least one of the requested mappings was not successfully retrieved.


                   Figure 3-6. SATMP_GET_TOK_REPLY Status Codes
        
        Status Description

        SATMP_REPLY_OK No errors were encountered processing the request and a token is returned for each requested mapping. SATMP_UNSUPPORTED_MESSAGE Indicates that the SATMP_GET_TOK_REQUEST function is not supported by the server. SATMP_NO_DOT A token could not be returned for at least one of the requested attributes, because there was no agreed upon DOT for that attribute. SATMP_TRANSLATION_ERROR A token could not be returned for at least one of the requested attributes, because the server was unable to translate it from the network representation. SATMP_FORMAT_ERROR A format error was encountered scanning the request message. SATMP_INTERNAL_ERROR Produced if any internal errors, such as lack of disk space, prevent processing of the request message.

      Recovering the Mapping for a Token

      In order to map a set of tokens back into a set of attributes, the client system loads the tokens into a SATMP_GET_ATTR_REQUEST message. It also loads the server's generation number associated with those tokens into the message and sends it to the appropriate token server.

      The server checks the generation number of the tokens to make sure that they are current and returns an error if not. If the generation number is valid, the server retrieves the requested mappings from its token database, converts the attributes into their network representation using the DOT negotiated for each attribute, and then loads the attributes along with the original tokens into a SATMP_GET_ATTR_REPLY message.

      If the generation number does not match the server's current generation number, a SATMP_GET_ATTR_REPLY message is returned with the message_status set to SATMP_INVALID_GENERATION and message_esi set to the initiator's ESI value. This informs the client that the tokens are stale and that it should flush any caches or databases of the server's tokens that it maintains.

      The SATMP_GET_ATTR_REQUEST Message

      This message is used to request the mapping of a set of tokens into a set of security attributes in network representation. As shown below, it is identical in format to the SATMP_GET_TOK_REPLY message with the exception that the mid field is not used.


         typedef struct { 
            satmp_hdr_t          hdr; 
            u_int32              generation; 
            struct { 
                u_int16 attr_type;
                u_int32 mid;
                u_int32 token;
            } token_spec[1];  /* Variable size */
        } satmp_get_attr_request; 
      

      • The generation field is the server's generation corresponding to the tokens the client wants to have mapped.

      • The token_spec[1] array contains an element for each token to be mapped. The format of each element is as follows:

        • The attr_type field specifies the attribute type of the token to be mapped and may be one of the attribute identifiers specified in Figure 3-5 above.

        • The mid field is not used. It should be set to zero by the client and ignored by the server.

        • The token field holds the token to be mapped.

      The SATMP_GET_ATTR_REPLY Message

      This message is sent by a token server to a client in reply to a client's SATMP_GET_ATTR_REQUEST message. As shown below, it is identical in format to the SATMP_GET_TOK_REQUEST message, differing only in that the token from the request is used instead of the client message identifier.


         typedef struct { 
             satmp_hdr_t              hdr; 
             u_int32                  generation; 
             struct { 
                 u_int16 attr_type;
                 u_int16 nr_length;
                 u_int32 token;
                 char    nr[1];  /* Variable size */
             }                        attr_spec[1];  /* Variable size */ 
         } satmp_get_attr_reply; 
      

      • The generation field is unused but may be set equal to the generation number from the request for consistency.

      • The attr_spec[1] is a variable length array containing an element for each token which was successfully mapped. The elements are processed until the end of the message as determined by the message length field in the message header. Note, that there is no guarantee upon the alignment of an attr_spec element. The format of each element is as follows:

        • The attr_type is the attribute type copied directly from the request.

        • The token field is the server token taken directly from the corresponding token_spec in the request.

        • The nr_length field is the length in bytes of the network representation of the attribute.

        • The nr is the actual attribute presented in the network representation agreed upon during the initialization handshake. The network_representation may either be in ASCII or binary format, its actual composition being defined by the DOT selected for the attribute. Section 3.8 (Network Representation Formats) defines how to construct a network representation for each attribute type.

      • The message_status in the header contains the status of the processed request returned by the server. It may be any of the codes listed in Figure 3.6.1, below. The presence of a status code not equal to SATMP_REPLY_OK does not invalidate any succesfully mapped tokens, but indicates that at least one of the requested tokens was not successfully mapped.


                   Figure 3-7. SATMP_GET_ATTR_REPLY Status Codes
        
        Status Description

        SATMP_REPLY_OK No errors were encountered processing the request and an attribute representation is returned for each request token. SATMP_UNSUPPORTED_MESSAGE Indicates that the SATMP_GET_ATTR_REQUEST function is not supported by the server and indicates a non-compliant TSIX(RE) 1.1 SATMP server. SATMP_NO_DOT An attribute representation could not be returned for at least one of the requested tokens, because there was no agreed upon DOT for that attribute. SATMP_NO_MAPPING An attribute representation could not be returned for at least one of the requested tokens, because there was no mapping for that token in the server's database. SATMP_FORMAT_ERROR A format error was encountered scanning the request message. SATMP_INTERNAL_ERROR Produced if any internal errors, such as lack of disk space, prevent processing of the request message.

      Maintaining Database Consistency

      The TSIX(RE) 1.1 SATMP protocol uses the generation numbers exchanged during the initialization handshake to maintain consistency between all optional caches of tokens throughout the network. Any compliant TSIX(RE) 1.1 SATMP implementation which caches tokens should always store the generation number associated with the cached tokens, and should always include this number when exchanging tokens. If a generation inconsistency is detected between any pair of TSIX(RE) 1.1 hosts, the host with the incorrect generation must flush any token cache it maintains regarding the other host and should initiate a new token mapping handshake.

      The SATMP_FLUSH_REMOTE_CACHE Message

      This message is generated by a host when it determines that a remote host is using an out-of-date token generation number or to force a remote host to flush existing token mappings. The former will occur in the normal course of events when a remote token server uses a new token generation number, as described in Section 2.5 above. The latter is likely to be the result of an administrative action intended to force two hosts to flush all tokens that they have in common and remap them as needed.

      The message is formatted as shown below. It has no data other than the messsage header.


         typedef struct { 
            satmp_hdr_t hdr; 
         } satmp_flush; 
      

      If the host receiving this message is using a remote token server, it should take the following actions:

      • Flush all token and attribute mappings
      • Send a SATMP_FLUSH_REPLY to the sender of the message.
      • Send a SATMP_INIT_REQUEST to its remote token server to get the new generation
      • Send a SATMP_INIT_REQUEST to the sender of the message

      If the host receiving this message is not using a remote token server, it should take the following actions:

      • Flush all token mappings it has in common with the sender
      • Send a SATMP_INIT_REQUEST to the sender of the message

      The SATMP_FLUSH_REPLY Message

      This message is returned as a positive acknowledgement to a SATMP_FLUSH_REMOTE_CACHE message. It takes the form shown below, with header message_status set to SATMP_REPLY_OK.


         typedef struct { 
            satmp_hdr_t hdr; 
         } satmp_flush_reply; 
      

      Network Representation Formats

      The structure of a network representation is completely arbitrary, and is determined by the DOT defining the network representation. It is strongly recommended, however, that the following rules be observed in order to accommodate existing TSIX attribute translation tools and algorithms.

      ASCII Network Representations

      All ASCII representations are null (0) terminated strings, with the following specific formats:

      Table 3-1. ASCII Network Representations


      Sensitivity Label
      Clearance
      Integrity Label
      A set of words separated by spaces. The first word(s) must be the classification. Any remaining words are elements of the compartment set. The various words can be parsed using standard sensitivity label encoding rules.
      Information Label
      A set of words separated by spaces. The first word(s) specifies the classification. Remaining words consist of elements of the compartment set and elements of the marking set. The various words can be parsed using the DIA's standard encoding rules.
      Nationality Caveats
      A set of country names separated by spaces or commas.
      Privilege Set
      A set of privilege names separated by spaces or commas.
      Audit ID
      A user name.
      Discretionary IDS
      The following set in order:
      • A null (0) terminated ASCII user name.
      • A null (0) terminated ASCII group name.
      • A u_int16 specifying the number, N, of supplementary groups. There is no guarantee that it will be aligned.
      • A set of N ASCII group names. Each group name is null (0) terminated. If a system does not support supplementary groups, it should set the number of groups to 0 when specifying the Discretionary IDS, and should ignore the specified groups when receiving the Discretionary IDS.
      ACL
      An ACL entry consists of a u_int32, specifying the number of entries in the ACL, followed by a list of ACL entries. Each ACL entry consists of an ACL header followed by zero or more null-terminated ASCII strings. The ASCII format ACL header is described as shown below:


         typedef struct { 
              u_char acl_type;
              u_char acl_class;
              char acl_perm[1];  /* Variable size */
         } satmp_acl_ascii;
      

      The defined values for acl_type are:

          0 ACL_MODEMASK       No following string
          1 ACL_USER_OBJ       One following string specifying the owning 
                               user name
          2 ACL_GROUP_OBJ      One following string specifying the owning 
                               group name
          3 ACL_OTHER_OBJ      No following string
          4 ACL_USER           One following string specifying a user name
          5 ACL_GROUP          One following string specifying a group name
          6 ACL_USER_GROUP     Two following strings specifying a user
                               name and a group name
          7-255                Reserved for future use
      

      The defined values for acl_class are:

          0 ACL_CL_ACCESS      The entry is part of an access ACL
          1 ACL_CL_DEFAULT     The entry is part of a default ACL
          2-255                Reserved for future use
      
      

      The value of acl_perm is a null-terminated string specifying the permissions associated with the ACL entry (for ACL types 1-6) or a mode mask (for ACL type 0). The format, definition, and interpretation of acl_perm is dependent upon the ACL policy implied by the DOT. Any requirement for ACL entry ordering, required ACL entries, or ACL entry uniqueness is dependent upon the ACL policy implied by the DOT.


      Audit Information
      Additional audit information. Audit information is vendor- system-specific. The precise contents and format must be defined for each DOT.

      Binary Network Representations

      All binary attribute representations are specified as shown in Table 3-2, below. All attribute bit masks are padded to a 32-bit longword boundary and are in network byte order. Bit 0 is the MSB of the first longword, bit 32 is the MSB of the second longword, and so forth.

      Note, that there are existing implementations of TSIX(RE) 1.0 which use a reverse ordering of bits in binary representations. In other words, bit 0 is the LSB of first longword, bit 32 is the LSB of the second longword, and so forth. In order to interoperate with such implementations, ASCII representation is recommended.

      Table 3-2. Binary Network Representations


      Sensitivity Label
      Clearance
      Integrity Label
      A u_int32 classification followed by a u_int32 compartment set bit mask size, specifying the number of octets in the compartment set bit mask. If the compartment set bit mask size is non-zero, it is followed by the compartment set bit mask octets.
      Information Label
      A u_int32 classification followed by a u_int32 compartment set bit mask size, specifying the number of octets in the compartment set bit mask. If the compartment set bit mask size is non-zero, it is followed by the compartment set bit mask octets. This is followed by a u_int32 markings bit mask size, specifying the number of octets in the markings bit mask. If the markings bit mask size is non-zero, it is followed by the markings bit mask octets.
      Nationality Caveats
      A caveat set is a bit mask rounded to a u_int32 boundary.
      Privilege Set
      The privilege set is a bit mask rounded to a u_int32 boundary.
      Audit ID
      The audit ID is a single u_int32 .
      Discretionary IDS
      A u_int32 for the user ID, followed by a u_int32 for the group ID, followed by a u_int32 for the number, N, of supplementary groups, followed by an N u_int32 list of groups. If a system does not support supplementary groups, it should set the number of groups to 0 when specifying the Discretionary IDS, and should ignore the specified groups when receiving the Discretionary IDS.
      ACL
      An ACL entry consists of a u_int32, specifying the number of entries in the ACL, followed by a list of ACL entries. Each ACL entry consists of an ACL header followed by zero or more u_int32 values. The binary format ACL header is described as shown below:


         typedef struct { 
              u_char acl_type;
              u_char acl_class;
              ushort acl_perm;
         } satmp_acl_binary;
      

      The defined values for acl_type are:

          0 ACL_MODEMASK       No following u_int32
          1 ACL_USER_OBJ       One following u_int32 specifying the owning 
                               user id
          2 ACL_GROUP_OBJ      One following u_int32 specifying the owning 
                               group id
          3 ACL_OTHER_OBJ      No following u_int32
          4 ACL_USER           One following u_int32 specifying a user id
          5 ACL_GROUP          One following u_int32 specifying a group id
          6 ACL_USER_GROUP     Two following u_int32 values specifying a user 
                               id and a group id
          7-255                Reserved for future use
      

      The defined values for acl_class are:

          0 ACL_CL_ACCESS      The entry is part of an access ACL
          1 ACL_CL_DEFAULT     The entry is part of a default ACL
          2-255                Reserved for future use
      
      

      The value of acl_perm is a bit pattern specifying the permissions associated with the ACL entry (for ACL types 1-6) or a mode mask (for ACL type 0). The format, definition, and interpretation of acl_perm is dependent upon the ACL policy implied by the DOT.

      Any requirement for ACL entry ordering, required ACL entries, or ACL entry uniqueness is dependent upon the ACL policy implied by the DOT.


      Audit Information
      Additional audit information. Audit information is vendor- system-specific. The precise contents and format must be defined for each DOT.

      Related Information

      Revision History

      Draft 1.0 for review: September 1, 1995
      • Modified version of the TSIX 1.0 SATMP specification.
      • Remove references to DNSIX
      • New ACL format to handle POSIX ACL's.
      • Change bit ordering for compartments and markings to be compatible with standard network bit order.
      • Miscellaneous clarifications and editorial changes.
      • Reviewed at TSIG meeting Oct. 24-26, 1995.

      Revision 1.1 for review: February 27, 1996
      • Clarified protocol descriptions reflecting comments from the review
      • Minor edits for grammar, spelling, and clarity

      Revision 1.2 for review: August 1, 1996
      • Changes suggested by comments from Sun at the April meeting.


      Table of Contents

      1. Introduction
      2. SATMP Architecture

        1. Attribute Representations
        2. Attribute Exchange Through Token Mapping
        3. Token Mapping Architectures
        4. Token Server Requirements
        5. Remote Token Server Considerations
        6. SATMP Reliable Datagram Service
        7. Deadlock Avoidance

    3. SATMP Protocol Specification

      1. SATMP Messages
      2. TSIX SATMP Compliance
      3. Attribute Identifiers
      4. SATMP Message Numbers and Error Values
      5. Token Mapping Initialization Sequence
        1. The SATMP_INIT_REQUEST Message
        2. The SATMP_INIT_REPLY Message

      6. Mapping a Security Attribute into a Token
        1. The SATMP_GET_TOK_REQUEST Message
        2. The SATMP_GET_TOK_REPLY Message

    4. Recovering the Mapping for a Local Token
      1. The SATMP_GET_ATTR_REQUEST Message
      2. The SATMP_GET_ATTR_REPLY Message
    5. Maintaining Database Consistency
      1. The SATMP_FLUSH_REMOTE_CACHE Message
      2. The SATMP_FLUSH_REPLY Message

    6. Network Representation Formats
      1. ASCII Network Representations
      2. Binary Network Representations

    7. Related Information
    8. Revision History

    9. List of Tables