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

Add helper for encoding/decoding root tokens and OTP generation in SDK module (#10504) #10505

Merged
merged 17 commits into from
Dec 1, 2021

Conversation

ptzianos
Copy link
Contributor

@ptzianos ptzianos commented Dec 5, 2020

Fixes: #10504

Changes:

  • Splits away code that encodes/decodes root tokens into a helper function in the SDK module
  • Splits away code that generates the OTP for the root token encoding into a helper function in the SDK module
  • Moves pgpkeys packages from vault/helpers to sdk/helpers
    Adds:
  • Unit tests for root token encoding/decoding and OTP generation

@ptzianos ptzianos force-pushed the split_root_token_decoding branch 2 times, most recently from 26cbf86 to ab3bfa0 Compare December 5, 2020 20:56
@ptzianos ptzianos force-pushed the split_root_token_decoding branch from ab3bfa0 to 857e609 Compare December 13, 2020 11:26
@ptzianos ptzianos force-pushed the split_root_token_decoding branch 2 times, most recently from c136024 to 6ec7615 Compare January 5, 2021 21:06
helper/token/decode.go Outdated Show resolved Hide resolved
@ptzianos ptzianos force-pushed the split_root_token_decoding branch from 6ec7615 to 8dd0eea Compare February 15, 2021 23:23
@vercel vercel bot temporarily deployed to Preview – vault-storybook February 15, 2021 23:23 Inactive
@vercel vercel bot temporarily deployed to Preview – vault February 15, 2021 23:23 Inactive
@ptzianos ptzianos force-pushed the split_root_token_decoding branch from 8dd0eea to 03924d8 Compare February 21, 2021 19:44
@vercel vercel bot temporarily deployed to Preview – vault February 21, 2021 19:44 Inactive
@vercel vercel bot temporarily deployed to Preview – vault-storybook February 21, 2021 19:44 Inactive
@ptzianos ptzianos force-pushed the split_root_token_decoding branch from 03924d8 to 7ea5624 Compare February 21, 2021 19:52
@vercel vercel bot temporarily deployed to Preview – vault February 21, 2021 19:52 Inactive
@vercel vercel bot temporarily deployed to Preview – vault-storybook February 21, 2021 19:52 Inactive
@vercel vercel bot temporarily deployed to Preview – vault February 21, 2021 20:00 Inactive
@vercel vercel bot temporarily deployed to Preview – vault-storybook February 21, 2021 20:00 Inactive
@ptzianos ptzianos force-pushed the split_root_token_decoding branch from b8959f3 to 33a1bf6 Compare August 30, 2021 21:02
@vercel vercel bot temporarily deployed to Preview – vault August 30, 2021 21:02 Inactive
@vercel vercel bot temporarily deployed to Preview – vault-storybook August 30, 2021 21:02 Inactive
@ptzianos ptzianos force-pushed the split_root_token_decoding branch from 33a1bf6 to 2c851a7 Compare August 31, 2021 04:53
@vercel vercel bot temporarily deployed to Preview – vault-storybook August 31, 2021 04:53 Inactive
@vercel vercel bot temporarily deployed to Preview – vault August 31, 2021 04:53 Inactive
@ptzianos
Copy link
Contributor Author

@ncabatoff hi, I'm back at this, I added all the fixes you suggested. Unfortunately I'm getting some test errors from the rabbitmq part of the code. I will try to debug them today. Is there anything else that this PR needs?

@ncabatoff
Copy link
Collaborator

@ncabatoff hi, I'm back at this, I added all the fixes you suggested. Unfortunately I'm getting some test errors from the rabbitmq part of the code. I will try to debug them today.

Merging in the latest main should fix those errors.

Is there anything else that this PR needs?

A unit test would be nice, but not essential since this is tested indirectly by operator_generate_root_test.go.

@vercel vercel bot temporarily deployed to Preview – vault November 12, 2021 07:55 Inactive
@vercel vercel bot temporarily deployed to Preview – vault-storybook November 12, 2021 07:55 Inactive
@vercel vercel bot temporarily deployed to Preview – vault November 13, 2021 10:21 Inactive
@vercel vercel bot temporarily deployed to Preview – vault-storybook November 13, 2021 10:21 Inactive
@vercel vercel bot temporarily deployed to Preview – vault November 24, 2021 15:23 Inactive
@vercel vercel bot temporarily deployed to Preview – vault-storybook November 24, 2021 15:23 Inactive
@ptzianos
Copy link
Contributor Author

@ncabatoff all comments have been fixed except one. Ready for review round 2

I've re-reviewed and I'm ready to approve and merge after you revert the pgp thing. Also apply the little tweak to the changelog I suggested please.

Awesome. I just fixed the changelog and moved back the PGP keys. Waiting for tests to pass 🤞 . Would you like me to squash the commits?

@ncabatoff
Copy link
Collaborator

Would you like me to squash the commits?

No need, when I merge it to main I'll be squashing them anyway.

@ptzianos ptzianos force-pushed the split_root_token_decoding branch from 5a026fb to dd21c79 Compare November 24, 2021 15:45
@vercel vercel bot temporarily deployed to Preview – vault November 24, 2021 15:45 Inactive
@vercel vercel bot temporarily deployed to Preview – vault-storybook November 24, 2021 15:45 Inactive
@ptzianos
Copy link
Contributor Author

@ncabatoff thank you very much for your help getting this PR ready for merging. Can I interest you now in a second PR? #10464

@ptzianos
Copy link
Contributor Author

@ncabatoff can you ✔️ this PR now that we are done with the changes or do we need to get an approval from someone else?

@ncabatoff ncabatoff merged commit 14aded6 into hashicorp:main Dec 1, 2021
@ncabatoff
Copy link
Collaborator

Thanks for all your hard work @ptzianos !

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

Successfully merging this pull request may close these issues.

Split away code for decoding root tokens into a function
2 participants