All of lore.kernel.org
 help / color / mirror / Atom feed
From: Richard Purdie <richard.purdie@linuxfoundation.org>
To: enrico.scholz@sigma-chemnitz.de,
	openembedded-core@lists.openembedded.org
Subject: Re: [OE-core] [PATCH 0/7] Replace sshd_config patching by snippets
Date: Thu, 14 Mar 2024 13:40:57 +0000	[thread overview]
Message-ID: <68d71da3a6f49e2ac4594fa8ca633cdc7eb2e0fe.camel@linuxfoundation.org> (raw)
In-Reply-To: <17BC9C80577EA5C2.22340@lists.openembedded.org>

On Thu, 2024-03-14 at 11:00 +0000, Richard Purdie via
lists.openembedded.org wrote:
> On Mon, 2024-03-11 at 10:19 -0700, Enrico Scholz via
> lists.openembedded.org wrote:
> > To deal with system setups, sshd was configured in the following
> > way:
> > 
> >  - sshd_config is shipped completely by OE and DISTRO_FEATURES
> > (pam,
> >    x11) are patched in during do_install
> > 
> >    --> this is difficulty to maintain; e.g. sshd_config must be
> >        synchronized between OpenSSH releases and OE adaptations
> >        manually inserted
> > 
> >  - two different configuration files (sshd_config +
> > sshd_config_readonly)
> >    are created; IMAGE_FEATURES decides which one is used and it is
> > patched
> >    in a ROOTFS_COMMAND in the system
> > 
> >    --> this make it difficult for third party recipes to
> > incorporate
> >        their changes (they have to go over both files)
> > 
> >    --> the readonly HostKey locations and algorithms are hardcoded
> >        which makes it difficult to place them e.g. on a persistent
> >        /opt partition and disable e.g. ecdsa
> > 
> >  - depending on IMAGE_FEATURES (empty passwords, root login), both
> >    files are patched by a ROOTFS_POSTCOMMAND
> > 
> >    --> these changes are lost when pkgmgmt is used for the image
> > and
> >        openssh being updated
> > 
> > 
> > The patchset:
> > 
> >  - reduces changes to sshd_config to
> > 
> >    | Include /etc/ssh/sshd_config.d/*.conf
> > 
> >    --> This is already the done in current recipe and most mainline
> >        Linux distributions are doing it
> > 
> >  - moves configuration in new openssh-config recipe which is a weak
> >    dependency of openssh (and can be replaced by another
> > IMAGE_INSTALL)
> > 
> >    Recipe ships configuration as small snippets which might contain
> >    dynamically created content (e.g. 'UsePAM yes')
> > 
> >  - IMAGE_FEATURE based setup is done by creating subpackages with
> >    the corresponding options.  These subpackages are added to
> >    FEATURE_PACKAGES_ssh-server-openssh
> > 
> >  - readonly rootfs setup has been enhanced by
> > 
> >    | RO_KEYDIR ??= "/var/run/ssh"
> >    | KEY_ALGORITHMS ??= "rsa ecdsa ed25519"
> > 
> >    parameters which can be overridden.
> 
> 
> Thanks for sending this. I suspect something like this might be
> desirable however unfortunately the timing is a little tricky as
> we're
> just past the feature freeze point for 5.0.
> 
> I know people often want to push for the inclusion of things into
> something like the LTS so I did put this through the automated
> testing,
> just to get an idea of the potential issues.
> 
> The first run had lots of these warnings:
> 
> https://autobuilder.yoctoproject.org/typhoon/#/builders/63/builds/8649/steps/14/logs/warnings
> 
> so I squashed a fix in for that. The second run had this:
> 
> https://autobuilder.yoctoproject.org/typhoon/#/builders/81/builds/6390/steps/12/logs/stdio
> 
> which suggests ssh connections into our image testing doesn't work.
> It
> is unclear why that is failing there but there were indications in
> the
> previous build that other ssh connections were working ok. It could
> be
> dropbear vs openssh at a guess. That build is still ongoing too so
> there may be other issues.
> 
> Anyway I just wanted to highlight the testing results and to say that
> this is something we should think about but it will have to wait
> until
> after 5.0 releases.
> 
> I haven't reviewed the patches in much detail, I mainly wanted to get
> the automated testing results shared.

Some further related warnings:

https://autobuilder.yoctoproject.org/typhoon/#/builders/23/builds/9031/steps/11/logs/warnings

Cheers,

Richard


  parent reply	other threads:[~2024-03-14 13:41 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-11 17:18 [PATCH 0/7] Replace sshd_config patching by snippets Enrico Scholz
2024-03-11 17:18 ` [PATCH 1/7] openssh: replace complete configuration files by patch Enrico Scholz
2024-03-11 17:41   ` Patchtest results for " patchtest
2024-03-11 18:16   ` [PATCH 1/7, v2] " Enrico Scholz
2024-03-11 18:33     ` Patchtest results for " patchtest
2024-03-12 11:00   ` [PATCH 1/7, v3] " Enrico Scholz
2024-03-12 13:10     ` [OE-core] " Alexander Kanavin
2024-03-12 14:06       ` Enrico Scholz
2024-03-16 23:58     ` Alexandre Belloni
2024-03-11 17:18 ` [PATCH 2/7] openssh-config: initial checkin Enrico Scholz
2024-03-11 17:41   ` Patchtest results for " patchtest
2024-03-11 18:12     ` Enrico Scholz
2024-03-12 13:14       ` [OE-core] " Trevor Gamblin
2024-03-11 17:18 ` [PATCH 3/7] openssh: move configuration tweaking in configuration recipe Enrico Scholz
2024-03-11 17:18 ` [PATCH 4/7] image: prepare openssh configuration Enrico Scholz
2024-03-11 17:18 ` [PATCH 5/7] openssh: replace 'allow-empty-password' rootfs scipt by configuration Enrico Scholz
2024-03-11 17:18 ` [PATCH 6/7] openssh: replace 'allow-root-login' " Enrico Scholz
2024-03-11 17:18 ` [PATCH 7/7] openssh: move read-only-rootfs setup in configuration snippet Enrico Scholz
2024-03-12 13:14 ` [OE-core] [PATCH 0/7] Replace sshd_config patching by snippets Alexander Kanavin
2024-03-14 11:00 ` Richard Purdie
2024-03-14 14:11   ` Enrico Scholz
2024-03-14 14:27     ` Richard Purdie
     [not found] ` <17BC9C80577EA5C2.22340@lists.openembedded.org>
2024-03-14 13:40   ` Richard Purdie [this message]
2024-03-14 14:57     ` Enrico Scholz
2024-03-14 17:47       ` Alexander Kanavin

Reply instructions:

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

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

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

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

  git send-email \
    --in-reply-to=68d71da3a6f49e2ac4594fa8ca633cdc7eb2e0fe.camel@linuxfoundation.org \
    --to=richard.purdie@linuxfoundation.org \
    --cc=enrico.scholz@sigma-chemnitz.de \
    --cc=openembedded-core@lists.openembedded.org \
    /path/to/YOUR_REPLY

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

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.