Login banners

Administrators can configure messages that users see right after they log in and before they can use the application, for example a maintenance notice, a usage policy, or a security warning.

Login banners are shown only when security is enabled.

The banner is a client-side overlay that users click through. It is not a security control: the application’s APIs remain reachable underneath it. The acknowledgement of each banner is written to the session audit log (see Auditing), which provides an audit trail unless auditing is turned off for that banner.

How banners are shown

  • Each user sees each banner once per login session. Banners are shown one after the other, each with a Continue button unless the banner hides it.

  • If a banner defines an automatic dismissal time, a countdown is shown and the banner closes by itself when it ends. Users can still click Continue to close it earlier, unless the button is hidden. The countdown keeps running when the browser tab is in the background.

  • A banner that is edited is shown again to users who already acknowledged the previous version.

  • The acknowledgements are kept in the browser and are shared by all the browser tabs of the login session, so opening a new tab does not show the banners again. They are removed when the user logs out, the session expires, or the user logs in again.

  • The banner is not shown on the login page or when the page is rendered by an automated, headless browser (for example, a scheduled report snapshot).

Images

Images can be included in a message with the usual Markdown syntax:

  • ![alt text](https://host/path.png) for images on an external host.

  • ![alt text](/images/notice.png) for images served with the application (an absolute path). Paths without a leading slash, for example images/notice.png, are not supported.

It is recommended to always include alt text: it is shown to assistive technology and as a fallback if the image cannot be loaded.

Because banner messages are written by administrators, they are trusted input. An external image sends a request to the external host every time a user views the banner: the host can see that the banner was viewed, and when, but not which page the viewer was on. For anything sensitive, use an image on a host that the organization controls.

Images are constrained to the width of the banner: a large image is scaled down instead of breaking the layout.

Style blocks

You can group a block of the message and apply a couple of styles to it, for example to center a heading and its text, or to limit its width. To do so, wrap the block in a style fence:

:::style text-align:center

### Planned maintenance

We will be down on Saturday.

:::end

A style fence starts with a :::style <declarations> line and ends with a :::end line. The rules are:

  • Each fence line must be a line on its own, separated from the surrounding text by blank lines. A :::style or :::end that appears in the middle of a line of text is shown as plain text.

  • end closes the most recent still-open fence, so style blocks can be nested.

  • Only the following declarations are supported (any other declaration prevents the fence from being applied):

Declaration Example value

text-align

center (any CSS value, for example start, end, left, right)

max-width

400px or 50% (any CSS value)

margin

0 auto or 10px 0 (any CSS value)

  • Separate multiple declarations with a semicolon (;).

  • Declaration values are not checked: a value the browser ignores has no effect, which you can see in the live preview before you save.

A fence with an unknown or mistyped declaration, or a fence that is not closed, is not applied: the fence lines are shown as plain text so the mistake is visible in the preview. Nesting example:

:::style text-align:center; max-width:400px

:::style max-width:280px

Only this part is narrow.

:::end

Centered again, back to the outer width.

:::end
To show an image smaller than the banner and centered in it, wrap the image in a style fence that limits the width and centers the block with margin:0 auto. Because images are scaled down to the width of the block they are in, this shrinks and centers the image at once:
:::style max-width:320px; margin:0 auto; text-align:center

![Siren logo](/images/siren-logo.png)

:::end

Managing banners

Administrators manage the banners in the Management > Login banners page. Each banner has the following properties:

Property Description

Title

Optional (up to 200 characters). If empty, the banner shows only its message, and the management page identifies the banner by the first three words of its message.

Message

The message, written in Markdown (up to 10000 characters). Raw HTML is not rendered. Links open in a new tab. Images can be included from the same origin or from external http(s) URLs; because banner content is written by administrators, external images load remote content when users view the banner.

Enabled

Disabled banners are never shown.

Start and end time

Optional schedule. The times are stored in UTC and displayed in the browser’s time zone. The banner is shown from the start time (inclusive) until the end time (exclusive).

Roles

Optional list of roles. If the list is empty, the banner is shown to everyone. Otherwise, it is shown to users who have at least one of the listed roles, either an Elasticsearch role or an access control role. To hide a banner from a role, list all the other roles.

Automatic dismissal

Optional number of seconds (1-300) after which the banner closes by itself. If not set, users must click Continue.

Allow user to dismiss message

Available only when automatic dismissal is set. When turned off, the banner has no Continue button and stays on screen until the countdown ends.

Continue button label

Optional text of the button, up to 50 characters, for example I accept for a disclaimer. If empty, the button reads Continue.

Log acknowledgements

On by default: each acknowledgement of the banner is logged (see Auditing). Not available, and always off, when automatic dismissal is set, because users may not have read the banner. When off, a warning is shown in the form, Siren Investigate stores no acknowledgement for the banner, and the banner is marked Not audited in the list.

Priority

Banners with a higher priority are shown first.

The status of each banner is shown in the list as Active, Scheduled, Expired, or Disabled.

Auditing

The creation, modification, and deletion of banners is logged as a saved object operation of type login-banner when this type is included in logged_saved_object_types (see Auditing user sessions). Each acknowledgement of a banner with Log acknowledgements turned on is logged as a security entry with the action login-banner-acknowledged and the identifier of the banner.

Acknowledgements are stored only when auditing is enabled (siren_audit.enabled: true) and security is included in logged_types (see Auditing user sessions). Otherwise, no acknowledgement is stored for any banner, whatever its Log acknowledgements setting: the banner form shows a warning and every banner is marked Not audited in the list. The setting is kept, and applies again once auditing is enabled.

High availability

Banners are stored in the Siren Investigate index, so every node serves the same banners. Changes made on one node can take up to 15 seconds to be visible on the others.