unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
* [bug#28024] [PATCH] Upgrade Tailon from 1.1.1 to 1.3.0
@ 2017-08-09  7:29 Christopher Baines
  2017-08-09  8:06 ` [bug#28024] [PATCH 1/5] gnu: Add python-tornado-http-auth Christopher Baines
  2017-08-09 20:51 ` [bug#28024] [PATCH] Upgrade Tailon from 1.1.1 to 1.3.0 Marius Bakke
  0 siblings, 2 replies; 8+ messages in thread
From: Christopher Baines @ 2017-08-09  7:29 UTC (permalink / raw)
  To: 28024

[-- Attachment #1: Type: text/plain, Size: 22 bytes --]

Patches incomming...

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 963 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [bug#28024] [PATCH 1/5] gnu: Add python-tornado-http-auth.
  2017-08-09  7:29 [bug#28024] [PATCH] Upgrade Tailon from 1.1.1 to 1.3.0 Christopher Baines
@ 2017-08-09  8:06 ` Christopher Baines
  2017-08-09  8:06   ` [bug#28024] [PATCH 2/5] gnu: Update tailon to version 1.3.0 Christopher Baines
                     ` (3 more replies)
  2017-08-09 20:51 ` [bug#28024] [PATCH] Upgrade Tailon from 1.1.1 to 1.3.0 Marius Bakke
  1 sibling, 4 replies; 8+ messages in thread
From: Christopher Baines @ 2017-08-09  8:06 UTC (permalink / raw)
  To: 28024

* gnu/packages/python.scm (python-tornado-http-auth): New variable.
---
 gnu/packages/python.scm | 23 +++++++++++++++++++++++
 1 file changed, 23 insertions(+)

diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm
index 79c6eca00..227c01027 100644
--- a/gnu/packages/python.scm
+++ b/gnu/packages/python.scm
@@ -6560,6 +6560,29 @@ connection to each user.")
          ("python2-singledispatch" ,python2-singledispatch)
           ,@(package-propagated-inputs tornado))))))
 
+(define-public python-tornado-http-auth
+  (package
+    (name "python-tornado-http-auth")
+    (version "1.1.0")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (pypi-uri "tornado-http-auth" version))
+       (sha256
+        (base32
+         "0znrgqd7k2s4ia474xizi6h3061zj4sn5n6cq76bkwl3wwshifn5"))))
+    (build-system python-build-system)
+    (propagated-inputs
+     `(("python-tornado" ,python-tornado)))
+    (home-page
+     "https://github.com/gvalkov/tornado-http-auth")
+    (synopsis
+     "Digest and basic authentication module for Tornado")
+    (description
+     "Provides support for adding authentication to services using the Tornado
+web framework, either via the basic or digest authentication schemes.")
+    (license license:asl2.0)))
+
 ;; the python- version can be removed with python-3.5
 (define-public python-backports-abc
   (package
-- 
2.14.0

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [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

* [bug#28024] [PATCH] Upgrade Tailon from 1.1.1 to 1.3.0
  2017-08-09  7:29 [bug#28024] [PATCH] Upgrade Tailon from 1.1.1 to 1.3.0 Christopher Baines
  2017-08-09  8:06 ` [bug#28024] [PATCH 1/5] gnu: Add python-tornado-http-auth Christopher Baines
@ 2017-08-09 20:51 ` Marius Bakke
  2017-08-09 23:43   ` bug#28024: " Christopher Baines
  1 sibling, 1 reply; 8+ messages in thread
From: Marius Bakke @ 2017-08-09 20:51 UTC (permalink / raw)
  To: Christopher Baines, 28024

[-- Attachment #1: Type: text/plain, Size: 248 bytes --]

Christopher Baines <mail@cbaines.net> writes:

> Patches incomming...

Pro tip: You can use `git format-patch --cover-letter` to generate a
nice diffstat for the upcoming patches. Handy for signing off whole
series at once ;-) these LGTM at least.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 487 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

* bug#28024: [PATCH] Upgrade Tailon from 1.1.1 to 1.3.0
  2017-08-09 20:51 ` [bug#28024] [PATCH] Upgrade Tailon from 1.1.1 to 1.3.0 Marius Bakke
@ 2017-08-09 23:43   ` Christopher Baines
  0 siblings, 0 replies; 8+ messages in thread
From: Christopher Baines @ 2017-08-09 23:43 UTC (permalink / raw)
  To: Marius Bakke; +Cc: 28024-done

[-- Attachment #1: Type: text/plain, Size: 415 bytes --]

On Wed, 09 Aug 2017 22:51:44 +0200
Marius Bakke <mbakke@fastmail.com> wrote:

> Christopher Baines <mail@cbaines.net> writes:
> 
> > Patches incomming...  
> 
> Pro tip: You can use `git format-patch --cover-letter` to generate a
> nice diffstat for the upcoming patches. Handy for signing off whole
> series at once ;-) these LGTM at least.

That's really neat, thanks for the tip and for reviewing :)

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 963 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2017-08-09 23:44 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-08-09  7:29 [bug#28024] [PATCH] Upgrade Tailon from 1.1.1 to 1.3.0 Christopher Baines
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   ` [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
2017-08-09 20:51 ` [bug#28024] [PATCH] Upgrade Tailon from 1.1.1 to 1.3.0 Marius Bakke
2017-08-09 23:43   ` bug#28024: " Christopher Baines

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).