Skip to content

Realms

A realm holds a population of users and the ways they sign in. A tenant can have several realms, such as one for employees and one for customers, and an issuer sends each sign-in to one of them. This page shows how to create a realm, decide how accounts come to exist in it, and add its sign-in methods.

  • Identity server 1.56 or later, awctl 0.22 or later, and Terraform provider 0.19 or later.
  • A tenant administrator seat, or a service account holding tenant.admin. See Service accounts.
  1. In the console, go to Realms and click New realm. If the sidebar shows no realm section yet, press Cmd+K or Ctrl+K and choose New realm.
  2. In Display name, enter a name, such as Employees.
  3. Leave Type as Standard (Authwise-managed). External (delegated) stores users in a backend of your own.
  4. Click Create realm.

With awctl, in the tenant’s context:

Terminal window
awctl identity realms create --display-name Employees

With Terraform:

resource "authwise_realm" "employees" {
display_name = "Employees"
}

A new realm has no sign-in methods and every way of creating an account is closed. The next two sections open them.

Each way an account can be created in the realm is a channel, closed until you open it. Open only the channels you need.

ChannelWhat it allowsOpen it when
Self-signupAnyone can create an account through a sign-in method that offers a signup form, such as a password or a magic link.The public can sign up, or the realm signs people in with a magic link only.
InvitationsAn administrator creates the account, and the person completes it through a one-time link sent by email.You bring people in one at a time, with a password or a magic link.
Just-in-time federationThe account is created the first time the person signs in through a federated identity provider, such as SAML or Google.The realm trusts an identity provider to say who its people are.

To change the channels, open the realm, go to Configuration, and in Provisioning turn on the channels you need. Click Save.

With awctl, the channels are the realm’s provisioning configuration:

Terminal window
awctl identity realms update REALM_ID \
--config '{"provisioning": {"invitations": true, "invitationTtl": "604800s"}}'

invitationTtl is how long an invitation link stays valid, as a number of seconds. The default is 7 days, and the maximum is 30 days.

With Terraform, build the configuration with the authwise_realm_config data source:

data "authwise_realm_config" "employees" {
provisioning = {
invitations = true
jit_federated = true
}
}
resource "authwise_realm" "employees" {
display_name = "Employees"
config = data.authwise_realm_config.employees.json
}

A sign-in method is a provider of the realm. A realm needs at least one before anyone can sign in. The provider’s display name is the label of its button on the sign-in page.

ProviderWho proves the identity
Username & PasswordAuthwise, with a password the person sets.
Magic linkAuthwise, with a link or code sent to the person’s email address. See Sign in with a magic link.
PasskeyAuthwise, with a passkey on the person’s device.
Google, Apple, Microsoft, Facebook, GitHub, LinkedInThat service’s account.
Okta, Auth0, OpenID Connect, OAuth 2.0An OpenID Connect or OAuth 2.0 identity provider.
SAML 2.0A SAML identity provider, such as Microsoft Entra ID. See Sign in through a SAML identity provider.

To add one:

  1. Open the realm, go to Providers, and click New provider.

  2. Click the provider type.

  3. In Display name, enter the label people see on the sign-in page.

  4. Click Create provider.

    The console opens the provider’s page, where the type’s own settings are.

With awctl, in the realm’s context:

Terminal window
awctl identity providers create --display-name "Password" --provider-type usernamePassword

The sign-in page decides what to show from the realm’s providers: a username and password form when the realm has one, otherwise the only provider’s own flow, otherwise a button per provider.

Second factors, such as an authenticator app or a passkey, and the rules that say who is asked for one, are on the realm’s Authentication page. A new realm asks for none. The sign-in methods above are the first step of a sign-in; the Authentication page configures the second.

An invitation creates the account and emails the person a one-time link. It needs the Invitations channel open and a Username & Password or Magic link provider in the realm. With a password provider, the person sets a password at the link. With a magic-link provider, the person confirms the address at the link and is signed in; there is no password. A realm with both lets the person choose. Magic-link invitations need identity server 1.65 or later.

  1. Open the realm, go to Users, and click Invite.

  2. In Identifier, enter the person’s email address.

  3. Click Send invitation.

    The console shows Invitation sent, or Invitation ready with the link if the email could not be sent. The link is the invitation itself, so pass it on only through a channel you would trust with a password.

With awctl, in the realm’s context:

Terminal window
awctl identity users invite person@example.com

In a realm with a magic link and no password, the invitation is the only way in while Self-signup stays closed. See Sign in with a magic link.