question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

KV Engine (V2) - Use default mount point if it is provided

See original GitHub issue

Describe the bug The method DeleteMetadataAsync in KeyValueSecretsEngineV2Provider.cs does not use the default mount point provided.

VaultSharp Version 1.7.0.4

Vault Version 1.10.0

Does this work with Vault CLI? N/A

Sample Code Snippet await _vaultClient.V1.Secrets.KeyValue.V2.DeleteMetadataAsync("Path"); This defaults to: await _vaultClient.V1.Secrets.KeyValue.V2.DeleteMetadataAsync("Path", "secret");

Exception Details/Stack Trace/Error Message N/A

Any additional info The following method needs updated to use the default mount point https://github.com/rajanadar/VaultSharp/blob/e298fa40b097552d91301d9c147e4632a30c6a86/src/VaultSharp/V1/SecretsEngines/KeyValue/V2/KeyValueSecretsEngineV2Provider.cs#L142-L148

I believe that this mountPoint ??= _polymath.VaultClientSettings.SecretsEngineMountPoints.KeyValueV2 should be added before Checker.NotNull(mountPoint, "mountPoint");

The method should be changed to: public async Task DeleteMetadataAsync(string path, string mountPoint = null)

Issue Analytics

  • State:closed
  • Created a year ago
  • Reactions:1
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

3reactions
hoerupcommented, May 17, 2022

#254 is merged but we still need @rajanadar to make a new release

1reaction
Bterry14commented, Jul 28, 2022

We just updated and it works as intended, thank you!

Read more comments on GitHub >

github_iconTop Results From Across the Web

KV - Secrets Engines | Vault
The path-like KV-v1 syntax for referencing a secret ( secret/foo ) can still be used in KV-v2, but we recommend using the -mount=secret...
Read more >
How do I setup multiple mount points that use different ...
This will mount a secret engine of type kv (v2) at the new-mount-point/ path. You can verify that by running the following command:...
Read more >
KV - Version 2 — hvac 1.0.2 documentation - Read the Docs
Every method under the Kv class's v2 attribute includes a mount_point parameter that can be used to address the KvV2 secret engine under...
Read more >
[Feedback Wanted] upcoming kv modules, path, and ...
If a path can be either full or not full, and we take a mount point option ... Having a default means we...
Read more >
How to enable a kv secret engine in vault using HTTP APIs
1 Answer. This is covered under the System Backend /sys/mounts API reference page. Issue a POST request to /v1/sys/mounts/<mountpoint> with a ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found