Me/dpc 5372 portal db changes#3001
Conversation
… into jd/dpc-5127-multiple-oidc
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>
| 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 |
There was a problem hiding this comment.
do we have these strings yet?
There was a problem hiding this comment.
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.
| end | ||
|
|
||
| def csp | ||
| csp = Csp.active.find_by(name: :login_dot_gov) |
There was a problem hiding this comment.
should the provider come from a parameter or user attribute instead of hardcoded?
There was a problem hiding this comment.
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.
|
Hey @MEspositoE14s should we have a migration script ready and a rollback one for updating user.provider field in the DB to "login_dot_gov"? |
We can add it to the existing migration, but Jeff pointed out in the PoC that it's easier just to do it manually, especially if there's a problem and we just want to drop the new tables and start over. It's only a one line command: |
Even if its a one line change, we should aim to have changes to be DB be go through the migration. This way we have a clear migration audit trail and can reduce the manual steps required. |
|
+1 on the migration script, I think we should preserve the history |
The people have spoken! This update should make rolling back work a little easier, too. |
Jose-verdance
left a comment
There was a problem hiding this comment.
Hey @MEspositoE14s thanks again for syncing with me. This looks good. This seems outside the PR scope, but we may want to document how to update the LOGIN_GOV_PRIVATE_KEY for future use cases and scenarios. Looks good otherwise!
🎫 Ticket
https://jira.cms.gov/browse/DPC-5372
🛠 Changes
csps,csp_usersanduser_emailsand populates them on invitation and login.IdpUidtable.Devisein favor of directly callingOmniAuth.ℹ️ Context
We're preparing to support multiple CSPs, and this is the first step. This was created and modified from #2896.
Note:
user.providerfield 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.🧪 Validation
user.providerin the DB as described above.)csps: Populated on migration.csp_users: Populated on migration with values from theusertable and whenever a new user is created.user_emails: Populated and updated whenever a user logs in.