Skip to content

Expose API URL security env vars#87

Draft
Olmo Maldonado (ibolmo) wants to merge 1 commit into
mainfrom
sec-ssrf-env-vars
Draft

Expose API URL security env vars#87
Olmo Maldonado (ibolmo) wants to merge 1 commit into
mainfrom
sec-ssrf-env-vars

Conversation

@ibolmo

@ibolmo Olmo Maldonado (ibolmo) commented Jun 3, 2026

Copy link
Copy Markdown

Context

Braintrust backends now support URL-security controls for outbound requests to user-supplied URLs. The Helm chart needs first-class knobs for self-hosted API deployments to configure those controls without relying on api.extraEnvVars.

Description

  • Adds optional API values for unsafe URL request mode, URL-security DNS resolvers, and URL-security allow CIDRs.
  • Renders the corresponding BRAINTRUST_* env vars into the API ConfigMap only when the trimmed values are non-empty, preserving application defaults when unset.
  • Validates api.unsafeUrlRequestMode during template rendering so only empty, off, warn, or reject are accepted.
  • Covers omitted, configured, and invalid-mode cases in API ConfigMap template tests.

@ibolmo Olmo Maldonado (ibolmo) changed the title add url security env vars Expose API URL security env vars Jun 3, 2026
{{- end -}}
{{- $urlSecurityDnsServers := .Values.api.urlSecurityDnsServers | default "" | toString | trim -}}
{{- $urlSecurityAllowCidrs := .Values.api.urlSecurityAllowCidrs | default "" | toString | trim -}}
---

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove these from the top so they are not hoisted and have them inline with the values to match how we have other values in the config map. We also aren't using fail today for validation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants