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 mail2-relais-roc.national.inria.fr (mail2-relais-roc.national.inria.fr [192.134.164.83]) by sympa.inria.fr (Postfix) with ESMTPS id 21B9F7EF29 for ; Fri, 18 Dec 2015 16:55:08 +0100 (CET) IronPort-PHdr: 9a23:FsyofhakBybXVcW9p2/wg5z/LSx+4OfEezUN459isYplN5qZpc+/bnLW6fgltlLVR4KTs6sC0LqI9fi4EUU7or+/81k6OKRWUBEEjchE1ycBO+WiTXPBEfjxciYhF95DXlI2t1uyMExSBdqsLwaK+i760zceF13FOBZvIaytQ8iJ35rxj7j60qaQSjsLrQL1Wal1IhSyoFeZnegtqqwmFJwMzADUqGBDYeVcyDAgD1uSmxHh+pX4p8Y7oGwD884mosVJVKG/e6UjUZRZCi4nOiY7/p7Frx7GGDcR/OUfGkgajRtOS1zI4A77WNT0tm79veN43AGXIcrsSrNyXzm+ufQ4ACT0gTsKYmZquFrcjdZ92fpW Authentication-Results: mail2-smtp-roc.national.inria.fr; spf=None smtp.pra=edwin+ml-ocaml@etorok.net; spf=Pass smtp.mailfrom=edwin+ml-ocaml@etorok.net; spf=None smtp.helo=postmaster@mail.etorok.net Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of edwin+ml-ocaml@etorok.net) identity=pra; client-ip=62.210.252.135; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="edwin+ml-ocaml@etorok.net"; x-sender="edwin+ml-ocaml@etorok.net"; x-conformance=sidf_compatible Received-SPF: Pass (mail2-smtp-roc.national.inria.fr: domain of edwin+ml-ocaml@etorok.net designates 62.210.252.135 as permitted sender) identity=mailfrom; client-ip=62.210.252.135; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="edwin+ml-ocaml@etorok.net"; x-sender="edwin+ml-ocaml@etorok.net"; x-conformance=sidf_compatible; x-record-type="v=spf1" Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of postmaster@mail.etorok.net) identity=helo; client-ip=62.210.252.135; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="edwin+ml-ocaml@etorok.net"; x-sender="postmaster@mail.etorok.net"; x-conformance=sidf_compatible X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A0CJBgB2K3RW/4f80j5eAYM5Um2Ca7xbIYVpAQICgTo7EQEBAQEBAQEBgQmCLYIHAQEBAwEMFw8BDRUjAgEOCQIYAgIFEwMLAgIJAwIBAgFFEwgCF4gMDAqOIpxFcYRpjS0BBoEBilOEQgJjglCBSZMNg3eFO4gPgVxJlxCDdDgshAY8NAGDRoFKAQEB X-IPAS-Result: A0CJBgB2K3RW/4f80j5eAYM5Um2Ca7xbIYVpAQICgTo7EQEBAQEBAQEBgQmCLYIHAQEBAwEMFw8BDRUjAgEOCQIYAgIFEwMLAgIJAwIBAgFFEwgCF4gMDAqOIpxFcYRpjS0BBoEBilOEQgJjglCBSZMNg3eFO4gPgVxJlxCDdDgshAY8NAGDRoFKAQEB X-IronPort-AV: E=Sophos;i="5.20,446,1444687200"; d="scan'208";a="193009347" Received: from mail.etorok.net ([62.210.252.135]) by mail2-smtp-roc.national.inria.fr with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 18 Dec 2015 16:55:07 +0100 Received: by mail.etorok.net (OpenSMTPD) with ESMTP id f9570487 for ; Fri, 18 Dec 2015 15:55:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha1; c=simple; d=etorok.net; h=from:subject :to:references:message-id:date:mime-version:in-reply-to :content-type:content-transfer-encoding; s=ml; bh=I61dHKQ2brhaU8 S0Avb/ECGEeck=; b=QK4nFrrqrghfkk9dLnmz5wCGM2l8Xmd0B0C+kf6L7ra2ai E7OtooKcYP6ioFDMlyfCTBI+jBzuQLUTUlh9IjnEUw/LqjWwTXaQEggyGpRQ7eHG pkeewd0c+pcUHRdtLSDXAZQJi68ntRpFiYV6dTT4m6k3h2auqiiqpf8/JY4po= DomainKey-Signature: a=rsa-sha1; c=simple; d=etorok.net; h=from:subject :to:references:message-id:date:mime-version:in-reply-to :content-type:content-transfer-encoding; q=dns; s=ml; b=nxUzmAE5 vJ2EZWIPKkO1KsvkQLozZR4/VJPPHRTFxmv5dgW6Hve3ALh1cRIvsRLsavA2qkIz xNZXRpubSNTpNrG6Y1rHyU2O6aTdwb8iW4LXppa3F4g0+sfyCOLEB8ABAkyrWmNN sItaXuvwCuOY/XpnPUraNGN3Mu4REBgm+yk= Received: by mail.etorok.net (OpenSMTPD) with ESMTPSA id 3d0dee3b TLS version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NO for ; Fri, 18 Dec 2015 15:55:06 +0000 (UTC) From: =?UTF-8?B?VMO2csO2ayBFZHdpbg==?= To: caml-list@inria.fr References: Message-ID: <56742C6F.4060905@etorok.net> Date: Fri, 18 Dec 2015 17:55:27 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Icedove/38.4.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Subject: Re: [Caml-list] ANN: ocaml-session On 12/17/2015 08:51 PM, Spiros Eliopoulos wrote: > Hey List, > > I'm happy to announce the initial release of ocaml-session: > > https://github.com/inhabitedtype/ocaml-session > > ocaml-session is an session manager that handles cookie headers and backend storage for HTTP servers. The library supports CoHTTP and Webmachine; Async and Lwt; and pluggable backing stores based on a functor interface. Nice! > > 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. Now of course comes the question Cryptokit or nocrypto :) [1] http://werkzeug.pocoo.org/docs/0.11/contrib/securecookie/ [2] https://docs.djangoproject.com/en/1.9/topics/http/sessions/ [3] http://pythonhosted.org/itsdangerous/ -- Edwin Török | Co-founder and Lead Developer Skylable open-source object storage: reliable, fast, secure http://www.skylable.com