fix: Autenticación por token para MCP Server
All checks were successful
build-and-deploy / build-and-deploy (push) Successful in 36s

- Ruta /api/mcp agregada a rutas públicas de Traefik
- Validación de token Bearer en el endpoint
- Token configurado como secret MCP_AUTH_TOKEN
This commit is contained in:
2025-11-25 12:56:04 -06:00
parent 0e86f9d7a9
commit bc5eb826e8
15 changed files with 154 additions and 1 deletions

View File

@@ -18,6 +18,8 @@ services:
# Authentik configuration
- NUXT_PUBLIC_AUTHENTIK_URL=${NUXT_PUBLIC_AUTHENTIK_URL:-https://authentik.nucleoriofrio.com}
- NUXT_PUBLIC_AUTH_ENABLED=${NUXT_PUBLIC_AUTH_ENABLED:-false}
# MCP Server token
- MCP_AUTH_TOKEN=${MCP_AUTH_TOKEN:-}
volumes:
- printercentral-data:/app/data
networks:
@@ -32,7 +34,7 @@ services:
# Router para assets estaticos de Nuxt y PWA (sin autenticacion) - mayor prioridad
# Incluye recursos PWA y .well-known para scope extensions
- "traefik.http.routers.${APP_NAME}-public.rule=Host(`${APP_DOMAIN}`) && (PathPrefix(`/_nuxt`) || PathPrefix(`/.well-known`) || PathPrefix(`/icons`) || Path(`/manifest.webmanifest`) || Path(`/sw.js`) || PathPrefix(`/workbox-`) || Path(`/favicon.ico`) || Path(`/offline.html`))"
- "traefik.http.routers.${APP_NAME}-public.rule=Host(`${APP_DOMAIN}`) && (PathPrefix(`/_nuxt`) || PathPrefix(`/.well-known`) || PathPrefix(`/icons`) || Path(`/manifest.webmanifest`) || Path(`/sw.js`) || PathPrefix(`/workbox-`) || Path(`/favicon.ico`) || Path(`/offline.html`) || PathPrefix(`/api/mcp`))"
- "traefik.http.routers.${APP_NAME}-public.entrypoints=websecure"
- "traefik.http.routers.${APP_NAME}-public.tls=true"
- "traefik.http.routers.${APP_NAME}-public.tls.certresolver=letsencrypt"