Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix caching of client credentials when users re-login to incorporate new attributes #18097

Merged
merged 4 commits into from
Nov 3, 2022

Conversation

tigrato
Copy link
Contributor

@tigrato tigrato commented Nov 3, 2022

When users re-login after a failed attempt to access a Kubernetes cluster, Teleport may continue to use the old credentials for cluster access. This behavior results in successive failures until the credential cache expires (~1h).

This PR includes changes made by @r0mant to resolve the cache issue. It introduces certificate expiration in the cache key. Every time the user logs in again, the key will be different because the certificate expiration date is different. Thus, Teleport won't reuse the cached credentials.

Fixes #18070

…new attributes

When users re-login after a failed attempt to access a Kubernetes cluster, Teleport may continue to use the old credentials for cluster access. This behavior results in successive failures until the credential cache expires (~1h).

This PR incorporates the changes made by @r0mant to solve the caching problem by incorporating certificate expiration into the cache key. So every time the user re-login, the key will be different because the expiration date of the certificate will be different and thus will not use the cached entry.

Fixes #18070
lib/kube/proxy/forwarder.go Outdated Show resolved Hide resolved
@tigrato tigrato enabled auto-merge (squash) November 3, 2022 16:09
@tigrato tigrato merged commit ddeef09 into master Nov 3, 2022
@github-actions
Copy link

github-actions bot commented Nov 3, 2022

@tigrato See the table below for backport results.

Branch Result
branch/v10 Failed
branch/v11 Create PR
branch/v8 Failed
branch/v9 Failed

tigrato added a commit that referenced this pull request Nov 3, 2022
…new attributes (#18097)

When users re-login after a failed attempt to access a Kubernetes cluster, Teleport may continue to use the old credentials for cluster access. This behavior results in successive failures until the credential cache expires (~1h).

This PR includes changes made by @r0mant to resolve the cache issue. It introduces certificate expiration in the cache key. Every time the user logs in again, the key will be different because the certificate expiration date is different. Thus, Teleport won't reuse the cached credentials.

Fixes #18070
tigrato added a commit that referenced this pull request Nov 3, 2022
…new attributes (#18097)

When users re-login after a failed attempt to access a Kubernetes cluster, Teleport may continue to use the old credentials for cluster access. This behavior results in successive failures until the credential cache expires (~1h).

This PR includes changes made by @r0mant to resolve the cache issue. It introduces certificate expiration in the cache key. Every time the user logs in again, the key will be different because the certificate expiration date is different. Thus, Teleport won't reuse the cached credentials.

Fixes #18070
tigrato added a commit that referenced this pull request Nov 3, 2022
…new attributes (#18097)

When users re-login after a failed attempt to access a Kubernetes cluster, Teleport may continue to use the old credentials for cluster access. This behavior results in successive failures until the credential cache expires (~1h).

This PR includes changes made by @r0mant to resolve the cache issue. It introduces certificate expiration in the cache key. Every time the user logs in again, the key will be different because the certificate expiration date is different. Thus, Teleport won't reuse the cached credentials.

Fixes #18070
tigrato added a commit that referenced this pull request Nov 3, 2022
…new attributes (#18097) (#18114)

When users re-login after a failed attempt to access a Kubernetes cluster, Teleport may continue to use the old credentials for cluster access. This behavior results in successive failures until the credential cache expires (~1h).

This PR includes changes made by @r0mant to resolve the cache issue. It introduces certificate expiration in the cache key. Every time the user logs in again, the key will be different because the certificate expiration date is different. Thus, Teleport won't reuse the cached credentials.

Fixes #18070
tigrato added a commit that referenced this pull request Nov 3, 2022
…new attributes (#18097) (#18110)

When users re-login after a failed attempt to access a Kubernetes cluster, Teleport may continue to use the old credentials for cluster access. This behavior results in successive failures until the credential cache expires (~1h).

This PR includes changes made by @r0mant to resolve the cache issue. It introduces certificate expiration in the cache key. Every time the user logs in again, the key will be different because the certificate expiration date is different. Thus, Teleport won't reuse the cached credentials.

Fixes #18070
tigrato added a commit that referenced this pull request Nov 3, 2022
…new attributes (#18097) (#18112)

When users re-login after a failed attempt to access a Kubernetes cluster, Teleport may continue to use the old credentials for cluster access. This behavior results in successive failures until the credential cache expires (~1h).

This PR includes changes made by @r0mant to resolve the cache issue. It introduces certificate expiration in the cache key. Every time the user logs in again, the key will be different because the certificate expiration date is different. Thus, Teleport won't reuse the cached credentials.

Fixes #18070
@tigrato tigrato deleted the tigrato/cache-fix branch January 18, 2023 14:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Cached Kubernetes client credentials lead to access denied requests
3 participants