Skip to content

Me/dpc 5372 portal db changes#3001

Open
MEspositoE14s wants to merge 150 commits intomainfrom
me/dpc-5372-portal-db-changes
Open

Me/dpc 5372 portal db changes#3001
MEspositoE14s wants to merge 150 commits intomainfrom
me/dpc-5372-portal-db-changes

Conversation

@MEspositoE14s
Copy link
Copy Markdown
Contributor

🎫 Ticket

https://jira.cms.gov/browse/DPC-5372

🛠 Changes

  • Adds three new tables, csps, csp_users and user_emails and populates them on invitation and login.
  • Removes IdpUid table.
  • Removes Devise in favor of directly calling OmniAuth.
  • Configured auth around for Login.gov.

ℹ️ Context

We're preparing to support multiple CSPs, and this is the first step. This was created and modified from #2896.

Note:

  • Before deploying to test, the user.provider field in the DB needs to be updated to "login_dot_gov" for all users. This can be done afterwards, but it's easier if you do it before.
  • This has already been done in dev, but make sure your callbacks are registered with Login.gov or the login process will fail.

🧪 Validation

  • Deployed to dev and was able to login. (Deploy: here)
  • Ran locally and could create a new user and login as an existing one. (If you want to test with an existing user on your machine, make sure to update user.provider in the DB as described above.)
  • Verified that new tables are populated both locally and in dev:
    • csps: Populated on migration.
    • csp_users: Populated on migration with values from the user table and whenever a new user is created.
    • user_emails: Populated and updated whenever a user logs in.

jdettmannnava and others added 25 commits April 8, 2026 07:30
Co-authored-by: Copilot <copilot@github.com>
Co-authored-by: Copilot <copilot@github.com>
Co-authored-by: Copilot <copilot@github.com>
Co-authored-by: Copilot <copilot@github.com>
Co-authored-by: Copilot <copilot@github.com>
Co-authored-by: Copilot <copilot@github.com>
Co-authored-by: Copilot <copilot@github.com>
@MEspositoE14s MEspositoE14s requested a review from a team as a code owner May 5, 2026 21:09
missing_info_text: Something happened on our end and we're unable to continue. Please contact <a href="mailto:dpcinfo@cms.hhs.gov">dpcinfo@cms.hhs.gov</a>.
server_error_status: "Registration unavailable: external system error."
server_error_text: We're unable to complete your request right now because a required external system is unavailable. Please try again later.
multi_user_match_status: multi_user_match_status
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

do we have these strings yet?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Not that I know of. I'm not sure if there's a content/design ticket out there somewhere for it, or if this was just a quickie place holder to get us through the PoC.

@MEspositoE14s MEspositoE14s requested a review from a team May 8, 2026 14:38
end

def csp
csp = Csp.active.find_by(name: :login_dot_gov)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

should the provider come from a parameter or user attribute instead of hardcoded?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

In this case, because it's in the login_dot_gov controller it should never change. Once we start adding other CSPs they should each get their own controller each tied to their own CSP entry.

We'll need to get a little clever in the invitations controller, though. Right now that's hardcoded do login_dot_gov, too, and that will have to change once we start implementing the other CSPs.

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.

4 participants