# OPS-002 Certification: RunPod API/Webhook Secret Rotation Procedures

Date: 2026-02-22  
Checklist Item: `OPS-002`  
Ticket: `ISIS-0237`

## Scope

Operational procedure coverage for rotating:

1. RunPod API key (`RUNPOD_API_KEY`).
2. RunPod webhook signature secret (`RUNPOD_WEBHOOK_SECRET`).

## Evidence Matrix

| Requirement                                 | Evidence                                                                                                                                                                                                   | Status |
| ------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------ |
| Rotation runbook exists for both secrets    | `docs/domains/isis/runbooks/runpod-credential-rotation.md` defines inventory, cadence, preconditions, rotation workflow, verification, and rollback for API key and webhook secrets.                       | Pass   |
| Rotation procedure is automatable           | `scripts/isis/rotate_runpod_credentials.sh` implements dry-run/execute flows, updates both Secrets Manager entries, optionally forces generation API deployment, and emits JSON rotation report artifacts. | Pass   |
| Webhook rotation has signature verification | Runbook includes deterministic signed callback validation against `POST /webhooks/runpod` with expected accepted `202` response.                                                                           | Pass   |
| Rollback path is explicit                   | Runbook documents `update-secret-version-stage` rollback to previous versions and coordinated RunPod-side credential rollback + redeploy.                                                                  | Pass   |
| Terraform secret ownership is aligned       | Runbook and certification reference `infra/terraform/secrets/runpod.tf` secret resources (`runpod/api`, `runpod/webhook`) as source-of-truth paths.                                                        | Pass   |

## Reproduction Commands

```bash
bash -n scripts/isis/rotate_runpod_credentials.sh
DRY_RUN=true NAME_PREFIX=oshun ENVIRONMENT=production RUNPOD_API_KEY_NEW="rp_live_new_..." RUNPOD_WEBHOOK_SECRET_NEW="whsec_new_..." scripts/isis/rotate_runpod_credentials.sh
```
