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

Use function name as cache key for function access tokens #30

Merged
merged 2 commits into from
Jun 14, 2024

Conversation

welteki
Copy link
Member

@welteki welteki commented Jun 14, 2024

Description

Remove the source token as part of the cache key.

By using the source token as part of the cache key the cache would be invalidated when the original access token had expired which is confusing for users and leads to higher load on the token exchange endpoint if short lived tokens are used.

Using the source token as part if the cache key is not required since an authenticated clients should not be shared between different users.

Motivation and context

Simplify the client and reduce the number of token exchanges required when using short lived tokens.

How has this been tested

This has been tested E2E in multiple OpenFaaS components (CLI, pro-connector-sdk)

Signed-off-by: Han Verstraete (OpenFaaS Ltd) <[email protected]>
Remove the source token from the cache key.

By using the source token as part of the cache key the cache would be
invalidated when the original access token had expired which is confusing
for users and leads to higher load on the token exchange endpoint if
short lived tokens are used.

Signed-off-by: Han Verstraete (OpenFaaS Ltd) <[email protected]>
Copy link
Member

@alexellis alexellis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved

@alexellis alexellis merged commit 6fbe7d4 into openfaas:master Jun 14, 2024
1 check passed
@welteki welteki deleted the cache-key branch June 14, 2024 08:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants