Logout is missing #631

Closed
opened 2025-11-20 05:14:55 -05:00 by saavagebueno · 13 comments
Owner

Originally created by @PavelNiedoba on GitHub (Feb 12, 2024).

Describe the problem
I need to logout securely. I means that private keys and server peer is deleted and it's not possible to login without going thorough authentication.

A clear and concise description of what the problem is.
For security and testing (switching between users) I need to logout. If i do netbird down I can do later netbird up and I will be connected back without any interaction. Password is not required.

netbird-gui is broken on ubuntu. I can connect, then disconnect, but connect will stay disabled. I can close gui and then reconnect. Anybody ever tested this?

To Reproduce

Steps to reproduce the behavior:
do netbird up, netbird down and netbird up again. Password will not be needed second time.

Expected behavior
peer should be removed from server,
password should be asked second time

A clear and concise description of what you expected to happen.
Vpn is security feature, which become useless it logout is not possible. If somebody can steal laptop and reopen connections to protected resources is security hole.

Are you using NetBird Cloud?
never

Please specify whether you use NetBird Cloud or self-host NetBird's control plane.
self hosted
NetBird version
0.25.7

Originally created by @PavelNiedoba on GitHub (Feb 12, 2024). **Describe the problem** I need to logout securely. I means that private keys and server peer is deleted and it's not possible to login without going thorough authentication. A clear and concise description of what the problem is. For security and testing (switching between users) I need to logout. If i do `netbird down` I can do later `netbird up` and I will be connected back without any interaction. Password is not required. `netbird-gui` is broken on ubuntu. I can connect, then disconnect, but connect will stay disabled. I can close gui and then reconnect. Anybody ever tested this? **To Reproduce** Steps to reproduce the behavior: do netbird up, netbird down and netbird up again. Password will not be needed second time. **Expected behavior** peer should be removed from server, password should be asked second time A clear and concise description of what you expected to happen. Vpn is security feature, which become useless it logout is not possible. If somebody can steal laptop and reopen connections to protected resources is security hole. **Are you using NetBird Cloud?** never Please specify whether you use NetBird Cloud or self-host NetBird's control plane. self hosted **NetBird version** 0.25.7
saavagebueno added the feature-request label 2025-11-20 05:14:55 -05:00
Author
Owner

@lixmal commented on GitHub (Apr 19, 2024):

Have you enabled the enforce periodic user authentication feature? Would that help with your concern?

@lixmal commented on GitHub (Apr 19, 2024): Have you enabled the [enforce periodic user authentication feature](https://docs.netbird.io/how-to/enforce-periodic-user-authentication)? Would that help with your concern?
Author
Owner

@b100dian commented on GitHub (May 29, 2024):

There is an /etc/netbird/config.json or /var/snap/netbird/common/config.json that can be moved away (deleted if you know what you're doing) to achieve this in my experience

@b100dian commented on GitHub (May 29, 2024): There is an /etc/netbird/config.json or /var/snap/netbird/common/config.json that can be moved away (deleted if you know what you're doing) to achieve this in my experience
Author
Owner

@maigl commented on GitHub (Jul 9, 2024):

+1 for a proper logout feature. I use netbird in a 'more complex' scenario where we dynamically create setup keys with certain groups associated. If I want to login with a new setup key I have to actively delete /etc/netbird/config.json otherwise the new key will be ignored and I won't have my new groups assigned to this peer. This is a big problem because a user also cannot easily see that the new key was ignored.

@maigl commented on GitHub (Jul 9, 2024): +1 for a proper logout feature. I use netbird in a 'more complex' scenario where we dynamically create setup keys with certain groups associated. If I want to login with a new `setup key` I have to actively delete /etc/netbird/config.json otherwise the new key will be ignored and I won't have my new groups assigned to this peer. This is a big problem because a user also cannot easily see that the new key was ignored.
Author
Owner

@HBenzaoui commented on GitHub (Jul 16, 2024):

Agreed! we definitely need a logout command, it would be awesome great to have it, I used to logout all the time in tailscale and change account just from the terminal, I hope someone will bring this feature for the awesome netbird

@HBenzaoui commented on GitHub (Jul 16, 2024): Agreed! we definitely need a logout command, it would be awesome great to have it, I used to logout all the time in tailscale and change account just from the terminal, I hope someone will bring this feature for the awesome netbird
Author
Owner

@TJ-coding commented on GitHub (Nov 21, 2024):

When will this be implemented? This alone is making me consider switching to Cloudflare Tunnel

@TJ-coding commented on GitHub (Nov 21, 2024): When will this be implemented? This alone is making me consider switching to Cloudflare Tunnel
Author
Owner

@tony1661 commented on GitHub (Apr 23, 2025):

Will this ever be implemented?

@tony1661 commented on GitHub (Apr 23, 2025): Will this ever be implemented?
Author
Owner

@Cristobal-M commented on GitHub (Jun 13, 2025):

I have an issue that might be resolved with an automatic logout functionality in an ephemeral peer scenario.

I’m using ephemeral peers in a Kubernetes cluster, deployed to access internal services. When the pods are replaced, I get timeout errors. I have to either manually delete the peers in the NetBird dashboard or wait for them to expire.

@Cristobal-M commented on GitHub (Jun 13, 2025): I have an issue that might be resolved with an automatic logout functionality in an **ephemeral peer** scenario. I’m using ephemeral peers in a Kubernetes cluster, deployed to access internal services. When the pods are replaced, I get timeout errors. I have to either manually delete the peers in the NetBird dashboard or wait for them to expire.
Author
Owner

@nazarewk commented on GitHub (Jun 13, 2025):

I’m using ephemeral peers in a Kubernetes cluster, deployed to access internal services. When the pods are replaced, I get timeout errors. I have to either manually delete the peers in the NetBird dashboard or wait for them to expire.

@Cristobal-M could you create a separate report and elaborate?

  • new Pods should have unique hostnames, so they shouldn't cause issues with name clashes and adding -N suffix
  • if the traffic is still going towards Peers that went offline this is not expected and should be investigated further
@nazarewk commented on GitHub (Jun 13, 2025): > I’m using ephemeral peers in a Kubernetes cluster, deployed to access internal services. When the pods are replaced, I get timeout errors. I have to either manually delete the peers in the NetBird dashboard or wait for them to expire. @Cristobal-M could you create a separate report and elaborate? - new Pods should have unique hostnames, so they shouldn't cause issues with name clashes and adding `-N` suffix - if the traffic is still going towards Peers that went offline this is not expected and should be investigated further
Author
Owner

@Cristobal-M commented on GitHub (Jun 13, 2025):

I’m using ephemeral peers in a Kubernetes cluster, deployed to access internal services. When the pods are replaced, I get timeout errors. I have to either manually delete the peers in the NetBird dashboard or wait for them to expire.

@Cristobal-M could you create a separate report and elaborate?

* new Pods should have unique hostnames, so they shouldn't cause issues with name clashes and adding `-N` suffix

* if the traffic is still going towards Peers that went offline this is not expected and should be investigated further

Hi @nazarewk I have filled an issue about this, It lloks like an issue with DNS Routing when one peer disconnects. I'm not trying to make requests to the peer, but another host with dns name in the peer's subnet.
https://github.com/netbirdio/netbird/issues/3976

@Cristobal-M commented on GitHub (Jun 13, 2025): > > I’m using ephemeral peers in a Kubernetes cluster, deployed to access internal services. When the pods are replaced, I get timeout errors. I have to either manually delete the peers in the NetBird dashboard or wait for them to expire. > > [@Cristobal-M](https://github.com/Cristobal-M) could you create a separate report and elaborate? > > * new Pods should have unique hostnames, so they shouldn't cause issues with name clashes and adding `-N` suffix > > * if the traffic is still going towards Peers that went offline this is not expected and should be investigated further Hi @nazarewk I have filled an issue about this, It lloks like an issue with DNS Routing when one peer disconnects. I'm not trying to make requests to the peer, but another host with dns name in the peer's subnet. [https://github.com/netbirdio/netbird/issues/3976](https://github.com/netbirdio/netbird/issues/3976)
Author
Owner

@nazarewk commented on GitHub (Jul 23, 2025):

FYI: We stumbled upon an actual performance-related use case for implementing this, so we will look into implementing a netbird logout (or something similar) in the near future.

@nazarewk commented on GitHub (Jul 23, 2025): FYI: We stumbled upon an actual performance-related use case for implementing this, so we will look into implementing a `netbird logout` (or something similar) in the near future.
Author
Owner

@matanbaruch commented on GitHub (Aug 8, 2025):

@PavelNiedoba
Implemented
https://github.com/netbirdio/netbird/pull/4268

@matanbaruch commented on GitHub (Aug 8, 2025): @PavelNiedoba Implemented https://github.com/netbirdio/netbird/pull/4268
Author
Owner

@saule1508 commented on GitHub (Aug 11, 2025):

So https://github.com/netbirdio/netbird/pull/4268 is not a logout feature, it was renamed to deregister.
The use case of the logout is very important for our users. Let's say you need to start an intervention on a system and you need netbird to access the server. Currently, when a user logs in it remains logged in for x hours. So it is very well possible than 5 minutes after he starts the intervention he will be logged out.
A logout would allow to reset the login validity to something long

@saule1508 commented on GitHub (Aug 11, 2025): So https://github.com/netbirdio/netbird/pull/4268 is not a logout feature, it was renamed to deregister. The use case of the logout is very important for our users. Let's say you need to start an intervention on a system and you need netbird to access the server. Currently, when a user logs in it remains logged in for x hours. So it is very well possible than 5 minutes after he starts the intervention he will be logged out. A logout would allow to reset the login validity to something long
Author
Owner

@nazarewk commented on GitHub (Aug 12, 2025):

A logout would allow to reset the login validity to something long

Sounds to me like you want a session extending feature like https://github.com/netbirdio/netbird/issues/4209 instead of logout.
I will be closing this one as implemented by #4268 , as of writing this message the command is now called deregister, but still has logout alias to it.

@nazarewk commented on GitHub (Aug 12, 2025): > A logout would allow to reset the login validity to something long Sounds to me like you want a session extending feature like https://github.com/netbirdio/netbird/issues/4209 instead of `logout`. I will be closing this one as implemented by #4268 , as of writing this message the command is now called `deregister`, but still has `logout` alias to it.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: SVI/netbird#631