1
0
mirror of https://github.com/juanfont/headscale.git synced 2024-12-20 19:09:07 +01:00
Commit Graph

403 Commits

Author SHA1 Message Date
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
Juan Font
8e56d8b425
Merge branch 'main' into switch-to-db-d 2022-08-11 13:11:38 +02:00
Adrien Raffin-Caboisse
110b01befa Merge remote-tracking branch 'origin/main' into fix-bug-in-excludecorrectlytaggednodes 2022-08-11 12:49:26 +02:00
Juan Font Alonso
e91c378bd4 Replace machine key with node key in preparation for Noise in auth related stuff 2022-08-10 15:35:26 +02:00
Juan Font Alonso
2d887046de Replaced legacy ioutil usage 2022-08-09 23:21:19 +02:00
Adrien Raffin-Caboisse
79688e6187
chore(all): apply formater 2022-08-04 10:47:00 +02:00
Jiang Zhu
dc94570c4a more intuitive output of node ls 2022-07-23 01:33:11 +08:00
Kristoffer Dalby
34f489b1f4
Update cmd/headscale/cli/utils.go 2022-06-26 09:52:11 +02:00
Kristoffer Dalby
72d1d2630e
Update cmd/headscale/cli/utils.go 2022-06-26 09:52:04 +02:00
Juan Font Alonso
c8378e8b7d Quick fix to segfault on CLI when Headscale is not running (fix #652) 2022-06-22 14:40:40 +02:00
Kristoffer Dalby
95824ac2ec MOve ephemeral inactivity config check to all the other config check 2022-06-12 13:12:43 +00:00
Kristoffer Dalby
3f7749c6d4
Merge branch 'main' into feature/configure-randomize-port 2022-06-11 10:55:05 +01:00
Anton Schubert
34be10840c add ability to set randomizeClientPort 2022-06-09 21:26:40 +02:00
Jiang Zhu
bcb04d38a5 Merge branch 'main' into enhance_cli_config
Extract LoadConfig from GetHeadscaleConfig, as they are conceptually
different operation, e.g.,
1) you can reload config through LoadConfig and do not get config
2) you can get config without reload config
2022-06-07 22:51:47 +08:00
Kristoffer Dalby
90f6be0c98 Rename one char var 2022-06-05 17:52:28 +02:00
Kristoffer Dalby
af891808f6 Make get config load the config, use config in main method 2022-06-05 17:47:12 +02:00
Jiang Zhu
ce13596077 add integration test for headscale -c 2022-06-05 23:13:58 +08:00
Jiang Zhu
402a29e50c impl heascale -c to specify config file 2022-06-05 18:25:09 +08:00
Jiang Zhu
0363e58467 cli.LoadConfig accepts config file now 2022-06-05 17:55:27 +08:00
Kristoffer Dalby
5514a862dc Update headscale read config tests 2022-06-03 09:26:46 +02:00
Kristoffer Dalby
1ea8bb782c Move all read config logic to config.go 2022-06-03 09:26:36 +02:00
Kristoffer Dalby
35722cd5aa Move FilePerm function from cli to headscale 2022-06-03 09:24:36 +02:00
Kristoffer Dalby
36dca3516a Move Abspath function to headscale utils 2022-05-31 14:28:23 +02:00
Kristoffer Dalby
06129277ed Rename abspath function to describe what it does 2022-05-31 14:28:23 +02:00
Kristoffer Dalby
6b1482daee Use config object instead of viper for policy path 2022-05-31 14:28:23 +02:00
Kristoffer Dalby
24e4787a64 Make ACL policy part of the config struct 2022-05-31 14:28:23 +02:00
Kristoffer Dalby
5bfae22c8f Make config get function global 2022-05-31 14:28:23 +02:00
Kristoffer Dalby
3e078f0494 Fix logtail config function name 2022-05-31 14:28:01 +02:00
Kristoffer Dalby
f7edea5f40
Merge branch 'main' into rename-fixess 2022-05-31 09:42:20 +02:00
Kristoffer Dalby
d860270733 Use Prometheus duration parser (support days and weeks) 2022-05-30 16:10:39 +02:00
Kristoffer Dalby
9175aca094
Merge branch 'main' into rename-fixess 2022-05-30 15:29:50 +02:00
Kristoffer Dalby
7f66d9184b Add config test 2022-05-30 14:57:43 +02:00
Kristoffer Dalby
a0c465c2eb Wire up setting to enable/disable logtail 2022-05-30 14:47:41 +02:00
Kristoffer Dalby
e631c6f7e0 Merge master 2022-05-16 21:41:46 +02:00
Kristoffer Dalby
f4873d9387 Fix rename cli error 2022-05-16 20:29:31 +02:00
Adrien Raffin-Caboisse
4435a4f19d
chore: apply lint recommendations 2022-05-16 14:59:46 +02:00
Kristoffer Dalby
a28eebfca3
Merge branch 'main' into feat-list-tags-of-machines 2022-05-15 12:11:28 +01:00
Adrien Raffin-Caboisse
72c1edaaa4
Merge remote-tracking branch 'origin/main' into feat-list-tags-of-machines 2022-05-13 11:56:06 +02:00
Adrien Raffin-Caboisse
63d920510d
feat: improve nodes list with inputs from @deonthomasgy
cf: https://github.com/juanfont/headscale/compare/main...deonthomasgy:dev/thomas/show-tags
2022-05-13 11:46:28 +02:00
Adrien Raffin-Caboisse
62cfd60e38
feat: add validation of tags 2022-05-13 10:18:01 +02:00
Samuel Lock
c26280c331 modified code to satisfy golangci-lint and added integration test 2022-05-11 09:31:24 +10:00
Samuel Lock
8be9e9655c fixed issue #360 2022-05-10 20:51:14 +10:00
Deon Thomas
6ed79b7bb8
order Ip Address, IPv4 first, cleanup 2022-05-08 15:21:10 -04:00
Deon Thomas
b4f5ed6618
order ip address output, IPv4 first 2022-05-08 15:06:12 -04:00
Adrien Raffin-Caboisse
dc8c20e002
fix: handle empty aclPolicy for integration tests 2022-05-04 22:56:55 +02:00
Adrien Raffin-Caboisse
a2fb5b2b9d
Merge remote-tracking branch 'origin/main' into feat-list-tags-of-machines 2022-05-03 20:35:28 +02:00
Antoine POPINEAU
7cc58af932
Allow more configuration over the OIDC flow.
Adds knobs to configure three aspects of the OpenID Connect flow:

 * Custom scopes to override the default "openid profile email".
 * Custom parameters to be added to the Authorize Endpoint request.
 * Domain allowlisting for authenticated principals.
 * User allowlisting for authenticated principals.
2022-05-02 17:11:07 +02:00
Igor Perepilitsyn
12d8f0f4b0 remove redundant lines of code, fix response when output is not plain text 2022-05-02 14:00:00 +04:00
Igor Perepilitsyn
1b3a7bbf03 apply styling fixes 2022-05-02 08:32:33 +04:00
Igor Perepilitsyn
bc055edf12 add command for moving node between namespaces 2022-05-01 17:55:34 +04:00
Adrien Raffin-Caboisse
fec8cda16a
fix: fix linting issue on my computer 2022-04-25 22:33:53 +02:00
Adrien Raffin-Caboisse
2c448d4a5c
chore: apply linting 2022-04-25 22:27:44 +02:00
Adrien Raffin-Caboisse
8061abe279 refact: use generics for contains functions 2022-04-25 22:17:23 +02:00
Adrien Raffin-Caboisse
cc9eeda889 feat: updating cli to match the set command 2022-04-25 22:17:23 +02:00
Kristoffer Dalby
79704dc9b0 Update command with new fields 2022-04-24 20:57:15 +01:00
Kristoffer Dalby
8845938881
Merge branch 'main' into main 2022-04-24 09:48:00 +02:00
Adrien Raffin-Caboisse
f53bb63b2d
fix: move tag command to subcommand of nodes 2022-04-21 23:43:20 +02:00
Adrien Raffin-Caboisse
4651c44dde
feat: print tags in nodes list 2022-04-16 13:32:00 +02:00
Adrien Raffin-Caboisse
98f54c9f7f
chore: apply format and lint 2022-04-15 18:27:57 +02:00
Adrien Raffin-Caboisse
9de9bc23f8
feat(cli): add tag subcommand to add and remove tags 2022-04-15 16:12:35 +02:00
Nico Rey
6e08241712 Exit Headscale if ACL policy file cannot be parsed 2022-04-06 11:05:08 -03:00
henning mueller
b2ae9b6cac
fix: Remove days from expiry option value examples 2022-04-05 18:45:29 +02:00
Kristoffer Dalby
c8aa653275
Merge branch 'main' into main 2022-03-19 09:36:36 +00:00
Juan Font Alonso
2e6687209b Make STUN server mandatory if DERP embedded is enabled 2022-03-18 12:58:00 +01:00
Juan Font Alonso
b8aad5451d Make STUN run by default when embedded DERP is enabled
This commit also allows to set an external STUN server, while running the embedded DERP server (without embedded STUN)
2022-03-15 13:22:25 +01:00
bravechamp
9901d6b2e7 Ability to clear nickname 2022-03-13 21:10:41 +00:00
bravechamp
663e8384a3 Nickname support 2022-03-13 21:03:20 +00:00
Juan Font Alonso
de2ea83b3b Linting here and there 2022-03-06 17:35:54 +01:00
Juan Font Alonso
eb06054a7b Make DERP Region configurable 2022-03-06 17:25:21 +01:00
Juan Font Alonso
eb500155e8 Make STUN server configurable 2022-03-06 17:00:56 +01:00
Juan Font Alonso
dc909ba6d7 Improved logging on startup 2022-03-06 16:54:19 +01:00
Juan Font Alonso
df37d1a639 Do not offer the option to be DERP insecure
Websockets, in which DERP is based, requires a TLS certificate. At the same time,
if we use a certificate it must be valid... otherwise Tailscale wont connect (does not
have an Insecure option). So there is no option to expose insecure here
2022-03-05 19:19:21 +01:00
Juan Font Alonso
758b1ba1cb Renamed configuration items of the DERP server 2022-03-05 16:22:02 +01:00
Juan Font Alonso
23cde8445f Merge branch 'main' into embedded-derp 2022-03-04 00:04:59 +01:00
Juan Font Alonso
897d480f4d Add an embedded DERP server to Headscale
This series of commit will be adding an embedded DERP server (and STUN) to Headscale,
thus making it completely self-contained and not dependant in other infrastructure.
2022-03-04 00:01:31 +01:00
Kristoffer Dalby
b61500670c
Merge branch 'main' into metrics-listen 2022-03-02 11:35:33 +00: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
zakaria
052dbfe440 feat(aliases): add aliases for apikeys command
- `apikey`, `api` are aliases for `apikeys` command
- `ls`, `show` are aliases for `list` subcommand
- `c`, `new` are aliases for `create` subcommand
- `revoke`, `exp`, `e` are aliases for the `expire` subcommand
2022-03-02 15:32:35 +10:00
zakaria
5310f8692b feat(aliases): add aliases for namespaces command
- `namespace`, `ns`, `user`, `users` are aliases for `namespaces`
   command
- `c`, `new` are aliases for the `create` subcommand
- `delete` is an alias for the `destroy` subcommand
- `mv` is an alias for the `rename` subcommand
- `ls`, `show` are aliases for the `list` subcommand
2022-03-02 14:35:20 +10:00
zakaria
aff6b84250 feat(aliases): add 'gen' alias for 'generate' command 2022-03-02 14:29:33 +10:00
zakaria
21eee912a3 feat(aliases): add aliases for nodes command
- `node`, `machine`, `machines` are aliases for `nodes` command
- `ls`, `show` aliases for `list` subcommand
- `logout`, `exp`, `e` are aliases for `expire` subcommand
- `del` is an alias for `delete` subcommand
2022-03-02 14:28:03 +10:00
zakaria
dbb2af0238 feat(aliases): add aliases for route command
- `r` is alias for `route` command
- `ls`, or `show` is alias for `list` subcommand
2022-03-02 14:27:56 +10:00
Nico Rey
9a61725e9f Metrics: Disable toggle. Set default port to 9090 2022-02-28 10:40:02 -03:00