Kristoffer Dalby
8dadb045cf
Mark -n and --namespace as deprecated
...
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com>
2023-01-26 10:22:38 +01:00
Kristoffer Dalby
90287a6735
gofumpt
...
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com>
2023-01-18 15:40:04 +01:00
Kristoffer Dalby
e3a2593344
Rename [Nn]amespace -> [Uu]ser in go code
...
Use gopls, ag and perl to rename all occurances of Namespace
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com>
2023-01-18 15:40:04 +01:00
Benjamin George Roberts
c52e3aafe6
remove unnecessary checks on slices
2022-09-23 18:04:30 +10:00
Benjamin George Roberts
791272e408
Adds grpc/cli support for preauthkey tags
2022-08-25 22:23:46 +10:00
Adrien Raffin-Caboisse
79688e6187
chore(all): apply formater
2022-08-04 10:47:00 +02:00
Kristoffer Dalby
d860270733
Use Prometheus duration parser (support days and weeks)
2022-05-30 16:10:39 +02:00
henning mueller
b2ae9b6cac
fix: Remove days from expiry option value examples
2022-04-05 18:45:29 +02:00
zakaria
12b3b5f8f1
feat(aliases): add aliases for preauthkeys
command
...
- `preauthkey`, `authkey`, `pre` are aliases for `preauthkey` command
- `ls`, `show` are aliases for `list` subcommand
- `c`, `new` are aliases for `create` subcommand
- `revoke`, `exp`, `e` are aliases for `expire` subcommand
2022-03-02 15:42:12 +10:00
Kristoffer Dalby
6e14fdf0d3
More reusable stuff in cli
2022-01-25 22:11:15 +00:00
Ward Vandewege
c7f3e0632b
When creating a preauthkey, the default expiration was passed through as
...
a nil value, instead of the default value (1h). This resulted in the
preauthkey being created with expiration key '0001-01-01 00:00:00',
which meant the key would not work, because it was already expired.
This commit applies the default expiration time (1h) when a preauthkey
is created without a specific expiration. It also updates an integration
test to make sure this bug does not reoccur.
2021-11-26 10:04:26 -05:00
Kristoffer Dalby
d6739386a0
Get rid of dynamic errors
2021-11-15 19:18:14 +00:00
Kristoffer Dalby
715542ac1c
Add and fix stylecheck (golint replacement)
2021-11-15 17:24:24 +00:00
Kristoffer Dalby
471c0b4993
Initial work eliminating one/two letter variables
2021-11-14 20:32:03 +01:00
Kristoffer Dalby
85f28a3f4a
Remove all instances of undefined numbers (gonmd)
2021-11-14 18:31:51 +01:00
Kristoffer Dalby
89eb13c6cb
Add and fix nlreturn (new line return)
2021-11-14 16:46:09 +01:00
Kristoffer Dalby
03b7ec62ca
Go format with shorter lines
2021-11-13 08:36:45 +00:00
Kristoffer Dalby
0803c407a9
Fix Reusable typo, add tests for Augustines scenario
2021-11-08 20:49:03 +00:00
Kristoffer Dalby
dce6b8d72e
Add test case and fix nil pointer in preauthkeys command without expiration
2021-11-08 08:02:01 +00:00
Kristoffer Dalby
2dfd42f80c
Attempt to dry up CLI client, add proepr config
...
This commit is trying to DRY up the initiation of the gRPC client in
each command:
It renames the function to CLI instead of GRPC as it actually set up a
CLI client, not a generic grpc client
It also moves the configuration of address, timeout (which is now
consistent) and api to use Viper, allowing users to set it via env vars
and configuration file
2021-11-07 09:41:14 +00:00
Kristoffer Dalby
77a973878c
Convert preauthkeys command to use gRPC
2021-11-04 22:44:49 +00:00
Juan Font
654d2b9910
Merge branch 'main' into complete-expire-command
2021-10-16 09:41:14 +02:00
Juan Font Alonso
0d13e16fed
Improve help message to expire key ( fixes #161 )
2021-10-14 23:58:15 +02:00
Juan Font Alonso
91d135e069
Show JSON when error on expire key ( fixes #162 )
2021-10-14 23:54:07 +02:00
Juan Font
93517aa6f8
Apply suggestions from code review
...
Renamed AlreadyUsed to Used
Co-authored-by: Kristoffer Dalby <kradalby@kradalby.no>
2021-10-13 22:51:55 +02:00
Juan Font Alonso
30788e1a70
Add AlreadyUsed field to Auth Keys ( fixes #157 and #158 )
2021-10-13 18:13:26 +02:00
Juan Font
bc2574680d
Linting
2021-08-15 23:35:03 +02:00
Juan Font
f194b41435
Better table in preauthkeys
2021-08-15 23:29:55 +02:00
Kristoffer Dalby
c9e5048015
Merge remote-tracking branch 'upstream/main' into integration-tests
2021-08-08 17:57:28 +01:00
Kristoffer Dalby
91ffd10192
Remove "Keys: " from create auth key output
...
This is based on the premis that "the user know what command they
executed" and therefor know that the output is the key.
This makes the command a lot more useful in scripts.
2021-08-08 17:37:23 +01:00
Juan Font
05e08e0ac7
Added cmd to expire preauth keys (requested in #78 )
2021-08-08 00:10:30 +02:00
Juan Font Alonso
91bfb481c1
Fix identation
2021-07-30 16:42:26 +02:00
ohdearaugustin
ea3043cdcb
cmd: Add error check for Persistent Flags
2021-07-25 16:26:15 +02:00
ohdearaugustin
e56755fd67
Refactor preauthkeys cmd
2021-07-25 15:07:27 +02:00
Juan Font Alonso
db20985b06
Show N/A in reusable when key is ephemeral
2021-07-11 13:14:25 +02:00
Juan Font Alonso
f5b8a3f710
Make all commands a plural word
2021-06-28 20:04:05 +02:00
Ward Vandewege
41f6740ddd
Add support for ephemeral nodes via a special type of pre-auth key. Add
...
tests for that feature.
Other fixes: clean up a few typos in comments. Fix a bug that caused the
tests to run four times each. Be more consistent in the use of log
rather than fmt to print errors and notices.
2021-05-22 20:18:29 -04:00
Juan Font Alonso
8ad366f977
Use JsonOutput in version too
2021-05-08 17:06:36 +02:00
Juan Font Alonso
abde7dddb7
More json output
2021-05-08 13:58:51 +02:00
Juan Font Alonso
b83318bfb3
Namespace is now a flag for all the commands
2021-04-30 00:23:26 +02:00
Juan Font Alonso
77e5255fdd
Move the CLI functiontionality to the CLI package
2021-04-28 16:15:45 +02:00