mirror of
https://github.com/juanfont/headscale.git
synced 2024-11-26 08:53:05 +00:00
b2ab5ac1ad
currently, the policy approach node to user matching with a quite naive approach looking at the username provided in the policy and matched it with the username on the nodes. This worked ok as long as usernames were unique and did not change. As usernames are no longer guarenteed to be unique in an OIDC environment we cant rely on this. This changes the mechanism that matches the user string (now user token) with nodes: - first find all potential users by looking up: - database ID - provider ID (OIDC) - username/email If more than one user is matching, then the query is rejected, and zero matching nodes are returned. When a single user is found, the node is matched against the User database ID, which are also present on the actual node. This means that from this commit, users can use the following to identify users in the policy: - provider identity (iss + sub) - username - email - database id There are more changes coming to this, so it is not recommended to start using any of these new abilities, with the exception of email, which will not change since it includes an @. Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com> |
||
---|---|---|
.. | ||
assets | ||
db | ||
derp | ||
mapper | ||
notifier | ||
policy | ||
templates | ||
types | ||
util | ||
app.go | ||
auth.go | ||
auth_noise.go | ||
grpcv1.go | ||
grpcv1_test.go | ||
handlers.go | ||
metrics.go | ||
noise.go | ||
oidc.go | ||
platform_config.go | ||
poll.go | ||
suite_test.go | ||
tailsql.go |