headscale
headscale copied to clipboard
add flags for headscale serve to provide initial api key
Just played around to check one of the possible solutions to https://github.com/juanfont/headscale/issues/662.
Here i introduced 3 new flags for headscale serve
command: api-key-prefix
, api-key-pass
and api-key-expiration
. Together they allow to save pre-generated API key into DB to use it later for authentication.
Another, probably better, idea is to introduce new command: headscale apikeys save --prefix<> --password<> --expiration<>
. That would be more flexible.
Another, probably better, idea is to introduce new command:
headscale apikeys save --prefix<> --password<> --expiration<>
. That would be more flexible.
I agree. I think the place to create predefined api keys is in the apikeys
subcommand. serve
is... well... to serve the server.
I dont think we should implement this, comment in the issue.
Going to close this one, as we need to rethink a bit how to do it.