Commit Graph
80 Commits
Author SHA1 Message Date
Matthew Meszaros a79a196912 feat: add Warmbly for Agencies with a separate agency view, agency accounts, a shared monthly send pool, a shared agency AI balance with per-client caps and transfers, agency billing and top-ups, agency API keys across clients, client mailbox connect links and shareable and scheduled client reports served by a separate portal service on portal domains, white-label branding with a branded client dashboard on agency portal domains and website embeds, copy campaigns and templates across workspaces, and a cross-client inbox 2026-11-10 08:31:31 +01:00
Matthew Meszaros bed4744c21 feat: let the iOS app replace an issued initial password at sign-in with a choose-and-confirm step that calls /auth/login/initial-password and continues into the emailed code or 2FA, declare it with supports_password_change on /auth/login, answer earlier app builds that omit it with initial_password_web_only so their holders finish first sign-in on the web, and document the field and code 2026-11-09 16:58:13 +01:00
Matthew Meszaros 7325715c80 feat: remove the referral program from settings, the iOS billing page, the marketing site and the docs, stop attributing new signups to referral links, keep rewarding and clawing back referrals already attributed, and let a referral-backed discount code apply only to the workspace that signed up through it 2026-11-07 06:55:33 +01:00
Matthew Meszaros 2460d3fefb Merge pull request #1099 from warmbly/feat/signin-methods-email-login
feat: move provider-created accounts to email sign-in and manage linked sign-in methods from Settings > Security
2026-10-31 14:01:52 +00:00
Matthew Meszaros 7f0d4f2598 feat: serialize passkey deletion and sign-in provider removal on the user row lock so neither removes an account's last way in (last_sign_in_method on DELETE /auth/passkey/credentials/:id), and clear legacy token keys after a password reset 2026-10-31 14:43:33 +01:00
Matthew Meszaros f5c2f53642 feat: let provider-created accounts set a password from Settings > Security through an emailed link (POST /auth/me/password/link), list and remove linked Google, Apple and SSO sign-in methods behind a fresh confirmation that keeps a way in and signs out that provider's other sessions (GET/DELETE /auth/me/identities), open reset links in a signed-in browser, and document the move to email sign-in 2026-10-31 14:14:13 +01:00
Matthew Meszaros 3abefbeb42 feat: bind each initial-password challenge to the issued password hash so a reissued password voids it, issue a new password only to a tester that is still exempt, keep the whole inline SERVE_TLS_CERT chain in realtime, name BACKEND_INTERNAL_CA_FILE in the forms startup error, and list the tester password and login-code exemption routes as needing a recent confirmation 2026-10-31 14:06:20 +01:00
Matthew Meszaros ba3c806fd4 feat: make issued tester passwords initial credentials capped at 48 hours by a users trigger (migration 000336), answer a sign-in with one with password_change_required and a single-use initial_password token for POST /auth/login/initial-password that stores the holder's own password and continues the normal sign-in, add the web choose-your-password step, admin panel copy and docs 2026-10-31 11:26:06 +01:00
Matthew Meszaros 2e0b5d2059 feat: refuse realtime tickets that name no session, accept the brokered sign-in continue only as a POST, read the reset link token only from its fragment, forget the signing-out browser's remembered-device tokens on sign-out (POST /auth/logout device_tokens), and recognise Traefik's placeholder certificate from any verification error 2026-10-31 11:04:48 +01:00
Matthew Meszaros fb1dd0113a feat: point the workspace isolation CI step at the loopback PostgreSQL service like the other live steps, and use loopback and example.com values in the change-password, session deadline and log transport tests 2026-10-26 08:12:25 +01:00
Matthew Meszaros dec13b1503 feat: merge fresh authentication on member, role, billing, credit, API key and webhook routes, reset tokens in the URL fragment, refused repeated OAuth form parameters and the 48-hour invitation and tester expiry cap into the tenant-scoped hosts branch 2026-10-26 06:56:09 +01:00
Matthew Meszaros b152336626 feat: state the auth rate limit, login gate, admin second factor, broker access log, outbound webhook URL validation and unibox tag scoping comments as the invariants the code holds 2026-10-26 06:54:02 +01:00
Matthew Meszaros e44ec03cde feat: render campaign copy once after the A/B variant pick, escape reply template HTML previews in one pass, keep revoked session tombstones for the session cache lifetime and fill the cache with SetNX, refuse realtime socket tickets whose single use cannot be recorded, clear workspace-derived dashboard storage on logout, and add tests for session deadlines, password change revoke order, fresh auth, emailed code budgets, join token rotation, gin release mode, panic bodies and the auth secret floor 2026-10-26 06:13:59 +01:00
Matthew Meszaros 9be5c8a3c3 feat: give API refusals stable codes and actionable messages (attempt_check_unavailable and code_lookup_limited with Retry-After, account and workspace standing codes, session_ended, reset_link_invalid, sessions_not_ended, api_credentials_revoke_unsupported, invitation_expired, image_unreadable and the other image upload codes, own-domain redirects naming the allowed domains, Pipedrive reload guidance, duplicate parameters, structured forms service errors), and show them in the dashboard, admin panel and warmbly CLI 2026-10-23 19:53:03 +02:00
Matthew Meszaros dba87e8d74 feat: merge fail-closed ban and attempt-budget reads, 48-hour invitations and tester passwords with one-click resend, transactional invitation consumption, development-only seeding and redacted log mail links 2026-10-23 16:06:29 +02:00
Matthew Meszaros e0a97ef520 feat: end other sessions before a signed-in password change is stored and refuse the change when that fails, add an optional revoke_api_credentials to the change and reset that also revokes the user's OAuth grants and the API keys they created, exchange the emailed reset link for an opaque reset session through POST /auth/reset-password/session so the confirm step carries no token in its URL, and add the sign-out-apps checkbox to the dashboard's change-password dialog 2026-10-23 15:45:51 +02:00
Matthew Meszaros b14e1b1679 feat: refuse sign-in, emailed-code, two-factor, SSO-link and re-authentication checks with a retryable 503 when their attempt budget cannot be charged, and refuse password, passkey and two-factor sign-in and workspace creation when the account's ban or two-factor state cannot be read 2026-10-23 15:41:36 +02:00
Matthew Meszaros 0ca6e7e642 feat: let the confirm-it-is-you prompt offer only the methods an account has, adding passkey, Google/Apple/SSO popup and native iOS Apple/Google re-authentication bound to the session and linked identity, across backend, dashboard, admin, iOS and docs 2026-10-15 15:26:25 +02:00
Matthew Meszaros 8c06efc6e4 feat: ship the iOS app to TestFlight from GitHub Actions on merges touching ios/ (ios-release workflow with cloud-managed signing, shared Warmbly scheme, ExportOptions, iPhone-only 1.0.0, privacy manifest), add in-app account deletion and a read-only billing page, let admins exempt an existing account from the emailed login code for App Review, read Apple .p8 keys as PEM or base64 through one applekey parser for Sign in with Apple and APNs, and document the release flow and Apple web sign-in setup 2026-10-12 10:38:14 +02:00
Matthew Meszaros ec46f57d22 feat: redesign the iOS app (inbox with inbox agent drafted replies edited in the full composer, Remie, home, analytics, CRM, contacts, settings hubs, mailbox connect flow covering every dashboard source) and replace Turnstile in the app with Apple App Attest (attested keys in app_attest_keys, challenge and key endpoints, verifyHuman gate on login, registration and password reset, auth config flag, docs and OpenAPI) 2026-10-11 19:00:50 +02:00
Devin AI d69ec96868 feat: complete invited signup in the dashboard and atomically provision accounts with workspace roles and resource grants 2026-10-10 04:11:45 +00:00
Matthew MeszarosandDevin AI 849cf18f55 feat: bind password recovery, invitations, mailbox and integration OAuth, referral and billing returns to trusted initiating dashboards
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
2026-10-05 12:51:37 +00:00
Matthew Meszaros 01aae25483 Merge pull request #834 from warmbly/devin/1791174213-turnstile-trusted-device
feat: light, input-width Turnstile, one captcha per sign-in, and opt-in remembered devices
2026-10-05 08:37:40 +00:00
Matthew MeszarosandDevin AI 8d034059f3 fix(auth): fail revocation when remembered devices can't be forgotten; resend never sends the device token
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
2026-10-05 05:51:31 +00:00
Matthew MeszarosandDevin AI 5e6047198c feat: sign a new account in after signup on its own 10s context detached from the request in sessionForNewAccount (internal/app/auth/registration.go), report a failed post-signup sign-in to Sentry instead of dropping it, and record that session under the email auth provider
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
2026-10-05 05:35:31 +00:00
Matthew MeszarosandDevin AI e77e2dd98b feat: light, input-width Turnstile on the auth screens, one captcha per sign-in instead of a second one on the code step, and an opt-in 30-day remembered device that skips the emailed login code with a random server-hashed account-bound token, revoked on password reset or change and on signing out everywhere or other sessions
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
2026-10-05 04:32:15 +00:00
Matthew Meszaros f9a2e9af10 feat: state dependency floors, the Sentry HTTP client choice and auth cache budgets as the guarantees they hold, with no advisory identifiers or past behaviour in comments 2026-10-04 03:00:56 -07:00
Matthew Meszaros 9f7d45a1fb feat: charge every password, emailed-code and TOTP attempt atomically before comparing it (Redis INCR+expire script) with a per-account TOTP budget across challenges, put the signed-in password change on the reauth budget, set the per-account login limit to 50 per hour, give tester passwords an expiry (users.password_expires_at, migration 000257) and clear them plus every session on revoke, mint warmblyctl reset links with the password-reset purpose, expire fleet join tokens (7 days default, 30 max, reusable inside the window), derive captcha from the resolved Turnstile secret, refuse weak bootstrap argon2id hashes, make registration codes single-use, rate-limit the v1 invitation lookup, and draw RIDs and user codes without modulo bias 2026-10-04 02:52:22 -07:00
Matthew Meszaros 75f764dc67 feat: require a verified Cloud Tasks token with a pinned audience on task webhooks, manage_settings on integration OAuth and a fresh membership check at every mailbox and integration OAuth finish, user verification for passkey sign-in, ended sessions before a password reset or ban reports success, and a revoked session when a rotated refresh token is replayed; remove the internal DEK delete route, log credential path parameters by name, hold remote images in received mail until the reader loads them, add Calendly and Cal.com signing keys with inbound URL rotation, keep automation signing secrets out of connection responses, and apply the password rules to the bootstrap password 2026-09-30 06:46:24 -07:00
Matthew Meszaros 208481f9a4 feat: answer a signup for an existing address with 409 conflict and let a concurrent SSO first sign-in resolve against the account it raced, adopt the stored organization DEK when a parallel first use stored one first, classify IMAP SERVERBUG, LIMIT, bare read-command failures and provider ALERT/EXPIRED responses as server-unreachable, throttle or credentials errors and keep the ALERT text, wait up to two minutes for a free connection slot before the boot migration gives up, guard the dashboard's DOM mutations against browser page translation, treat an aborted passkey sign-in as a cancellation, and drop posthog-js request timeouts from error tracking 2026-09-27 08:26:55 +02:00
Matthew Meszaros 45c045a5bb feat: give each workspace a timezone that mailbox warmup and campaign sending windows follow by default (organizations.timezone, migration 000198), let campaigns and mailboxes follow it or pin their own, add a Timezones control centre on Settings > Profile with inline per-campaign and per-mailbox zones, default new workspaces and the campaign wizard to the browser zone, expose effective_timezone on campaigns, and move the first-email delay from the Schedule tab and wizard into campaign Settings > First email 2026-09-22 20:13:55 -07:00
Matthew Meszaros e1989f9116 Merge remote-tracking branch 'origin/main' into fix/password-change-session-revocation
# Conflicts:
#	internal/app/auth/reset_password.go
2026-09-21 04:56:50 -07:00
Matthew Meszaros eac3f6d615 Merge remote-tracking branch 'origin/main' into fix/sso-link-existing-password-account
# Conflicts:
#	docs/content/docs/guides/security.mdx
2026-09-21 04:28:20 -07:00
Matthew Meszaros db0f0c6132 feat: carry the caller's session into ReissueSession from the request instead of looking it up, evict every revoked session from the cache and write a revoked tombstone where the delete is refused, and answer a password change whose reissue failed with the distinct 409 password_changed_sign_in_again that the dashboard turns into a sign-out, documented in error-codes, the endpoint reference and OpenAPI 2026-09-21 04:23:46 -07:00
Matthew Meszaros ff2204f8ef feat: route the sso_link completion through the one login path (completeLogin) so the ban check, the 2FA gate, login recording and device memory apply before a parked identity is attached, carry the session provider into every 2FA challenge so a Google or Apple sign-in on a 2FA account is recorded as such, make IdentityRepository.Link report a pair another account holds as ErrIdentityTaken instead of silently updating nothing, refuse a spent address budget before charging a link try, drop the dead expiry check and the duplicate link fields on the web Session model 2026-09-21 03:57:29 -07:00
Matthew Meszaros e0db7d3c72 Merge pull request #642 from warmbly/fix/reset-token-invalidation-after-password-change
feat: refuse a password reset link issued before the password was last changed
2026-09-21 10:50:49 +00:00
Matthew Meszaros a1b7a8ad9b feat: attach a parked federated identity only after the ban check and, on a 2FA account, only once the second factor passes by carrying it through the 2FA pending record into twofa.VerifyLogin, charge each sso_link password attempt atomically before the check, treat an identity a parallel challenge already linked as a re-login instead of a refusal, ask for no password when the identity cannot be linked, end an exhausted or expired challenge with sso_link_expired so the dashboard returns to the email step, and document the code in error-codes, the API reference and OpenAPI 2026-09-21 03:35:17 -07:00
Matthew Meszaros 9426c0da51 feat: validate every person, workspace and company name through internal/pkg/displayname on each write path (profile, onboarding, setup, IdP sign-in, org create and rename, org import, enterprise inquiry, admin testers, warmblyctl) with a 400 invalid_name code, render stored names in platform email through the same rules, mirror them in the web forms, check the org slug format, and document the rules in error-codes, security and AGENTS.md 2026-09-21 03:34:03 -07:00
Matthew Meszaros 0f60fd9b84 feat: attach a Google, Apple or OIDC identity to an existing password account only after that account's password is presented: resolveFederatedUser parks the sign-in as link_required with a single-use sso_link pending token, POST /auth/sso/link checks the password against the provider-asserted address on the sign-in failure budget and links then issues the session through finishLoginAs, the dashboard collects it on a new login step, and the API reference, endpoints list, security guide and OpenAPI spec describe the third login result 2026-09-21 03:25:29 -07:00
Matthew Meszaros 36eb5e72e9 feat: stamp users.password_changed_at on every password write and refuse a password reset link issued at or before it, so a link requested earlier dies when the password is changed from settings, by another reset link or by warmblyctl, with the rule documented on the reset endpoint and the security guide 2026-09-21 03:23:14 -07:00
Matthew Meszaros 7626aaefe4 feat: end every session on a password change, the calling one included, and answer POST /auth/me/password with the token pair of a fresh session for that device; the dashboard stores the new pair, and the endpoint reference, security guide and OpenAPI document the response 2026-09-21 03:18:27 -07:00
Matthew Meszaros 68ec5a016e feat: delete the reauth attempt counter when a refund leaves it at zero or below so it always carries an expiry, and focus the first field of a 2FA dialog on open 2026-09-19 08:43:11 -07:00
Matthew Meszaros e9d1a7e734 feat: reserve the per-account reauth attempt atomically before checking a password or 2FA code, keep the 2FA dialogs open while a request is in flight, move and trap focus in them, show a retry row when 2FA status fails to load, and drop Idempotency-Key from the recovery-code route with the reason documented 2026-09-19 08:36:59 -07:00
Matthew Meszaros e668a2a36b feat: complete the ADA CASA v2.1.1 AL1 control set across authentication, sessions, access control, cryptography, input validation and configuration, adding a breached-password denylist and per-account login throttling, enforced multi-factor authentication on the admin panel, step-up confirmation before an action that mints a lasting credential, purpose-scoped session tokens, single-use TOTP steps, tenant verification on every cross-referenced identifier, security headers on every surface, encrypted webhook signing secrets, per-organization idempotency, PKCE and a minimal two-scope Gmail consent on the mailbox OAuth flow, bounded spreadsheet and archive decoding, a patched Go toolchain with govulncheck in CI, and the evidence pack under compliance/casa 2026-09-19 08:18:35 +02:00
Matthew Meszaros 0e914ee390 feat: stop the password reset flow reporting success while sending nothing, by answering 200 only for an address with no account rather than for every cache and database fault, folding addresses to one case on every account lookup and write so a typed capital cannot miss the row or split an SSO account in two, refunding the two-per-four-hours budget when the failure was ours, retrying one transient send and quoting the link's real lifetime; and clear the rest of error tracking by grouping the engagement breakdown in a subquery so ORDER BY stops resolving opens against email_opens, dropping unibox_mailboxes and email_sync_state writes whose mailbox was deleted mid-sync instead of redelivering them forever, answering a corrupt argon2 hash with ErrCredentials rather than a 500, never filing a cancelled caller as a database incident, and reporting only the first websocket init failure of a streak 2026-09-18 11:42:49 +02:00
Matthew Meszaros 92e298b6ec fix: clear every open issue in error tracking by fixing the bugs behind them rather than the reports: a document-level mouseleave handing RippleProvider the document itself, whose classList is undefined; the admin panel posting /getaway without the /v1 its baseURL omits, so its realtime socket 404d on every page; Gmail throttles classified from the 403 status alone and told to re-authorize instead of back off; consumer flag and folder events retrying forever on a message the unibox never stored; a lost token-refresh race answered 500 instead of the documented 401; a nil email_accounts slice crashing the admin user page; Turnstile mounted with an empty sitekey; conditional passkey autofill run after the user navigated away; a boot log filed as an issue; and one publish failure per message on a topic the broker refuses (#519) 2026-09-14 21:06:14 -07:00
Matthew Meszaros 7300b3b021 feat: full PostHog coverage: identify the signed-in user and workspace in the dashboard and admin panel with autocapture, heatmaps, dead and rage clicks, web vitals, network timing, console capture and session replay masking only password fields, send server-side signup, trial and subscription events under the user id with the organization as a group, keep the marketing site and form pages cookieless while capturing everything stateless plus a form funnel, upload the form app's source maps, and add WARMBLY_POSTHOG_SESSION_REPLAY 2026-09-13 20:58:22 -07:00
Matthew Meszaros 43dcbde06c feat: tester accounts, creatable from the admin panel (#483)
* feat: excuse one named account from the emailed login code, so a vendor reviewer who cannot read this instance's mail can sign in without turning codes off for everyone, with the reason recorded beside it and every run of warmblyctl status naming the accounts that hold one

* feat: create and manage tester accounts from the admin panel, so letting a reviewer in is a form rather than a shell, with the password shown once and every live exemption listed on one page because forgetting one is the way this goes wrong

* fix: give tester management its own permission bit rather than borrowing ban_users, create the account and its exemption in one transaction so no invisible orphan survives a failure, require an accountable operator on the CLI grant, stop a halted row scan reading as the whole exempt list, and show a failed query as an error instead of as no testers

* chore: re-run CI after the aggregator tripped on a cancelled job from the branch update, with every underlying job green

* chore: retrigger CI, the previous run sat queued indefinitely while other branches ran

* feat: roll back a half-created tester when its workspace step fails and backfill the manage-testers bit onto admins already holding every other permission, so the address is not left taken by an unusable account and the new routes are not 403 for the existing admin

* feat: make the 000151 manage-testers backfill one-way, because clearing bit 22 on the way down would also revoke it from an admin granted it explicitly afterwards and the up migration would not restore that
2026-09-13 03:07:10 -07:00
Matthew Meszaros 26c88d2426 feat: address the CodeRabbit review on the PostHog PR by dropping a referrer that is not a hostname instead of storing its query string or fragment, redacting email-shaped values out of every acquisition field before they reach the database or an analytics property, counting an invited signup which returned before the count was taken, hanging subscription_started off the persisted trial-to-paid transition so a redelivered webhook cannot report a second start, capturing the validated provider in both OAuth mailbox paths including Warmbly Cloud, making the two acquisition toggles mutually exclusive and naming them after what they actually select, and replacing the unsupported CNIL consent-exemption claim with what the guidance says and an explicit note that qualifying is a deployment-specific assessment this document does not make 2026-09-07 05:45:11 -07:00
Matthew Meszaros 8e9f67f46b feat: add cookieless PostHog analytics for the hosted marketing site and dashboard with server-side signup and subscription events, a first-party acquisition record written once at signup on a new organization_acquisition table registered in the org-transfer spec, an acquisition column and channel filter in the admin org list, and never a single request from a self-host because every key is unset by default 2026-09-07 04:18:33 -07:00