Skip to content

Security and architecture

What Usivity sees, stores and can change.

Usivity was built with security as a first-class requirement. Here’s how your data and your users are protected, and how your customers personalize your app without anyone touching your code.

Data handling

What happens to your data.

Before you add any third-party tool, you need to know what it sees and where your data goes. These protections apply whenever the SDK runs in your application.

  1. 1.Every user is verified.

    The SDK loads from a single script tag. Each user is identified by an HMAC signature your server computes; unsigned or invalid users are rejected, and the SDK runs only on the domains you allow.

  2. 2.Page content is redacted in the browser.

    Emails, phone numbers, Social Security and tax ID numbers, card and bank account numbers, IP addresses and street addresses in the zone are redacted before it is sent for AI processing, and again on our server.

  3. 3.The AI sees only what it needs.

    Our AI subprocessor, Google’s Gemini on Vertex AI in the US, gets the user’s request and the zone, both redacted. Never session tokens, cookies, credentials or the values your APIs return.

  4. 4.Your API data stays between your users and you.

    Live data is fetched from the user’s browser with the user’s own credentials, so your API applies its own authorization. Usivity doesn’t proxy or store the values your APIs return.

Privacy

PII is redacted in the browser.

Usivity redacts personal data in the zone being personalized before it’s sent for AI processing, then redacts it again on our server. Redaction is pattern-based, so it covers the formats below rather than every conceivable identifier; keep fields you consider sensitive in other ways outside the zones you enable.

What the SDK redacts before content leaves the browser

  • Email addresses: replaced with [REDACTED]
  • Phone numbers: US and international formats
  • Social Security and tax ID numbers (ITIN): with separators, or nine digits when labelled, so order numbers aren’t redacted
  • Card numbers: with or without spacing, checked with the Luhn algorithm
  • Bank account numbers (IBAN): checked with the IBAN checksum, so look-alike product codes stay
  • IP addresses: IPv4 addresses
  • Street addresses: US-format street addresses with the city, state and ZIP that follow, apartment and suite numbers, and PO boxes
  • Size limits: only a bounded amount of the zone is sent; large tables go as compact text, redacted value by value
  • Form entries: what users type into your forms is never captured
Sanitization example
BeforeAfter
john@acme.com[REDACTED]
(555) 867-5309[REDACTED]
4111-1111-1111-1111[REDACTED]
123-45-6789[REDACTED]
03/15/1990[REDACTED]
742 Evergreen Ter[REDACTED]
06/30/202706/30/2027
$125,000$125,000

Email, phone, card, SSN and street address are redacted. The date and the amount stay, so the AI understands the page.

Sanitized again on our server

We don’t rely on the browser alone. Page content that reaches Usivity for AI processing is filtered again on our server with DOMPurify, which strips scripts, embedded objects, event handlers and other markup that isn’t needed, and the PII redaction runs a second time.

What the AI never receives

The AI receives the user’s request, with the same personal data redacted on our server, and the redacted content of the zone being personalized. It never receives session tokens, cookies, credentials, or the values your APIs return.

Used once, not stored by Usivity

Other visible text in the zone, such as names, amounts and statuses, is sent with the request so the AI understands the page; that’s how “highlight Acme’s deals” works. Usivity uses that page content for that one request and then discards it: we don’t store or log it, and we keep no copy or snapshot of your pages.

A saved personalization keeps only the steps needed to re-apply it, and those can name a specific value the user asked about, such as a name, a status or a column title. We send no user identity with the page content: “my deals” goes as a placeholder, not a name.

We use Google’s Gemini models on Google Cloud Vertex AI, on Google’s US endpoint, so requests are processed in the US. Google doesn’t use requests or responses to train its models. It keeps a request only if its automated safety checks flag it for possible abuse, for up to 90 days. We turned off durable caching and request logging, and we don’t use Google Search grounding.

Infrastructure

Hosted in the US on managed infrastructure.

Usivity runs on Render, with its database on Neon’s managed Postgres, both in the eastern United States. Render and Neon publish their own SOC 2 reports.

Providers that run Usivity
ProviderWhat it doesWhere, and terms
RenderRuns the Usivity service, the portals and the SDKUS East (Virginia)
CloudflareRender’s network edge: requests pass through it before they reach the serviceIn front of Render
NeonManaged Postgres databaseUS East (N. Virginia), on AWS
Google (Vertex AI)AI processing, as our subprocessorUnited States. Doesn’t train on requests, and keeps one only if its safety checks flag it for abuse, for up to 90 days
ResendSends account emails, such as sign-in codes and password resetsEmail delivery

Application: Render

  • The Usivity service, portals and SDK run in Render’s US East (Virginia) region
  • Requests reach the service through Cloudflare, which sits in front of Render
  • Render issues and renews the TLS certificates, and HTTPS is enforced with HSTS
  • Each release is a separate build, so we can roll back to the previous one

Database: Neon

  • Managed Postgres on AWS, in US East (N. Virginia), next to the service
  • TLS is required on every database connection
  • The Neon and Render accounts are protected with two-factor authentication

How production is run

  • Every change must pass automated tests, a secret scan, static security analysis and a dependency audit before it deploys
  • Database changes run before traffic moves to a new version; if one fails, the current version keeps serving
  • The Usivity portal runs on its own subdomain, with its own sign-in cookies and a strict Content-Security-Policy
  • The Usivity portal and the SDK load no analytics or third-party trackers; this marketing site loads only Google Analytics
  • An independent uptime service checks production around the clock

Current status and past incidents: Usivity status page

Code safety

Personalizations don’t run code.

The most important security question for AI-made changes is code injection. Usivity is designed so personalizations can’t execute code: they are limited to presentation changes within the zones you define.

  • AI output isn’t run as code.

    The SDK doesn’t run what the AI returns as code. It carries out only the bounded presentation changes built into it and ignores anything else, so a malformed or manipulated answer can’t introduce script.

  • Sanitized before it reaches the page.

    Any HTML a personalization adds, including content built from your API data, passes through DOMPurify first. It strips script tags, iframes, object and embed elements, and inline event handlers. Links stay on your own site, and images load only from it, so nothing a personalization adds can call out to another server.

  • Closed by design.

    What a personalization can do is fixed when the SDK is built and reviewed. The AI, an end user or a page can’t add new capabilities at runtime.

Built for enterprise

Personalization IT will approve.

Letting customers change your product in plain language sounds powerful. Then your security team asks the right questions. Usivity was designed with those questions in mind.

Strict scoping

You define what users can change. Personalizations change presentation only: they aren’t a path around your application logic, validation rules or security controls, and they can’t reach your backend beyond the APIs you register.

Your security context, unchanged

Usivity works within your existing multi-tenancy, authorization and row-level security. Data requests go from the user’s browser with the user’s own credentials, so users see only data your backend already lets them see.

Audit trail

Every personalization is stored with the user who made it, their original request (with personal data redacted) and timestamps, and changes made in the Usivity Portal are audit-logged. Your team can review, turn off or delete any user’s personalizations.

Instant rollback

Users can turn any personalization off themselves, with no support ticket, and one switch in the portal turns Usivity off on your site for everyone. Your application itself never changes.

Governance

Boundaries you control.

You decide which parts of your application are open to personalization. Users work within the zones you configure, and both the server and the SDK accept only sanctioned, bounded changes.

  • Zone definitions

    You define zones with CSS selectors. Users personalize only within the zones you configure.

  • Protected elements

    Name the values no personalization may change, like a deal value or an invoice total. Usivity never changes their text, numbers or links and never adds anything inside them. The AI, the server and the SDK each refuse, and every refusal is recorded with when, who and where, so you can show Usivity never changed them.

  • Registered APIs only

    Personalizations can show live data only from the API endpoints you register in the portal.

  • Bounded by design

    Every personalization is checked against what the SDK supports and the APIs you register. Requests the AI can’t meet within that scope are declined and logged for your review.

  • Isolated by design

    When several personalizations target the same part of the page, they apply consistently, and one that can’t apply doesn’t stop the others.

API integration

Your APIs. Your security.

You can register API endpoints so personalizations can show live data, such as account details, analytics or activity feeds. You register each endpoint in the portal with its URL, method and description, and personalizations can call only registered endpoints, never arbitrary URLs.

The request is made directly from the user’s browser, not through a Usivity proxy. The browser sends the user’s existing session cookies and tokens, and your API applies its own access controls, so each user sees only the data they are allowed to see. Data flows from your API to the user’s browser; Usivity doesn’t proxy or store it.

Why client-side, not a proxy?

A server-side proxy would strip the user’s identity from the request. If your API enforces role-based access (for example, managers see all accounts and reps see only their own), a proxy would bypass those rules, and every user would see the same data.

With client-side fetch, your API sees the real user and applies its normal authorization. Usivity doesn’t proxy, store or relay the values your APIs return; only field names and types are recorded, so personalizations can reference them.

CORS configuration for your APIs

Because API calls come from the user’s browser, your API endpoints must allow cross-origin requests from the domains where the SDK is embedded. Add these CORS headers to your API responses:

Access-Control-Allow-Origin: https://your-app.com
Access-Control-Allow-Credentials: true
Access-Control-Allow-Headers: Accept, Content-Type
Access-Control-Allow-Methods: GET

If your API endpoints are on the same origin as your application, no CORS configuration is needed.

Data storage and authentication

What we store. How we authenticate.

Here is exactly what Usivity keeps, what it doesn’t, and how identity is managed.

What we persist
PersonalizationsEach saved personalization: the user’s original request with personal data redacted, the steps that re-apply it (which can include a specific value the user asked about, such as a name, a status or a column title) and the page it was made on. Never a copy of the page.
Usage and historyA daily count of how often each personalization was shown, and a record of each one that stays after it’s deleted (its zone, page, category and dates; never the request or the page content).
Zone definitionsCSS selectors and zone names you configure. No content from your application.
Protected elementsThe names and selectors you protect, and a record of each change Usivity refused to make to one, with when, which user, which page and which step. No content from your application.
SDK usersThe user ID and email from your signed identity, plus the optional name, company and role. No passwords.
Vendor configurationCompany name, API key, HMAC secret, allowed domains, branding, and registered API endpoints.
Suggestions from your teamThe request (personal data redacted), target zone, sender, status and, if it couldn’t be applied, the reason.
Declined requestsWhen the AI can’t meet a request, the request (personal data redacted), its zone and the reason are logged for your review. After 90 days the request and reason are deleted, and the zone, category and date stay for your reports.
Security and audit logsBlocked SDK origins (with IP address and user agent) and changes made in the Usivity Portal.

What we don’t keep

  • Page content sent for AI processing. Used for that one request, then discarded. Not stored or logged; no copy or snapshot of your pages.
  • The values your APIs return. Not proxied, stored or relayed. Only field names and types are recorded, so personalizations can reference them.
  • What users type into your forms. Never captured.
  • End-user passwords. There are none. Users are identified by your signed identity.

Authentication model

Usivity Portal
Email and a bcrypt-hashed password, or Google sign-in. Sessions are stored server-side behind HttpOnly cookies, and five failed sign-ins lock the account for 30 minutes.
SDK users
Identified only by your HMAC-signed identity; there are no end-user passwords. Sessions use HttpOnly, Secure cookies stored server-side, plus a request token that expires after 10 minutes and works only from your domain. A copy of the user’s own personalizations is kept in their browser so they load quickly.
API authentication
SDK requests carry your vendor API key, and anything done on a user’s behalf also needs that user’s verified session. Each vendor gets a unique, randomly generated API key.

Transparency note: API keys and HMAC secrets can be rotated in the portal at any time. They are stored in the database without a separate layer of application-level encryption; adding one is on our roadmap.

Identity verification

Silent sign-in with HMAC signatures.

Your users never see a separate Usivity login. Your server proves who each user is with a signature, so they’re signed in silently when the SDK loads. Your HMAC secret comes from the portal or from your Usivity account team.

  1. 1

    Compute on your server

    Your backend signs the user ID, email and the current time with HMAC-SHA256 and your secret. Never in the browser.

  2. 2

    Render into the script tag

    The user ID, email, time and hash go into the SDK script tag as data attributes, exactly as you signed them.

  3. 3

    Usivity verifies

    Our server rebuilds the signature and compares it with a timing-safe comparison. Missing or invalid signatures are rejected.

  4. 4

    Account created on first visit

    A first-time user is set up automatically, with no registration form and no password.

Security properties

  • Timing-safe comparison prevents timing attacks
  • Your secret stays on your server; Usivity never sends it to the browser
  • SHA-256 with a 256-bit random secret
  • A signature starts a session for 24 hours after it was made, so a copied one stops working
  • Rotate the secret any time, and keep the old one working for an hour, a day or a week while you deploy the new one. Or stop it at once if it leaked
  • With a missing or invalid signature, the SDK stays hidden

What gets signed

HMAC-SHA256, keyed with your secret exactly as given (a 64-character string; don’t hex-decode it), over this UTF-8 string, sent as lowercase hex:

usivity:v2:<bytes in ID>:<ID>:<bytes in email>:<email>:<time>

The lengths count bytes, not characters. The time is when you sign, in Unix seconds. Sign exactly the ID, email and time you put in the tag, and don’t trim or change case afterwards.

1. Compute the hash on your server
const crypto = require('node:crypto');

// On your server, when you render the page.
// Use the secret as is (don't hex-decode it).
const secret = process.env.USIVITY_HMAC_SECRET;
const userId = String(user.id);  // your user ID, as a string
const userEmail = user.email;
const signedAt = Math.floor(Date.now() / 1000);  // now, in Unix seconds

const idBytes = Buffer.byteLength(userId, 'utf8');
const emailBytes = Buffer.byteLength(userEmail, 'utf8');
const payload = `usivity:v2:${idBytes}:${userId}` +
  `:${emailBytes}:${userEmail}:${signedAt}`;

const userHash = crypto
  .createHmac('sha256', secret)
  .update(payload, 'utf8')
  .digest('hex');

2. Render it into the script tag

<script src="https://usivity.com/sdk/usivity.js"
  data-api-key="YOUR_API_KEY"
  data-user-id="4821"
  data-user-email="jane@example.com"
  data-user-hash="THE_HEX_HASH_YOUR_SERVER_COMPUTED"
  data-user-ts="THE_TIME_YOU_SIGNED"
  data-user-name="Jane Doe"
  data-user-company="Acme"
  data-user-role="Account manager"
  async defer></script>

The API key, user ID, email, hash and time are required. data-user-name, data-user-company and data-user-role are optional and aren’t signed.

Check your code

With the secret usivity-test-secret, user ID 4821, email jane@example.com and time 1798761600, the hash is:

2b74f361ab376a699c07d09f0cde19852daa58d7f99a08921fe60a17ee5bb681

Platform safeguards

Rate limits and integrity-checked releases.

Two more layers protect your integration: limits that keep any one client or account from overwhelming the platform, and a release process that controls which SDK code reaches your pages.

Rate limits

  • AI personalization requests are limited per end user per day, as a guard against abuse, and capped per vendor
  • Sign-in attempts are rate limited and locked out after repeated failures, and password resets are rate limited
  • SDK and AI traffic is rate limited per user, not per IP address, so people who share an office network are counted separately. Requests over a limit get a standard 429 response

Integrity-checked SDK releases

  • Published SDK versions are immutable: once published, a version’s code can’t change
  • The server checks each published version against its SHA-256 checksum before serving it
  • A new version reaches your pages only when it is promoted, and a promotion can be rolled back to an earlier version
  • On request, we can keep your account on a specific release

Resilience

Designed to fail safely.

If a personalization can’t apply, your page stays as it was.

  • Contained failures

    A personalization that can’t be applied is skipped. Your application and the user’s other personalizations carry on normally.

  • Pages without the zone

    If a zone isn’t on the current page, its personalizations wait and apply when the user reaches a page where it is.

  • API errors stay in the zone

    If one of your APIs fails, the error shows within that zone instead of spreading to the rest of your application.

  • AI unavailability

    If the AI service is briefly unavailable, new requests show a clear message and your application keeps working.

Origin security

Domain allowlisting and origin validation.

Control which domains can load and use your SDK configuration. Usivity checks the Origin header on every SDK request against your allowlist and blocks other domains before any data is served. That stops competitors, scrapers or other sites from loading your SDK configuration in their own pages, and every blocked attempt is logged.

  • Wildcard patterns

    Use patterns like *.yourcompany.com to allow all subdomains, or list exact origins.

  • Per-domain toggle

    Turn a domain off without removing it. Useful for staging environments or phased rollouts.

  • Blocked until configured

    With no domains configured, the SDK is blocked everywhere until you add one, so nothing is exposed by default.

Origin validation flow

  1. 1

    SDK request arrives

    The browser’s request to Usivity carries the Origin header of the embedding page.

  2. 2

    Vendor and origin resolved

    The server finds your account from the API key and reads the Origin header (or the Referer, if there is no Origin).

  3. 3

    Allowlist check

    The origin is compared with your active allowed-domain patterns, including wildcards.

  4. 4a

    Match found: allow

    The request proceeds, and configuration and zone data are returned to the SDK.

  5. 4b

    No match: block (403)

    The request is rejected. Origin, IP address and user agent are recorded in the origin audit log.

Blocked origin response

HTTP/1.1 403 Forbidden

{
  "message": "Origin not authorized"
}

HTTP security

Defense-in-depth headers.

Every response from the Usivity server carries a standard set of security headers that protect against common web attacks. They are applied globally, not just to API routes.

  • Content Security Policy

    Content-Security-Policy

    Declares where scripts, styles, fonts, images, frames and connections may come from. The Usivity portal gets a stricter policy: scripts only from Usivity, no frames and no plugins.

  • Strict Transport Security

    Strict-Transport-Security

    Enforces HTTPS for two years, with includeSubDomains and preload, which prevents protocol downgrade attacks.

  • Content type protection

    X-Content-Type-Options: nosniff

    Stops browsers from treating a response as a different content type than the one declared, which blocks a class of XSS attacks.

  • Frame and referrer controls

    X-Frame-Options + Referrer-Policy

    Prevents clickjacking by allowing framing only from the same origin, and limits what the referrer reveals to other sites.

Response headers (every request; the portals’ policy is stricter)

X-Content-Type-Options: nosniff
Strict-Transport-Security: max-age=63072000; includeSubDomains; preload
Content-Security-Policy: default-src 'self'; script-src 'self' ...
X-Frame-Options: SAMEORIGIN
Referrer-Policy: strict-origin-when-cross-origin

Request integrity

CSRF protection.

Cross-site request forgery (CSRF) tricks a user’s browser into making unwanted requests to a site where they’re signed in. Usivity uses the double-submit cookie pattern to protect every request that changes something in the Usivity portal.

Every POST, PUT, PATCH or DELETE must carry a token in the X-CSRF-Token header that matches the token in a SameSite=Strict cookie. Requests without a matching token are rejected with a 403.

Protected routes

CSRF protection covers the Usivity portal. Sign-in requests accept only JSON, which a cross-site form can’t send. SDK requests run cross-origin by design, so they are authenticated with your API key, and actions on a user’s behalf with that user’s verified session.

How it works

  1. 1

    On the first GET request, the server generates a random token and sets it as a cookie.

  2. 2

    The portal reads the cookie and sends it as an X-CSRF-Token header on every request that changes something.

  3. 3

    The server compares the header with the cookie. Only matching pairs are allowed through.

Observability

Security audit logging.

Every attempt from a domain you haven’t allowed is recorded in an origin audit log, so your security team can see who is trying to load your SDK configuration, and from where. Changes your team makes in the Usivity Portal are audit-logged too.

Visible in the portal

The Allowed domains page in the Usivity Portal lists blocked attempts, newest first, with the origin, IP address and time. No external SIEM is needed for basic monitoring.

What gets logged
OriginThe origin that tried to load your SDK configuration (e.g. https://unauthorized-site.com)
ActionRecorded for every blocked request
IP addressThe client’s IP address
User agentBrowser and OS information, to tell scripts and scrapers from real browsers
TimeWhen it happened, for incident response

Frequently asked questions about security.

Can another Usivity customer see our data?

No. Every record belongs to one customer, and the database itself enforces it with row-level security. Each request can only see its own customer’s rows, so even a query that forgot to filter by customer returns nothing of anyone else’s. Someone who uses two products built on Usivity, with the same email, is two separate users, one at each.

Where is our data stored?

In the United States. The service runs on Render in US East (Virginia), and the database is Neon’s managed Postgres in US East (N. Virginia). Data is encrypted in transit and at rest.

What data can’t we send to Usivity?

EU or UK personal data covered by GDPR, health information covered by HIPAA, criminal justice information covered by CJIS, payment card data and government ID numbers, unless we first agree additional terms in writing (Terms, section 3.5). Keep zones off screens that show them.

Do you have a SOC 2 report?

No. Usivity doesn’t have a SOC 2 report of its own. Render and Neon, which host the service and the database, publish theirs. We also answer a reasonable security questionnaire from you, up to once a year.

Will you sign a DPA? Who are your subprocessors?

Yes, we sign our data processing agreement on request: email legal@usivity.com. Our subprocessors are Render, Neon, Cloudflare, Google (Vertex AI) and Resend, and we’ll send the current list on request. We tell you at least 30 days before a new one starts processing your data.

How fast do you tell us about a breach?

Within 72 hours of confirming a security breach that affects your data.

What does the AI see, and does Google keep it?

The user’s request and the content of the zone, both redacted, with no user identity. Google’s Vertex AI, in the US, doesn’t train on it. Google keeps a request only if its automated safety checks flag it for possible abuse, for up to 90 days, and otherwise holds it in memory for no more than 24 hours. Usivity doesn’t store page content.

Is hiding a field a security control?

No. Hiding something with Usivity changes what one user sees on screen. What users can see and do stays with your code and your API’s permissions.

Are AI requests limited?

Yes. Each user can make up to 100 personalization requests a day, as a guard against abuse. Saved personalizations don’t count, because they replay without an AI call.

What happens to our data when we leave?

Within 15 days after your agreement ends, email legal@usivity.com for a copy of your personalizations and request data. We delete your data from our active systems within 30 days, and backups expire within a further 30. You can also ask us to delete data during the agreement.

Can we delete one user’s data?

Yes. Delete the user on the Users page of the Usivity Portal, and their personalizations, requests, suggestions and access settings are deleted at once. Your reports keep counting what they made, with nothing that identifies them.

Questions for your security review?

We welcome deep technical conversations about our security model, architecture and compliance posture. Email security@usivity.com.

Does Usivity fit?

Bring your security questions. We’ll walk through the answers.

In ten minutes we’ll show you how Usivity handles identity, data and access, on a live demo account.

Book a 10-minute demo

We reply within one business day.