-
Notifications
You must be signed in to change notification settings - Fork 72
support encrypted sessions #68
Comments
This shouldn't be hard to implement (and thus reach feature parity with servant-auth-cookie) by using JWT already standard algorithm JWE: https://hackage.haskell.org/package/jose-0.7.0.0/docs/Crypto-JOSE-JWE.html |
Hi, I have an application that is currently using @domenkozar It looks like the |
@tmbull ah, totally missed that. You probably meant frasertweedale/hs-jose#8. I think most of servant-auth machinery works with |
@domenkozar You are correct. Looks like I miss-typed the issue number. My apologies. I looked into the |
are there any update on this by any chance ? |
Not much it seems. |
I'd love to contribute a solution for this issue to tie us over until the I'm aware that's an additional dependency though, so that's a downside. Would you open to a PR taking this direction? |
@jwoudenberg do you think encryption of the JWT could be servant-auth api that servant-auth-cookie-encrypt would be one possible implementation? |
Hey @domenkozar, I'm afraid I don't follow completely. Do you mean |
@jwoudenberg I'm not 100% familiar with the code, but in general we want to go in direction of #151. Ideally cookie contents should be abstracted away, while JWT+JWE being a possible implementation. That being said, if you come up with a simpler design that makes encryption optional, I wouldn't be opposed merging it. |
I'm working on a so far relatively simple application that stores some sensitive data in an encrypted cookie using servant's experimental general authentication. I'd love to switch to servant-auth as Servant's new default, but am missing the functionality to encrypt session data.
One approach might be to encrypt session payloads for cookies with a
HttpOnly
flag by default. If the cookie is not meant to be inspected by client side code its content might as well be encrypted to hide it from malicious browser extensions and other potential attackers as well. Such an approach would not entail any loss of functionality as far as I can see, while eliminating a potential error on the side of the library user.I'm looking forward on others' thoughts on this.
The text was updated successfully, but these errors were encountered: