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

fix: UAA delete user endpoint returns false error during upgrade canary deployment #2790

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 2 additions & 0 deletions README.md
Expand Up @@ -187,6 +187,7 @@ List of relations
public | groups | table | root
public | identity_provider | table | root
public | identity_zone | table | root
public | mfa_providers | table | root
public | oauth_client_details | table | root
public | oauth_code | table | root
public | oauth_code_id_seq | sequence | root
Expand All @@ -196,6 +197,7 @@ List of relations
public | sec_audit_id_seq | sequence | root
public | spring_session | table | root
public | spring_session_attributes | table | root
public | user_google_mfa_credentials | table | root
public | user_info | table | root
public | users | table | root
(23 rows)
Expand Down
@@ -0,0 +1,28 @@
--
-- These tables were previously dropped in https://github.com/cloudfoundry/uaa/pull/2717
-- Restoring them here due to https://github.com/cloudfoundry/uaa/issues/2789
-- Can consider dropping these again in the future (e.g. at UAA V78/79, when most users
-- will no longer experience issue #2789)
--

CREATE TABLE mfa_providers (
id CHAR(36) NOT NULL PRIMARY KEY,
created TIMESTAMP DEFAULT CURRENT_TIMESTAMP NOT NULL,
lastmodified TIMESTAMP DEFAULT CURRENT_TIMESTAMP NOT NULL,
identity_zone_id varchar(36) NOT NULL,
name varchar(255) NOT NULL,
type varchar(255) NOT NULL,
config LONGVARCHAR
);

CREATE TABLE user_google_mfa_credentials (
user_id VARCHAR(36) NOT NULL,
secret_key VARCHAR(255) NOT NULL,
validation_code INTEGER,
scratch_codes VARCHAR(255) NOT NULL,
mfa_provider_id CHAR(36) NOT NULL,
zone_id CHAR(36) NOT NULL,
encryption_key_label VARCHAR(255),
encrypted_validation_code VARCHAR(255) NULL,
PRIMARY KEY (user_id,mfa_provider_id)
);
@@ -0,0 +1,27 @@
--
-- These tables were previously dropped in https://github.com/cloudfoundry/uaa/pull/2717
-- Restoring them here due to https://github.com/cloudfoundry/uaa/issues/2789
-- Can consider dropping these again in the future (e.g. at UAA V78/79, when most users
-- will no longer experience issue #2789)
--

CREATE TABLE IF NOT EXISTS `mfa_providers` (
`id` varchar(36) NOT NULL,
`created` TIMESTAMP default current_timestamp NOT NULL,
`lastModified` TIMESTAMP null,
`identity_zone_id` varchar(36) NOT NULL,
`name` varchar(255) NOT NULL,
`type` varchar(255) NOT NULL,
`config` longtext
);

CREATE TABLE IF NOT EXISTS `user_google_mfa_credentials` (
`user_id` VARCHAR(36) NOT NULL,
`secret_key` VARCHAR(255) NOT NULL,
`validation_code` INTEGER NULL,
`scratch_codes` VARCHAR(255) NOT NULL,
`mfa_provider_id` CHAR(36) NOT NULL,
`zone_id` CHAR(36) NOT NULL,
`encryption_key_label` VARCHAR(255),
`encrypted_validation_code` VARCHAR(255) NULL
);
@@ -0,0 +1,29 @@
--
Copy link
Member

Choose a reason for hiding this comment

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

4_108 is now used from recent merge, so if you want this please incr. number

-- These tables were previously dropped in https://github.com/cloudfoundry/uaa/pull/2717
-- Restoring them here due to https://github.com/cloudfoundry/uaa/issues/2789
--
-- Can consider dropping these again in the future (e.g. at UAA V78/79, when most users
-- will no longer experience issue #2789)
--

CREATE TABLE IF NOT EXISTS mfa_providers (
id VARCHAR(36) NOT NULL PRIMARY KEY,
created TIMESTAMP default current_timestamp NOT NULL,
lastModified TIMESTAMP null,
identity_zone_id VARCHAR(36) NOT NULL,
name VARCHAR(255) NOT NULL,
type VARCHAR(255) NOT NULL,
config TEXT
);

CREATE TABLE IF NOT EXISTS user_google_mfa_credentials (
user_id VARCHAR(36) NOT NULL PRIMARY KEY,
secret_key VARCHAR(255) NOT NULL,
validation_code INTEGER,
scratch_codes VARCHAR(255) NOT NULL,
mfa_provider_id CHAR(36) NOT NULL,
zone_id CHAR(36) NOT NULL,
encryption_key_label VARCHAR(255),
encrypted_validation_code VARCHAR(255) NULL
);