Security Attribute Modulation Protocol
Revision 1.2: August 1, 1996
TSIX(RE) 1.1 hosts label all user data transferred between them. The attributes are transferred between the communicating hosts in a special header created by the network protocol stack on the sending host and inserted into the data stream passed to the underlying transport protocol, either UDP or TCP. The receiving host removes the header, attaches the retrieved attributes to the data, and uses the attributes for access checks before granting the receiving process access to the data.
The protocol used for passing attributes is called the Security Attribute Modulation Protocol (SAMP). The communicating hosts may agree, via the token mapping protocol, to send all, some, or none of the security attributes from the following set:
SAMP Protocol Specification
SAMP Header Format
The TSIX(RE) 1.1 SAMP header has the following structure:
struct t6samp_header {
u_int16 samp_type;
u_int16 samp_version;
u_int32 samp_length;
struct t6samp_attr_spec {
u_char attr_type;
u_char attr_length;
u_int32 reserved;
u_char token_type;
u_char token_generation[3];
u_int16 token_mask;
u_int32 tokens[variable];
} samp_attributes;
}
The samp_attributes describes the attributes associated with this SAMP header:
Figure 2.1 SAMP Header Mask Values
Value Description
0x0001 Sensitivity label
0x0002 Nationality Caveats
0x0004 Integrity label
0x0008 TSIX Session ID
0x0010 Clearance
0x0020 Process Access Control List (ACL)
0x0040 Information label
0x0080 Privilege set
0x0100 Login (audit) ID
0x0200 Process ID
0x0400 Discretionary ID
0x0800 Additional client audit info
0x1000 Process Attributes
0x2000 Reserved for future use
0x4000 Reserved for future use
0x8000 Reserved for future use
The SAMP passes security attributes as arbitrary four octet token values. Using tokens to represent attributes conserves space within the data stream and allows the attributes to be presented in a vendor neutral format. Before a SAMP header with attributes can be sent to a remote host, the security attributes must be converted into a corresponding set of tokens, for example:
Attribute Token
---------------- ------------
SL = TS AB --> 0xdeadbeef
IL = TS --> 0xfeedf00d
Discretionary IDS --> 0x0deadbee
uid = Agent_X
gid = Special_force
groups = Special_force
Accounting
This document assumes that the TSIX(RE) 1.1 Security Attribute Token Mapping Protocol (SATMP) is the mechanism used to generate tokens. The SATMP provides the following features:
Figure 2.2 shows a sample packet with a TSIX(re) 1.1 SAMP header. SAMP headers are used on TCP and UDP data communications between TSIX hosts. SAMP headers are not included in protocols other than TCP and UDP. Access by applications to lower-layer protocols, such as raw IP or ICMP, or to other transport layer protocols that do not incorporate SAMP, should be limited to processes with appropriate privileges, as determined by the site security policy.
Figure 2.2 A TSIX(RE) 1.1 UDP SAMP Packet
_______________________________
| | ip_len| | IP Header
|.......|.......|...............| (ip_len=20+[CIPSO]+udp_len)
| CIPSO Label (optional) |
|_______________________________|
_______________________________
| |udp_len| | UDP Header
|_______|_______|_______|_______| (udp_len=8+samp_length)
_______________________________
| 2 | "01" | samp_length | SAMP Header
|.......|.......|.......|.......| (samp_length=8+24+data_length)
|134| 24| 00000000 |
|...|...|...............|
| 3 |Generation | 0x0091|
|...|...........|.......|
|...............| Sensitivity Label Token
|...............| Clearance Token
|_______________| Privileges Token
_______________________________
| | Application
| | Data
|_______________________________|
Figure 2.3 shows a UDP packet sequence. UDP datagrams contain autonomous, indivisible messages that are both written and read with a single operation. That is, a UDP datagram cannot be written or read in pieces. Because the sending process's security attributes cannot be changed part way through writing a datagram, each datagram must contain a single SAMP header specifying the full set of security attributes associated with the sending process. The header must be positioned immediately following the UDP header as the first octets of UDP data.
UDP broadcast packets present a problem. If UDP packets are broadcast with SAMP headers on a network consisting of both TSIX and non-TSIX hosts, then only the TSIX hosts will be able to process them. This is particularly problematic for UDP routing protocols, where all of the routers and hosts on a network need to process the routing packets. The recommended approach, therefore, is to not use SAMP headers when sending UDP packets to a broadcast address. Likewise, a receiver should not expect SAMP headers on packets with a broadcast destination address.
Figure 2.3 A UDP SAMP Packet Sequence
_________________________ _________________________
|UDP/IP|SAMP+Tokens| Data | |UDP/IP|SAMP+Tokens| Data |
|______|___________|______| |______|___________|______|
: : : : : :
: :<--samp_length--->: : :<--samp_length--->:
:<-------ip_length------->: :<-------ip_length------->:
TCP provides a continuous stream of data between a sending and receiving process. Data may be sent by a process in chunks of arbitrary size spanning any number of send operations. The underlying network does not recognize any divisions within the data stream, and will actually transmit the data broken into packet lengths that it finds most convenient, guaranteeing only that the data is made available to the receiving process in the same byte order that it was written by the sending process. The receiving process can then read that data in whatever sized chunks it finds most convenient.
SAMP Data SAMP Data SAMP Data
|----|-----------|----|-------------|----|------------|
: Packet : Packet : Packet : Packet :
:................:.........:..........:...............:
It is possible that the effective security attributes associated with the sending process may change between send operations, perhaps to reflect a change in the process privilege state or a float of its information label. To track the attribute state of the sending process, the following rules must be observed when using SAMP with TCP:
Figure 2.4 A Null Attribute SAMP Header
_______________________________________________________
| 2 | "01" | 14+Data Length|134| 6 | 00000000 |
|.......|.......|...............|...|...|...............|
| Application Data |
|_______________________________________________________|
Figure 2.5 A TCP Packet Sequence
________________________
|TCP/IP|SAMP+Tokens |
|______|_________________|
: : :
: :<--samp_length-->:
:<---ip_length---------->:
______________________________________________________________
|TCP/IP|SAMP+Tokens| Data |Null SAMP| Data |SAMP+Tokens| Data |
|______|___________|______|_________|_______|___________|______|
: : : : :
: :<--samp_length--->:<--samp_length-->:<--samp_length--->:
:<----------------------ip_length----------------------------->:
_______________________________________________________________
|TCP/IP|SAMP | Data |TCP/IP| Data |SAMP| Data |
|______|_____|_________|______|________________|____|___________|
: : : : : : :
: :<--------------< <---samp_length->:<--samp_length->:
:<--ip_length--------->:<------------ip_length----------------->:
How SAMP headers are spaced within the TCP data stream is implementation specific. For example, if an application writes 1000 characters one at a time to a TCP connection and its attributes do not change between writes, one of the following techniques, or a combination, might be used:
The first approach requires more processing and network bandwidth to prepare all of the SAMP headers. The second destroys the timeliness of the transactions, since the data is only sent after the process has finished all 1000 writes. The third approach preserves the timelineness of the transactions and reduces the SAMP header overhead, but removes advantages gained by overlapping TCP data segments.