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

VEBT-777 - Add API's to connect to four DGIB endpoints for VYE #19331

Closed
wants to merge 29 commits into from

Conversation

GcioGregg
Copy link
Contributor

Summary

  • *This work is behind a feature toggle (flipper): NO
  • Vye api dgib - Add API's to connect to four DGIB endpoints for VYE verifications
  • (If bug, how to reproduce) N/A
  • need API's for front end to call to get and post verification data to DGIB endpoints
  • VEBT
  • (If introducing a flipper, what is the success criteria being targeted?) N/A

Related issue(s)

Testing done

  • New code is covered by unit tests
  • did not have API's to DGIB endpoints
  • QA logs in with a test user, goes to /education/verify-school-enrollement/mgib-enrollments/, confirms that claimant id and verfiication data populates and verify claimant works as expected.
  • If this work is behind a flipper: N/A
    • Tests need to be written for both the flipper on and flipper off scenarios. Docs.
    • What is the testing plan for rolling out the feature? QA to test on staging, if works as expected, deploy to production. Note: front end related work that calls these API's is behind a feature flag.

What areas of the site does it impact?

VYE enrollment verifications

Acceptance criteria

  • I fixed|updated|added unit tests and integration tests for each feature (if applicable).
  • No error nor warning in the console.
  • Events are being sent to the appropriate logging solution
  • Documentation has been updated (link to documentation)
  • No sensitive information (i.e. PII/credentials/internal URLs/etc.) is captured in logging, hardcoded, or specs
  • Feature/bug has a monitor built into Datadog (if applicable)
  • If app impacted requires authentication, did you login to a local build and verify all authenticated routes work as expected

Copy link

github-actions bot commented Nov 7, 2024

1 Error
🚫 This PR changes 816 LoC (not counting whitespace/newlines).

In order to ensure each PR receives the proper attention it deserves, those exceeding
500 will not be reviewed, nor will they be allowed to merge. Please break this PR up into
smaller ones.

If you have reason to believe that this PR should be granted an exception, please see the
Submitting pull requests for approval - FAQ.

File Summary

Files

  • .rubocop_todo.yml (+1/-0)

  • app/policies/vye_policy.rb (+7/-0)

  • config/initializers/breakers.rb (+9/-0)

  • config/settings.yml (+10/-2)

  • modules/vye/app/controllers/vye/v1/dgib_verifications_controller.rb (+80/-0)

  • modules/vye/app/serializers/vye/claimant_lookup_serializer.rb (+9/-0)

  • modules/vye/app/serializers/vye/claimant_verification_serializer.rb (+13/-0)

  • modules/vye/app/serializers/vye/verification_serializer.rb (+7/-7)

  • modules/vye/app/serializers/vye/verify_claimant_serializer.rb (+12/-0)

  • modules/vye/app/serializers/vye/vye_serializer.rb (+14/-0)

  • modules/vye/config/initializers/dgib_requires.rb (+4/-0)

  • modules/vye/config/routes.rb (+4/-0)

  • modules/vye/lib/dgib/authentication_token_service.rb (+24/-0)

  • modules/vye/lib/dgib/claimant_lookup/configuration.rb (+12/-0)

  • modules/vye/lib/dgib/claimant_lookup/response.rb (+14/-0)

  • modules/vye/lib/dgib/claimant_lookup/service.rb (+34/-0)

  • modules/vye/lib/dgib/claimant_status/configuration.rb (+12/-0)

  • modules/vye/lib/dgib/claimant_status/response.rb (+22/-0)

  • modules/vye/lib/dgib/claimant_status/service.rb (+35/-0)

  • modules/vye/lib/dgib/configuration.rb (+27/-0)

  • modules/vye/lib/dgib/response.rb (+39/-0)

  • modules/vye/lib/dgib/service.rb (+23/-0)

  • modules/vye/lib/dgib/verification_record/configuration.rb (+12/-0)

  • modules/vye/lib/dgib/verification_record/response.rb (+24/-0)

  • modules/vye/lib/dgib/verification_record/service.rb (+35/-0)

  • modules/vye/lib/dgib/verify_claimant/configuration.rb (+12/-0)

  • modules/vye/lib/dgib/verify_claimant/response.rb (+22/-0)

  • modules/vye/lib/dgib/verify_claimant/service.rb (+50/-0)

  • modules/vye/spec/controllers/vye/v1/dgib_verifications_controller_spec.rb (+98/-0)

  • modules/vye/spec/dgib/claimant_lookup/service_spec.rb (+25/-0)

  • modules/vye/spec/dgib/claimant_status/service_spec.rb (+25/-0)

  • modules/vye/spec/dgib/verfication_record/service_spec.rb (+25/-0)

  • modules/vye/spec/dgib/verify_claimant/service_spec.rb (+45/-0)

  • modules/vye/spec/serializers/claimant_verification_serializer_spec.rb (+22/-0)

    Note: We exclude files matching the following when considering PR size:

    *.csv, *.json, *.tsv, *.txt, *.md, Gemfile.lock, app/swagger, modules/mobile/docs, spec/fixtures/, spec/support/vcr_cassettes/, modules/mobile/spec/support/vcr_cassettes/, db/seeds, modules/vaos/app/docs, modules/meb_api/app/docs, modules/appeals_api/app/swagger/, *.bru, *.pdf
    

Big PRs are difficult to review, often become stale, and cause delays.

Generated by 🚫 Danger

def connection
@conn ||= Faraday.new(base_path, headers: base_request_headers, request: request_options) do |faraday|
faraday.use :breakers
faraday.ssl[:ca_file] = '/srv/vets-api/secret/dgib_ica11_rca2.key'
Copy link
Member

Choose a reason for hiding this comment

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

'/srv/vets-api/secret/dgib_ica11_rca2.key' is not a valid path and will be null. Please reference this cert aka Settings.dgi.vye.public_ica11_rca2_key_path

require 'dgib/verification_record/configuration'
require 'dgib/verify_claimant/configuration'

Rails.application.reloader.to_prepare do
Copy link
Member

Choose a reason for hiding this comment

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

This file needs to be removed. Breakers client should not be re-initialized.

@@ -9,5 +9,11 @@ def create?
end

alias_method :show?, :create?

def access?
Copy link
Member

Choose a reason for hiding this comment

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

This will need to be added to a new file. app/policies/vye_policy.rb or else the controller will not recognize it

config/initializers/breakers.rb Show resolved Hide resolved
Copy link

Error: A file (or its parent directories) does not have a CODEOWNERS entry. Please update the .github/CODEOWNERS file and add the entry for the Offending file: app/policies/vye_policy.rb

Copy link

Error: A file (or its parent directories) does not have a CODEOWNERS entry. Please update the .github/CODEOWNERS file and add the entry for the Offending file: app/policies/vye_policy.rb

@@ -0,0 +1,7 @@
VyePolicy = Struct.new(:user, :user_info) do
Copy link
Member

Choose a reason for hiding this comment

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

# frozen_string_literal: true

Copy link

This PR is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 7 days.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants