Commit graph

45 commits

Author SHA1 Message Date
Juan Font
1dcc98fcbb Remove EnabledRoutes from Machine and refactor to adapt to it 2022-11-25 13:34:33 +00:00
LiuHanCheng
07f92e647c
fix bug in #912 (#914) 2022-11-05 09:07:22 +01:00
Kristoffer Dalby
bc1c1f5ce8
Fix most nil pointers, actually make it check for unique across headscale
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com>
2022-10-21 14:42:37 +02:00
Kristoffer Dalby
d56ad2917d
Fix nolint comment
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com>
2022-10-03 12:29:13 +02:00
=
2aebd2927d
Random suffix only on collision.
0.16.0 introduced random suffixes to all machine given names
(DNS hostnames) regardless of collisions within a namespace.
This commit brings Headscale more inline with Tailscale by only
adding a suffix if the hostname will collide within the namespace.

The suffix generation differs from Tailscale.
See https://tailscale.com/kb/1098/machine-names/
2022-10-03 09:13:56 +02:00
Kristoffer Dalby
8a1c0e0e9b Merge branch 'main' into preauthkey-tags 2022-09-23 18:11:27 +10:00
Benjamin George Roberts
c52e3aafe6 remove unnecessary checks on slices 2022-09-23 18:04:30 +10:00
Benjamin George Roberts
8a8ec7476d fix linting issues in preauthkey tags 2022-09-08 09:03:38 +10:00
Benjamin George Roberts
ac18723dd4 Set tags as part of handleAuthKeyCommon 2022-08-25 22:26:04 +10:00
Benjamin George Roberts
791272e408 Adds grpc/cli support for preauthkey tags 2022-08-25 22:23:46 +10: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
Adrien Raffin-Caboisse
c90e862460
fix(grpc): add more checks for tag validation 2022-07-25 14:01:41 +02:00
Kristoffer Dalby
e631c6f7e0 Merge master 2022-05-16 21:41:46 +02:00
Kristoffer Dalby
163e5c29e4 fix trace log message 2022-05-16 20:35:35 +02:00
Kristoffer Dalby
5fa3016703 Generate unique givennames for hosts joining (and debug added) 2022-05-16 20:32:38 +02:00
Adrien Raffin-Caboisse
209d003832
feat: handle insert into database error 2022-05-13 11:09:28 +02:00
Adrien Raffin-Caboisse
62cfd60e38
feat: add validation of tags 2022-05-13 10:18:01 +02:00
Adrien Raffin-Caboisse
fdbc9657bc
feat: return error if validation is failed 2022-05-13 10:14:38 +02: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
Igor Perepilitsyn
bc055edf12 add command for moving node between namespaces 2022-05-01 17:55:34 +04:00
Adrien Raffin-Caboisse
ea9aaa6022 feat: update functions to use set command 2022-04-25 22:17:23 +02:00
Kristoffer Dalby
62808cbd86 Bubble error up to user for rename 2022-04-24 20:56:28 +01:00
Adrien Raffin-Caboisse
4fcc5e253c
chore: fmt for grpc file 2022-04-16 13:15:18 +02:00
Adrien Raffin-Caboisse
db1528bc73
feat: add invalid and valid tags to grpc response 2022-04-16 12:27:54 +02:00
Adrien Raffin-Caboisse
02f68ebac8
feat: add forcedTags field and update proto 2022-04-15 16:00:08 +02:00
bravechamp
663e8384a3 Nickname support 2022-03-13 21:03:20 +00:00
Kristoffer Dalby
5b169010be Resolve merge conflict 2022-03-02 08:11:50 +00:00
Kristoffer Dalby
6477e6a583 Use new machine types 2022-03-01 16:34:24 +00:00
Kristoffer Dalby
5e92ddad43 Remove redundant caches
This commit removes the two extra caches (oidc, requested time) and uses
the new central registration cache instead. The requested time is
unified into the main machine object and the oidc key is just added to
the same cache, as a string with the state as a key instead of machine
key.
2022-02-28 22:42:30 +00:00
Kristoffer Dalby
54cc3c067f Implement new machine register parameter 2022-02-28 16:34:50 +00:00
Kristoffer Dalby
469551bc5d Register new machines needing callback in memory
This commit stores temporary registration data in cache, instead of
memory allowing us to only have actually registered machines in the
database.
2022-02-28 08:06:39 +00:00
Kristoffer Dalby
caffbd8956 Update cli registration with new method 2022-02-27 18:42:43 +01:00
Kristoffer Dalby
24a8e198a1 Remove sharing references across the code 2022-02-21 23:01:35 +00:00
Kristoffer Dalby
6da2a19d10 Remove grpc share/unshare functions 2022-02-21 22:45:04 +00:00
Kristoffer Dalby
f9137f3bb0 Create helper functions around gRPC interface 2022-01-25 22:11:15 +00:00
Kristoffer Dalby
bd1d1b1a3b Implement ExpireMachine rpc 2021-11-21 13:40:19 +00:00
Kristoffer Dalby
715542ac1c
Add and fix stylecheck (golint replacement) 2021-11-15 17:24:24 +00: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
3eed356d70 Implement rpc calls with new helper functions, implementing the proto spec 2021-11-04 22:19:27 +00:00
Kristoffer Dalby
c7fa9b6e4a Setup create, delete and list namespace over grpc 2021-10-29 16:44:32 +00:00
Kristoffer Dalby
acd9ebbdf8 Let lint ignore grpcv1.go as it is placeholder 2021-10-27 07:06:39 +00:00
Kristoffer Dalby
caa4d33cbd Add an initial grpcv1 service (implementing the proto generated service) 2021-10-26 20:42:20 +00:00