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

Initiate rolling migration, phase 2 #7598

Closed
mehansen opened this issue Apr 23, 2024 · 2 comments · Fixed by #8182
Closed

Initiate rolling migration, phase 2 #7598

mehansen opened this issue Apr 23, 2024 · 2 comments · Fixed by #8182
Assignees

Comments

@mehansen
Copy link
Collaborator

mehansen commented Apr 23, 2024

Background

We would like to migrate user roles, org membership, and facility membership to be stored within the SimpleReport app, as opposed to managing it in Okta. This will increase stability of the app and improve code readability and extensibility, among other benefits. The goal of this ticket is to continue moving authorization data we access in Okta to our tables and also compare the data we've collected with our source of truth (Okta) to check for discrepancies.

Change requested

Change the code that accesses user role and facility/org membership from Okta to instead get this data from our tables if the feature flag is on.

If the feature flag is off, we continue to retrieve from Okta but we also update our data. Create entries in the ApiUserFacility and ApiUserRole tables or update existing entries.
When retrieving the data from Okta, compare to what we have in our tables and alert if they are not in sync.

Acceptance criteria

  • When the feature flag is off:
    • the behavior of the app re: authorization and showing role/facility info should reflect what's stored in Okta
    • any time the app performs an action that retrieves role or facility or org membership from Okta, the tables should also reflect this information
  • When the feature flag is on:
    • the behavior of the app re: authorization and showing role/facility info should reflect what's stored in our tables
    • any time the app performs an action that retrieves role or facility or org membership, we do not update our tables
  • (???) When the feature flag is off OR always until cleaned up
    • any time the app performs an action that retrieves role or facility or org membership, we compare what we get from Okta to what's stored in our tables. if the data doesn't match (inc is absent?), trigger an alert

Dependencies

Open questions

Do we want an alert if the data was absent or just if it was already in our table and doesn't match?
Question from earlier discussion: Do we want to do the comparison and alert when the flag is on?
Question from earlier discussion: For testing, any prod-specific corner cases we want to talk about that require special testing outside of testing in lowers?

Notes

Test auth in lowers with non-superadmin (since superadmin still managed within Okta)

Additional context

Main design doc
Design doc - backend
Design doc - data migration plan
Okta migration tickets plan
Okta tech talk
Okta tech talk part 2

@emyl3
Copy link
Collaborator

emyl3 commented Aug 27, 2024

Remaining work:

@emyl3
Copy link
Collaborator

emyl3 commented Sep 6, 2024

Update from eng sync: continue to update roles + groups in Okta even when the feature flag is enabled

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 a pull request may close this issue.

2 participants