


-
1
-



                     TTSSIIXX((RREE)) 11..11 SSAATTMMPP

         SSeeccuurriittyy AAttttrriibbuuttee TTookkeenn MMaappppiinngg PPrroottooccooll

                RReevviissiioonn 11..22:: AAuugguusstt 11,, 11999966


11..  _I_n_t_r_o_d_u_c_t_i_o_n_

One of the most difficult problems facing Trusted Security Infor-
mation 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  at-
tribute  set:  consider,  for  example,  two systems that enforce
least privilege based on different privilege sets.  When interop-
erating on a network, how could these systems resolve their priv-
ilege differences? TSIX must be able to handle these format  dif-
ferences.

The TTSSIIXX SSeeccuurriittyy AAttttrriibbuuttee TTookkeenn  MMaappppiinngg  PPrroottooccooll ((SSAATTMMPP)) sat-
isfies 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.


2.  _S_A_T_M_P__A_r_c_h_i_t_e_c_t_u_r_e_

2.1  _A_t_t_r_i_b_u_t_e__R_e_p_r_e_s_e_n_t_a_t_i_o_n_s__

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

 eexxtteerrnnaall rreepprreesseennttaattiioonn   (ER)
    The human readable, ASCII, version of an attribute.

 iinntteerrnnaall rreepprreesseennttaattiioonn   (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.











-
2
-



 ttookkeenn
    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.

 nneettwwoorrkk rreepprreesseennttaattiioonn   (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.

2.2  _A_t_t_r_i_b_u_t_e__E_x_c_h_a_n_g_e__T_h_r_o_u_g_h__T_o_k_e_n__M_a_p_p_i_n_g__

When sending security attribute tokens, the sending system should
use  the  token  values  native  to that system. This is commonly
called _s_e_n_d_e_r-_b_a_s_e_d _t_o_k_e_n _m_a_p_p_i_n_g. 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 us-
ing the _S_e_c_u_r_i_t_y _A_t_t_r_i_b_u_t_e _T_o_k_e_n _M_a_p_p_i_n_g _P_r_o_t_o_c_o_l.

Using the terminology defined in the previous section,  attribute
transfer between trusted TSIX applications would involve the fol-
lowing 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  repre-
sentations 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 TTSSIIXX SSeeccuurriittyy AAttttrriibbuuttee MMoodduullaattiioonn PPrroottooccooll
      ((SSAAMMPP)) header which is attached to network messages.













-
3
-



  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  implementa-
tions of TSIX SATMP maintain a cache of previously mapped tokens.

A system may be configured either to create its  own  token  map-
pings  directly,  or  to  defer to some remote token server.  Any
system that creates its own mappings may also function as  a  re-
mote  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 con-
figuration. 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  ddoommaaiinn ooff ttrraannssllaattiioonn  (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











-
4
-



      the necessary attribute translation between their
      native formats.

The transparent translation of security attributes  between  sys-
tems  is  critical to vendor-independent system interoperability.
The ability to transparently translate  security  attributes  de-
pends  on  the mechanism used to translate the local system's na-
tive 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 de-
scribe a number of translation tools designed to handle transpar-
ent attribute translations in  the   TTSSIIXX  AAttttrriibbuuttee  TTrraannssllaattiioonn
TToooollss  section.  These  tools were developed specifically to deal
with problems such as:

   o+ How to map a sensitivity label, (TToopp SSeeccrreett AApppplleess
     OOrraannggeess, for example) when the same label implies
     different levels of protection on two different
     systems.

   o+ How to map labels between systems with different
     compartment sets.

   o+ How to map privilege sets between different vendor
     implementations of least privilege.

2.3  __T_o_k_e_n__M_a_p_p_i_n_g__A_r_c_h_i_t_e_c_t_u_r_e_s__

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

LLooccaall TTookkeenn SSeerrvveerr

    This is the most common configuration, where each host
    _l_o_c_a_l_l_y 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.

















-
5
-



             FFiigguurree 22--11.. LLooccaall TTookkeenn SSeerrvveerr CCoonnffiigguurraattiioonn

         ________   SATMP_INIT_REQUEST      ________
        |        |<========================|        |
        |        |  SATMP_INIT_REPLY       |        |
        | Server |========================>| Server |
        |   A    |    (SAMP Tokens)        |   B    |
        |        |<- - - - - - - - - - - - |        |
        |        | SATMP_GET_ATTR_REQUEST  |        |
        |        |========================>|        |
        |        | SATMP_GET_ATTR_REPLY    |        |
        |        |<========================|        |
        |________|                         |________|

RReemmoottee TTookkeenn  SSeerrvveerr


    In this configuration one or both of a pair of
    communicating hosts defer to _r_e_m_o_t_e _s_e_r_v_e_r(_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.




























-
6
-



        FFiigguurree 22--22.. RReemmoottee TTookkeenn SSeerrvveerr CCoonnffiigguurraattiioonn
  ______    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 net-
work 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.

2.4  _T_o_k_e_n__S_e_r_v_e_r__R_e_q_u_i_r_e_m_e_n_t_s_

TSIX  systems map attributes in local internal or external repre-
sentation 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 rep-
resentation  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
{{sseerrvveerr,,aattttrriibbuuttee,,ttookkeenn}}  triple  must  uniquely identify _o_n_e _a_n_d
_o_n_l_y _o_n_e attribute mapping.

When it creates its token mappings  database,  the  token  server
must  record  with the database a unique  ggeenneerraattiioonn number. This
number is used to maintain database consistency











-
7
-



     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  re-
mote  systems  to  flush their copies. A generation value of zzeerroo
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.

2.5  _R_e_m_o_t_e__T_o_k_e_n__S_e_r_v_e_r__C_o_n_s_i_d_e_r_a_t_i_o_n_s_

As  described above, a TSIX(RE) 1.1 SATMP token server must main-
tain 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:

   o+ SSeerrvveerr--AA is its own local token server

   o+ SSeerrvveerr--CC is its own local token server

   o+ CClliieenntt--BB uses SSeerrvveerr--CC as it remote token server

   o+ Define the form {{TT,,GG,,SS}} to uniquely represent a token,
     where:

        o+ TT is the value of the token

        o+ GG is the generation number of the token

        o+ SS is the token server that created the token

   o+ Consider {{ttaa,,ggaa,,ssaa}} to be any token generated by
     Server-A

   o+ Consider {{ttcc,,ggcc,,sscc}}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
{{ttaa,,ggaa,,ssaa}} to {{ttcc,,ggcc,,sscc}}.  If SSeerrvveerr--CC receives











-
8
-



     {{ttaa,,ggaa,,ssaa}}  it  knows that it corresponds to its local token
{{ttcc,,ggcc,,sscc}}  which in turn corresponds to its local attribute rep-
resentation.  If SSeerrvveerr--AA receives {{ttcc,,ggcc,,sscc}} it can make a simi-
lar decision.  Likewise, if CClliieenntt--BB receives {{ttaa,,ggaa,,ssaa}} it knows
that  it  corresponds to the remote server token {{ttcc,,ggcc,,sscc}} which
corresponds to its local attribute representation.

Now, assume that SSeerrvveerr--CC flushes its local  token  database  and
any  remote  token mapping and creates a new generation of tokens
{{ttcc'',,ggcc'',,sscc}}. A number of situations may occur:

  1.  SSeerrvveerr--C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
      {{ttcc,,ggcc,,sscc}} ttoo {{ttaa,,ggaa,,ssaa}} mappings. Additionally,
      CClliieenntt--BB should also flush any of its {{ttcc,,ggcc,,sscc}} ttoo
      aattttrriibbuuttee mappings.

  2.  SSeerrvveerr--AA sends {{ttaa,,ggaa,,ssaa}} 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.  SSeerrvveerr--C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.  CClliieenntt--BB sends {{ttcc,,ggcc,,sscc}} to one of the others.  This
      can happen because CClliieenntt--BB may very well be blithely
      unaware of the generation switch unless SSeerrvveerr--CC
      attempts to communicate first. If this case occurs,
      the receiving host should detect that that generation
      ggcc is not the same as ggcc'' and should send a
      SSAATTMMPP__FFLLUUSSHH__RREEMMOOTTEE__CCAACCHHEE message to CClliieenntt--BB.  This
      should cause CClliieenntt--BB to flush all of its  {{ttcc,,ggcc,,sscc}}
      mappings and initiate a new handshake with SSeerrvveerr--CC.

  5.  SSeerrvveerr--CC and SSeerrvveerr--AA reestablish the new ggcc'' via an
      initialization handshake. Then SSeerrvveerr--AA initiates a a
      handshake with CClliieenntt--BB, because this is the first
      attempt to communicate. CClliieenntt--BB is unaware of the
      generation changes and sends the initialization reply
      with ggcc.  As in the above case, SSeerrvveerr--AA should send a
      SSAATTMMPP__FFLLUUSSHH__RREEMMOOTTEE__CCAACCHHEE message to CClliieenntt--BB.












-
9
-



2.6  _S_A_T_M_P__R_e_l_i_a_b_l_e__D_a_t_a_g_r_a_m__S_e_r_v_i_c_e__

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 ac-
cording to the following rules:

  1.  It is up to the initiator of a request (i.e., the
      _c_l_i_e_n_t) to ensure that a transaction is completed
      correctly.

  2.  If the _c_l_i_e_n_t 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., _s_e_r_v_e_r) need not retain any state
      concerning previous transactions and should process
      all client requests, even duplicate requests.

  4.  The _c_l_i_e_n_t need not retain any state after it has
      received a reply. Duplicate replies may simply be
      dropped.

2.7  _S_A_T_M_P__D_e_a_d_l_o_c_k__A_v_o_i_d_a_n_c_e__

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 net-
work protocol stack consider SATMP exchanges as privileged and to
use  the  reserved value of 11 as the TTSSIIXX SSeessssiioonn IIDD token in the
SSeeccuurriittyy AAttttrriibbuuttee MMoodduullaattiioonn PPrroottooccooll ((SSAAMMPP)) header and  to  in-
clude no attribute tokens that might need to be mapped.


3.  _S_A_T_M_P__P_r_o_t_o_c_o_l__S_p_e_c_i_f_i_c_a_t_i_o_n_

3.1  __S_A_T_M_P__M_e_s_s_a_g_e_s__

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

  1.  Network byte order is used at all times.












-
10
-



  2.  An SATMP server mmuusstt 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 _c_l_i_e_n_t) mmuusstt
      always send messages to the assigned port but mmaayy use
      a source port different from the assigned SATMP port.

  4.  The server mmuusstt 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;




mmeessssaaggee__nnuummbbeerr
    Contains the message number selected from the list
    below. Note, that message numbers in the range 220000--225555
    are available for vendor-specific messages. All other
    message numbers are reserved and must not be used.

































-
11
-



          FFiigguurree 33--11.. SSAATTMMPP MMeessssaaggee NNuummbbeerrss


       NNaammee               NNuummbbeerr      DDeessccrriippttiioonn

SATMP_FLUSH_REPLY          162   A reply acknowledging receipt of
the
                                 SATMP_FLUSH_REMOTE_CACHE    mes-
sage.  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.



mmeessssaaggee__ssttaattuuss
    Set to one of the following values by the responder to
    indicate the status of the request.

          FFiigguurree 33--22.. SSAATTMMPP MMeessssaaggee SSttaattuuss CCooddeess


    NNaammee                  VVaalluuee           MMeeaanniinngg

 SATMP_REPLY_OK              0      Request was successfully pro-
cessed
 SATMP_INVALID_VERSION      1      Unsupported version number
 SATMP_INVALID_GENERATION   2      Incorrect generation ID speci-
fied 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 re-
quested 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



lleennggtthh
    The length in octets of the entire message including the
    header.











-
12
-



mmeessssaaggee__eessii
    An _e_x_t_e_n_d_e_d _s_e_s_s_i_o_n _i_d_e_n_t_i_f_i_e_r assigned by the initiator
    of a transaction and normally used by the initiator to
    uniquely associate a response with the original request.
    The responder mmuusstt use the the mmeessssaaggee__eessii from an SATMP
    request when replying to that request.

    The format of the mmeessssaaggee__eessii is implementation defined
    and is meaningful only to the initiator of an SATMP
    exchange.  If the initiator uses the mmeessssaaggee__eessii 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.



3.2  __T_S_I_X__S_A_T_M_P__M_i_n_i_m_u_m__C_o_m_p_l_i_a_n_c_e__

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

   o+ SATMP_INIT_REQUEST

   o+ SATMP_INIT_REPLY

   o+ SATMP_GET_ATTR_REQUEST

   o+ SATMP_GET_ATTR_REPLY

   o+ SATMP_FLUSH_REMOTE_CACHE

   o+ 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 SSAATTMMPP__GGEETT__TTOOKK__RREEQQUUEESSTT and  SSAATTMMPP__GGEETT__TTOOKK__RREEPPLLYY
messages.

3.3  __A_t_t_r_i_b_u_t_e__I_d_e_n_t_i_f_i_e_r_s__

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 6655,,553355.. Values 00--1166,,338833 are
reserved for specification by the  TSIG  and  have  well-defined,
consistent  meanings  throughout  the  Internet community. Values
1166,,338844--3322,,776677 are reserved for site specific security attributes,
and  are only unique within that community.  Values 3322,,776688--6655,,553355
are reserved for dynamic allocation  and  definition  by  trusted
network applications. The attribute IDS, currently defined by the











-
13
-



     TSIG, are defined below:

             FFiigguurree 33--33.. AAttttrriibbuuttee IIddeennttiiffiieerrss

     AAttttrriibbuuttee             VVaalluuee       DDeessccrriippttiioonn


  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 iden-
tities 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 de-
fined security
                                     attributes.


3.4  __T_o_k_e_n__M_a_p_p_i_n_g__I_n_i_t_i_a_l_i_z_a_t_i_o_n__S_e_q_u_e_n_c_e__

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  previ-
ous  initialization with it's correspondent.  It may also be ini-
tiated if any databases relevant to token  mapping  have  changed
since the last initialization.

The initialization handshake allows the two hosts to agree upon:

   o+ The set of security attributes understood by both
     hosts.

   o+ 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.













-
14
-



   o+ 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.

   o+ The current database generation for each side in case
     any caches need to be flushed.

   o+ 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 SSAATTMMPP__IINNIITT__RREEQQUUEESSTT message to  the  respon-
der's SATMP well known UDP port. The responding host replies with
a SSAATTMMPP__IINNIITT__RREEPPLLYY 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 net-
work traffic.

If an SATMP mapping request is received by a host before the ini-
tialization  handshake is complete, it is permissible for the re-
quest 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:

   o+ Flushing of the server's token cache

   o+ Rebuilds of the server's token mapping databases

   o+ 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.














-
15
-



3.4.1  __T_h_e__S_A_T_M_P___I_N_I_T___R_E_Q_U_E_S_T__M_e_s_s_a_g_e__  This message is used to
initialize communications between TSIX(RE) 1.1 hosts.   The  mes-
sage 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;

   o+ The  ggeenneerraattiioonn  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.

   o+ The  vveerrssiioonn  field should be set to hexadecimal 0301,
     to indicate the TSIX(RE) 1.1 SATMP.

   o+ The  sseerrvveerr__ssttaattee  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

   VVaalluuee         DDeessccrriippttiioonn


     0           The initiating host provides its own token serv-
er
     1            The initiating host is currently using its pri-
mary token server
     2           The initiating host is currently using its back-
up token server

   o+ The  rreesseerrvveedd  field is reserved for future use and
     must be ignored on current implementations.

   o+ The  ttookkeenn__sseerrvveerr  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.

   o+ The  bbaacckkuupp__sseerrvveerr  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.

   o+ The  aattttrr__ffoorrmmaatt  field is an array of attribute
     mapping specifications with one element per type of











-
16
-



     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;

   o+ The  aattttrriibbuuttee  field is the attribute identifier for
     this specification. The attribute identifier values are
     as defined in SSeeccttiioonn 33..33, above.

   o+ The  ddoott__ccoouunntt  field specifies the number of DOTs
     understood by the initiating host for this attribute.

   o+ ddoott  is an array of domain specifiers with  ddoott__ccoouunntt
     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;

   o+ 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  wweeiigghhtt  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.

   o+ The Network Representation specified by a DOT may
     describe how to represent a security attribute in an
     ASCII and/or binary format. The  ffllaaggss field is a mask
     that specifies the accepted formats for the network
     representation in a mapping exchange, and has bit
     values:












-
17
-



        o+ 0x01 - Binary format

        o+ 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.

   o+ The  lleennggtthh  field specifies the length of ddoott__nnaammee
     including any padding used for alignment.

   o+ The ddoott__nnaammee 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:

        o+ The name of the recognized standards organization
          defining the the associated Network Representation
          (e.g., NNIISSTT).

        o+ The name of the vendor defining the native DOT for
          a system.

        o+ The Internet mailing address of the authority
          defining the DOT (e.g.,
          Chief_Honcho@authority.org).

        o+ The DOT name IINNVVAALLIIDD__DDOOTT 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
     VVeennddoorr__AA..PPrriivviilleeggeess Another vendor, Vendor B, might
     enforce a different set of privileges, and would have
     their own native DOT, VVeennddoorr__BB..PPrriivviilleeggeess. So far we do
     not have interoperability, except between systems from











-
18
-



          the same vendor.  Interoperability occurs in
     either of two ways:

        o+ 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 VVeennddoorr__BB..PPrriivviilleeggeess DOT and
          associated translation tables for Vendor A's
          systems. Vendor A would then advertise both the
          VVeennddoorr__AA..PPrriivviilleeggeess and VVeennddoorr__BB..PPrriivviilleeggeess DOTs,
          and the two hosts would choose the latter for
          mapping tokens.

        o+ Someone, perhaps a standards body such as POSIX,
          defines a canonical format for an attribute, for
          example, PPOOSSIIXX..PPrriivviilleeggeess. 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
          PPOOSSIIXX..PPrriivviilleeggeess DOT and associated translation
          tables for each system (the translation tables
          would be different for each system). Vendor A
          would then advertise both the VVeennddoorr__AA..PPrriivviilleeggeess
          and PPOOSSIIXX..PPrriivviilleeggeess 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 vveennddoorr nneeuuttrraall network
     representation that differed from either vendor's
     representation.

The receiver of the SSAATTMMPP__IINNIITT__RREEQQUUEESSTT message processes the mes-
sage and returns the results in a SSAATTMMPP__IINNIITT__RREEPPLLYY 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
SSAATTMMPP__IINNIITT__RREEPPLLYY   message   with   the   mmeessssaaggee__ssttaattuuss  set  to
SSAATTMMPP__IINNVVAALLIIDD__VVEERRSSIIOONN and mmeessssaaggee__eessii 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
sseerrvveerr__ssttaattee  and server address fields.  The  ggeenneerraattiioonn  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 SSAATTMMPP__IINNVVAALLIIDD__GGEENNEERRAATTIIOONN status
code is returned to the initiator, for they are using out of date
cached tokens. If the initiator's generation











-
19
-



     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  aattttrr__ffoorrmmaatt  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  bbiinnaarryy  and  aasscciiii    bits
in  the  ffllaaggss  should only be returned if supported by both sys-
tems. A single  aattttrr__ffoorrmmaatt  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
_a_t_t_r__f_o_r_m_a_t  entry  containg  IINNVVAALLIIDD__DDOOTT 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 at-
tribute 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  pro-
cess,  for  both  systems  map  tokens  directly  with  the token
servers. The responder should process the aattttrr__ffoorrmmaatt  array any-
way  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 record-
ed. If the receiving host is not in fact a server, and itself us-
es a remote token server, then the sseerrvveerr__ssttaattee, ttookkeenn__sseerrvveerr and
bbaacckkuupp__sseerrvveerr fields in the reply  message  are  filled  in.  The
ggeenneerraattiioonn  field is set with the current generation of the token
database, and the reply is sent to the initiator.

3.4.2  __T_h_e__S_A_T_M_P___I_N_I_T___R_E_P_L_Y__M_e_s_s_a_g_e__  The SSAATTMMPP__IINNIITT__RREEPPLLYY acts
as an explicit acknowledgement to the SSAATTMMPP__IINNIITT__RREEQQUUEESSTT message.
The format of this message and the  meaning  of  the  fields  are
identical  to  the request message. The  aattttrr__ffoorrmmaatt  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  at-
tribute includes the chosen DOT or an IINNVVAALLIIDD__DDOOTT entry.











-
20
-



When  this message is received by the initiator of the handshake,
it first checks the  mmeessssaaggee__ssttaattuuss 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

   SSttaattuuss                        DDeessccrriippttiioonn


 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 mes-
sage 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  scan-
ning 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,  pro-
cessing  stops.  The  reply is dropped and communications between
the two hosts are not permitted.  Subsequent  token  mapping  re-
quests  can not succeed, and may propogate an error to the appli-
cation, 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  sseerrvveerr__ssttaattee  and
server address fields. The  ggeenneerraattiioonn  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 SSAATTMMPP__FFLLUUSSHH__RREEMMOOTTEE__CCAACCHHEE
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  aattttrr__ffoorrmmaatt  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











-
21
-



normal network communications between the two hosts might not re-
quire 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.

3.5  __M_a_p_p_i_n_g__a__S_e_c_u_r_i_t_y__A_t_t_r_i_b_u_t_e__i_n_t_o__a__T_o_k_e_n_

In order to map a set of security attributes into a  set  of  to-
kens, the client system translates the attributes into their net-
work representations using the DOT that was chosen for  each  at-
tribute  during  the initialization handshake, and then loads the
network representations  into  a  SSAATTMMPP__GGEETT__TTOOKK__RREEQQUUEESSTT  message.
The message is sent to the appropriate token server, which trans-
lates 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 SSAATTMMPP__GGEETT__TTOOKK__RREEPPLLYY message.

3.5.1  __T_h_e__S_A_T_M_P___G_E_T___T_O_K___R_E_Q_U_E_S_T__M_e_s_s_a_g_e__  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;

   o+ The ggeenneerraattiioonn field is not used and should be set to
     0.

   o+ The aattttrr__ssppeecc[[1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 aattttrr__ssppeecc  element. The format of each
     element is as follows:











-
22
-



        o+ The aattttrr__ttyyppee field specifies the type of
          attribute to be mapped, and may be one of the
          attribute identifiers specified in FFiigguurree 33--55
          above.

        o+ The mmiidd 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.

        o+ The  nnrr__lleennggtthh  field is the length in bytes of
          the network representation of the attribute.

        o+ The nnrr 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.
          SSeeccttiioonn 33..88 ((NNeettwwoorrkk RReepprreesseennttaattiioonn FFoorrmmaattss))
          defines how to construct a network representation
          for each attribute type.

The  token  server  receiving  the  SSAATTMMPP__GGEETT__TTOOKK__RREEQQUUEESSTT 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
aattttrr__ssppeecc  in  turn, determines the type of attribute to map from
the aattttrr__ttyyppee field, and checks that a valid DOT has been negoti-
ated  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 mmiidd and the at-
tribute type.

If a recoverable error occurs while  processing  the  attributes,
such as the lack of an agreed upon DOT or the inability to trans-
late one of the attributes, an appropriate status code is written
to   hhddrr..mmeessssaaggee__ssttaattuuss  in the reply message and processing con-
tinues 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.













-
23
-



     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.

3.5.2  __T_h_e__S_A_T_M_P___G_E_T___T_O_K___R_E_P_L_Y__M_e_s_s_a_g_e__  This message  is  sent
in response to a SSAATTMMPP__GGEETT__TTOOKK__RREEQQUUEESSTT message. It takes the fol-
lowing 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;

   o+ The  ggeenneerraattiioonn  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.

   o+ The ttookkeenn__ssppeecc[[11]] array contains an element for each
     attribute that was successfully mapped. If the status
     code returned in  header mmeessssaaggee__ssttaattuuss is equal to
     SSAATTMMPP__RREEPPLLYY__OOKK, 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:

        o+ The aattttrr__ttyyppee is the attribute type copied
          directly from the request.

        o+ The  mmiidd 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.

        o+ The  ttookkeenn field contains the server's token for
          the mapping.

   o+ The mmeessssaaggee__ssttaattuuss 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 SSAATTMMPP__RREEPPLLYY__OOKK
     does not invalidate the retrieved attributes, but
     indicates that at least one of the requested mappings











-
24
-



     was not successfully retrieved.

           Figure 3-6. SATMP_GET_TOK_REPLY Status Codes

   SSttaattuuss                        DDeessccrriippttiioonn


 SATMP_REPLY_OK            No errors were encountered  processing
the request
                           and  a  token is returned for each re-
quested mapping.
 SATMP_UNSUPPORTED_MESSAGE       Indicates        that        the
SSAATTMMPP__GGEETT__TTOOKK__RREEQQUUEESSTT
                           function is not supported by the serv-
er.
 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  rep-
resentation.
 SATMP_FORMAT_ERROR         A  format error was encountered scan-
ning the request
                           message.
 SATMP_INTERNAL_ERROR      Produced if any internal errors,  such
as lack of
                           disk  space, prevent processing of the
request message.

3.6  __R_e_c_o_v_e_r_i_n_g__t_h_e__M_a_p_p_i_n_g__f_o_r__a__T_o_k_e_n__

In order to map a set of tokens back into a  set  of  attributes,
the  client system loads the tokens into a SSAATTMMPP__GGEETT__AATTTTRR__RREEQQUUEESSTT
message. It also loads the server's generation number  associated
with  those tokens into the message and sends it to the appropri-
ate 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 SSAATTMMPP__GGEETT__AATTTTRR__RREEPPLLYY message.

If the generation number does not match the server's current gen-
eration  number,  a SSAATTMMPP__GGEETT__AATTTTRR__RREEPPLLYY message is returned with
the   mmeessssaaggee__ssttaattuuss   set   to   SSAATTMMPP__IINNVVAALLIIDD__GGEENNEERRAATTIIOONN    and
mmeessssaaggee__eessii  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.

3.6.1   _T_h_e__S_A_T_M_P___G_E_T___A_T_T_R___R_E_Q_U_E_S_T__M_e_s_s_a_g_e   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 iden-
tical in format to the SSAATTMMPP__GGEETT__TTOOKK__RREEPPLLYY











-
25
-



message with the exception that the mmiidd 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;

   o+ The ggeenneerraattiioonn field is the server's generation
     corresponding to the tokens the client wants to have
     mapped.

   o+ The ttookkeenn__ssppeecc[[11]] array contains an element for each
     token to be mapped. The format of each element is as
     follows:

        o+ The aattttrr__ttyyppee field specifies the attribute type
          of the token to be mapped and may be one of the
          attribute identifiers specified in FFiigguurree 33--55
          above.

        o+ The  mmiidd field is not used. It should be set to
          zero by the client and ignored by the server.

        o+ The  ttookkeenn field holds the token to be mapped.

3.6.2  _T_h_e__S_A_T_M_P___G_E_T___A_T_T_R___R_E_P_L_Y__M_e_s_s_a_g_e  This message is sent  by
a   token   server   to   a   client   in  reply  to  a  client's
SSAATTMMPP__GGEETT__AATTTTRR__RREEQQUUEESSTT message.  As shown below, it is  identical
in format to the SSAATTMMPP__GGEETT__TTOOKK__RREEQQUUEESSTT 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;

   o+ The ggeenneerraattiioonn field is unused but may be set equal to
     the generation number from the request for consistency.












-
26
-



   o+ The aattttrr__ssppeecc[[1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 aattttrr__ssppeecc  element. The format
     of each element is as follows:




        o+ The aattttrr__ttyyppee is the attribute type copied
          directly from the request.

        o+ The ttookkeenn field is the server token taken directly
          from the corresponding ttookkeenn__ssppeecc in the request.

        o+ The  nnrr__lleennggtthh  field is the length in bytes of
          the network representation of the attribute.

        o+ The nnrr 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.
          SSeeccttiioonn 33..88 ((NNeettwwoorrkk RReepprreesseennttaattiioonn FFoorrmmaattss))
          defines how to construct a network representation
          for each attribute type.

   o+ The mmeessssaaggee__ssttaattuuss 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 SSAATTMMPP__RREEPPLLYY__OOKK
     does not invalidate any succesfully mapped tokens, but
     indicates that at least one of the requested tokens was
     not successfully mapped.

























-
27
-



           Figure 3-7. SATMP_GET_ATTR_REPLY Status Codes

   SSttaattuuss                        DDeessccrriippttiioonn


 SATMP_REPLY_OK            No errors were encountered  processing
the request
                           and an attribute representation is re-
turned for each
                           request token.
 SATMP_UNSUPPORTED_MESSAGE       Indicates        that        the
SSAATTMMPP__GGEETT__AATTTTRR__RREEQQUUEESSTT
                           function is not supported by the serv-
er 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 at-
tribute.
 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 scan-
ning the request
                           message.
 SATMP_INTERNAL_ERROR      Produced if any internal errors,  such
as lack of
                           disk  space, prevent processing of the
request message.

3.7  __M_a_i_n_t_a_i_n_i_n_g__D_a_t_a_b_a_s_e__C_o_n_s_i_s_t_e_n_c_y__

The TSIX(RE) 1.1 SATMP protocol uses the generation  numbers  ex-
changed  during  the initialization handshake to maintain consis-
tency between all optional caches of tokens throughout  the  net-
work.   Any  compliant  TSIX(RE)  1.1  SATMP implementation which
caches tokens should always store the generation number associat-
ed  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 incor-
rect generation must flush any token cache it maintains regarding
the other host and should initiate a new token mapping handshake.

3.7.1  __T_h_e__S_A_T_M_P___F_L_U_S_H___R_E_M_O_T_E___C_A_C_H_E__M_e_s_s_a_g_e__  This  message  is
generated  by a host when it determines that a remote host is us-
ing 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 SSeeccttiioonn 22..55 above.  The
latter is likely to be the result of an administrative action in-
tended  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.












-
28
-



                     typedef struct {
                        satmp_hdr_t hdr;
                     } satmp_flush;

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

   o+ Flush all token and attribute mappings

   o+ Send a SSAATTMMPP__FFLLUUSSHH__RREEPPLLYY to the sender of the message.

   o+ Send a SSAATTMMPP__IINNIITT__RREEQQUUEESSTT to its remote token server to
     get the new generation

   o+ Send a SSAATTMMPP__IINNIITT__RREEQQUUEESSTT 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:

   o+ Flush all token mappings it has in common with the
     sender

   o+ Send a SSAATTMMPP__IINNIITT__RREEQQUUEESSTT to the sender of the message

3.7.2  __T_h_e__S_A_T_M_P___F_L_U_S_H___R_E_P_L_Y__M_e_s_s_a_g_e__  This message is returned
as a positive acknowledgement to a SSAATTMMPP__FFLLUUSSHH__RREEMMOOTTEE__CCAACCHHEE  mes-
sage.  It  takes the form shown below, with header mmeessssaaggee__ssttaattuuss
set to SSAATTMMPP__RREEPPLLYY__OOKK..

                     typedef struct {
                        satmp_hdr_t hdr;
                     } satmp_flush_reply;

3.8  __N_e_t_w_o_r_k__R_e_p_r_e_s_e_n_t_a_t_i_o_n__F_o_r_m_a_t_s__

The structure of a network  representation  is  completely  arbi-
trary,  and  is determined by the DOT defining the network repre-
sentation. It is strongly recommended, however, that the  follow-
ing  rules  be observed in order to accommodate existing TSIX at-
tribute translation tools and algorithms.

3.8.1  __A_S_C_I_I__N_e_t_w_o_r_k__R_e_p_r_e_s_e_n_t_a_t_i_o_n_s__   All  ASCII  representa-
tions are null (0) terminated strings, with the following specif-
ic formats:

Table 3-1. ASCII Network Representations

SSeennssiittiivviittyy LLaabbeell

CClleeaarraannccee












-
29
-



IInntteeggrriittyy LLaabbeell
    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.

IInnffoorrmmaattiioonn LLaabbeell
    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.

NNaattiioonnaalliittyy CCaavveeaattss
    A set of country names separated by spaces or commas.

PPrriivviilleeggee SSeett
    A set of privilege names separated by spaces or commas.

AAuuddiitt IIDD
    A user name.

DDiissccrreettiioonnaarryy IIDDSS
    The following set in order:

       o+ A null (0) terminated ASCII user name.

       o+ A null (0) terminated ASCII group name.

       o+ A  uu__iinntt1166  specifying the number, N, of
         supplementary groups. There is no guarantee that it
         will be aligned.

       o+ 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.

AACCLL
    An ACL entry consists of a _u__i_n_t_3_2, 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:















-
30
-



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

    The defined values for _a_c_l__t_y_p_e are:

    0 ACL_MODEMASK       No following string
    1 ACL_USER_OBJ       One following string specifying the own-
ing
                         user name
    2 ACL_GROUP_OBJ      One following string specifying the own-
ing
                         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 _a_c_l__c_l_a_s_s 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 _a_c_l__p_e_r_m 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.

AAuuddiitt IInnffoorrmmaattiioonn
    Additional audit information. Audit information is
    vendor- system-specific. The precise contents and format
    must be defined for each DOT.

3.8.2  __B_i_n_a_r_y__N_e_t_w_o_r_k__R_e_p_r_e_s_e_n_t_a_t_i_o_n_s__   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 long-
word, 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











-
31
-



longword, bit 32 is the LSB of the second longword, and so forth.
In  order to interoperate with such implementations, ASCII repre-
sentation is recommended.

Table 3-2. Binary Network Representations

SSeennssiittiivviittyy LLaabbeell

CClleeaarraannccee

IInntteeggrriittyy LLaabbeell
    A uu__iinntt3322  classification followed by a uu__iinntt3322
    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.

IInnffoorrmmaattiioonn LLaabbeell
    A uu__iinntt3322  classification followed by a uu__iinntt3322
    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u__iinntt3322 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.

NNaattiioonnaalliittyy CCaavveeaattss
    A caveat set is a bit mask rounded to a  uu__iinntt3322
    boundary.

 PPrriivviilleeggee SSeett
    The privilege set is a bit mask rounded to a uu__iinntt3322
    boundary.

AAuuddiitt IIDD
    The audit ID is a single  uu__iinntt3322 .

DDiissccrreettiioonnaarryy IIDDSS
    A  uu__iinntt3322  for the user ID, followed by a uu__iinntt3322   for
    the group ID, followed by a  uu__iinntt3322  for the number, N,
    of supplementary groups, followed by an N  uu__iinntt3322
     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.

AACCLL
    An ACL entry consists of a _u__i_n_t_3_2, specifying the











-
32
-



    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__i_n_t_3_2 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 _a_c_l__t_y_p_e are:

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

    The defined values for _a_c_l__c_l_a_s_s 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 _a_c_l__p_e_r_m 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 _a_c_l__p_e_r_m 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.

AAuuddiitt IInnffoorrmmaattiioonn
    Additional audit information. Audit information is
    vendor- system-specific. The precise contents and format
    must be defined for each DOT.
















-
33
-



3.9  _R_e_l_a_t_e_d__I_n_f_o_r_m_a_t_i_o_n__

   o+ SSAAMMPP -- SSeeccuurriittyy AAttttrriibbuuttee MMoodduullaattiioonn PPrroottooccooll,

   o+ TTSSIIXX((RREE)) 11..11 OOvveerrvviieeww

   o+ NNIISSTT RReeggiissttrraattiioonn ooff DDOOTT''ss aanndd DDOOII''ss

3.10  _R_e_v_i_s_i_o_n__H_i_s_t_o_r_y__

Draft 1.0 for review: September 1, 1995

       o+ Modified version of the TTSSIIXX 11..00 SSAATTMMPP
         ssppeecciiffiiccaattiioonn..

       o+ Remove references to DNSIX

       o+ New ACL format to handle POSIX ACL's.

       o+ Change bit ordering for compartments and markings
         to be compatible with standard network bit order.

       o+ Miscellaneous clarifications and editorial changes.

       o+ Reviewed at TSIG meeting Oct. 24-26, 1995.

Revision 1.1 for review: February 27, 1996

       o+ Clarified protocol descriptions reflecting comments
         from the review

       o+ Minor edits for grammar, spelling, and clarity

Revision 1.2 for review: August 1, 1996

       o+ Changes suggested by comments from Sun at the April
         meeting.





























