@@ -429,6 +429,7 @@ describe('profile index helpers', () => {
429429 { key : 'local' , label : 'Local stdio' } ,
430430 ] ) ;
431431 expect ( profile . authTabs [ 0 ] . label ) . toBe ( 'Session cookie' ) ;
432+ expect ( profile . authTabs . every ( t => t . key !== 'oauth' ) ) . toBe ( true ) ;
432433 expect ( profile . snippets . find ( s => s . key === 'vscode-session-cookie' ) ) . toBeUndefined ( ) ;
433434 expect ( profile . snippets . find ( s => s . key === 'cursor-session-cookie' ) ) . toBeUndefined ( ) ;
434435
@@ -447,6 +448,68 @@ describe('profile index helpers', () => {
447448 expect ( codexLocalToml ?. content ) . toContain ( 'N8N_NODES_BASE_URL = "https://admin.isatky.cz"' ) ;
448449 } ) ;
449450
451+ it ( 'emits authTabs=[none] for proxy profile with no interceptors.auth (regression: no OAuth leak)' , ( ) => {
452+ const profiles : ListedProfileDetails [ ] = [
453+ {
454+ profileId : 'seznam-scif' ,
455+ profileName : 'seznam-scif' ,
456+ profileAliases : [ ] ,
457+ description : 'MCP proxy profile for Seznam SCIF' ,
458+ envVars : [ ] ,
459+ authMethods : [ ] ,
460+ } ,
461+ ] ;
462+
463+ const { payload } = buildProfileIndexPayload ( profiles , 'https://mcp.example.com' , 'en' ) ;
464+ const [ profile ] = payload . profiles ;
465+ expect ( profile . authTabs ) . toHaveLength ( 1 ) ;
466+ expect ( profile . authTabs [ 0 ] . key ) . toBe ( 'none' ) ;
467+ expect ( profile . authTabs [ 0 ] . label ) . toBe ( 'No auth' ) ;
468+ expect ( profile . authTabs . every ( t => t . key !== 'oauth' ) ) . toBe ( true ) ;
469+ } ) ;
470+
471+ it ( 'emits authTabs=[none] with Czech label for no-auth proxy profile' , ( ) => {
472+ const profiles : ListedProfileDetails [ ] = [
473+ {
474+ profileId : 'seznam-ai-adoption' ,
475+ profileName : 'seznam-ai-adoption' ,
476+ profileAliases : [ ] ,
477+ description : 'MCP proxy profile for Seznam AI Adoption' ,
478+ envVars : [ ] ,
479+ authMethods : [ ] ,
480+ } ,
481+ ] ;
482+
483+ const { payload } = buildProfileIndexPayload ( profiles , 'https://mcp.example.com' , 'cs' ) ;
484+ const [ profile ] = payload . profiles ;
485+ expect ( profile . authTabs ) . toHaveLength ( 1 ) ;
486+ expect ( profile . authTabs [ 0 ] . key ) . toBe ( 'none' ) ;
487+ expect ( profile . authTabs [ 0 ] . label ) . toBe ( 'Bez autentizace' ) ;
488+ expect ( profile . authTabs . every ( t => t . key !== 'oauth' ) ) . toBe ( true ) ;
489+ } ) ;
490+
491+ it ( 'does not include oauth authTab even when upstream_mcp env vars are present' , ( ) => {
492+ // Regression: upstream_mcp.auth env vars appear in profile.envVars but must NOT
493+ // create an oauth auth tab — authMethods reflects only interceptors.auth.
494+ const profiles : ListedProfileDetails [ ] = [
495+ {
496+ profileId : 'proxy-with-upstream-auth' ,
497+ profileName : 'proxy-with-upstream-auth' ,
498+ profileAliases : [ ] ,
499+ description : 'Proxy with server-to-server upstream auth' ,
500+ envVars : [ 'UPSTREAM_TOKEN' ] ,
501+ authMethods : [ ] ,
502+ } ,
503+ ] ;
504+
505+ const { payload } = buildProfileIndexPayload ( profiles , 'https://mcp.example.com' , 'en' ) ;
506+ const [ profile ] = payload . profiles ;
507+ expect ( profile . authTabs ) . toHaveLength ( 1 ) ;
508+ expect ( profile . authTabs [ 0 ] . key ) . toBe ( 'none' ) ;
509+ expect ( profile . authTabs . every ( t => t . key !== 'oauth' ) ) . toBe ( true ) ;
510+ expect ( profile . authTabs . every ( t => t . key !== 'bearer' ) ) . toBe ( true ) ;
511+ } ) ;
512+
450513 it ( 'renders template placeholders' , ( ) => {
451514 const profiles : ListedProfileDetails [ ] = [
452515 {
0 commit comments