Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 1.4k
Normalize encryption on global configurations values#6812
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
Uh oh!
There was an error while loading. Please reload this page.
Changes from all commits
272f2ee1f8b9c419579626112b564a161414e28683b836fc488d32c7File filter
Filter by extension
Conversations
Uh oh!
There was an error while loading. Please reload this page.
Jump to
Uh oh!
There was an error while loading. Please reload this page.
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -475,6 +475,8 @@ private boolean migrateData(String oldDBKey, String newDBKey, String oldEncrypto | ||
| // migrate resource details values | ||
| migrateHostDetails(conn); | ||
| migrateEncryptedAccountDetails(conn); | ||
| migrateEncryptedDomainDetails(conn); | ||
| migrateClusterDetails(conn); | ||
| migrateImageStoreDetails(conn); | ||
| migrateStoragePoolDetails(conn); | ||
| @@ -497,6 +499,30 @@ private boolean migrateData(String oldDBKey, String newDBKey, String oldEncrypto | ||
| return true; | ||
| } | ||
| private void migrateEncryptedAccountDetails(Connection conn) { | ||
| System.out.println("Beginning migration of account_details encrypted values"); | ||
BryanMLima marked this conversation as resolved.
Uh oh!There was an error while loading. Please reload this page. | ||
| String tableName = "account_details"; | ||
| String selectSql = "SELECT details.id, details.value from account_details details, cloud.configuration c " + | ||
| "WHERE details.name = c.name AND c.category IN ('Hidden', 'Secure') AND details.value <> \"\" ORDER BY details.id;"; | ||
| String updateSql = "UPDATE cloud.account_details SET value = ? WHERE id = ?;"; | ||
| migrateValueAndUpdateDatabaseById(conn, tableName, selectSql, updateSql, false); | ||
| System.out.println("End migration of account details values"); | ||
BryanMLima marked this conversation as resolved.
Uh oh!There was an error while loading. Please reload this page. | ||
| } | ||
| private void migrateEncryptedDomainDetails(Connection conn) { | ||
| System.out.println("Beginning migration of domain_details encrypted values"); | ||
BryanMLima marked this conversation as resolved.
Uh oh!There was an error while loading. Please reload this page. | ||
| String tableName = "domain_details"; | ||
| String selectSql = "SELECT details.id, details.value from domain_details details, cloud.configuration c " + | ||
| "WHERE details.name = c.name AND c.category IN ('Hidden', 'Secure') AND details.value <> \"\" ORDER BY details.id;"; | ||
| String updateSql = "UPDATE cloud.domain_details SET value = ? WHERE id = ?;"; | ||
| migrateValueAndUpdateDatabaseById(conn, tableName, selectSql, updateSql, false); | ||
| System.out.println("End migration of domain details values"); | ||
BryanMLima marked this conversation as resolved.
Uh oh!There was an error while loading. Please reload this page. | ||
| } | ||
| protected String migrateValue(String value) { | ||
| if (StringUtils.isEmpty(value)) { | ||
| return value; | ||
Uh oh!
There was an error while loading. Please reload this page.