Nicolas Cantu 0af507143a Add smart-ide-global API layer, SSO delegates proxy, .logs access logs
- New smart-ide-global-api (127.0.0.1:37149): internal bearer, upstream proxy, X-OIDC forward
- SSO gateway calls global API with GLOBAL_API_INTERNAL_TOKEN; logs to .logs/sso-gateway/
- Aggregated config example, docs, VERSION 0.0.2, claw proxy local URL hint
2026-04-03 23:08:52 +02:00

31 lines
1.0 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# smart-ide-global-api
Couche HTTP **interne** : agrège les appels vers les micro-services `smart_ide` avec les **jetons techniques** par service. **Pas dOIDC** : seul `smart-ide-sso-gateway` appelle cette API, avec `Authorization: Bearer` égal à `GLOBAL_API_INTERNAL_TOKEN`.
Les micro-services nexposent pas le SSO ; ils restent sur **127.0.0.1** avec Bearer (ou clé API pour local-office).
## Run
Démarrer **avant** la passerelle SSO.
```bash
cd services/smart-ide-global-api
cp .env.example .env
# définir GLOBAL_API_INTERNAL_TOKEN et les jetons des services
set -a && source .env && set +a
npm ci
npm run build
npm start
```
Écoute par défaut : `http://127.0.0.1:37149`.
## Journaux
Une ligne JSON par requête (hors `GET /health`) dans **`.logs/global-api/access.log`** (répertoire `.logs/` à la racine du monorepo, créé au besoin).
## Documentation
- API : [`docs/API/global-api.md`](../../docs/API/global-api.md)
- Passerelle SSO : [`docs/features/sso-gateway-service.md`](../../docs/features/sso-gateway-service.md)