Re: [PATCH] Pull general SASL framework out of SCRAM

From: Jacob Champion <pchampion(at)vmware(dot)com>
To: "michael(at)paquier(dot)xyz" <michael(at)paquier(dot)xyz>
Cc: "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [PATCH] Pull general SASL framework out of SCRAM
Date: 2021-07-07 15:07:14
Message-ID: 5cf3c71d51a215d4103abcc686c69e79619e7b60.camel@vmware.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, 2021-07-07 at 14:08 +0900, Michael Paquier wrote:
> On Tue, Jul 06, 2021 at 06:20:49PM +0000, Jacob Champion wrote:
> > On Mon, 2021-07-05 at 17:17 +0900, Michael Paquier wrote:
> >
> > > Hmm. Does the RFCs tell us anything about that?
> >
> > Just in general terms:
> >
> > > Each authentication exchange consists of a message from the client to
> > > the server requesting authentication via a particular mechanism,
> > > followed by one or more pairs of challenges from the server and
> > > responses from the client, followed by a message from the server
> > > indicating the outcome of the authentication exchange. (Note:
> > > exchanges may also be aborted as discussed in Section 3.5.)
> >
> > So a challenge must be met with a response, or the exchange must be
> > aborted. (And I don't think our protocol implementation provides a
> > client abort message; if something goes wrong, we just tear down the
> > connection.)
>
> Thanks. At the same time, section 3.5 also says that the client may
> send a message to abort. So one can interpret that the client has
> also the choice to abort without sending a response back to the
> server? Or I am just interpreting incorrectly the use of "may" in
> this context?

That's correct. But the client may not simply ignore the challenge and
keep the exchange open waiting for a new one, as pg_SASL_continue()
currently allows. That's what my TODO is referring to.

--Jacob

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Boris Kolpackov 2021-07-07 15:09:41 Re: Pipeline mode and PQpipelineSync()
Previous Message Jacob Champion 2021-07-07 14:57:53 Re: [PATCH] Make jsonapi usable from libpq