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

Added key cache via OS keyring #973

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

applejag
Copy link

@applejag applejag commented Aug 24, 2023

Changed the repository.Repository implementation to use https://github.com/zalando/go-keyring

This means that password tokens are stored in OS keyring instead of in plain text on your disk.

Screenshot from "KDE Wallet Management Tool", the app used to inspect OS keyring on KDE:

Screenshot_20230825_121730

Usage:

- name: oidc
  user:
    exec:
      apiVersion: client.authentication.k8s.io/v1beta1
      args:
        - oidc-login
        - get-token
        - --oidc-issuer-url=https://...............
        - --oidc-client-id=google
        - --oidc-client-secret=...............
        - --force-keyring # <--- new flag
      command: kubectl
      env: null
      interactiveMode: IfAvailable
      provideClusterInfo: false

The code prefers the OS keyring, if supported. Falls back to file based cache. Can be overridden with the new flags:

  • --force-keyring
  • --no-keyring

Closes #952

@applejag applejag force-pushed the feature/952/keyring branch 2 times, most recently from aae14b5 to 13476e5 Compare August 25, 2023 09:33
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.

Encrypt the token cache
1 participant