Add document escrow fields to Attempts API (LG-8057)#7381
Merged
Conversation
solipet
approved these changes
Nov 22, 2022
Contributor
solipet
left a comment
There was a problem hiding this comment.
A few comments to consider, but looks great!
changelog: Improvements, IRS Attempts API, Add document escrow fields to IRS attempts API
Write documents to encrypted storage and read them back
Co-authored-by: Zach Margolis <zachmargolis@users.noreply.github.com>
Co-authored-by: Zach Margolis <zachmargolis@users.noreply.github.com>
Clarify that these args hold UUIDs identifying the front/back images
d6bbdb7 to
0a544bd
Compare
avoid polluting global namespace
try and make it clearer what these things are
whoops
matthinz
commented
Nov 23, 2022
Contributor
Author
|
@zachmargolis & @18F/identity-agnes: We had a late-breaking requirements change here, reducing the document escrow fields in the attempts API from 6 to 3. The big changes are:
LMK if you need any more context! |
zachmargolis
approved these changes
Nov 23, 2022
| end | ||
|
|
||
| context 'nonsense' do | ||
| let(:content_type) { 'yabba/dabbadoo' } |
solipet
approved these changes
Nov 23, 2022
Contributor
solipet
left a comment
There was a problem hiding this comment.
Looks good. One comment you can take or leave.
|
|
||
| context 'jpeg' do | ||
| let(:content_type) { 'image/jpeg' } | ||
| it { should eql('.jpeg') } |
Contributor
There was a problem hiding this comment.
These obviously work, but are written in the older "should" syntax. The more modern format used throughout login would be the "expect" syntax, e.g.,
it 'has the correct extension' do
expect(subject).to eq('.jpeg')
end
Co-authored-by: Zach Margolis <zachmargolis@users.noreply.github.com>
mdiarra3
pushed a commit
that referenced
this pull request
Nov 28, 2022
* Add content_type to DataUrlImage * First pass at wiring doc upload into attempts API changelog: Improvements, IRS Attempts API, Add document escrow fields to IRS attempts API * Additional tests * WIP * Update form test to roundtrip documents Write documents to encrypted storage and read them back * Use front_image & back_image lets for tests * Update ImageUploadsController spec * Test Attempts API includes images on validation failure * Update app/forms/idv/api_image_upload_form.rb Co-authored-by: Zach Margolis <zachmargolis@users.noreply.github.com> * Update app/services/encrypted_document_storage/local_storage.rb Co-authored-by: Zach Margolis <zachmargolis@users.noreply.github.com> * Update *_image -> *_image_uuid Clarify that these args hold UUIDs identifying the front/back images * Use let() for regexes in tests avoid polluting global namespace * Add doc escrow parameter descriptions * Minimize unnecessary verbosity * Lint issues * Reduce number of document escrow fields 50% off! * add "filename" to fields try and make it clearer what these things are * Remove empty test whoops * Update app/services/encrypted_document_storage/document_writer.rb Co-authored-by: Zach Margolis <zachmargolis@users.noreply.github.com> * Update spec from `should` to `is_expected.to` Co-authored-by: Zach Margolis <zachmargolis@users.noreply.github.com>
This was referenced Nov 29, 2022
Closed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🎫 Ticket
LG-8057
🛠 Summary of changes
#7351 previously added encrypted document escrow support.
This PR updates the
idv_document_upload_submittedevent in the IRS attempts API to include the following keys (when document escrow is enabled):document_front_image_filenamedocument_back_image_filenamedocument_image_encryption_key