Rocksolid Light

Welcome to novaBBS (click a section below)

mail  files  register  newsreader  groups  login

Message-ID:  

Natural laws have no pity.


devel / comp.lang.python / Re: basic auth request

SubjectAuthor
* Re: basic auth requestBarry
`* Re: basic auth requestJon Ribbens
 +* Re: basic auth requestRobin Becker
 |+* Re: basic auth requestJon Ribbens
 ||+- Re: basic auth requestMartin Di Paola
 ||+- Re: basic auth requestChris Angelico
 ||+- Re: basic auth requestPeter J. Holzer
 ||+- Re: basic auth requestChris Angelico
 ||+- Re: basic auth requestBarry Scott
 ||`- Re: basic auth requestPeter J. Holzer
 |`- Re: basic auth requestChris Angelico
 +* Re: basic auth requestChris Angelico
 |`* Re: basic auth requestJon Ribbens
 | `* Re: basic auth requestChris Angelico
 |  `* Re: basic auth requestJon Ribbens
 |   +* Re: basic auth requestChris Angelico
 |   |`- Re: basic auth requestJon Ribbens
 |   `* Re: basic auth requestEli the Bearded
 |    +* Re: basic auth requestJon Ribbens
 |    |`- Re: basic auth requestEli the Bearded
 |    `* Re: basic auth requestBarry
 |     `- Re: basic auth requestEli the Bearded
 `- Re: basic auth requestBarry Scott

1
Re: basic auth request

<mailman.423.1629234918.4164.python-list@python.org>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=14652&group=comp.lang.python#14652

  copy link   Newsgroups: comp.lang.python
Path: i2pn2.org!i2pn.org!news.swapon.de!fu-berlin.de!uni-berlin.de!not-for-mail
From: bar...@barrys-emacs.org (Barry)
Newsgroups: comp.lang.python
Subject: Re: basic auth request
Date: Tue, 17 Aug 2021 22:15:09 +0100
Lines: 28
Message-ID: <mailman.423.1629234918.4164.python-list@python.org>
References: <CAPTjJmo0d_t3XG6KH++XhkStB5GyyFbtv=4Sj3tQXM_Sn-E5zA@mail.gmail.com>
<54465DA0-2977-4EAD-8CD2-C398F5ACF121@barrys-emacs.org>
Mime-Version: 1.0 (1.0)
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Trace: news.uni-berlin.de ULDkfW51W2F5JdCicP67mQJZ7v5hpeF+Ri2v1xZatBbA==
Return-Path: <barry@barrys-emacs.org>
X-Original-To: python-list@python.org
Delivered-To: python-list@mail.python.org
Authentication-Results: mail.python.org; dkim=none reason="no signature";
dkim-adsp=none (unprotected policy); dkim-atps=neutral
X-Spam-Status: OK 0.000
X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'url:mailman': 0.09; '18,':
0.09; 'alternative': 0.09; 'angelico': 0.09; 'aug': 0.09; 'auth':
0.09; 'barry': 0.09; 'cc:addr:python-list': 0.09;
'from:addr:barry': 0.09; 'other.': 0.09; 'received:217.70': 0.09;
'received:217.70.178': 0.09; 'received:217.70.178.230': 0.09;
'received:gandi.net': 0.09; 'received:mail.gandi.net': 0.09;
'received:relay10.mail.gandi.net': 0.09; '4:16': 0.16; 'auth,':
0.16; 'cc:name:python': 0.16; 'chrisa': 0.16; 'from:addr:barrys-
emacs.org': 0.16; 'message-id:@barrys-emacs.org': 0.16; 'serving':
0.16; 'tls': 0.16; 'wrote:': 0.16; 'url:listinfo': 0.16;
'cc:addr:python.org': 0.19; 'url-ip:188.166.95.178/32': 0.20;
'url-ip:188.166.95/24': 0.20; 'url-ip:188.166/16': 0.23; 'chris':
0.26; 'cc:2**0': 0.27; 'url-ip:188/8': 0.29; "isn't": 0.29;
'subject:request': 0.29; 'there': 0.31; 'but': 0.31; 'header:In-
Reply-To:1': 0.33; 'one.': 0.35; "that's": 0.37; 'really': 0.37;
"it's": 0.38; 'all.': 0.40; 'likely': 0.61; 'security': 0.64;
'received:217': 0.68; 'exactly': 0.69; '2021': 0.84; 'encrypted,':
0.84; 'irrelevant,': 0.84; 'scott': 0.84; 'body.': 0.91;
'secure.': 0.91
In-Reply-To: <CAPTjJmo0d_t3XG6KH++XhkStB5GyyFbtv=4Sj3tQXM_Sn-E5zA@mail.gmail.com>
X-Mailer: iPad Mail (18G82)
X-BeenThere: python-list@python.org
X-Mailman-Version: 2.1.34
Precedence: list
List-Id: General discussion list for the Python programming language
<python-list.python.org>
List-Unsubscribe: <https://mail.python.org/mailman/options/python-list>,
<mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive: <https://mail.python.org/pipermail/python-list/>
List-Post: <mailto:python-list@python.org>
List-Help: <mailto:python-list-request@python.org?subject=help>
List-Subscribe: <https://mail.python.org/mailman/listinfo/python-list>,
<mailto:python-list-request@python.org?subject=subscribe>
X-Mailman-Original-Message-ID: <54465DA0-2977-4EAD-8CD2-C398F5ACF121@barrys-emacs.org>
X-Mailman-Original-References: <CAPTjJmo0d_t3XG6KH++XhkStB5GyyFbtv=4Sj3tQXM_Sn-E5zA@mail.gmail.com>
 by: Barry - Tue, 17 Aug 2021 21:15 UTC

> On 17 Aug 2021, at 19:25, Chris Angelico <rosuav@gmail.com> wrote:
>
> On Wed, Aug 18, 2021 at 4:16 AM Barry Scott <barry@barrys-emacs.org> wrote:
>> Oh and if you have the freedom avoid Basic Auth as its not secure at all.
>>
>
> That's usually irrelevant, since the alternative is most likely to be
> form fill-out, which is exactly as secure. If you're serving over
> HTTPS, the page is encrypted, and that includes the headers; if you're
> not, then it's not encrypted, and that includes the form body.

There is digest and Ntlm that do not reveal the password.

If you are over TLS then form or base is as good as each other.

Barry
>
> There are other issues with basic auth, but security really isn't one.
>
> ChrisA
> --
> https://mail.python.org/mailman/listinfo/python-list
>

Re: basic auth request

<slrnshobjl.49p.jon+usenet@raven.unequivocal.eu>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=14654&group=comp.lang.python#14654

  copy link   Newsgroups: comp.lang.python
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: jon+use...@unequivocal.eu (Jon Ribbens)
Newsgroups: comp.lang.python
Subject: Re: basic auth request
Date: Tue, 17 Aug 2021 21:47:33 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 11
Message-ID: <slrnshobjl.49p.jon+usenet@raven.unequivocal.eu>
References: <CAPTjJmo0d_t3XG6KH++XhkStB5GyyFbtv=4Sj3tQXM_Sn-E5zA@mail.gmail.com>
<54465DA0-2977-4EAD-8CD2-C398F5ACF121@barrys-emacs.org>
<mailman.423.1629234918.4164.python-list@python.org>
Injection-Date: Tue, 17 Aug 2021 21:47:33 -0000 (UTC)
Injection-Info: reader02.eternal-september.org; posting-host="03b97ab46d2e58297ed871bedff0fc10";
logging-data="2778"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19Wd17aSsnGPdk7cdPtyZhjYstW6FOr0AI="
User-Agent: slrn/1.0.3 (Linux)
Cancel-Lock: sha1:7+CHlPYvIdYPPr1vMSoBdfp+fdU=
 by: Jon Ribbens - Tue, 17 Aug 2021 21:47 UTC

On 2021-08-17, Barry <barry@barrys-emacs.org> wrote:
>> That's usually irrelevant, since the alternative is most likely to be
>> form fill-out, which is exactly as secure. If you're serving over
>> HTTPS, the page is encrypted, and that includes the headers; if you're
>> not, then it's not encrypted, and that includes the form body.
>
> There is digest and Ntlm that do not reveal the password.

That's only true if you're not using HTTPS - and you should *never*
not be using HTTPS, and that goes double if forms are being filled
in and double again if passwords are being supplied.

Re: basic auth request

<mailman.428.1629309989.4164.python-list@python.org>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=14660&group=comp.lang.python#14660

  copy link   Newsgroups: comp.lang.python
Path: i2pn2.org!i2pn.org!news.swapon.de!fu-berlin.de!uni-berlin.de!not-for-mail
From: rob...@reportlab.com (Robin Becker)
Newsgroups: comp.lang.python
Subject: Re: basic auth request
Date: Wed, 18 Aug 2021 08:36:41 +0100
Lines: 19
Message-ID: <mailman.428.1629309989.4164.python-list@python.org>
References: <CAPTjJmo0d_t3XG6KH++XhkStB5GyyFbtv=4Sj3tQXM_Sn-E5zA@mail.gmail.com>
<54465DA0-2977-4EAD-8CD2-C398F5ACF121@barrys-emacs.org>
<mailman.423.1629234918.4164.python-list@python.org>
<slrnshobjl.49p.jon+usenet@raven.unequivocal.eu>
<9bc605cb-2ceb-fed9-cd3f-d48a8fe405fb@everest.reportlab.co.uk>
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 7bit
X-Trace: news.uni-berlin.de 2VMg+DPdzb3z6Js0BEuEFgAkfBbcePI/RH3AqG5wL2uw==
Return-Path: <python-python-list@m.gmane-mx.org>
X-Original-To: python-list@python.org
Delivered-To: python-list@mail.python.org
Authentication-Results: mail.python.org; dkim=none reason="no signature";
dkim-adsp=none (unprotected policy); dkim-atps=neutral
X-Spam-Status: OK 0.004
X-Spam-Evidence: '*H*': 0.99; '*S*': 0.00; 'bunch': 0.05; 'auth':
0.09; 'filled': 0.09; 'passwords': 0.09; 'received:ciao.gmane.io':
0.09; 'received:gmane.io': 0.09; 'received:list': 0.09; 'rfc':
0.09; 'becker': 0.16; 'charset': 0.16; 'https': 0.16;
'received:116.202': 0.16; 'received:116.202.254': 0.16;
'received:116.202.254.214': 0.16; 'robin': 0.16; 'wrote:': 0.16;
'goes': 0.22; 'to:addr:python-list': 0.23; 'seems': 0.26; 'old':
0.28; 'requests': 0.29; 'subject:request': 0.29; 'header:User-
Agent:1': 0.31; 'there': 0.31; 'think': 0.31; 'code,': 0.31;
'seem': 0.31; 'but': 0.31; 'python-list': 0.32; 'using': 0.33;
'header:In-Reply-To:1': 0.33; 'setting': 0.34; 'complex': 0.35;
'understood': 0.35; 'way': 0.37; "that's": 0.37; 'package': 0.40;
'down': 0.62; 'true': 0.63; 'required': 0.66; 'net': 0.69;
'received:116': 0.71; 'jon': 0.84; 'supplied.': 0.84
X-Injected-Via-Gmane: http://gmane.org/
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101
Thunderbird/78.13.0
In-Reply-To: <slrnshobjl.49p.jon+usenet@raven.unequivocal.eu>
Content-Language: en-US-large
X-Mailman-Approved-At: Wed, 18 Aug 2021 14:06:28 -0400
X-BeenThere: python-list@python.org
X-Mailman-Version: 2.1.34
Precedence: list
List-Id: General discussion list for the Python programming language
<python-list.python.org>
List-Unsubscribe: <https://mail.python.org/mailman/options/python-list>,
<mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive: <https://mail.python.org/pipermail/python-list/>
List-Post: <mailto:python-list@python.org>
List-Help: <mailto:python-list-request@python.org?subject=help>
List-Subscribe: <https://mail.python.org/mailman/listinfo/python-list>,
<mailto:python-list-request@python.org?subject=subscribe>
X-Mailman-Original-Message-ID: <9bc605cb-2ceb-fed9-cd3f-d48a8fe405fb@everest.reportlab.co.uk>
X-Mailman-Original-References: <CAPTjJmo0d_t3XG6KH++XhkStB5GyyFbtv=4Sj3tQXM_Sn-E5zA@mail.gmail.com>
<54465DA0-2977-4EAD-8CD2-C398F5ACF121@barrys-emacs.org>
<mailman.423.1629234918.4164.python-list@python.org>
<slrnshobjl.49p.jon+usenet@raven.unequivocal.eu>
 by: Robin Becker - Wed, 18 Aug 2021 07:36 UTC

On 17/08/2021 22:47, Jon Ribbens via Python-list wrote:
........
> That's only true if you're not using HTTPS - and you should *never*
> not be using HTTPS, and that goes double if forms are being filled
> in and double again if passwords are being supplied.
>

I think I agree with most of the replies; I understood from reading the rfc that the charset is utf8 (presumably without
':') and that basic auth is considered insecure. It is being used over https so should avoid the simplest net scanning.

I googled a bunch of ways to do this, but many come down to 1) using the requests package or 2) setting up an opener.
Both of these seem to be much more complex than is required to add the header.

I thought there might be a shortcut or more elegant way to replace the old code, but it seems not

thanks
--
Robin Becker

Re: basic auth request

<slrnshr4ia.78u.jon+usenet@raven.unequivocal.eu>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=14666&group=comp.lang.python#14666

  copy link   Newsgroups: comp.lang.python
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: jon+use...@unequivocal.eu (Jon Ribbens)
Newsgroups: comp.lang.python
Subject: Re: basic auth request
Date: Wed, 18 Aug 2021 23:05:46 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 29
Message-ID: <slrnshr4ia.78u.jon+usenet@raven.unequivocal.eu>
References: <CAPTjJmo0d_t3XG6KH++XhkStB5GyyFbtv=4Sj3tQXM_Sn-E5zA@mail.gmail.com>
<54465DA0-2977-4EAD-8CD2-C398F5ACF121@barrys-emacs.org>
<mailman.423.1629234918.4164.python-list@python.org>
<slrnshobjl.49p.jon+usenet@raven.unequivocal.eu>
<9bc605cb-2ceb-fed9-cd3f-d48a8fe405fb@everest.reportlab.co.uk>
<mailman.428.1629309989.4164.python-list@python.org>
Injection-Date: Wed, 18 Aug 2021 23:05:46 -0000 (UTC)
Injection-Info: reader02.eternal-september.org; posting-host="8f127d201d2c5dbe8f50cc13abbb1d67";
logging-data="13420"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/W0pOMUiFoYQ+8Ouj/Ii/3gjw0kDMNE+4="
User-Agent: slrn/1.0.3 (Linux)
Cancel-Lock: sha1:Vo9t+FnBaPux9zndqyXqZneVn1U=
 by: Jon Ribbens - Wed, 18 Aug 2021 23:05 UTC

On 2021-08-18, Robin Becker <robin@reportlab.com> wrote:
> On 17/08/2021 22:47, Jon Ribbens via Python-list wrote:
> .......
>> That's only true if you're not using HTTPS - and you should *never*
>> not be using HTTPS, and that goes double if forms are being filled
>> in and double again if passwords are being supplied.
>
> I think I agree with most of the replies; I understood from reading
> the rfc that the charset is utf8 (presumably without ':')

The username can't contain a ':'. It shouldn't matter in the password.

> and that basic auth is considered insecure. It is being used over
> https so should avoid the simplest net scanning.

It's not insecure over HTTPS. Bear in mind the Basic Auth RFC was
written when HTTP was the standard and HTTPS was unusual. The positions
are now effectively reversed.

> I googled a bunch of ways to do this, but many come down to 1) using
> the requests package or 2) setting up an opener. Both of these seem to
> be much more complex than is required to add the header.
>
> I thought there might be a shortcut or more elegant way to replace the
> old code, but it seems not

It's only a trivial str/bytes difference, it shouldn't be any big deal.
But using 'requests' instead is likely to simplify things and doesn't
tend to be an onerous dependency.

Re: basic auth request

<mailman.438.1629572059.4164.python-list@python.org>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=14698&group=comp.lang.python#14698

  copy link   Newsgroups: comp.lang.python
Path: i2pn2.org!i2pn.org!news.swapon.de!fu-berlin.de!uni-berlin.de!not-for-mail
From: martinp....@gmail.com (Martin Di Paola)
Newsgroups: comp.lang.python
Subject: Re: basic auth request
Date: Sat, 21 Aug 2021 18:54:11 +0000
Lines: 51
Message-ID: <mailman.438.1629572059.4164.python-list@python.org>
References: <CAPTjJmo0d_t3XG6KH++XhkStB5GyyFbtv=4Sj3tQXM_Sn-E5zA@mail.gmail.com>
<54465DA0-2977-4EAD-8CD2-C398F5ACF121@barrys-emacs.org>
<mailman.423.1629234918.4164.python-list@python.org>
<slrnshobjl.49p.jon+usenet@raven.unequivocal.eu>
<9bc605cb-2ceb-fed9-cd3f-d48a8fe405fb@everest.reportlab.co.uk>
<mailman.428.1629309989.4164.python-list@python.org>
<slrnshr4ia.78u.jon+usenet@raven.unequivocal.eu>
<20210821185411.ka66xkawv6mbpska@gmail.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii; format=flowed
X-Trace: news.uni-berlin.de hNnZC2OYQe+l98BIm/5LiQEH0oxUBXe7ZAwxGrNaJX4w==
Return-Path: <martinp.dipaola@gmail.com>
X-Original-To: python-list@python.org
Delivered-To: python-list@mail.python.org
Authentication-Results: mail.python.org; dkim=pass
reason="2048-bit key; unprotected key"
header.d=gmail.com header.i=@gmail.com header.b=U3JJ8M7u;
dkim-adsp=pass; dkim-atps=neutral
X-Spam-Status: OK 0.001
X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'bunch': 0.05; 'http':
0.07; 'url:mailman': 0.09; '*not*': 0.09; '18,': 0.09; 'aug':
0.09; 'auth': 0.09; 'effectively': 0.09; 'filled': 0.09;
'passwords': 0.09; 'rfc': 0.09; "shouldn't": 0.09; 'trivial':
0.09; "can't": 0.14; 'becker': 0.16; 'captured': 0.16; 'charset':
0.16; 'compromised': 0.16; 'difference,': 0.16; 'encryption':
0.16; 'ensures': 0.16; 'https': 0.16; 'mechanisms': 0.16; 'robin':
0.16; 'threat': 0.16; 'unusual.': 0.16; 'wrote:': 0.16;
'url:listinfo': 0.16; 'instead': 0.17; 'message-id:@gmail.com':
0.19; 'url-ip:188.166.95.178/32': 0.20; 'url-ip:188.166.95/24':
0.20; 'goes': 0.22; 'url-ip:188.166/16': 0.23; 'to:addr:python-
list': 0.23; '>>>': 0.26; 'depends': 0.26; 'seems': 0.26; 'old':
0.28; 'url-ip:188/8': 0.29; 'requests': 0.29; 'subject:request':
0.29; 'there': 0.31; 'think': 0.31; 'code,': 0.31; 'seem': 0.31;
'but': 0.31; 'thanks,': 0.31; "doesn't": 0.32; 'python-list':
0.32; 'using': 0.33; 'header:In-Reply-To:1': 0.33; 'setting':
0.34; 'received:google.com': 0.34; 'well,': 0.35; 'complex': 0.35;
'understood': 0.35; 'from:addr:gmail.com': 0.35; 'way': 0.37;
"that's": 0.37; 'received:209.85': 0.38; 'received:209.85.210':
0.38; 'received:209': 0.38; 'package': 0.40; 'external': 0.61;
'likely': 0.61; 'down': 0.62; 'true': 0.63; 'your': 0.64;
'username': 0.65; 'required': 0.66; 'matter': 0.69; 'content,':
0.69; 'net': 0.69; 'positions': 0.75; 'bear': 0.77; '2021': 0.84;
'absolutely': 0.84; 'jon': 0.84; 'password,': 0.84; 'supplied.':
0.84; 'secret': 0.95
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
h=date:from:to:subject:message-id:mail-followup-to:'user-agent
:references:mime-version:content-disposition:in-reply-to;
bh=a46a6xBvpBsBGjaDUULlNvoiSEzR7KJY9yxDu/Ig6dw=;
b=U3JJ8M7uCEUkB/TxMCChgqzwZOx9WhAXVs8qP6sMX5KtwzFPqI+Tuil1DJohWVSJoT
iq3euG8EmHEF69/rwoRnbicvVQ7kEIy0nEt6BfCEuCclzTZfh1oL27vgwrXRs3du7DZu
qW4kxMESMMUouS4wVfCRKlOT68KCLfDfffKM6nyXx/kq912vSTh64sfTGE6QrZ6+XQns
KztIoYDmJ3Yn6SF9Obhik4qsXto2P2BfwobA76eyXG2yvMt2pwp1QFXESEFvpdyxomcT
gIzluhQXfPEax73zRPwZih0/i73MX7Z10lg7tX6Hr3M6PCYAheBv7fC/TALRYiNojG7F
2PCA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20161025;
h=x-gm-message-state:date:from:to:subject:message-id:mail-followup-to
:'user-agent:references:mime-version:content-disposition:in-reply-to;
bh=a46a6xBvpBsBGjaDUULlNvoiSEzR7KJY9yxDu/Ig6dw=;
b=U+TAf6yChjkGmKnDJwsz8QC3aPqFq7HU0yhuijJ9yBQbgfe1iKQhnMAg845W9vKuWl
p06SYknI8CxvJ/8Ig48pOC72P7dsYSeeC8Z7wOwTw6pPVUrK6damsvdaqoiBXimwQInD
+Vzb42QOAOWppvGxTJKpFa/YYx4eIcJ+HWHVNZQZ7DoXTZWFn1yjUuUFjy3tKaoYLlK4
aDlp9oDbKzX3qBeXIFIRAB0I/FXajyIYOv0j4kDQGC1WtgNfEHy9I4noPEWJlEbq8z2d
KAWHf9x6ParBDBhigs1/+NlAWtOklnMcyrGdGruXopYXdUv0ywsNsU2NvFeZ8T8Guli7
nISQ==
X-Gm-Message-State: AOAM532zNS0ElzX2TZq3oTt/3liyiAdT7mEdD0K1/PQtdJiGGV4b2d5B
wp+YDCJITlDnQwgVjH3K9Er2mZ4O9aYXKw==
X-Google-Smtp-Source: ABdhPJyu0cEoCrzKnm71V6sAgC6PQGniSxBHwt2Gom8xT/c0EHguWTRhIPTRzmu4W1Vlrri5NmBZyA==
X-Received: by 2002:a62:ae11:0:b029:3e0:71dc:70fa with SMTP id
q17-20020a62ae110000b02903e071dc70famr26060818pff.50.1629572057119;
Sat, 21 Aug 2021 11:54:17 -0700 (PDT)
Mail-Followup-To: python-list@python.org
'User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101
Thunderbird/52.5.2 Lightning/5.4.5.2'
Content-Disposition: inline
In-Reply-To: <slrnshr4ia.78u.jon+usenet@raven.unequivocal.eu>
X-BeenThere: python-list@python.org
X-Mailman-Version: 2.1.34
Precedence: list
List-Id: General discussion list for the Python programming language
<python-list.python.org>
List-Unsubscribe: <https://mail.python.org/mailman/options/python-list>,
<mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive: <https://mail.python.org/pipermail/python-list/>
List-Post: <mailto:python-list@python.org>
List-Help: <mailto:python-list-request@python.org?subject=help>
List-Subscribe: <https://mail.python.org/mailman/listinfo/python-list>,
<mailto:python-list-request@python.org?subject=subscribe>
X-Mailman-Original-Message-ID: <20210821185411.ka66xkawv6mbpska@gmail.com>
X-Mailman-Original-References: <CAPTjJmo0d_t3XG6KH++XhkStB5GyyFbtv=4Sj3tQXM_Sn-E5zA@mail.gmail.com>
<54465DA0-2977-4EAD-8CD2-C398F5ACF121@barrys-emacs.org>
<mailman.423.1629234918.4164.python-list@python.org>
<slrnshobjl.49p.jon+usenet@raven.unequivocal.eu>
<9bc605cb-2ceb-fed9-cd3f-d48a8fe405fb@everest.reportlab.co.uk>
<mailman.428.1629309989.4164.python-list@python.org>
<slrnshr4ia.78u.jon+usenet@raven.unequivocal.eu>
 by: Martin Di Paola - Sat, 21 Aug 2021 18:54 UTC

While it is correct to say that Basic Auth without HTTPS is absolutely
insecure, using Basic Auth *and* HTTPS is not secure either.

Well, the definition of "secure" depends of your threat model.

HTTPS ensures encryption so the content, including the Basic Auth
username and password, is secret for any external observer.

But it is *not* secret for the receiver (the server): if it was
compromised an adversary will have access to your password. It is much
easier to print a captured password than cracking the hashes.

Other authentication mechanisms exist, like OAuth, which are more
"secure".

Thanks,
Martin

On Wed, Aug 18, 2021 at 11:05:46PM -0000, Jon Ribbens via Python-list wrote:
>On 2021-08-18, Robin Becker <robin@reportlab.com> wrote:
>> On 17/08/2021 22:47, Jon Ribbens via Python-list wrote:
>> .......
>>> That's only true if you're not using HTTPS - and you should *never*
>>> not be using HTTPS, and that goes double if forms are being filled
>>> in and double again if passwords are being supplied.
>>
>> I think I agree with most of the replies; I understood from reading
>> the rfc that the charset is utf8 (presumably without ':')
>
>The username can't contain a ':'. It shouldn't matter in the password.
>
>> and that basic auth is considered insecure. It is being used over
>> https so should avoid the simplest net scanning.
>
>It's not insecure over HTTPS. Bear in mind the Basic Auth RFC was
>written when HTTP was the standard and HTTPS was unusual. The positions
>are now effectively reversed.
>
>> I googled a bunch of ways to do this, but many come down to 1) using
>> the requests package or 2) setting up an opener. Both of these seem to
>> be much more complex than is required to add the header.
>>
>> I thought there might be a shortcut or more elegant way to replace the
>> old code, but it seems not
>
>It's only a trivial str/bytes difference, it shouldn't be any big deal.
>But using 'requests' instead is likely to simplify things and doesn't
>tend to be an onerous dependency.
>--
>https://mail.python.org/mailman/listinfo/python-list

Re: basic auth request

<mailman.439.1629572696.4164.python-list@python.org>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=14699&group=comp.lang.python#14699

  copy link   Newsgroups: comp.lang.python
Path: i2pn2.org!i2pn.org!news.swapon.de!fu-berlin.de!uni-berlin.de!not-for-mail
From: ros...@gmail.com (Chris Angelico)
Newsgroups: comp.lang.python
Subject: Re: basic auth request
Date: Sun, 22 Aug 2021 05:04:43 +1000
Lines: 29
Message-ID: <mailman.439.1629572696.4164.python-list@python.org>
References: <CAPTjJmo0d_t3XG6KH++XhkStB5GyyFbtv=4Sj3tQXM_Sn-E5zA@mail.gmail.com>
<54465DA0-2977-4EAD-8CD2-C398F5ACF121@barrys-emacs.org>
<mailman.423.1629234918.4164.python-list@python.org>
<slrnshobjl.49p.jon+usenet@raven.unequivocal.eu>
<9bc605cb-2ceb-fed9-cd3f-d48a8fe405fb@everest.reportlab.co.uk>
<mailman.428.1629309989.4164.python-list@python.org>
<slrnshr4ia.78u.jon+usenet@raven.unequivocal.eu>
<20210821185411.ka66xkawv6mbpska@gmail.com>
<CAPTjJmpTU_ew8qe_GQKyE92cEDnRjjuMTPiwV--tVp4N+v4Lgw@mail.gmail.com>
Mime-Version: 1.0
Content-Type: text/plain; charset="UTF-8"
X-Trace: news.uni-berlin.de xDxrK8t69aFgE5jkDLzuuABbMOcZGP3fU+LRenzoz+ng==
Return-Path: <rosuav@gmail.com>
X-Original-To: python-list@python.org
Delivered-To: python-list@mail.python.org
Authentication-Results: mail.python.org; dkim=pass
reason="2048-bit key; unprotected key"
header.d=gmail.com header.i=@gmail.com header.b=UA5dPvc8;
dkim-adsp=pass; dkim-atps=neutral
X-Spam-Status: OK 0.012
X-Spam-Evidence: '*H*': 0.98; '*S*': 0.00; 'sun,': 0.07; '*not*':
0.09; 'aug': 0.09; 'auth': 0.09; 'passwords': 0.09; 'yes.': 0.09;
'"not': 0.16; 'captured': 0.16; 'chrisa': 0.16; 'compromised':
0.16; 'encryption': 0.16; 'ensures': 0.16; 'from:addr:rosuav':
0.16; 'from:name:chris angelico': 0.16; 'https': 0.16;
'mechanisms': 0.16; 'received:209.85.166.42': 0.16; 'received
:mail-io1-f42.google.com': 0.16; 'server,': 0.16; 'threat': 0.16;
'wrote:': 0.16; 'to:addr:python-list': 0.23; 'code': 0.24;
'depends': 0.26; 'suspect': 0.27; 'subject:request': 0.29;
'there': 0.31; 'think': 0.31; 'but': 0.31; 'to:name:python': 0.32;
'message-id:@mail.gmail.com': 0.33; 'using': 0.33;
'received:209.85.166': 0.33; 'server': 0.33; 'header:In-Reply-
To:1': 0.33; 'received:google.com': 0.34; 'well,': 0.35;
'running': 0.35; '22,': 0.35; 'from:addr:gmail.com': 0.35;
'handle': 0.37; 'received:209.85': 0.38; 'received:209': 0.38;
'model': 0.60; 'external': 0.61; 'security': 0.64; 'your': 0.64;
'username': 0.65; 'content,': 0.69; 'visible': 0.69; 'client':
0.79; '2021': 0.84; 'absolutely': 0.84; 'paola': 0.84;
'password,': 0.84; 'secret': 0.95
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
h=mime-version:references:in-reply-to:from:date:message-id:subject:to;
bh=3qbM7D/act70n5/1qQCDy8Yd0jOO+dfO/I0AuVnEgMk=;
b=UA5dPvc8twz2t9B8Ci3832HV9UVmP+wVB9MJ8VMjqHG13MY3HcW3PFSWuoFcl51dpQ
xgs2nZGVoY1QTSRnWZTpO1rj9njoxRSCaUJGG15Z0hVjZkBqV+POGxU005GMRcJuUKxB
8KyCZi8PDynWCBs3tyCvk1c2pr9xgwDiNkhaefUDxjBm1WeWQIzvWSfQXYx//VAUc4fS
z7+Jm2nU6CdiP0tf5xrx0/6dXEYBXalaEHJh73lesACSgJEZE8QhJ8gGAUNCSJYfxQqt
pZr7fU7oyQJclhyuvsBQlGfwkaoCHQmEDHqLIocXsRo5hxYt1V/DvlcypSGYSXGU25tK
NrNw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20161025;
h=x-gm-message-state:mime-version:references:in-reply-to:from:date
:message-id:subject:to;
bh=3qbM7D/act70n5/1qQCDy8Yd0jOO+dfO/I0AuVnEgMk=;
b=FrBy4qQC2NnVFj2QsKlUxgvumMNYldARbPp5bzbxKNLNDLopdc0PO7048PYeyNaVop
Upzg2A5AnXzUBfyb/F+52yO0XzaWKn2HUYcMY99XyepzIPoWKbPi4GrVLaTS9fzDsOgh
xLBW1BUsZfGP/BIndT5ISnXCywcQjlt79xb+zrxSllV/CEVrGRMPABeiwt9KR3zqMly/
lMXFrtd5ft/cNft/k8gyQY0d0D+eQXUBoUYFbHSrJg/Vx2bHCehk5kAH2OxjBMXLJPJi
gcgzIWJObrHroceXCvJurG2gFXPGTh5wx6BTAO869QRjNdFRZMhM8eso+m87xNdSXrhy
9hIg==
X-Gm-Message-State: AOAM533f11RJIbEXQ4ZnDQYz4G3HrF79pX9GsuAqN2DsX3zfrk+7N/Vi
Px/yW/jpH1pdTLASSyjyEoin5ipaCGY9I1gu1UkqgCJz
X-Google-Smtp-Source: ABdhPJz+H2W2OEpiGz8LsLhxqzK3nuQP47GtREN8TmDiU8W5MU8CkXjKgibc1uxqPyv9GAirwUm6+WXad9q3NkB/6eQ=
X-Received: by 2002:a05:6638:349e:: with SMTP id
t30mr18954784jal.142.1629572694611;
Sat, 21 Aug 2021 12:04:54 -0700 (PDT)
In-Reply-To: <20210821185411.ka66xkawv6mbpska@gmail.com>
X-BeenThere: python-list@python.org
X-Mailman-Version: 2.1.34
Precedence: list
List-Id: General discussion list for the Python programming language
<python-list.python.org>
List-Unsubscribe: <https://mail.python.org/mailman/options/python-list>,
<mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive: <https://mail.python.org/pipermail/python-list/>
List-Post: <mailto:python-list@python.org>
List-Help: <mailto:python-list-request@python.org?subject=help>
List-Subscribe: <https://mail.python.org/mailman/listinfo/python-list>,
<mailto:python-list-request@python.org?subject=subscribe>
X-Mailman-Original-Message-ID: <CAPTjJmpTU_ew8qe_GQKyE92cEDnRjjuMTPiwV--tVp4N+v4Lgw@mail.gmail.com>
X-Mailman-Original-References: <CAPTjJmo0d_t3XG6KH++XhkStB5GyyFbtv=4Sj3tQXM_Sn-E5zA@mail.gmail.com>
<54465DA0-2977-4EAD-8CD2-C398F5ACF121@barrys-emacs.org>
<mailman.423.1629234918.4164.python-list@python.org>
<slrnshobjl.49p.jon+usenet@raven.unequivocal.eu>
<9bc605cb-2ceb-fed9-cd3f-d48a8fe405fb@everest.reportlab.co.uk>
<mailman.428.1629309989.4164.python-list@python.org>
<slrnshr4ia.78u.jon+usenet@raven.unequivocal.eu>
<20210821185411.ka66xkawv6mbpska@gmail.com>
 by: Chris Angelico - Sat, 21 Aug 2021 19:04 UTC

On Sun, Aug 22, 2021 at 4:55 AM Martin Di Paola
<martinp.dipaola@gmail.com> wrote:
>
> While it is correct to say that Basic Auth without HTTPS is absolutely
> insecure, using Basic Auth *and* HTTPS is not secure either.
>
> Well, the definition of "secure" depends of your threat model.

Yes. Which makes statements like "not secure" rather suspect :)

> HTTPS ensures encryption so the content, including the Basic Auth
> username and password, is secret for any external observer.
>
> But it is *not* secret for the receiver (the server): if it was
> compromised an adversary will have access to your password. It is much
> easier to print a captured password than cracking the hashes.
>
> Other authentication mechanisms exist, like OAuth, which are more
> "secure".

If your server is compromised in that way, *all is lost*. If an
attacker is actually running code on your server, listening to your
sockets, after everything's decrypted, then *shut that server down*. I
don't think there is ANY security model that can handle this - if
you're using OAuth, and the server is compromised, then your client ID
and client secret are just as visible to the attacker as passwords
would be.

ChrisA

Re: basic auth request

<mailman.444.1629621824.4164.python-list@python.org>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=14705&group=comp.lang.python#14705

  copy link   Newsgroups: comp.lang.python
Path: i2pn2.org!i2pn.org!news.swapon.de!fu-berlin.de!uni-berlin.de!not-for-mail
From: hjp-pyt...@hjp.at (Peter J. Holzer)
Newsgroups: comp.lang.python
Subject: Re: basic auth request
Date: Sun, 22 Aug 2021 10:43:41 +0200
Lines: 100
Message-ID: <mailman.444.1629621824.4164.python-list@python.org>
References: <CAPTjJmo0d_t3XG6KH++XhkStB5GyyFbtv=4Sj3tQXM_Sn-E5zA@mail.gmail.com>
<54465DA0-2977-4EAD-8CD2-C398F5ACF121@barrys-emacs.org>
<mailman.423.1629234918.4164.python-list@python.org>
<slrnshobjl.49p.jon+usenet@raven.unequivocal.eu>
<9bc605cb-2ceb-fed9-cd3f-d48a8fe405fb@everest.reportlab.co.uk>
<mailman.428.1629309989.4164.python-list@python.org>
<slrnshr4ia.78u.jon+usenet@raven.unequivocal.eu>
<20210821185411.ka66xkawv6mbpska@gmail.com>
<CAPTjJmpTU_ew8qe_GQKyE92cEDnRjjuMTPiwV--tVp4N+v4Lgw@mail.gmail.com>
<20210822084341.GA13245@hjp.at>
Mime-Version: 1.0
Content-Type: multipart/signed; micalg=pgp-sha512;
protocol="application/pgp-signature"; boundary="W/nzBZO5zC0uMSeA"
X-Trace: news.uni-berlin.de TJmkLKc/c+81wxK33vD+6gArPSXlhBDomEXnZRv5yTKA==
Return-Path: <hjp-python@hjp.at>
X-Original-To: python-list@python.org
Delivered-To: python-list@mail.python.org
Authentication-Results: mail.python.org; dkim=none reason="no signature";
dkim-adsp=none (unprotected policy); dkim-atps=neutral
X-Spam-Status: OK 0.001
X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; '(which': 0.04; 'content-
type:multipart/signed': 0.05; 'random': 0.05; 'sun,': 0.07; '"an':
0.09; '*not*': 0.09; 'angelico': 0.09; 'aug': 0.09; 'auth': 0.09;
'content-type:application/pgp-signature': 0.09; 'filename:fname
piece:asc': 0.09; 'filename:fname piece:signature': 0.09;
'filename:fname:signature.asc': 0.09; 'logged': 0.09; 'passwords':
0.09; 'perspective': 0.09; "shouldn't": 0.09; 'yes.': 0.09;
'"creative': 0.16; '"not': 0.16; '(from': 0.16; '(over': 0.16;
'__/': 0.16; 'assuming': 0.16; 'captured': 0.16; 'challenge!"':
0.16; 'compromised': 0.16; 'encryption': 0.16; 'ensures': 0.16;
'from:addr:hjp-python': 0.16; 'from:addr:hjp.at': 0.16;
'from:name:peter j. holzer': 0.16; 'hjp@hjp.at': 0.16; 'holzer':
0.16; 'https': 0.16; 'mechanisms': 0.16; 'reality.': 0.16;
'reuse': 0.16; 'right.': 0.16; 'ssl': 0.16; 'stross,': 0.16;
'threat': 0.16; 'tls': 0.16; 'url-ip:212.17.106.137/32': 0.16;
'url-ip:212.17.106/24': 0.16; 'url-ip:212.17/16': 0.16; 'url:hjp':
0.16; '|_|_)': 0.16; 'wrote:': 0.16; 'all,': 0.19; 'server.':
0.20; 'basically': 0.23; 'to:addr:python-list': 0.23; 'probably':
0.24; 'chris': 0.26; 'depends': 0.26; 'matter.': 0.27; 'suspect':
0.27; 'bit': 0.28; 'sense': 0.28; "isn't": 0.29;
'subject:request': 0.29; 'header:User-Agent:1': 0.31; 'there':
0.31; 'but': 0.31; "doesn't": 0.32; 'using': 0.33; 'server': 0.33;
'header:In-Reply-To:1': 0.33; 'particular': 0.34; 'well,': 0.35;
'22,': 0.35; 'transmitted': 0.37; 'people': 0.37; 'users': 0.37;
"it's": 0.38; 'use': 0.38; 'enough': 0.40; 'could': 0.40;
'external': 0.61; 'forum': 0.61; 'requirements': 0.61; 'key':
0.63; 'security': 0.64; 'received:userid': 0.64; 'your': 0.64;
'depending': 0.65; 'username': 0.65; 'damage': 0.66; 'years':
0.67; 'choice': 0.68; 'received:212': 0.68; 'service.': 0.68;
'service': 0.68; 'content,': 0.69; 'implemented': 0.69; 'skip:/
10': 0.69; 'url-ip:212/8': 0.69; 'little': 0.75; 'importance':
0.75; 'known': 0.75; 'bank': 0.76; 'limits': 0.77; 'pain': 0.77;
'up,': 0.77; 'client': 0.79; '2021': 0.84; 'absolutely': 0.84;
'admit': 0.84; 'ideally': 0.84; 'method,': 0.84; 'paola': 0.84;
'password,': 0.84; 'received:at': 0.84; 'service,': 0.91;
'secret': 0.95; 'highest': 0.97
Content-Disposition: inline
In-Reply-To: <CAPTjJmpTU_ew8qe_GQKyE92cEDnRjjuMTPiwV--tVp4N+v4Lgw@mail.gmail.com>
User-Agent: Mutt/1.10.1 (2018-07-13)
X-BeenThere: python-list@python.org
X-Mailman-Version: 2.1.34
Precedence: list
List-Id: General discussion list for the Python programming language
<python-list.python.org>
List-Unsubscribe: <https://mail.python.org/mailman/options/python-list>,
<mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive: <https://mail.python.org/pipermail/python-list/>
List-Post: <mailto:python-list@python.org>
List-Help: <mailto:python-list-request@python.org?subject=help>
List-Subscribe: <https://mail.python.org/mailman/listinfo/python-list>,
<mailto:python-list-request@python.org?subject=subscribe>
X-Mailman-Original-Message-ID: <20210822084341.GA13245@hjp.at>
X-Mailman-Original-References: <CAPTjJmo0d_t3XG6KH++XhkStB5GyyFbtv=4Sj3tQXM_Sn-E5zA@mail.gmail.com>
<54465DA0-2977-4EAD-8CD2-C398F5ACF121@barrys-emacs.org>
<mailman.423.1629234918.4164.python-list@python.org>
<slrnshobjl.49p.jon+usenet@raven.unequivocal.eu>
<9bc605cb-2ceb-fed9-cd3f-d48a8fe405fb@everest.reportlab.co.uk>
<mailman.428.1629309989.4164.python-list@python.org>
<slrnshr4ia.78u.jon+usenet@raven.unequivocal.eu>
<20210821185411.ka66xkawv6mbpska@gmail.com>
<CAPTjJmpTU_ew8qe_GQKyE92cEDnRjjuMTPiwV--tVp4N+v4Lgw@mail.gmail.com>
 by: Peter J. Holzer - Sun, 22 Aug 2021 08:43 UTC
Attachments: signature.asc (application/pgp-signature)

On 2021-08-22 05:04:43 +1000, Chris Angelico wrote:
> On Sun, Aug 22, 2021 at 4:55 AM Martin Di Paola
> <martinp.dipaola@gmail.com> wrote:
> >
> > While it is correct to say that Basic Auth without HTTPS is absolutely
> > insecure, using Basic Auth *and* HTTPS is not secure either.
> >
> > Well, the definition of "secure" depends of your threat model.
>
> Yes. Which makes statements like "not secure" rather suspect :)

Right.

> > HTTPS ensures encryption so the content, including the Basic Auth
> > username and password, is secret for any external observer.
> >
> > But it is *not* secret for the receiver (the server): if it was
> > compromised an adversary will have access to your password. It is much
> > easier to print a captured password than cracking the hashes.
> >
> > Other authentication mechanisms exist, like OAuth, which are more
> > "secure".

OAuth is "an /authorization protocol/, rather than an /authentication
protocol/" [Wikipedia].

> If your server is compromised in that way, *all is lost*.

If "you" are the service provider, yes. but if "you" are the user, no.

From a user's perspective "all" is much more than the data (including
username and password) associated with that particular service. So if
one service is compromised, not all is lost, but only a bit (of course,
depending on the importance of the service, that bit may be little or
big; a random web forum probably doesn't matter. Your bank account
probably does).

So assuming that many people reuse passwords (which of course they
shouldn't and thanks to password is becoming rarer, but is still
distressingly common), there are three levels of security (from highest
to lowest) in this scenario:

1: The secret known to the user is never transmitted to the server at
all, the client only proves that the secret is known. This is the
case for TLS client authentication (which AFAIK all browsers support
but is a real pain in the ass to set up, so it's basically never
used) and for SCRAM (which isn't part of HTTP(S) but could be
implemented in JavaScript).

2: The secret is transmitted on login but never stored. This limits the
damage to users who logged in while the server was compromised. This
is the case for Basic Authentication combined with a probperly salted
hashed storage.

3: The secret is stored on the server. When the server is compromised,
all user's passwords are known. This is (AFAIK) the case for Digest
and NTLM.

So given the choice between Basic Auth and Digest or NTLM (over HTTPS in
all cases) I would prefer Basic Auth. Ideally I would use SCRAM or a
public key method, but I admit that my security requirements were never
high enough to actually bother to do that (actually, I used SSL client
side auth once, 20 years ago, ...).

hp

--
_ | Peter J. Holzer | Story must make more sense than reality.
|_|_) | |
| | | hjp@hjp.at | -- Charles Stross, "Creative writing
__/ | http://www.hjp.at/ | challenge!"

Attachments: signature.asc (application/pgp-signature)
Re: basic auth request

<mailman.445.1629625058.4164.python-list@python.org>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=14707&group=comp.lang.python#14707

  copy link   Newsgroups: comp.lang.python
Path: i2pn2.org!i2pn.org!news.swapon.de!fu-berlin.de!uni-berlin.de!not-for-mail
From: ros...@gmail.com (Chris Angelico)
Newsgroups: comp.lang.python
Subject: Re: basic auth request
Date: Sun, 22 Aug 2021 19:37:24 +1000
Lines: 120
Message-ID: <mailman.445.1629625058.4164.python-list@python.org>
References: <CAPTjJmo0d_t3XG6KH++XhkStB5GyyFbtv=4Sj3tQXM_Sn-E5zA@mail.gmail.com>
<54465DA0-2977-4EAD-8CD2-C398F5ACF121@barrys-emacs.org>
<mailman.423.1629234918.4164.python-list@python.org>
<slrnshobjl.49p.jon+usenet@raven.unequivocal.eu>
<9bc605cb-2ceb-fed9-cd3f-d48a8fe405fb@everest.reportlab.co.uk>
<mailman.428.1629309989.4164.python-list@python.org>
<slrnshr4ia.78u.jon+usenet@raven.unequivocal.eu>
<20210821185411.ka66xkawv6mbpska@gmail.com>
<CAPTjJmpTU_ew8qe_GQKyE92cEDnRjjuMTPiwV--tVp4N+v4Lgw@mail.gmail.com>
<20210822084341.GA13245@hjp.at>
<CAPTjJmpnfo5cCawgCkJKugimFk_i0DWZSk9me=+19uWL-f-sVQ@mail.gmail.com>
Mime-Version: 1.0
Content-Type: text/plain; charset="UTF-8"
X-Trace: news.uni-berlin.de FTEco9qO7UdjHwa8/JqAxAdncSuALynFIGb4MS81p9UA==
Return-Path: <rosuav@gmail.com>
X-Original-To: python-list@python.org
Delivered-To: python-list@mail.python.org
Authentication-Results: mail.python.org; dkim=pass
reason="2048-bit key; unprotected key"
header.d=gmail.com header.i=@gmail.com header.b=FnbBHGzC;
dkim-adsp=pass; dkim-atps=neutral
X-Spam-Status: OK 0.013
X-Spam-Evidence: '*H*': 0.97; '*S*': 0.00; '(which': 0.04; 'knows':
0.04; 'absolute': 0.05; 'random': 0.05; 'usage': 0.05;
'certificates': 0.07; 'sun,': 0.07; '"an': 0.09; '*not*': 0.09;
'angelico': 0.09; 'aug': 0.09; 'auth': 0.09; 'construct': 0.09;
'logged': 0.09; 'passwords': 0.09; 'perspective': 0.09;
"shouldn't": 0.09; 'ultimate': 0.09; 'user.': 0.09; 'yes.': 0.09;
'log': 0.12; '(b)': 0.16; '(from': 0.16; '(over': 0.16;
'assuming': 0.16; 'bank,': 0.16; 'basic,': 0.16; 'captured': 0.16;
'cert': 0.16; 'certificate.': 0.16; 'chrisa': 0.16; 'compromised':
0.16; 'encryption': 0.16; 'ensures': 0.16; 'from:addr:rosuav':
0.16; 'from:name:chris angelico': 0.16; 'great,': 0.16; 'hassle.':
0.16; 'holzer': 0.16; 'https': 0.16; "it'd": 0.16; 'mechanisms':
0.16; 'okay.': 0.16; 'ones.': 0.16; 'reuse': 0.16; 'ssl': 0.16;
'tls': 0.16; 'wrote:': 0.16; 'all,': 0.19; 'server.': 0.20;
"i've": 0.22; 'basically': 0.23; "i'd": 0.23; 'to:addr:python-
list': 0.23; 'probably': 0.24; 'chris': 0.26; 'seems': 0.26;
'certificate': 0.27; 'matter.': 0.27; 'bit': 0.28; "isn't": 0.29;
'subject:request': 0.29; 'there': 0.31; 'but': 0.31; "doesn't":
0.32; "i'm": 0.32; 'concerns': 0.32; 'context': 0.32;
'credentials': 0.32; 'selection': 0.32; 'to:name:python': 0.32;
'message-id:@mail.gmail.com': 0.33; 'using': 0.33;
'received:209.85.166': 0.33; 'server': 0.33; 'header:In-Reply-
To:1': 0.33; 'particular': 0.34; 'setting': 0.34; 'same': 0.34;
'received:google.com': 0.34; '22,': 0.35; 'from:addr:gmail.com':
0.35; 'neither': 0.37; 'possibly': 0.37; 'recommend': 0.37;
'transmitted': 0.37; 'people': 0.37; 'way': 0.37; "that's": 0.37;
'users': 0.37; '(or': 0.37; 'mean': 0.37; 'currently': 0.37;
'received:209.85': 0.38; 'those': 0.38; 'them,': 0.63; 'key':
0.63; 'security': 0.64; 'browser': 0.64; 'your': 0.64;
'depending': 0.65; 'extremely': 0.65; 'people.': 0.65; 'talking':
0.65; 'username': 0.65; 'above': 0.65; 'damage': 0.66; 'years':
0.67; 'choice': 0.68; 'service.': 0.68; 'service': 0.68; 'site':
0.69; 'content,': 0.69; 'control,': 0.69; 'historical': 0.69;
'implemented': 0.69; 'providers': 0.69; 'skip:/ 10': 0.69;
'little': 0.75; 'happens': 0.75; 'importance': 0.75; 'known':
0.75; 'bank': 0.76; 'chain': 0.77; 'limits': 0.77; 'pain': 0.77;
'tracking': 0.77; 'up,': 0.77; 'client': 0.79; 'details,': 0.81;
'managers': 0.81; '2021': 0.84; 'admit': 0.84; 'compromise': 0.84;
'control.': 0.84; 'extent': 0.84; 'forming': 0.84; 'ideally':
0.84; 'method,': 0.84; 'paola': 0.84; 'password,': 0.84; 'scope':
0.84; "service's": 0.84; 'sites,': 0.84; 'worse?': 0.84; 'retain':
0.91; 'retained': 0.91; 'service,': 0.91; 'secret': 0.95;
'highest': 0.97
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
h=mime-version:references:in-reply-to:from:date:message-id:subject:to;
bh=nMWocg7e5S4wYjtD4a7Akn9nuMwOVd0TQz9TK5Y61Bo=;
b=FnbBHGzCkuVi36ZeK8+GIV08KVe4M2gsGdRxYRsUyZiNnUclZV7QgyKt+H37KWt4C+
WGBUByt0ONDp1dSES9Kg06zEOIrnVbG5OVqcFv8IPBei5jw6Oiw2OmeHclIjhY0790JG
CIQXo8XblEmxRpox2zU8hVU/9B3pCi4VmjxEWytXrXc6IOVcNDs49cQA6ZIKXGBiAk95
JfLKhD/o3gJSNmcjNTlWyeuRcx+HgwyCCM/HmZ/CWwauoh/0knflhIVI48gviuWMI7Sh
jusPH4HjV7mdFgEmjWkKfzQM6IX2+6PnY5iUBgWqDT1XINBrm6Rlhfy7HdSOPphrp4sX
u9eg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20161025;
h=x-gm-message-state:mime-version:references:in-reply-to:from:date
:message-id:subject:to;
bh=nMWocg7e5S4wYjtD4a7Akn9nuMwOVd0TQz9TK5Y61Bo=;
b=g5x2bz4woBKVTeu1+xnsZhnzi3jcPSCsqPWkpwj1/b8IKy+MiZ1Lav3qveiDYvP6E+
dtGxoyVq90dB9U/fxYK1y2abTTqhEJ0SS18G6+ZJuiZmxSso8R64ZbwAPxe3dt3AZuOC
mlfjg+R0YKHfQFYoEbI7IcVsWk8IASeI0mzsHfPohRgJ9ixLsP1jl1UEcWyWpyHEADRE
Tf8I01Fpva9rAPkXP3W3nYMT8EbS2g15FjOZlh7BQc8Hsatcmb3ZuqMsTnz31phx6ItF
UQBRG8Ho6i54rBgjQA1v0mT3AoUF6CDeShcRYuxKdTYwLqBAQRBDBtY4Sm6udbYwoJYy
xRRA==
X-Gm-Message-State: AOAM533If4+5o3b6L4L2SAtE697zAjjAeAUVbA6AXOGmpslU4r8cjYcU
Gv1Wy703t9GcLKZG/P/Upy/Hwnc7AGINSV7DRMNphccG
X-Google-Smtp-Source: ABdhPJxGR7H0coczJqy7xPFvKokYbMeyD601Hg4vBeXaQvVKDhtw9fL85E2jRSiLGGtF8WxCUd45JqbLjjPy/rc9kDg=
X-Received: by 2002:a05:6638:349e:: with SMTP id
t30mr20720095jal.142.1629625055512;
Sun, 22 Aug 2021 02:37:35 -0700 (PDT)
In-Reply-To: <20210822084341.GA13245@hjp.at>
X-BeenThere: python-list@python.org
X-Mailman-Version: 2.1.34
Precedence: list
List-Id: General discussion list for the Python programming language
<python-list.python.org>
List-Unsubscribe: <https://mail.python.org/mailman/options/python-list>,
<mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive: <https://mail.python.org/pipermail/python-list/>
List-Post: <mailto:python-list@python.org>
List-Help: <mailto:python-list-request@python.org?subject=help>
List-Subscribe: <https://mail.python.org/mailman/listinfo/python-list>,
<mailto:python-list-request@python.org?subject=subscribe>
X-Mailman-Original-Message-ID: <CAPTjJmpnfo5cCawgCkJKugimFk_i0DWZSk9me=+19uWL-f-sVQ@mail.gmail.com>
X-Mailman-Original-References: <CAPTjJmo0d_t3XG6KH++XhkStB5GyyFbtv=4Sj3tQXM_Sn-E5zA@mail.gmail.com>
<54465DA0-2977-4EAD-8CD2-C398F5ACF121@barrys-emacs.org>
<mailman.423.1629234918.4164.python-list@python.org>
<slrnshobjl.49p.jon+usenet@raven.unequivocal.eu>
<9bc605cb-2ceb-fed9-cd3f-d48a8fe405fb@everest.reportlab.co.uk>
<mailman.428.1629309989.4164.python-list@python.org>
<slrnshr4ia.78u.jon+usenet@raven.unequivocal.eu>
<20210821185411.ka66xkawv6mbpska@gmail.com>
<CAPTjJmpTU_ew8qe_GQKyE92cEDnRjjuMTPiwV--tVp4N+v4Lgw@mail.gmail.com>
<20210822084341.GA13245@hjp.at>
 by: Chris Angelico - Sun, 22 Aug 2021 09:37 UTC

On Sun, Aug 22, 2021 at 6:45 PM Peter J. Holzer <hjp-python@hjp.at> wrote:
>
> On 2021-08-22 05:04:43 +1000, Chris Angelico wrote:
> > On Sun, Aug 22, 2021 at 4:55 AM Martin Di Paola
> > <martinp.dipaola@gmail.com> wrote:
> > > HTTPS ensures encryption so the content, including the Basic Auth
> > > username and password, is secret for any external observer.
> > >
> > > But it is *not* secret for the receiver (the server): if it was
> > > compromised an adversary will have access to your password. It is much
> > > easier to print a captured password than cracking the hashes.
> > >
> > > Other authentication mechanisms exist, like OAuth, which are more
> > > "secure".
>
> OAuth is "an /authorization protocol/, rather than an /authentication
> protocol/" [Wikipedia].
>
> > If your server is compromised in that way, *all is lost*.
>
> If "you" are the service provider, yes. but if "you" are the user, no.

If "your server" is compromised, then you are the service provider,
are you not? I'm not sure what "your server" would mean if "you" are
the user.

But okay. Suppose I log in to Random Service 1, using a user name and
password, and also to Random Service 2, using OAuth. What happens if
those servers get compromised?

1) Someone knows the login credentials that I created for that
service. If I've used the same password that I also use at my bank,
then I am in big trouble. It is, largely, my fault.

2) Someone has access to my login token and the client ID/secret
associated with it. That attacker can now impersonate me to the OAuth
provider, to the exact extent that the scopes permit. At absolute
least, the attacker gets to know a lot about who I am on some entirely
separate service.

I'm talking here about a complete and utter compromise, the sort where
neither SSL encryption nor proper password hashing would protect my
details, since that's what was being claimed.

Which is actually worse? Is it as clear-cut?

> From a user's perspective "all" is much more than the data (including
> username and password) associated with that particular service. So if
> one service is compromised, not all is lost, but only a bit (of course,
> depending on the importance of the service, that bit may be little or
> big; a random web forum probably doesn't matter. Your bank account
> probably does).
>
> So assuming that many people reuse passwords (which of course they
> shouldn't and thanks to password is becoming rarer, but is still
> distressingly common),

True, but reuse of passwords is something under the user's control.
OAuth scope selection is partly under the service's control, and
partly under the provider's (some providers have extremely coarse
scopes, widening the attack).

> there are three levels of security (from highest
> to lowest) in this scenario:
>
> 1: The secret known to the user is never transmitted to the server at
> all, the client only proves that the secret is known. This is the
> case for TLS client authentication (which AFAIK all browsers support
> but is a real pain in the ass to set up, so it's basically never
> used) and for SCRAM (which isn't part of HTTP(S) but could be
> implemented in JavaScript).

This would be great, if nobody minded (a) setting up a unique client
certificate for every site, or (b) allowing the ultimate in remote
tracking cookie whereby any server could recognize you by your TLS
certificate.

> 2: The secret is transmitted on login but never stored. This limits the
> damage to users who logged in while the server was compromised. This
> is the case for Basic Authentication combined with a probperly salted
> hashed storage.

Current best prac, and what I'd generally recommend to most people.

> 3: The secret is stored on the server. When the server is compromised,
> all user's passwords are known. This is (AFAIK) the case for Digest
> and NTLM.

I'm not sure what the effects of wide-spread Digest/NTLM usage would
have on password managers and the risks of compromise to them, but the
way things currently are, I would prefer salted/hashed passwords, such
that a data breach doesn't mean compromise of all historical data.

> So given the choice between Basic Auth and Digest or NTLM (over HTTPS in
> all cases) I would prefer Basic Auth. Ideally I would use SCRAM or a
> public key method, but I admit that my security requirements were never
> high enough to actually bother to do that (actually, I used SSL client
> side auth once, 20 years ago, ...).
>

I would, of course, prefer something like form fill-out over Basic,
but that's due to UI concerns rather than security ones.

SCRAM seems tempting, but in a context of web browsers, I'm not sure
that it would be worth the hassle.

When it comes to security, one thing I'm very curious about is why we
don't have any sort of certificate renewal verification. My browser
could retain the certificates of some web site (or of all web sites,
even - they're not THAT large), and if the site presents a different
cert, it could show the previously retained one and challenge the
server "prove that you're the same guy". This proof would consist of
the latest cert, signed by the older cert's key (or possibly a chain
that can construct such a proof, which would allow the server to
simply retain each new cert signed by the one previous cert, forming a
line - or a tree if necessary). My suspicion is that it'd add little
above simply having a valid cert, but if people are paranoid, surely
that's a better place to look?

ChrisA

Re: basic auth request

<mailman.446.1629628212.4164.python-list@python.org>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=14708&group=comp.lang.python#14708

  copy link   Newsgroups: comp.lang.python
Path: i2pn2.org!i2pn.org!news.swapon.de!fu-berlin.de!uni-berlin.de!not-for-mail
From: bar...@barrys-emacs.org (Barry Scott)
Newsgroups: comp.lang.python
Subject: Re: basic auth request
Date: Sun, 22 Aug 2021 11:30:01 +0100
Lines: 35
Message-ID: <mailman.446.1629628212.4164.python-list@python.org>
References: <CAPTjJmo0d_t3XG6KH++XhkStB5GyyFbtv=4Sj3tQXM_Sn-E5zA@mail.gmail.com>
<54465DA0-2977-4EAD-8CD2-C398F5ACF121@barrys-emacs.org>
<mailman.423.1629234918.4164.python-list@python.org>
<slrnshobjl.49p.jon+usenet@raven.unequivocal.eu>
<9bc605cb-2ceb-fed9-cd3f-d48a8fe405fb@everest.reportlab.co.uk>
<mailman.428.1629309989.4164.python-list@python.org>
<slrnshr4ia.78u.jon+usenet@raven.unequivocal.eu>
<20210821185411.ka66xkawv6mbpska@gmail.com>
<CAPTjJmpTU_ew8qe_GQKyE92cEDnRjjuMTPiwV--tVp4N+v4Lgw@mail.gmail.com>
<20210822084341.GA13245@hjp.at>
<CAPTjJmpnfo5cCawgCkJKugimFk_i0DWZSk9me=+19uWL-f-sVQ@mail.gmail.com>
<6ED57509-8AEA-4370-86ED-9F9ED04CA719@barrys-emacs.org>
Mime-Version: 1.0 (Mac OS X Mail 14.0 \(3654.120.0.1.13\))
Content-Type: text/plain;
charset=us-ascii
Content-Transfer-Encoding: quoted-printable
X-Trace: news.uni-berlin.de bxJpNBcY+CLhMpozNcOuFwIBIcM9kjQZgs+BeKVM3Oww==
Return-Path: <barry@barrys-emacs.org>
X-Original-To: python-list@python.org
Delivered-To: python-list@mail.python.org
Authentication-Results: mail.python.org; dkim=none reason="no signature";
dkim-adsp=none (unprotected policy); dkim-atps=neutral
X-Spam-Status: OK 0.117
X-Spam-Level: *
X-Spam-Evidence: '*H*': 0.77; '*S*': 0.00; 'certificates': 0.07;
'!important;"': 0.09; 'angelico': 0.09; 'aug': 0.09; 'barry':
0.09; 'cc:addr:python-list': 0.09; 'class="">the': 0.09;
'construct': 0.09; 'from:addr:barry': 0.09; 'received:217.70':
0.09; 'received:gandi.net': 0.09; 'received:mail.gandi.net': 0.09;
'cc:name:python': 0.16; 'cert': 0.16; 'certificate.': 0.16;
'from:addr:barrys-emacs.org': 0.16; 'from:name:barry scott': 0.16;
"it'd": 0.16; 'message-id:@barrys-emacs.org': 0.16; 'wrote:<span':
0.16; 'wrote:': 0.16; 'cc:addr:python.org': 0.19; 'chris': 0.26;
'cc:2**0': 0.27; 'certificate': 0.27; 'subject:request': 0.29;
'but': 0.31; 'fact': 0.31; "i'm": 0.32; 'using': 0.33; 'server':
0.33; 'header:In-Reply-To:1': 0.33; 'same': 0.34; '0);': 0.36;
'rgb(0,': 0.36; 'possibly': 0.37; 'changes': 0.37; 'people': 0.37;
"that's": 0.37; '(or': 0.37; 'use': 0.38; 'does': 0.38; 'reason':
0.40; 'comes': 0.40; 'could': 0.40; 'valid': 0.40; 'skip:w 10':
0.61; 'font-style:': 0.61; 'font-weight:': 0.61; 'inline': 0.61;
'simply': 0.62; 'white-space:': 0.62; 'display:': 0.62; 'key':
0.63; 'none;': 0.64; 'browser': 0.64; 'your': 0.64; 'owners':
0.65; 'above': 0.65; '0px;': 0.65; 'trust': 0.66; 'received:217':
0.68; 'text-indent:': 0.68; 'normal;': 0.68; 'site': 0.69;
'none;"': 0.69; 'float:': 0.74; 'little': 0.75; 'chain': 0.77;
'gold': 0.77; 'pain': 0.77; 'forming': 0.84; 'rare': 0.84;
'sites,': 0.84; 'trusting': 0.84; '13px;': 0.91; 'retain': 0.91;
'retained': 0.91
In-Reply-To: <CAPTjJmpnfo5cCawgCkJKugimFk_i0DWZSk9me=+19uWL-f-sVQ@mail.gmail.com>
X-Mailer: Apple Mail (2.3654.120.0.1.13)
X-Content-Filtered-By: Mailman/MimeDel 2.1.34
X-BeenThere: python-list@python.org
X-Mailman-Version: 2.1.34
Precedence: list
List-Id: General discussion list for the Python programming language
<python-list.python.org>
List-Unsubscribe: <https://mail.python.org/mailman/options/python-list>,
<mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive: <https://mail.python.org/pipermail/python-list/>
List-Post: <mailto:python-list@python.org>
List-Help: <mailto:python-list-request@python.org?subject=help>
List-Subscribe: <https://mail.python.org/mailman/listinfo/python-list>,
<mailto:python-list-request@python.org?subject=subscribe>
X-Mailman-Original-Message-ID: <6ED57509-8AEA-4370-86ED-9F9ED04CA719@barrys-emacs.org>
X-Mailman-Original-References: <CAPTjJmo0d_t3XG6KH++XhkStB5GyyFbtv=4Sj3tQXM_Sn-E5zA@mail.gmail.com>
<54465DA0-2977-4EAD-8CD2-C398F5ACF121@barrys-emacs.org>
<mailman.423.1629234918.4164.python-list@python.org>
<slrnshobjl.49p.jon+usenet@raven.unequivocal.eu>
<9bc605cb-2ceb-fed9-cd3f-d48a8fe405fb@everest.reportlab.co.uk>
<mailman.428.1629309989.4164.python-list@python.org>
<slrnshr4ia.78u.jon+usenet@raven.unequivocal.eu>
<20210821185411.ka66xkawv6mbpska@gmail.com>
<CAPTjJmpTU_ew8qe_GQKyE92cEDnRjjuMTPiwV--tVp4N+v4Lgw@mail.gmail.com>
<20210822084341.GA13245@hjp.at>
<CAPTjJmpnfo5cCawgCkJKugimFk_i0DWZSk9me=+19uWL-f-sVQ@mail.gmail.com>
 by: Barry Scott - Sun, 22 Aug 2021 10:30 UTC

> On 22 Aug 2021, at 10:37, Chris Angelico <rosuav@gmail.com> wrote:
>
> When it comes to security, one thing I'm very curious about is why we
> don't have any sort of certificate renewal verification. My browser
> could retain the certificates of some web site (or of all web sites,
> even - they're not THAT large), and if the site presents a different
> cert, it could show the previously retained one and challenge the
> server "prove that you're the same guy". This proof would consist of
> the latest cert, signed by the older cert's key (or possibly a chain
> that can construct such a proof, which would allow the server to
> simply retain each new cert signed by the one previous cert, forming a
> line - or a tree if necessary). My suspicion is that it'd add little
> above simply having a valid cert, but if people are paranoid, surely
> that's a better place to look?

The web site proves it owners the hostname and/or IP address using its certificate.
You use your trust store to show that you can trust that certificate.

The fact that a certificate changes is not a reason to stop trusting a site.

So it does not add anything.

The pain point in PKI is revocation. The gold standard is for a web site to use OCSP stapling.
But that is rare sadly. And because of issues with revocation lists, (privacy, latency, need to
fail open on failiure, DoD vector, etc) this is where the paranoid should look.

Barry

Re: basic auth request

<mailman.451.1629656793.4164.python-list@python.org>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=14714&group=comp.lang.python#14714

  copy link   Newsgroups: comp.lang.python
Path: i2pn2.org!i2pn.org!news.swapon.de!fu-berlin.de!uni-berlin.de!not-for-mail
From: ros...@gmail.com (Chris Angelico)
Newsgroups: comp.lang.python
Subject: Re: basic auth request
Date: Sun, 22 Aug 2021 21:03:09 +1000
Lines: 72
Message-ID: <mailman.451.1629656793.4164.python-list@python.org>
References: <CAPTjJmo0d_t3XG6KH++XhkStB5GyyFbtv=4Sj3tQXM_Sn-E5zA@mail.gmail.com>
<54465DA0-2977-4EAD-8CD2-C398F5ACF121@barrys-emacs.org>
<mailman.423.1629234918.4164.python-list@python.org>
<slrnshobjl.49p.jon+usenet@raven.unequivocal.eu>
<9bc605cb-2ceb-fed9-cd3f-d48a8fe405fb@everest.reportlab.co.uk>
<mailman.428.1629309989.4164.python-list@python.org>
<slrnshr4ia.78u.jon+usenet@raven.unequivocal.eu>
<20210821185411.ka66xkawv6mbpska@gmail.com>
<CAPTjJmpTU_ew8qe_GQKyE92cEDnRjjuMTPiwV--tVp4N+v4Lgw@mail.gmail.com>
<20210822084341.GA13245@hjp.at>
<CAPTjJmpnfo5cCawgCkJKugimFk_i0DWZSk9me=+19uWL-f-sVQ@mail.gmail.com>
<6ED57509-8AEA-4370-86ED-9F9ED04CA719@barrys-emacs.org>
<CAPTjJmqqE1fbf+cEZvcpj5wS07hoQWFhKGcv1CvyDf2HTrs_=g@mail.gmail.com>
Mime-Version: 1.0
Content-Type: text/plain; charset="UTF-8"
X-Trace: news.uni-berlin.de qQfznun5rA5+Sb1tnpIUUAq1QsyYIir5UbC1v7zC+/Tg==
Return-Path: <rosuav@gmail.com>
X-Original-To: python-list@python.org
Delivered-To: python-list@mail.python.org
Authentication-Results: mail.python.org; dkim=pass
reason="2048-bit key; unprotected key"
header.d=gmail.com header.i=@gmail.com header.b=PJExw8JS;
dkim-adsp=pass; dkim-atps=neutral
X-Spam-Status: UNSURE 0.253
X-Spam-Level: **
X-Spam-Evidence: '*H*': 0.50; '*S*': 0.00; 'certificates': 0.07;
'sun,': 0.07; 'angelico': 0.09; 'aug': 0.09; 'barry': 0.09;
'construct': 0.09; 'encrypt': 0.09; 'received:209.85.166.180':
0.09; 'theoretical': 0.09; 'which,': 0.09; "can't": 0.14; '(b)':
0.16; 'cert': 0.16; 'certificate.': 0.16; 'changed.': 0.16;
'chrisa': 0.16; 'context.': 0.16; 'continue.': 0.16;
'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'if,':
0.16; "it'd": 0.16; 'opinion,': 0.16; 'wrote:': 0.16; 'that.':
0.16; 'name.': 0.20; 'anyone': 0.23; 'to:addr:python-list': 0.23;
'chris': 0.26; 'settings': 0.26; 'registration': 0.26;
'certificate': 0.27; 'bit': 0.28; 'old': 0.28; 'default': 0.28;
'saying': 0.28; 'subject:request': 0.29; 'it,': 0.31; 'but': 0.31;
'fact': 0.31; 'wondering': 0.32; "i'm": 0.32; 'to:name:python':
0.32; 'message-id:@mail.gmail.com': 0.33; 'using': 0.33;
'received:209.85.166': 0.33; 'server': 0.33; 'header:In-Reply-
To:1': 0.33; 'same': 0.34; 'received:google.com': 0.34; '22,':
0.35; 'one.': 0.35; 'from:addr:gmail.com': 0.35; 'possibly': 0.37;
'changes': 0.37; 'people': 0.37; "that's": 0.37; 'change': 0.37;
'(or': 0.37; 'really': 0.37; 'received:209.85': 0.38; 'those':
0.38; "it's": 0.38; 'something': 0.38; 'received:209': 0.38;
'use': 0.38; 'does': 0.38; 'reason': 0.40; 'whether': 0.40;
'comes': 0.40; 'could': 0.40; 'focus': 0.40; 'valid': 0.40;
'common': 0.60; 'completely': 0.60; 'normal': 0.60; 'simply':
0.62; 'skip:o 10': 0.62; 'time.': 0.63; 'true': 0.63; 'key': 0.63;
'browser': 0.64; 'your': 0.64; 'only,': 0.65; 'owners': 0.65;
'validation': 0.65; 'above': 0.65; 'let': 0.65; 'trust': 0.66;
'wish': 0.66; 'right': 0.66; 'care': 0.67; 'accept': 0.68; 'site':
0.69; 'matter': 0.69; 'url-ip:lookup error': 0.69; 'etc,': 0.69;
'perfectly': 0.69; 'highly': 0.70; 'domain': 0.74; 'little': 0.75;
'bank': 0.76; 'chain': 0.77; 'gold': 0.77; 'pain': 0.77;
'secured': 0.77; 'supposed': 0.77; '2021': 0.84; 'practical':
0.84; 'expire': 0.84; 'forming': 0.84; 'legit': 0.84;
'ownership.': 0.84; 'pin': 0.84; 'rare': 0.84; 'scott': 0.84;
'sites,': 0.84; 'trusting': 0.84; 'url:demo': 0.84; 'cas': 0.91;
'retain': 0.91; 'retained': 0.91
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
h=mime-version:references:in-reply-to:from:date:message-id:subject:to;
bh=JxzSSTiLnLbes25jNklS/4jfnLPraAb0BiHJbhJVBfU=;
b=PJExw8JS0+XqqLJA2d5lnSuxikx3dUnX4mdGvkBW815c9/Usf7ojXzVUXHEmj8lB9/
ju2TAuEm5iSFyHlG7NMMluB6sONebIayVmKrr+VyY/xkK8k52nt0iYtA9DCWhN/odZg0
/L+zQhcV3hiQgdWC9yviJG6x3ywwXH5v6pipQJICASdTDwuBBPSWdWG7PcWwqIm9/ua5
eHtmZwegg9f48LSmuCWEqwtuD0Jpxy5A+FDODLWGhttwlLeUdl13W0qxCg/GUuHdkPpE
eqGzRJTf0clE5BCoh8vDLOlbdw2LKEZOlPVUNlFwoMh0aUgIO9XecXzE832E9o0J3UYr
p9aQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20161025;
h=x-gm-message-state:mime-version:references:in-reply-to:from:date
:message-id:subject:to;
bh=JxzSSTiLnLbes25jNklS/4jfnLPraAb0BiHJbhJVBfU=;
b=dPvjwVbO8m7jS0KPIXEOj8iZhGPndwLUGi8nCSaWdN3egN+JJVKXeYqCBSrZ+y9VS5
rYE+xn/FAvbAIamPXqYwxWlTII9r+ajCdW8ZAfk0obuFSwawk4z4HnHwl4stfD1P6/DV
jC50QvF1R0H1m7bkEzc1kvV2xN32LNwMnQjcD1185QCdifH/ISrA7MYef3N3FGDSDO7u
9PZRzpCNqN07ANlklq+5CmE88AO8w6W7XBMi2cczx0yjCYLOb06fwLs2q2SifPjE8cjP
/POWwoC9dnkff3pwGV6dJdovYR5gYmgNX8Nuyiy90Jt6ljmHJWe39P+gttoHhTm4loM4
57ug==
X-Gm-Message-State: AOAM531hOSHRxChQ2AQ/xCZO4fzJv3cjPxvlluFO9zCCVUIQDqISb7SL
CkV+wNbpq2ctcDuEA4QTdx1ERDB28wyJQTmfvFYxlER5
X-Google-Smtp-Source: ABdhPJzzDYzX+BkDNiSAMtglkPPaf+vb6DIpRYo66B71L+BqRrGRX0rpdjbafLNW8gl1PJSYfRnAPyaRXB3LKFknjWQ=
X-Received: by 2002:a92:3f0b:: with SMTP id m11mr20149638ila.265.1629630200576;
Sun, 22 Aug 2021 04:03:20 -0700 (PDT)
In-Reply-To: <6ED57509-8AEA-4370-86ED-9F9ED04CA719@barrys-emacs.org>
X-Mailman-Approved-At: Sun, 22 Aug 2021 14:26:32 -0400
X-BeenThere: python-list@python.org
X-Mailman-Version: 2.1.34
Precedence: list
List-Id: General discussion list for the Python programming language
<python-list.python.org>
List-Unsubscribe: <https://mail.python.org/mailman/options/python-list>,
<mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive: <https://mail.python.org/pipermail/python-list/>
List-Post: <mailto:python-list@python.org>
List-Help: <mailto:python-list-request@python.org?subject=help>
List-Subscribe: <https://mail.python.org/mailman/listinfo/python-list>,
<mailto:python-list-request@python.org?subject=subscribe>
X-Mailman-Original-Message-ID: <CAPTjJmqqE1fbf+cEZvcpj5wS07hoQWFhKGcv1CvyDf2HTrs_=g@mail.gmail.com>
X-Mailman-Original-References: <CAPTjJmo0d_t3XG6KH++XhkStB5GyyFbtv=4Sj3tQXM_Sn-E5zA@mail.gmail.com>
<54465DA0-2977-4EAD-8CD2-C398F5ACF121@barrys-emacs.org>
<mailman.423.1629234918.4164.python-list@python.org>
<slrnshobjl.49p.jon+usenet@raven.unequivocal.eu>
<9bc605cb-2ceb-fed9-cd3f-d48a8fe405fb@everest.reportlab.co.uk>
<mailman.428.1629309989.4164.python-list@python.org>
<slrnshr4ia.78u.jon+usenet@raven.unequivocal.eu>
<20210821185411.ka66xkawv6mbpska@gmail.com>
<CAPTjJmpTU_ew8qe_GQKyE92cEDnRjjuMTPiwV--tVp4N+v4Lgw@mail.gmail.com>
<20210822084341.GA13245@hjp.at>
<CAPTjJmpnfo5cCawgCkJKugimFk_i0DWZSk9me=+19uWL-f-sVQ@mail.gmail.com>
<6ED57509-8AEA-4370-86ED-9F9ED04CA719@barrys-emacs.org>
 by: Chris Angelico - Sun, 22 Aug 2021 11:03 UTC

On Sun, Aug 22, 2021 at 8:30 PM Barry Scott <barry@barrys-emacs.org> wrote:
>
>
>
> On 22 Aug 2021, at 10:37, Chris Angelico <rosuav@gmail.com> wrote:
>
> When it comes to security, one thing I'm very curious about is why we
> don't have any sort of certificate renewal verification. My browser
> could retain the certificates of some web site (or of all web sites,
> even - they're not THAT large), and if the site presents a different
> cert, it could show the previously retained one and challenge the
> server "prove that you're the same guy". This proof would consist of
> the latest cert, signed by the older cert's key (or possibly a chain
> that can construct such a proof, which would allow the server to
> simply retain each new cert signed by the one previous cert, forming a
> line - or a tree if necessary). My suspicion is that it'd add little
> above simply having a valid cert, but if people are paranoid, surely
> that's a better place to look?
>
>
> The web site proves it owners the hostname and/or IP address using its certificate.
> You use your trust store to show that you can trust that certificate.
>
> The fact that a certificate changes is not a reason to stop trusting a site.
>
> So it does not add anything.
>
> The pain point in PKI is revocation. The gold standard is for a web site to use OCSP stapling.
> But that is rare sadly. And because of issues with revocation lists, (privacy, latency, need to
> fail open on failiure, DoD vector, etc) this is where the paranoid should look.
>

Fair point. Let me give you a bit of context.

Recently, the owner/operator of a site (I'll call it
https://demo.example/ ) died. Other people, who have been using the
site extensively, wish for it to continue. If the domain registration
expires, anyone can reregister it, and can then generate a completely
new certificate for the common name "demo.example", and web browsers
will accept that. The old cert may or may not have expired, but it
won't be revoked.

As far as I can tell, a web browser with default settings will happily
accept the change of ownership. It won't care that the IP address,
certificate, etc, have all changed. It just acknowledges that some CA
has signed some certificate with the right common name. And therein is
the vulnerability. (NOTE: I'm not saying that this is a real and
practical vulnerability - this is theoretical only, and a focus for
the paranoid.)

This is true even if the old cert were one of those enhanced
certificates that some CAs try to upsell you to ("Extended Validation"
and friends). Even if, in the past, your bank was secured by one of
those certs, your browser will still accept a perfectly standard cert
next time. Which, in my opinion, renders those (quite pricey)
certificates no more secure than something from Let's Encrypt that has
no validation beyond ownership of DNS.

Of course, you can pin a certificate. You can ask your browser to warn
you if it's changed *at all*. But since certs expire, that's highly
impractical, hence wondering why we don't have a system for using the
old cert to prove ownership of the new one.

So how is a web browser supposed to distinguish between (a) normal
operation in which certs expire and are replaced, and (b) legit or
non-legit ownership changes? (Of course the browser can't tell you
whether the ownership change is legit, but out-of-band info can help
with that.)

Or does it really matter that little?

ChrisA

Re: basic auth request

<mailman.463.1629876694.4164.python-list@python.org>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=14737&group=comp.lang.python#14737

  copy link   Newsgroups: comp.lang.python
Path: i2pn2.org!i2pn.org!news.swapon.de!fu-berlin.de!uni-berlin.de!not-for-mail
From: ros...@gmail.com (Chris Angelico)
Newsgroups: comp.lang.python
Subject: Re: basic auth request
Date: Wed, 25 Aug 2021 17:31:21 +1000
Lines: 26
Message-ID: <mailman.463.1629876694.4164.python-list@python.org>
References: <CAPTjJmo0d_t3XG6KH++XhkStB5GyyFbtv=4Sj3tQXM_Sn-E5zA@mail.gmail.com>
<54465DA0-2977-4EAD-8CD2-C398F5ACF121@barrys-emacs.org>
<mailman.423.1629234918.4164.python-list@python.org>
<slrnshobjl.49p.jon+usenet@raven.unequivocal.eu>
<9bc605cb-2ceb-fed9-cd3f-d48a8fe405fb@everest.reportlab.co.uk>
<mailman.428.1629309989.4164.python-list@python.org>
<slrnshr4ia.78u.jon+usenet@raven.unequivocal.eu>
<20210821185411.ka66xkawv6mbpska@gmail.com>
<CAPTjJmpTU_ew8qe_GQKyE92cEDnRjjuMTPiwV--tVp4N+v4Lgw@mail.gmail.com>
<20210822084341.GA13245@hjp.at>
<CAPTjJmpnfo5cCawgCkJKugimFk_i0DWZSk9me=+19uWL-f-sVQ@mail.gmail.com>
<6ED57509-8AEA-4370-86ED-9F9ED04CA719@barrys-emacs.org>
<CAPTjJmqqE1fbf+cEZvcpj5wS07hoQWFhKGcv1CvyDf2HTrs_=g@mail.gmail.com>
<9A793671-1390-4CD6-914E-3D891225D2BC@barrys-emacs.org>
<CAPTjJmpJxQrcvm0NKOenfi9JQ-0YBFDtUD8vFuaF=fAnrO8p7g@mail.gmail.com>
Mime-Version: 1.0
Content-Type: text/plain; charset="UTF-8"
X-Trace: news.uni-berlin.de Od1VaVQv4hJq80/wAUkoQQXM9VwMwFCojeqINj3Q5t0w==
Return-Path: <rosuav@gmail.com>
X-Original-To: python-list@python.org
Delivered-To: python-list@mail.python.org
Authentication-Results: mail.python.org; dkim=pass
reason="2048-bit key; unprotected key"
header.d=gmail.com header.i=@gmail.com header.b=TQXMvSlt;
dkim-adsp=pass; dkim-atps=neutral
X-Spam-Status: OK 0.064
X-Spam-Evidence: '*H*': 0.87; '*S*': 0.00; 'parallel': 0.05; 'random':
0.05; 'certificates': 0.07; 'real-world': 0.07; 'aug': 0.09;
'barry': 0.09; 'dns': 0.09; 'received:209.85.219': 0.09; 'cert':
0.16; 'chrisa': 0.16; 'for.': 0.16; 'from:addr:rosuav': 0.16;
'from:name:chris angelico': 0.16; 'large-scale': 0.16;
'practice,': 0.16; 'server,': 0.16; 'ssl': 0.16; 'threat': 0.16;
'wrote:': 0.16; 'anyone': 0.23; 'to:addr:python-list': 0.23;
'probably': 0.24; 'certificate': 0.27; 'subject:request': 0.29;
'but': 0.31; 'question.': 0.31; 'difference': 0.32; 'right,':
0.32; 'to:name:python': 0.32; 'message-id:@mail.gmail.com': 0.33;
'server': 0.33; 'header:In-Reply-To:1': 0.33; 'same': 0.34;
'received:google.com': 0.34; 'from:addr:gmail.com': 0.35;
'changes': 0.37; 'change': 0.37; 'received:209.85': 0.38; "it's":
0.38; 'received:209': 0.38; 'does': 0.38; 'someone': 0.39;
'model': 0.60; 'well.': 0.61; 'gave': 0.61; 'skip:o 10': 0.62;
'down': 0.62; '25,': 0.63; 'named': 0.63; 'world': 0.64; 'your':
0.64; 'capable': 0.65; 'personal': 0.65; 'trust': 0.66; 'further':
0.68; 'counter': 0.69; 'low': 0.71; 'risk': 0.72; 'street': 0.74;
'business': 0.75; 'watch': 0.77; 'supposed': 0.77; '2021': 0.84;
'pretend': 0.84; 'scott': 0.84; 'threat.': 0.84; 'threats': 0.84
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
h=mime-version:references:in-reply-to:from:date:message-id:subject:to;
bh=bIiby99JelLzTk18H40s3UNMgDUgT+WeQZxx5Ad5cC8=;
b=TQXMvSlt46wOQKJE63MjHr0yGpb6GBkfRvyxqs1B+UA1s2USzv2/X2CqUbTH2ppUbT
lQAX/5c5+pG+hg+0BBrHE+vbevhewrziRT9ez3JLpIbEqF1tuToPnH6YTTirzn8vnTuu
EX5qCeMY3uBtlilUFfEZl28lyj+XzXfrJzfhPLjxmT3ka1n1Jg8eiRa9MlC1peF14tAU
/Evn9qisr/mdvHsh/dTuaX9nm0oq5A5owF5H9TvhLbrCpWWYYqIWl+x6dMHKuFzaZZk8
ScwKocrLOno1wc1HP6fza4Qc9I2dyEBvY4CdaQe2gEACXzgKcG2Ll7K5BUifCFN9iGnv
5mAA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20161025;
h=x-gm-message-state:mime-version:references:in-reply-to:from:date
:message-id:subject:to;
bh=bIiby99JelLzTk18H40s3UNMgDUgT+WeQZxx5Ad5cC8=;
b=tmbQvCSdJsL3gH02dLZ6ksxI6tEut8cEpBcqSypY4qa4ZA/PQe3Bv7sWgg1fX4ClMV
N4o13Q6+rYS0eBAKq6omabGvAw4zqVFT8ueR+ZN9hg/pX8mOegqex01mP9znmFXEJWBL
shLPFgJTj8C3Bl5VNnujD9Wvm8KRSYR0F6ChVWWw7ktiCe0CpSMjPi9Xf1wLkEl0IlQ9
Xkut0qO4We1idV0jkWqQqsR7sPuK7Vo/v5KFDElGqHfzFKE45L4C+eheFp7nSD2I45Ts
sLQ0+UPIXApLXOBSC06T2s+MxHcLC9hmUU8qvJ63aZ56+tyfhkdbc+gHgA5D+7ATOgMm
u7hw==
X-Gm-Message-State: AOAM532OK1AkoUmGPF7y8O6QSsjYJl5LPVl1NyWiq9CPUFahE+2JywZC
SlYOmWZV4A6ikADIxqM4vRnHUt8c9HYB+2rp1PZBgG3b
X-Google-Smtp-Source: ABdhPJymu98DAYVFkiliJllCrLKVL0csA/F9kYg26Lq5q7f7HVJciuPyhok9Bg9wiVRgwFwwtiLvjxpB6T59s6gZG9s=
X-Received: by 2002:a25:4902:: with SMTP id w2mr59677689yba.42.1629876691875;
Wed, 25 Aug 2021 00:31:31 -0700 (PDT)
In-Reply-To: <9A793671-1390-4CD6-914E-3D891225D2BC@barrys-emacs.org>
X-BeenThere: python-list@python.org
X-Mailman-Version: 2.1.34
Precedence: list
List-Id: General discussion list for the Python programming language
<python-list.python.org>
List-Unsubscribe: <https://mail.python.org/mailman/options/python-list>,
<mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive: <https://mail.python.org/pipermail/python-list/>
List-Post: <mailto:python-list@python.org>
List-Help: <mailto:python-list-request@python.org?subject=help>
List-Subscribe: <https://mail.python.org/mailman/listinfo/python-list>,
<mailto:python-list-request@python.org?subject=subscribe>
X-Mailman-Original-Message-ID: <CAPTjJmpJxQrcvm0NKOenfi9JQ-0YBFDtUD8vFuaF=fAnrO8p7g@mail.gmail.com>
X-Mailman-Original-References: <CAPTjJmo0d_t3XG6KH++XhkStB5GyyFbtv=4Sj3tQXM_Sn-E5zA@mail.gmail.com>
<54465DA0-2977-4EAD-8CD2-C398F5ACF121@barrys-emacs.org>
<mailman.423.1629234918.4164.python-list@python.org>
<slrnshobjl.49p.jon+usenet@raven.unequivocal.eu>
<9bc605cb-2ceb-fed9-cd3f-d48a8fe405fb@everest.reportlab.co.uk>
<mailman.428.1629309989.4164.python-list@python.org>
<slrnshr4ia.78u.jon+usenet@raven.unequivocal.eu>
<20210821185411.ka66xkawv6mbpska@gmail.com>
<CAPTjJmpTU_ew8qe_GQKyE92cEDnRjjuMTPiwV--tVp4N+v4Lgw@mail.gmail.com>
<20210822084341.GA13245@hjp.at>
<CAPTjJmpnfo5cCawgCkJKugimFk_i0DWZSk9me=+19uWL-f-sVQ@mail.gmail.com>
<6ED57509-8AEA-4370-86ED-9F9ED04CA719@barrys-emacs.org>
<CAPTjJmqqE1fbf+cEZvcpj5wS07hoQWFhKGcv1CvyDf2HTrs_=g@mail.gmail.com>
<9A793671-1390-4CD6-914E-3D891225D2BC@barrys-emacs.org>
 by: Chris Angelico - Wed, 25 Aug 2021 07:31 UTC

On Wed, Aug 25, 2021 at 5:20 PM Barry Scott <barry@barrys-emacs.org> wrote:
>
> Only if this threat model matters to you or your organisation.
> Personal its low down of the threats I watch out for.
>
> The on-line world and the real-world are the same here.
>
> If a business changes hands then do you trust the new owners?
>
> Nothing we do with PKI certificates will answer that question.

Fair enough; but a closer parallel would be walking up to a
previously-familiar street vendor and seeing a different person there.
Did the business change hands, or did some random dude hop over the
counter and pretend to be a new owner?

But you're right, it's not usually a particularly high risk threat.
Still, it does further weaken the value of named SSL certificates and
certificate authorities; there's not actually that much difference if
the server just gave you a self-signed cert. In theory, the CA is
supposed to protect you against someone doing a DNS hack and
substituting a different server, in practice, anyone capable of doing
a large-scale DNS hack is probably capable of getting a very
legit-looking SSL cert for the name as well.

ChrisA

Re: basic auth request

<slrnsic8l1.78u.jon+usenet@raven.unequivocal.eu>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=14738&group=comp.lang.python#14738

  copy link   Newsgroups: comp.lang.python
Path: i2pn2.org!i2pn.org!aioe.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: jon+use...@unequivocal.eu (Jon Ribbens)
Newsgroups: comp.lang.python
Subject: Re: basic auth request
Date: Wed, 25 Aug 2021 10:59:45 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 29
Message-ID: <slrnsic8l1.78u.jon+usenet@raven.unequivocal.eu>
References: <CAPTjJmo0d_t3XG6KH++XhkStB5GyyFbtv=4Sj3tQXM_Sn-E5zA@mail.gmail.com>
<54465DA0-2977-4EAD-8CD2-C398F5ACF121@barrys-emacs.org>
<mailman.423.1629234918.4164.python-list@python.org>
<slrnshobjl.49p.jon+usenet@raven.unequivocal.eu>
<9bc605cb-2ceb-fed9-cd3f-d48a8fe405fb@everest.reportlab.co.uk>
<mailman.428.1629309989.4164.python-list@python.org>
<slrnshr4ia.78u.jon+usenet@raven.unequivocal.eu>
<20210821185411.ka66xkawv6mbpska@gmail.com>
<CAPTjJmpTU_ew8qe_GQKyE92cEDnRjjuMTPiwV--tVp4N+v4Lgw@mail.gmail.com>
<20210822084341.GA13245@hjp.at>
<CAPTjJmpnfo5cCawgCkJKugimFk_i0DWZSk9me=+19uWL-f-sVQ@mail.gmail.com>
<6ED57509-8AEA-4370-86ED-9F9ED04CA719@barrys-emacs.org>
<CAPTjJmqqE1fbf+cEZvcpj5wS07hoQWFhKGcv1CvyDf2HTrs_=g@mail.gmail.com>
<9A793671-1390-4CD6-914E-3D891225D2BC@barrys-emacs.org>
<CAPTjJmpJxQrcvm0NKOenfi9JQ-0YBFDtUD8vFuaF=fAnrO8p7g@mail.gmail.com>
<mailman.463.1629876694.4164.python-list@python.org>
Injection-Date: Wed, 25 Aug 2021 10:59:45 -0000 (UTC)
Injection-Info: reader02.eternal-september.org; posting-host="1a96a8f636be90ba16916000a9535673";
logging-data="26124"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18RzG6h5B2oiyUD9YOQQRuDKl2u8+Lq4Ko="
User-Agent: slrn/1.0.3 (Linux)
Cancel-Lock: sha1:Ax6SwSZOOHG3oG0k4mqmDYVlbc8=
 by: Jon Ribbens - Wed, 25 Aug 2021 10:59 UTC

On 2021-08-25, Chris Angelico <rosuav@gmail.com> wrote:
> On Wed, Aug 25, 2021 at 5:20 PM Barry Scott <barry@barrys-emacs.org> wrote:
>> Only if this threat model matters to you or your organisation.
>> Personal its low down of the threats I watch out for.
>>
>> The on-line world and the real-world are the same here.
>>
>> If a business changes hands then do you trust the new owners?
>>
>> Nothing we do with PKI certificates will answer that question.
>
> Fair enough; but a closer parallel would be walking up to a
> previously-familiar street vendor and seeing a different person there.
> Did the business change hands, or did some random dude hop over the
> counter and pretend to be a new owner?
>
> But you're right, it's not usually a particularly high risk threat.
> Still, it does further weaken the value of named SSL certificates and
> certificate authorities; there's not actually that much difference if
> the server just gave you a self-signed cert. In theory, the CA is
> supposed to protect you against someone doing a DNS hack and
> substituting a different server, in practice, anyone capable of doing
> a large-scale DNS hack is probably capable of getting a very
> legit-looking SSL cert for the name as well.

There are so many trusted CAs these days that the chances of them all
being secure approaches zero - they are not all equal yet they are all
equally trusted. Which is why a change of CA on a site you have visited
before is potentially suspicious.

Re: basic auth request

<mailman.464.1629900991.4164.python-list@python.org>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=14739&group=comp.lang.python#14739

  copy link   Newsgroups: comp.lang.python
Path: i2pn2.org!i2pn.org!news.swapon.de!fu-berlin.de!uni-berlin.de!not-for-mail
From: bar...@barrys-emacs.org (Barry Scott)
Newsgroups: comp.lang.python
Subject: Re: basic auth request
Date: Wed, 25 Aug 2021 08:20:13 +0100
Lines: 110
Message-ID: <mailman.464.1629900991.4164.python-list@python.org>
References: <CAPTjJmo0d_t3XG6KH++XhkStB5GyyFbtv=4Sj3tQXM_Sn-E5zA@mail.gmail.com>
<54465DA0-2977-4EAD-8CD2-C398F5ACF121@barrys-emacs.org>
<mailman.423.1629234918.4164.python-list@python.org>
<slrnshobjl.49p.jon+usenet@raven.unequivocal.eu>
<9bc605cb-2ceb-fed9-cd3f-d48a8fe405fb@everest.reportlab.co.uk>
<mailman.428.1629309989.4164.python-list@python.org>
<slrnshr4ia.78u.jon+usenet@raven.unequivocal.eu>
<20210821185411.ka66xkawv6mbpska@gmail.com>
<CAPTjJmpTU_ew8qe_GQKyE92cEDnRjjuMTPiwV--tVp4N+v4Lgw@mail.gmail.com>
<20210822084341.GA13245@hjp.at>
<CAPTjJmpnfo5cCawgCkJKugimFk_i0DWZSk9me=+19uWL-f-sVQ@mail.gmail.com>
<6ED57509-8AEA-4370-86ED-9F9ED04CA719@barrys-emacs.org>
<CAPTjJmqqE1fbf+cEZvcpj5wS07hoQWFhKGcv1CvyDf2HTrs_=g@mail.gmail.com>
<9A793671-1390-4CD6-914E-3D891225D2BC@barrys-emacs.org>
Mime-Version: 1.0 (Mac OS X Mail 14.0 \(3654.120.0.1.13\))
Content-Type: text/plain;
charset=us-ascii
Content-Transfer-Encoding: quoted-printable
X-Trace: news.uni-berlin.de l2EkJCV3iqzx3g5mBw5vRQ/TqftTtyqm2V2Xdyzo08ew==
Return-Path: <barry@barrys-emacs.org>
X-Original-To: python-list@python.org
Delivered-To: python-list@mail.python.org
Authentication-Results: mail.python.org; dkim=none reason="no signature";
dkim-adsp=none (unprotected policy); dkim-atps=neutral
X-Spam-Status: OK 0.159
X-Spam-Level: *
X-Spam-Evidence: '*H*': 0.69; '*S*': 0.01; 'certificates': 0.07;
'real-world': 0.07; 'sun,': 0.07; 'url:mailman': 0.09;
'!important;"': 0.09; 'angelico': 0.09; 'aug': 0.09; 'barry':
0.09; 'cc:addr:python-list': 0.09; 'class="">': 0.09;
'class="">the': 0.09; 'construct': 0.09; 'dns': 0.09; 'encrypt':
0.09; 'from:addr:barry': 0.09; 'received:217.70': 0.09;
'received:gandi.net': 0.09; 'received:mail.gandi.net': 0.09;
'theoretical': 0.09; 'which,': 0.09; "can't": 0.14; '(b)': 0.16;
'(ca)': 0.16; 'cc:name:python': 0.16; 'cert': 0.16;
'certificate.': 0.16; 'changed.': 0.16; 'chrisa': 0.16;
'context.': 0.16; 'continue.': 0.16; 'for.': 0.16; 'from:addr
:barrys-emacs.org': 0.16; 'from:name:barry scott': 0.16; 'if,':
0.16; "it'd": 0.16; 'message-id:@barrys-emacs.org': 0.16;
'opinion,': 0.16; 'threat': 0.16; 'wrote:<span': 0.16; 'wrote:':
0.16; 'that.': 0.16; 'url:listinfo': 0.16; 'cc:addr:python.org':
0.19; 'name.': 0.20; 'url-ip:188.166.95.178/32': 0.20; 'url-
ip:188.166.95/24': 0.20; 'url-ip:188.166/16': 0.23; 'anyone':
0.23; 'chris': 0.26; 'settings': 0.26; 'registration': 0.26;
'cc:2**0': 0.27; 'certificate': 0.27; 'bit': 0.28; 'old': 0.28;
'default': 0.28; 'putting': 0.28; 'saying': 0.28; 'url-ip:188/8':
0.29; 'subject:request': 0.29; 'it,': 0.31; 'but': 0.31; 'fact':
0.31; 'question.': 0.31; 'wondering': 0.32; "i'm": 0.32; 'using':
0.33; 'server': 0.33; 'header:In-Reply-To:1': 0.33; 'same': 0.34;
'22,': 0.35; 'one.': 0.35; '0);': 0.36; 'rgb(0,': 0.36; 'auto;':
0.37; 'cases': 0.37; 'possibly': 0.37; 'changes': 0.37; 'key':
0.63; 'none;': 0.64; 'browser': 0.64; 'world': 0.64; 'your': 0.64;
'orphans:': 0.65; '0px;"': 0.65; 'only,': 0.65; 'owners': 0.65;
'validation': 0.65; 'above': 0.65; 'let': 0.65; 'personal': 0.65;
'0px;': 0.65; 'trust': 0.66; 'wish': 0.66; 'right': 0.66; 'years':
0.67; 'care': 0.67; 'lead': 0.67; 'skip:o 20': 0.67;
'received:217': 0.68; 'accept': 0.68; 'text-indent:': 0.68;
'normal;': 0.68; 'site': 0.69; 'higher': 0.69; 'matter': 0.69;
'url-ip:lookup error': 0.69; 'etc,': 0.69; 'none;"': 0.69;
'perfectly': 0.69; 'stores': 0.69; 'highly': 0.70; 'low': 0.71;
'domain': 0.74; 'float:': 0.74; 'little': 0.75; 'sites': 0.75;
'business': 0.75; 'bank': 0.76; 'watch': 0.77; 'chain': 0.77;
'gold': 0.77; 'issued': 0.77; 'pain': 0.77; 'secured': 0.77;
'supposed': 0.77; 'href=""': 0.79; 'quality': 0.83; '2021': 0.84;
'biggest': 0.84; 'extra': 0.84; 'practical': 0.84; 'about,': 0.84;
'authorities': 0.84; 'expire': 0.84; 'forming': 0.84; 'legit':
0.84; 'ownership.': 0.84; 'pin': 0.84; 'rare': 0.84; 'scott':
0.84; 'sites,': 0.84; 'threats': 0.84; 'trusting': 0.84;
'url:demo': 0.84; '13px;': 0.91; 'cas': 0.91; 'lose': 0.91;
'retain': 0.91; 'retained': 0.91
In-Reply-To: <CAPTjJmqqE1fbf+cEZvcpj5wS07hoQWFhKGcv1CvyDf2HTrs_=g@mail.gmail.com>
X-Mailer: Apple Mail (2.3654.120.0.1.13)
X-Mailman-Approved-At: Wed, 25 Aug 2021 10:16:30 -0400
X-Content-Filtered-By: Mailman/MimeDel 2.1.34
X-BeenThere: python-list@python.org
X-Mailman-Version: 2.1.34
Precedence: list
List-Id: General discussion list for the Python programming language
<python-list.python.org>
List-Unsubscribe: <https://mail.python.org/mailman/options/python-list>,
<mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive: <https://mail.python.org/pipermail/python-list/>
List-Post: <mailto:python-list@python.org>
List-Help: <mailto:python-list-request@python.org?subject=help>
List-Subscribe: <https://mail.python.org/mailman/listinfo/python-list>,
<mailto:python-list-request@python.org?subject=subscribe>
X-Mailman-Original-Message-ID: <9A793671-1390-4CD6-914E-3D891225D2BC@barrys-emacs.org>
X-Mailman-Original-References: <CAPTjJmo0d_t3XG6KH++XhkStB5GyyFbtv=4Sj3tQXM_Sn-E5zA@mail.gmail.com>
<54465DA0-2977-4EAD-8CD2-C398F5ACF121@barrys-emacs.org>
<mailman.423.1629234918.4164.python-list@python.org>
<slrnshobjl.49p.jon+usenet@raven.unequivocal.eu>
<9bc605cb-2ceb-fed9-cd3f-d48a8fe405fb@everest.reportlab.co.uk>
<mailman.428.1629309989.4164.python-list@python.org>
<slrnshr4ia.78u.jon+usenet@raven.unequivocal.eu>
<20210821185411.ka66xkawv6mbpska@gmail.com>
<CAPTjJmpTU_ew8qe_GQKyE92cEDnRjjuMTPiwV--tVp4N+v4Lgw@mail.gmail.com>
<20210822084341.GA13245@hjp.at>
<CAPTjJmpnfo5cCawgCkJKugimFk_i0DWZSk9me=+19uWL-f-sVQ@mail.gmail.com>
<6ED57509-8AEA-4370-86ED-9F9ED04CA719@barrys-emacs.org>
<CAPTjJmqqE1fbf+cEZvcpj5wS07hoQWFhKGcv1CvyDf2HTrs_=g@mail.gmail.com>
 by: Barry Scott - Wed, 25 Aug 2021 07:20 UTC

> On 22 Aug 2021, at 12:03, Chris Angelico <rosuav@gmail.com> wrote:
>
> On Sun, Aug 22, 2021 at 8:30 PM Barry Scott <barry@barrys-emacs.org <mailto:barry@barrys-emacs.org>> wrote:
>>
>>
>>
>> On 22 Aug 2021, at 10:37, Chris Angelico <rosuav@gmail.com> wrote:
>>
>> When it comes to security, one thing I'm very curious about is why we
>> don't have any sort of certificate renewal verification. My browser
>> could retain the certificates of some web site (or of all web sites,
>> even - they're not THAT large), and if the site presents a different
>> cert, it could show the previously retained one and challenge the
>> server "prove that you're the same guy". This proof would consist of
>> the latest cert, signed by the older cert's key (or possibly a chain
>> that can construct such a proof, which would allow the server to
>> simply retain each new cert signed by the one previous cert, forming a
>> line - or a tree if necessary). My suspicion is that it'd add little
>> above simply having a valid cert, but if people are paranoid, surely
>> that's a better place to look?
>>
>>
>> The web site proves it owners the hostname and/or IP address using its certificate.
>> You use your trust store to show that you can trust that certificate.
>>
>> The fact that a certificate changes is not a reason to stop trusting a site.
>>
>> So it does not add anything.
>>
>> The pain point in PKI is revocation. The gold standard is for a web site to use OCSP stapling.
>> But that is rare sadly. And because of issues with revocation lists, (privacy, latency, need to
>> fail open on failiure, DoD vector, etc) this is where the paranoid should look.
>>
>
> Fair point. Let me give you a bit of context.
>
> Recently, the owner/operator of a site (I'll call it
> https://demo.example/ <https://demo.example/> ) died. Other people, who have been using the
> site extensively, wish for it to continue. If the domain registration
> expires, anyone can reregister it, and can then generate a completely
> new certificate for the common name "demo.example", and web browsers
> will accept that. The old cert may or may not have expired, but it
> won't be revoked.
>
> As far as I can tell, a web browser with default settings will happily
> accept the change of ownership. It won't care that the IP address,
> certificate, etc, have all changed. It just acknowledges that some CA
> has signed some certificate with the right common name. And therein is
> the vulnerability. (NOTE: I'm not saying that this is a real and
> practical vulnerability - this is theoretical only, and a focus for
> the paranoid.)
>
> This is true even if the old cert were one of those enhanced
> certificates that some CAs try to upsell you to ("Extended Validation"
> and friends). Even if, in the past, your bank was secured by one of
> those certs, your browser will still accept a perfectly standard cert
> next time. Which, in my opinion, renders those (quite pricey)
> certificates no more secure than something from Let's Encrypt that has
> no validation beyond ownership of DNS.
>
> Of course, you can pin a certificate. You can ask your browser to warn
> you if it's changed *at all*. But since certs expire, that's highly
> impractical, hence wondering why we don't have a system for using the
> old cert to prove ownership of the new one.
>
> So how is a web browser supposed to distinguish between (a) normal
> operation in which certs expire and are replaced, and (b) legit or
> non-legit ownership changes? (Of course the browser can't tell you
> whether the ownership change is legit, but out-of-band info can help
> with that.)
>
> Or does it really matter that little?

Only if this threat model matters to you or your organisation.
Personal its low down of the threats I watch out for.

The on-line world and the real-world are the same here.

If a business changes hands then do you trust the new owners?

Nothing we do with PKI certificates will answer that question.

For web sites that we care a lot about, like banks, we trust that
the site owners take care to protect that site. This includes making
sure that they do not lose control of its DNS name and certificates.

One of the biggest issues for PKI in recent years has been
Certificate Authorities (CA) that issued certificates for web sites without
checking that ownership. In these cases it lead to the browsers
removing those CA's from the trust stores and also putting extra
rules on all CA's to do a higher quality job.

Barry

>
> ChrisA
> --
> https://mail.python.org/mailman/listinfo/python-list <https://mail.python.org/mailman/listinfo/python-list>

Re: basic auth request

<mailman.465.1629901161.4164.python-list@python.org>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=14740&group=comp.lang.python#14740

  copy link   Newsgroups: comp.lang.python
Path: i2pn2.org!i2pn.org!news.swapon.de!fu-berlin.de!uni-berlin.de!not-for-mail
From: ros...@gmail.com (Chris Angelico)
Newsgroups: comp.lang.python
Subject: Re: basic auth request
Date: Thu, 26 Aug 2021 00:19:07 +1000
Lines: 44
Message-ID: <mailman.465.1629901161.4164.python-list@python.org>
References: <CAPTjJmo0d_t3XG6KH++XhkStB5GyyFbtv=4Sj3tQXM_Sn-E5zA@mail.gmail.com>
<54465DA0-2977-4EAD-8CD2-C398F5ACF121@barrys-emacs.org>
<mailman.423.1629234918.4164.python-list@python.org>
<slrnshobjl.49p.jon+usenet@raven.unequivocal.eu>
<9bc605cb-2ceb-fed9-cd3f-d48a8fe405fb@everest.reportlab.co.uk>
<mailman.428.1629309989.4164.python-list@python.org>
<slrnshr4ia.78u.jon+usenet@raven.unequivocal.eu>
<20210821185411.ka66xkawv6mbpska@gmail.com>
<CAPTjJmpTU_ew8qe_GQKyE92cEDnRjjuMTPiwV--tVp4N+v4Lgw@mail.gmail.com>
<20210822084341.GA13245@hjp.at>
<CAPTjJmpnfo5cCawgCkJKugimFk_i0DWZSk9me=+19uWL-f-sVQ@mail.gmail.com>
<6ED57509-8AEA-4370-86ED-9F9ED04CA719@barrys-emacs.org>
<CAPTjJmqqE1fbf+cEZvcpj5wS07hoQWFhKGcv1CvyDf2HTrs_=g@mail.gmail.com>
<9A793671-1390-4CD6-914E-3D891225D2BC@barrys-emacs.org>
<CAPTjJmpJxQrcvm0NKOenfi9JQ-0YBFDtUD8vFuaF=fAnrO8p7g@mail.gmail.com>
<mailman.463.1629876694.4164.python-list@python.org>
<slrnsic8l1.78u.jon+usenet@raven.unequivocal.eu>
<CAPTjJmqj45U_iiT+D2LKcF-kQZM0f7J=DNL9bCCU+-hfEAXjyw@mail.gmail.com>
Mime-Version: 1.0
Content-Type: text/plain; charset="UTF-8"
X-Trace: news.uni-berlin.de 4lFZ23mLAwHG6UfkFxZBkQeNHXXqg2imLbOrmYhqVBNQ==
Return-Path: <rosuav@gmail.com>
X-Original-To: python-list@python.org
Delivered-To: python-list@mail.python.org
Authentication-Results: mail.python.org; dkim=pass
reason="2048-bit key; unprotected key"
header.d=gmail.com header.i=@gmail.com header.b=mnFdNMwj;
dkim-adsp=pass; dkim-atps=neutral
X-Spam-Status: OK 0.053
X-Spam-Evidence: '*H*': 0.89; '*S*': 0.00; 'everyone,': 0.03;
'chances': 0.05; 'parallel': 0.05; 'random': 0.05; '26,': 0.07;
'certificates': 0.07; 'real-world': 0.07; 'angelico': 0.09;
'approaches': 0.09; 'aug': 0.09; 'barry': 0.09; 'dns': 0.09;
'cert': 0.16; 'chrisa': 0.16; 'conclusion': 0.16; 'equally': 0.16;
'for.': 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris
angelico': 0.16; 'large-scale': 0.16; 'practice,': 0.16;
'server,': 0.16; 'ssl': 0.16; 'threat': 0.16; 'transitioned':
0.16; 'wrote:': 0.16; 'thu,': 0.20; "i've": 0.22; 'anyone': 0.23;
'to:addr:python-list': 0.23; 'probably': 0.24; 'chris': 0.26;
'certificate': 0.27; 'subject:request': 0.29; '(and': 0.30;
'there': 0.31; 'but': 0.31; 'question.': 0.31; "doesn't": 0.32;
'difference': 0.32; 'python-list': 0.32; 'right,': 0.32;
'to:name:python': 0.32; 'zero': 0.32; 'message-
id:@mail.gmail.com': 0.33; 'received:209.85.166': 0.33; 'server':
0.33; 'header:In-Reply-To:1': 0.33; 'same': 0.34;
'received:google.com': 0.34; 'from:addr:gmail.com': 0.35;
'changes': 0.37; 'change': 0.37; 'really': 0.37;
'received:209.85': 0.38; "it's": 0.38; 'received:209': 0.38;
'use': 0.38; 'does': 0.38; 'someone': 0.39; 'model': 0.60; 'days':
0.61; 'well.': 0.61; 'gave': 0.61; 'skip:o 10': 0.62; 'down':
0.62; '25,': 0.63; "you'd": 0.63; 'named': 0.63; 'security': 0.64;
'world': 0.64; 'your': 0.64; 'capable': 0.65; 'too.': 0.65;
'visited': 0.65; 'personal': 0.65; 'trust': 0.66; 'popular': 0.67;
'nearly': 0.68; 'further': 0.68; 'site': 0.69; 'matter': 0.69;
'counter': 0.69; 'low': 0.71; 'risk': 0.72; 'street': 0.74;
'sites': 0.75; 'business': 0.75; 'watch': 0.77; 'potentially':
0.77; 'supposed': 0.77; '2021': 0.84; 'jon': 0.84; 'pretend':
0.84; 'scott': 0.84; 'threat.': 0.84; 'threats': 0.84; 'cas':
0.91; 'trusted': 0.93
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
h=mime-version:references:in-reply-to:from:date:message-id:subject:to;
bh=2oZRONup7gNeIO9TB/BztiAiZK1covZ4TJoqCyoiM7U=;
b=mnFdNMwj1X1DXdWKiLCKHA1HEnx3d8tkBQN6Vy6Fi5rfu3hR0Bvp6xfg3TLuRxjWIl
15AWQTIBxyLWghUn0Y+kFKYVCMI2hkjZF51+Mk3+ux1MFnkaNtsco+e38HMttLF0EGjl
WElymkz8sutrmE5puIVkPVZZUeB920lXxQsrfdf0NLQET2xlNY2fg656ANOqIk3Th9Pp
BzbNzrcKRbgJd5eNv3o6TnfZB3NHkivoUScOgOXAtImBBtLVoFKeCfjO7EQrjlsC6dek
Uhp2Nmrw3QTvCJkeZPvzs6kpwnCajjo1M52C+G+G/p+aIpYe27Ll7SjVTqD/nKeyC9LC
ZOMg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20161025;
h=x-gm-message-state:mime-version:references:in-reply-to:from:date
:message-id:subject:to;
bh=2oZRONup7gNeIO9TB/BztiAiZK1covZ4TJoqCyoiM7U=;
b=gNg3+mLB7H7x9k+xDwYfOSUAopm7CPCLe5K9tUKqR78L869k3/P1bZx7xLp91vVp+p
A0iK2jw98TR2VURe9vVR1x8V9HZva6gJmmsmtR2pXnICdg2XpCxFdj6pC98Znj6L9MhB
qbmNKp9LTvbdE2JeDwjX8WQuzzzkFfKQISch9SvjFSrw9ju+CL+e+d0+JxXtt2CdbyB5
CslM4F9fycYBWM1JXh+KBVrJ1bQSETnNCUTNxrTg8exzXbxeFBHEE5ETeGzxkULNCBnn
Wwqna/xDlD5hX+UQGmaxZbZXWvA7pm9sz6p/Dqeau/RtS41E2cGMt0w+YOkWrtpVzvJg
5H5A==
X-Gm-Message-State: AOAM5315yE5xMR4+il3nfZvWfQyKp8XMhSA4OgcUDBx81wJnc1vTIMJ5
t4tz9Ntm63db3CD2BtqElvJcYyHX5zqZxU7hk1oplbMg
X-Google-Smtp-Source: ABdhPJxsAZ3DeA3BUyWht23w8LaMGgWiZ7wb/btLoaGWaJTB3Gwx0SeXbj9YSn2RQmilNW2QgnJhqYaeBCVC1JpZt+o=
X-Received: by 2002:a5e:db06:: with SMTP id q6mr35916662iop.24.1629901158918;
Wed, 25 Aug 2021 07:19:18 -0700 (PDT)
In-Reply-To: <slrnsic8l1.78u.jon+usenet@raven.unequivocal.eu>
X-BeenThere: python-list@python.org
X-Mailman-Version: 2.1.34
Precedence: list
List-Id: General discussion list for the Python programming language
<python-list.python.org>
List-Unsubscribe: <https://mail.python.org/mailman/options/python-list>,
<mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive: <https://mail.python.org/pipermail/python-list/>
List-Post: <mailto:python-list@python.org>
List-Help: <mailto:python-list-request@python.org?subject=help>
List-Subscribe: <https://mail.python.org/mailman/listinfo/python-list>,
<mailto:python-list-request@python.org?subject=subscribe>
X-Mailman-Original-Message-ID: <CAPTjJmqj45U_iiT+D2LKcF-kQZM0f7J=DNL9bCCU+-hfEAXjyw@mail.gmail.com>
X-Mailman-Original-References: <CAPTjJmo0d_t3XG6KH++XhkStB5GyyFbtv=4Sj3tQXM_Sn-E5zA@mail.gmail.com>
<54465DA0-2977-4EAD-8CD2-C398F5ACF121@barrys-emacs.org>
<mailman.423.1629234918.4164.python-list@python.org>
<slrnshobjl.49p.jon+usenet@raven.unequivocal.eu>
<9bc605cb-2ceb-fed9-cd3f-d48a8fe405fb@everest.reportlab.co.uk>
<mailman.428.1629309989.4164.python-list@python.org>
<slrnshr4ia.78u.jon+usenet@raven.unequivocal.eu>
<20210821185411.ka66xkawv6mbpska@gmail.com>
<CAPTjJmpTU_ew8qe_GQKyE92cEDnRjjuMTPiwV--tVp4N+v4Lgw@mail.gmail.com>
<20210822084341.GA13245@hjp.at>
<CAPTjJmpnfo5cCawgCkJKugimFk_i0DWZSk9me=+19uWL-f-sVQ@mail.gmail.com>
<6ED57509-8AEA-4370-86ED-9F9ED04CA719@barrys-emacs.org>
<CAPTjJmqqE1fbf+cEZvcpj5wS07hoQWFhKGcv1CvyDf2HTrs_=g@mail.gmail.com>
<9A793671-1390-4CD6-914E-3D891225D2BC@barrys-emacs.org>
<CAPTjJmpJxQrcvm0NKOenfi9JQ-0YBFDtUD8vFuaF=fAnrO8p7g@mail.gmail.com>
<mailman.463.1629876694.4164.python-list@python.org>
<slrnsic8l1.78u.jon+usenet@raven.unequivocal.eu>
 by: Chris Angelico - Wed, 25 Aug 2021 14:19 UTC

On Thu, Aug 26, 2021 at 12:16 AM Jon Ribbens via Python-list
<python-list@python.org> wrote:
>
> On 2021-08-25, Chris Angelico <rosuav@gmail.com> wrote:
> > On Wed, Aug 25, 2021 at 5:20 PM Barry Scott <barry@barrys-emacs.org> wrote:
> >> Only if this threat model matters to you or your organisation.
> >> Personal its low down of the threats I watch out for.
> >>
> >> The on-line world and the real-world are the same here.
> >>
> >> If a business changes hands then do you trust the new owners?
> >>
> >> Nothing we do with PKI certificates will answer that question.
> >
> > Fair enough; but a closer parallel would be walking up to a
> > previously-familiar street vendor and seeing a different person there.
> > Did the business change hands, or did some random dude hop over the
> > counter and pretend to be a new owner?
> >
> > But you're right, it's not usually a particularly high risk threat.
> > Still, it does further weaken the value of named SSL certificates and
> > certificate authorities; there's not actually that much difference if
> > the server just gave you a self-signed cert. In theory, the CA is
> > supposed to protect you against someone doing a DNS hack and
> > substituting a different server, in practice, anyone capable of doing
> > a large-scale DNS hack is probably capable of getting a very
> > legit-looking SSL cert for the name as well.
>
> There are so many trusted CAs these days that the chances of them all
> being secure approaches zero - they are not all equal yet they are all
> equally trusted. Which is why a change of CA on a site you have visited
> before is potentially suspicious.

Do any popular web browsers notify you if that happens? I've certainly
never noticed it with any that I use (and I've transitioned several
sites from one CA to another).

I've come to the conclusion that most security threats don't bother
most people, and that security *warnings* bother nearly everyone, so
real authentication of servers doesn't really matter all that much.
*Encryption* does still have value, but you'd get that with a
self-signed cert too.

ChrisA

Re: basic auth request

<slrnsicla6.78u.jon+usenet@raven.unequivocal.eu>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=14741&group=comp.lang.python#14741

  copy link   Newsgroups: comp.lang.python
Path: i2pn2.org!i2pn.org!aioe.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: jon+use...@unequivocal.eu (Jon Ribbens)
Newsgroups: comp.lang.python
Subject: Re: basic auth request
Date: Wed, 25 Aug 2021 14:35:50 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 31
Message-ID: <slrnsicla6.78u.jon+usenet@raven.unequivocal.eu>
References: <CAPTjJmo0d_t3XG6KH++XhkStB5GyyFbtv=4Sj3tQXM_Sn-E5zA@mail.gmail.com>
<slrnshobjl.49p.jon+usenet@raven.unequivocal.eu>
<9bc605cb-2ceb-fed9-cd3f-d48a8fe405fb@everest.reportlab.co.uk>
<mailman.428.1629309989.4164.python-list@python.org>
<slrnshr4ia.78u.jon+usenet@raven.unequivocal.eu>
<20210821185411.ka66xkawv6mbpska@gmail.com>
<CAPTjJmpTU_ew8qe_GQKyE92cEDnRjjuMTPiwV--tVp4N+v4Lgw@mail.gmail.com>
<20210822084341.GA13245@hjp.at>
<CAPTjJmpnfo5cCawgCkJKugimFk_i0DWZSk9me=+19uWL-f-sVQ@mail.gmail.com>
<6ED57509-8AEA-4370-86ED-9F9ED04CA719@barrys-emacs.org>
<CAPTjJmqqE1fbf+cEZvcpj5wS07hoQWFhKGcv1CvyDf2HTrs_=g@mail.gmail.com>
<9A793671-1390-4CD6-914E-3D891225D2BC@barrys-emacs.org>
<CAPTjJmpJxQrcvm0NKOenfi9JQ-0YBFDtUD8vFuaF=fAnrO8p7g@mail.gmail.com>
<mailman.463.1629876694.4164.python-list@python.org>
<slrnsic8l1.78u.jon+usenet@raven.unequivocal.eu>
<CAPTjJmqj45U_iiT+D2LKcF-kQZM0f7J=DNL9bCCU+-hfEAXjyw@mail.gmail.com>
<mailman.465.1629901161.4164.python-list@python.org>
Injection-Date: Wed, 25 Aug 2021 14:35:50 -0000 (UTC)
Injection-Info: reader02.eternal-september.org; posting-host="1a96a8f636be90ba16916000a9535673";
logging-data="900"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/NEdH2K9uqYDFidjyMB23M/EIYCGSU+80="
User-Agent: slrn/1.0.3 (Linux)
Cancel-Lock: sha1:HMuUt/lpZqMEobVoz6P5pBj+E4A=
 by: Jon Ribbens - Wed, 25 Aug 2021 14:35 UTC

On 2021-08-25, Chris Angelico <rosuav@gmail.com> wrote:
> On Thu, Aug 26, 2021 at 12:16 AM Jon Ribbens via Python-list
><python-list@python.org> wrote:
>> There are so many trusted CAs these days that the chances of them all
>> being secure approaches zero - they are not all equal yet they are all
>> equally trusted. Which is why a change of CA on a site you have visited
>> before is potentially suspicious.
>
> Do any popular web browsers notify you if that happens? I've certainly
> never noticed it with any that I use (and I've transitioned several
> sites from one CA to another).

There was, if the site was using "HTTP Public Key Pinning". But
that appears to have now been removed in favour of "Certificate
Transparency", which to me seems to be a system very much based
on the "problem: horse gone; solution: shut stable door" principle.

Another attempt at combatting this problem is DNS CAA records,
which are a way of politely asking all CAs in the world except the
ones you choose "please don't issue a certificate for my domain".
By definition someone who had hacked a CA would pay no attention
to that request, of course.

> I've come to the conclusion that most security threats don't bother
> most people, and that security *warnings* bother nearly everyone, so
> real authentication of servers doesn't really matter all that much.
> *Encryption* does still have value, but you'd get that with a
> self-signed cert too.

Encryption without knowing who you're encrypting *to* is worthless,
it's pretty much functionally equivalent to not encrypting.

Re: basic auth request

<mailman.466.1629903975.4164.python-list@python.org>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=14742&group=comp.lang.python#14742

  copy link   Newsgroups: comp.lang.python
Path: i2pn2.org!i2pn.org!news.uzoreto.com!fu-berlin.de!uni-berlin.de!not-for-mail
From: ros...@gmail.com (Chris Angelico)
Newsgroups: comp.lang.python
Subject: Re: basic auth request
Date: Thu, 26 Aug 2021 01:06:01 +1000
Lines: 61
Message-ID: <mailman.466.1629903975.4164.python-list@python.org>
References: <CAPTjJmo0d_t3XG6KH++XhkStB5GyyFbtv=4Sj3tQXM_Sn-E5zA@mail.gmail.com>
<slrnshobjl.49p.jon+usenet@raven.unequivocal.eu>
<9bc605cb-2ceb-fed9-cd3f-d48a8fe405fb@everest.reportlab.co.uk>
<mailman.428.1629309989.4164.python-list@python.org>
<slrnshr4ia.78u.jon+usenet@raven.unequivocal.eu>
<20210821185411.ka66xkawv6mbpska@gmail.com>
<CAPTjJmpTU_ew8qe_GQKyE92cEDnRjjuMTPiwV--tVp4N+v4Lgw@mail.gmail.com>
<20210822084341.GA13245@hjp.at>
<CAPTjJmpnfo5cCawgCkJKugimFk_i0DWZSk9me=+19uWL-f-sVQ@mail.gmail.com>
<6ED57509-8AEA-4370-86ED-9F9ED04CA719@barrys-emacs.org>
<CAPTjJmqqE1fbf+cEZvcpj5wS07hoQWFhKGcv1CvyDf2HTrs_=g@mail.gmail.com>
<9A793671-1390-4CD6-914E-3D891225D2BC@barrys-emacs.org>
<CAPTjJmpJxQrcvm0NKOenfi9JQ-0YBFDtUD8vFuaF=fAnrO8p7g@mail.gmail.com>
<mailman.463.1629876694.4164.python-list@python.org>
<slrnsic8l1.78u.jon+usenet@raven.unequivocal.eu>
<CAPTjJmqj45U_iiT+D2LKcF-kQZM0f7J=DNL9bCCU+-hfEAXjyw@mail.gmail.com>
<mailman.465.1629901161.4164.python-list@python.org>
<slrnsicla6.78u.jon+usenet@raven.unequivocal.eu>
<CAPTjJmpvJuwYm2ZbvXap+6zzYMdurLVDWULV-KwqPROi+J1d_A@mail.gmail.com>
Mime-Version: 1.0
Content-Type: text/plain; charset="UTF-8"
X-Trace: news.uni-berlin.de sXUtOqejWrne1YQiyiwOPgRIqqGiO2Ku/Vq3glDhtJ4Q==
Return-Path: <rosuav@gmail.com>
X-Original-To: python-list@python.org
Delivered-To: python-list@mail.python.org
Authentication-Results: mail.python.org; dkim=pass
reason="2048-bit key; unprotected key"
header.d=gmail.com header.i=@gmail.com header.b=e6N/qmJo;
dkim-adsp=pass; dkim-atps=neutral
X-Spam-Status: OK 0.079
X-Spam-Evidence: '*H*': 0.84; '*S*': 0.00; 'everyone,': 0.03; '"it':
0.05; 'chances': 0.05; '26,': 0.07; 'fake': 0.07; 'http': 0.07;
'that?': 0.07; 'angelico': 0.09; 'approaches': 0.09; 'attack,':
0.09; 'aug': 0.09; 'dns': 0.09; 'problem': 0.15; '(it': 0.16;
'cert': 0.16; 'chrisa': 0.16; 'conclusion': 0.16; 'encryption':
0.16; 'equally': 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris
angelico': 0.16; 'hypothetical': 0.16; 'large-scale': 0.16;
'seen.': 0.16; 'shut': 0.16; 'solution:': 0.16; 'transitioned':
0.16; 'wrote:': 0.16; 'maybe': 0.20; 'thu,': 0.20; 'issue': 0.20;
'goes': 0.22; "i've": 0.22; 'to:addr:python-list': 0.23; 'chris':
0.26; 'seems': 0.26; 'certificate': 0.27; 'course.': 0.27; 'old':
0.28; 'request.': 0.28; "isn't": 0.29; 'subject:request': 0.29;
'coming': 0.29; '(and': 0.30; 'there': 0.31; 'but': 0.31;
'approach': 0.31; "doesn't": 0.32; "i'm": 0.32; 'python-list':
0.32; 'records,': 0.32; 'to:name:python': 0.32; "wouldn't": 0.32;
'zero': 0.32; 'message-id:@mail.gmail.com': 0.33; 'using': 0.33;
'present': 0.33; 'received:209.85.166': 0.33; 'server': 0.33;
'header:In-Reply-To:1': 0.33; 'attempt': 0.34; 'same': 0.34;
'received:google.com': 0.34; "we're": 0.35; 'appears': 0.35;
'from:addr:gmail.com': 0.35; 'able': 0.36; 'way': 0.37; 'change':
0.37; 'really': 0.37; 'received:209.85': 0.38; "it's": 0.38;
'something': 0.38; 'received:209': 0.38; 'use': 0.38; 'does':
0.38; 'someone': 0.39; 'require': 0.40; 'could': 0.40; 'pretty':
0.40; 'but,': 0.61; 'days': 0.61; 'choose': 0.62; 'upon': 0.63;
"you'd": 0.63; 'key': 0.63; 'security': 0.64; 'pay': 0.64;
'earlier': 0.64; 'per': 0.64; 'world': 0.64; 'cost': 0.64; 'back':
0.65; 'essential': 0.65; 'too.': 0.65; 'visited': 0.65; 'popular':
0.67; 'nearly': 0.68; 'prevent': 0.68; 'site': 0.69; '100%': 0.69;
'matter': 0.69; 'url-ip:lookup error': 0.69; 'knowing': 0.71;
'attention': 0.74; 'sites': 0.75; 'chain': 0.77; 'confidence':
0.77; 'hacked': 0.77; 'potentially': 0.77; 'client': 0.79; '2021':
0.84; 'extra': 0.84; 'jon': 0.84; 'legit': 0.84; 'massive': 0.84;
'politely': 0.84; 'threats': 0.84; 'traffic': 0.88; 'cas': 0.91;
'reliable.': 0.91; 'retain': 0.91; 'stable': 0.91; 'was,': 0.91;
'trusted': 0.93
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
h=mime-version:references:in-reply-to:from:date:message-id:subject:to;
bh=K4hmELkqyFcj072spooRjgfzs0X1UoCRH4RaBniTF+s=;
b=e6N/qmJoiCKq56WOF34BawueYj6RsTV7WRMtOwzao42mQuSrHvutDMg1VxQZ7rnH0q
5mAagGO5dvbHJeFsm0t1sd7K7ImMUe5NJmnqKdlRfLqOwksjZzU8SNuEhZg5Yd8eYmr7
kS6dTueuBPeKLaymMt/8fz+VoiToYGioHmY5bL/UNLMA8euHaTO/TP7D5AsIMtUD7LU+
+Lqn3fGzoeeE7W9PDVKrCuUDXVm48+MN7ZXsnUZiLN9ClJzlMWML3M+bTzkJM9JMg6Vr
z2gG0P+iDoC0IZegS4c0aK8gvJ6VJLHompSYWbS48e4K4/yQyMKNY87Cbj6m0cNQ7G7M
XP0Q==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20161025;
h=x-gm-message-state:mime-version:references:in-reply-to:from:date
:message-id:subject:to;
bh=K4hmELkqyFcj072spooRjgfzs0X1UoCRH4RaBniTF+s=;
b=Of6h36gYvWExl80MGaLv+HzebHi+VM95wI597gkmndAwqldUEHBQ9VsM1P2xuLKnRr
Mea3cpvjIul3AlhcDK5JTgvQNC5GO3Jp/NKNUFEe3tM8UgYvjMqxhasQYadi4jnI/5e3
GPxk4xNdb1mc9XdpqkmzXHVmHB1Iak4pWd+MiJiP1AazNcbSr/qh+MCJW3CWbq9DkMR3
nwI5EPYdAoo55eNG4e2u/1+oaZKWNZZR5GBs3xN7vvAn4xWf0ry/jZfjV+Yeoo08XTIk
A2CfNTN3ZLUecrfiYTP1b+3KWI/yD4LwJOoITzNmpZ1vU2pWcHOf942TJFSGbNigHDXv
NIBg==
X-Gm-Message-State: AOAM532cCQh031/xCMoIPX5injPS0FxSnfgYsYPJr3BV1+YzsL0Qe5WT
B2IyHEh3n6cFbfZK9eoH+Yx4v/zXXHlkK0MIbQuRh9UL
X-Google-Smtp-Source: ABdhPJwlN4iZnCUWHN86ReeHtsayxnKc8Sr3Fow+o5Ih4ePh0LUA9fYsYmCBdxdzrzEyleVnxe4gLWPXoREHPGE7VjQ=
X-Received: by 2002:a5e:db06:: with SMTP id q6mr36095464iop.24.1629903972680;
Wed, 25 Aug 2021 08:06:12 -0700 (PDT)
In-Reply-To: <slrnsicla6.78u.jon+usenet@raven.unequivocal.eu>
X-BeenThere: python-list@python.org
X-Mailman-Version: 2.1.34
Precedence: list
List-Id: General discussion list for the Python programming language
<python-list.python.org>
List-Unsubscribe: <https://mail.python.org/mailman/options/python-list>,
<mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive: <https://mail.python.org/pipermail/python-list/>
List-Post: <mailto:python-list@python.org>
List-Help: <mailto:python-list-request@python.org?subject=help>
List-Subscribe: <https://mail.python.org/mailman/listinfo/python-list>,
<mailto:python-list-request@python.org?subject=subscribe>
X-Mailman-Original-Message-ID: <CAPTjJmpvJuwYm2ZbvXap+6zzYMdurLVDWULV-KwqPROi+J1d_A@mail.gmail.com>
X-Mailman-Original-References: <CAPTjJmo0d_t3XG6KH++XhkStB5GyyFbtv=4Sj3tQXM_Sn-E5zA@mail.gmail.com>
<slrnshobjl.49p.jon+usenet@raven.unequivocal.eu>
<9bc605cb-2ceb-fed9-cd3f-d48a8fe405fb@everest.reportlab.co.uk>
<mailman.428.1629309989.4164.python-list@python.org>
<slrnshr4ia.78u.jon+usenet@raven.unequivocal.eu>
<20210821185411.ka66xkawv6mbpska@gmail.com>
<CAPTjJmpTU_ew8qe_GQKyE92cEDnRjjuMTPiwV--tVp4N+v4Lgw@mail.gmail.com>
<20210822084341.GA13245@hjp.at>
<CAPTjJmpnfo5cCawgCkJKugimFk_i0DWZSk9me=+19uWL-f-sVQ@mail.gmail.com>
<6ED57509-8AEA-4370-86ED-9F9ED04CA719@barrys-emacs.org>
<CAPTjJmqqE1fbf+cEZvcpj5wS07hoQWFhKGcv1CvyDf2HTrs_=g@mail.gmail.com>
<9A793671-1390-4CD6-914E-3D891225D2BC@barrys-emacs.org>
<CAPTjJmpJxQrcvm0NKOenfi9JQ-0YBFDtUD8vFuaF=fAnrO8p7g@mail.gmail.com>
<mailman.463.1629876694.4164.python-list@python.org>
<slrnsic8l1.78u.jon+usenet@raven.unequivocal.eu>
<CAPTjJmqj45U_iiT+D2LKcF-kQZM0f7J=DNL9bCCU+-hfEAXjyw@mail.gmail.com>
<mailman.465.1629901161.4164.python-list@python.org>
<slrnsicla6.78u.jon+usenet@raven.unequivocal.eu>
 by: Chris Angelico - Wed, 25 Aug 2021 15:06 UTC

On Thu, Aug 26, 2021 at 12:48 AM Jon Ribbens via Python-list
<python-list@python.org> wrote:
>
> On 2021-08-25, Chris Angelico <rosuav@gmail.com> wrote:
> > On Thu, Aug 26, 2021 at 12:16 AM Jon Ribbens via Python-list
> ><python-list@python.org> wrote:
> >> There are so many trusted CAs these days that the chances of them all
> >> being secure approaches zero - they are not all equal yet they are all
> >> equally trusted. Which is why a change of CA on a site you have visited
> >> before is potentially suspicious.
> >
> > Do any popular web browsers notify you if that happens? I've certainly
> > never noticed it with any that I use (and I've transitioned several
> > sites from one CA to another).
>
> There was, if the site was using "HTTP Public Key Pinning". But
> that appears to have now been removed in favour of "Certificate
> Transparency", which to me seems to be a system very much based
> on the "problem: horse gone; solution: shut stable door" principle.
>
> Another attempt at combatting this problem is DNS CAA records,
> which are a way of politely asking all CAs in the world except the
> ones you choose "please don't issue a certificate for my domain".
> By definition someone who had hacked a CA would pay no attention
> to that request, of course.

True, but that would still prevent legit CAs from unwittingly
contributing to an attack. But it still wouldn't help if someone can
do any sort of large-scale DNS attack, which is kinda essential for
most of this to matter anyway (it doesn't matter if an attacker has a
fake cert if all traffic goes to the legit site anyway).

> > I've come to the conclusion that most security threats don't bother
> > most people, and that security *warnings* bother nearly everyone, so
> > real authentication of servers doesn't really matter all that much.
> > *Encryption* does still have value, but you'd get that with a
> > self-signed cert too.
>
> Encryption without knowing who you're encrypting *to* is worthless,
> it's pretty much functionally equivalent to not encrypting.

Somewhat. It does prevent various forms of MitM attack. It's all about
adding extra difficulties on an attacker, so I wouldn't say
"worthless", just because it isn't 100% reliable.

Earlier I posited a hypothetical approach wherein the server would
sign a new cert using the old cert, and would then be able to present
that upon request. Are there any massive glaring problems with that?
(Actually, I'm pretty sure there will be. Lemme reword. What massive
glaring problems can you see with that?) It would require servers to
retain a chain of certificates, and to be able to provide that upon
request. It wouldn't even need a change to HTTP per se - could be
something like "https://your.host.example/cert_proof.txt" the same way
that robots.txt is done. In theory, that would allow a client to, at
the cost of retaining the one last-seen cert for each site, have
confidence that the site is the same one that was previously seen.

But, maybe we're just coming back to "it doesn't matter and nobody
really cares".

ChrisA

Re: basic auth request

<slrnsicpge.78u.jon+usenet@raven.unequivocal.eu>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=14743&group=comp.lang.python#14743

  copy link   Newsgroups: comp.lang.python
Path: i2pn2.org!i2pn.org!aioe.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: jon+use...@unequivocal.eu (Jon Ribbens)
Newsgroups: comp.lang.python
Subject: Re: basic auth request
Date: Wed, 25 Aug 2021 15:47:26 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 30
Message-ID: <slrnsicpge.78u.jon+usenet@raven.unequivocal.eu>
References: <CAPTjJmo0d_t3XG6KH++XhkStB5GyyFbtv=4Sj3tQXM_Sn-E5zA@mail.gmail.com>
<slrnshr4ia.78u.jon+usenet@raven.unequivocal.eu>
<20210821185411.ka66xkawv6mbpska@gmail.com>
<CAPTjJmpTU_ew8qe_GQKyE92cEDnRjjuMTPiwV--tVp4N+v4Lgw@mail.gmail.com>
<20210822084341.GA13245@hjp.at>
<CAPTjJmpnfo5cCawgCkJKugimFk_i0DWZSk9me=+19uWL-f-sVQ@mail.gmail.com>
<6ED57509-8AEA-4370-86ED-9F9ED04CA719@barrys-emacs.org>
<CAPTjJmqqE1fbf+cEZvcpj5wS07hoQWFhKGcv1CvyDf2HTrs_=g@mail.gmail.com>
<9A793671-1390-4CD6-914E-3D891225D2BC@barrys-emacs.org>
<CAPTjJmpJxQrcvm0NKOenfi9JQ-0YBFDtUD8vFuaF=fAnrO8p7g@mail.gmail.com>
<mailman.463.1629876694.4164.python-list@python.org>
<slrnsic8l1.78u.jon+usenet@raven.unequivocal.eu>
<CAPTjJmqj45U_iiT+D2LKcF-kQZM0f7J=DNL9bCCU+-hfEAXjyw@mail.gmail.com>
<mailman.465.1629901161.4164.python-list@python.org>
<slrnsicla6.78u.jon+usenet@raven.unequivocal.eu>
<CAPTjJmpvJuwYm2ZbvXap+6zzYMdurLVDWULV-KwqPROi+J1d_A@mail.gmail.com>
<mailman.466.1629903975.4164.python-list@python.org>
Injection-Date: Wed, 25 Aug 2021 15:47:26 -0000 (UTC)
Injection-Info: reader02.eternal-september.org; posting-host="1a96a8f636be90ba16916000a9535673";
logging-data="25696"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+RC+XQnuoDMFaFM2b+PlO6JDD4nDQwQNg="
User-Agent: slrn/1.0.3 (Linux)
Cancel-Lock: sha1:jEC8b3+I/S4LTzMT95BumpOA4tE=
 by: Jon Ribbens - Wed, 25 Aug 2021 15:47 UTC

On 2021-08-25, Chris Angelico <rosuav@gmail.com> wrote:
> On Thu, Aug 26, 2021 at 12:48 AM Jon Ribbens via Python-list
><python-list@python.org> wrote:
>> Another attempt at combatting this problem is DNS CAA records,
>> which are a way of politely asking all CAs in the world except the
>> ones you choose "please don't issue a certificate for my domain".
>> By definition someone who had hacked a CA would pay no attention
>> to that request, of course.
>
> True, but that would still prevent legit CAs from unwittingly
> contributing to an attack. But it still wouldn't help if someone can
> do any sort of large-scale DNS attack, which is kinda essential for
> most of this to matter anyway (it doesn't matter if an attacker has a
> fake cert if all traffic goes to the legit site anyway).

That depends whether it's a large-scale attack or targeted at some
particular person or organisation, I suppose.

> Earlier I posited a hypothetical approach wherein the server would
> sign a new cert using the old cert, and would then be able to present
> that upon request. Are there any massive glaring problems with that?

That's a very similar idea to HTTP Public Key Pinning, and apparently
there were enough problems with that that they discontinued it.

> But, maybe we're just coming back to "it doesn't matter and nobody
> really cares".

People don't care until something goes wrong, and then suddenly they
care a great deal...

Re: basic auth request

<mailman.467.1629910882.4164.python-list@python.org>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=14744&group=comp.lang.python#14744

  copy link   Newsgroups: comp.lang.python
Path: i2pn2.org!i2pn.org!news.swapon.de!fu-berlin.de!uni-berlin.de!not-for-mail
From: hjp-pyt...@hjp.at (Peter J. Holzer)
Newsgroups: comp.lang.python
Subject: Re: basic auth request
Date: Wed, 25 Aug 2021 19:01:19 +0200
Lines: 127
Message-ID: <mailman.467.1629910882.4164.python-list@python.org>
References: <54465DA0-2977-4EAD-8CD2-C398F5ACF121@barrys-emacs.org>
<mailman.423.1629234918.4164.python-list@python.org>
<slrnshobjl.49p.jon+usenet@raven.unequivocal.eu>
<9bc605cb-2ceb-fed9-cd3f-d48a8fe405fb@everest.reportlab.co.uk>
<mailman.428.1629309989.4164.python-list@python.org>
<slrnshr4ia.78u.jon+usenet@raven.unequivocal.eu>
<20210821185411.ka66xkawv6mbpska@gmail.com>
<CAPTjJmpTU_ew8qe_GQKyE92cEDnRjjuMTPiwV--tVp4N+v4Lgw@mail.gmail.com>
<20210822084341.GA13245@hjp.at>
<CAPTjJmpnfo5cCawgCkJKugimFk_i0DWZSk9me=+19uWL-f-sVQ@mail.gmail.com>
<20210825170119.GB5110@hjp.at>
Mime-Version: 1.0
Content-Type: multipart/signed; micalg=pgp-sha512;
protocol="application/pgp-signature"; boundary="Y7xTucakfITjPcLV"
X-Trace: news.uni-berlin.de 1iDy6ox9jBmkRl7ZgooCAgTpd67vP0Ne51gmLe7riQ7w==
Return-Path: <hjp-python@hjp.at>
X-Original-To: python-list@python.org
Delivered-To: python-list@mail.python.org
Authentication-Results: mail.python.org; dkim=none reason="no signature";
dkim-adsp=none (unprotected policy); dkim-atps=neutral
X-Spam-Status: OK 0.009
X-Spam-Evidence: '*H*': 0.98; '*S*': 0.00; '(which': 0.04; 'content-
type:multipart/signed': 0.05; 'certificates': 0.07; 'sun,': 0.07;
'"an': 0.09; '*not*': 0.09; 'angelico': 0.09; 'aug': 0.09; 'auth':
0.09; 'construct': 0.09; 'content-type:application/pgp-signature':
0.09; 'filename:fname piece:asc': 0.09; 'filename:fname
piece:signature': 0.09; 'filename:fname:signature.asc': 0.09;
'operators': 0.09; 'ultimate': 0.09; 'user.': 0.09; 'yes.': 0.09;
'"creative': 0.16; '(b)': 0.16; '(from': 0.16; '(over': 0.16;
'__/': 0.16; 'absence': 0.16; 'basic,': 0.16; 'captured': 0.16;
'cert': 0.16; 'certificate.': 0.16; 'challenge!"': 0.16;
'compromised': 0.16; 'encryption': 0.16; 'ensures': 0.16;
'from:addr:hjp-python': 0.16; 'from:addr:hjp.at': 0.16;
'from:name:peter j. holzer': 0.16; 'great,': 0.16; 'hjp@hjp.at':
0.16; 'holzer': 0.16; 'https': 0.16; 'key.': 0.16; 'mechanisms':
0.16; 'ones.': 0.16; 'problems:': 0.16; 'reality.': 0.16; 'ssl':
0.16; 'stross,': 0.16; 'technically,': 0.16; 'tls': 0.16; 'url-
ip:212.17.106.137/32': 0.16; 'url-ip:212.17.106/24': 0.16; 'url-
ip:212.17/16': 0.16; 'url:hjp': 0.16; '|_|_)': 0.16; 'wrote:':
0.16; 'all,': 0.19; "aren't": 0.20; 'basically': 0.23; 'to:addr
:python-list': 0.23; 'cannot': 0.24; 'chris': 0.26; 'certificate':
0.27; "wasn't": 0.27; 'done': 0.28; 'sense': 0.28; "isn't": 0.29;
'subject:request': 0.29; '(and': 0.30; 'header:User-Agent:1':
0.31; 'there': 0.31; 'think': 0.31; 'but': 0.31; '(with': 0.31;
"doesn't": 0.32; "i'm": 0.32; 'concerns': 0.32; 'server': 0.33;
'header:In-Reply-To:1': 0.33; 'setting': 0.34; 'same': 0.34;
'22,': 0.35; 'possibly': 0.37; 'transmitted': 0.37; 'two': 0.37;
'way': 0.37; "that's": 0.37; '(or': 0.37; 'mean': 0.37; 'really':
0.37; "it's": 0.38; 'something': 0.38; 'use': 0.38; 'comes': 0.40;
'enough': 0.40; 'could': 0.40; 'all.': 0.40; 'model': 0.60;
'external': 0.61; 'requirements': 0.61; 'days': 0.61; 'simply':
0.62; 'mental': 0.63; 'key': 0.63; 'security': 0.64;
'received:userid': 0.64; 'browser': 0.64; 'your': 0.64;
'bringing': 0.65; 'signature': 0.65; 'too.': 0.65; 'username':
0.65; 'trust': 0.66; 'years': 0.67; 'choice': 0.68;
'received:212': 0.68; 'service': 0.68; 'site': 0.69; 'account.':
0.69; 'content,': 0.69; 'implemented': 0.69; 'letting': 0.69;
'skip:/ 10': 0.69; 'url-ip:212/8': 0.69; 'private': 0.72; 'known':
0.75; 'provider': 0.75; 'reasons': 0.75; 'chain': 0.77; 'pain':
0.77; 'tracking': 0.77; 'up,': 0.77; 'client': 0.79; '2021': 0.84;
'admit': 0.84; 'chose': 0.84; 'forming': 0.84; 'ideally': 0.84;
'method,': 0.84; 'paola': 0.84; 'password,': 0.84; 'received:at':
0.84; 'signatures': 0.84; 'signed.': 0.84; 'sites,': 0.84; 'cas':
0.91; 'retain': 0.91; 'retained': 0.91; 'trusted': 0.93; 'secret':
0.95; 'highest': 0.97
Content-Disposition: inline
In-Reply-To: <CAPTjJmpnfo5cCawgCkJKugimFk_i0DWZSk9me=+19uWL-f-sVQ@mail.gmail.com>
User-Agent: Mutt/1.10.1 (2018-07-13)
X-BeenThere: python-list@python.org
X-Mailman-Version: 2.1.34
Precedence: list
List-Id: General discussion list for the Python programming language
<python-list.python.org>
List-Unsubscribe: <https://mail.python.org/mailman/options/python-list>,
<mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive: <https://mail.python.org/pipermail/python-list/>
List-Post: <mailto:python-list@python.org>
List-Help: <mailto:python-list-request@python.org?subject=help>
List-Subscribe: <https://mail.python.org/mailman/listinfo/python-list>,
<mailto:python-list-request@python.org?subject=subscribe>
X-Mailman-Original-Message-ID: <20210825170119.GB5110@hjp.at>
X-Mailman-Original-References: <54465DA0-2977-4EAD-8CD2-C398F5ACF121@barrys-emacs.org>
<mailman.423.1629234918.4164.python-list@python.org>
<slrnshobjl.49p.jon+usenet@raven.unequivocal.eu>
<9bc605cb-2ceb-fed9-cd3f-d48a8fe405fb@everest.reportlab.co.uk>
<mailman.428.1629309989.4164.python-list@python.org>
<slrnshr4ia.78u.jon+usenet@raven.unequivocal.eu>
<20210821185411.ka66xkawv6mbpska@gmail.com>
<CAPTjJmpTU_ew8qe_GQKyE92cEDnRjjuMTPiwV--tVp4N+v4Lgw@mail.gmail.com>
<20210822084341.GA13245@hjp.at>
<CAPTjJmpnfo5cCawgCkJKugimFk_i0DWZSk9me=+19uWL-f-sVQ@mail.gmail.com>
 by: Peter J. Holzer - Wed, 25 Aug 2021 17:01 UTC
Attachments: signature.asc (application/pgp-signature)

On 2021-08-22 19:37:24 +1000, Chris Angelico wrote:
> On Sun, Aug 22, 2021 at 6:45 PM Peter J. Holzer <hjp-python@hjp.at> wrote:
> >
> > On 2021-08-22 05:04:43 +1000, Chris Angelico wrote:
> > > On Sun, Aug 22, 2021 at 4:55 AM Martin Di Paola
> > > <martinp.dipaola@gmail.com> wrote:
> > > > HTTPS ensures encryption so the content, including the Basic Auth
> > > > username and password, is secret for any external observer.
> > > >
> > > > But it is *not* secret for the receiver (the server): if it was
> > > > compromised an adversary will have access to your password. It is much
> > > > easier to print a captured password than cracking the hashes.
> > > >
> > > > Other authentication mechanisms exist, like OAuth, which are more
> > > > "secure".
> >
> > OAuth is "an /authorization protocol/, rather than an /authentication
> > protocol/" [Wikipedia].
> >
> > > If your server is compromised in that way, *all is lost*.
> >
> > If "you" are the service provider, yes. but if "you" are the user, no.
>
> If "your server" is compromised, then you are the service provider,
> are you not? I'm not sure what "your server" would mean if "you" are
> the user.

The server you use. The same way you talk about "your bank" or "your
school" etc.

But that's besides the point. What I wanted to point out is that as a
service provider you take some responsibility for the user's data and
should take the user's POV into account.

> > there are three levels of security (from highest
> > to lowest) in this scenario:
> >
> > 1: The secret known to the user is never transmitted to the server at
> > all, the client only proves that the secret is known. This is the
> > case for TLS client authentication (which AFAIK all browsers support
> > but is a real pain in the ass to set up, so it's basically never
> > used) and for SCRAM (which isn't part of HTTP(S) but could be
> > implemented in JavaScript).
>
> This would be great, if nobody minded (a) setting up a unique client
> certificate for every site, or (b) allowing the ultimate in remote
> tracking cookie whereby any server could recognize you by your TLS
> certificate.

Which is one of reasons why TLS client authentication wasn't really
practical. It doesn't apply to SCRAM.

> > So given the choice between Basic Auth and Digest or NTLM (over HTTPS in
> > all cases) I would prefer Basic Auth. Ideally I would use SCRAM or a
> > public key method, but I admit that my security requirements were never
> > high enough to actually bother to do that (actually, I used SSL client
> > side auth once, 20 years ago, ...).
> >
>
> I would, of course, prefer something like form fill-out over Basic,
> but that's due to UI concerns rather than security ones.

Me too. But since that is irrelevant from a security POV I chose not to
complicate matters by bringing that up.

> When it comes to security, one thing I'm very curious about is why we
> don't have any sort of certificate renewal verification. My browser
> could retain the certificates of some web site (or of all web sites,
> even - they're not THAT large), and if the site presents a different
> cert, it could show the previously retained one and challenge the
> server "prove that you're the same guy". This proof would consist of
> the latest cert, signed by the older cert's key (or possibly a chain
> that can construct such a proof, which would allow the server to
> simply retain each new cert signed by the one previous cert, forming a
> line - or a tree if necessary).

I think this wasn't done because it violated the strictly hierarchical
model of X.509, where CAs are fully trusted and the server operators
aren't trusted at all. Letting them add signatures smacked too much of
an egalitarian web of trust.

Of course, technically, these days website certificates do form a web of
trust (with multiple chains and CA cross-signing), but the mental model
is still the same (and web site keys cannot be used for signing).

Apart from that I can see two problems: The first is that if the private
key is compromised, an attacker can use it to sign their own successor
key. The second is that if the private key is lost, a successor key
cannot be signed. So the absence or presence of such a signature is just
corroborating evidence, not proof.

hp

--
_ | Peter J. Holzer | Story must make more sense than reality.
|_|_) | |
| | | hjp@hjp.at | -- Charles Stross, "Creative writing
__/ | http://www.hjp.at/ | challenge!"

Attachments: signature.asc (application/pgp-signature)
Re: basic auth request

<eli$2108251341@qaz.wtf>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=14745&group=comp.lang.python#14745

  copy link   Newsgroups: comp.lang.python
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!panix!.POSTED.panix5.panix.com!qz!not-for-mail
From: *...@eli.users.panix.com (Eli the Bearded)
Newsgroups: comp.lang.python
Subject: Re: basic auth request
Date: Wed, 25 Aug 2021 17:41:41 -0000 (UTC)
Organization: Some absurd concept
Message-ID: <eli$2108251341@qaz.wtf>
References: <CAPTjJmo0d_t3XG6KH++XhkStB5GyyFbtv=4Sj3tQXM_Sn-E5zA@mail.gmail.com> <CAPTjJmqj45U_iiT+D2LKcF-kQZM0f7J=DNL9bCCU+-hfEAXjyw@mail.gmail.com> <mailman.465.1629901161.4164.python-list@python.org> <slrnsicla6.78u.jon+usenet@raven.unequivocal.eu>
Injection-Date: Wed, 25 Aug 2021 17:41:41 -0000 (UTC)
Injection-Info: reader1.panix.com; posting-host="panix5.panix.com:166.84.1.5";
logging-data="7900"; mail-complaints-to="abuse@panix.com"
User-Agent: Vectrex rn 2.1 (beta)
X-Liz: It's actually happened, the entire Internet is a massive game of Redcode
X-Motto: "Erosion of rights never seems to reverse itself." -- kenny@panix
X-US-Congress: Moronic Fucks.
X-Attribution: EtB
XFrom: is a real address
Encrypted: double rot-13
 by: Eli the Bearded - Wed, 25 Aug 2021 17:41 UTC

In comp.lang.python, Jon Ribbens <jon+usenet@unequivocal.eu> wrote:
> Another attempt at combatting this problem is DNS CAA records,
> which are a way of politely asking all CAs in the world except the
> ones you choose "please don't issue a certificate for my domain".
> By definition someone who had hacked a CA would pay no attention
> to that request, of course.

Yeah, but it works for the case of forgotten hostnames, a rare but
real attack. Basically it works like this:

$COMPANY puts out a lot of things on different IP addresses from
a shared public(ish) pool like AWS and assigns different names
to them. Later $COMPANY discontinues one or more of those things,
terminates the host, and lets the IP address rejoin the public(ish)
pool.

$ATTACKER notices the domain name pointing to an unused IP address
and works to acquire it for their own server. $ATTACKER then gets
a cert for that domain, since they can easily prove ownership of
the server through http content challenges. $ATTACKER now has a
host in $COMPANY's name to launch phishing attacks.

This probably has some clever infosec name that I don't know.

Elijah
------
or a clever infosec name now forgotten

Re: basic auth request

<slrnsid55u.78u.jon+usenet@raven.unequivocal.eu>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=14746&group=comp.lang.python#14746

  copy link   Newsgroups: comp.lang.python
Path: i2pn2.org!i2pn.org!aioe.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: jon+use...@unequivocal.eu (Jon Ribbens)
Newsgroups: comp.lang.python
Subject: Re: basic auth request
Date: Wed, 25 Aug 2021 19:06:38 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 28
Message-ID: <slrnsid55u.78u.jon+usenet@raven.unequivocal.eu>
References: <CAPTjJmo0d_t3XG6KH++XhkStB5GyyFbtv=4Sj3tQXM_Sn-E5zA@mail.gmail.com>
<CAPTjJmqj45U_iiT+D2LKcF-kQZM0f7J=DNL9bCCU+-hfEAXjyw@mail.gmail.com>
<mailman.465.1629901161.4164.python-list@python.org>
<slrnsicla6.78u.jon+usenet@raven.unequivocal.eu> <eli$2108251341@qaz.wtf>
Injection-Date: Wed, 25 Aug 2021 19:06:38 -0000 (UTC)
Injection-Info: reader02.eternal-september.org; posting-host="1a96a8f636be90ba16916000a9535673";
logging-data="19300"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19zcP82/SQ4jeVOBD7QFdPpaF2lqE8L43E="
User-Agent: slrn/1.0.3 (Linux)
Cancel-Lock: sha1:9KNGCUbDSai5xZL0z5OGE2H2VJU=
 by: Jon Ribbens - Wed, 25 Aug 2021 19:06 UTC

On 2021-08-25, Eli the Bearded <*@eli.users.panix.com> wrote:
> In comp.lang.python, Jon Ribbens <jon+usenet@unequivocal.eu> wrote:
>> Another attempt at combatting this problem is DNS CAA records,
>> which are a way of politely asking all CAs in the world except the
>> ones you choose "please don't issue a certificate for my domain".
>> By definition someone who had hacked a CA would pay no attention
>> to that request, of course.
>
> Yeah, but it works for the case of forgotten hostnames, a rare but
> real attack. Basically it works like this:
>
> $COMPANY puts out a lot of things on different IP addresses from
> a shared public(ish) pool like AWS and assigns different names
> to them. Later $COMPANY discontinues one or more of those things,
> terminates the host, and lets the IP address rejoin the public(ish)
> pool.
>
> $ATTACKER notices the domain name pointing to an unused IP address
> and works to acquire it for their own server. $ATTACKER then gets
> a cert for that domain, since they can easily prove ownership of
> the server through http content challenges. $ATTACKER now has a
> host in $COMPANY's name to launch phishing attacks.

How does CAA help with this? Unless the domain owner knows in advance
that they're going to forget about the hostname and prepares for it
by setting a CAA record that denies all CAs, the attacker will simply
get a certificate from one of the permitted CAs - since, as you point
out, they genuinely own and control the relevant IP address.

Re: basic auth request

<eli$2108251619@qaz.wtf>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=14747&group=comp.lang.python#14747

  copy link   Newsgroups: comp.lang.python
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!panix!.POSTED.panix5.panix.com!qz!not-for-mail
From: *...@eli.users.panix.com (Eli the Bearded)
Newsgroups: comp.lang.python
Subject: Re: basic auth request
Date: Wed, 25 Aug 2021 20:19:55 -0000 (UTC)
Organization: Some absurd concept
Message-ID: <eli$2108251619@qaz.wtf>
References: <CAPTjJmo0d_t3XG6KH++XhkStB5GyyFbtv=4Sj3tQXM_Sn-E5zA@mail.gmail.com> <slrnsicla6.78u.jon+usenet@raven.unequivocal.eu> <eli$2108251341@qaz.wtf> <slrnsid55u.78u.jon+usenet@raven.unequivocal.eu>
Injection-Date: Wed, 25 Aug 2021 20:19:55 -0000 (UTC)
Injection-Info: reader1.panix.com; posting-host="panix5.panix.com:166.84.1.5";
logging-data="14997"; mail-complaints-to="abuse@panix.com"
User-Agent: Vectrex rn 2.1 (beta)
X-Liz: It's actually happened, the entire Internet is a massive game of Redcode
X-Motto: "Erosion of rights never seems to reverse itself." -- kenny@panix
X-US-Congress: Moronic Fucks.
X-Attribution: EtB
XFrom: is a real address
Encrypted: double rot-13
 by: Eli the Bearded - Wed, 25 Aug 2021 20:19 UTC

In comp.lang.python, Jon Ribbens <jon+usenet@unequivocal.eu> wrote:
> On 2021-08-25, Eli the Bearded <*@eli.users.panix.com> wrote:
>> $COMPANY puts out a lot of things on different IP addresses from
>> a shared public(ish) pool like AWS and assigns different names
>> to them. Later $COMPANY discontinues one or more of those things,
>> terminates the host, and lets the IP address rejoin the public(ish)
>> pool.
>>
>> $ATTACKER notices the domain name pointing to an unused IP address
>> and works to acquire it for their own server. $ATTACKER then gets
>> a cert for that domain, since they can easily prove ownership of
>> the server through http content challenges. $ATTACKER now has a
>> host in $COMPANY's name to launch phishing attacks.
> How does CAA help with this? Unless the domain owner knows in advance
> that they're going to forget about the hostname and prepares for it
> by setting a CAA record that denies all CAs, the attacker will simply
> get a certificate from one of the permitted CAs - since, as you point
> out, they genuinely own and control the relevant IP address.

I believe the way it helps is by limiting to a CA that will insist
all cert requests come through the right channel, not some random
one off somewhere. This doesn't prevent issues, but does raise the
complexity on an already niche attack.

It does aid in knocking out the easy random one-offs from Let's Encrypt.

Elijah
------
using LE for all his personal sites these days

Re: basic auth request

<mailman.468.1629932982.4164.python-list@python.org>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=14748&group=comp.lang.python#14748

  copy link   Newsgroups: comp.lang.python
Path: i2pn2.org!i2pn.org!news.swapon.de!fu-berlin.de!uni-berlin.de!not-for-mail
From: bar...@barrys-emacs.org (Barry)
Newsgroups: comp.lang.python
Subject: Re: basic auth request
Date: Thu, 26 Aug 2021 00:09:30 +0100
Lines: 48
Message-ID: <mailman.468.1629932982.4164.python-list@python.org>
References: <eli$2108251341@qaz.wtf>
<8B80609C-9D91-4DD5-9EB5-32C95BA500E1@barrys-emacs.org>
Mime-Version: 1.0 (1.0)
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Trace: news.uni-berlin.de myNUXMiw+RovBVkyrYjlaAum3eE9TUk5cg+Kff4LdA5g==
Return-Path: <barry@barrys-emacs.org>
X-Original-To: Python-list@python.org
Delivered-To: python-list@mail.python.org
Authentication-Results: mail.python.org; dkim=none reason="no signature";
dkim-adsp=none (unprotected policy); dkim-atps=neutral
X-Spam-Status: OK 0.003
X-Spam-Evidence: '*H*': 0.99; '*S*': 0.00; 'this:': 0.03; 'http':
0.07; 'lets': 0.07; 'url:mailman': 0.09; 'aug': 0.09; 'barry':
0.09; 'cc:addr:python-list': 0.09; 'dns': 0.09; 'from:addr:barry':
0.09; 'received:217.70': 0.09; 'received:217.70.178': 0.09;
'received:gandi.net': 0.09; 'received:mail.gandi.net': 0.09;
'cc:no real name:2**0': 0.13; 'problem.': 0.14; 'problem': 0.15;
'bearded': 0.16; 'cert': 0.16; 'challenges.': 0.16; 'eli': 0.16;
'elijah': 0.16; 'from:addr:barrys-emacs.org': 0.16; 'message-id
:@barrys-emacs.org': 0.16; 'pool': 0.16; 'reuse': 0.16; 'things,':
0.16; 'wrote:': 0.16; 'url:listinfo': 0.16; 'cc:addr:python.org':
0.19; 'addresses': 0.20; 'name.': 0.20; 'server.': 0.20; 'url-
ip:188.166.95.178/32': 0.20; 'url-ip:188.166.95/24': 0.20;
'issue': 0.20; 'url-ip:188.166/16': 0.23; 'basically': 0.23;
'probably': 0.24; 'cc:2**0': 0.27; 'certificate': 0.27; 'course.':
0.27; 'url-ip:188/8': 0.29; 'subject:request': 0.29; 'but': 0.31;
'shared': 0.31; 'records,': 0.32; 'using': 0.33; 'unless': 0.33;
'server': 0.33; 'header:In-Reply-To:1': 0.33; 'attempt': 0.34;
'way': 0.37; 'those': 0.38; 'someone': 0.39; 'means': 0.40;
'host': 0.40; 'lot': 0.62; 'choose': 0.62; 'later': 0.63; 'pay':
0.64; 'world': 0.64; 'launch': 0.65; 'received:217': 0.68;
'know.': 0.72; 'content': 0.72; 'domain': 0.74; 'attention': 0.74;
'------': 0.77; 'hacked': 0.77; 'acquire': 0.81; 'attacks.': 0.84;
'forgotten': 0.84; 'jon': 0.84; 'pointing': 0.84; 'politely':
0.84; 'rare': 0.84; 'signs': 0.84; 'unused': 0.84; 'cas': 0.91
In-Reply-To: <eli$2108251341@qaz.wtf>
X-Mailer: iPad Mail (18G82)
X-BeenThere: python-list@python.org
X-Mailman-Version: 2.1.34
Precedence: list
List-Id: General discussion list for the Python programming language
<python-list.python.org>
List-Unsubscribe: <https://mail.python.org/mailman/options/python-list>,
<mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive: <https://mail.python.org/pipermail/python-list/>
List-Post: <mailto:python-list@python.org>
List-Help: <mailto:python-list-request@python.org?subject=help>
List-Subscribe: <https://mail.python.org/mailman/listinfo/python-list>,
<mailto:python-list-request@python.org?subject=subscribe>
X-Mailman-Original-Message-ID: <8B80609C-9D91-4DD5-9EB5-32C95BA500E1@barrys-emacs.org>
X-Mailman-Original-References: <eli$2108251341@qaz.wtf>
 by: Barry - Wed, 25 Aug 2021 23:09 UTC

> On 25 Aug 2021, at 20:34, Eli the Bearded <*@eli.users.panix.com> wrote:
>
> In comp.lang.python, Jon Ribbens <jon+usenet@unequivocal.eu> wrote:
>> Another attempt at combatting this problem is DNS CAA records,
>> which are a way of politely asking all CAs in the world except the
>> ones you choose "please don't issue a certificate for my domain".
>> By definition someone who had hacked a CA would pay no attention
>> to that request, of course.
>
> Yeah, but it works for the case of forgotten hostnames, a rare but
> real attack. Basically it works like this:
>
> $COMPANY puts out a lot of things on different IP addresses from
> a shared public(ish) pool like AWS and assigns different names
> to them. Later $COMPANY discontinues one or more of those things,
> terminates the host, and lets the IP address rejoin the public(ish)
> pool.
>
> $ATTACKER notices the domain name pointing to an unused IP address
> and works to acquire it for their own server. $ATTACKER then gets
> a cert for that domain, since they can easily prove ownership of
> the server through http content challenges. $ATTACKER now has a
> host in $COMPANY's name to launch phishing attacks.
>
> This probably has some clever infosec name that I don't know.

It is possible to sign an ip address in a certificate, but that is not often done.
Getting to reuse the IP address that example.com was using will not help
the attacker unless they can make a cert that signs the dns name.
And that means they hacked the CA which is a big problem.

Barry

>
> Elijah
> ------
> or a clever infosec name now forgotten
>
> --
> https://mail.python.org/mailman/listinfo/python-list
>

Re: basic auth request

<eli$2108252001@qaz.wtf>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=14749&group=comp.lang.python#14749

  copy link   Newsgroups: comp.lang.python
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!panix!.POSTED.panix5.panix.com!qz!not-for-mail
From: *...@eli.users.panix.com (Eli the Bearded)
Newsgroups: comp.lang.python
Subject: Re: basic auth request
Date: Thu, 26 Aug 2021 00:34:30 -0000 (UTC)
Organization: Some absurd concept
Message-ID: <eli$2108252001@qaz.wtf>
References: <eli$2108251341@qaz.wtf> <8B80609C-9D91-4DD5-9EB5-32C95BA500E1@barrys-emacs.org> <mailman.468.1629932982.4164.python-list@python.org>
Injection-Date: Thu, 26 Aug 2021 00:34:30 -0000 (UTC)
Injection-Info: reader1.panix.com; posting-host="panix5.panix.com:166.84.1.5";
logging-data="22587"; mail-complaints-to="abuse@panix.com"
User-Agent: Vectrex rn 2.1 (beta)
X-Liz: It's actually happened, the entire Internet is a massive game of Redcode
X-Motto: "Erosion of rights never seems to reverse itself." -- kenny@panix
X-US-Congress: Moronic Fucks.
X-Attribution: EtB
XFrom: is a real address
Encrypted: double rot-13
 by: Eli the Bearded - Thu, 26 Aug 2021 00:34 UTC

In comp.lang.python, Barry <barry@barrys-emacs.org> wrote:
> It is possible to sign an ip address in a certificate, but that is not
> often done.

It's bad practice. I've never seen one in the wild.

> Getting to reuse the IP address that example.com was using will not help
> the attacker unless they can make a cert that signs the dns name.
> And that means they hacked the CA which is a big problem.

You misunderstand the attack. Some web searching suggests the term is
"dangling DNS record".

Big co Acme Example, with example.com, has a website for the regular
public on www.example.com, gets mail at mail.example.com, serves
DNS from ns1., ns2. and ns3.example.com. The IT staff watch those
domaines very carefully.

One day marketing says, "We've got a big CES show this year, let's
make a website for the press at ces.example.com." They tell execs
the execs tell the IT guys the IT guys say "Okay, what does it point
to?" and Marketing gives them the IP address of the blog site they
just rented. IT sets up an A record. IT does not watch _that_
carefully. Two years later Marketing stops paying the bill on the
blog site, and ces.example.com has a "dangling" DNS record, it
exists but no longer points to a valid resource.

Attacker gets the IP address that points to (maybe they churn
through a bunch of temporary accounts until they do) and now with
the right IP to match ces.example.com they go off to get a SSL
cert for that.

$500 bug bounty write up here for someone who found a dangling
record, but didn't churn for the record to exploit it:

https://gist.github.com/TheBinitGhimire/9ebcd27086a11df1d7ec925e5f604e03

Another variant of this, which probably doesn't get you an SSL
cert, is a dangling CNAME. These can be easier to get. If
ces.example.com was a CNAME to cesdemosite2017.com then when
cesdemosite2017.com expires, it's trivial to re-register it and
squat "as" ces.example.com.

The most insidious version is a DNS delegation. If ces.example.com is an
NS record (unlikely for a marketing site, but plausible for some other
scenarios) and it goes to ns1.parternership.net, when parternership.net
expires the attacker can grab that, create a new ns1.parternership.net
and give themselves finan.ces.example.com then start spitting out bogus
bills with it.

The CAA record adds a smidgen more protection against those attacks.
(I don't think that's what it is designed for, but a good defense
works against more than just the original attack method.)

I also found this in my search, which is exactly the sort of threat
CAA was meant to handle:

https://en.wikipedia.org/wiki/Comodo_Cybersecurity#Dangling_markup_injection_vulnerability
On 25 July 2016, Matthew Bryant showed that Comodo's website is
vulnerable to dangling markup injection attacks and can send emails
to system administrators from Comodo's servers to approve a wildcard
certificate issue request which can be used to issue arbitrary
wildcard certificates via Comodo's 30-Day PositiveSSL product.

Bugs in automated systems that give out arbitrary certs are not
common, but very very nasty.

Elijah
------
DNS: the cause of, and solution to, all our Internet problems

1
server_pubkey.txt

rocksolid light 0.9.8
clearnet tor