> ## Documentation Index
> Fetch the complete documentation index at: https://developers.jobhandy.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Security and data protection

> Protect credentials, personal data, incident evidence, payroll files, logs, and operational access throughout the integration.

The Public API processes HR, employee, incident, order, and payroll information. Design the integration for least privilege and data minimization.

## Security controls

<Columns cols={2}>
  <Card title="Server-side only" icon="server">
    Keep API calls in trusted backend services. Never embed the key in browser or mobile code.
  </Card>

  <Card title="Least-privilege scope" icon="shield-check">
    Create separate keys for separate systems and authorize only required tenants and divisions.
  </Card>

  <Card title="Secret manager" icon="lock-keyhole">
    Store, rotate, and audit credentials through a managed secret store.
  </Card>

  <Card title="Request correlation" icon="hash">
    Log request IDs instead of complete payloads wherever possible.
  </Card>
</Columns>

## Data-minimization rules

* Request only the fields and resources required by the integration.
* Do not copy complete API responses into general application logs.
* Do not attach unrelated or excessive personal data to incidents.
* Avoid sending production personal data in support tickets.
* Protect downloaded payroll and contract files with local access controls.
* Define retention and deletion rules for checkpoints, logs, files, and dead-letter queues.
* Encrypt data in transit and use encrypted storage appropriate to the customer's environment.

## Logging matrix

| Data                       |                  Normal log |                          Restricted diagnostic log |
| -------------------------- | --------------------------: | -------------------------------------------------: |
| API key                    |                       Never |                                              Never |
| Request ID                 |                         Yes |                                                Yes |
| HTTP status and error code |                         Yes |                                                Yes |
| Tenant ID                  | When operationally required |                                                Yes |
| Employee or order ID       | When operationally required |                                                Yes |
| Full request/response body |                          No | Only when strictly necessary and access-controlled |
| Incident attachment        |                       Never |             Store only in approved business system |
| Payroll file content       |                       Never |            Store only in approved payroll workflow |

## Credential incident response

```mermaid theme={"theme":{"light":"github-light","dark":"github-dark"}}
sequenceDiagram
    participant Operator
    participant Portal as JobHandy administration
    participant Runtime as Integration runtime
    participant Logs

    Operator->>Portal: Deactivate suspected key
    Operator->>Runtime: Stop or disable affected integration
    Operator->>Logs: Identify requests by time and request IDs
    Operator->>Portal: Create replacement key with minimum scope
    Operator->>Runtime: Deploy replacement credential
    Runtime->>Portal: Verify protected request through API
    Operator->>Portal: Delete retired key when investigation permits
```

## Responsibility after download

Once a file is downloaded from JobHandy, the customer integration controls its local storage, transmission, access, import, retention, and deletion. Apply the same or stronger safeguards as the destination HR or payroll system.

<Warning>
  This page describes technical safeguards for the API integration. Contractual roles, lawful basis, retention obligations, and customer-specific data-protection requirements must be assessed in the applicable organizational and legal context.
</Warning>
