From 91fdc8a574cccecd55d042bc1f76ab7f7d3adced Mon Sep 17 00:00:00 2001 From: Christopher Baines Date: Wed, 26 Jul 2017 12:18:06 +0100 Subject: services: Update the Tailon service for Tailon 1.3.0. Tailon 1.3.0 (upgraded from 1.1.1) adds support for HTTP authentication. * gnu/services/admin.scm (): Add http-auth and users configuration values. (tailon-configuration-file-http-auth, tailon-configuration-file-users): New procedures. (tailon-configuration-file-compiler): Add support for the http-auth and users configuration options. * doc/guix.texi (Monitoring Services): Document authentication for Tailon. --- gnu/services/admin.scm | 24 +++++++++++++++++++----- 1 file changed, 19 insertions(+), 5 deletions(-) (limited to 'gnu/services/admin.scm') diff --git a/gnu/services/admin.scm b/gnu/services/admin.scm index 19169427c0..e24aebae2c 100644 --- a/gnu/services/admin.scm +++ b/gnu/services/admin.scm @@ -59,8 +59,8 @@ tailon-configuration-file-tail-lines tailon-configuration-file-allowed-commands tailon-configuration-file-debug? - tailon-configuration-file-wrap-lines - + tailon-configuration-file-http-auth + tailon-configuration-file-users tailon-configuration @@ -224,7 +224,11 @@ for ROTATION." (debug? tailon-configuration-file-debug? (default #f)) (wrap-lines tailon-configuration-file-wrap-lines - (default #t))) + (default #t)) + (http-auth tailon-configuration-file-http-auth + (default #f)) + (users tailon-configuration-file-users + (default #f))) (define (tailon-configuration-files-string files) (string-append @@ -254,7 +258,7 @@ for ROTATION." (($ files bind relative-root allow-transfers? follow-names? tail-lines allowed-commands debug? - wrap-lines) + wrap-lines http-auth users) (text-file "tailon-config.yaml" (string-concatenate @@ -273,7 +277,17 @@ for ROTATION." (string-join allowed-commands ", ") "]")) ,@(if debug? '(("debug" . "true")) '()) - ("wrap-lines" . ,(if wrap-lines "true" "false"))))))))) + ("wrap-lines" . ,(if wrap-lines "true" "false")) + ("http-auth" . ,http-auth) + ("users" . ,(if users + (string-concatenate + (cons "\n" + (map (match-lambda + ((user . pass) + (string-append + " " user ":" pass))) + users))) + #f))))))))) (define-record-type* tailon-configuration make-tailon-configuration -- cgit 1.4.1