]> git.ipfire.org Git - pakfire.git/commitdiff
daemon: Authenticate against the hub using Kerberos
authorMichael Tremer <michael.tremer@ipfire.org>
Mon, 10 Oct 2022 10:41:00 +0000 (10:41 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Tue, 11 Oct 2022 11:19:57 +0000 (11:19 +0000)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
contrib/config/daemon.conf
src/pakfire/daemon.py

index 143a7f6d5b6481a65f52fc8561959bf7a13e48b3..41569ad2596f3112d4da9d24301e82fbefb1cc86 100644 (file)
@@ -5,10 +5,5 @@
 # The URL of the server to connect to.
 # server = https://pakfirehub.ipfire.org/
 
-# The hostname of this machine.
-# hostname = <automatically detected>
-
-# The authentication secret that is used
-# to identify this host against the pakfire
-# build service.
-# secret = 1234...
+# The keytab file that is being used to authenticate against the Hub
+# keytab = /etc/krb5.keytab
index dfa0e54e5835b0e45d89ae4f96301ec2064bc61f..a6bb9ff4745d4974a6ce611e72790f90d4fd01e5 100644 (file)
@@ -47,14 +47,10 @@ class Daemon(object):
                url = self.config.get("daemon", "server", PAKFIRE_HUB)
 
                # Host Credentials
-               hostname = self.config.get("daemon", "hostname", socket.gethostname())
-               password = self.config.get("daemon", "secret")
-
-               if not hostname or not password:
-                       raise RuntimeError("Host credentials are not set")
+               keytab = self.config.get("daemon", "keytab", None)
 
                # Create connection to the hub
-               return hub.Hub(url, hostname, password)
+               return hub.Hub(url, keytab=keytab)
 
        async def run(self):
                """