Juan Font
54f5c249f1
Fix various linting issues + golang-lint upgrade ( #1245 )
2023-03-03 18:22:47 +01:00
Sean Reifschneider
f49930c514
Add "configtest" CLI command. ( #1230 )
...
Co-authored-by: Kristoffer Dalby <kristoffer@dalby.cc>
Fixes https://github.com/juanfont/headscale/issues/1229
2023-03-03 14:55:29 +01:00
Kristoffer Dalby
00fbd8dd93
Remove all tests before generating new ones
...
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com>
2023-02-02 17:55:19 +01:00
Kristoffer Dalby
e1eb30084d
Remove new line at start of test template
...
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com>
2023-02-01 10:58:37 +01:00
Kristoffer Dalby
673638afe7
Use ripgrep to find list of tests
...
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com>
2023-02-01 10:58:37 +01:00
Kristoffer Dalby
da48cf64b3
Set OpenID Connect Expiry
...
This commit adds a default OpenID Connect expiry to 180d to align with
Tailscale SaaS (previously infinite or based on token expiry).
In addition, it adds an option use the expiry time from the Token sent
by the OpenID provider. This will typically cause really short expiry
and you should only turn on this option if you know what you are
desiring.
This fixes #1176 .
Co-authored-by: Even Holthe <even.holthe@bekk.no>
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com>
2023-01-31 18:55:16 +01:00
Kristoffer Dalby
727d95b477
Improve generated integration tests
...
- Save logs from control(headscale) on every run to tmp
- Upgrade nix-actions
- Cancel builds if new commit is pushed
- Fix a sorting bug in user command test
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com>
2023-01-30 14:43:03 +01:00
Juan Font
640bb94119
Do not show IsPrimary field as false in exit nodes
2023-01-29 14:54:09 +01:00
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
af1ec5a593
Rename .go namespace files
...
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
Even Holthe
e27e01c09f
nodes list: expose expiration time
2023-01-12 13:43:21 +01:00
Kristoffer Dalby
81254cdf7a
Limit run regex for generated workflows
...
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com>
2023-01-06 18:36:31 +01:00
Kristoffer Dalby
7274fdacc6
Generate github action jobs for integration tests
...
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com>
2023-01-06 12:32:24 +01:00
Kristoffer Dalby
efd0f79fbc
Add script to generate integration test gitjobs
...
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com>
2023-01-06 12:32:24 +01:00
Even Holthe
23a595c26f
oidc: add test for expiring nodes after token expiration
2023-01-04 09:23:52 +01:00
Juan Font
593040b73d
Run the Noise handlers under a new struct so we can access the noiseConn from the handlers
...
In TS2021 the MachineKey can be obtained from noiseConn.Peer() - contrary to what I thought before,
where I assumed MachineKey was dropped in TS2021.
By having a ts2021App and hanging from there the TS2021 handlers, we can fetch again the MachineKey.
2022-12-21 20:52:08 +01:00
Juan Font
000c02dad9
Show online in CLI & API when isOnline() reports so
2022-12-15 00:13:53 -08:00
Juan Font
52862b8a22
Port integration tests routes CLI to v2
...
Fix options signature
2022-12-06 08:17:14 +01:00
Juan Font
946d38e5d7
Minor linting fixes
...
Remove magic number (base10...)
2022-12-06 08:17:14 +01:00
Juan Font
78819be03c
Use the new routes API from the CLI
2022-12-06 08:17:14 +01:00
Juan Font
24f946e2e9
Fix completion issues ( fixes #839 )
2022-11-20 13:57:38 +01:00
Kristoffer Dalby
3d8dd68b14
default to localhost, not listen on all
...
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com>
2022-11-16 17:37:35 +01:00
Kristoffer Dalby
b02e88364e
Fix test
...
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com>
2022-11-16 17:37:35 +01:00
Juan Font Alonso
73c84d4f6a
Print hostname of the machine registered
2022-11-14 08:47:02 +01:00
LiuHanCheng
07f92e647c
fix bug in #912 ( #914 )
2022-11-05 09:07:22 +01:00
Kristoffer Dalby
0cf9c4ce8e
Add nolint since go os has weird casing
...
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com>
2022-10-31 17:58:03 +01:00
Kristoffer Dalby
e8b3de494e
Fix lint
...
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com>
2022-10-31 17:58:03 +01:00
Kristoffer Dalby
21ec543d37
Give user better feedback if headscale socket is unwritable
...
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com>
2022-10-31 17:58:03 +01:00
Pontus N
9f58eebfe1
Fix zero arguments error
2022-10-13 15:17:18 +02:00
Kristoffer Dalby
37a4d41d0e
Make addr configurable
...
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com>
2022-10-07 23:56:27 +02:00
Kristoffer Dalby
201f81ce00
Make sure mockoidc is up, has unique name and removed if exist
...
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com>
2022-10-07 23:56:27 +02:00
Benjamin George Roberts
c52e3aafe6
remove unnecessary checks on slices
2022-09-23 18:04:30 +10:00
Juan Font
09863b540d
Merge branch 'main' into preauthkey-tags
2022-09-21 18:03:35 +02:00
Juan Font
8aa0eefedd
Merge branch 'main' into oidc-integration-testing
2022-09-20 23:43:45 +02:00
Juan Font
e87b470996
Removed fmt.Println for linting
2022-09-20 21:06:43 +00:00
Juan Font
083d2a871c
Linting fixes
2022-09-20 21:02:44 +00:00
Juan Font
b3a53bf642
Do not load the config for CLI mockoidc (and version)
2022-09-20 19:59:22 +00:00
Juan Font
a3f18f248c
Add internal mockoidc command
2022-09-20 19:58:36 +00:00
Igor Perepilitsyn
dd155dca97
Create a distinct log section in config
2022-09-11 21:37:23 +02:00
Juan Font
f6153a9b5d
Merge branch 'main' into preauthkey-tags
2022-09-04 22:35:51 +02:00
Juan Font
302a88bfdb
Merge branch 'main' into feature/json-logs
2022-09-04 22:32:58 +02:00
Juan Font Alonso
198e92c08f
Remove dependency on netaddr
2022-09-03 23:46:14 +02:00
Igor Perepilitsyn
2403c0e198
toggle json logging via config
2022-08-26 13:10:51 +02:00
Benjamin George Roberts
791272e408
Adds grpc/cli support for preauthkey tags
2022-08-25 22:23:46 +10:00
Jiang Zhu
81f91f03b4
add env var to specify config location
2022-08-21 23:51:04 +08:00
Juan Font Alonso
4424a9abc0
Noise private key now a nested field in config
2022-08-21 10:42:23 +02:00
Juan Font Alonso
cab828c9d4
Fixed unit tests to load config
2022-08-14 16:52:57 +02:00
Juan Font Alonso
ade1b73779
Output an error when a user runs headscale without noise_private_key_path defined
2022-08-14 12:35:14 +02:00