Create orphan token is always with no_parent=true
See original GitHub issueDescribe the bug
There is no ability to send request to /auth/token/create-orphan
with no_parent=false
.
VaultSharp Version 1.6.5
Vault Version Vault 1.6.5.
Does this work with Vault CLI? Yes
Sample Code Snippet var request = new CreateTokenRequest { NoParent = true }; _authenticatedVaultClient.V1.Auth.Token.CreateTokenAsync(request);
Exception Details/Stack Trace/Error Message none
Any additional info
With current behaviour of VaultSharp it’s impossible to send /create-orphan
request with no_parent=false
. It can be a problem because request to create token with no_parent=true
requires to have sudo access. However, /auth/token/create-orphan
does not require to have sudo access. docs.
Source code:
https://github.com/rajanadar/VaultSharp/blob/14bdeb93143a7a3042d7443216d40bdad7651b6c/src/VaultSharp/V1/AuthMethods/Token/TokenAuthMethodProvider.cs#L26
and then CreateTokenRequest
is serialized as body, so create-orphan
can only be sent with no_parent=true
.
Issue Analytics
- State:
- Created 2 years ago
- Comments:5 (5 by maintainers)
published 1.7.0
tracking publish