add support for multiple secrets (independent agents) on the knock daemon
Some checks failed
continuous-integration/drone/push Build is failing

This allows you to generate more than one pre-shared secret on the knock daemon so that you can distribute the secret and control revocation at a more granular level.  Each additional secret creates one more concurrent authentic knock sequence.
This commit is contained in:
2024-04-19 22:04:00 -06:00
parent 334407e309
commit 2951c1f684
5 changed files with 69 additions and 25 deletions

View File

@ -47,9 +47,15 @@ Example Usage:
hypdConfiguration, err := configuration.LoadConfiguration(args[0])
if err != nil {
panic(fmt.Errorf("failed to start packet server: %w", err))
panic(fmt.Errorf("failed to load configuration file '%s': %w", args[0], err))
}
err = server.PacketServer(hypdConfiguration)
secrets, err := configuration.LoadSecrets(hypdConfiguration.PreSharedKeyDirectory)
if err != nil {
panic(fmt.Errorf("failed to load secrets from directory '%s': %w", hypdConfiguration.PreSharedKeyDirectory, err))
}
err = server.PacketServer(hypdConfiguration, secrets)
if err != nil {
panic(fmt.Errorf("failed to start packet server: %w", err))
}