The PDF service runs as a single Go application that:
- Validates JWT bearer tokens from
AUTH_AUTHORITYagainst OIDC JWKS. - Requires
pdf#createscope. - Accepts
multipart/form-dataonPOST /. - Persists request files to a temporary directory.
- Invokes
weasyprintthroughbubblewrap(bwrap) sandbox. - Streams generated PDF back as HTTP response.
GET /healthcheck returns 200 OK.
Supported multipart fields:
html(required)css(optional)attachment.*(optional)asset.*(optional)file.*(optional; backwards compatible attachment alias)
bwrap(bubblewrap)weasyprint- Fonts and native libs required by WeasyPrint
The service intentionally exposes a minimal env surface:
PORT(optional, default8080)AUTH_AUTHORITY(required)AUTH_AUDIENCE(required)OTEL_SERVICE_NAME(optional; enables real OpenTelemetry provider when set, otherwise mock/local observability is used)
All other settings are hardcoded defaults in code.