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

Refactor: separate Eligiblity API config from EnrollmentFlow #2780

Open
4 tasks
thekaveman opened this issue Mar 21, 2025 · 0 comments
Open
4 tasks

Refactor: separate Eligiblity API config from EnrollmentFlow #2780

thekaveman opened this issue Mar 21, 2025 · 0 comments
Labels
back-end Django views, sessions, middleware, models, migrations etc. chore Chores and tasks for code cleanup, dev experience, etc.

Comments

@thekaveman
Copy link
Member

thekaveman commented Mar 21, 2025

Once #2721 is complete, we'll have refactored all of the claims verification related fields out of the EnrollmentFlow model (using ClaimsVerificationRequest in cdt_identity instead).

We want to undertake a similar effort to refactor an ApiVerificationRequest model out of EnrollmentFlow. This is part of our longer-term effort to decompose the Benefits app into smaller, more re-usable pieces.

The new model should capture the following fields from EnrollmentFlow:

eligibility_api_url 
eligibility_api_auth_header
eligibility_api_auth_key_secret_name
eligibility_api_public_key
eligibility_api_jwe_cek_enc
eligibility_api_jwe_encryption_alg
eligibility_api_jws_signing_alg
eligibility_form_class

Then it should be referenced back on EnrollmentFlow as an (optional) foreign key field:

api_request = models.ForeignKey(
    ApiVerificationRequest,
    on_delete=models.PROTECT,
    null=True,
    blank=True,
)

Acceptance Criteria

  • Eligibility API configuration from EnrollmentFlow is moved to its own model class
  • EnrollmentFlow maintains a reference to the new model
  • A data migration maintains existing data
  • Updated permissions to match existing EnrollmentFlow permissions for these fields
@thekaveman thekaveman added back-end Django views, sessions, middleware, models, migrations etc. chore Chores and tasks for code cleanup, dev experience, etc. labels Mar 21, 2025
@thekaveman thekaveman removed the status in Digital Services Mar 21, 2025
@thekaveman thekaveman moved this to Todo in Digital Services Mar 21, 2025
@thekaveman thekaveman moved this from Todo to Stretch in Digital Services Mar 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
back-end Django views, sessions, middleware, models, migrations etc. chore Chores and tasks for code cleanup, dev experience, etc.
Projects
Status: Stretch
Development

No branches or pull requests

1 participant