Skip to main content

How sign-in works

Delegaris has no user list of its own. People sign in with an account they already have, and the groups that account belongs to decide what they can do. This page explains the ways in, how they work together, and how someone becomes an administrator.

The ways in​

Way inWho it is forWhat people type or press
Active DirectoryOrganisations with on-premises ADTheir Windows username and password. See Active Directory
Microsoft Entra IDOrganisations on Microsoft 365 / EntraThe Sign in with Microsoft button. See Entra ID
Local administratorThe person setting Delegaris up, and emergenciesadmin and the password from LOCAL_ADMIN_PASSWORD. See Local administrator

There is also a fourth kind, demo accounts (DEMO_USERS), which exists only for trying Delegaris without a directory. Never set it on a real deployment. See Try the demo.

Using more than one​

Any combination can be switched on at once.

  • With Active Directory and Entra ID both on, the sign-in page shows the Sign in with Microsoft button, then or use a password, then the username and password form. A group name from either works in access rules, so running both during a move from one to the other is fine.
  • With only Entra ID on, the sign-in page shows just the Microsoft button. You can also send people straight to Microsoft without showing the page at all (see Entra ID).
  • The local administrator is always available while its password is set, whatever else is switched on.

Which ways are switched on​

By default, every way in whose settings are filled in is switched on. To choose explicitly, either:

  • tick the boxes under Settings > Sign-in > Ways in (Active Directory, Microsoft Entra ID), or
  • set AUTH_PROVIDERS in .env (or /etc/delegaris/delegaris.env), for example AUTH_PROVIDERS=ldap,oidc.

With nothing ticked, whichever are filled in are used. The line In effect now above the boxes says which ways in are working at this moment.

Settings in the web UI or in .env​

Everything about sign-in can be set in either place:

  • In .env (or /etc/delegaris/delegaris.env with the Linux package), before the first start. These are the starting values. See Configuration.
  • Under Settings > Sign-in, once you are signed in as an administrator. What you save there applies at once, on every copy of the service, without a restart, and overrides the settings file.

Passwords and client secrets saved under Settings > Sign-in are stored in Delegaris's database (the /data volume with Docker, /var/lib/delegaris with the Linux package, or PostgreSQL). Protect the database accordingly. If you would rather secrets lived only on the host, keep them in .env (or /etc/delegaris/delegaris.env).

The form protects you from locking yourself out. Save sign-in settings is refused if:

  • no way in would be left switched on, or
  • the local administrator is not available and no administrator group or user is named.
note

Delegaris refuses to start, with a message in its log, if the configuration cannot work. Examples: Active Directory over plain LDAP without saying so on purpose, or no way in at all.

The local administrator is always there​

The local administrator is the break-glass way in. While LOCAL_ADMIN_PASSWORD is set, it works whatever is chosen under Settings > Sign-in or in AUTH_PROVIDERS. A broken directory connection or a wrong Entra secret can never lock everyone out. See Local administrator.

Who is an administrator​

Administrators can do everything: see and act on every resource, and change accounts, rules and settings. Someone is an administrator if any of these is true:

SourceSet whereCan it be removed in the UI?
They signed in as the local administratorLOCAL_ADMIN_PASSWORD in the settings file (.env, or /etc/delegaris/delegaris.env)No
They are in a group named in Administrator groups (ADMIN_GROUPS)Settings > Sign-in > Administrators, or the environment until the sign-in settings are savedOnly by changing that setting
Their sign-in name is in Administrator users (ADMIN_USERS)Settings > Sign-in > Administrators, or the environment until the sign-in settings are savedOnly by changing that setting
A group or user they match was given the Administrator roleSettings > Access > Administrators and auditorsYes, by another administrator
  • For Active Directory, name groups by their AD name, for example Delegaris-Admins.
  • For Entra ID, use the group's object ID (or an app role name), because that is what Entra sends.
  • Membership of administrator groups is read when someone signs in. A change to their group membership counts from their next sign-in.
  • Roles given under Settings > Access apply at once, with no need to sign in again.

For the read-only Auditor role, and more on roles, see Administrators and auditors.

Sessions​

A sign-in lasts 8 hours by default (SESSION_TTL_HOURS). After that the person is asked to sign in again. Sign out in the user menu ends the session at once.

Sessions are kept in the database, so a session started on one copy of the service works on another.

Wrong passwords​

Password sign-ins are slowed down after repeated failures:

  • After 5 failed attempts for one username within 5 minutes, further attempts for that username are refused with "Too many failed sign-in attempts. Try again in a few minutes." This also protects the AD account from being locked by someone guessing.
  • One address is allowed five times as many failures, across all usernames, before it is refused too.
  • A wrong password and an unknown username give the same message: "Incorrect username or password."

The limits are LOGIN_MAX_FAILURES (default 5) and LOGIN_FAILURE_WINDOW_SECONDS (default 300). They are counted on each copy of the service separately. Behind a reverse proxy, set TRUST_PROXY_HEADERS=true so the client's own address is used. See Behind a reverse proxy.

Every sign-in, successful or not, is recorded in the activity log with the address it came from.

Two-step sign-in​

For password sign-ins (Active Directory, the local administrator), Delegaris can ask for a code from an authenticator app as well. Entra ID sign-ins are not asked, because Entra does its own MFA. See Two-step sign-in.

Next steps​