SurePassID Platform Workflows
SurePassID Authentication Server
SurePassID Platform Workflows
Version: 2025.4
Date: January 2025
Author: SurePassID Engineering
Overview
This document catalogs every distinct business workflow in the SurePassID platform. A workflow is an end-to-end business process with a clear trigger, a sequence of steps (possibly spanning multiple API calls, UI interactions, and background operations), and a defined outcome.
Workflows are not the same as API calls. A single
workflow typically involves multiple API endpoints, database operations,
and user interactions. Conversely, a single API endpoint (e.g.,
validate_oath_otp) may participate in several different
workflows.
How to Read This Document
Each workflow is documented with:
- Trigger — What initiates the workflow
- Actors — Who or what participates (Admin, User, System, External Service)
- Steps — The ordered sequence of operations
- Data Flow — Key tables and records created/modified
- Outcome — The end state
- API Endpoints — REST endpoints involved (if any)
- Sequence Diagram — Visual flow (for complex workflows)
Workflow Categories
| # | Category | Workflows | Description |
|---|---|---|---|
| 1 | User Authentication | 6 | Verifying a user's identity via various MFA methods |
| 2 | User Provisioning & Lifecycle | 8 | Creating, importing, syncing, and managing user accounts |
| 3 | Token Lifecycle | 5 | Provisioning, activating, assigning, and decommissioning tokens |
| 4 | PIV Smart Card | 3 | Certificate-based enrollment and authentication |
| 5 | PIV IoT Device Authorization | 3 | IoT device registration, authorization, and offline operation |
| 6 | Session Management | 1 | Session token creation, validation, and expiration |
| 7 | SSO/SAML | 2 | Single Sign-On login and Single Logout |
| 8 | Token Ordering & Inventory | 3 | Ordering hardware tokens and managing inventory |
| 9 | Admin & Operations | 5 | System configuration, sync, and maintenance |
| 10 | Notification | 1 | Unified notification delivery (email, SMS, voice, push) |
| 11 | Planned (RBA) | 1 | Risk-based adaptive authentication |
| Total | 38 |
1. User Authentication Workflows
These workflows verify a user's identity. Each combines a primary factor (usually credentials) with a second factor (OTP, Push, FIDO, etc.).
1.1 — Credential + OTP Authentication
Trigger: User submits username and password to
authenticate.
Actors: End User, Client Application, MFA Server
Steps:
User Client App MFA Server Database
│ │ │ │
│── enter credentials ────>│ │ │
│ │── validate_user ─────>│ │
│ │ │── verify password ─────────>│
│ │ │<── user record ────────────│
│ │ │── check Bypass MFA flag │
│ │ │ (if set, skip 2FA) │
│ │<── success + methods ─│ │
│ │ │ │
│ │── send_oath_otp ─────>│ │
│ │ (type: sms|email| │── generate temp OTP ──────>│
│ │ voice) │── send via SMS/Email/Voice │
│ │<── OTP sent ──────────│ │
│ │ │ │
│── enter OTP ────────────>│ │ │
│ │── validate_oath_otp ─>│ │
│ │ │── verify OTP match ────────>│
│ │ │── write audit record ──────>│
│ │ │── update device counter ───>│
│ │<── auth success ──────│ │
│<── logged in ────────────│ │ │
Data Flow:
- Reads:
PartnerUser,Device(OTP seed, counter),PartnerSettings(OTP config) - Writes:
PartnerUserAudit(auth result, IP, method),Device(next counter, last validation)
API Endpoints: validate_user,
send_oath_otp, validate_oath_otp
1.2 — Credential + Push Authentication
Trigger: User submits credentials; system sends push
notification to mobile app.
Actors: End User, Client Application, MFA Server,
Mobile Authenticator App, Push Notification Service (APNs/FCM)
Steps:
User Client App MFA Server Push Service Mobile App
│ │ │ │ │
│── login ──────>│ │ │ │
│ │── validate_user ─>│ │ │
│ │<── success ───────│ │ │
│ │ │ │ │
│ │── send_push ─────>│ │ │
│ │ _message │── push notification ─>│ │
│ │ │ (via APNs/FCM) │── display ──────>│
│ │<── push sent ─────│ │ approve/deny │
│ │ │ │ │
│ │ │ │<── user taps ────│
│ │ │ │ approve │
│ │ │<── tap_auth_response ─│ │
│ │ │── store response ────>│(DB) │
│ │ │ │ │
│ │── is_user_push ──>│ │ │
│ │ _authenticated │── check response ───>│(DB) │
│ │<── approved ──────│ │ │
│<── logged in ──│ │ │ │
Data Flow:
- Reads:
MobilePushNotification(push tokens),PartnerUser(push challenge) - Writes:
PartnerUser.Push Token(challenge),PartnerUserAudit
API Endpoints: validate_user,
send_push_message, tap_auth_response,
is_user_push_authenticated
Notes:
- The client polls
is_user_push_authenticateduntil the user responds or timeout - Push type is determined by
MobilePushNotification.Push Type(0=APNs, 1=FCM) - The
ApnsTopiccolumn determines the iOS bundle identifier for the notification - If the push includes FIDO signing,
SigningPublicKeyandSignChallengeonMobilePushNotificationare used
1.3 — Credential + FIDO U2F Authentication
Trigger: User submits credentials; server challenges
a registered U2F security key.
Actors: End User, Browser, MFA Server
Steps:
- User submits credentials →
validate_user→ success - Client requests challenge →
pre_sign→ server returns challenge + registered key handles - Browser calls U2F API with challenge → user touches security key
- Client submits signed assertion →
sign→ server verifies signature against stored public key - Auth success → audit logged
Data Flow:
- Reads:
DeviceFIDOApp(public key, key handle),Device(U2F device record) - Writes:
DeviceFIDOApp(sign counter incremented),PartnerUserAudit
API Endpoints: validate_user,
pre_sign, sign
1.4 — FIDO2/WebAuthn Two-Factor Authentication
Trigger: User submits credentials; server challenges
a registered FIDO2 authenticator.
Actors: End User, Browser (WebAuthn API), MFA
Server
Steps:
- User submits credentials →
validate_user→ success - Client requests assertion options →
/api/fido/v2/assertion/options→ server returns challenge + allowCredentials list - Browser calls
navigator.credentials.get()→ user provides gesture (touch/PIN/biometric) - Client submits assertion result →
/api/fido/v2/assertion/result→ server verifies signature, checks sign counter - Auth success → audit logged
Data Flow:
- Reads:
DeviceFIDOApp(credential ID, public key, AAGUID, sign counter) - Writes:
DeviceFIDOApp(sign counter),PartnerUserAudit
API Endpoints: validate_user,
/api/fido/v2/assertion/options,
/api/fido/v2/assertion/result
1.5 — FIDO2 Passwordless Authentication
Trigger: User initiates login without entering a
username — the FIDO2 resident key identifies the user.
Actors: End User, Browser (WebAuthn API), MFA
Server
Steps:
- Client requests assertion options without a
username →
/api/fido/v2/assertion/options - Server returns challenge with empty
allowCredentials(resident key discovery) - Browser calls
navigator.credentials.get()→ authenticator presents resident credential → user provides gesture - Client submits assertion result →
/api/fido/v2/assertion/result - Server identifies user from
userHandlein the assertion → verifies signature - Auth success → single-step login complete → audit logged
Key Difference from 1.4: No
validate_user call — the user is both identified and
authenticated by the FIDO2 credential in a single step.
API Endpoints:
/api/fido/v2/assertion/options,
/api/fido/v2/assertion/result
1.6 — Bypass MFA Authentication
Trigger: Admin has set the Bypass MFA
flag on a user account (e.g., during onboarding or for a service
account).
Actors: End User, Client Application, MFA Server
Steps:
- User submits credentials →
validate_user - Server verifies password → checks
PartnerUser.[Bypass MFA]flag - Flag is set → second factor is skipped entirely
- Auth success → audit logged with
AuthenticationMethodId = 5(Bypass MFA)
Data Flow:
- Reads:
PartnerUser.[Bypass MFA] - Writes:
PartnerUserAudit(method = Bypass MFA)
API Endpoints: validate_user
Notes: This is typically a temporary state set by an admin. The admin portal allows setting this flag per-user.
2. User Provisioning & Lifecycle Workflows
These workflows cover how user accounts are created, imported, synchronized, and managed throughout their lifecycle.
2.1 — Manual User Creation (Admin Portal)
Trigger: Admin clicks "Add User" in the SurePassID
admin portal.
Actors: Admin, Admin Portal UI, MFA Server
Steps:
Admin Admin Portal MFA Server Database
│ │ │ │
│── click "Add User" ─────>│ │ │
│ │── display user form ───>│ │
│── fill in fields: │ │ │
│ - Login Name │ │ │
│ - Password │ │ │
│ - First/Last Name │ │ │
│ - Email │ │ │
│ - Cell Phone │ │ │
│ - Admin Privilege │ │ │
│ - Group │ │ │
│── click "Create" ───────>│ │ │
│ │── INSERT PartnerUser ──>│ │
│ │ │── hash password ────>│
│ │ │── create PartnerUser │
│ │ │ │
│ │ (if admin role) │ │
│ │── INSERT Dashboard ────>│ │
│ │ │── create default │
│ │ │ dashboard items │
│ │ │ │
│ │ (if send welcome) │ │
│ │── send notification ───>│ │
│ │ │── resolve template │
│ │ │ (Enroll or │
│ │ │ LoginInformation) │
│ │ │── send email ───────>│(SMTP)
│ │ │ │
│<── user created ─────────│ │ │
Data Flow:
- Creates:
PartnerUserrecord,PartnerUserEmail(if email provided),PartnerUserDashboard(if admin) - Reads:
PartnerSettings(password policy),NotificationTemplate(welcome email)
2.2 — User Creation via REST API
Trigger: External system calls the
add_user or add_oath_user API endpoint.
Actors: External System, MFA Server
Steps:
- External system sends
add_userrequest with user details + API credentials - Server validates API key against
PartnerApitable and checksApiPermission(ID 12: AddUser) - Server creates
PartnerUserrecord with hashed password - If
add_oath_user: also creates aDevicerecord (OATH token) and assigns it to the user - Returns user ID and status
API Endpoints: add_user,
add_oath_user, /api/admin/user/create
Data Flow:
- Validates:
PartnerApi(API key),ApiPermission+ApiEndpoint(authorization) - Creates:
PartnerUser, optionallyDevice+ assignment
2.3 — CSV Bulk User Import (Admin Portal)
Trigger: Admin uploads a CSV file through the admin
portal to create or update multiple users at once.
Actors: Admin, Admin Portal UI, MFA Server
Steps:
Admin Admin Portal MFA Server Database
│ │ │ │
│── navigate to │ │ │
│ Import Users page ────>│ │ │
│ │── display upload form │ │
│ │ │ │
│── select CSV file ──────>│ │ │
│ (columns: LoginName, │ │ │
│ Password, FirstName, │ │ │
│ LastName, Email, │ │ │
│ CellPhone, Group, │ │ │
│ AdminPrivilege) │ │ │
│ │ │ │
│── click "Import" ───────>│ │ │
│ │── parse CSV rows ──────>│ │
│ │ │ │
│ │ FOR EACH ROW: │ │
│ │ ┌─────────────────────┤ │
│ │ │ validate fields │ │
│ │ │ (required, format, │ │
│ │ │ duplicate check) │ │
│ │ │ │ │
│ │ │ IF user exists: │ │
│ │ │ UPDATE PartnerUser│ │
│ │ │ ELSE: │ │
│ │ │ INSERT PartnerUser│ │
│ │ │ hash password │ │
│ │ │ create email rec │ │
│ │ └─────────────────────┤ │
│ │ │ │
│ │── generate import ─────>│ │
│ │ results summary │ │
│ │ │ │
│<── results displayed: │ │ │
│ - X users created │ │ │
│ - Y users updated │ │ │
│ - Z rows failed │ │ │
│ - error details │ │ │
CSV Format:
LoginName,Password,FirstName,LastName,Email,CellPhone,Group,AdminPrivilege
john.doe,P@ssw0rd!,John,Doe,john@example.com,+15551234567,Sales,N
jane.smith,S3cure#1,Jane,Smith,jane@example.com,+15559876543,Engineering,Y
Data Flow:
- Creates/Updates:
PartnerUser,PartnerUserEmail - Validates: Duplicate login names within tenant, email format, password policy compliance
- Audit: Bulk import logged to
PartnerUserAudit
Error Handling:
- Invalid rows are skipped and reported in the results summary
- Valid rows in the same file are still processed (partial success allowed)
- Duplicate login names within the CSV are flagged as errors
2.4 — AD/LDAP User Import (Admin Portal)
Trigger: Admin configures an LDAP/Active Directory
connection in the admin portal and initiates a manual import of
users.
Actors: Admin, Admin Portal UI, MFA Server, LDAP/AD
Server
Steps:
Admin Admin Portal MFA Server LDAP/AD Server Database
│ │ │ │ │
│── configure LDAP ────>│ │ │ │
│ connection: │ │ │ │
│ - Server URL │ │ │ │
│ - Base DN │ │ │ │
│ - Bind credentials │ │ │ │
│ - Search filter │ │ │ │
│ - Attribute mapping │ │ │ │
│ │ │ │ │
│── click "Test" ──────>│ │ │ │
│ │── LDAP bind ────────>│ │ │
│ │ │── LDAP bind ────────>│ │
│ │ │<── bind success ─────│ │
│ │── search query ─────>│ │ │
│ │ │── LDAP search ──────>│ │
│ │ │<── user entries ─────│ │
│<── preview: N users │ │ │ │
│ found │ │ │ │
│ │ │ │ │
│── click "Import" ────>│ │ │ │
│ │── full LDAP search ─>│ │ │
│ │ │── paginated search ─>│ │
│ │ │<── all entries ──────│ │
│ │ │ │ │
│ │ FOR EACH AD USER: │ │ │
│ │ ┌──────────────────┤ │ │
│ │ │ map attributes: │ │ │
│ │ │ sAMAccountName │ │ │
│ │ │ → LoginName │ │ │
│ │ │ givenName │ │ │
│ │ │ → FirstName │ │ │
│ │ │ sn → LastName │ │ │
│ │ │ mail → Email │ │ │
│ │ │ mobile │ │ │
│ │ │ → CellPhone │ │ │
│ │ │ memberOf │ │ │
│ │ │ → Group │ │ │
│ │ │ │ │ │
│ │ │ IF user exists: │ │ │
│ │ │ UPDATE fields │ │ │
│ │ │ ELSE: │ │ │
│ │ │ CREATE user │ │ │
│ │ │ generate pwd │ │ │
│ │ │ │ │ │
│ │ │ IF AD disabled: │ │ │
│ │ │ disable in SP │ │ │
│ │ └──────────────────┤ │ │
│ │ │ │ │
│<── import complete: │ │ │ │
│ - X created │ │ │ │
│ - Y updated │ │ │ │
│ - Z disabled │ │ │ │
AD Attribute Mapping (Default):
| AD/LDAP Attribute | SurePassID Field | Notes |
|---|---|---|
sAMAccountName |
Login Name |
Primary user identifier |
userPrincipalName |
SSO Name (optional) | Used for SAML/SSO matching |
givenName |
First Name |
|
sn |
Last Name |
|
mail |
Email |
|
mobile or telephoneNumber |
Cell Phone |
Used for SMS OTP delivery |
memberOf |
Group Id |
Maps AD group to SurePassID group |
userAccountControl |
Disabled Date |
Bit 2 (0x02) = account disabled |
Data Flow:
- Reads: LDAP/AD directory via LDAP protocol (port 389/636)
- Creates/Updates:
PartnerUser,PartnerUserEmail - Disables: Users whose AD accounts are disabled or deleted
Notes:
- This is a manual, one-time import — not ongoing sync (see Workflow 2.5)
- Password is auto-generated since AD passwords cannot be read
- Admin can optionally send welcome emails to imported users
- The connection settings are stored in
PartnerSettingsfor reuse by Directory Sync
2.5 — Directory Sync (Scheduled AD/LDAP Synchronization)
Trigger: Scheduled task or admin-initiated sync that
continuously keeps SurePassID users in sync with Active Directory /
LDAP.
Actors: MFA Server (background process), LDAP/AD
Server, External Sync Agent (optional)
Steps:
Scheduler/Agent MFA Server LDAP/AD Server Database
│ │ │ │
│── directory_sync_start ─>│ │ │
│ (API call or │ │ │
│ scheduled trigger) │ │ │
│ │── LDAP connect ───────>│ │
│ │<── connected ──────────│ │
│ │ │ │
│ │── incremental search ─>│ │
│ │ (uSNChanged ≥ last │ │
│ │ sync watermark) │ │
│ │<── changed entries ────│ │
│ │ │ │
│ │ FOR EACH CHANGED USER: │
│ │ ┌────────────────────┤ │
│ │ │ │ │
│ │ │ CASE: new in AD │ │
│ │ │ → CREATE user │─────────────────────>│
│ │ │ in SurePassID │ │
│ │ │ │ │
│ │ │ CASE: modified │ │
│ │ │ → UPDATE fields │─────────────────────>│
│ │ │ (name, email, │ │
│ │ │ phone, group) │ │
│ │ │ │ │
│ │ │ CASE: disabled │ │
│ │ │ → SET disabled │─────────────────────>│
│ │ │ date on user │ │
│ │ │ │ │
│ │ │ CASE: deleted │ │
│ │ │ → disable user │─────────────────────>│
│ │ │ (preserve │ │
│ │ │ audit trail) │ │
│ │ └────────────────────┤ │
│ │ │ │
│ │── update sync │ │
│ │ watermark ──────────>│(store last │
│ │ │ uSNChanged) │
│ │ │ │
│ │── write audit ────────>│ │
│ │ (sync summary) │ │
│ │ │ │
│<── sync complete ────────│ │ │
│ (X created, │ │ │
│ Y updated, │ │ │
│ Z disabled) │ │ │
Key Behaviors:
- Incremental sync: Uses AD
uSNChangedattribute to only process changes since last sync - Disable, never delete: When an AD account is deleted, the SurePassID user is disabled (not deleted) to preserve audit history and token assignments
- Group mapping: AD
memberOfmaps to SurePassID Group assignments - Conflict resolution: AD is authoritative — AD values overwrite SurePassID values for synced fields
API Endpoints: directory_sync_start
Data Flow:
- Reads: LDAP/AD,
PartnerSettings(LDAP config, sync watermark) - Creates/Updates/Disables:
PartnerUser,PartnerUserEmail - Writes:
PartnerUserAudit(sync events)
2.6 — Directory Sync + Automatic Token Assignment & Activation
Trigger: Directory sync creates a new user, and the
tenant is configured to automatically assign and activate tokens for new
users.
Actors: MFA Server (background process), LDAP/AD
Server, Notification Service
This extends Workflow 2.5 with automatic token provisioning:
Steps:
Directory Sync MFA Server Notification Svc Database
│ │ │ │
│── new user synced ──────>│ │ │
│ from AD │ │ │
│ │── CREATE PartnerUser ─>│ │
│ │ │ │
│ │── check PartnerSettings│ │
│ │ auto-provision config│ │
│ │ │ │
│ │ IF auto-provision enabled: │
│ │ ┌────────────────────┤ │
│ │ │ │ │
│ │ │ 1. CREATE Device │ │
│ │ │ (mobile auth │─────────────────────>│
│ │ │ token, type=9) │ │
│ │ │ Generate seed │ │
│ │ │ Set OTP params │ │
│ │ │ Set Usage flags │ │
│ │ │ (MobileUsageFlags) │
│ │ │ │ │
│ │ │ 2. ASSIGN device │ │
│ │ │ to user │─────────────────────>│
│ │ │ (Assigned │ │
│ │ │ Partner User Id) │
│ │ │ │ │
│ │ │ 3. Generate │ │
│ │ │ activation URL │ │
│ │ │ (QR code + │ │
│ │ │ deep link) │ │
│ │ │ │ │
│ │ │ 4. Send activation │ │
│ │ │ notification ──>│ │
│ │ │ │── resolve template │
│ │ │ │ (ActivateDevice │
│ │ │ │ or │
│ │ │ │ ActivateDeviceSms)│
│ │ │ │── send email/SMS ───>│(SMTP/Twilio)
│ │ │ │ │
│ │ └────────────────────┤ │
│ │ │ │
│ │── write audit ────────>│ │
│ │ (user created, │ │
│ │ token assigned, │ │
│ │ activation sent) │ │
What the User Receives:
- Email or SMS with activation instructions
- Contains a URL like:
surepassid://activate?code=ABC123&issuer=CompanyName - User opens SurePassID Authenticator app → scans QR or taps link → token activated
Subsequent User Action (Token Activation):
User Mobile App MFA Server Database
│ │ │ │
│── open activation link ─>│ │ │
│ or scan QR code │ │ │
│ │── provision_push ─────>│ │
│ │ _device │── register push ───>│
│ │ │ token (APNs/FCM) │
│ │ │── set Device status │
│ │ │ to Active │
│ │ │── set Push Provision│
│ │ │ Date │
│ │<── provisioned ────────│ │
│ │ │ │
│ │── active_oath_device ─>│ │
│ │ │── verify activation │
│ │ │ code matches │
│ │ │── set Device status │
│ │ │ to Active │
│ │<── activated ──────────│ │
│<── ready to use ─────────│ │ │
Data Flow:
- Creates:
Device(token),MobilePushNotification(push registration) - Updates:
Device(status → Active, Push Provision Date, Push Provision Token) - Reads:
PartnerSettings(token config, issuer name, usage flags)
2.7 — Password Recovery
Trigger: User clicks "Forgot Password" on the login
page.
Actors: End User, Login Page, MFA Server, Notification
Service
Steps:
- User enters username or email → submits forgot password request
send_password_recovery→ server generates time-limited recovery token- Stores token + expiration in
PartnerUser.Password Recovery TokenandPassword Recovery Token Expiration Date - Sends email via
PasswordResetnotification template with reset link - User clicks link → enters new password
password_recovery_change_password→ server validates token, hashes new password, clears recovery token- Sends
PasswordChangednotification to user - Audit logged
API Endpoints: send_password_recovery,
password_recovery_change_password
2.8 — Account Lockout & Unlock
Trigger: User exceeds
MaxFailedUsernamePasswordLoginAttempts (default 10)
consecutive failed login attempts.
Actors: End User, MFA Server, Admin, Notification
Service
Steps:
- Each failed
validate_userincrementsPartnerUser.FailedUsernamePasswordLoginAttempts - When count reaches
PartnerSettings.MaxFailedUsernamePasswordLoginAttempts:- Account is locked (disabled)
AccountLockednotification sent to user (email)SecurityAlertnotification sent to admin- Audit logged with severity = ActionRequired
- Admin reviews alert → navigates to user edit page → clicks "Unlock Account"
- System resets
FailedUsernamePasswordLoginAttemptsto 0, clears disabled date AccountUnlockednotification sent to user
Data Flow:
- Reads/Writes:
PartnerUser.FailedUsernamePasswordLoginAttempts,PartnerUser.Disabled Date - Reads:
PartnerSettings.MaxFailedUsernamePasswordLoginAttempts
3. Token Lifecycle Workflows
3.1 — Mobile Token Provisioning (Email/SMS Activation)
Trigger: Admin assigns a mobile authenticator token
to a user and sends activation instructions.
Actors: Admin, MFA Server, Notification Service, End
User, Mobile Authenticator App
Steps:
- Admin creates mobile token in portal (Device Type = 9, MobileAuthenticator)
- System generates OATH seed (secret key), sets OTP parameters
- Admin assigns token to user (
assign_device) - Admin clicks "Send Activation" →
send_device_activation - System generates activation URL with embedded provisioning code
- Sends via email (
ActivateDevicetemplate) or SMS (ActivateDeviceSmstemplate) - User opens link in SurePassID Authenticator → scans QR code
- App calls
provision_push_device→ registers push token (APNs/FCM) - App calls
active_oath_device→ confirms activation with OTP - Token status set to Active
API Endpoints: send_device_activation,
provision_push_device, active_oath_device
Data Flow:
- Creates:
Device,MobilePushNotification - Updates:
Device(status, Push Provision Date, Usage)
3.2 — Hardware Token Import & Assignment
Trigger: Admin imports hardware tokens from a PSKC
(Portable Symmetric Key Container) XML file.
Actors: Admin, Admin Portal, MFA Server
Steps:
- Admin navigates to Token Import page
- Uploads PSKC XML file (contains serial numbers, seeds, OTP parameters)
- Server parses PSKC → creates
Devicerecords for each token (status = Available) - Tokens appear in token inventory
- Admin assigns individual tokens to users
(
assign_device) - User activates by entering a valid OTP from the hardware token
(
active_oath_device)
Data Flow:
- Creates:
Devicerecords (one per hardware token in the PSKC file) - Updates:
Device.Assigned Partner User Id,Device.Status
3.3 — FIDO2/U2F Key Registration
Trigger: User or admin initiates FIDO security key
enrollment.
Actors: End User, Browser, MFA Server
Steps (FIDO2):
- Client requests attestation options →
/api/fido/v2/attestation/options - Server generates challenge, specifies RP info and user info
- Browser calls
navigator.credentials.create()→ user provides gesture - Client submits attestation result →
/api/fido/v2/attestation/result - Server validates attestation, extracts public key, stores credential
- Creates
DeviceFIDOApprecord with credential ID, public key, AAGUID, sign counter - Creates/updates
Devicerecord (Device Type = 12, FIDO)
API Endpoints:
/api/fido/v2/attestation/options,
/api/fido/v2/attestation/result
Legacy U2F: pre_enroll,
enroll
3.4 — OTP Sync (Counter Resynchronization)
Trigger: A hardware HOTP token's counter has drifted
out of the server's look-ahead window (user pressed the button without
authenticating).
Actors: End User or Admin, MFA Server
Steps:
- User/admin provides two consecutive OTP values from the token
sync_oath_device→ server searches the counter space for both OTPs in sequence- If found, counter is reset to the matched position
- Future OTP validations succeed again
API Endpoints: sync_oath_device,
/api/auth/otp/sync
3.5 — Token Decommissioning
Trigger: Admin removes a token from service (user
departure, lost token, token expiration).
Actors: Admin, MFA Server
Steps:
- Admin disables token →
disable_device→Device.Statusset to Disabled - Admin unassigns from user →
unassign_device→Device.Assigned Partner User Idset to NULL - Admin deletes token →
delete_device→Devicerecord removed DeviceFIDOApprecords cascade-deleted (FK with ON DELETE CASCADE)MobilePushNotificationrecords for this device are cleaned up- Audit trail preserved in
PartnerUserAudit
API Endpoints: disable_device,
unassign_device, delete_device
4. PIV Smart Card Workflows
4.1 — PIV Certificate Enrollment
Trigger: User or admin enrolls a PIV smart card by
registering its X.509 certificate.
Actors: End User (with PIV card + reader),
Browser/Agent, MFA Server
Steps:
- Client requests enrollment challenge →
piv_pre_enroll - Server generates random nonce, creates
PivAuthSession(state = Pending) - Client signs the nonce with the PIV card's private key (Key Slot 9A = Authentication)
- Client submits signed response + certificate chain →
piv_enroll - Server validates:
- Certificate chain (up to
PivTrustedCAroots) - Certificate not expired (
NotBefore/NotAfter) - Revocation status (CRL or OCSP via
CrlDistributionPoint/OcspResponder) - Signature over nonce is valid
- Certificate chain (up to
- Creates
Device(Type = 15, PivSmartCard) +DevicePivCertificaterecord - Assigns device to user
API Endpoints: piv_pre_enroll,
piv_enroll
Admin Batch: piv_admin_enroll (registers
cert without challenge-response, admin-only)
Data Flow:
- Creates:
Device,DevicePivCertificate(cert blob, hash, subject/issuer DN, FASC-N, UUID) - Reads:
PivTrustedCA(trusted certificate authorities for this tenant)
4.2 — PIV Challenge-Response Authentication
Trigger: User presents PIV card to
authenticate.
Actors: End User (with PIV card), Client Agent, MFA
Server
Steps:
piv_pre_auth→ server generates nonce, createsPivAuthSession- Client signs nonce with PIV card →
piv_auth - Server finds
DevicePivCertificateby cert hash, validates chain + revocation - Verifies signature matches stored public key
- Auth success → audit logged
API Endpoints: piv_pre_auth,
piv_auth
4.3 — PIV Header-Based Authentication (mTLS)
Trigger: TLS termination proxy passes client
certificate in HTTP header.
Actors: TLS Proxy, Client with PIV card, MFA Server
Steps:
- Client establishes mTLS connection with TLS proxy
- Proxy extracts client certificate → passes in
X-Client-Certheader piv_header_auth→ server parses certificate from header- Looks up
DevicePivCertificateby hash - Validates chain, revocation, and certificate status
- Auth success → session created
API Endpoints: piv_header_auth
Notes: This is a single API call but the TLS handshake with the proxy is the multi-step process.
5. PIV IoT Device Authorization Workflows
5.1 — IoT Device Registration
Trigger: Admin or API registers a new IoT device
(drone, sensor, access point) in the system.
Actors: Admin or External System, MFA Server
Steps:
piv_iot_register_device→ createsPivIotDevicerecord with:DeviceKey(unique identifier)DeviceName,DeviceType,LocationAllowedActions(what this device can authorize)RequiredKeySlots(which PIV key slots are accepted)- mTLS config:
RequireMutualTls,DeviceCertificate - Cellular config:
IsCellularDevice,Imei,Iccid - Offline config:
OfflineAuthEnabled,MaxOfflineDuration
- Optionally creates a corresponding
Devicerecord (Type = 16, PivIotDevice) for token management
API Endpoints:
piv_iot_register_device
5.2 — IoT Device Authorization
Trigger: An IoT device needs to verify that a user
with a PIV card is authorized to operate it.
Actors: IoT Device, User with PIV card, MFA Server
Steps:
- User presents PIV card to IoT device reader
- IoT device calls
piv_iot_authorizewith device key + certificate data - Server validates:
- Device is registered and enabled (
PivIotDevice) - Certificate is valid (chain, revocation)
- User is authorized for this device's
AllowedActions - Geofence check (if configured)
- Device is registered and enabled (
- Creates
PivAuthSession→ returns authorized actions - IoT device grants access for session duration
API Endpoints: piv_iot_authorize,
piviotauthorize_cellular (for cellular devices)
5.3 — IoT Offline Auth Bundle & Sync
Trigger: IoT device needs to operate in an area
without network connectivity.
Actors: MFA Server, IoT Device
Steps:
- Pre-flight (online): System issues
PivIotOfflineAuthBundlecontaining:- List of authorized users/certs (hashed)
- Geofence boundaries (
MaxFlightRadius,MaxAltitude,GeofenceData) - Validity window (
ValidFrom/ValidUntil) - Signed hash for tamper detection
- Offline operation: IoT device validates PIV certs locally against the bundle
- Reconnection: Device calls
piviot_offline_sync→ uploadsPivIotOfflineEventrecords - Server validates each event against the bundle hash → marks
Validated= true/false - Events with invalid bundle hashes are flagged for admin review
API Endpoints: piviot_offline_sync
Data Flow:
- Creates:
PivIotOfflineAuthBundle(pre-flight),PivIotOfflineEvent(sync) - Updates:
PivIotDevice(LastConnectedDate, battery level, signal strength, coordinates)
6. Session Management Workflows
6.1 — Session Token Lifecycle
Trigger: Successful authentication; client needs a
persistent session.
Actors: Client Application, MFA Server
Steps:
- After auth success →
create_session_token→ server generates token, stores with expiration - Client stores session token (cookie, header, or local storage)
- Subsequent requests include token →
is_session_token_valid→ server validates - On logout or timeout →
expire_session_token→ token invalidated
API Endpoints: create_session_token,
is_session_token_valid,
expire_session_token
7. SSO/SAML Workflows
7.1 — SAML2 SSO Login
Trigger: User accesses a Service Provider (SP)
application that redirects to SurePassID as the Identity Provider
(IdP).
Actors: End User, Service Provider, SurePassID IdP,
Browser
Steps:
- User accesses SP application (e.g., Salesforce, AWS Console)
- SP generates SAML AuthnRequest → redirects browser to SurePassID IdP SSO URL
- SurePassID displays login page → user authenticates (any Workflow 1.x method)
- IdP generates SAML Response with signed Assertion containing:
- NameID (user identifier)
- Attributes (email, groups, roles) configured in
PartnerSSOApps - Session index
- Browser POSTs SAML Response to SP ACS URL
- SP validates signature using IdP certificate from
PartnerSSOSettings - SP creates local session → user logged in
Data Flow:
- Reads:
PartnerSSOApps(SP configuration),PartnerSSOSettings(signing cert),PartnerUserSSOActivation(SSO session) - Writes:
PartnerUserSSOActivation(SSO session record),PartnerUserAudit
7.2 — SAML2 Single Logout (SLO)
Trigger: User logs out from one SP or the IdP,
triggering logout across all active sessions.
Actors: End User, Initiating SP, SurePassID IdP, Other
SPs, Browser
Steps:
- User clicks logout at SP (or IdP)
- SP sends LogoutRequest to SurePassID IdP
- IdP validates LogoutRequest signature (if
SSO Require Signed Logout Requests= true) - IdP looks up all active SSO sessions for this user
(
PartnerUserSSOActivation) - For each other SP with an active session:
- IdP sends LogoutRequest (binding per
SSO SP Logout Binding: HTTP-POST or HTTP-Redirect) - Waits for LogoutResponse from each SP
- IdP sends LogoutRequest (binding per
- IdP invalidates local session
- IdP sends LogoutResponse to initiating SP (signed if
SSO Sign Logout Responses= true) - User logged out of all applications
Data Flow:
- Reads/Deletes:
PartnerUserSSOActivation(all sessions for user) - Reads:
PartnerSSOApps(logout URLs, binding config)
8. Token Ordering & Inventory Workflows
8.1 — Manual Hardware Token Order
Trigger: Admin places an order for hardware security
keys (e.g., YubiKeys) through the admin portal.
Actors: Admin, Admin Portal, MFA Server, YubiEnterprise
Delivery API
Steps:
- Admin navigates to
tokenorderdetail.aspx - Selects product (e.g., YubiKey 5 NFC), quantity, shipping address
- Clicks "Submit Order" →
TokenOrdercreated (status: PendingApproval) - Admin (or approver) reviews and approves → status: Approved
- System calls YubiEnterprise Delivery API to create shipment
- Yubico ships keys → tracking number received → status: Shipped
- Keys delivered → status: Delivered
- Yubico webhook calls
token_order_registerwith serial numbers TokenInventoryrecords created (status: Available)
Data Flow:
- Creates:
TokenOrder,TokenInventory - Updates:
TokenOrder(status transitions, tracking, timestamps) - Reads:
PartnerSettings(YubiEnterprise API token, default shipping address)
8.2 — FIDO2 Pre-Registration Order
Trigger: Admin orders YubiKeys with FIDO2
credentials pre-registered for specific users.
Actors: Admin, MFA Server, YubiEnterprise API
Steps:
- Admin creates order with OrderType =
Fido2PreRegand assigns to user - System generates ECC key pair
(
YubiFprEncryptionService) - Submits to YubiEnterprise API with
FidoPinRequest+FidoCredentialRequests - YubiKey ships with credentials pre-loaded
- On delivery, YubiEnterprise returns encrypted FPR response
- System decrypts PIN and credential data using stored private keys
- Registers credentials in
DeviceFIDOApp→ user can authenticate immediately
Data Flow:
- Creates:
TokenOrder(withFprPrivateKeys,FprResponseData),DeviceFIDOApp - Reads:
PartnerSettings.YubiEnterpriseFido2CustomizationId,YubiEnterpriseFido2PinLength
8.3 — Token Inventory Management
Trigger: Admin manages physical token stock —
assigning, unassigning, and retiring tokens.
Actors: Admin, MFA Server
Steps:
- Tokens received →
TokenInventorystatus = Available - Admin assigns to user →
token_inventory_assign→ status = Assigned,AssignedUserIdset - If token also needs MFA registration: admin creates
Devicerecord, links toTokenInventory.AssignedDeviceId - User departs or token replaced →
token_inventory_unassign→ status = Available - Token damaged or expired → admin retires → status = Retired,
RetiredDateset
API Endpoints: token_inventory_find,
token_inventory_assign,
token_inventory_unassign
9. Admin & Operations Workflows
9.1 — Tenant Onboarding
Trigger: System admin creates a new tenant (Partner)
in SurePassID.
Actors: System Admin, MFA Server
Steps:
- System admin creates new
Partnerrecord - System creates
PartnerSettingswith default values usp_CreateDefaultTemplatesForPartnercopies all system notification templates to the new tenant- First admin user created for the tenant
TenantWelcomeemail sent to admin with login credentials, setup instructions, and Authenticator QR code- Admin logs in → configures MFA policies, FIDO2 settings, SAML apps, etc.
9.2 — Tenant Configuration
Trigger: Admin modifies tenant-level settings in
clientsettings.aspx.
Actors: Admin, Admin Portal
Steps:
- Admin opens Settings page → UI loads current values from
PartnerSettings - Admin modifies settings (FIDO2 config, PIN policy, push settings, log settings, etc.)
- Clicks Save →
PartnerSettingsupdated →ModifiedDate+ModifiedByPartnerUserIdstamped - Changes take effect immediately for all subsequent auth requests
Settings Categories:
- FIDO2 (passwordless, second factor, supported releases, admin activate)
- PIN Management (VPN PIN reset, alpha PINs, PIN length)
- Push/IVR (push timeouts, IVR cancel key, IVR timeout)
- System Log (audit record count, log controls)
- Token Management (mobile resets, token expiration, drift units, provisioning issuer)
- User Authentication (login by email, login by SSO name)
- Failed Login Policy (max failed attempts)
9.3 — Event Log Sync (Multi-Site)
Trigger: Remote SurePassID server synchronizes its
audit records with a central server.
Actors: Remote MFA Server, Central MFA Server
Steps:
- Remote server calls
event_log_sync_starton central server - Central server returns audit records where
RemoteSyncDateis NULL (not yet synced) - Remote server stores records locally
- Central server updates
RemoteSyncDateon synced records
API Endpoints: event_log_sync_start
9.4 — Notification Template Customization
Trigger: Admin customizes notification templates for
their tenant.
Actors: Admin, Admin Portal
Steps:
- Admin navigates to notification template management
- Views tenant-specific templates (initially copied from system defaults)
- Edits template body, subject, from address using
{{placeholder}}syntax - Saves →
NotificationTemplaterecord updated →Versionincremented - Future notifications for this tenant use the customized template
- System resolves templates in order: Partner-specific → System default
Partial List of Available Placeholders:
{{user.fullName}},{{user.loginName}},{{user.email}},{{user.cellPhone}}{{tenant.name}},{{tenant.domain}}{{otp}},{{otp.expirationMinutes}}{{token.serialNumber}},{{token.activationUrl}},{{token.qrCodeImage}}{{password}},{{loginUrl}},{{resetUrl}}{{currentDate}},{{currentTime}},{{ipAddress}}
9.5 — API Key Management
Trigger: Admin creates or manages API keys for
external system integration.
Actors: Admin, Admin Portal
Steps:
- Admin navigates to API Keys page
- Creates new API key with:
- Description
- Access Login (username)
- Access Key (password/secret)
- Access Rights (semicolon-separated
ApiPermissionIDs)
PartnerApirecord created- External systems use this API key to authenticate REST API calls
- Each API call is authorized against
ApiPermission+ApiEndpointtables - Admin can revoke or modify permissions at any time
Data Flow:
- Creates/Updates:
PartnerApi - Reads (on each API call):
PartnerApi,ApiPermission,ApiEndpoint
10. Notification Workflows
10.1 — Unified Notification Delivery
Trigger: Any system event that requires user or
admin notification.
Actors: MFA Server, Notification Service, SMTP Server,
Twilio (SMS/Voice), APNs/FCM (Push)
Steps:
- System event occurs (OTP request, device activation, password reset, account locked, etc.)
- Notification service resolves template:
- Look for partner-specific template
(
NotificationTemplatewherePartnerId= tenant) - Fall back to system default (
PartnerId= NULL)
- Look for partner-specific template
(
- Substitute placeholders (
{{user.fullName}},{{otp}}, etc.) - Route to delivery channel based on
NotificationType:- 1 = Email → SMTP server (from address, subject, HTML or plaintext body)
- 2 = SMS → Twilio API (short format, character limits)
- 3 = Voice/IVR → Twilio voice API (text-to-speech)
- 4 = Push → APNs (iOS) or FCM (Android) via push token
- Audit logged to
PartnerUserAudit(SendEmail=68, SendSms=69, SendVoice=70)
Template Codes (complete list):
| Code | Description | Channels |
|---|---|---|
SendOtp |
One-time password delivery | Email, Voice |
SendOtpSms |
OTP via SMS (short format) | SMS |
SendTemporaryOtp |
Temporary/recovery OTP | Email, SMS |
ActivateDevice |
Token activation instructions | Email, SMS |
ActivateDeviceSms |
Token activation (SMS short) | SMS |
DeviceProvisioning |
Device setup instructions | Email, SMS |
DeviceExpiring |
Token expiration warning | |
PasswordReset |
Password reset link | |
PasswordChanged |
Password change confirmation | |
PasswordChangeFailed |
Failed password change alert | |
AccountLocked |
Account locked notification | |
AccountUnlocked |
Account unlocked notification | |
AccountDisabled |
Account disabled notification | |
Enroll |
New user welcome/enrollment | |
LoginInformation |
User login credentials | |
TransactionStatus |
Push yes/no via SMS | SMS |
PushYesNoSms |
Push approval question via SMS | SMS |
PushAuthentication |
Push auth request | Push |
IvrOtpMessage |
Voice OTP delivery | Voice |
IvrAuthSuccess |
Voice auth success | Voice |
IvrAuthFailure |
Voice auth failure | Voice |
LicenseExpiring |
License expiration warning | |
SystemAlert |
System alert notification | |
SecurityAlert |
Security event alert | |
SsoAccountActivation |
SSO account setup | |
SsoSessionExpiring |
SSO session expiring | |
TenantWelcome |
New tenant welcome | |
AccountAccess |
New login detected | |
TermsOfUse |
Terms of Use content | Email (HTML) |
11. Planned: Risk-Based Authentication
11.1 — Risk-Based Adaptive Authentication
Status: Planned — Ovreview Trigger:
Any authentication attempt when RBA is enabled for the tenant.
Actors: End User, Client Application, MFA Server, GeoIP
Service, Risk Scoring Engine
Steps:
- Primary authentication succeeds (any Workflow 1.x)
RiskAuthenticationHandlercollects contextual signals:- IP address → GeoIP lookup (country, city, lat/long)
- User-Agent → device fingerprint hash
- Timestamp → off-hours check
RiskScoringServiceevaluates 9 risk factors against user'sPartnerUserRiskProfile- Computes composite score (0–100)
- Compares to tenant thresholds:
- Score < 30 → Allow (log score, update profile)
- 30 ≤ Score < 90 → Step-Up (create
RiskStepUpSession, trigger additional factor) - Score ≥ 90 → Block (deny access, alert admin)
- Score + factors written to
PartnerUserAudit - User's
PartnerUserRiskProfileincrementally updated after low-risk success
Workflow Summary
| # | Workflow | Category | Primary Actors |
|---|---|---|---|
| 1 | Credential + OTP Authentication | Authentication | User, Client |
| 2 | Credential + Push Authentication | Authentication | User, Client, Mobile App |
| 3 | Credential + FIDO U2F Authentication | Authentication | User, Browser |
| 4 | FIDO2 Two-Factor Authentication | Authentication | User, Browser |
| 5 | FIDO2 Passwordless Authentication | Authentication | User, Browser |
| 6 | Bypass MFA Authentication | Authentication | User, Admin |
| 7 | Manual User Creation (Portal) | Provisioning | Admin |
| 8 | User Creation via REST API | Provisioning | External System |
| 9 | CSV Bulk User Import | Provisioning | Admin |
| 10 | AD/LDAP User Import (Portal) | Provisioning | Admin |
| 11 | Directory Sync (Scheduled) | Provisioning | System, AD/LDAP |
| 12 | Directory Sync + Auto Token Assignment | Provisioning | System, AD/LDAP |
| 13 | Password Recovery | Lifecycle | User |
| 14 | Account Lockout & Unlock | Lifecycle | User, Admin |
| 15 | Mobile Token Provisioning | Token | Admin, User |
| 16 | Hardware Token Import & Assignment | Token | Admin |
| 17 | FIDO2/U2F Key Registration | Token | User, Browser |
| 18 | OTP Sync (Counter Reset) | Token | User/Admin |
| 19 | Token Decommissioning | Token | Admin |
| 20 | PIV Certificate Enrollment | PIV | User, Admin |
| 21 | PIV Challenge-Response Auth | PIV | User |
| 22 | PIV Header-Based Auth (mTLS) | PIV | User, TLS Proxy |
| 23 | IoT Device Registration | PIV IoT | Admin |
| 24 | IoT Device Authorization | PIV IoT | User, IoT Device |
| 25 | IoT Offline Auth Bundle & Sync | PIV IoT | System, IoT Device |
| 26 | Session Token Lifecycle | Session | Client |
| 27 | SAML2 SSO Login | SSO | User, SP, IdP |
| 28 | SAML2 Single Logout (SLO) | SSO | User, SP, IdP |
| 29 | Manual Hardware Token Order | Ordering | Admin, Yubico |
| 30 | FIDO2 Pre-Registration Order | Ordering | Admin, Yubico |
| 31 | Token Inventory Management | Ordering | Admin |
| 32 | Tenant Onboarding | Admin | System Admin |
| 33 | Tenant Configuration | Admin | Admin |
| 34 | Event Log Sync (Multi-Site) | Admin | System |
| 35 | Notification Template Customization | Admin | Admin |
| 36 | API Key Management | Admin | Admin |
| 37 | Unified Notification Delivery | Notification | System |
| 38 | Risk-Based Adaptive Auth (Planned) | RBA | System |
Total: 38 workflows spanning ~60+ API endpoints, multiple UI pages, background processes, and external service integrations.
© 2013–2026 SurePassID. All rights reserved. Protected by patents pending. SurePassID, the SurePassID logo and design, and Secure SSO are registered trademarks or trademarks of SurePassID, Corp. in the United States and/or other jurisdictions. All other marks and names mentioned herein may be trademarks of their respective companies.
SurePassID 360 Central Avenue #800 St. Petersburg, FL 33701 USA +1 (888) 200-8144 surepassid.com