aboutsummaryrefslogtreecommitdiff
path: root/scripts/guix-build-coordinator.in
diff options
context:
space:
mode:
authorChristopher Baines <mail@cbaines.net>2021-02-28 18:41:07 +0000
committerChristopher Baines <mail@cbaines.net>2021-02-28 18:41:07 +0000
commit1f79fc38a17ceda30f378efd4e7f80f252c99b4d (patch)
treee5cf6166d69b3f7249d4006846751bf1fb6e5720 /scripts/guix-build-coordinator.in
parentcaf63dce0ea29a07c5205a69ff6f60b7c6b60084 (diff)
downloadbuild-coordinator-1f79fc38a17ceda30f378efd4e7f80f252c99b4d.tar
build-coordinator-1f79fc38a17ceda30f378efd4e7f80f252c99b4d.tar.gz
Add a new dynamic authentication approach
This avoids the need to create agents upfront, which could be useful when creating many childhurd VMs or using scheduling tools to dynamically run agents.
Diffstat (limited to 'scripts/guix-build-coordinator.in')
-rw-r--r--scripts/guix-build-coordinator.in11
1 files changed, 11 insertions, 0 deletions
diff --git a/scripts/guix-build-coordinator.in b/scripts/guix-build-coordinator.in
index 4c7e208..f85a0ce 100644
--- a/scripts/guix-build-coordinator.in
+++ b/scripts/guix-build-coordinator.in
@@ -737,6 +737,17 @@ tags:
(assoc-ref
(request-agents-list (assq-ref opts 'coordinator))
"agents")))))
+ (("dynamic-auth" "create-token")
+ (let ((opts (parse-options (append %client-options
+ %base-options)
+ (append %client-option-defaults
+ %base-option-defaults)
+ '())))
+ (let ((token
+ (assoc-ref (send-create-dynamic-auth-token-request
+ (assq-ref opts 'coordinator))
+ "token")))
+ (simple-format #t "~A\n" token))))
((arguments ...)
(let* ((opts (parse-options (append %service-options
%base-options)