- workspace-auth.ts: reemplaza isInternalOnlyHost por isDevOnlyUrl que
incluye localhost/127.0.0.1 e IPs LAN además de hostnames Docker.
getWorkspaceBaseUrl() y getPublicKeycloakBaseUrl() ya ignoran valores
dev-only; no usan VITE_KEYCLOAK_URL=http://localhost:... en prod.
- Nuevo resolveSystemBaseUrl(): cuando url.origin es localhost porque
ORIGIN env var apunta a localhost en producción, busca SITE_URL/APP_URL
como fallback para construir redirect_uri seguros.
- buildKeycloakAuthorizationUrl() y buildKeycloakLoginUrl() usan
resolveSystemBaseUrl() para el redirect_uri (evita localhost:5173).
- auth/callback/+page.server.ts: idem para el redirectUri del token exchange.
- auth.ts (cliente): resolveKeycloakUrl() detecta en runtime si
VITE_KEYCLOAK_URL bakeado apunta a localhost pero el browser NO está
en localhost → deriva la URL del hostname real del browser.
- .env.example: documenta vars de producción recomendadas (SITE_URL,
ORIGIN, VITE_HUB_URL) con advertencias sobre el efecto de ORIGIN.
Root cause: el .env de dev (ORIGIN=http://localhost:5173,
VITE_KEYCLOAK_URL=http://localhost:8085/kcauth) se usaba en producción
sin sobrescribir estas variables, causando que KC generara URLs con
localhost como redirect_uri y KC URL.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Anexo76 debe tener su propio cliente en Keycloak (no compartir hub-frontend).
Misma sesión SSO para el usuario, pero cliente separado por app.
El cliente anexo76-frontend debe crearse en Keycloak con:
- Valid redirect URIs: https://anexo76-dev.aduanasoft.com/*
- Web origins: https://anexo76-dev.aduanasoft.com
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Anexo76 no es independiente del Hub/Workspace — comparten el mismo
cliente de Keycloak (hub-frontend). anexo76-frontend no existe en KC.
- Dockerfile.prod: agrega ARG/ENV VITE_KEYCLOAK_CLIENT_ID=hub-frontend
- workspace-auth.ts: actualiza fallback de 'anexo76-frontend' a 'hub-frontend'
- .env.example: actualiza a hub-frontend
- Jenkinsfile: pasa --build-arg VITE_KEYCLOAK_CLIENT_ID=hub-frontend al build
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Agrega INTERNAL_API_URL, INTERNAL_HUB_URL, HUB_URL, KEYCLOAK_URL y ORIGIN
al ejemplo para que el dev local tenga el mismo conjunto de variables que
usa Docker Compose, evitando que el SSO exchange y el refresh proactivo
fallen silenciosamente por vars indefinidas.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Added sidebar menu components including sidebar-menu-item, sidebar-menu-skeleton, sidebar-menu-sub-button, sidebar-menu-sub-item, sidebar-menu-sub, sidebar-menu, sidebar-provider, sidebar-rail, sidebar-separator, sidebar-trigger, and sidebar.
- Introduced skeleton loading states for sidebar items.
- Integrated tooltip components for enhanced user interaction.
- Developed mobile responsiveness using media queries.
- Established authentication flow with Keycloak, including login, logout, and token management.
- Implemented server-side redirection based on authentication status.
- Enhanced error handling and logging for authentication processes.
- Implemented SvelteKit frontend with authentication callback handling.
- Created demo routes and paraglide localization functionality.
- Added health check and entrypoint scripts for backend services.
- Established PostgreSQL and Keycloak initialization scripts with health checks.
- Introduced models for database schema using SQLAlchemy.
- Configured Vite and SvelteKit for development and testing environments.
- Added health check script to verify service statuses and resource usage.
- Created Docker entrypoint scripts for seamless service startup.