The sign-in experience
Brands
On this page
Introduction
People decide whether a sign-in page is genuine partly by how it looks. A "brand" gives Signari's pages your product name, your logo, a support link and four colours, without changing the pages themselves. An instance has one, and each organisation on it can have its own over it.
Signari checks the colours' contrast before it accepts them, so the text stays readable. To change more than this, such as the layout of the page, see theming.
Check a set of colours first. signari brand check prints the contrast of each
pair:
Shellsignari brand check \ -brand-primary '#0b5fff' -brand-on-primary '#ffffff' \ -brand-background '#ffffff' -brand-text '#18181b' text on the background 17.74:1 comfortable (AAA) button text on the button 5.14:1 readable (AA)readable (WCAG 2.1 AA needs 4.5:1 for body text)
Then set the brand for the instance:
Shellsignari brand set -issuer https://auth.example.com \ -brand-name "Acme Identity" \ -brand-logo https://acme.example.com/logo.svg \ -brand-support https://help.acme.example.com \ -brand-primary '#0b5fff' -brand-on-primary '#ffffff' \ -brand-background '#ffffff' -brand-text '#18181b'
It takes effect on the next page render. No restart.
Tokens, never CSS
Signari does not take custom CSS. A text box holding CSS would be stored cross-site scripting on the sign-in page.
CSS can pull resources from anywhere. Attribute selectors with url()
exfiltrate the page's own state a character at a time. And an administrator who
can restyle the sign-in form can restyle it into one that looks identical and
posts somewhere else, on the page where people judge whether a site is genuine.
So a brand is a fixed set of tokens. Every colour is validated as a hex literal
before it is stored, again by a database constraint, and a third time before it
reaches the stylesheet. There is no path from a brand to arbitrary markup or
arbitrary style rules, and a test feeds #1a2b3c;} body{display:none through
the emitter to prove it.
Contrast is checked
The contrast ratio is arithmetic, from the relative luminance defined in the Web Content Accessibility Guidelines (WCAG) 2.1, so it is checked when the colours are set:
Textsignari: button text on the button has a contrast ratio of 4.48:1, below the4.5:1 needed to be readable (WCAG 2.1 AA). #ffffff against #777777. Darken oneor lighten the other
#777777 fails and #767676 passes. They are one shade apart, which is too
close to judge by eye.
The threshold is 4.5:1, the level for body text, rather than the 3:1 allowed for large text. The text that matters on these pages is body text: field labels and the reason a sign-in was refused.
All four colours or none
A partial palette is refused. A custom background against a default text colour can make a page unreadable, so the four colours are set and checked together.
An organisation's own
Set an organisation's name and logo, show what it has, or remove it:
Shellsignari brand set -org <uuid> -brand-name "Bravo" -brand-logo https://bravo.example/logo.svgsignari brand show -org <uuid>signari brand remove -org <uuid>
The same through PUT /admin/organizations/{orgID}/brand, which a token of that
organisation may call, under brand: in a configuration file,
and on the console's Brand screen. Contrast is checked the same way on all of them.
What an organisation leaves out falls through to its instance: the name, the logo and the support link one at a time, the four colours together, because a background from one brand under the text of another is a pair whose contrast was never checked. Above, Bravo keeps the instance's colours.
A page takes the organisation of what it is answering, in this order:
- the client of the authorization request it is part of, so a person signed in at one organisation who follows another's application reads that other one's page;
- the sign-in it is part way through, which is how the second-factor page knows;
- the session it came with;
- the instance's organisation, when it has only one.
A bare /login on a deployment of several matches none of these and wears the
instance's appearance. It does not guess: a wrong guess shows one customer another
customer's logo. Mail wears the look of the organisation it is sent for.
A separate hostname still needs a separate instance: this changes what a page looks like, not whose address it is at.
An organisation's words
Reword one message for an organisation, list the messages it has reworded, or remove one:
Shellsignari message set -org <uuid> -locale en -message-key login.heading -message-text "Sign in to Bravo"signari message list -org <uuid>signari message remove -org <uuid> -locale en -message-key login.heading
signari i18n keys prints every key. The same through
PUT /admin/organizations/{orgID}/messages/{locale}/{key}, a token of that
organisation may call it, under messages: in a configuration file,
and on the console's Messages screen. It takes effect on the next render, on the
pages and in the mail of that organisation alone.
These are an organisation's, so they are not trusted the way the catalogue is: a message
in the catalogue may carry a link, and one of these is plain text, escaped on the
way to the page, so whoever may set it can change what a page says and not what it
does. It may use the placeholders the message it replaces is given, as
{Client} in consent.title. These are refused rather than stored: a key nothing
renders, a language with no catalogue, a placeholder the message is never given, and
a message that counts something, as it has a form for each number and this is one
line. Reword those, and add a language, in a theme instead.
The pages a browser reads rather than a person do not say them: the Security
Assertion Markup Language (SAML) POST form, form_post, WS-Federation and
Front-Channel Logout. Each is on the path that signs
somebody in to an application, and a theme can still reword them.
An organisation's pages
A theme directory (see theming) may hold a directory per organisation, named by its slug, laid over the deployment's theme page by page and message by message:
Texttheme/ layout.html everybody's locales/en.json orgs/ bravo/ layout.html Bravo's people, and nobody else's locales/en.json locales/de.json a language only Bravo's readers are offered
Copy out the built-in layout to start Bravo's from, and check the whole directory:
Shellsignari theme eject -theme-dir ./theme/orgs/bravo -theme-page layoutsignari theme check -theme-dir ./theme # checks every organisation's too
It lives on the deployment's own disk, not behind an organisation's token. It is read once at startup, and it follows every rule of a theme. A file that fails validation is refused for that page, and the deployment's page is served in its place. A directory that fails altogether loses that organisation its theme, and affects no other organisation. A directory naming no organisation is logged at startup. Two instances served by one process read one theme directory, so organisations of theirs that share a slug share a directory.
On a page, an organisation's stored words are said over its theme's. Rendering them
parses that page for the render, because a template's T is bound when it is parsed
and the parsed pages are shared: a page's worth of parsing, on pages people read, and
only for an organisation that has reworded something.
What it touches
Every page rendered by the engine: sign-in, consent, multi-factor authentication (MFA) enrolment and challenge, recovery, the device flow, the account page and the application portal. The colours are injected into the rendered page rather than referenced by each template, so no page can be missed. A sign-in page in default colours followed by a consent page in the customer's colours would look as though one of the two was not theirs.
The logo appears at the top of every page a person reads. The support link appears on the sign-in page too, but only alongside a failure, when the person may need help.
The top of the page shows one owner at a time. A configured logo appears alone. A product name with no logo appears as text, because the product name is what replaces "Signari". With neither, the page shows the Signari wordmark, drawn inline so it needs no request.
img-src https: is added to the Content-Security-Policy only when a logo is
configured. An unbranded deployment keeps default-src 'none'.