* [bug#28024] [PATCH 2/5] gnu: Update tailon to version 1.3.0.
2017-08-09 8:06 ` [bug#28024] [PATCH 1/5] gnu: Add python-tornado-http-auth Christopher Baines
@ 2017-08-09 8:06 ` Christopher Baines
2017-08-09 8:06 ` [bug#28024] [PATCH 3/5] services: Add missing wrap-lines option to tailon Christopher Baines
` (2 subsequent siblings)
3 siblings, 0 replies; 8+ messages in thread
From: Christopher Baines @ 2017-08-09 8:06 UTC (permalink / raw)
To: 28024
From version 1.1.1.
* gnu/packages/logging.scm (tailon)[version]: Change to 1.3.0.
[inputs]: Add python-tornado-http-auth.
---
gnu/packages/logging.scm | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/gnu/packages/logging.scm b/gnu/packages/logging.scm
index eecfe4558..b4f7caf56 100644
--- a/gnu/packages/logging.scm
+++ b/gnu/packages/logging.scm
@@ -96,18 +96,19 @@ command line.")
(define-public tailon
(package
(name "tailon")
- (version "1.1.1")
+ (version "1.3.0")
(source
(origin
(method url-fetch)
(uri (pypi-uri name version))
(sha256
(base32
- "08clrwpfdxcv2z2b5ardpmim4alahbw4l7631dhw62xhbcf6wjzz"))))
+ "0wl2wm6p3pc0vkk33s7rzgcfvs9cwxfmlz997pdfhlw72r00l7s5"))))
(build-system python-build-system)
(inputs
`(("python-pyyaml" ,python-pyyaml)
("python-sockjs-tornado" ,python-sockjs-tornado)
+ ("python-tornado-http-auth" ,python-tornado-http-auth)
("python-tornado" ,python-tornado)))
(arguments
`(#:phases
--
2.14.0
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [bug#28024] [PATCH 3/5] services: Add missing wrap-lines option to tailon.
2017-08-09 8:06 ` [bug#28024] [PATCH 1/5] gnu: Add python-tornado-http-auth Christopher Baines
2017-08-09 8:06 ` [bug#28024] [PATCH 2/5] gnu: Update tailon to version 1.3.0 Christopher Baines
@ 2017-08-09 8:06 ` Christopher Baines
2017-08-09 8:06 ` [bug#28024] [PATCH 4/5] services: Update the Tailon service for Tailon 1.3.0 Christopher Baines
2017-08-09 8:06 ` [bug#28024] [PATCH 5/5] services: admin: Simplify the handling of the Tailon debug? option Christopher Baines
3 siblings, 0 replies; 8+ messages in thread
From: Christopher Baines @ 2017-08-09 8:06 UTC (permalink / raw)
To: 28024
* gnu/services/admin.scm (<tailon-configuration-file>): Add wrap-lines.
(tailon-configuration-wrap-lines): New procedure.
(tailon-configuration-file-compiler): Add support for wrap-lines.
* doc/guix.texi (Monitoring Services): Document the wrap-lines Tailon
configuration option.
---
doc/guix.texi | 5 +++++
gnu/services/admin.scm | 12 +++++++++---
2 files changed, 14 insertions(+), 3 deletions(-)
diff --git a/doc/guix.texi b/doc/guix.texi
index 88bf0bb62..e4903be83 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -13769,6 +13769,11 @@ Commands to allow running. By default, @code{sed} is disabled.
@item @code{debug?} (default: @code{#f})
Set @code{debug?} to @code{#t} to show debug messages.
+@item @code{wrap-lines} (default: @code{#t})
+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
+wrap lines.
+
@end table
@end deftp
diff --git a/gnu/services/admin.scm b/gnu/services/admin.scm
index 1044833fe..19169427c 100644
--- a/gnu/services/admin.scm
+++ b/gnu/services/admin.scm
@@ -59,6 +59,8 @@
tailon-configuration-file-tail-lines
tailon-configuration-file-allowed-commands
tailon-configuration-file-debug?
+ tailon-configuration-file-wrap-lines
+
<tailon-configuration>
tailon-configuration
@@ -220,7 +222,9 @@ for ROTATION."
(allowed-commands tailon-configuration-file-allowed-commands
(default '("tail" "grep" "awk")))
(debug? tailon-configuration-file-debug?
- (default #f)))
+ (default #f))
+ (wrap-lines tailon-configuration-file-wrap-lines
+ (default #t)))
(define (tailon-configuration-files-string files)
(string-append
@@ -249,7 +253,8 @@ for ROTATION."
(match file
(($ <tailon-configuration-file> files bind relative-root
allow-transfers? follow-names?
- tail-lines allowed-commands debug?)
+ tail-lines allowed-commands debug?
+ wrap-lines)
(text-file
"tailon-config.yaml"
(string-concatenate
@@ -267,7 +272,8 @@ for ROTATION."
("commands" . ,(string-append "["
(string-join allowed-commands ", ")
"]"))
- ,@(if debug? '(("debug" . "true")) '()))))))))
+ ,@(if debug? '(("debug" . "true")) '())
+ ("wrap-lines" . ,(if wrap-lines "true" "false")))))))))
(define-record-type* <tailon-configuration>
tailon-configuration make-tailon-configuration
--
2.14.0
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [bug#28024] [PATCH 4/5] services: Update the Tailon service for Tailon 1.3.0.
2017-08-09 8:06 ` [bug#28024] [PATCH 1/5] gnu: Add python-tornado-http-auth Christopher Baines
2017-08-09 8:06 ` [bug#28024] [PATCH 2/5] gnu: Update tailon to version 1.3.0 Christopher Baines
2017-08-09 8:06 ` [bug#28024] [PATCH 3/5] services: Add missing wrap-lines option to tailon Christopher Baines
@ 2017-08-09 8:06 ` Christopher Baines
2017-08-09 8:06 ` [bug#28024] [PATCH 5/5] services: admin: Simplify the handling of the Tailon debug? option Christopher Baines
3 siblings, 0 replies; 8+ messages in thread
From: Christopher Baines @ 2017-08-09 8:06 UTC (permalink / raw)
To: 28024
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.
---
doc/guix.texi | 18 ++++++++++++++++++
gnu/services/admin.scm | 24 +++++++++++++++++++-----
2 files changed, 37 insertions(+), 5 deletions(-)
diff --git a/doc/guix.texi b/doc/guix.texi
index e4903be83..c7787e4a8 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -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
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 deftp
diff --git a/gnu/services/admin.scm b/gnu/services/admin.scm
index 19169427c..e24aebae2 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>
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."
(($ <tailon-configuration-file> 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>
tailon-configuration make-tailon-configuration
--
2.14.0
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [bug#28024] [PATCH 5/5] services: admin: Simplify the handling of the Tailon debug? option.
2017-08-09 8:06 ` [bug#28024] [PATCH 1/5] gnu: Add python-tornado-http-auth Christopher Baines
` (2 preceding siblings ...)
2017-08-09 8:06 ` [bug#28024] [PATCH 4/5] services: Update the Tailon service for Tailon 1.3.0 Christopher Baines
@ 2017-08-09 8:06 ` Christopher Baines
3 siblings, 0 replies; 8+ messages in thread
From: Christopher Baines @ 2017-08-09 8:06 UTC (permalink / raw)
To: 28024
* gnu/services/admin.scm (tailon-configuration-file-compiler): Simplify the
handling of debug?.
---
gnu/services/admin.scm | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/gnu/services/admin.scm b/gnu/services/admin.scm
index e24aebae2..14452a86c 100644
--- a/gnu/services/admin.scm
+++ b/gnu/services/admin.scm
@@ -276,7 +276,7 @@ for ROTATION."
("commands" . ,(string-append "["
(string-join allowed-commands ", ")
"]"))
- ,@(if debug? '(("debug" . "true")) '())
+ ("debug" . ,(if debug? "true" #f))
("wrap-lines" . ,(if wrap-lines "true" "false"))
("http-auth" . ,http-auth)
("users" . ,(if users
--
2.14.0
^ permalink raw reply related [flat|nested] 8+ messages in thread