@hackage wai-secure-cookies0.1.0.8

WAI middleware to automatically encrypt and sign cookies

  • Installation

  • Dependencies (9)

  • Dependents (0)

  • Package Flags

      cryptonite
       (off by default)

      Enable use of cryptonite, instead of crypton fork

wai-secure-cookies

I extracted a WAI middleware to automatically encrypt and sign cookies.


WARNING

I am not a cryptographer, and the crypto libraries in Haskell are not nearly as easy to use as what I'm used to in Ruby, so I wouldn't depend on this for a serious project until it's had some proper eyes on it.


Usage

Populate the following environment variables in your WAI application process:

WAI_COOKIE_VALIDATION_KEY # key to sign cookie names and values
WAI_COOKIE_ENCRYPTION_KEY # key to encrypt cookie names and values

You can generate random keys with waicookie-genkey:

waicookie-genkey <key type> ...
key types: encryption
           validation