KV Engine (V2) - Use default mount point if it is provided
See original GitHub issueDescribe 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:
- Created a year ago
- Reactions:1
- Comments:5 (3 by maintainers)
#254 is merged but we still need @rajanadar to make a new release
We just updated and it works as intended, thank you!