Security model
What protects a sign-in
- Something the user has: the iPhone that linked. Each install creates a P-256 key in the Secure Enclave. The private key can't leave the phone; every call the app makes is signed with it, with a timestamp and a single-use nonce (replays are rejected).
- Something the user is: Face ID or the passcode before answering (policy Require Face ID).
- Proof they're looking at your sign-in: number matching. The phone offers three numbers; only the
one on your page approves. A user who gets a request they didn't start can't approve it by reflex,
and the wrong number is recorded as
deny_reason: "number_mismatch". - Anti push-bombing: at most 5 requests per user per minute, short expiry (30–300 s).
What your server must do
- Keep API keys and webhook secrets in server-side secret storage. Rotate them in the console if they may have leaked (revoking a key takes effect immediately).
- Create the approval for the user who passed your first factor, store its id in that sign-in's
server-side session, and only finish the sign-in when that approval's status is
approvedand itsexternal_user_idmatches. Never trust an approval id, status or number sent back by the browser. - Treat
denied,expired, errors and timeouts as refusals. Keep a recovery path (backup codes, support) that doesn't depend on the phone. A TOTP backup code in Trowyn covers "no push"; it doesn't cover a lost phone. - Verify webhook signatures on the raw body, reject stale timestamps, and de-duplicate on the event
id. - Use stable, non-reassignable
external_user_ids (not emails that can change hands). - Use number matching (on by default).
Verify the device signature
Optional, for end-to-end proof that doesn't rely on Trowyn's servers. approval-status returns
response:
signed_payloadhas 7 lines. Lines 1–6 are what the device signed:TROWYN-SIG-V1,POST,respond-approval, timestamp (ms), nonce, and the hex SHA-256 of line 7.- Line 7 is the JSON body:
approval_id,decision, and (with number matching)chosen_number. signatureis ECDSA P-256 with SHA-256, DER encoded, base64.device_public_keyis the uncompressed P-256 point (65 bytes, base64). Pin it per link if you want to detect a different device answering.
Check: SHA-256(line 7) equals line 6, the signature verifies over lines 1–6 joined with \n, the JSON's
approval_id is yours and decision is approve.
What Trowyn stores and never stores
Stored: your organization's name and settings, member emails and roles, hashes of API keys and link
codes, webhook URLs and (encrypted) signing secrets, each linked device's public key and push token,
your external_user_id and label, approval requests and an audit log. See retention
and the privacy policy.
Never sent to Trowyn: the user's one-time codes, authenticator secrets, passkeys or backups. Those never leave the phone (except to the user's own iCloud, encrypted). That includes backup codes you add to a link: the secret goes from your page to the phone inside the QR code only.
Platform
- Database tables are locked to the service itself (row-level security denies all client access); API keys are only checked server-side.
- Console sign-in requires a confirmed email and an authenticator code (AAL2). Sessions end after 60 minutes idle. Every console action is in the audit log.
- Webhook URLs are restricted to public HTTPS hosts; secrets live in an encrypted vault.
- The widget's
client_tokencan only read one request's status, and only for that request.
Report a vulnerability to support@miclikz.com with "SECURITY" in the subject.