All of lore.kernel.org
 help / color / mirror / Atom feed
From: Michael Richardson <mcr@sandelman.ca>
To: openbmc <openbmc@lists.ozlabs.org>
Subject: Re: Security Working Group meeting - this Wednesday February 19 - summary results
Date: Mon, 24 Feb 2020 11:14:20 -0500	[thread overview]
Message-ID: <20306.1582560860@localhost> (raw)
In-Reply-To: <20200220162633.GB41328@patrickw3-mbp.dhcp.thefacebook.com>

[-- Attachment #1: Type: text/plain, Size: 3687 bytes --]


Patrick Williams <patrick@stwcx.xyz> wrote:
    >> > 6. (Bruce via email):  BMCWeb Cert valid for 10 years -
    >> > https://lists.ozlabs.org/pipermail/openbmc/2020-February/020488.html 

    >>
    >> Change BMCweb’s default self-signed cert to a maximum of 825 days. 
    >> Recommend 30 days.
    >>
    >> When this is done, if BMCWeb generates a self-signed cert, and it is not
    >> replaced, and the BMC’s time is sane, then browsers that connect to BMCWeb
    >> will start to complain after 30 days.
    >>
    >> The recovery is: The BMC admin should install a valid BMCWeb site identity
    >> cert, then clients can re-connect to the BMC. (This will serve the updated
    >> cert and make the browser happy.)
    >>
    >> The “BMC Admin guide” should talk about installing your own cert.
    >>
    >> See docs here: https://github.com/openbmc/bmcweb/#configuration
    >>
    >> Ass code here: https://github.com/openbmc/bmcweb/blob/91243c3b28b1df66e682f5a3ee96341fdc516b5a/include/ssl_key_handler.hpp#L205
    >>
    >> Will there be a warning for the BMC admin (that the BMCWeb site cert will
    >> expire soon)?  (And don’t rely on a warning from the browser itself.)

    > If I read this correctly, the side-effect of this proposed change is:

    > - If I leave my BMC running for 30 days without it crashing, the
    > certificate it presents will have become expired and no longer
    > valid.

My reading of the code says is that in ensureOpensslKeyPresentAndValid() that
if the certificate is invalid, according to X509_verify_cert() that a new
self-signed certificate will be generated.
So, I agree that if the BMC does not reboot within the self-signed
certificate time, then it will expire, and this will be surprising.

{A system could *easily* get turned on within a group of several hundred, and
nobody gets around to noticing that it wasn't cabled correctly for 30 days
until one gets to the end of the onboarding process and asks why we bought
746 servers, and only onboarded 745 machines.}

So, this is probably rather wrong to limit to 30 days.

a) Only a self-signed certificate that was locally generated should be replaced.
   Replacing an administrator installed certificate because the clock was wrong
   is most likely wrong.

b) As long as we have this logic, we might as well do this check before
   accepting any HTTPS connection, perhaps with a do this at most once a day
   logic.     There is no advantage of expiring a self-signed certificate
   quickly in my opinion.


The concern about the CAB rules about 825 days is probably not important for
several reasons, but if one wants to limit it to that period of time, that's
okay with me.  Changing to 30 days is not a good thing.

1) the browser is going require an exception for the certificate anyway.
   Once the self-signed certificate is pinned in the browser, keeping it for
   as long as possible is better.  Expiring after 30 days makes no sense
   here.

2) it could be that browsers will reject longer-lived certificates when
   validated by a trust anchor, but the exception likely pins whatever comes
   down, period.

3) If a BMC is any kind of vulnerable environment where certificates are
   important, then the BMC needs an automated onboarding system.
   (I have one, and I'm working on code, but it's an unfunded best effort so far)

--
]               Never tell me the odds!                 | ipv6 mesh networks [
]   Michael Richardson, Sandelman Software Works        |    IoT architect   [
]     mcr@sandelman.ca  http://www.sandelman.ca/        |   ruby on rails    [


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 487 bytes --]

  parent reply	other threads:[~2020-02-24 16:14 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-17 22:29 Security Working Group meeting - this Wednesday February 19 Joseph Reynolds
2020-02-19 23:05 ` Security Working Group meeting - this Wednesday February 19 - summary results Joseph Reynolds
2020-02-20 16:26   ` Patrick Williams
2020-02-21 12:19     ` Alexander Tereschenko
2020-02-21 20:10       ` Patrick Williams
2020-02-21 20:21         ` Bruce Mitchell
2020-02-21 20:26           ` Patrick Williams
2020-02-21 20:29           ` James Feist
2020-02-24 16:19             ` Michael Richardson
2020-02-26 11:58               ` Alexander Tereschenko
2020-02-26 13:34                 ` Michael Richardson
2020-02-24 16:14     ` Michael Richardson [this message]
2020-03-03 17:56   ` Gunnar Mills

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=20306.1582560860@localhost \
    --to=mcr@sandelman.ca \
    --cc=openbmc@lists.ozlabs.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.