Sovrain
  1. Documentation
  2. Identity provider

Explanation

Delegation

What problem delegation solves, how an application sees a person signing in as someone else, how the policy modes and protected groups limit it, and why it is better than sharing a password.

Sometimes one person has to work in an application as another. An assistant answers the manager’s tickets, a colleague covers the support queue while someone is on holiday, a team lead takes over the accounts of a person who left suddenly. Many applications have no notion of acting for someone else, so in practice people share passwords. Delegation is Sovrain’s answer to that: Anna can sign in to an application as Bob, for a limited time, without ever learning anything that lets her sign in as Bob anywhere else.

The feature has two names in Sovrain, depending on where you look. People see it under Shared accounts on their profile; admins manage it under Delegations.

What is shared and what is not

A delegation names an owner (Bob), a delegate (Anna), one application and a period. During that period, when Anna signs in to that application, Sovrain asks which account the application should see, hers or Bob’s. If she picks Bob’s, the application receives a normal sign-in for Bob.

Everything else stays Bob’s alone. Anna never sees his password or his second step. She cannot sign in to Sovrain as Bob, open his profile, use his password manager or his API access. She signs in with her own password and, if the policy says so, her own second step. The delegation covers only the applications it names, and only applications where an admin has allowed delegation.

How the application sees it

From the application’s side, a delegated sign-in is a sign-in for the owner. The sub claim, the user name and the email are Bob’s, and the application applies Bob’s permissions. This is what makes delegation work with applications that know nothing about it.

Whether the application is also told who really signed in is the admin’s choice. With the actor option on, an OpenID Connect ID token carries an act claim naming Anna, and a SAML assertion carries an actor attribute with her login. An application that understands these can record “Anna, acting for Bob” in its own history; one that does not simply ignores them. With the option off, the application sees only Bob, and the record of who acted lives in Sovrain. The trade-off is privacy against accountability inside the application: turning the option on tells every delegation-enabled application who stands in for whom.

Delegated sign-ins are also kept on a shorter leash. Access tokens from a delegated sign-in last five minutes instead of an hour, and when a delegation ends, whether it expired or was revoked, Sovrain takes back the refresh tokens it issued and sends a sign-out to OpenID Connect applications with back-channel logout. SAML applications, and OpenID Connect applications without back-channel logout, keep the delegated session until it expires on their side (see Sessions and sign-out).

Who decides

An admin chooses how much freedom the organization allows. Delegation is off by default, and while it is off, existing delegations stop working at sign-in. When it is on, there are three modes:

  • Admins only. Only admins create delegations, for any pair of people. Suits organizations that treat every delegation as an exception.
  • Users with approval. People share their own account, and an admin approves each request before it starts.
  • Users freely. People share their own account on their own, within the limits the admin set.

In every mode, the admin sets the longest period a delegation may run, 30 days by default, whether the delegate must have completed a second step in their own session, and which applications allow delegation at all.

Some accounts should never be shared, whoever asks. The policy therefore has protected groups: no member of a protected group can be the owner of a delegation. Owners and Admins are protected from the start, so admin accounts cannot be lent out while they stay on the list. Any admin can take a group off the list after a fresh sign-in; the change is recorded. An admin who needs cover has to give the colleague access in their own right, which is usually the better answer for powerful accounts anyway.

Audit and notifications

Delegation is built to be visible. By default, the owner gets an email at their verified address each time someone signs in as them, so a delegation they did not expect cannot run quietly; after many sign-ins within an hour, Sovrain sends one notice instead of one email each. People involved also get emails when a delegation is created, approved, rejected, revoked or ended early.

Every delegation and every use of it is recorded. Bob sees the activity of his shared accounts on his profile, admins see recent events on the Delegations page, and each application’s activity shows a delegated sign-in as Bob signed in by Anna. Sovrain keeps these records of delegations; the network addresses in them are cleared after 90 days.

Why not just share the password

With single sign-on, the password people would share is the Sovrain password. It achieves the same thing in the application, and it is easy. It is also worse in every other way.

A shared Sovrain password gives access to every application the owner can reach, not one. It has no end date: it works until someone remembers to change it, and changing it breaks things for the owner. It forces the owner to hand over or switch off their second step. And afterwards, nobody can tell who did what: the application, Sovrain and the owner all see the owner.

A delegation is limited to the applications it names, ends by itself, can be revoked in one click, never touches the owner’s credentials, and leaves a record that names the person who acted. The cost is a little setup and the need for an admin to allow it. For most organizations, that is a good trade.