57 Commits

Author SHA1 Message Date
Adrien Raffin-Caboisse
f19c048569
fix: change normalization function name 2022-03-07 22:55:54 +01:00
Adrien Raffin-Caboisse
1114449601
change: update name of method to check and normalize Domain name 2022-03-06 20:46:17 +01:00
Adrien Raffin-Caboisse
b39faa124a
Merge remote-tracking branch 'origin/main' into feat-oidc-login-as-namespace 2022-02-25 11:28:17 +01:00
Adrien Raffin-Caboisse
ae6a20e4d9
fix: add valid test identified by linter 2022-02-23 14:28:25 +01:00
Adrien Raffin-Caboisse
4f1f235a2e feat: add strip_email_domain to normalization of namespace 2022-02-23 14:03:07 +01:00
Adrien Raffin-Caboisse
7e4709c13f fix(namespace): remove name validation for destroy and get 2022-02-23 13:35:57 +01:00
Adrien Raffin-Caboisse
995731a29c
fix(namespace): checknamespace name before actions
I keep the check server side because it's better from a security point of view.
2022-02-23 11:32:16 +01:00
Adrien Raffin-Caboisse
45727dbb21
feat(namespace): add check function for namespace 2022-02-23 11:32:14 +01:00
Adrien Raffin-Caboisse
afd4a3706e chore: update formating 2022-02-22 21:05:39 +01:00
Adrien Raffin-Caboisse
92ffac625e
feat(namespace): add normalization function for namespace 2022-02-22 19:59:12 +01:00
Kristoffer Dalby
24a8e198a1 Remove sharing references across the code 2022-02-21 23:01:35 +00:00
Kristoffer Dalby
bb80b679bc Remove RequestMapUpdates function 2022-02-12 21:04:00 +00:00
Kristoffer Dalby
2bc8051ae5 Remove kv-namespace-worker
This commit removes the namespace kv worker and related code, now that
we talk over gRPC to the server, and not directly to the DB, we should
not need this anymore.
2022-02-12 20:46:05 +00:00
Kristoffer Dalby
c4d4c9c4e4
Add and fix gosec 2021-11-15 18:31:52 +00:00
Kristoffer Dalby
715542ac1c
Add and fix stylecheck (golint replacement) 2021-11-15 17:24:24 +00:00
Kristoffer Dalby
0c005a6b01
Add and fix errname 2021-11-15 16:33:16 +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
052883aa55 Fix merge conflict 2021-11-14 08:30:48 +00:00
Ward Vandewege
34dba0ade8 Fix missing error check. 2021-11-13 15:24:32 -05:00
Ward Vandewege
acf7e462ad Improvements for namespace deletion: add a confirmation prompt, and make
sure to also delete any associated preauthkeys.
2021-11-13 14:01:05 -05:00
Kristoffer Dalby
2634215f12 golangci-lint --fix 2021-11-13 08:39:04 +00:00
Kristoffer Dalby
03b7ec62ca Go format with shorter lines 2021-11-13 08:36:45 +00:00
Kristoffer Dalby
95690e614e Simplify and streamline namespace functions for new cli/rpc/api 2021-11-04 22:15:17 +00:00
Kristoffer Dalby
da14750396
Merge branch 'main' into main 2021-10-19 15:26:18 +01:00
Juan Font Alonso
37e191a75d Solved merge 2021-10-17 23:59:44 +02:00
Juan Font Alonso
01a5fe3c51 Added tests, solved some bugs, and code reorg 2021-10-17 23:58:09 +02:00
Kristoffer Dalby
710616f118
Merge branch 'main' into main 2021-10-17 13:26:37 +01:00
Ward Vandewege
7dcf4a5147 Add support for renaming namespaces. 2021-10-16 11:20:06 -04:00
Ward Vandewege
306a80cf57 Bugfix: when namespace destruction causes a database error, return the
error, not nil.
2021-10-16 11:14:37 -04:00
unreality
afbfc1d370
Merge branch 'main' into main 2021-10-16 22:31:37 +08:00
Raal Goff
0603e29c46 add login details to RegisterResponse so GUI clients show login display name 2021-10-15 23:09:55 +08:00
Juan Font Alonso
985c6e7cc9 Preload AuthKey Namespace on list nodes (fixes #163) 2021-10-15 00:04:04 +02:00
Kristoffer Dalby
a01a0d1039 Remove unstable update channel, replace with state updates 2021-10-05 16:24:46 +00:00
Kristoffer Dalby
1d5b090579 Initial work on Prometheus metrics
This commit adds some Prometheus metrics to /metrics in headscale.

It will add the standard go metrics, some automatic gin metrics and some
initial headscale specific ones.

Some of them has been added to aid debugging #97 (loop bug)

In the future, we can use the metrics to get rid of the sleep in the
integration tests by checking that our expected number of nodes has been
registered:

```
headscale_machine_registrations_total
```
2021-10-04 16:28:07 +00:00
Juan Font
55f3e07bd4
Apply suggestions from code review
Removed one letter variables

Co-authored-by: Kristoffer Dalby <kradalby@kradalby.no>
2021-09-10 00:26:46 +02:00
Juan Font
2780623076 Renamed SharedNode to SharedMachine 2021-09-06 14:43:43 +02:00
Juan Font
7ce4738d8a Preload namespace so the name can be shown 2021-09-03 10:23:26 +02:00
Juan Font
7287e0259c Minor linting issues 2021-09-02 17:08:39 +02:00
Juan Font
187b016d09 Added helper function to get list of shared nodes 2021-09-02 16:59:50 +02:00
Kristoffer Dalby
9698abbfd5
Resolve merge conflict 2021-08-13 10:33:19 +01:00
Juan Font
8eb7d47072 Fixed linting 2021-08-12 21:57:20 +02:00
Juan Font
ab61c87701 Also notify peers when deleting ephemerals 2021-08-12 21:53:37 +02:00
Kristoffer Dalby
1abc68ccf4 Removes locks causing deadlock
This commit removes most of the locks in the PollingMap handler as there
was combinations that caused deadlocks. Instead of doing a plain map and
doing the locking ourselves, we use sync.Map which handles it for us.
2021-08-05 22:14:37 +01:00
Kristoffer Dalby
a8c8a358d0
Make log keys lowercase 2021-08-05 20:57:47 +01:00
Kristoffer Dalby
d10b57b317
Convert namespaces.go 2021-08-05 18:23:02 +01:00
Juan Font Alonso
461a893ee4 Added log message when sending updates 2021-07-25 20:47:51 +02:00
Juan Font Alonso
97f7c90092 Added communication between Serve and CLI using KV table (helps in #52) 2021-07-25 17:59:48 +02:00
Juan Font Alonso
0159649d0a Send the namespace name as user to the clients 2021-07-11 16:39:19 +02:00