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

add support for filesystem implementation of token cache #5421

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

nicktate
Copy link

@nicktate nicktate commented May 24, 2024

Tracking issue

Why are the changes needed?

Using keyring service based token cache in headless environments is challenging. Many keyring implementations are tied to GUI interactions and proper headless configuration across different distros is very challenging. I propose we leave keyring as the default token cache, but enable users to opt-in for a filesystem based cache if desired.

What changes were proposed in this pull request?

  • Adds a new TokenCacheTypeFilesystem implementation that may be configured via root.token-cache-type

How was this patch tested?

  • Added a set of tests that mimic the functionality of the tests for token_keyring_test.go

Setup process

Screenshots

Check all the applicable boxes

  • I updated the documentation accordingly.
  • All new and existing tests passed.
  • All commits are signed-off.

Copy link

welcome bot commented May 24, 2024

Thank you for opening this pull request! 🙌

These tips will help get your PR across the finish line:

  • Most of the repos have a PR template; if not, fill it out to the best of your knowledge.
  • Sign off your commits (Reference: DCO Guide).

Copy link

codecov bot commented May 29, 2024

Codecov Report

Attention: Patch coverage is 60.49383% with 32 lines in your changes are missing coverage. Please review.

Project coverage is 61.10%. Comparing base (470621e) to head (da2d51e).
Report is 4 commits behind head on master.

Files Patch % Lines
flytectl/pkg/pkce/token_cache_filesystem.go 55.88% 17 Missing and 13 partials ⚠️
flytectl/cmd/core/cmd.go 83.33% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #5421      +/-   ##
==========================================
- Coverage   61.99%   61.10%   -0.89%     
==========================================
  Files         611      794     +183     
  Lines       36375    51241   +14866     
==========================================
+ Hits        22550    31310    +8760     
- Misses      11860    17046    +5186     
- Partials     1965     2885     +920     
Flag Coverage Δ
unittests-datacatalog 69.31% <ø> (ø)
unittests-flyteadmin 58.90% <ø> (?)
unittests-flytecopilot 17.79% <ø> (ø)
unittests-flytectl 68.18% <60.49%> (-0.14%) ⬇️
unittests-flyteidl 79.30% <ø> (ø)
unittests-flyteplugins 61.94% <ø> (ø)
unittests-flytepropeller 57.32% <ø> (ø)
unittests-flytestdlib 65.82% <ø> (+0.06%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

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.

1 participant