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 (<tailon-configuration-file>): 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.
This commit is contained in:
parent
f2d8e7f720
commit
91fdc8a574
|
@ -13774,6 +13774,24 @@ Initial line wrapping state in the web interface. Set to @code{#t} to
|
||||||
initially wrap lines (the default), or to @code{#f} to initially not
|
initially wrap lines (the default), or to @code{#f} to initially not
|
||||||
wrap lines.
|
wrap lines.
|
||||||
|
|
||||||
|
@item @code{http-auth} (default: @code{#f})
|
||||||
|
HTTP authentication type to use. Set to @code{#f} to disable
|
||||||
|
authentication (the default). Supported values are @code{"digest"} or
|
||||||
|
@code{"basic"}.
|
||||||
|
|
||||||
|
@item @code{users} (default: @code{#f})
|
||||||
|
If HTTP authentication is enabled (see @code{http-auth}), access will be
|
||||||
|
restricted to the credentials provided here. To configure users, use a
|
||||||
|
list of pairs, where the first element of the pair is the username, and
|
||||||
|
the 2nd element of the pair is the password.
|
||||||
|
|
||||||
|
@example
|
||||||
|
(tailon-configuration-file
|
||||||
|
(http-auth "basic")
|
||||||
|
(users '(("user1" . "password1")
|
||||||
|
("user2" . "password2"))))
|
||||||
|
@end example
|
||||||
|
|
||||||
@end table
|
@end table
|
||||||
@end deftp
|
@end deftp
|
||||||
|
|
||||||
|
|
|
@ -59,8 +59,8 @@
|
||||||
tailon-configuration-file-tail-lines
|
tailon-configuration-file-tail-lines
|
||||||
tailon-configuration-file-allowed-commands
|
tailon-configuration-file-allowed-commands
|
||||||
tailon-configuration-file-debug?
|
tailon-configuration-file-debug?
|
||||||
tailon-configuration-file-wrap-lines
|
tailon-configuration-file-http-auth
|
||||||
|
tailon-configuration-file-users
|
||||||
|
|
||||||
<tailon-configuration>
|
<tailon-configuration>
|
||||||
tailon-configuration
|
tailon-configuration
|
||||||
|
@ -224,7 +224,11 @@ for ROTATION."
|
||||||
(debug? tailon-configuration-file-debug?
|
(debug? tailon-configuration-file-debug?
|
||||||
(default #f))
|
(default #f))
|
||||||
(wrap-lines tailon-configuration-file-wrap-lines
|
(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)
|
(define (tailon-configuration-files-string files)
|
||||||
(string-append
|
(string-append
|
||||||
|
@ -254,7 +258,7 @@ for ROTATION."
|
||||||
(($ <tailon-configuration-file> files bind relative-root
|
(($ <tailon-configuration-file> files bind relative-root
|
||||||
allow-transfers? follow-names?
|
allow-transfers? follow-names?
|
||||||
tail-lines allowed-commands debug?
|
tail-lines allowed-commands debug?
|
||||||
wrap-lines)
|
wrap-lines http-auth users)
|
||||||
(text-file
|
(text-file
|
||||||
"tailon-config.yaml"
|
"tailon-config.yaml"
|
||||||
(string-concatenate
|
(string-concatenate
|
||||||
|
@ -273,7 +277,17 @@ for ROTATION."
|
||||||
(string-join allowed-commands ", ")
|
(string-join allowed-commands ", ")
|
||||||
"]"))
|
"]"))
|
||||||
,@(if debug? '(("debug" . "true")) '())
|
,@(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>
|
(define-record-type* <tailon-configuration>
|
||||||
tailon-configuration make-tailon-configuration
|
tailon-configuration make-tailon-configuration
|
||||||
|
|
Loading…
Reference in New Issue