Sign-in and single sign-on
Who can open the console, the results pages and the agent panel, and how they sign in. The stack decides this at deploy time with one parameter, AuthMode, and nothing about it is visible to the customers who answer surveys: the web survey and the IVR need no sign-in at all.
The two modes
|
AuthMode=cognito (default) |
AuthMode=external |
| Who issues the sign-in |
A Cognito user pool created by the stack, in your account |
Your own identity provider: Okta, Microsoft Entra ID, Google Workspace, Ping, Auth0 or any OpenID Connect provider |
| How users sign in |
Username and password on the pool's hosted page, 12 characters or more, no self-service sign-up |
Your provider's own page, with whatever policy you enforce there (MFA, device trust, conditional access) |
| Multi-factor |
Authenticator app: Mfa=OPTIONAL lets each user enrol, Mfa=ON requires it for everyone |
Your provider's |
| Password path |
Yes, the only one |
None. No user pool exists; the console and the API accept only tokens your provider issued |
| Who is a supervisor |
Membership of the pool's supervisors group |
A groups claim in the id token that contains supervisors |
| Who is an agent |
The pool's agents group, with the custom:agentArn attribute |
Everyone else with a token; the custom:agentArn claim, when your provider maps it, ties the agent to their Connect user |
| User management |
Cognito console, or node lambda/sync-users.js from your Connect directory |
Your provider's directory and groups |
Both modes protect the same things: the console, the results and today pages, the agent panel, the group page and every signed-in API route. The pages use the OAuth 2.0 authorization code flow with PKCE in both modes, so no client secret is ever shipped to a browser, and tokens live in the browser session only.
Enforcing single sign-on
Deploy (or update) the stack with:
| Parameter |
Value |
AuthMode |
external |
JwtIssuer |
The issuer URL exactly as it appears in your tokens' iss claim. Entra ID: https://login.microsoftonline.com/<tenant id>/v2.0. Okta: https://<org>.okta.com/oauth2/default (or your custom authorization server). Google: https://accounts.google.com. |
JwtAudience |
The aud claim the API should accept: the client id of the application you registered (below). |
OidcClientId |
The same client id. |
OidcAuthorizeUrl |
Your provider's authorization endpoint. |
OidcTokenUrl |
Your provider's token endpoint. |
OidcScope |
Optional. Defaults to openid email profile; add whatever scope your provider needs to put a groups claim in the id token (Okta: groups). |
OidcLogoutUrl |
Optional. The end-session endpoint, so the console's sign-out link also signs the user out of your provider. |
The endpoints are listed at your provider's discovery document, <issuer>/.well-known/openid-configuration.
Register the application in your provider as a public, single-page application (no client secret; PKCE required). Its redirect URIs are the stack's own pages, with <SiteUrl> the SiteUrl output of the stack (your custom domain when you set one):
<SiteUrl>/console.html
<SiteUrl>/results.html
<SiteUrl>/today.html
<SiteUrl>/agent-panel.html
<SiteUrl>/group.html
Allow <SiteUrl>/ as the post-logout redirect. Then:
- Supervisors. Put them in a group that your provider emits in the id token as a
groups claim containing the literal value supervisors. In Entra ID that is a group claim configured on the app registration (emit group names, or map the group's object id to supervisors through a claims mapping); in Okta a groups claim filter on the authorization server; in Google Workspace a custom claim through a mapping or an intermediary such as Okta or Auth0, because Google's own id tokens carry no groups.
- Agents. Anyone else who can sign in is an agent and sees only their own results. For the agent panel and the coaching view to find their contacts, their token needs a
custom:agentArn claim with the Connect user ARN; map it from a directory attribute, or keep agent-facing pages for Cognito mode.
- Several stacks, one sign-in. Give every stack the same issuer, audience and client, and the same token opens them all; the group page then moves between member stacks without another login.
With AuthMode=external the stack creates no user pool, no Cognito domain and no password: a user who is removed from your provider loses access at the next token refresh, within the hour.
Staying on Cognito
The default needs nothing from your identity team and is the right choice for a pilot. What it offers:
- Passwords of 12 characters or more, temporary passwords on creation, no self-service sign-up, and no account enumeration from the sign-in page.
- MFA with an authenticator app, optional per user or required for everyone through the
Mfa parameter; users enrol at their next sign-in.
- Users from Connect.
node lambda/sync-users.js creates a login for every Connect user, puts those whose security profile is named supervisor, admin or manager into the supervisors group and everyone else into agents, with their agent ARN attached. See Getting started.
One combination is not a parameter: a Cognito pool that offers both passwords and a federated identity provider. The pool the stack creates accepts Cognito sign-ins only. If you need that mix, federate the provider into the pool by hand in the Cognito console (the stack keeps the pool on updates), or tell support and we will add it as a parameter.
Checking what a stack enforces
GET <SiteUrl>/api/health answers without sign-in and reports the version, nothing about users.
- The stack's Outputs show
UserPoolId and UserPoolClientId in Cognito mode and leave them empty in external mode.
- The sign-in page a supervisor lands on is either the stack's own Cognito page (a
*.amazoncognito.com address) or your provider's; there is no third.
Security details for both modes, including what the token can and cannot reach, are in Security and data.
Current as of version 0.21.0. See the release notes for what changed since.