@@ -62,6 +62,9 @@ describe("diagnostic support export", () => {
6262 ] . join ( "." ) ;
6363 const privateChat = "private user said diagnose my bank transfer" ;
6464 const webhookBody = "raw webhook body with message contents" ;
65+ const requestAuthValue = "support-request-auth-value" ;
66+ const requestTlsPassphrase = "support-request-tls-passphrase" ;
67+ const proxyTlsPassphrase = "support-proxy-tls-passphrase" ;
6568 const credentialUrl =
6669 "wss://support-user:[email protected] /ws?token=short-token&ok=1" ; 6770 const configPath = path . join ( tempDir , "openclaw.json" ) ;
@@ -81,6 +84,31 @@ describe("diagnostic support export", () => {
8184 logging : {
8285 redactSensitive : "off" ,
8386 } ,
87+ models : {
88+ providers : {
89+ supportProxy : {
90+ baseUrl : "https://models.example.test/v1" ,
91+ request : {
92+ auth : {
93+ mode : "header" ,
94+ headerName : "X-Support-Auth" ,
95+ value : requestAuthValue ,
96+ } ,
97+ tls : {
98+ passphrase : requestTlsPassphrase ,
99+ } ,
100+ proxy : {
101+ mode : "explicit-proxy" ,
102+ url : "http://127.0.0.1:8080" ,
103+ tls : {
104+ passphrase : proxyTlsPassphrase ,
105+ } ,
106+ } ,
107+ } ,
108+ models : [ { id : "support-model" } ] ,
109+ } ,
110+ } ,
111+ } ,
84112 channels : {
85113 telegram : {
86114 accounts : {
@@ -264,6 +292,10 @@ describe("diagnostic support export", () => {
264292 expect ( combined ) . not . toContain ( "QWxhZGRpbjpvcGVuIHNlc2FtZQ==" ) ;
265293 expect ( combined ) . not . toContain ( "sid=secret" ) ;
266294 expect ( combined ) . not . toContain ( "structured secret payload" ) ;
295+ expect ( combined ) . not . toContain ( requestAuthValue ) ;
296+ expect ( combined ) . not . toContain ( requestTlsPassphrase ) ;
297+ expect ( combined ) . not . toContain ( proxyTlsPassphrase ) ;
298+ expect ( combined ) . not . toContain ( "__OPENCLAW_REDACTED__" ) ;
267299 expect ( combined ) . not . toContain ( "gateway-session-15555551212" ) ;
268300 expect ( combined ) . not . toContain ( "supportEventSecret" ) ;
269301 expect ( combined ) . not . toContain ( fakeAwsKey ) ;
@@ -365,6 +397,25 @@ describe("diagnostic support export", () => {
365397 redactSensitive ?: string ;
366398 } ;
367399 agents ?: Array < { name ?: string ; instructions ?: string } > ;
400+ models ?: {
401+ providers ?: {
402+ supportProxy ?: {
403+ request ?: {
404+ auth ?: {
405+ value ?: string ;
406+ } ;
407+ tls ?: {
408+ passphrase ?: string ;
409+ } ;
410+ proxy ?: {
411+ tls ?: {
412+ passphrase ?: string ;
413+ } ;
414+ } ;
415+ } ;
416+ } ;
417+ } ;
418+ } ;
368419 } ;
369420 expect ( sanitizedConfig . gateway ) . toEqual ( {
370421 mode : "local" ,
@@ -376,6 +427,15 @@ describe("diagnostic support export", () => {
376427 } ,
377428 } ) ;
378429 expect ( sanitizedConfig . logging ?. redactSensitive ) . toBe ( "off" ) ;
430+ expect ( sanitizedConfig . models ?. providers ?. supportProxy ?. request ?. auth ?. value ) . toBe (
431+ "<redacted>" ,
432+ ) ;
433+ expect ( sanitizedConfig . models ?. providers ?. supportProxy ?. request ?. tls ?. passphrase ) . toBe (
434+ "<redacted>" ,
435+ ) ;
436+ expect ( sanitizedConfig . models ?. providers ?. supportProxy ?. request ?. proxy ?. tls ?. passphrase ) . toBe (
437+ "<redacted>" ,
438+ ) ;
379439 expect ( Object . keys ( sanitizedConfig . channels ?. telegram ?. accounts ?? { } ) ) . toEqual ( [
380440 "<redacted-account-1>" ,
381441 ] ) ;
0 commit comments