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

During v76 -> v77 upgrade canary deployment, UAA delete user endpoint returns false error #2789

Open
peterhaochen47 opened this issue Mar 18, 2024 · 2 comments

Comments

@peterhaochen47
Copy link
Member

peterhaochen47 commented Mar 18, 2024

Description

During the upgrade to UAA v77 from UAA v76 or below with canary deployment (where briefly both the new and the old UAA servers could be running), UAA delete user endpoint might respond with an error even though the user deletion is successful.

Cause

During a canary deployment, briefly both the new and the old UAA servers could be running, resulting in the following:

  • The new server (v77): Since the MFA feature is removed in V77.0.0, a DB migration will be run to drop the DB tables related to the MFA feature.
  • The old server (v76): A user deletion would trigger explicit delete operations on the associated entries in other DB tables. In this case, a user deletion will trigger a delete operation on the MFA-related tables (even in the case where the MFA feature is not enabled). And since these tables have been dropped already by the new server, the operation fails. See relevant code below:

What version of UAA are you running?

V76 -> V77

How are you deploying the UAA?

Any upgrade scenarios with canary deployment.

@cf-gitbot
Copy link

We have created an issue in Pivotal Tracker to manage this:

https://www.pivotaltracker.com/story/show/187263539

The labels on this github issue will be updated when the story is started.

peterhaochen47 added a commit that referenced this issue Mar 18, 2024
…ry deployment

- fixes #2789 (see bug root
  cause in the issue)
- by bringing back the MFA-related tables exactly as they were

[#187240345]
peterhaochen47 added a commit that referenced this issue Mar 18, 2024
…ry deployment

- fixes #2789 (see bug root
  cause in the issue)
- by bringing back the MFA-related tables exactly as they were

[#187240345]
peterhaochen47 added a commit that referenced this issue Mar 18, 2024
…ry deployment

- fixes #2789 (see bug root
  cause in the issue)
- by bringing back the MFA-related tables exactly as they were

[#187240345]
peterhaochen47 added a commit to Identity-and-Credentials/docs-pas that referenced this issue Mar 18, 2024
- see details: cloudfoundry/uaa#2789

[#187240345]
peterhaochen47 added a commit to Identity-and-Credentials/docs-pas that referenced this issue Mar 18, 2024
peterhaochen47 added a commit to Identity-and-Credentials/docs-pas that referenced this issue Mar 18, 2024
peterhaochen47 added a commit that referenced this issue Mar 19, 2024
…ry deployment

- fixes #2789 (see bug root
  cause in the issue)
- by bringing back the MFA-related tables (but without the index
  as these tables won't actually be used, as the MFA feature itself
  has been removed)

[#187240345]

Co-authored-by: Markus Strehle <11627201+strehle@users.noreply.github.com>
peterhaochen47 added a commit that referenced this issue Mar 19, 2024
…ry deployment

- fixes #2789 (see bug root
  cause in the issue)
- by bringing back the MFA-related tables (but without the index
  as these tables won't actually be used, as the MFA feature itself
  has been removed)

[#187240345]

Co-authored-by: Markus Strehle <11627201+strehle@users.noreply.github.com>
@peterhaochen47
Copy link
Member Author

So far, we have abandoned the proposed fix to this issue (#2790) as there are no active reports that users are encountering this issue. This issue may be closed after a few months once most users have gone through the upgrade to v77 (at which point, this issue will no longer occur).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Pending Review | Discussion
Development

Successfully merging a pull request may close this issue.

2 participants