Document classification capabilities
6 min
document classification capabilities provides the ability to manage protective markings to emails email+ lists user interface fields to the user when viewing messages, replying to messages, or composing new messages the messages that are sent through email+, adds the markings to the subject line, header, and optionally on the top and the bottom of message body email+ supports protective marking standard for the australian government (2012 and 2018 versions) and generic classification to identify the overall sensitivity of the message distribution limiting markers to limit the distribution email classification json has two major parts scheme values scheme scheme includes properties to define email classification behavior the following table describes the general properties property description topofbody email classification marker to add text at the top of a classified message can include $sec$, $dlm$, $title$, $caveat$ variables default value for au 2018 {"default" "$sec$, $caveat$, $dlm$", "nosec" "$dlm$, $caveat$", "nodlm" "$sec$, $caveat$", "nocaveat" "$sec$, $dlm$" } default value for au 2012 {"default" "$sec$, $dlm$", "nosec" "$dlm$", "nodlm" "$sec$"} to remove the header and footer the "topofbody" and "bottomofbody" value should be set to an empty value {} or {"default" ""} bottomofbody email classification marker to add text at the bottom of a classified message can include $sec$, $dlm$, $title$, $caveat$ variables default value for au 2018 {"default" "$sec$, $caveat$, $dlm$", "nosec" "$dlm$, $caveat$", "nodlm" "$sec$, $caveat$", "nocaveat" "$sec$, $dlm$" } default value for au 2012 {"default" "$sec$, $dlm$", "nosec" "$dlm$", "nodlm" "$sec$"} to remove the header and footer "topofbody" and "bottomofbody" values should be set to an empty value {} or {"default" ""} bodytextcolor email classification marker to apply color to the the text in "topofbody" and "bottomofbody" text in #aarrggbb or #rrggbb format text value default value "#ffff0000" examples #ff0000, #a2ff230c; default email classification marker to apply a default value format { "sec" "existing sec value", "dlm" "existing dlm value" } should be one of the markers defined in "values" if value is not set or marker does not exists "" will be used textalert warning message to display when a user is trying to send message without selected classification text value default "classification is required" textrequired warning text to display in "#ffff0000" color instead of classification marking while classification is not selected text value default "classification is required" lockdlm when set to "true" only markers with the same dlm as in original message should be available to select boolean value default "false" multiselectfield the fields from "multiselectfield" json array supports multiple selections the default value is empty when multiple values are selected $field$ notation is replaced with the appropriate values separated with "multiselectseparator" text "multiselectseparator" default value is ", " version properties version properties defines which classification type will be used when version is not defined generic classification will be used version defines email classification type supported version " au " or " au 2012 " for email protective marking 2012 standard and " au 2018 " for email protective marking 2018 standard for the australian government versionvalue defines version number used for sending classification default value for "au" and "au 2012" "ver=2012 3,ns=gov au" with "au 2018" "ver=2018 1,ns=gov au" is used values values is used to define a list of email classification markings one of the following values must be presented in values field, that is they are optional in place where we substitute them (subject, body, mime headers and so on) sec single sec or array of sec values dlm single dlm or array of dlm values with au 2018 version should be used for the access(information management marker) values caveat single caveat or array of caveat values one of "sec" or "dlm" must be presented in "values" item when "sec" or "dlm" value is array all the permutations of "sec" + "dlm" should be used priorities are in ascending order from top to bottom, from left to right json is considered invalid and classification markers are not displayed when the values for sec or dlm is empty or duplicated when values item defines a single classification marking that the next properties can be set such as title defines text to use for marking title in the classifications picker when the classification is a single value valid classification for au 2018 contains only sec, caveat , access sec, caveat sec, access sec where ( ) is for one or several items) a regular expression for au 2018 subject \[(sec=\<securityclassification>)(, caveat=\<caveattype> \<caveatvalue>) (, expires=(\<gendate>|\<event>), downto=(\<securityclassification>)?(,access=\<informationmanagementmarker>) ] header x protective marking ver=\<ver>, ns=gov au, (sec=\<securityclassification>)(, caveat=\<caveattype> \<caveatvalue>) (, expires=(\<gendate>|\<event>), downto=(\<securityclassification>)?(, access=< informationmanagementmarker>) (, note=\<comment>)?, origin=\<authoremail> the following is example for the australian classification { "scheme" { "topofbody" {"default" "$sec$, $caveat$, $dlm$", "nocaveat" "$sec$, $dlm$", "nodlm" "$sec$, $caveat$", "onlysec" "$sec$"}, "bottomofbody" {"default" "$sec$, $caveat$, $dlm$", "nocaveat" "$sec$, $dlm$", "nodlm" "$sec$, $caveat$", "onlysec" "$sec$"}, "bodytextcolor" "#ffff0000", "version" "au 2018", "versionvalue" "ver=2018 1,ns=gov au", "default" { "sec" "official" }, "lockdlm" "true", "multiselectfield" \["dlm"], "multiselectseparator" ", " }, "values" \[ { "sec" "unofficial", "title" "unofficial" }, { "sec" "official", "title" "official" }, { "sec" "official\ sensitive", "dlm" \["","personal privacy","legal privilege","legislative secrecy"] }, { "sec" "protected", "dlm" \["","personal privacy","legal privilege","legislative secrecy"], "caveat" \["","sh\ cabinet"] } ] } for generic classification the following properties must be defined subjectsuffix suffix that is appended to subject when sending an email can include $sec$, $dlm$ variables format {"default" "$sec$, $dlm$", "nosec" "$dlm$", "nodlm" "$sec$"} default {"default" "\[$sec$]"} xheadername email header that is added to an email on reply and forward will overwrite the original header if its protection header cannot be parsed text value default "x classification" xheadervalue value for "xheadername" can include $sec$ variable format {"default" "$sec$, $dlm$", "nosec" "$dlm$", "nodlm" "$sec$"} default {"default" "\[$sec$]"} the following is an example of generic classification { "scheme" { "subjectsuffix" {"default" "\[$sec$]"}, "topofbody" {"default" "$sec$, $dlm$", "nosec" "$dlm$", "nodlm" "$sec$"}, "xheadername" "x classification", "xheadervalue" {"default" "\[$sec$]"}, "default" { "sec" " public " } }, "values" \[ { "sec" " public ", "title" "all external email" }, { "sec" " internal ", "title" "bb\&t internal email" }, { "sec" " secret ", "title" "bb\&t secret email" } ] } the email classification markers consists of json formatted data the following table describes the generic classification and sample format classification value sample format fields array of json objects of the classification field configurations name the name is a combination of alphabets and numbers the first letter of the name should be in uppercase title the text that is displayed to a user in classification picker it consists of letters, numbers, and spaces the default value is equal to name value (optional) description the text displayed in the classification picker, to provide users with more information about the field the default value is an empty string (optional) required when set to "true" a user is required to select a value for this field boolean the default value is set to false (optional) onreply possible values upgrade only allows to upgrade this classification field on email reply lock prevents from changing this classification field on email reply (optional) any allows any change to this classification field on email reply the default value is set to "any" (optional) allowcustomvalue when "true" a user would be able to add a custom value manually in the picker possible only when "onreply" is "any" boolean the default value is set to false (optional) selectionsmaxnumber \ when enabled, you can select multiple field values the default value is set to 1 "fields" \[ { "name" "sec", "type" "text", "title" "security classification", "description" "", "onreply" "upgrade only" }, { "name" "access", "title" "information management marker", "parent" "sec", "required"\ false, "onreply" "lock" }, { "name" "caveat", "title" "caveat", "required"\ false, "allowcustomvalue"\ true } ] values array of json objects of the classification fields values $fields name$ array on the classification values for the appropriate field the same field name can be declared multiple times for the unique "parentrange" value a value to be used for the specific classification marking must not contain semi colons or be comprised of only spaces must be declared in the priority order, from the least secure to the most (required) title the text that is displayed as a classification value in the picker the default value is equal to "value" (optional) description the text that is displayed as a description to the specific classification value the default value is an empty string (optional) defaultvalue classification selected by default on a message compose start object of the field value pairs the default is an empty field conditionality defines the dependencies between different fields one field may be dependent just to a single another one target defines a parent field and its values in "field" \["value 1", ,"value n"] format dependent defines a child field with a list of values that a user would be shown when any of the "target" fields is selected "values" \[ { "sec" \[ { "value" "unofficial", "title" "unofficial", "description" "non work related email" }, { "value" "official", "title" "official", "description" " work related emails that do not carry a security classification" }, { "value" "official\ sensitive", "title" "official\ sensitive", "description" "sensitive but not security classified information" }, { "value" "protected", "title" "protected" }, { "value" "secret", "title" "secret" }, { "value" "top secret", "title" "top secret" }, ], }, { "access" \[{"value" "personal privacy"}, {"value" "legal privilege"}, {"value" "legislative secrecy"}] }, { "caveat" \[{"value" "sh\ cabinet", title "cabinet"}, {"value" "rel\ au", title "australia"}], } ], "defaultvalue" {"sec" "official", "access" "personal privacy" }, "conditionality" \[ { "targetfield" "sec", "dependentfield" "access", "dependencies" \[{"targetvalues" \["official","official\ sensitive","protected","secret","top secret"], "dependentvalues" \["personal privacy","legal privilege","legislative secrecy"]}] }, { "targetfield" "sec", "dependentfield" "caveat", "dependencies" \[{"targetvalues" \["protected","secret","top secret"],"dependentvalues" \["sh\ cabinet","$custom$"] } ] }, ] } sendoptions json object that defines the actions that would be applied to a message while sending and to a new event after creation xheader object to define the x header key and value to be sent with each email optional subjectsuffix text to be appended to a classified message subject bodyheader and bodyfooter formatted text to be appended to the start or the end of a message before an email sending optional text text in special formatting "\\\n" is resolved as a new line within the text required color defines text color in #rrggbb optional, default "#000000" alignment defines text alignment with "left"|"center"|"right" values optional, default "left" style defines text style in html style format when defined, "color" and "alignment" properties would be ignored conditions allows to modify "bodyheader" or "bodyfooter" values ("text", "color", "alignment") depending on "when" condition when includes a field name and values on an email sending with any of these classification values, a property from "result" would override the original "bodyheader"/"bodyfooter" properties allownotclassified boolean value that identifies if email can be sent without classification selected boolean optional default value "false" "sendoptions" { "subjectsuffix" "\[(sec=$sec value$){, }(access=$access value$){, }(caveat=$caveat value$){, }(caveat=$caveat value 1$){, }(caveat=$caveat value 2$)]", "bodyheader" { "text" "($caveat title$ $caveat value$){, }($caveat value 1$){, }($caveat value 2$)", "color" "#000000", "alignment" "center", "conditions" \[{"when" {"sec" \["protected"]},"result" {"color" "#ff0000"}}] }, "bodyfooter" { "text" "($caveat title$ $caveat value$){, }($caveat value 1$){, }($caveat value 2$)", "color" "#000000", "alignment" "center", "conditions" \[{"when" {"sec" \["protected"]},"result" {"color" "#ff0000"}}] }, "allownotclassified"\ true } receivemarking defines a list of patterns to parse classification from a received message the order in which the patterns are applied is defined in "priorities" xheaderpatterns rules to parse classification value from the x header the x header key is searched by "headername" values with left to right priority (optional) subjectsuffixpatterns rules to parse classification value from an email subject boundaries define the range of characters in the subject to check for the classification the "rules" are applied to the text starting from the first inclusion of "start" text and the last of "end" whole subject is checked when not defined (optional) priorities defines which patterns to fetch classification value the default value is set to "priorities" \["xheaderpatterns","subjectsuffixpatterns"] (optional) "receivemarking" { "priorities" \["xheaderpatterns","subjectsuffixpatterns"], "xheaderpatterns" { "headername" \["x protective marking", "x classification"], "rules" \["sec=$sec$", "sec=$sec$", "sec $sec$", "sec $sec$", "access=$access$", "access=$access$", "access $access$", "access $access$", "caveat=$caveat$", "caveat=$caveat$", "caveat $caveat$", "caveat $caveat$"], "separatorregex" "\[^a za z\d\\ \s]" }, "subjectsuffixpatterns" { "rules" \["sec=$sec$", "sec=$sec$", "sec $sec$", "sec $sec$", "access=$access$", "access=$access$", "access $access$", "access $access$", "caveat=$caveat$", "caveat=$caveat$", "caveat $caveat$", "caveat $caveat$"], "boundaries" {"start" "\[", "end" "]"}, "separatorregex" "\[^a za z\\\d\\\\ \\\s ]" } }, version version value should be defined to differ between json schemas (required) classification version 2 0 0
