HARP logo

Compliance

Regulations such as GDPR ask you to control where personal data goes and who can see it. Because HARP sits as an API proxy between your applications and the remote APIs they call, the requests and responses pass through one place where you can inspect them, strip headers, and decide what is recorded, without changing application code beyond the base URL they call. What HARP records can be personal data too: What HARP stores, and how it is protected says who can see it.

Understanding the use case

When an application talks to many external APIs, the trail of what was sent and received is scattered across services and rarely captured consistently. Routing this traffic through HARP gives you a single, consistent point where HTTP activity is observed, filtered and stored, making it easier to inspect.

What HARP records

HARP's traffic history is enabled by default. It records the transactions passing through the proxy, both the HTTP request and the response, whether or not the request was forwarded to a remote backend. Each API transaction it recorded can be reviewed in the HARP dashboard, so you can look into suspicious calls or usage involving personally identifiable information.

Recording is best-effort: do not rely on it as evidence (HARP documentation (opens in a new tab)). Recording runs off the request path; above its capacity, HARP drops what it cannot record rather than slowing proxied traffic. The default storage is an in-memory SQLite database, lost at shutdown: point storage.url at PostgreSQL to keep what was recorded.

Once the storage is persistent, the Janitor, HARP's background cleanup task, deletes recorded transactions after 60 days by default (set with janitor.old_after) and keeps those marked as favorite; with Redis blob storage, it deletes the transactions but not their headers and bodies. See Storage.

What HARP stores, and how it is protected

By default, HARP stores complete requests and responses: their headers, and their bodies up to 1 MiB. Once the storage is persistent, it keeps them 60 days. When your traffic carries personal data, HARP is a new store of it: protect it like your other ones.

  • Dashboard: protected by basic authentication by default. HARP creates an admin user whose password is generated at each start and written once in the logs. dashboard.auth.type: none turns the protection off. Users have no roles: each one sees every recorded transaction.
  • Proxy: no authentication. Anyone who can reach HARP's port can send traffic through it.
  • Stored data: HARP does not encrypt what it stores. Protect the database itself.

Transport security

Between your applications and HARP, traffic is plain HTTP: HARP has no TLS setting, so put a TLS terminator in front of it when that link must be encrypted. Between HARP and the upstream API, traffic uses TLS when the remote URL is HTTPS, with certificates verified by default.

Laws and regulations

The GDPR asks for data minimization and storage limitation. HARP has a setting for each: storage markers keep personal data out of the record, route by route, and the Janitor deletes recorded transactions after the retention you set. Similar laws exist elsewhere, such as the CCPA and Brazil's LGPD.

Putting it in place

  • Keep personal data out of the record: mark the routes that carry it, so HARP skips their headers, their bodies, or the whole request or response. The header and body markers do not hide the request line, so a token in the query string stays recorded and shown in the dashboard; only skip-request-storage or skip-storage keeps it out of the recording. The HTTP cache ignores these markers: see Sensitive data.
  • Strip what upstreams and applications do not need: with rules, remove request headers before they reach the upstream, and response headers before they reach the application. Rules cannot read or rewrite a body.
  • Set the retention: set the Janitor's retention delay (janitor.old_after, in days) to match the period your regulations allow.
  • Use HTTPS upstreams: give your remotes HTTPS URLs, so traffic between HARP and the API is encrypted.
  • Monitor continuously: watch activity in the dashboard and in HARP's Prometheus metrics, enabled with --enable metrics, to spot anomalies as they happen.

Benefits

  • One place for data rules: header and recording rules apply to all the traffic through the proxy, instead of being reimplemented in each service.
  • Centralized visibility: instead of stitching logs together from many services, you get one place to inspect HTTP activity.
  • No application changes: these controls require configuring the proxy, not rewriting your services.