refactor(mf): API Key longue durée au lieu d OAuth2 client_credentials
Some checks are pending
Deploy info-canicule / deploy (push) Waiting to run

Le portail Météo France ne propose pas le flow client_credentials gratuit
(seulement token OAuth2 court 1h, pas viable, ou API Key longue durée).
On simplifie : un seul env METEOFRANCE_API_KEY → Authorization: Bearer.

- lib/meteofrance-auth.ts : suppression du cache token + flow refresh
- .env.tmpl : ref unique vers vault Infra/Météo France API/api_key
- vault item recréé avec api_key (hidden) + created_at + expires_at
- CLAUDE.md projet : section rotation API key

L onglet 24 h n apparaît qu une fois api_key non vide dans le vault.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
Florian 2026-05-26 00:25:54 +02:00
parent a78726076f
commit a849977fcc
4 changed files with 39 additions and 91 deletions

View file

@ -15,6 +15,6 @@ UMAMI_SRC=https://analytics.nocleus.com/script.js
# GlitchTip (optionnel — si vide, pas d'envoi Sentry)
SENTRY_DSN={{ pass://Infra/Info Canicule — secrets/SENTRY_DSN }}
# Météo France API (portail-api.meteofrance.fr) — OAuth2 client_credentials pour hourly observations
METEOFRANCE_CLIENT_ID={{ pass://Infra/Météo France API/client_id }}
METEOFRANCE_CLIENT_SECRET={{ pass://Infra/Météo France API/client_secret }}
# Météo France API (portail-api.meteofrance.fr) — API Key longue durée
# Header `Authorization: Bearer <key>`. Rotation : recréer sur portail, vault, make env, redeploy.
METEOFRANCE_API_KEY={{ pass://Infra/Météo France API/api_key }}