about summary refs log tree commit diff
diff options
context:
space:
mode:
authorArun Isaac2024-02-29 19:36:51 +0000
committerArun Isaac2024-02-29 19:36:51 +0000
commit543abcd94c87145a32505a5c8c91f7fc993b7234 (patch)
tree5889e4394303004e0a67c12dee90fba27413daf9
parent62f5f898558f78f4442713f9a7d1982e1adc3b42 (diff)
downloadgn-machines-543abcd94c87145a32505a5c8c91f7fc993b7234.tar.gz
Do not hard-code GN_AUTH_SECRETS.
*
genenetwork-development.scm (<genenetwork-configuration>)[gn-auth-secrets]:
New field.

* genenetwork-development.scm (gn-auth-cd-gexp): Set GN_AUTH_SECRTS
from gn-auth-secrets of <genenetwork-configuration> object.
(operating-system)[services]{genenetwork-service-type}: Set
gn-auth-secrets.
-rw-r--r--genenetwork-development.scm7
1 files changed, 5 insertions, 2 deletions
diff --git a/genenetwork-development.scm b/genenetwork-development.scm
index 78ee9f3..5d0a62b 100644
--- a/genenetwork-development.scm
+++ b/genenetwork-development.scm
@@ -129,6 +129,8 @@ be imported into G-expressions."
                (default "/etc/genenetwork/gn2-secrets.py"))
   (gn3-secrets genenetwork-configuration-gn3-secrets
                (default "/etc/genenetwork/gn3-secrets.py"))
+  (gn-auth-secrets genenetwork-configuration-gn-auth-secrets
+                   (default "/etc/genenetwork/gn-auth-secrets.py"))
   (genotype-files genenetwork-configuration-genotype-files
                   (default "/var/genenetwork/genotype-files"))
   (sparql-endpoint genenetwork-configuration-sparql-endpoint
@@ -531,7 +533,7 @@ server described by CONFIG, a <genenetwork-configuration> object."
   "Return a G-expression that runs the latest gn-auth development
 server described by CONFIG, a <genenetwork-configuration> object."
   (match-record config <genenetwork-configuration>
-    (gn-auth-repository gn-auth-port auth-db-path)
+    (gn-auth-repository gn-auth-port auth-db-path gn-auth-secrets)
     (with-manifest (package->development-manifest gn-auth)
       (with-packages (list git-minimal nss-certs)
         (with-imported-modules '((guix build utils))
@@ -556,7 +558,7 @@ server described by CONFIG, a <genenetwork-configuration> object."
               (setenv "GN_AUTH_CONF"
                       #$(mixed-text-file "gn-auth.conf"
 					 "AUTH_DB=\"" auth-db-path "\"\n"))
-	      (setenv "GN_AUTH_SECRETS" "/etc/genenetwork/conf/gn-auth/secrets.py")
+	      (setenv "GN_AUTH_SECRETS" #$gn-auth-secrets)
               (setenv "HOME" "/tmp")
 	      (setenv "AUTHLIB_INSECURE_TRANSPORT" "true")
               ;; Run gn-auth.
@@ -1157,6 +1159,7 @@ gn-auth."
 			     (gn-auth-port %gn-auth-port)
                              (gn2-secrets "/etc/genenetwork/conf/gn2/secrets.py")
                              (gn3-secrets "/etc/genenetwork/conf/gn3/secrets.py")
+                             (gn-auth-secrets "/etc/genenetwork/conf/gn-auth/secrets.py")
                              (genotype-files "/export/data/genenetwork/genotype_files")
                              (sparql-endpoint (string-append "http://localhost:"
                                                              (number->string %virtuoso-sparql-port)