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

Error while reading secret #168

Open
stephan2012 opened this issue Aug 14, 2024 · 2 comments
Open

Error while reading secret #168

stephan2012 opened this issue Aug 14, 2024 · 2 comments

Comments

@stephan2012
Copy link

My first attempt to export secrets from Vault v1.17.3 with medusa v0.7.2 yields an error even when using a root token (data redacted):

$ medusa export secret -a https://vault.example.com:8200 -t $(<~/.vault-token)  --format yaml
2024/08/14 13:26:10 Error while reading secret
Path:   secret/data//xxx/xxx/xxx/xxx/xxx
Data:   <nil>

2024/08/14 13:26:10 Error while reading secret
Path:   secret/data//xxx/xxx/xxx/xxx/xxx
Data:   <nil>

2024/08/14 13:26:10 Error while reading secret
Path:   secret/data//xxx/xxx/xxx/xxx/xxx
Data:   <nil>

xxx:
  xxx:
    xxx:
      xxx: {}
      xxx: {}
    xxx:
      xxx: {}

So, medusa finds the secrets but cannot read them. The two slashes between secret/data and the secret path look strange. The KV secrets engine is v2:

$ vault secrets list -detailed 
Path             Plugin       Accessor              Default TTL    Max TTL      Force No Cache    Replication    Seal Wrap    External Entropy Access    Options                       Description                                                UUID                                    Version    Running Version          Running SHA256    Deprecation Status
----             ------       --------              -----------    -------      --------------    -----------    ---------    -----------------------    -------                       -----------                                                ----                                    -------    ---------------          --------------    ------------------
secret/          kv           kv_063b078a           system         system       false             replicated     false        false                      map[version:2]                n/a                                                        957a17bc-d9cb-3cf7-0696-78a771f226c1    n/a        v0.19.0+builtin          n/a               supported

What do I miss?

@zoeimogen
Copy link
Contributor

Are there any values under that secret or have they all been deleted? If they have all been deleted then this looks like the same issue as #134 and the errors are purely cosmetic. Fix is in #167 but it hasn't been merged yet.

@stephan2012
Copy link
Author

stephan2012 commented Aug 22, 2024

Are there any values under that secret or have they all been deleted?

There are secrets stored in the paths. None of them has ever been deleted.

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

No branches or pull requests

2 participants