Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:122859 X-Original-To: internals@lists.php.net Delivered-To: internals@lists.php.net Received: from php-smtp4.php.net (php-smtp4.php.net [45.112.84.5]) by qa.php.net (Postfix) with ESMTPS id 441821A009C for ; Tue, 2 Apr 2024 13:52:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1712065996; bh=nWwaAboOnmeuqFiKRjhCDprZ2H6cpyr3ILtinrxcKzk=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=RJzwz8rQCxO2vRtjF5o714+9JBvdJnkGoeznHNLVdiX0+VOWyI3Roax8CWe3q+0ZS qr+XxAhcshz7ArpmXJVwh31Vs7l+FAfv/4x6NRN4Kn8+MqqSWFRKBYCBuApzBV8Dr9 8UvH8skwwIsbSt1/ATq9y60QL88cZEu2ydfVZblmVgzdrOfy+EE8kYYlXQl4GjHa8l Vcv5BfPPAUpHuyr8DwDkDZcWnYfU1DLZyIgf7vMrPS96fVz5quJJD2B51Mkt7Phufp qnMg3X5tQWCDocfYufld27JZ6bo4mnDgCuhYAWyibjUfumCxw29H+st2t3hRULbobn T0WNmUmIw6wKg== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 6A0D018038F for ; Tue, 2 Apr 2024 13:53:13 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 4.0.0 (2022-12-13) on php-smtp4.php.net X-Spam-Level: * X-Spam-Status: No, score=1.0 required=5.0 tests=BAYES_50,DMARC_MISSING, FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS, HTML_MESSAGE,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=4.0.0 X-Spam-Virus: No X-Envelope-From: Received: from mail-ej1-f53.google.com (mail-ej1-f53.google.com [209.85.218.53]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Tue, 2 Apr 2024 13:53:09 +0000 (UTC) Received: by mail-ej1-f53.google.com with SMTP id a640c23a62f3a-a4e61accceaso334134266b.2 for ; Tue, 02 Apr 2024 06:52:41 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1712065960; x=1712670760; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=nWwaAboOnmeuqFiKRjhCDprZ2H6cpyr3ILtinrxcKzk=; b=IlzVbZ9vPFBVeMM0uWF0JUnuJ9wpyM+12BbDEoRoAwmnPnfKXRui6GOwkbX3kJVfJ/ V9Z8gIbWaIYilMisjV1xu6hDT2yn2j9p4mFKFQKx3/bEV0d6QpUO9fW8kgcJp/I+199p 8hcS9/8vfs9SBENKYVWiMkooecreRZhDFKOVgZ1Xt8ykGZzu2g5nIC9C28Eb+9KFzSuq 5gjsYzb362HcdofTskRDuMSvAWgSyY603hIjRS755ctcL6dGZ42rCPTjuobdYLDQMUYI B/d+kNYKEDNUQQh3Mus0HxupNFnNZnRG3WP7gCLEGzfJdlLeH3niv8LfCWwXjkeCFpNN WYpA== X-Forwarded-Encrypted: i=1; AJvYcCVYThHNLYoVZVJ7hmIcs+Q3hGnAy9beEeYRJl+LKAsEzbxaZ8PwqCt1pLbtE7NEmyHq2gxcZJBCI6TR5maJ0qAvHEnnc2tzxg== X-Gm-Message-State: AOJu0Yx84T9siNb9a8pf9T2CO9nNA7pV4dOICFfTY8JKwi+mHACng2Ia I3MJQf2uCzpHbXOTKUksjgzs9VHXZiCV7vaBu6kg0K14Ywzob80puAt9cUktMTGjyhNiUQ350yf cD5boM5/AYVDDSn7NSiwQCxL2iVE= X-Google-Smtp-Source: AGHT+IGbVb7FwTxGRPC7xqyEEQk5R8wkrdDDCd9t1j+UsPZElkRjVx2m5ajjNRGldRBUAj/Hg7jwOWMDVT3kRnS3hQQ= X-Received: by 2002:a17:906:49a:b0:a4e:6f0d:c53b with SMTP id f26-20020a170906049a00b00a4e6f0dc53bmr3371062eja.35.1712065960199; Tue, 02 Apr 2024 06:52:40 -0700 (PDT) Precedence: bulk list-help: list-post: List-Id: internals.lists.php.net MIME-Version: 1.0 References: <9008050F-4EE1-4E19-B513-654602E118A7@benramsey.com> <95c92b6a-6788-fddb-a130-e4d122338b68@php.net> In-Reply-To: <95c92b6a-6788-fddb-a130-e4d122338b68@php.net> Date: Tue, 2 Apr 2024 13:52:28 +0000 Message-ID: Subject: Re: [PHP-DEV] Consider removing autogenerated files from tarballs To: Derick Rethans Cc: Marco Pivetta , Ben Ramsey , Bob Weinand , Daniil Gentili , PHP Internals List Content-Type: multipart/alternative; boundary="00000000000063cddb06151d6ba2" From: bukka@php.net (Jakub Zelenka) --00000000000063cddb06151d6ba2 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi, On Tue, Apr 2, 2024 at 2:36=E2=80=AFPM Derick Rethans wrot= e: > On Sat, 30 Mar 2024, Jakub Zelenka wrote: > > > On Sat, Mar 30, 2024 at 7:08=E2=80=AFAM Marco Pivetta > wrote: > > > > > > I understand that the XZ project had signed releases too: that still > > > means that downstream consumers would need to trust the release > > > managers anyway, and reproduce the whole chain themselves. > > > > > > I suppose that's part of OP's concern. > > > > > I agree that compromised RM is a problem that we should look into. > > > > We have been actually already discussing something similar. I have > > been thinking about it and it could be potentially used for all > > builds. The idea is that we would setup worklfow on CI that would run > > on tag push and it would call (authenticated https request) > > downloads.php.net server that could do the actual build, sign them and > > return the hashes to the CI job which would display them and do extra > > verification (probably its own build to verify that download server > > work as expected). > > ... > > > It needs more thinking to iron out all details and make sure it is a > > secure but I think it would be something worth to look at. > > I don't mind coming up with an automated way, but we probably should not > use the *downloads* server. All it does is serve files. It has no > compiler or anything else. It's a storage optimised instance with little > CPU. > > Yeah I agree. I originally thought that it would be good to do it on our own server so we can possibly sign it there as well but after thinking about it I rejected that signing idea so there's really no point to do it on our own server. > On CI we already test the builds, what does stop us from also just > having it make the tarball and attach it as an artefact? We can then > setup somethin gon the downloads server to pull these artefacts. In > fact, this is exactly what we're already hoping to do for Windows > downloads too. Having it all in one place is probably even better (and > easier). > > Of course, having CI make the tarballs means we need to trust that CI > isn't compromised ;-). > We will still need RM to sign the build so ideally we should make it reproducible so RM can verify that CI produced expected build and then sign it and just upload the signatures (not sure if we actually need signature uploaded or if they are used just in announcements). I think this should then prevent compromise of the RM and CI unless CI is compromised by RM, of course, but that should be very unlikely. Regards Jakub --00000000000063cddb06151d6ba2 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi,

On Tue, Apr 2, 2024 at 2:36=E2=80=AFPM Derick Reth= ans <derick@php.net> wrote:
=
On Sat, 30 Mar 2024= , Jakub Zelenka wrote:

> On Sat, Mar 30, 2024 at 7:08=E2=80=AFAM Marco Pivetta <ocramius@gmail.com> wrot= e:
> >
> > I understand that the XZ project had signed releases too: that st= ill
> > means that downstream consumers would need to trust the release <= br> > > managers anyway, and reproduce the whole chain themselves.
> >
> > I suppose that's part of OP's concern.
> >
> I agree that compromised RM is a problem that we should look into.
>
> We have been actually already discussing something similar. I have > been thinking about it and it could be potentially used for all
> builds. The idea is that we would setup worklfow on CI that would run =
> on tag push and it would call (authenticated https request)
> downloads.php.net server that could do the actual build, sign them = and
> return the hashes to the CI job which would display them and do extra =
> verification (probably its own build to verify that download server > work as expected).

...

> It needs more thinking to iron out all details and make sure it is a <= br> > secure but I think it would be something worth to look at.

I don't mind coming up with an automated way, but we probably should no= t
use the *downloads* server. All it does is serve files. It has no
compiler or anything else. It's a storage optimised instance with littl= e
CPU.


Yeah I agree. I originally thought tha= t it would be good to do it on our own server so we can possibly sign it th= ere as well but after thinking about it I rejected that signing idea so the= re's really no point to do it on our own server.
=C2=A0
=
On CI we already test the builds, what does stop us from also just
having it make the tarball and attach it as an artefact? We can then
setup somethin gon the downloads server to pull these artefacts. In
fact, this is exactly what we're already hoping to do for Windows
downloads too. Having it all in one place is probably even better (and
easier).

Of course, having CI make the tarballs means we need to trust that CI
isn't compromised ;-).

We will stil= l need RM to sign the build so ideally we should make it reproducible so RM= can verify that CI produced expected build and then sign it and just uploa= d the signatures (not sure if we actually need signature uploaded or if the= y are used just in announcements).

I think this sh= ould then prevent compromise of the RM and CI unless CI is compromised by R= M, of course, but that should be very unlikely.

Regards

Jakub
--00000000000063cddb06151d6ba2--