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

Check that all required fields in Transit API are present. #14074

Merged
merged 4 commits into from
Feb 22, 2022

Conversation

victorr
Copy link
Contributor

@victorr victorr commented Feb 15, 2022

Ensure that an error is returned if any required field is nil or missing.

This fixes an issue that results in the empty string being encrypted when the plaintext is nil.

See VAULT-2837 for details.

@victorr victorr requested review from sgmiller and a team February 15, 2022 14:13
@victorr victorr marked this pull request as ready for review February 15, 2022 19:01
@vercel vercel bot temporarily deployed to Preview – vault-storybook February 16, 2022 14:50 Inactive
@vercel vercel bot temporarily deployed to Preview – vault February 16, 2022 14:50 Inactive
Copy link
Contributor

@divyapola5 divyapola5 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm!

@@ -79,6 +79,20 @@ func TestTransit_Trim(t *testing.T) {
}
doErrReq(t, req)

// Set min_encryption_version to 4
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: typo 4 -> 0

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed, thanks for the review!

@vercel vercel bot temporarily deployed to Preview – vault February 16, 2022 15:53 Inactive
@vercel vercel bot temporarily deployed to Preview – vault-storybook February 16, 2022 15:53 Inactive
Copy link
Collaborator

@sgmiller sgmiller left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great, very thorough.

@victorr victorr force-pushed the victorr/fix-transit-required-fields branch from 4b789fe to 2ba24e3 Compare February 22, 2022 20:30
@vercel vercel bot temporarily deployed to Preview – vault February 22, 2022 20:30 Inactive
@vercel vercel bot temporarily deployed to Preview – vault-storybook February 22, 2022 20:30 Inactive
@victorr victorr merged commit 395cd7b into main Feb 22, 2022
@victorr victorr deleted the victorr/fix-transit-required-fields branch February 22, 2022 21:00
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.

None yet

4 participants