Skip to content

Security and data retention ​

MicroAuth is designed so API traffic stays between an API owner and their customers. The SDK sends control-plane data and usage aggregates to MicroAuth. It does not send request bodies, request headers, query parameters, or response bodies.

Data sent by the SDK ​

A usage item contains a stable idempotency token, an API key UUID, an immutable usage-policy UUID, the response status code, a count, and an hourly timestamp. MicroAuth uses every reported count for monthly request allowances. It charges the customer balance only when the status code in that policy is billable.

Customer API keys are hashed inside the API process. Snapshot and verification calls use SHA-256 digests, so the raw map_... key is not forwarded to MicroAuth.

Account and API isolation ​

  • Dashboard users act within a workspace and a role. Automation keys are also bound to one workspace.
  • A portal host selects the API. Every authenticated team-scoped portal request also sends X-MicroAuth-Workspace-ID, and the server verifies API ownership and current membership on every request.
  • Cookie-authenticated mutations require CSRF validation. Session cookies are secure and HTTP-only in production.
  • Database constraints reinforce API ownership for plans, customers, API keys, usage, private-plan assignments, and Stripe objects.

The workspace header selects a customer team. It is not a substitute for membership, role, or CSRF checks.

Credentials and sensitive fields ​

  • Passwords use Argon2id hashes.
  • API keys are shown once and stored as SHA-256 hashes.
  • TOTP and connected Stripe secrets are encrypted at rest with the application encryption key. Backup codes are stored as hashes.
  • Stripe webhook signatures are checked against the unmodified request body. Accepted events are committed to a durable database inbox before the API acknowledges them.
  • The production API binds to loopback and is exposed through the TLS reverse proxy. Custom-domain certificates are issued only after the API confirms a registered, verified domain.

Operating policy keeps the encryption key, OTP pepper, database credentials, Stripe keys, object storage credentials and deploy credentials in a secret manager, and rotates them without printing or committing them.

Implemented retention schedule ​

The worker runs lifecycle cleanup daily:

RecordCurrent retention
Processed or ignored raw Stripe webhook events90 days
Dead Stripe webhook events that still need investigation365 days
Completed, expired, or failed checkout coordination rows90 days
Stripe subscription tombstones used for replay safety365 days
SDK usage idempotency receipts60 days
Retired SDK usage-policy versions120 days after their traffic window
Sent transactional email outbox rows90 days
Dead transactional email outbox rows365 days
Used or expired password-reset token rows7 days after use or expiry

Expired hashes of previous SDK secret keys are also cleared after their rotation overlap ends.

Credit ledgers, payment records, usage aggregates, and audit records do not currently have an age-based purge. They remain while their owning account data exists because they support billing, disputes, and security review.

Deleting an account, workspace, API or customer can be blocked while a live subscription or open checkout exists. Cancel or reconcile those Stripe objects first. After deletion is accepted, relational child records are removed by database ownership rules. Associated object-storage assets, such as uploaded logos, are removed separately, and provider backups expire on their own schedule rather than through the database cascade.

Operational safeguards ​

MicroAuth's production operating policy requires the following:

  • Scheduled PostgreSQL backups with tested restores. Backups are encrypted and have an explicit expiry.
  • Access to the production database, Redis, object storage and hosts limited to the identities that need it.
  • Alerts on authentication lockouts, webhook backlog, reconciliation drift, grace-period expiry, usage delivery failures and unexpected administrative actions.
  • No raw API keys, passwords, Stripe secrets, one-time codes or encryption keys in logs or support tickets. Please do not paste them into support emails either.
  • Deletions and emergency access recorded in the audit or incident record without copying sensitive values.

For vulnerability reports, contact security@microauth.com. For privacy and deletion requests, contact privacy@microauth.com.

MicroAuth is a product of Zyref, LLC.