m-lab / ndt-server

docker native ndt5 and ndt7 server with prometheus integration
https://www.measurementlab.net/
Apache License 2.0
99 stars 40 forks source link

Use flagx.StringFile for autocert.hostname and token.machine #406

Closed stephen-soltesz closed 2 days ago

stephen-soltesz commented 5 days ago

This change updates the flag type used by the -autocert.hostname and -token.machine flags to flagx.StringFile. This flag type allows a single flag to pass a literal string value, e.g. the actual hostname, or a filename with the contents for the string value, e.g. the hostname in a file.

This change is in service of enabling access token verification in autonode deployments. Current users of autocert.hostname will need to be updated with a prefix of @ to read from the named file. The only known users are from https://github.com/m-lab/autonode


This change is Reviewable