Project

General

Profile

Actions

Feature #87

closed
RA

Feature #78: Rendre accessibles des pages publiques via liens uniques sans authentification

Backend — modèle SharedLink + endpoints publics + révocation

Feature #87: Backend — modèle SharedLink + endpoints publics + révocation

Added by Redmine Admin about 2 months ago. Updated about 1 month ago.

Status:
Shipped
Priority:
Normal
Assignee:
-
Start date:
06/15/2026
Due date:
% Done:

0%

Estimated time:
spec_ref:
build_status:
build_number:
ci_run_url:
scan_status:
scan_report_url:
deploy_status:
deployed
preprod_url:
deployed_at:
06/23/2026
branch:
feat/87-sharedlink-backend
pr_url:
https://github.com/Scobby-organisation/scobby/pull/9
security_key:
severity:
paused:

Description

Parent : #78 (liens publics uniques sans auth).

Créer l'entité Prisma `SharedLink` (token opaque **cryptographiquement aléatoire / non énumérable** + unique, `resourceType` ∈ {feuille_de_route, confirmation_date, contrat, espace_presse}, `resourceId`, `status` actif/révoqué, `createdBy`, timestamps, `expiresAt` optionnel). Endpoints PUBLIC (hors guard JWT) résolvant token→ressource en réutilisant les fonctions PUBLIC existantes (getPublicContract, submitPublicArtistForm, téléchargement dossier presse, feuille de route). Endpoints admin (sous guard) : génération + révocation. Token révoqué/expiré → échec propre (404/403 structuré, sans fuite d'info).

Stack : NestJS + Prisma + Postgres (server/), registre PUBLIC/PRIVATE existant.

## Acceptance criteria
- [ ] Migration Prisma : table SharedLink, token unique, index (resourceType, resourceId).
- [ ] Génération (admin, sous guard) → token opaque non devinable lié à la ressource.
- [ ] Révocation **immédiate** : un token précédemment valide ne résout plus.
- [ ] Endpoints publics fonctionnent sans JWT et ne renvoient que les données déjà exposées par les fonctions PUBLIC correspondantes.
- [ ] La **soumission du formulaire de confirmation** via token **enregistre correctement** les données (AC explicite du ticket).
- [ ] Token inconnu/révoqué/expiré → erreur structurée sans fuite.
- [ ] Tests backend (TDD) + lint/typecheck verts.

RA Updated by Redmine Admin about 2 months ago Actions #1

  • Status changed from Submitted to In development
  • branch set to feat/87-sharedlink-backend

Dev démarré (worktree isolé, `feat/87-sharedlink-backend` sur `origin/dev`). Submitted → In development. Socle backend du #78.

RA Updated by Redmine Admin about 2 months ago Actions #2

  • Status changed from In development to QA
  • pr_url set to https://github.com/Scobby-organisation/scobby/pull/9

PR #9 ouverte vers `dev` (rebasée sur dev, `app.module.ts` réconcilié avec #90). In development → QA. SharedLink : 18 tests, server 68/68, lint/build verts. Sécurité (entropie token, no-leak) validée en unitaire ; routing HTTP + migration à valider en préprod.

RA Updated by Redmine Admin about 2 months ago Actions #3

  • Status changed from QA to Preprod

Déployé en préprod (https://preprod-scobby.omdev.tech). Passage QA → Preprod.

RA Updated by Redmine Admin about 1 month ago Actions #4

  • Status changed from Preprod to Ready to ship

Livré sur master (dev = preprod = master). Commit `dff38f7e` (PR #9) — feat(public-links): modèle SharedLink + endpoints publics/admin + révocation. Passage en **Ready to ship** — *Shipped* après confirmation du gate prod manuel (Jenkins) sur scobby.fr.

RA Updated by Redmine Admin about 1 month ago Actions #5

  • Status changed from Ready to ship to Shipped
  • deploy_status set to deployed
  • deployed_at set to 06/23/2026

Déploiement PROD confirmé live sur scobby.fr (gate manuel Jenkins approuvé le 2026-06-23). Passage en **Shipped**.

Actions

Also available in: PDF Atom