DPC-5159 multi csp user POC#2896
Conversation
MEspositoE14s
left a comment
There was a problem hiding this comment.
LGTM as far as I understand the way this is supposed to work 👍
|
Hi @jdettmannnava, this changes look good. I see that you mentioned being able to successfully log in with multiple idps. I have your branch running locally and was wondering how I can also do this? I just see the option for login.gov.
|
@Jose-verdance |
## 🎫 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](https://github.com/CMSgov/dpc-app/actions/runs/25342609259)) - 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. --------- Co-authored-by: jdettmannnava <145699825+jdettmannnava@users.noreply.github.com> Co-authored-by: jose-verdance <jose@verdance.co> Co-authored-by: Copilot <copilot@github.com>

Not for merge.
🎫 Ticket
https://jira.cms.gov/browse/DPC-5159
🛠 Changes
ℹ️ Context
We need to support the ability of each user to log in to the portal with multiple CSPs.
Note: because of the way we fake the CPI API Gateway, most Authrorized Officials share the same PacId. Therefore, unlike in production, where each user will have their own PacId, we cannot bind multiple CSPs to the same user by PacId in local, dev, test, and sandbox environments. That is why we use the email address to deduplicate all users in the lower environments. We do want to test this flow, which is why we also bind AOs on PacId while running automated tests.
🧪 Validation
Updated Manual tests.
Logged in as same user using multiple IdPs.