Skip to content

Field-worker identity

Field workers are the people who do the physical work: drivers, warehouse staff, people at a yard gate. They sign in on a phone of their own or on a shared handheld, often wearing gloves, often with poor coverage, and usually without an email address. FlowCatalyst gives them a sign-in of their own: a PIN held by the platform and a session bound to the device’s key, so applications for field workers neither store PINs nor write session code.

Field workers are a separate identity plane, like portal identities. They are not principals, and their tokens carry no platform authority.

Part What it is
Field worker (fwu_) One per client and worker code (an employee or badge number, unique within the client; optional when the worker is created, in which case the platform generates one such as KTM482). Name, optional email and phone, status, PIN hash, lock state, and grants to the applications the worker may sign in to.
Device (fwd_) An enrolled phone or handheld: its public key, its mode (PERSONAL or SHARED), its attestation level, optionally the worker it is assigned to and the applications it may run. Enrolment is optional.
Badge (fwb_) A printed QR code that stands for a worker.
Field policy Per client: PIN length, lock thresholds, idle and shift limits, and the switches for enrolment, badges, impersonation, photos and unlock keys. A client with no policy gets the defaults. An application can override eight members of it for itself (see Application overrides).
Field session One login family: rotating refresh tokens bound to one device key, with an idle limit and an absolute limit.

What a worker may do (which routes, loads, gates or picking zones) stays in the application. The platform stores only “this worker may sign in to that application”.

Every device-facing call goes to /field/* and carries a proof: a small JWS signed by a key the device holds, over the HTTP method, the URL, a server nonce and (when a token is sent) the token’s hash. The format follows OAuth DPoP (RFC 9449). The device library makes the key: a hardware-backed key on Android (StrongBox, else the TEE), or a non-extractable WebCrypto key in a browser or WebView. The key never leaves the device.

sequenceDiagram
  autonumber
  participant D as Device library
  participant FC as FlowCatalyst /field/*
  participant App as App backend

  D->>FC: /field/auth/nonce
  FC-->>D: nonce (single use, 5 minutes)
  D->>FC: /field/auth/login {appCode, workerCode or badge, PIN} + proof
  FC->>FC: device or address budget, worker ACTIVE, not locked
  FC->>FC: PIN check, then grant and app checks
  FC-->>D: access token (10 min, bound to the key) + refresh token
  D->>App: API call: Authorization: DPoP token + proof
  App->>App: verify token signature, aud = app, proof key = cnf.jkt
  D->>FC: /field/auth/refresh + proof from the same key
  FC-->>D: new pair (the old refresh token is spent)

The platform checks things in an order that leaks nothing: the throttle budget first, then the worker’s state and lock, then the PIN, and only then the grant and application checks. Someone who guesses wrong cannot learn whether a worker exists or which applications they use. Device clocks on rugged hardware drift, so freshness comes from the single-use server nonce, not from the proof’s timestamp.

The access token is a JWT with the type fc-field+jwt and token_use: "field". Its aud is the application code, sub the worker, and cnf.jkt the thumbprint of the device key. It also carries the client, worker code, device id and mode, the session, and amr (how the worker authenticated: pin, badge, code, imp, and hwk with uv for a sign-in with an unlock key). It lives 10 minutes by default (FC_FIELD_ACCESS_TOKEN_TTL_SECS). The platform API refuses it as a credential.

The refresh token is opaque, stored hashed, rotated on every use, and accepted only with a proof from the same key. Presenting a spent one, or presenting one from a different key, is treated as theft and revokes the whole family.

Session limits depend on the device:

Device Idle limit Absolute limit
Enrolled, PERSONAL 2 hours the shift cap, 14 hours by default
Enrolled, SHARED 15 minutes 12 hours
Not enrolled 15 minutes 12 hours

A worker hands a shared device over by ending the session.

A worker code and PIN work from any device: the library makes a key without telling the platform first, and the token is still bound to it, so a stolen token remains useless elsewhere. On an unenrolled key the token has no device id and its mode is UNENROLLED, and the worker’s client must be named in the login.

Enrolling a device adds what needs the platform to know the device. An administrator or supervisor creates a single-use enrolment code (valid 10 minutes, shown as a QR code), and the device registers its public key with it. An enrolled device can then be suspended or revoked remotely, gets its own failure budget, can be limited to certain applications and assigned to one worker, and can use badge-only sign-in, biometric unlock and unlock keys. A client can require enrolment (requireEnrolledDevice) and a hardware attestation (requireAttestation).

The PIN is the worker’s credential, and the platform owns it, as it owns passwords for platform users:

  • Policy. Six digits by default; a client may allow four, with a stricter lock. Repeated digits, straight runs, common PINs and the worker’s own code are refused. Administrators can issue a temporary PIN that must be changed at next sign-in.
  • Locks. Five failures since the last success cause a 15-minute soft lock; ten cause a hard lock that only a supervisor or administrator can clear.
  • Spraying. A stolen handheld trying one common PIN against hundreds of worker codes never trips a per-worker lock, so each device (or, for unenrolled devices, each network address) and each client also has an hourly failure budget.
  • Hashing. A six-digit PIN has only a million values, which no hash cost can protect on its own. The platform hashes an HMAC of the PIN under a secret pepper derived from the application key, so a copy of the database alone cannot be searched offline. Without the application key the field plane refuses to hash or verify anything.

The PIN is typed into the platform-maintained device library, which sends it straight to /field/*. The application’s backend never sees it. This is a deliberate exception to the rule that credentials are typed only into platform pages: a hosted page or browser tab is hostile to gloved hands and kiosks, and the library is platform code, not product code.

A worker can sign in by scanning a printed badge: a QR code holding a random token (FWB1 followed by 26 characters), which a camera or a scanner’s keyboard wedge reads the same way. The platform stores only its hash and shows the token once, at issue; reprinting means issuing a new one, and a worker has one active badge at a time.

A badge identifies the worker; by default it does not replace the PIN (amr: ["badge","pin"]). A client can allow badge-only sign-in, and then only on an enrolled device, so a photocopied badge does not work from an arbitrary phone.

Phone biometrics belong to the device. On a shared handheld any enrolled finger passes, and the application is not told whose it was. So a biometric never says who someone is on its own, and nothing here uses one on a SHARED device or on an impersonated session. There are two ways a biometric is used on a PERSONAL enrolled device:

  • App unlock (local). It unlocks a session a PIN already started. In browsers and WebViews (field-js) the biometric releases the stored refresh token. In native Android apps (field-android, and React Native on top of it) the session refreshes in the background without a prompt, and the biometric gates the app’s screens after a cold start or time in the background. The platform is not told, and the session’s amr is unchanged.
  • Unlock keys (platform-verified). A worker whose session has ended signs in again with a fingerprint or face instead of the PIN. See below.

Unlock keys: sign in again with a biometric

Section titled “Unlock keys: sign in again with a biometric”

The usual shortcut for “sign in again with a fingerprint” is to keep the PIN on the phone behind a biometric and replay it. That puts the PIN on the phone, hides from the platform that a biometric was used, and cannot be limited or revoked. An unlock key replaces it. The device library makes a key pair in the phone’s secure hardware (an ECDSA P-256 key in the Android Keystore, StrongBox first and then the TEE, or in the iOS Secure Enclave) that can sign only after a strong biometric match, and that stops working when a biometric is enrolled on the phone. The platform holds the public half. To sign in, the library asks for a fresh challenge, the worker uses the biometric, the key signs the challenge, and the platform verifies the signature and issues a new session whose amr is ["hwk","uv"] (a hardware-held key, user verification). Neither the platform nor the phone ever stores the PIN.

The rules, all enforced by the platform:

  • Off by default. The client’s field policy must set unlockKeysEnabled (an application can override it for itself).
  • Personal, enrolled devices only. Never a SHARED device, an unenrolled key or an impersonated session. A device holds at most one live key, and a second worker is refused rather than replacing the first (a phone that changes hands is an administrator’s decision, or the first worker’s, from the device).
  • Registered after a PIN sign-in. The library offers the key right after the worker signs in with the PIN, within 10 minutes. A session that itself came from an unlock key, a badge alone or an impersonation cannot register the next key.
  • The PIN comes back when it should. The PIN is asked for whenever a key is revoked, invalidated or unknown, after a PIN change on another device or a reset, and while a temporary PIN is pending. A policy setting, pinReauthDays (0 to 90, default 0: never), can also force the PIN every so many days after the worker last entered it on that device.
  • Revocable. The platform ends a worker’s keys when a supervisor resets the PIN, the worker is suspended, reaches the hard lock or is deleted, or the device is revoked. It ends every key of a client when the policy switches unlock keys off (unless an application’s override keeps them on). An administrator can revoke one key, and the sessions it signed in, from the console. The worker can switch it off from the phone.
  • Failures count. A forged or replayed signature counts as a wrong PIN against the worker’s lock and the device and client budgets. A successful unlock does not reset the PIN’s failure counter, so alternating unlocks with PIN guesses cannot avoid the hard lock.
  • Attestation is optional. A client can set unlockKeyAttestation to REQUIRED, so only keys the platform can trace to a trusted Android hardware root register. iOS cannot attest a Secure Enclave key, so such a client cannot use unlock keys on iOS. REQUIRED needs the platform operator to configure FC_FIELD_ATTESTATION_ROOTS.

The device libraries that support it are field-android (Android 11, API 30, or later), field-ios and field-react-native on top of both. field-js does not support unlock keys: a browser cannot hold a key behind a biometric, so its unlockKeyAvailability() is always "UNSUPPORTED". Build status: the platform side, the libraries and the console are released (platform 0.31.0; field-android 0.6.0, field-ios 0.5.0, field-react-native 0.7.0). The owner has run it end to end on a real Android phone against a non-production platform. It has not been run on an iPhone. The guide Unlock keys: sign in with a fingerprint or face shows the calls.

A worker can have a photograph, set when the worker is set up and shown where it helps people recognise who they are dealing with: the console’s worker list and drawer, the worker’s own profile on the phone, and your own application’s pages. It is the worker’s, not a platform user’s.

  • Who sets it. An administrator in the console, an application’s service account through the API, or, when the client’s policy has workerMaySetOwnPhoto (off by default), the worker themselves on their device. A supervisor acting as a worker may read the photo but not change it.
  • Where it lives. In the platform database, in a table of its own, so no object store or credential is needed. The platform decides the image type from the bytes (JPEG, PNG or WebP) and re-encodes it to two JPEG renditions, 512 px and 128 px, so the EXIF position, comments and every other byte of the upload are dropped. The defaults refuse an upload over 10 MiB or 25 megapixels.
  • On by default. The client’s policy photosEnabled is true unless set otherwise; switching it off hides the photos and keeps them, and a separate operation deletes them. A platform operator can switch the feature off platform-wide with FC_FIELD_PHOTOS=off.
  • Never in a token, event or log. No token claim carries a picture. A worker’s photo is not served to another worker’s device: if a store’s staff must see the driver collecting, your backend fetches the photo with its service account and decides who may see it.

The device libraries expose getPhoto, setPhoto and removePhoto, and the sign-in answer carries worker.photoVersion and worker.canSetOwnPhoto. See Administer photos.

The field policy belongs to the client, but a client often runs several applications for the same workers. An application can override eight members for itself: unlockKeysEnabled, requireEnrolledDevice, badgeOnlyLogin, photosEnabled, and the idle and shift limits sharedIdleSecs, personalIdleSecs, shiftMaxSecs and unenrolledIdleSecs. Everything else stays client-wide: the PIN rules and lock thresholds, pinReauthDays, impersonationMaxSecs, requireAttestation, unlockKeyAttestation, workerMaySetOwnPhoto and workerCodeDigits.

An override replaces the client’s value for that application, in either direction, and applies only when the application is active, enabled for the client, and the worker holds it. A platform administrator can lock a member, so a client that wants one rule everywhere has it: an override of a locked member is kept but does not apply. See Application overrides and locks for who may set what.

Three ways let someone act as a worker. Each token keeps the worker as the subject and adds an act claim naming who is really acting, and amr ends with imp, so applications can record “done by X as worker Y”:

  • A supervisor on a device. A worker marked canImpersonate can take over for another worker of the same client by entering their own PIN again. The supervisor’s own session is kept aside and restored afterwards. Supervisors cannot act as other supervisors, and impersonation does not nest.
  • An administrator from the console. The console issues a single-use sign-in code (valid 10 minutes) for one worker and one application, which the administrator redeems on whatever device they are using. It needs platform:iam:field-worker:impersonate.
  • Test identities. A worker marked as a test identity carries test: true in its tokens. Sign-in codes for test identities need only the manage permission and may be created by service accounts, so automated QA can sign in without a PIN.

Impersonated sessions have their own cap (four hours by default), never outlive a supervisor’s own session, and are revoked when the actor is suspended.

An administrator can also link a field worker to a platform user, for example a dispatcher who also drives. The link is for audit correlation only (linked_principal_id) and grants nothing on either side.

An application’s backend verifies each request itself: the token’s signature against the platform’s published keys, its aud against the application’s own code, and the proof against the key the token is bound to. The SDKs and both frameworks provide this verifier, tested against shared fixtures. Field tokens never carry platform roles; an application grants its own permissions to a worker from its own data.

Revocation is central. Suspending a worker, or revoking or suspending a device, revokes its sessions in the same transaction, so the next refresh fails, and the platform emits events (platform:iam:field-worker:suspended, …:field-device:revoked, …:field-session:revoked and others) that applications can subscribe to. An access token already issued stays valid at an application until it expires (at most 10 minutes); before a high-value action an application can check it online with POST /api/field-tokens/introspect.

Field tokens also open push streams. The push gateway accepts a field token with its proof, and grants the worker only topics of the application the token was issued for: rules and tickets for any other application are ignored.

Threat Mitigation
Guessing a PIN online Locks per worker, failure budgets per device or address and per client, six digits by default
Trying one PIN against many workers Per-device or per-address and per-client budgets
A stolen database copy The pepper: the hashes are useless without the application key
A stolen device or a copied token Tokens bound to a non-extractable device key, short access tokens, remote revoke, shift caps
Biometrics on shared devices No biometric sign-in on a shared device; app unlock and unlock keys are for personal, enrolled devices only
A family member’s finger on a personal phone Unlock keys need a strong biometric and are invalidated when one is enrolled; an unlock does not reset the PIN’s failure counter; pinReauthDays can force the PIN periodically; a key can be revoked at any time
A photocopied badge A badge plus PIN by default; badge-only only on enrolled devices
A leaver or a shared PIN One suspend ends every session; every sign-in is recorded with device and method