From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@sympa.inria.fr Delivered-To: caml-list@sympa.inria.fr Received: from mail3-relais-sop.national.inria.fr (mail3-relais-sop.national.inria.fr [192.134.164.104]) by sympa.inria.fr (Postfix) with ESMTPS id 745427FBF0 for ; Fri, 18 Dec 2015 17:37:06 +0100 (CET) IronPort-PHdr: 9a23:8sqklx/xL5cI//9uRHKM819IXTAuvvDOBiVQ1KB92+kcTK2v8tzYMVDF4r011RmSDdudsK8P2rKempujcFJDyK7JiGoFfp1IWk1NouQttCtkPvS4D1bmJuXhdS0wEZcKflZk+3amLRodQ56mNBXsq3G/pQQfBg/4fVIsYL+lRMiJ0o/mj6ibwN76XUZhvHKFe7R8LRG7/036l/I9ps9cEJs30QbDuXBSeu5blitCLFOXmAvgtI/rpMYwuwwZgf8q9tZBXKPmZOx4COUAVHV1e1wysfF1r4fABSaD+XoaGjEbngVJBUvA6FT9VZ70tgP3qu1n3yrcO8DqG+MaQzOnupxzSQXvk28qMz8+6GbKjstrxPZArRagoAR43qbbZYiUMLx1eaaLLoBSfnZIQssED38JOYi7dYZaSrNZZes= Authentication-Results: mail3-smtp-sop.national.inria.fr; spf=None smtp.pra=seliopou@gmail.com; spf=Pass smtp.mailfrom=seliopou@gmail.com; spf=None smtp.helo=postmaster@mail-lb0-f171.google.com Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of seliopou@gmail.com) identity=pra; client-ip=209.85.217.171; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="seliopou@gmail.com"; x-sender="seliopou@gmail.com"; x-conformance=sidf_compatible Received-SPF: Pass (mail3-smtp-sop.national.inria.fr: domain of seliopou@gmail.com designates 209.85.217.171 as permitted sender) identity=mailfrom; client-ip=209.85.217.171; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="seliopou@gmail.com"; x-sender="seliopou@gmail.com"; x-conformance=sidf_compatible; x-record-type="v=spf1" Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of postmaster@mail-lb0-f171.google.com) identity=helo; client-ip=209.85.217.171; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="seliopou@gmail.com"; x-sender="postmaster@mail-lb0-f171.google.com"; x-conformance=sidf_compatible X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A0BRAAAPNXRWm6vZVdFegm6CCwaCZbAljDaGCQICAoEzBzwQAQEBAQEBAQEQAQEBAQEGCwsJIS6CLYIIAQEDAQwGER0BGx0BAwwGAwIEBzcCAiIBEQEFARwGExsHh3cBAwoIjjGPToExPjGLSIFqgnmIDwoZJw1Wgz8BAQEBAQUBAQEBAQEXAQUOhkiEfoRCAoMzgUkFji6IUY1KgVyXWYInEiSBFzmCLyOBeyA0g0eBSgEBAQ X-IPAS-Result: A0BRAAAPNXRWm6vZVdFegm6CCwaCZbAljDaGCQICAoEzBzwQAQEBAQEBAQEQAQEBAQEGCwsJIS6CLYIIAQEDAQwGER0BGx0BAwwGAwIEBzcCAiIBEQEFARwGExsHh3cBAwoIjjGPToExPjGLSIFqgnmIDwoZJw1Wgz8BAQEBAQUBAQEBAQEXAQUOhkiEfoRCAoMzgUkFji6IUY1KgVyXWYInEiSBFzmCLyOBeyA0g0eBSgEBAQ X-IronPort-AV: E=Sophos;i="5.20,446,1444687200"; d="scan'208";a="157635108" Received: from mail-lb0-f171.google.com ([209.85.217.171]) by mail3-smtp-sop.national.inria.fr with ESMTP/TLS/AES128-GCM-SHA256; 18 Dec 2015 17:37:05 +0100 Received: by mail-lb0-f171.google.com with SMTP id yq9so47253153lbb.3 for ; Fri, 18 Dec 2015 08:37:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; bh=B8UKNej2CY/nYYu4fnJsvWhnqtp9rl6FkAKNZoTrkTg=; b=ROhZ88uUrBMcYdnz/OpS/heL7uQEYfleFteIpi6LRBwgHEmxKw3fBbAIIWRsDqhzX6 foMpRshIjzsYzC0HbRsQ5Rz8OXucMR1+eJuOnMr67QXVMKinuiiJfqh2LU64uJzHT1wC b/aKwrZAFqaEg7JAfepA0U6klY8Q/T/3inmvskECt1qtkAw6yqCuhxLkCPnWTmxugiie 5CxJ40gw0+QR3oiP4PStcxjw2SIuJWeCUP8EwpP+doNoH6AuiQQfAwOq8XP7e7JebnSk JWIKBDJgUrgMYqk97hGzg3jqjbjkdhh3s+haPDYYY5+neXFBpKTRlysa4Y0K4ljMVhUW PmxQ== X-Received: by 10.112.160.202 with SMTP id xm10mr1540740lbb.22.1450456624795; Fri, 18 Dec 2015 08:37:04 -0800 (PST) MIME-Version: 1.0 Received: by 10.25.198.2 with HTTP; Fri, 18 Dec 2015 08:36:45 -0800 (PST) In-Reply-To: <56742C6F.4060905@etorok.net> References: <56742C6F.4060905@etorok.net> From: Spiros Eliopoulos Date: Fri, 18 Dec 2015 11:36:45 -0500 Message-ID: To: =?UTF-8?B?VMO2csO2ayBFZHdpbg==?= Cc: OCaml Content-Type: multipart/alternative; boundary=001a11c261ace2167e05272ebf80 Subject: Re: [Caml-list] ANN: ocaml-session --001a11c261ace2167e05272ebf80 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On Fri, Dec 18, 2015 at 10:55 AM, T=C3=B6r=C3=B6k Edwin wrote: > > > > The library ships with an in-memory backend (for development and > testing) and a postgresql-ocaml[0] based backend. > > How about signed cookies as a storage backend? > Python Flask and Django can use it to store session entirely in the > cookies with an hmac signature and expiration time, so your server can be > entirely stateless. > As long as the amount of data in your session is small, and all you need > is authenticated data (and not secret data) I think its quite an elegant > solution, > and more fitting with a functional style. > This is interesting. As far as I can tell, it should be possible to implement this as a backend without any modifications to module signatures. Now of course comes the question Cryptokit or nocrypto :) That decision, for better or worse, has already been made by ocaml-session: it uses nocrypto to generate session keys. -Spiros E. --001a11c261ace2167e05272ebf80 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable

= On Fri, Dec 18, 2015 at 10:55 AM, T=C3=B6r=C3=B6k Edwin &= lt;edwin+ml-= ocaml@etorok.net> wrote:
>
> The library ships with an in-memory backend (for development and testi= ng) and a postgresql-ocaml[0] based backend.

How about signed cookies as a storage backend?
Python Flask and Django can use it to store session entirely in the cookies= with an hmac signature and expiration time, so your server can be entirely= stateless.
As long as the amount of data in your session is small, and all you need is= authenticated data (and not secret data) I think its quite an elegant solu= tion,
and more fitting with a functional style.

<= /div>
This is interes= ting. As far as I can tell, it should be possible to implement this as a ba= ckend without any modifications to module signatures.=C2=A0

Now of course comes the question Cryptokit or nocrypto :)

That decision,= for better or worse, has already been made by ocaml-session: it uses nocry= pto to generate session keys.

-Spiros= E.
--001a11c261ace2167e05272ebf80--