diff options
| -rw-r--r-- | doc/guix.texi | 18 | ||||
| -rw-r--r-- | gnu/services/admin.scm | 24 |
2 files changed, 37 insertions, 5 deletions
diff --git a/doc/guix.texi b/doc/guix.texi index e4903be8315..c7787e4a8e5 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 | |||
| 13774 | initially wrap lines (the default), or to @code{#f} to initially not | 13774 | initially wrap lines (the default), or to @code{#f} to initially not |
| 13775 | wrap lines. | 13775 | wrap lines. |
| 13776 | 13776 | ||
| 13777 | @item @code{http-auth} (default: @code{#f}) | ||
| 13778 | HTTP authentication type to use. Set to @code{#f} to disable | ||
| 13779 | authentication (the default). Supported values are @code{"digest"} or | ||
| 13780 | @code{"basic"}. | ||
| 13781 | |||
| 13782 | @item @code{users} (default: @code{#f}) | ||
| 13783 | If HTTP authentication is enabled (see @code{http-auth}), access will be | ||
| 13784 | restricted to the credentials provided here. To configure users, use a | ||
| 13785 | list of pairs, where the first element of the pair is the username, and | ||
| 13786 | the 2nd element of the pair is the password. | ||
| 13787 | |||
| 13788 | @example | ||
| 13789 | (tailon-configuration-file | ||
| 13790 | (http-auth "basic") | ||
| 13791 | (users '(("user1" . "password1") | ||
| 13792 | ("user2" . "password2")))) | ||
| 13793 | @end example | ||
| 13794 | |||
| 13777 | @end table | 13795 | @end table |
| 13778 | @end deftp | 13796 | @end deftp |
| 13779 | 13797 | ||
diff --git a/gnu/services/admin.scm b/gnu/services/admin.scm index 19169427c0c..e24aebae2ca 100644 --- a/gnu/services/admin.scm +++ b/gnu/services/admin.scm | |||
| @@ -59,8 +59,8 @@ | |||
| 59 | tailon-configuration-file-tail-lines | 59 | tailon-configuration-file-tail-lines |
| 60 | tailon-configuration-file-allowed-commands | 60 | tailon-configuration-file-allowed-commands |
| 61 | tailon-configuration-file-debug? | 61 | tailon-configuration-file-debug? |
| 62 | tailon-configuration-file-wrap-lines | 62 | tailon-configuration-file-http-auth |
| 63 | 63 | tailon-configuration-file-users | |
| 64 | 64 | ||
| 65 | <tailon-configuration> | 65 | <tailon-configuration> |
| 66 | tailon-configuration | 66 | tailon-configuration |
| @@ -224,7 +224,11 @@ for ROTATION." | |||
| 224 | (debug? tailon-configuration-file-debug? | 224 | (debug? tailon-configuration-file-debug? |
| 225 | (default #f)) | 225 | (default #f)) |
| 226 | (wrap-lines tailon-configuration-file-wrap-lines | 226 | (wrap-lines tailon-configuration-file-wrap-lines |
| 227 | (default #t))) | 227 | (default #t)) |
| 228 | (http-auth tailon-configuration-file-http-auth | ||
| 229 | (default #f)) | ||
| 230 | (users tailon-configuration-file-users | ||
| 231 | (default #f))) | ||
| 228 | 232 | ||
| 229 | (define (tailon-configuration-files-string files) | 233 | (define (tailon-configuration-files-string files) |
| 230 | (string-append | 234 | (string-append |
| @@ -254,7 +258,7 @@ for ROTATION." | |||
| 254 | (($ <tailon-configuration-file> files bind relative-root | 258 | (($ <tailon-configuration-file> files bind relative-root |
| 255 | allow-transfers? follow-names? | 259 | allow-transfers? follow-names? |
| 256 | tail-lines allowed-commands debug? | 260 | tail-lines allowed-commands debug? |
| 257 | wrap-lines) | 261 | wrap-lines http-auth users) |
| 258 | (text-file | 262 | (text-file |
| 259 | "tailon-config.yaml" | 263 | "tailon-config.yaml" |
| 260 | (string-concatenate | 264 | (string-concatenate |
| @@ -273,7 +277,17 @@ for ROTATION." | |||
| 273 | (string-join allowed-commands ", ") | 277 | (string-join allowed-commands ", ") |
| 274 | "]")) | 278 | "]")) |
| 275 | ,@(if debug? '(("debug" . "true")) '()) | 279 | ,@(if debug? '(("debug" . "true")) '()) |
| 276 | ("wrap-lines" . ,(if wrap-lines "true" "false"))))))))) | 280 | ("wrap-lines" . ,(if wrap-lines "true" "false")) |
| 281 | ("http-auth" . ,http-auth) | ||
| 282 | ("users" . ,(if users | ||
| 283 | (string-concatenate | ||
| 284 | (cons "\n" | ||
| 285 | (map (match-lambda | ||
| 286 | ((user . pass) | ||
| 287 | (string-append | ||
| 288 | " " user ":" pass))) | ||
| 289 | users))) | ||
| 290 | #f))))))))) | ||
| 277 | 291 | ||
| 278 | (define-record-type* <tailon-configuration> | 292 | (define-record-type* <tailon-configuration> |
| 279 | tailon-configuration make-tailon-configuration | 293 | tailon-configuration make-tailon-configuration |
