diff --git a/CHANGELOG.md b/CHANGELOG.md index a264fc5..ee81e2c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,7 +6,7 @@ Format basé sur [Keep a Changelog](https://keepachangelog.com/fr/1.1.0/), et [Semantic Versioning](https://semver.org/spec/v2.0.0.html). > **En cours de développement** : les changements à venir sont listés dans la section -> [Unreleased](#unreleased). La dernière version livrée est **2.101.0**. +> [Unreleased](#unreleased). La dernière version livrée est **2.102.0**. --- @@ -14,6 +14,14 @@ et [Semantic Versioning](https://semver.org/spec/v2.0.0.html). --- +## [2.102.0] — 2026-12-04 + +### Corrigé + +- **Provisionnement Spark — expiration des octrois automatiques « Console Spark » : 24 mois (#122, suivi épopée fusion #197)** : l’octroi automatique créé pour le consommateur `spark-` (écriture machine #120) expirait au défaut 90 jours ; il est désormais de 24 mois (730 jours, `DUREE_OCTROI_CONSOLE_SPARK_JOURS`). La création manuelle explicite reste à 90 jours. + +--- + ## [2.101.0] — 2026-12-04 ### Ajouté diff --git a/README.fr.md b/README.fr.md index 8c015bd..8c112fc 100644 --- a/README.fr.md +++ b/README.fr.md @@ -4,7 +4,7 @@ **Porte d'entrée web ultra-léger pour vos vaults Obsidian** — Accédez, naviguez et recherchez dans toutes vos notes Obsidian depuis n'importe quel appareil via une interface web moderne et responsive. -[![Version](https://img.shields.io/badge/Version-2.101.0-blue.svg)]() +[![Version](https://img.shields.io/badge/Version-2.102.0-blue.svg)]() [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT) [![Docker](https://img.shields.io/badge/Docker-Ready-blue.svg)](https://www.docker.com/) [![Python](https://img.shields.io/badge/Python-3.11+-green.svg)](https://www.python.org/) @@ -981,8 +981,8 @@ Ce projet est sous licence **MIT** — voir le fichier [LICENSE](LICENSE) pour l ## 📝 Changelog -Consultez le [CHANGELOG.md](./CHANGELOG.md) pour l'historique complet de toutes les versions (v1.0.0 → v2.101.0). +Consultez le [CHANGELOG.md](./CHANGELOG.md) pour l'historique complet de toutes les versions (v1.0.0 → v2.102.0). --- -*Projet : ObsiGate | Version : 2.101.0 | Dernière mise à jour : Septembre 2026* +*Projet : ObsiGate | Version : 2.102.0 | Dernière mise à jour : Septembre 2026* diff --git a/README.md b/README.md index 591e581..e7e47e4 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ **Ultra-light web gateway for your Obsidian vaults** — Access, browse, and search all your Obsidian notes from any device via a modern, responsive web interface. -[![Version](https://img.shields.io/badge/Version-2.101.0-blue.svg)]() +[![Version](https://img.shields.io/badge/Version-2.102.0-blue.svg)]() [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT) [![Docker](https://img.shields.io/badge/Docker-Ready-blue.svg)](https://www.docker.com/) [![Python](https://img.shields.io/badge/Python-3.11+-green.svg)](https://www.python.org/) @@ -1156,8 +1156,8 @@ This project is licensed under the **MIT License** - see the [LICENSE](LICENSE) ## 📝 Changelog -See [CHANGELOG.md](./CHANGELOG.md) for the complete version history (v1.0.0 → v2.101.0). +See [CHANGELOG.md](./CHANGELOG.md) for the complete version history (v1.0.0 → v2.102.0). --- -*Project: ObsiGate | Version: 2.101.0 | Last updated: September 2026* +*Project: ObsiGate | Version: 2.102.0 | Last updated: September 2026* diff --git a/VERSION b/VERSION index e5e8eb7..fcf29be 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -2.101.0 +2.102.0 diff --git a/backend/coffre_store.py b/backend/coffre_store.py index 4f5914d..cb9151a 100644 --- a/backend/coffre_store.py +++ b/backend/coffre_store.py @@ -89,6 +89,12 @@ ORIGINE_OCTROI_CONSOLE_SPARK = "console_spark" MAX_VALEUR = 65536 MAX_TEXTE = 2000 DUREE_OCTROI_DEFAUT_JOURS = 90 +# Octroi automatique « Console Spark » (provisioning machine #120 +# et drapeau manuel) : 24 mois, soit 2 x 365 jours. Le code +# manipule des durées en jours (timedelta) ; 730 jours est +# l’équivalent retenu — un mois calendaire près, sans +# dépendance dateutil. +DUREE_OCTROI_CONSOLE_SPARK_JOURS = 730 # Motifs refusés dans les champs de métadonnées (description, note) : # une valeur ressemblant à un secret ne doit jamais transiter par un champ @@ -1144,7 +1150,8 @@ def synchroniser_destination_spark( Spark vers ce secret. Si un octroi actif couvre déjà le secret (manuel, automatique ou coffre-wide), il est conservé tel quel — jamais de doublon. Sinon un octroi d'origine ``console_spark`` - est créé (expiration par défaut, comme un octroi manuel). + est créé (expiration 24 mois — DUREE_OCTROI_CONSOLE_SPARK_JOURS — + et non le défaut 90 jours des octrois manuels). - destination inactive : révoque les octrois automatiques actifs du secret (origine ``console_spark`` seulement) ; les octrois manuels ne sont jamais touchés. @@ -1185,6 +1192,10 @@ def synchroniser_destination_spark( cible_id=consommateur["id"], secret_id=secret["id"], cree_par=cree_par, + expiration=( + datetime.now(UTC) + + timedelta(days=DUREE_OCTROI_CONSOLE_SPARK_JOURS) + ).isoformat(), origine=ORIGINE_OCTROI_CONSOLE_SPARK, data_dir=base, ) diff --git a/desktop/Cargo.lock b/desktop/Cargo.lock index 9c62f30..5e381ff 100644 --- a/desktop/Cargo.lock +++ b/desktop/Cargo.lock @@ -2626,7 +2626,7 @@ dependencies = [ [[package]] name = "obsigate-desktop" -version = "2.101.0" +version = "2.102.0" dependencies = [ "chrono", "env_logger", diff --git a/desktop/Cargo.toml b/desktop/Cargo.toml index 550f4ff..408f9bf 100644 --- a/desktop/Cargo.toml +++ b/desktop/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "obsigate-desktop" -version = "2.101.0" +version = "2.102.0" description = "ObsiGate Desktop — Porte d'entrée native pour vos vaults Obsidian" authors = ["Bruno Charest"] edition = "2021" diff --git a/desktop/tauri.conf.json b/desktop/tauri.conf.json index 3cc183f..8426534 100644 --- a/desktop/tauri.conf.json +++ b/desktop/tauri.conf.json @@ -1,7 +1,7 @@ { "$schema": "https://raw.githubusercontent.com/nicedoc/obsigate/main/desktop/tauri.conf.schema.json", "productName": "ObsiGate", - "version": "2.101.0", + "version": "2.102.0", "identifier": "com.obsigate.desktop", "build": { "frontendDist": "../frontend", diff --git a/docs/ROADMAP.md b/docs/ROADMAP.md index 24a3657..d6c4a3b 100644 --- a/docs/ROADMAP.md +++ b/docs/ROADMAP.md @@ -1,6 +1,6 @@ # ObsiGate — Roadmap -> **Version :** 2.101.0 | **Dernière mise à jour :** 2026-12-04 +> **Version :** 2.102.0 | **Dernière mise à jour :** 2026-12-04 > **Ce fichier ne contient que le travail à venir** (🔵 En cours + ⚪ Backlog) et un index compact > vers les fonctionnalités livrées. > - **Méthode de livraison à appliquer pour toute tâche : [DELIVERY_WORKFLOW.md](./DELIVERY_WORKFLOW.md)** diff --git a/package.json b/package.json index 6683cef..93bf8c1 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "obsigate", - "version": "2.101.0", + "version": "2.102.0", "description": "**Porte d'entrée web ultra-léger pour vos vaults Obsidian** — Accédez, naviguez et recherchez dans toutes vos notes Obsidian depuis n'importe quel appareil via une interface web moderne et responsive.", "main": "patch.js", "directories": { diff --git a/tests/test_coffre_secrets.py b/tests/test_coffre_secrets.py index 79ceba3..dc93e03 100644 --- a/tests/test_coffre_secrets.py +++ b/tests/test_coffre_secrets.py @@ -20,7 +20,7 @@ import base64 import json import os import shutil -from datetime import datetime, timedelta, timezone +from datetime import UTC, datetime, timedelta, timezone from pathlib import Path import pytest @@ -1620,3 +1620,24 @@ class TestEcritureMachine120: ) assert resp.status_code == 403 assert resp.json()["detail"] == "consommateur_introuvable" + + + def test_octroi_auto_console_spark_24_mois( + self, client, env_coffre, monkeypatch): + """Octroi automatique « Console Spark » (#120) : 24 mois + (730 jours), et non le défaut 90 jours des octrois manuels + (test_octroi_par_defaut_90_jours, inchangé).""" + monkeypatch.setenv( + "DRACO_PROVISION_MACHINE_KEY", CLE_PROVISION_TEST) + self._provisionner_alice(env_coffre) + _COURANT["user"] = None + resp = self._ecrire_secret_machine(client) + assert resp.status_code == 200, resp.text + assert resp.json()["console_spark_octroi"] == "cree" + _connecter(client, "alice") + octrois = client.get("/api/coffres/app-alice/octrois").json() + assert len(octrois) == 1 + assert octrois[0]["origine"] == "console_spark" + expiration = datetime.fromisoformat(octrois[0]["expiration"]) + delta = expiration - datetime.now(UTC) + assert 729 <= delta.days <= 731