mirror of
https://github.com/netbirdio/netbird.git
synced 2024-11-26 18:13:40 +01:00
f984b8a091
Goals: Enable peer login expiration when adding new peer Expire peer's login when the time comes The account manager triggers peer expiration routine in future if the following conditions are true: peer expiration is enabled for the account there is at least one peer that has expiration enabled and is connected The time of the next expiration check is based on the nearest peer expiration. Account manager finds a peer with the oldest last login (auth) timestamp and calculates the time when it has to run the routine as a sum of the configured peer login expiration duration and the peer's last login time. When triggered, the expiration routine checks whether there are expired peers. The management server closes the update channel of these peers and updates network map of other peers to exclude expired peers so that the expired peers are not able to connect anywhere. The account manager can reschedule or cancel peer expiration in the following cases: when admin changes account setting (peer expiration enable/disable) when admin updates the expiration duration of the account when admin updates peer expiration (enable/disable) when peer connects (Sync) P.S. The network map calculation was updated to exclude peers that have login expired. |
||
---|---|---|
.. | ||
activity | ||
http | ||
idp | ||
jwtclaims | ||
metrics | ||
mock_server | ||
status | ||
telemetry | ||
testdata | ||
account_test.go | ||
account.go | ||
config.go | ||
dns_test.go | ||
dns.go | ||
event_test.go | ||
event.go | ||
file_store_test.go | ||
file_store.go | ||
group.go | ||
grpcserver.go | ||
management_proto_test.go | ||
management_suite_test.go | ||
management_test.go | ||
nameserver_test.go | ||
nameserver.go | ||
network_test.go | ||
network.go | ||
peer_test.go | ||
peer.go | ||
route_test.go | ||
route.go | ||
rule.go | ||
scheduler_test.go | ||
scheduler.go | ||
setupkey_test.go | ||
setupkey.go | ||
store.go | ||
turncredentials_test.go | ||
turncredentials.go | ||
updatechannel_test.go | ||
updatechannel.go | ||
user.go |