Renders a US-Government-style classification banner above the room header, driven by a JSON configuration stored
in the ABAC_Classification_Banners_Config admin setting (Admin → ABAC → Settings), toggled by
ABAC_Classification_Banners_Enabled. Rocket.Chat 8.8 and 8.9 show it in ABAC-managed rooms only;
9.0 adds optional banners for every other room.
In 8.8 and 8.9 the configuration is a public setting: it syncs to every logged-in client, and the banner is
computed client-side from the room's abacAttributes, so any logged-in user can read the full
configuration (all source keys and value→label/color mappings). In 9.0 the setting is private: the server
computes the banner and sends only the result with the room (rooms.info).
Configuration schema
Both versions use version 1 of the configuration, described by the JSON Schema with
$id: https://rocket.chat/schemas/classification-banners/v1.json
(published in the Rocket.Chat repository at ee/packages/abac/docs/classification-banners.schema.json).
Rocket.Chat checks the document against it when the setting is saved.
9.0 adds the optional nonAbacBanner list without a version bump, so every 8.8 document stays valid
in 9.0. The reverse does not hold: the schema forbids unknown properties, so an 8.8 or 8.9 server rejects a
document that carries nonAbacBanner. Pick the target version with the toggle in the header; in
8.8 / 8.9 mode the builder leaves nonAbacBanner out of the JSON.
Semantics
-
Segments — one per attribute with
showInBanner: true, in array order, joined by
banner.delimiter. An attribute contributes a segment when the room has at least one value for the
room attribute whose key equals attributes[].source. Values matching a values[].source
entry render as their mapped label; unmapped values render as the raw value.
-
Segment text — value labels (mapped label, or raw value when unmapped) joined by
valueSeparator;
unmapped values always come after the mapped ones. With
showLabel: true the segment is prefixed with bannerLabel + labelSeparator. With
sortAlpha: true labels are sorted alphabetically. When groupThreshold > 0 and the
matched value count reaches the threshold, the value list collapses to multipleLabel.
-
Color — the single attribute with
drivesColor: true picks the banner background. Its
values array is ranked most restrictive first — index 0 = highest ranking (same convention
as Virtru HIERARCHY attributes). colorMode: "highest" selects the highest-ranked matched
value (earliest in the array); "attribute" selects the first of the room's values that is mapped.
The foreground color is computed for readable contrast (WCAG relative luminance). If the driver attribute has
no matched values, banner.fallbackColor is used. Unmapped values never drive color.
-
Fallback — when no attribute produces a segment, the banner renders
banner.fallbackText on
banner.fallbackColor.
-
Non-ABAC rooms (9.0+) — for a room that is not ABAC managed, the first enabled
nonAbacBanner entry whose match fits the room is shown; when none fits, the first
enabled entry without a match is the default, wherever it sits in the list. A match holds when every
property it sets holds: type lists the allowed room types (direct covers DMs and group
DMs, public, private), and federated, discussion and
team must equal the room's flag. The entry renders its text on its color
with the global uppercase and monospace options. Without nonAbacBanner these rooms show no banner.
Omnichannel rooms never show a banner.
- Style —
banner.style must be classic, a single centered line.
enabled: false in the JSON hides every banner, like the admin toggle.
- The banner always renders above the room header.
- Config changes require no server restart.
Cross-field rules
These rules are part of the v1 contract but cannot be expressed in the JSON Schema, so Rocket.Chat does not check them on save. This builder does:
- Exactly one attribute has
drivesColor: true.
attributes[].id values are unique; within an attribute, values[].source are unique.
multipleLabel is required when groupThreshold > 0.
bannerLabel is required when showLabel: true.
Example
The bundled example reproduces the design prototype's default state. For a room with
clearance.level = [TS], access.programs = [SAP-1042, SAP-2271, SAP-3380],
dissem.relto = [USA] it renders TOP SECRET // SAR-APPLES/BANANAS/ORANGES // RELTO USA on
the Top Secret orange. In 9.0+ it also gives federated rooms an UNCLASSIFIED // EXTERNAL banner and
every other non-ABAC room an UNCLASSIFIED one. Use Load example to open it in the builder and
copy its JSON.