You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Expose backend security and org authorization settings (#87)
* add url security env vars
* fix: Allow arbitrary unsafe URL request modes
The chart should pass through trimmed API URL security settings without
blocking render-time values, leaving mode validation to the application.
* Expose allowed org ID authorization settings (#88)
* add allowed org ids
* fix: Accept PRIMARY_ORG_NAME from API env
Deploys that source the primary organization through extra environment
variables should satisfy the same self-hosted service-token requirement
as
the chart value, while still rejecting wildcard or empty orgs with no
primary
organization configured.
* feat: Pass URL security settings to AI Gateway
Keep outbound URL validation behavior consistent between the API and AI
Gateway when operators configure shared URL security values. Update
tests
and value guidance to preserve trimming and ID allowlist expectations.
{{- if and (or (eq $orgName "") (eq $orgName "*")) (eq $primaryOrgName "") (not $hasPrimaryOrgNameExtraEnv) -}}
10
+
{{- fail "global.primaryOrgName or api.extraEnvVars PRIMARY_ORG_NAME is required when global.orgName is empty or \"*\"; self-hosted service-token management needs a primary organization." -}}
- it: should include primary org name when configured
95
+
values:
96
+
- __fixtures__/base-values.yaml
97
+
set:
98
+
global.primaryOrgName: " primary-org "
99
+
release:
100
+
namespace: "braintrust"
101
+
asserts:
102
+
- equal:
103
+
path: data.PRIMARY_ORG_NAME
104
+
value: "primary-org"
105
+
106
+
- it: should allow wildcard org name when primary org name is configured
107
+
values:
108
+
- __fixtures__/base-values.yaml
109
+
set:
110
+
global.orgName: "*"
111
+
global.primaryOrgName: "primary-org"
112
+
release:
113
+
namespace: "braintrust"
114
+
asserts:
115
+
- equal:
116
+
path: data.ORG_NAME
117
+
value: "*"
118
+
- equal:
119
+
path: data.PRIMARY_ORG_NAME
120
+
value: "primary-org"
121
+
122
+
- it: should allow wildcard org name when primary org name is provided via extra env vars
123
+
values:
124
+
- __fixtures__/base-values.yaml
125
+
set:
126
+
global.orgName: "*"
127
+
global.primaryOrgName: ""
128
+
api.extraEnvVars:
129
+
- name: PRIMARY_ORG_NAME
130
+
value: "primary-org"
131
+
release:
132
+
namespace: "braintrust"
133
+
asserts:
134
+
- equal:
135
+
path: data.ORG_NAME
136
+
value: "*"
137
+
- equal:
138
+
path: data.PRIMARY_ORG_NAME
139
+
value: ""
140
+
141
+
- it: should reject empty org name without primary org name
142
+
values:
143
+
- __fixtures__/base-values.yaml
144
+
set:
145
+
global.orgName: ""
146
+
global.primaryOrgName: ""
147
+
release:
148
+
namespace: "braintrust"
149
+
asserts:
150
+
- failedTemplate:
151
+
errorMessage: "global.primaryOrgName or api.extraEnvVars PRIMARY_ORG_NAME is required when global.orgName is empty or \"*\"; self-hosted service-token management needs a primary organization."
152
+
153
+
- it: should reject wildcard org name without primary org name
154
+
values:
155
+
- __fixtures__/base-values.yaml
156
+
set:
157
+
global.orgName: "*"
158
+
global.primaryOrgName: ""
159
+
release:
160
+
namespace: "braintrust"
161
+
asserts:
162
+
- failedTemplate:
163
+
errorMessage: "global.primaryOrgName or api.extraEnvVars PRIMARY_ORG_NAME is required when global.orgName is empty or \"*\"; self-hosted service-token management needs a primary organization."
164
+
26
165
- it: should use correct namespace from helper when createNamespace is false
Copy file name to clipboardExpand all lines: braintrust/values.yaml
+22Lines changed: 22 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,13 @@
1
1
# Global configs
2
2
global:
3
3
orgName: "<your org name on Braintrust>"
4
+
# Required when orgName is empty or "*" unless PRIMARY_ORG_NAME is supplied
5
+
# via api.extraEnvVars. Used to authorize self-hosted service-token management.
6
+
primaryOrgName: ""
7
+
# Optional comma-separated Braintrust Org ID allowlist (IDs, not org names).
8
+
# Do not include spaces. If orgName is a specific name, that org is included
9
+
# in the allowlist; include its Braintrust Org ID here for forward compatibility.
10
+
allowedOrgIds: ""
4
11
# When createNamespace is true, the namespace will be created and resources will be in global.namespace
5
12
# When createNamespace is false, resources will use .Release.Namespace (the namespace specified during helm install/upgrade)
6
13
createNamespace: false
@@ -126,6 +133,21 @@ api:
126
133
backfillDisableNonhistorical: false
127
134
allowInvalidBase64: false # By default, we will error on invalid base64 strings. Setting this to true will allow invalid base64 strings to be processed.
128
135
nodeMemoryPercent: "80"
136
+
# Controls how Braintrust backends handle outbound requests to user-supplied URLs
137
+
# that fail URL-security checks, such as URLs resolving to private or reserved IP
138
+
# ranges. Applies to the API and AI Gateway when configured. Use "off" to allow,
139
+
# "proxy" to proxy, "warn" to allow with warnings, or "reject" to block. Leave
140
+
# empty to use the application default of "warn".
141
+
unsafeUrlRequestMode: ""
142
+
# Comma-separated DNS resolver IP addresses Braintrust backends should query when
143
+
# checking user-supplied URLs. Set this to force URL-security validation through
144
+
# trusted resolvers, such as VNet or corporate DNS, before falling back to the host
145
+
# resolver. Leave empty to use the application default resolver behavior.
146
+
urlSecurityDnsServers: ""
147
+
# Optional comma-separated CIDR ranges that Braintrust backend URL-security
148
+
# validation may allow even if private or reserved. Hard-blocked metadata,
149
+
# link-local, multicast, unspecified, and future-use ranges remain blocked.
0 commit comments