Developers

Security

What your server sees, how it is isolated and how to look after the token.

Updated:

Whoever shares never sees the requests

A server works just like the app: the person who shares never sees what is asked or what is answered. Requests arrive with end-to-end encryption, with a key only that computer holds, and the piap image opens them in memory only to hand them to the AI. It does not show them, does not store them on disk and does not write them to the logs.

You see that your server handled a request, the model used, how long it took and how much you earned. Never the content.

The container

  • Runs non-root, as user 65532, with no shell.
  • Read-only file system: it only writes to /data (settings, the encrypted computer identity and models) and /tmp.
  • Needs no extra capabilities or privileged mode. On Kubernetes, use the restricted security context from the examples.
  • Signed images, with an SBOM, scanned before publishing.

Network isolation

  • Put the servers on a network or VLAN apart from your internal systems.
  • No inbound ports: the container only opens outbound connections on 443.
  • Port 9090 is internal only: publish it, if at all, on loopback or on your monitoring network.
  • On Kubernetes, a NetworkPolicy that only allows egress on 443 and DNS, and ingress to 9090 from your monitoring (with the chart, networkPolicy.enabled=true).
yaml
apiVersion: networking.k8s.io/v1
kind: NetworkPolicy
metadata:
  name: piap-node
  namespace: piap
spec:
  podSelector:
    matchLabels:
      app.kubernetes.io/name: piap-node
  policyTypes: ["Ingress", "Egress"]
  ingress:
    - from:
        - namespaceSelector:
            matchLabels:
              kubernetes.io/metadata.name: monitoring
      ports:
        - port: 9090
  egress:
    - ports:
        - port: 53
          protocol: UDP
        - port: 53
          protocol: TCP
    - ports:
        - port: 443
          protocol: TCP

The token is a secret

  • Keep it in a secrets manager or a Kubernetes Secret, never in the repository or the image.
  • Least scope: a pull-only token for whatever only pulls images, and one token with computers per fleet.
  • Give it an expiry and rotate it calmly: create the new one, update the servers and revoke the old one.
  • If it leaks, revoke it in the Account: servers connected with it are removed at once.