unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Mathieu Lirzin <mthl@gnu.org>
To: "pelzflorian (Florian Pelz)" <pelzflorian@pelzflorian.de>
Cc: guix-devel@gnu.org
Subject: Re: [GSoC] Development of Cuirass.
Date: Mon, 20 Mar 2017 23:05:43 +0100	[thread overview]
Message-ID: <87lgrzy56w.fsf@gnu.org> (raw)
In-Reply-To: <bc8747c8-875c-fb63-b301-de4edef1a974@pelzflorian.de> (pelzflorian@pelzflorian.de's message of "Mon, 13 Mar 2017 00:45:00 +0100")

"pelzflorian (Florian Pelz)" <pelzflorian@pelzflorian.de> writes:

> On 03/12/2017 07:41 PM, Mathieu Lirzin wrote:
>> Hello Florian,
>> 
>> "pelzflorian (Florian Pelz)" <pelzflorian@pelzflorian.de> writes:
>> 
>>> On 03/12/2017 03:49 PM, Mathieu Lirzin wrote:
>>>> Sensitive requests should be done with an
>>>>   authentification mechanism which is not determined yet.  I currently
>>>>   have no experience with any and lack the knowledge to properly choose
>>>>   one.
>>>
>>> I’m new to Guix and Scheme and no expert in Web programming, but in
>>> order to prevent CSRF and in order not to rely on JavaScript, the server
>>> should run with HTTPS (of course) and
>>> · use a secret session token and
>>> · send a customized Web page to the client adapted so that each link and
>>> form to the server includes the session token as a GET or POST parameter.
>>>
>>> An alternative is Basic Access Authentication with HTTPS or Cookies with
>>> HTTPS but they are vulnerable to CSRF.
>>>
>>> See stackoverflow, for example
>>>
>>> https://stackoverflow.com/questions/21357182/csrf-token-necessary-when-using-stateless-sessionless-authentication
>> 
>> Thanks for your input.
>> 
>> Have you any experience/advice regarding OAuth or Json Web Token (JWT) ?
>> 
>
> Sorry, I have no experience with these. I think I’ve basically
> understood what OAuth is for after reading the OSM wiki, [1] but I’m not
> sure what you want to use it for.
>
> I assume the following scenario:
>
>
> The user wants to log in.
>
> · The Cuirass Web server would receive the log-in credentials as POST
> parameters from an HTML form.
>
> · Now it needs to check whether the password is correct, e.g. by looking
> up the salt stored for the supplied username, computing the bcrypt hash
> of the supplied password and stored salt and comparing it to the stored
> bcrypt hash for the user name.    ← This requires Cuirass to store a
> table containing user names, salts and bcrypt hashes. Do you intend to
> use some OAuth / OpenID / whatever thing to outsource the log-in
> management to an “identity provider”? I presume you don’t.
>
> · You generate a secret session token shared between server and client
> which you
>   — embed in each link and in each form you send to the client as part
> of the session and
>   — can verify the session token on the server.    ← I did not know
> about JWT, but from a first glance it seems very appropriate for this
> use. Instead of storing on the server which sessions are still active,
> the token stores all information about the log-in and its content is
> encrypted with the server’s secret key. This seems like a great idea,
> also there maybe is (or should be) a library to manage JWT. I learned
> something today. :)

I need to do my homework before being able to go further in this
discussion.  Thanks for you analysis.

-- 
Mathieu Lirzin
GPG: F2A3 8D7E EB2B 6640 5761  070D 0ADE E100 9460 4D37

  reply	other threads:[~2017-03-20 22:05 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-12 14:49 [GSoC] Development of Cuirass Mathieu Lirzin
2017-03-12 15:18 ` pelzflorian (Florian Pelz)
2017-03-12 18:41   ` Mathieu Lirzin
2017-03-12 23:45     ` pelzflorian (Florian Pelz)
2017-03-20 22:05       ` Mathieu Lirzin [this message]
2017-03-13  8:49 ` Ludovic Courtès
2017-03-20 22:43   ` Mathieu Lirzin
2017-03-13 10:32 ` Andy Wingo
2017-03-20 22:47   ` Mathieu Lirzin
2017-03-13 19:17 ` Efraim Flashner
2017-03-21 14:31 ` Mathieu Lirzin
2017-03-21 14:40   ` Ludovic Courtès
2017-03-21 16:54   ` Jan Nieuwenhuizen
2017-03-21 17:25   ` Tobias Geerinckx-Rice
2017-03-21 18:55   ` Leo Famulari
2017-03-22 16:11   ` Ricardo Wurmus

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87lgrzy56w.fsf@gnu.org \
    --to=mthl@gnu.org \
    --cc=guix-devel@gnu.org \
    --cc=pelzflorian@pelzflorian.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).