-
Notifications
You must be signed in to change notification settings - Fork 393
Add decode token API endpoint #1185
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
base: main
Are you sure you want to change the base?
Conversation
Also added and tested the documentation. |
I see that tests fail as the sys/decode-token was only added in 1.13.x While I added the util.decode_generated_root_token and added an if lt 1.13 to select the util or my new code. The two questions are:
The failing documentation testing though, I'm not certain what version is being used - my installed version is 1.16 edit: just saw doctest is run agains 1.7 enterprise (the last free one) |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #1185 +/- ##
==========================================
+ Coverage 87.56% 87.57% +0.01%
==========================================
Files 67 67
Lines 3288 3292 +4
==========================================
+ Hits 2879 2883 +4
Misses 409 409
|
Just a quick follow-up. I stopped "fidling" with the code. Is there anything I can do to help move this forward? I have implemented a decode that can be done locally in HVAC - the code implements what is being done server side ( though go -> python ). |
thanks @alainchiasson ! I do apologize for the slow turnaround, just have a bit too much going on lately and that leaves less time I can dedicate to projects like this but hopefully I'll see some time opening up soon |
Adding decode-token to key.py simplifying the final decrypting/decoding of a generated root token. This uses the API endpoint sys/decode-token present since at least 1.13.x
Other than the function, I had rewritten two test cases to use decode token instead of the util.decode_genreated_root_token codethat forked a Vault CLI call ( vault operator ... ), that in the end called the same API
endpoint.
util.decode_generated_root_token was also removed, as it is only used by the test.
This also resolves #1184