Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion apps/api/src/boxlite-rest/boxlite-proxy.controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -196,9 +196,17 @@ export class BoxliteProxyController {
throw new NotFoundException(`Runner endpoint for box ${boxId} not found`)
}

// TLS verification for the internal API→runner hop. Defaults to the prior
// behavior (disabled) so deployments whose runners present an internal /
// self-signed certificate are not broken, but can be enabled by operators
// whose runners present a verifiable certificate by setting
// BOXLITE_RUNNER_TLS_VERIFY=true. Without verification the Bearer-authed hop
// still lacks integrity/MITM protection (audit finding #17).
const verifyRunnerTls = process.env.BOXLITE_RUNNER_TLS_VERIFY === 'true'

const proxyOptions: Options = {
target: targetUrl,
secure: false,
secure: verifyRunnerTls,
changeOrigin: true,
autoRewrite: true,
ws: opts?.ws ?? false,
Expand Down
Loading