Multi-Level Security Labeling StatementsBecause there are many options for MLS labeling, the examples show a limited selection of statements, however there is a simple policy that will build shown in the levelrange section.sensitivityDeclare a sensitivity identifier in the current namespace. Multiple sensitivity statements in the policy will form an ordered list.Statement definition:Where:sensitivityThe sensitivity keyword.sensitivity_idThe sensitivity identifier.Example:This example declares three sensitivity identifiers:sensitivityaliasDeclares a sensitivity alias identifier in the current namespace. See the sensitivityaliasactual statement for an example that associates the sensitivityalias identifier.Statement definition:Where:sensitivityaliasThe sensitivityalias keyword.sensitivityalias_idThe sensitivityalias identifier.Example:See the sensitivityaliasactual statement.sensitivityaliasactualAssociates a previously declared sensitivityalias identifier to a previously declared sensitivity identifier.Statement definition:Where:sensitivityaliasactualThe sensitivityaliasactual keyword.sensitivityalias_idA single previously declared sensitivityalias identifier.sensitivity_idA single previously declared sensitivity identifier.Example:This example will associate sensitivity s0 with two sensitivity alias's:sensitivityorderDefine the sensitivity order - lowest to highest. Multiple sensitivityorder statements in the policy will form an ordered list.Statement definition:Where:sensitivityorderThe sensitivityorder keyword.sensitivity_idOne or more previously declared sensitivity or sensitivityalias identifiers..Example:This example shows two sensitivityorder statements that when compiled will form an ordered list. Note however that the second sensitivityorder statement starts with s2 so that the ordered list can be built.categoryDeclare a category identifier in the current namespace. Multiple category statements declared in the policy will form an ordered list.Statement definition:Where:categoryThe category keyword.category_idThe category identifier.Example:This example declares a three category identifiers:categoryaliasDeclares a category alias identifier in the current namespace. See the categoryaliasactual statement for an example that associates the categoryalias identifier.Statement definition:Where:categoryaliasThe categoryalias keyword.categoryalias_idThe categoryalias identifier.categoryaliasactualAssociates a previously declared categoryalias identifier to a previously declared category identifier.Statement definition:Where:categoryaliasactualThe categoryaliasactual keyword.categoryalias_idA single previously declared categoryalias identifier.category_idA single previously declared category identifier.Example:Declares a category c0, a category alias of documents, and then associates them:categoryorderDefine the category order. Multiple categoryorder statements declared in the policy will form an ordered list. Note that this statement orders the categories to allow validation of category ranges.Statement definition:Where:categoryorderThe categoryorder keyword.category_idOne or more previously declared category or categoryalias identifiers.Example:This example orders one category alias and nine categories:categorysetDeclare an identifier for a set of contiguous or non-contiguous categories in the current namespace.Notes:Category expressions are allowed in categoryset, sensitivitycategory, level, and levelrange statements.Category sets are not allowed in categoryorder statements.Statement definition:Where:categorysetThe categoryset keyword.categoryset_idThe categoryset identifier.category_idZero or more previously declared category or categoryalias identifiers.Note that there must be at least one category_id identifier or expr parameter declared.exprZero or more expr's, the valid operators and syntax are: (and (category_id ...) (category_id ...)) (or (category_id ...) (category_id ...)) (xor (category_id ...) (category_id ...)) (not (category_id ...)) (range category_id category_id) (all)Examples:These examples show a selection of categoryset statements:sensitivitycategoryAssociate a sensitivity identifier with one or more category's. Multiple definitions for the same sensitivity form an ordered list of categories for that sensitivity. This statement is required before a level identifier can be declared.Statement definition:Where:sensitivitycategoryThe sensitivitycategory keyword.sensitivity_idA single previously declared sensitivity or sensitivityalias identifier.categoryset_idA single previously declared categoryset (named or anonymous), or a list of category and/or categoryalias identifiers. The examples show each variation.
Examples:These sensitivitycategory examples use a selection of category, categoryalias and categoryset's:levelDeclare a level identifier in the current namespace and associate it to a previously declared sensitivity and zero or more categories. Note that if categories are required, then before this statement can be resolved the sensitivitycategory statement must be used to associate categories with the sensitivity.Statement definition:Where:levelThe level keyword.level_idThe level identifier.sensitivity_idA single previously declared sensitivity or sensitivityalias identifier.categoryset_idA single previously declared categoryset (named or anonymous), or a list of category and/or categoryalias identifiers. The examples show each variation.
Examples:These level examples use a selection of category, categoryalias and categoryset's:levelrangeDeclare a level range identifier in the current namespace and associate a current and clearance level.Statement definition:Where:levelrangeThe levelrange keyword.levelrange_idThe levelrange identifier.low_level_idThe current level specified by a previously declared level identifier. This may be formed by named or anonymous components as discussed in the level section and shown in the examples.high_level_idThe clearance or high level specified by a previously declared level identifier. This may be formed by named or anonymous components as discussed in the level section and shown in the examples.Examples:This example policy shows levelrange statement and all the other MLS labeling statements discussed in this section and will compile as a standalone policy:rangetransitionAllows an objects level to transition to a different level. Generally used to ensure processes run with their correct MLS range, for example init would run at SystemHigh and needs to initialise / run other processes at their correct MLS range.Statement definition:Where:rangetransitionThe rangetransition keyword.source_type_idA single previously declared type, typealias or typeattribute identifier.target_type_idA single previously declared type, typealias or typeattribute identifier.class_idA single previously declared class or classmap identifier.new_range_idThe new MLS range for the object class that is a previously declared levelrange identifier. This entry may also be defined as an anonymous or named level, sensitivity, sensitivityalias, category, categoryalias or categoryset identifier.Examples:This rule will transition the range of sshd.exec to s0 - s1:c0.c3 on execution from the init.process:mlsconstrainThis is described in the Contraints section.mlsvalidatetransThis is described in the Contraints section.