Skip to content

Domains and issuers

An issuer is the OpenID Connect server a set of applications shares. It answers at one or more hostnames of the tenant, signs the tokens it issues, and sends each sign-in to a realm. This page shows how to add the hostname, create the issuer, and connect what the first sign-in needs.

  • Identity server 1.84 or later, awctl 0.40 or later, and Terraform provider 0.32 or later.
  • A tenant administrator seat, or a service account holding tenant.admin. See Service accounts.
  • The hostname. On Authwise’s hosted service, each tenant’s issuer runs at a name under id.authwise.com, such as acme.id.authwise.com. Your tenant’s name was given to you when the tenant was created. A hostname you own, such as login.example.com, is added afterwards; see Use your own domain.
ResourceWhat it isScope
DomainA hostname the tenant serves from. Nothing on a domain names an issuer. Every domain has an ID (d-…).Tenant
IssuerThe OpenID Connect server. It answers at the tenant’s domains through its bindings, and it signs the tokens it issues.Tenant
BindingWhere an issuer answers: a domain of the tenant and a path. The URL https://HOSTNAME/PATH is the iss claim in every token minted there. An issuer can have several bindings, each its own issuer URL.Issuer
RealmThe people who sign in, and the ways they sign in. An issuer sends each sign-in to a realm.Tenant
AudienceAn API the issuer mints tokens for. Its display name is the aud claim.Issuer
ClientAn application that starts sign-ins or calls an API.Issuer

A tenant can have several issuers, and an issuer can route to several realms. See Route sign-ins by email domain.

A domain is a hostname this tenant serves from. The hostname is unique across the whole Authwise installation, and it can’t be changed after creation.

  1. In the console, go to Domains and click New domain.

  2. In Hostname, enter the hostname, such as acme.id.authwise.com. Use lowercase letters, digits, hyphens, and dots. A port, such as :8443, is allowed on a hostname you serve yourself.

  3. Click Create domain.

    The domain appears in the list as Native. The list’s Answers for column shows which issuers are bound to it.

With awctl, in the tenant’s context:

Terminal window
awctl identity domains create --hostname acme.id.authwise.com

With Terraform:

resource "authwise_domain" "main" {
hostname = "acme.id.authwise.com"
}

Authwise refuses a hostname that is already registered anywhere in the installation, with the reason HOSTNAME_CLAIMED. It also refuses a hostname under id.authwise.com whose first label starts with an identifier prefix and a hyphen, such as t- or gt-.

An issuer answers at a domain of the tenant through a binding: the domain and a path. Its discovery document is https://HOSTNAME/PATH/.well-known/openid-configuration. You can give the issuer its first binding when you create it, or create it with no host and bind it later.

  1. In the console, go to Issuers and click New issuer. If the sidebar shows no issuer section yet, press Cmd+K or Ctrl+K and choose New issuer.
  2. In Domain, select the domain. The issuer answers at its root. To create the issuer without a host, choose No host yet (bind later).
  3. In Single-realm provider selector, select the realm this issuer sends sign-ins to, or leave it empty to configure later.
  4. Click Create issuer.

Authwise mints the issuer’s signing keys when it creates the issuer. It creates nothing else: no audience, client, or realm.

With awctl, pass the domain’s ID or its hostname:

Terminal window
awctl identity issuers create --domain-id DOMAIN_ID
awctl identity issuers create --domain acme.id.authwise.com --path /customers
Created tenants/t-g3mxi3jjxzb4/issuers/i-g3mxasgay3hj
Created tenants/t-g3mxi3jjxzb4/issuers/i-g3mxca1sifq8

Replace DOMAIN_ID with the domain’s ID (d-…), which domains list prints. --path binds the new issuer below the hostname’s root. Leave them out to create the issuer with no host. domains get lists what is bound to a domain:

name tenants/t-g3mxi3jjxzb4/domains/d-g3mxca1sifq6
hostname awctl69di.id.preview.authwise.com
kind native
bound issuers:
ISSUER BINDING ISS
i-g3mxasgay3hj idb-g3mxasgay3hp https://awctl69di.id.preview.authwise.com
i-g3mxca1sifq8 idb-g3mxca1sifqe https://awctl69di.id.preview.authwise.com/customers

With Terraform, create the issuer and bind it:

resource "authwise_issuer" "main" {}
resource "authwise_issuer_domain_binding" "main" {
issuer_id = authwise_issuer.main.issuer_id
domain_id = authwise_domain.main.domain_id
}

One hostname and path serve one issuer. A second issuer at the root of a hostname that already answers is refused with the reason BINDING_TAKEN. To run several issuers on one hostname, bind each at its own path, such as /customers, on the issuer’s Hosts tab. To serve an issuer at a second hostname, or at a hostname you own, bind it there. Both are described in Use your own domain.

Open the issuer and go to Configuration. One Save writes every section.

SectionSettings
IdentityMailed links use, the host that invitation, sign-in link, and password-reset mails carry, read-only here and changed on the Hosts tab, and labels.
Login routingWhich realm signs people in. Single realm sends every sign-in to one realm. Multi realm, routed by identifier asks for an email address first and routes it; see Route sign-ins by email domain. External endpoint lets an integration decide.
TokensAccess token lifetime (seconds). The default is 7200. An audience or client can set a shorter lifetime of its own.
CORSAllowed origins and Allowed origin patterns: the browser origins that may call the issuer directly. A hosted sign-in page needs none.
External integrationsAn external login UI and a flow integration endpoint. Leave both empty unless an integration asks for them.

With awctl, write the configuration as JSON. This example sends every sign-in to one realm:

Terminal window
awctl identity issuers update ISSUER_ID \
--config '{"singleRealmProviderSelector": {"realmName": "tenants/TENANT_ID/realms/REALM_ID"}}'

Replace ISSUER_ID, TENANT_ID, and REALM_ID with the IDs the console or awctl shows. An issuer with no realm selected refuses every sign-in, and the tenant’s Home page lists it under Needs attention.

With Terraform, build the configuration with the authwise_issuer_config data source and pass its json attribute as the issuer’s config.

A sign-in at the issuer needs four things. The console’s Home page lists the missing ones under Needs attention.

  1. A realm with at least one sign-in method. See Realms.
  2. The issuer routed to that realm, in Configuration > Login routing.
  3. An audience: the API the tokens are for. In the issuer, go to Audiences and click New audience. Its display name is the value of the aud claim, so use the API’s URL, such as https://api.example.com. An audience created here offers OpenID Connect scopes by default.
  4. A client: the application that starts the sign-in. In the issuer, go to Clients and click New client. Choose the audience, the grant type authorization_code, and the application’s redirect URIs. The Home page’s Create a client task opens the same form.

The account page, where a signed-in person manages their own sign-in methods, is optional. It needs a client of its own and the issuer’s account client setting; the Terraform provider’s authwise_interactive_client_config data source builds the client’s configuration.