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.
Before you begin
Section titled “Before you begin”- Identity server 1.84 or later,
awctl0.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 asacme.id.authwise.com. Your tenant’s name was given to you when the tenant was created. A hostname you own, such aslogin.example.com, is added afterwards; see Use your own domain.
How the pieces fit
Section titled “How the pieces fit”| Resource | What it is | Scope |
|---|---|---|
| Domain | A hostname the tenant serves from. Nothing on a domain names an issuer. Every domain has an ID (d-…). | Tenant |
| Issuer | The OpenID Connect server. It answers at the tenant’s domains through its bindings, and it signs the tokens it issues. | Tenant |
| Binding | Where 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 |
| Realm | The people who sign in, and the ways they sign in. An issuer sends each sign-in to a realm. | Tenant |
| Audience | An API the issuer mints tokens for. Its display name is the aud claim. | Issuer |
| Client | An 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.
Add a domain
Section titled “Add a 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.
-
In the console, go to Domains and click New domain.
-
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. -
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:
awctl identity domains create --hostname acme.id.authwise.comWith 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-.
Create an issuer
Section titled “Create an issuer”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.
- 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.
- In Domain, select the domain. The issuer answers at its root. To create the issuer without a host, choose No host yet (bind later).
- In Single-realm provider selector, select the realm this issuer sends sign-ins to, or leave it empty to configure later.
- 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:
awctl identity issuers create --domain-id DOMAIN_IDawctl identity issuers create --domain acme.id.authwise.com --path /customersCreated tenants/t-g3mxi3jjxzb4/issuers/i-g3mxasgay3hjCreated tenants/t-g3mxi3jjxzb4/issuers/i-g3mxca1sifq8Replace 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-g3mxca1sifq6hostname awctl69di.id.preview.authwise.comkind native
bound issuers:ISSUER BINDING ISSi-g3mxasgay3hj idb-g3mxasgay3hp https://awctl69di.id.preview.authwise.comi-g3mxca1sifq8 idb-g3mxca1sifqe https://awctl69di.id.preview.authwise.com/customersWith 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.
Configure the issuer
Section titled “Configure the issuer”Open the issuer and go to Configuration. One Save writes every section.
| Section | Settings |
|---|---|
| Identity | Mailed 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 routing | Which 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. |
| Tokens | Access token lifetime (seconds). The default is 7200. An audience or client can set a shorter lifetime of its own. |
| CORS | Allowed origins and Allowed origin patterns: the browser origins that may call the issuer directly. A hosted sign-in page needs none. |
| External integrations | An 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:
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.
Make the first sign-in work
Section titled “Make the first sign-in work”A sign-in at the issuer needs four things. The console’s Home page lists the missing ones under Needs attention.
- A realm with at least one sign-in method. See Realms.
- The issuer routed to that realm, in Configuration > Login routing.
- 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
audclaim, so use the API’s URL, such ashttps://api.example.com. An audience created here offers OpenID Connect scopes by default. - 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.
What’s next
Section titled “What’s next”- Realms: create the realm and its sign-in methods.
- Route sign-ins by email domain: send each email domain to its own realm.
- Use your own domain: serve the issuer at a hostname you own.