Index: trunk/bin/bkmkd
===================================================================
--- trunk/bin/bkmkd	(revision 115)
+++ trunk/bin/bkmkd	(revision 116)
@@ -47,4 +47,12 @@
         %DEFINES,
     };
+
+    # if authentication is enabled and no digest_key is provided, generate one
+    # don't do this if it isn't needed, since this is sometimes not a fast operation
+    if ($config->{auth} && !$config->{digest_key}) {
+        warn "Generating digest authentication secret...\n";
+        require Bytes::Random::Secure;
+        $config->{digest_key} = Bytes::Random::Secure::random_bytes_base64(16, '');
+    }
 
     # make config paths absolute before handing off to the app
