Skip to main content
Skip to content
Fininvo

Developer docs

Security best practices

How to store Fininvo API keys, apply least privilege, restrict by IP, rotate keys, secure webhook endpoints and respond if a key leaks.

On this page

Status: specification for Public API v1. Not live yet.

An API key gives whoever holds it access to your business data. Treat it like a password to your accounts and payroll.

Storing keys

  • Keep keys in a secret manager (Azure Key Vault, AWS Secrets Manager, Google Secret Manager, HashiCorp Vault) or, at minimum, in environment variables on the server.
  • Never put a key in source code, a mobile app, a browser, a spreadsheet, a chat message, an email or a support ticket.
  • Never commit a key to git. Add secret scanning to your repository. Fininvo keys start with fnv_live_ and webhook secrets with whsec_, so scanners can find them.
  • Do not log the Authorization header. Log the 12 character key id instead.
  • The API blocks browser calls on purpose. If you need Fininvo data in a front end, call your own server and let it call Fininvo.

Least privilege

  • One key per integration and per environment. Never share a key between systems: when one leaks you want to revoke one thing.
  • Grant only the scopes the integration uses. Most integrations need read scopes only.
  • Request hr.employees.sensitive:read only if you truly process identity or bank data, and check your own legal basis for holding it.
  • Bind ERP keys to a single company unless you really need all of them.

Restrict by IP

If your integration runs from fixed addresses, add them to the key IP allowlist. A stolen key is then useless from anywhere else. This is the single most effective control you can add.

Rotate

  • Rotate every 90 days, and immediately when a person with access leaves or a system that held the key is decommissioned.
  • Use the rotation overlap (up to 24 hours) to deploy without downtime.
  • Set a realistic expiry. Keys cannot live longer than 365 days.

If a key leaks

Drawing diagram
flowchart LR
    L["Leak suspected"] --> R["Revoke now"] --> N["New key"] --> D["Deploy"] --> A["Check usage log"] --> S["Tell security@fininvo.com"]
  1. Revoke it now in Settings → Developers → API keys. Do not wait to investigate first.
  2. Create a new key with the same scopes and deploy it.
  3. Open the key usage log and check for requests you do not recognise (unknown IP addresses, unusual hours, unusual volume).
  4. Email security@fininvo.com with the key id and what you found. If you cannot sign in, we can revoke the key for you.
  5. Remove the key from wherever it leaked. Rewriting git history does not make a published key safe: a revoked key is the only safe key.

Webhook endpoints

  • Verify the signature on every request, using the raw body. See Webhooks.
  • Reject requests whose timestamp is more than 5 minutes old.
  • Serve the endpoint over HTTPS with a valid certificate.
  • Deduplicate on the event id.
  • Do not put secrets in the webhook URL.
  • Treat the payload as a notification. For anything that moves money, fetch the current record from the API before you act.

What Fininvo does

  • Stores only a keyed hash of each API key. Nobody at Fininvo can read your key.
  • Encrypts webhook signing secrets at rest.
  • Scopes every key to one account. No request parameter can reach another account.
  • Leaves sensitive employee fields out of responses unless a dedicated scope is granted, and out of webhooks always.
  • Logs each request (route, status, time, IP address) but never request bodies or keys.
  • Blocks an IP address for 15 minutes after repeated invalid keys.
  • Emails account owners when a key is created, rotated or revoked, and before one expires.
  • Watches for unusual usage and may suspend a key to protect you. You are told when this happens.
  • Sends webhooks only to public HTTPS addresses and never follows redirects.

Reporting a vulnerability

Email security@fininvo.com. Please do not test against other customers' data.