telepresenceio / telepresence

Local development against a remote Kubernetes or OpenShift cluster
https://www.telepresence.io
Other
6.53k stars 513 forks source link

[MacOS] Telepresence opens many AWS auth request tabs in the browser even while the computer is asleep #3611

Closed wcedmisten-reify closed 3 months ago

wcedmisten-reify commented 3 months ago

When the telepresence daemon is running in the background, it opens many AWS console tabs requesting authorization, even while the computer is asleep.

image

To Reproduce Steps to reproduce the behavior:

  1. When telepresence is running in the background (root daemon and user daemon), and the computer is asleep (lid is closed).
  2. AWS Authorization request tab will accumulate in the browser

Expected behavior When the computer is asleep, telepresence does not try to prompt for new authorization tokens.

Versions (please complete the following information):

Additional context I would expect the telepresence daemon to not prompt the user for a new AWS authorization token while the computer is asleep, but alternatively, a way to set a maximum number of retries would help mitigate the issue.

The annoyance is mostly having so many browser tabs accumulate overnight while my laptop is asleep.

Thanks!

thallgren commented 3 months ago

I think you'll need to adjust your power settings. Your computer cannot be asleep if processes are still running tasks.

Another thing: You have a mix of OSS client and Enterprise traffic manager. Please note that the OSS traffic-manager helm chart isn't published. You need to install the traffic-manager using telepresence helm install. The Enterprise traffic-manager v2.18.0 that you are using corresponds to an OSS traffic-manager version v2.17.0.

wcedmisten-reify commented 3 months ago

Thanks for the response!

That makes sense. I don't see anything in my power settings to indicate sleep is being prevented, but it seems like this shouldn't happen if the computer is actually asleep.

Would it make sense to add a flag that would prevent a maximum number of unsuccessful auth tabs being opened? I feel like that could be useful even if the computer is awake.

The Enterprise traffic-manager v2.18.0 that you are using corresponds to an OSS traffic-manager version v2.17.0

This part is a bit confusing to me, is the OSS traffic manager always one version behind the Enterprise version, or is there a chart somewhere for version compatibility?

thallgren commented 3 months ago

The OSS and Enterprise versions of Telepresence were decoupled after 2.16. The OSS is currently one minor version behind, but it's likely that it will be further behind in the future because it has a lower release cadence.

The OSS chart is embedded in the client binary. It's not published anywhere.

thallgren commented 3 months ago

Regarding the prompt. Telepresence will request an authentication when it makes an attempt to connect to the cluster. We have no control over the authentication process when it's an exec type authentication. Question is, why are you doing repeated connect attempts?

In any case, you should be able to configure AWS EKS to not put up any prompt at all. Please consult the EKS docs for more info about how to do that.

cindymullins-dw commented 3 months ago

Closing as the issue appears clarified. Feel free to reopen if any additional questions.