unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: Bruno Victal <mirai@makinata.eu>
To: Christopher Baines <mail@cbaines.net>
Cc: 59621@debbugs.gnu.org
Subject: [bug#59621] [PATCH] services: nginx: Add support for ssl-stapling in server blocks.
Date: Sat, 7 Jan 2023 20:07:11 +0000	[thread overview]
Message-ID: <b9513572-b409-e6c4-cec5-ee1c7d5f2f04@makinata.eu> (raw)
In-Reply-To: <87o7ramay8.fsf@cbaines.net>

Hi

On 2023-01-07 17:21, Christopher Baines wrote:
> 
> mirai@makinata.eu writes:
> 
>> From: Bruno Victal <mirai@makinata.eu>
>>
>> * gnu/services/web.scm (<nginx-server-configuration>): Add
>> ssl-stapling? and ssl-stapling-verify?.
>> * doc/guix.texi (NGINX): Document this.
>> ---
>>  doc/guix.texi        |  7 +++++
>>  gnu/services/web.scm | 69 +++++++++++++++++++++++++-------------------
>>  2 files changed, 46 insertions(+), 30 deletions(-)
> 
> Hi Bruno,
> 
> Thanks for the patch, and sorry it's taken so long to reply.
> 
>> @@ -647,6 +654,8 @@ (define-syntax-rule (and/l x tail ...)
>>       "      server_name " (config-domain-strings server-name) ";\n"
>>       (and/l ssl-certificate     "      ssl_certificate " <> ";\n")
>>       (and/l ssl-certificate-key "      ssl_certificate_key " <> ";\n")
>> +     "      ssl_stapling " (if ssl-stapling? "on" "off") ";\n"
>> +     "      ssl_stapling_verify " (if ssl-stapling-verify? "on" "off") ";\n"
>>       (if (not (equal? "" root))
>>           (list "      root " root ";\n")
>>           "")
>>
>> base-commit: 68925b5ee7e0d96b0c84ae98a633eea5097bf511
> 
> Generally this looks good to me. There's some unnecessary indentation
> changes that should probably go in another commit if they're made, but I
> did spot something in the above diff.

I was afraid that doing it in a separate commit would have
made it less clearer as it would have looked like a trivial cosmetic
change without any purpose.

> 
> I'm no expert in NGinx configs, but I do wonder if this change will
> break using nginx if it's built without the ngx_http_ssl_module? With
> the other module specific configuration (e.g. ssl_certificate), it's
> possible to specify a value in the <nginx-server-configuration> that
> means the line won't be included in the configuration. I think it would
> be good to continue that here.

I haven't tested this with a nginx that is built without ngx_http_ssl_module,
it would be a rather esoteric nginx build as TLS support presence is a
common expectation of web servers.
 
> I'm not sure how to enable not including these config lines. Maybe a
> symbol value like 'noval could be used (this should also be the default,
> rather than #f), or maybe 'on and 'off could be used as the values with
> #f meaning the line isn't included.
> 
> Does that make sense?

I'm not a fan of this approach as there's define-configuration
and define-maybe value types that should be used here rather than
making up a custom value, though I'm afraid reworking nginx-configuration
and writing the serialize- procedures to use the gnu/services/configuration.scm
facilities is a much bigger effort than what's done in this patch.

Before such effort is to be considered, a plan to solve [1] is required as I don't
think define-configuration is enough to represent the structure of nginx.conf
(nested locations, if branches, configuration for custom modules, etc.)

[1]: https://issues.guix.gnu.org/37388


Cheers,
Bruno




  reply	other threads:[~2023-01-07 20:08 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-26 23:59 [bug#59621] [PATCH] services: nginx: Add support for ssl-stapling in server blocks mirai
2023-01-07 17:21 ` Christopher Baines
2023-01-07 20:07   ` Bruno Victal [this message]
2023-03-21 13:20     ` Maxim Cournoyer

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

  List information: https://guix.gnu.org/

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

  git send-email \
    --in-reply-to=b9513572-b409-e6c4-cec5-ee1c7d5f2f04@makinata.eu \
    --to=mirai@makinata.eu \
    --cc=59621@debbugs.gnu.org \
    --cc=mail@cbaines.net \
    /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.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).