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

VaultSharp.V1.SecretsEngines.Database: The JSON value could not be converted to System.String. Path: $.data.default_ttl #315

Closed
DamienDennehy opened this issue May 6, 2023 · 2 comments
Assignees
Milestone

Comments

@DamienDennehy
Copy link

DamienDennehy commented May 6, 2023

Describe the bug
When calling "await vaultClient.V1.Secrets.Database.ReadRoleAsync("role_name");", a JsonException is thrown.

VaultSharp Version
1.13.0.1

Vault Version
1.13.2

Does this work with Vault CLI?
Yes

Sample Code Snippet
var databaseRole = await vaultClient.V1.Secrets.Database.ReadRoleAsync("role_name");

Exception Details/Stack Trace/Error Message
"System.Text.Json.JsonException: 'The JSON value could not be converted to System.String. Path: $.data.default_ttl | LineNumber: 0 | BytePositionInLine: 373.'"

Any additional info
This seems very similar to #312

@rajanadar
Copy link
Owner

hi @DamienDennehy let me have a look this weekend

@KyleZevenbergen
Copy link

Yes it seems vault returns ints for default_ttl and max_ttl while your library is expecting a string.

https://developer.hashicorp.com/vault/api-docs/secret/databases#parameters-7

@rajanadar rajanadar self-assigned this Sep 8, 2024
@rajanadar rajanadar added this to the 1.17.5 milestone Sep 8, 2024
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

3 participants