jonasvinther / medusa

A cli tool for importing and exporting Hashicorp Vault secrets
MIT License
482 stars 62 forks source link

Allow authentication with Kubernetes JWT token #138

Closed rdrgmnzs closed 1 year ago

rdrgmnzs commented 1 year ago

This PR allows authentication using the Kubernetes JWT token located in /var/run/secrets/kubernetes.io/serviceaccount/token inside a Kubernetes pod.

My use case is that I have a cronjob to continuously backup vault, however I'd like to not store a Vault token as a Kubernetes secret and instead want to just rely on the Pods/ServiceAccounts JWT token to authenticate against vault.

I was able to test and verify things work as expected.

codecov-commenter commented 1 year ago

Codecov Report

Merging #138 (8140d22) into main (06aea40) will not change coverage. The diff coverage is n/a.

:exclamation: Your organization needs to install the Codecov GitHub app to enable full functionality.

@@           Coverage Diff           @@
##             main     #138   +/-   ##
=======================================
  Coverage   70.00%   70.00%           
=======================================
  Files           2        2           
  Lines          20       20           
=======================================
  Hits           14       14           
  Misses          5        5           
  Partials        1        1           

:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more

jonasvinther commented 1 year ago

@rdrgmnzs thank you for your contribution 🙏🏼