Skip to content

Lg 6114 personal key#6237

Merged
solipet merged 60 commits intomainfrom
lg-6114-personal-key
Apr 28, 2022
Merged

Lg 6114 personal key#6237
solipet merged 60 commits intomainfrom
lg-6114-personal-key

Conversation

@peggles2
Copy link
Contributor

This pull request is the first API request for the Flow state machine api.

It makes a post request and sends a password and jwt key and in exchange retrieves the personal key.
API Request:
POST /api/verify/complete

PARAMETERS:
{ password: 'iambatman', details: jwt }

RESPONSE:
success:
{"personal_key"=>"J4S5-3Y93-F84X-NSN1", "profile_pending"=>true, "status"=>"SUCCESS"}

failed:
{"error"=>"user is not fully authenticated", "status"=>"ERROR"}

peggles2 and others added 30 commits April 11, 2022 16:55
solipet and others added 5 commits April 27, 2022 13:24
Copy link
Contributor

@jmhooper jmhooper left a comment

Choose a reason for hiding this comment

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

One last comment from me

Copy link
Contributor

@aduth aduth left a comment

Choose a reason for hiding this comment

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

🚀

@solipet solipet merged commit a626d43 into main Apr 28, 2022
@solipet solipet deleted the lg-6114-personal-key branch April 28, 2022 18:54
peggles2 added a commit that referenced this pull request May 3, 2022
* personal-key repo

* update route to verify/complete/personal_key

* get request working with postman to return empty hash for now

* add_proofing_component to get_personal_key

* add analytics for personal key

* update complete_controller

* update error messages for the 2 factor auth so api can get proper json response

* cleanup code

* update the application controller

* changes made to return proper json error responses

* latest changes

* update code

* create the profile and cache the pii

* create the profile creation form correctly

* clean up the JWT code, use idv certificate pair

* update code

* changes made to cleanup code

* update FormResponse to return a {} if extra_attributes is nil

* changes made to fix the correct jwt to return user key

* specs for Api::ProfileCreationForm

* specs for Api::ProfileCreationForm (for reals)

* add rspec tests

* cleanup test

* cleanup code

* fix profile creation form spec on recovery key

* changes made to make it a post instead of a get

* cleanup lint

* fix some more linter errors

* Include "personal_key" as alertable key in analytics PiiDetector

**Why**: Since we don't want to be including this detail in any logs, as it is password-like.

* Revert "Include "personal_key" as alertable key in analytics PiiDetector"

This reverts commit 3f00de9.

* implement/test complete_session

* changes made to fix the code review feedacks

* get rid of aliased methods

* lints

* fix linter error

* remove parenthesis

* code review feedback

* changelog: Upcoming Features, Identity Verification, API endpoint for IdV completion

* fix line space

* code review feedback

* fix lint error

* add feature flagging

* move the personal_key to a dedicated method, encapsulate the JWT in a decorator

* lints

* convert profile_completion_form to return the personal_key separately from the response.

* remove unused custom form response class

* Update config/routes.rb

Co-authored-by: Andrew Duthie <andrew.duthie@gsa.gov>

* Update app/forms/api/profile_creation_form.rb

to fetch pii from the PII::Cacher

Co-authored-by: Mitchell Henke <mitchell.henke@gsa.gov>

* remove `gpo_otp` as a method on the form

* move the feature flag check from routes.rb to the controller

* remove unnecessary session usage

* default keys for IdV JWTs

* guard against small IdV JWT keys in production envs

Co-authored-by: Douglas Price <douglas.price@gsa.gov>
Co-authored-by: Andrew Duthie <andrew.duthie@gsa.gov>
Co-authored-by: Mitchell Henke <mitchell.henke@gsa.gov>
peggles2 added a commit that referenced this pull request May 5, 2022
* personal-key repo

* update route to verify/complete/personal_key

* get request working with postman to return empty hash for now

* add_proofing_component to get_personal_key

* add analytics for personal key

* update complete_controller

* update error messages for the 2 factor auth so api can get proper json response

* cleanup code

* update the application controller

* changes made to return proper json error responses

* latest changes

* update code

* create the profile and cache the pii

* create the profile creation form correctly

* clean up the JWT code, use idv certificate pair

* update code

* changes made to cleanup code

* update FormResponse to return a {} if extra_attributes is nil

* changes made to fix the correct jwt to return user key

* specs for Api::ProfileCreationForm

* specs for Api::ProfileCreationForm (for reals)

* add rspec tests

* cleanup test

* cleanup code

* fix profile creation form spec on recovery key

* changes made to make it a post instead of a get

* cleanup lint

* fix some more linter errors

* Include "personal_key" as alertable key in analytics PiiDetector

**Why**: Since we don't want to be including this detail in any logs, as it is password-like.

* Revert "Include "personal_key" as alertable key in analytics PiiDetector"

This reverts commit 3f00de9.

* implement/test complete_session

* changes made to fix the code review feedacks

* get rid of aliased methods

* lints

* fix linter error

* remove parenthesis

* code review feedback

* changelog: Upcoming Features, Identity Verification, API endpoint for IdV completion

* fix line space

* code review feedback

* fix lint error

* add feature flagging

* move the personal_key to a dedicated method, encapsulate the JWT in a decorator

* lints

* convert profile_completion_form to return the personal_key separately from the response.

* remove unused custom form response class

* Update config/routes.rb

Co-authored-by: Andrew Duthie <andrew.duthie@gsa.gov>

* Update app/forms/api/profile_creation_form.rb

to fetch pii from the PII::Cacher

Co-authored-by: Mitchell Henke <mitchell.henke@gsa.gov>

* remove `gpo_otp` as a method on the form

* move the feature flag check from routes.rb to the controller

* remove unnecessary session usage

* default keys for IdV JWTs

* guard against small IdV JWT keys in production envs

Co-authored-by: Douglas Price <douglas.price@gsa.gov>
Co-authored-by: Andrew Duthie <andrew.duthie@gsa.gov>
Co-authored-by: Mitchell Henke <mitchell.henke@gsa.gov>
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.

6 participants