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.

Create orphan token is always with no_parent=true

See original GitHub issue

Describe 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:closed
  • Created 2 years ago
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
rajanadarcommented, Aug 14, 2021

published 1.7.0

1reaction
rajanadarcommented, Aug 10, 2021

tracking publish

Read more comments on GitHub >

github_iconTop Results From Across the Web

Vault cli: how to create orphan token with role
I'm trying to create an orphan token from the vault cli. If I run vault token create -orphan I get an orphan as...
Read more >
Cannot renew token created by an orphan token. #1401
Continuing off https://groups.google.com/forum/#!msg/vault-tool/VT-0yUcOfsM/p7fpu1ccAQAJ - the issue I'm having is that I cannot renew a token ...
Read more >
Vault Part 9 - Deeper Look Into Tokens | by Yiğit İrez - Medium
There is also the concept of tokens which are a parent token themselves so they have no parent (called orphan in Vault terms)...
Read more >
Will my token expire??
It depends on a few things. First, unless you created it as an orphaned token, then if the parent token ever gets explicitly...
Read more >
Simplified orphan token creation for Hashicorp Vault - bits.of.info
The process for creating orphan tokens normally goes as follows: Authenticate against Vault to obtain a token which has permission to call the ......
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