Skip to main content
The API checks each action against your rules and signs the record. It can only protect what passes through it. This page lists what to set and what to put around it, so that the API is the only way to change the systems it protects.
The local setup in docker-compose.yml is for one machine, published on 127.0.0.1 only. Do not use it as a production template without the steps below.

Checklist before go-live

1. Serve HTTPS only

Set PARMANA_REQUIRE_HTTPS=true, or leave it unset. The API then returns 403 for any request that did not arrive over HTTPS, except GET /health and GET /ready, which stay open for internal monitoring.
  • Terminate TLS at one reverse proxy. The API trusts exactly one proxy hop.
  • The proxy must overwrite X-Forwarded-For and X-Forwarded-Proto on every request, so that a client cannot send its own values.
  • Use a current TLS configuration and redirect plain HTTP to HTTPS at the proxy.
Local development runs over http://127.0.0.1. Set PARMANA_REQUIRE_HTTPS=false there, and only there.

Response headers

Every response carries these headers: The server does not send the X-Powered-By header.

2. Manage API keys

  • Each calling system gets its own key, with only the capabilities it needs. See Manage API keys.
  • The server stores only the SHA-256 hash of each key. Keep the raw keys in a secrets manager, never in source control or in an image.
  • Rotate keys on a schedule and when someone leaves. To rotate, add the new key, move the caller over, then remove the old one with --keep-newest.
  • Use separate keys for production and test. A test key must not be able to reach production systems.

3. Control the network

  • Put the API and the database on a private network. The only public entry point is the reverse proxy.
  • Restrict the database to the API’s address. Do not publish its port.
  • Restrict access to the host itself: named administrators only, with logging, and patched regularly.
  • Software running on the same host can read the server’s environment and keys. Treat the host as part of the trust boundary.

4. Close the direct-call gap

Parmana only checks actions sent to it. An agent or application that holds its own credentials for a system can still change that system directly, with no check and no record. You close this in your infrastructure, not in Parmana:
  • Hold the credentials in one place. Give downstream systems credentials that only the Parmana gateway holds. Remove standing access for AI tools and applications.
  • Restrict paths at the network. Allow the downstream system to accept writes only from Parmana’s network address.
  • Reconcile regularly. Compare the changes made in each downstream system with the Parmana records. Any change without a matching record is a bypass to investigate.

5. Run approvals as a process

Parmana checks that a trusted approver key signed an approval. It cannot check that the person read the request. Until your approver rules are built into the product, write them down and enforce them:
  • Name the people who may approve, and keep approver keys separate from anyone who requests actions.
  • Approvers review the full request in your own system before signing, not just the summary.
  • Keep a written procedure to revoke an approver key the day someone leaves or changes role.
  • Review the list of approvers and approvals regularly.

6. Run more than one instance

When more than one API instance runs, set up the Postgres rate-limit store. Without it, each instance counts separately, so the real limit is the configured limit multiplied by the number of instances.

7. Check the records

  • Export audit events and signed records to storage you control.
  • Verify a sample of records regularly with the offline verifier. A verifier needs only the public keys you trust.
  • Keep the public key set and its history, so that old records can still be checked after a key rotation.

8. Check your setup

Replace api.example.com with your domain and the key with a real key for that system.

What remains your responsibility

  • Operating the proxy, certificates, network rules and host security.
  • Who holds approver and API keys, and how they are issued and revoked.
  • Downstream systems that accept changes only from Parmana.
  • Your own legal and regulatory obligations. Parmana does not provide compliance certification.
See Limitations for what Parmana does not claim.