Sessione salvata cifrata, copiata a «Ho finito» (#36, S4)
Il client del sito ha bisogno della sessione del browser di Febe: ora la copia c'è, cifrata e dietro un interruttore, senza cambiare nulla di predefinito. - Opzione «raccolta» (pagine predefinita, richieste): solo con «richieste» e almeno un'operazione configurata si costruiscono sessione salvata, client del sito e copia. Con Instagram nulla cambia: le dieci operazioni restano non configurate (mancano __spin_*, __req, __s, __dyn, __csr e altri). - Cookie con dominio, percorso, solo-host, Secure, HttpOnly e scadenza, mandati solo dove il browser li manderebbe (RFC 6265). - Sezione «page» del catalogo: dove la pagina tiene ogni valore; nuovi campi rev, hs, hsi, dpr, ccg, comet_req, entry_nonce. Il caricatore rifiuta un'operazione configurata con un valore di sessione senza fonte nella pagina. - Dati/sessione/sessione.json: DPAPI su Windows, AES-256-GCM in Docker (chiave da FEBE_CHIAVE_SESSIONE o chiave.bin), scrittura atomica, file illeggibile = nessuna sessione. «Scollega» la cancella; chiave.bin resta. - Copia a «Ho finito» con Network.getCookies e una sola Runtime.evaluate in sola lettura, solo da una pagina del sito e finché dura il permesso di guida. - FEBE_PASSWORD e FEBE_CHIAVE_SESSIONE non passano a Chromium, Xvfb, ffmpeg. - Sito di prova: csrftoken, cookie limitato a /api/, registro di moduli suo. - Revisione su tre lenti: 11 punti confermati, tutti corretti. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
3046b2da47
commit
c87768766c
69 files changed
+5936
-415
No files matched your search
@@ -2,6 +2,7 @@ using Febe.Browser.Recipes;
|
||||
using Febe.Core.Abstractions;
|
||||
using Febe.Core.Alerts;
|
||||
using Febe.Core.Library;
|
||||
using Febe.Core.Security;
|
||||
using Febe.Core.Storage;
|
||||
using Febe.Web;
|
||||
using Febe.Web.Connection;
|
||||
@@ -34,6 +35,17 @@ public interface IFebePlatform
|
||||
/// <summary>The browser of this shell. Called once, after the database is open and before the engine exists.</summary>
|
||||
Task<IFebeBrowser> CreateBrowserAsync(FebePlatformContext context, CancellationToken ct);
|
||||
|
||||
/// <summary>
|
||||
/// How this shell encrypts the saved session (issue #36, S4, spec §13.2): DPAPI for the current user on Windows,
|
||||
/// AES-256-GCM in Docker with the key of <c>FEBE_CHIAVE_SESSIONE</c> or <c>Dati/sessione/chiave.bin</c>. Called at
|
||||
/// most once, after the database is open, and only when the composition keeps a saved session
|
||||
/// (<see cref="FebeAppOptions.Collection"/> is <see cref="CollectionRoute.Requests"/>). Says in the log where the
|
||||
/// key comes from, never the key.
|
||||
/// </summary>
|
||||
/// <exception cref="InvalidDataException">The key file is there but is not a key of Febe.</exception>
|
||||
/// <exception cref="IOException">The key file could not be made or read.</exception>
|
||||
ISessionProtector CreateSessionProtector(FebePlatformContext context);
|
||||
|
||||
/// <summary>
|
||||
/// Services of this shell for a normal start, registered before the web layer (whose fallbacks use TryAdd):
|
||||
/// native shell (its notifications are the Windows channel of the alerts), browser window, remote view, change of
|
||||
@@ -103,6 +115,13 @@ public sealed record FebeAppOptions
|
||||
/// <summary>Development: the first session comes after this delay instead of 2–10 minutes.</summary>
|
||||
public TimeSpan? FirstSessionDelay { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// Option «raccolta» (issue #36, S4): <see cref="CollectionRoute.Pages"/> by default, as before S4.
|
||||
/// <see cref="CollectionRoute.Requests"/> builds the saved session and the site client only when the site's catalog
|
||||
/// has configured operations.
|
||||
/// </summary>
|
||||
public CollectionRoute Collection { get; init; } = CollectionRoute.Pages;
|
||||
|
||||
/// <summary>Warnings found while reading the configuration, for the log.</summary>
|
||||
public IReadOnlyList<string> Warnings { get; init; } = [];
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user