DearAuditor Open QMS Baseline Sign Setup¶
1. GitHub OAuth App Configuration¶
Suggested OAuth app name: DearAuditor Open QMS Baseline Sign
For adopter deployments, create this OAuth App under the adopting company's GitHub organization or account. The OAuth App verifies signer identity for the adopter's regulated QMS trust boundary and should not be borrowed from the public upstream project.
- Homepage URL:
https://sign.qms.dearauditor.ch - Callback URL:
https://sign.qms.dearauditor.ch/auth/callback - Scope used by worker:
read:user
2. Cloudflare Worker Configuration¶
Worker vars:
PUBLIC_BASE_URL=https://sign.qms.dearauditor.chDEFAULT_OAUTH_PROVIDER=githubALLOWED_OAUTH_PROVIDERS=githubREPO_ALIASES_JSON={"AliakseiT/qms-lite":"AliakseiT/dearauditor-qms-baseline"}(optional; add old-slug to current-slug mappings after repo renames)QMS_AUTOMATION_BOT_LOGINS=<extra bot login list>(optional; comma-, space-, or newline-separated GitHub App/bot logins trusted for signature request comments)
Worker name:
- default:
signature-worker - optional override:
SIGNATURE_WORKER_NAME=<your preferred worker name> - optional CLI override for bootstrap:
./services/signature-worker/scripts/bootstrap_env.sh --worker-name <your preferred worker name>
If you temporarily use a workers.dev URL before switching to a custom domain, the Worker name becomes part of the public URL:
https://<worker-name>.<account-subdomain>.workers.dev
Worker secrets:
GITHUB_OAUTH_CLIENT_IDGITHUB_OAUTH_CLIENT_SECRETQMS_BOT_APP_IDQMS_BOT_APP_PRIVATE_KEYQMS_BOT_APP_INSTALLATION_ID(optional)SIGNATURE_STATE_SECRETPIN_PEPPER
KV binding in wrangler.toml:
[[kv_namespaces]]
binding = "PIN_KV"
id = "<prod-namespace-id>"
preview_id = "<preview-namespace-id>"
[vars]
PUBLIC_BASE_URL = "https://sign.example.com"
QMS_AUTOMATION_BOT_LOGINS = ""
The committed wrangler.toml in this repository uses placeholders. Replace them before deploy, or let ./services/signature-worker/scripts/bootstrap_env.sh write the values from .env.local.
Set QMS_AUTOMATION_BOT_LOGINS when the repository automation GitHub App uses an adopter-specific name. The worker keeps its built-in defaults and adds each configured login, including the matching [bot] form.
3. GitHub App Requirements¶
Use a GitHub App installation for repository access. Minimum repository permissions:
For adopter deployments, create this GitHub App under the adopting company's GitHub organization or account and install it only on adopter-controlled repositories that need QMS automation. The app posts attestations and supports repository automation, so its registration, private key, and installation scope are part of the adopter's controlled configuration.
- Issues:
Read and write - Pull requests:
Read and write - Contents:
Read and write - Workflows:
Read and write - Metadata:
Read-only
Minimum organization permissions:
- Members:
Read-only
Pull requests: Read and write is required for reviewer requests, PR metadata updates, and approved PR merges. Contents: Read and write is required for merge operations and release/tag publication paths that write repository state. Workflows: Read and write is required because the repository uses the GitHub App token for automation that may merge PRs touching .github/workflows/. Members: Read-only lets installation tokens resolve collaborators and organization members for reviewer and signer eligibility checks.
4. Repository Settings¶
Repository variable:
SIGNATURE_WORKER_NAME=<cloudflare worker name>(optional; defaults tosignature-worker)SIGNATURE_UI_BASE_URL=https://sign.qms.dearauditor.chPIN_KV_NAMESPACE_ID=<cloudflare kv namespace id>PIN_KV_PREVIEW_NAMESPACE_ID=<cloudflare kv preview namespace id>SIGNATURE_REPO_ALIASES_JSON={"AliakseiT/qms-lite":"AliakseiT/dearauditor-qms-baseline"}(optional; recommended after repo renames)QMS_AUTOMATION_BOT_LOGINS=<extra bot login list>(optional; set when signature request comments are authored by an adopter-specific app)
Repository secrets:
QMS_BOT_APP_IDQMS_BOT_APP_PRIVATE_KEYCLOUDFLARE_API_TOKENCLOUDFLARE_ACCOUNT_ID
5. Deploy¶
Manual:
cd services/signature-workernpm cinpm run deploy
The deploy command injects WORKER_VERSION automatically using the format YYYY-MM-DD-<short git hash> in UTC, and the active version is shown in the worker UI and /healthz.
GitHub Actions:
- run workflow
4.1 Deploy Signature Workermanually (workflow_dispatch) - the workflow materializes
wrangler.tomlfrom repo variablesSIGNATURE_WORKER_NAME,SIGNATURE_UI_BASE_URL,PIN_KV_NAMESPACE_ID,PIN_KV_PREVIEW_NAMESPACE_ID, and optionallySIGNATURE_REPO_ALIASES_JSONandQMS_AUTOMATION_BOT_LOGINSbefore deploy
6. One-Command Bootstrap¶
From repo root:
./services/signature-worker/scripts/bootstrap_env.sh --deploy
This syncs .env.local values to GitHub/Cloudflare, validates KV IDs, and deploys worker.
7. Hosted Alternative¶
If an adopter does not want to self-host the worker, https://sign.qms.dearauditor.ch may be usable as a hosted signing endpoint by separate arrangement. In that model, the adopter would still need the repository-side GitHub configuration expected by DearAuditor Open QMS Baseline, while commercial terms and service conditions remain outside this setup guide.