9front - general discussion about 9front
 help / color / mirror / Atom feed
From: Stanley Lieber <sl@stanleylieber.com>
To: 9front@9front.org
Subject: Re: [9front] aclient: a draft.
Date: Sun, 04 Jul 2021 11:30:10 -0400	[thread overview]
Message-ID: <1250D635-BD43-467A-897F-A3FBA7296989@stanleylieber.com> (raw)
In-Reply-To: <8C888BE430C392CE31D2CFCF57DD01A3@eigenstate.org>

On July 3, 2021 8:52:08 PM EDT, ori@eigenstate.org wrote:
>I've been working on a client for ACME cert managemnet
>protocol, RFC8555. It's what letsencrypt uses, as well
>as several other providers.
>
>It works, though there are probably a few tweaks to be
>done before it gets committed, and we should figure out
>how to get DNS challenges working.
>
>The code is here until I commit it to 9front:
>
>	http://shithub.us/ori/aclient/HEAD/info.html
>
>Before committing:
>
>- I'd like to figure out a way to add a way to
>  add a script to handle the challenge, without
>  making the program clunky.
>- I'd like add support for DNS challenges.
>- I think the default locations may not be
>  ideal, and I'd like to see if there are
>  better options.
>- Get a round of review and thoughts on what
>  it should do differently.
>- Maybe rename it to honest/acmed -- Honest
>  Acmed's guaranteed-unsketchy used cert
>  emporium and underwear store.
>
>But it's there, and it works.
>
>Manpage below:
>
>     ACLIENT(8)                                             ACLIENT(8)
>
>     NAME
>          aclient - acme certificate client
>
>     SYNOPSIS
>          aclient [ -o outdir ] [ -p provider ] [ -a acctkey ] [ c
>          csrkey ] [ w chaldir ] acctname domain
>
>     DESCRIPTION
>          Aclient fetches and renews TLS certificates using the acme
>          protocol.  It requires a pregenerated account key and cer-
>          tificate signing key.
>
>          There are a number of options.
>
>          -o   outdir Specifies that the signed certificate is placed
>               in outdir in place of the default /sys/lib/tls/acme/.
>
>          -p   provider Specifies that provider is used as the pro-
>               vider URL, in place of the default https://acme-
>               v02.api.letsencrypt.org/directory. This must be the
>               directory URL for the desired RFC8555 compliant pro-
>               vider
>
>          -a   acctkey Specifies that acctkey is used to sign requests
>               to the provider in place of the default
>               /sys/lib/tls/acme/$acctname.pub. The key must be a jwk
>               formatted RSA key.
>
>          c    csrkey Specifies that csrkey is used to produce the CSR
>               sent to provider in place of the default
>               /sys/lib/tls/acme/$domain.key. The key must be a plan 9
>               formatted RSA key suitable for aux/rsa2csr.
>
>          w    chaldir Specifies that the challenge is written out to
>               chaldir. For HTTP challenges, this defaults to
>               /usr/web/.well-known/acme-challenge/.
>
>     EXAMPLES
>          Before aclient is run, the keys must be generated.
>
>               auth/rsagen -t 'service=acme role=sign hash=sha256 acct=me@example.org' |
>                    tee /sys/lib/acme/me@example.org.priv |
>                    auth/rsa2jwk > /sys/lib/acme/me@example.org.pub
>               auth/rsagen -t 'service=tls owner=*'
>                    >/sys/lib/acme/mydomain.com.key
>
>          This need only be run once.  Once the keys are generated,
>          they should be loaded into factotum:
>
>               cat /sys/lib/acme/mydomain.com.key >/mnt/factotum/ctl
>               cat /sys/lib/acme/me@example.org.priv >/mnt/factotum/ctl
>
>          The certificate for the domain can now be fetched:
>
>               aclient me@example.org mydomain.com
>
>     SOURCE
>          /sys/src/cmd/$somewhere/aclient.c
>
>     BUGS
>          Aclient only supports HTTP challenges that placed in static
>          directories.  It should add support for DNS challenges, and
>          provide a way for a script to be invoked while handling
>          them.
>
>

ironically, instead of acme doing everything, we now have everything being called acme.

maybe consider /sys/lib/tls/aclient instead of /sys/lib/tls/acme?*

* I assume the scattered references to /sys/lib/acme were meant to be /sys/lib/tls/acme.

sl

  reply	other threads:[~2021-07-05  3:44 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-04  0:52 ori
2021-07-04 15:30 ` Stanley Lieber [this message]
2021-07-05  3:37   ` unobe
2021-07-05  9:01     ` hiro
2021-07-05 23:33       ` ori
2021-07-05 23:34   ` ori

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=1250D635-BD43-467A-897F-A3FBA7296989@stanleylieber.com \
    --to=sl@stanleylieber.com \
    --cc=9front@9front.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).