KEYCLOAK-17874 Server cannot be started with oracle19cRAC
This commit is contained in:
parent
0cecd0f33f
commit
20fc430be0
12 changed files with 41 additions and 18 deletions
|
@ -79,7 +79,12 @@
|
||||||
</changeSet>
|
</changeSet>
|
||||||
|
|
||||||
<changeSet author="keycloak" id="json-string-accomodation">
|
<changeSet author="keycloak" id="json-string-accomodation">
|
||||||
<modifyDataType tableName="REALM_ATTRIBUTE" columnName="VALUE" newDataType="NCLOB"/>
|
<addColumn tableName="REALM_ATTRIBUTE">
|
||||||
|
<column name="VALUE_NEW" type="NCLOB" />
|
||||||
|
</addColumn>
|
||||||
|
<sql>UPDATE REALM_ATTRIBUTE SET VALUE_NEW = VALUE, VALUE = NULL</sql>
|
||||||
|
<dropColumn tableName="REALM_ATTRIBUTE" columnName="VALUE"/>
|
||||||
|
<renameColumn tableName="REALM_ATTRIBUTE" oldColumnName="VALUE_NEW" newColumnName="VALUE" columnDataType="NCLOB"/>
|
||||||
</changeSet>
|
</changeSet>
|
||||||
|
|
||||||
</databaseChangeLog>
|
</databaseChangeLog>
|
||||||
|
|
|
@ -48,9 +48,12 @@ public abstract class AbstractJsonFileImportMigrationTest extends AbstractMigrat
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void testMigrationTo13_0_0() {
|
protected void testMigrationTo13_0_0(boolean testRealmAttributesMigration) {
|
||||||
testDefaultRoles(migrationRealm);
|
testDefaultRoles(migrationRealm);
|
||||||
|
|
||||||
testDefaultRolesNameWhenTaken();
|
testDefaultRolesNameWhenTaken();
|
||||||
|
if (testRealmAttributesMigration) {
|
||||||
|
testRealmAttributesMigration();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -292,11 +292,14 @@ public abstract class AbstractMigrationTest extends AbstractKeycloakTest {
|
||||||
testDeleteAccount(migrationRealm);
|
testDeleteAccount(migrationRealm);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void testMigrationTo13_0_0() {
|
protected void testMigrationTo13_0_0(boolean testRealmAttributesMigration) {
|
||||||
testDefaultRoles(masterRealm);
|
testDefaultRoles(masterRealm);
|
||||||
testDefaultRoles(migrationRealm);
|
testDefaultRoles(migrationRealm);
|
||||||
|
|
||||||
testDefaultRolesNameWhenTaken();
|
testDefaultRolesNameWhenTaken();
|
||||||
|
if (testRealmAttributesMigration) {
|
||||||
|
testRealmAttributesMigration();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void testDeleteAccount(RealmResource realm) {
|
protected void testDeleteAccount(RealmResource realm) {
|
||||||
|
@ -912,9 +915,11 @@ public abstract class AbstractMigrationTest extends AbstractKeycloakTest {
|
||||||
protected void testMigrationTo9_x() {
|
protected void testMigrationTo9_x() {
|
||||||
testMigrationTo9_0_0();
|
testMigrationTo9_0_0();
|
||||||
}
|
}
|
||||||
protected void testMigrationTo12_x() {
|
|
||||||
|
// Realm attributes supported since Keycloak 3
|
||||||
|
protected void testMigrationTo12_x(boolean testRealmAttributesMigration) {
|
||||||
testMigrationTo12_0_0();
|
testMigrationTo12_0_0();
|
||||||
testMigrationTo13_0_0();
|
testMigrationTo13_0_0(testRealmAttributesMigration);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void testMigrationTo7_x(boolean supportedAuthzServices) {
|
protected void testMigrationTo7_x(boolean supportedAuthzServices) {
|
||||||
|
@ -955,4 +960,10 @@ public abstract class AbstractMigrationTest extends AbstractKeycloakTest {
|
||||||
// 'default-roles-migration2' name is used, we test that 'default-roles-migration2-1' is created instead
|
// 'default-roles-migration2' name is used, we test that 'default-roles-migration2-1' is created instead
|
||||||
assertThat(migrationRealm2.toRepresentation().getDefaultRole().getName(), equalTo("default-roles-migration2-1"));
|
assertThat(migrationRealm2.toRepresentation().getDefaultRole().getName(), equalTo("default-roles-migration2-1"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected void testRealmAttributesMigration() {
|
||||||
|
log.info("testing realm attributes migration");
|
||||||
|
Map<String, String> realmAttributes = migrationRealm.toRepresentation().getAttributes();
|
||||||
|
assertEquals("custom_value", realmAttributes.get("custom_attribute"));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -70,7 +70,7 @@ public class JsonFileImport198MigrationTest extends AbstractJsonFileImportMigrat
|
||||||
testMigrationTo7_x(false);
|
testMigrationTo7_x(false);
|
||||||
testMigrationTo8_x();
|
testMigrationTo8_x();
|
||||||
testMigrationTo9_x();
|
testMigrationTo9_x();
|
||||||
testMigrationTo12_x();
|
testMigrationTo12_x(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -64,7 +64,7 @@ public class JsonFileImport255MigrationTest extends AbstractJsonFileImportMigrat
|
||||||
testMigrationTo7_x(true);
|
testMigrationTo7_x(true);
|
||||||
testMigrationTo8_x();
|
testMigrationTo8_x();
|
||||||
testMigrationTo9_x();
|
testMigrationTo9_x();
|
||||||
testMigrationTo12_x();
|
testMigrationTo12_x(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -63,7 +63,7 @@ public class JsonFileImport343MigrationTest extends AbstractJsonFileImportMigrat
|
||||||
testMigrationTo7_x(true);
|
testMigrationTo7_x(true);
|
||||||
testMigrationTo8_x();
|
testMigrationTo8_x();
|
||||||
testMigrationTo9_x();
|
testMigrationTo9_x();
|
||||||
testMigrationTo12_x();
|
testMigrationTo12_x(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -56,7 +56,7 @@ public class JsonFileImport483MigrationTest extends AbstractJsonFileImportMigrat
|
||||||
testMigrationTo7_x(true);
|
testMigrationTo7_x(true);
|
||||||
testMigrationTo8_x();
|
testMigrationTo8_x();
|
||||||
testMigrationTo9_x();
|
testMigrationTo9_x();
|
||||||
testMigrationTo12_x();
|
testMigrationTo12_x(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -51,7 +51,7 @@ public class JsonFileImport903MigrationTest extends AbstractJsonFileImportMigrat
|
||||||
@Test
|
@Test
|
||||||
public void migration9_0_3Test() throws Exception {
|
public void migration9_0_3Test() throws Exception {
|
||||||
checkRealmsImported();
|
checkRealmsImported();
|
||||||
testMigrationTo12_x();
|
testMigrationTo12_x(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -61,7 +61,7 @@ public class MigrationTest extends AbstractMigrationTest {
|
||||||
@Migration(versionFrom = "9.")
|
@Migration(versionFrom = "9.")
|
||||||
public void migration9_xTest() throws Exception {
|
public void migration9_xTest() throws Exception {
|
||||||
testMigratedData(false);
|
testMigratedData(false);
|
||||||
testMigrationTo12_x();
|
testMigrationTo12_x(true);
|
||||||
|
|
||||||
// Always test offline-token login during migration test
|
// Always test offline-token login during migration test
|
||||||
testOfflineTokenLogin();
|
testOfflineTokenLogin();
|
||||||
|
@ -76,7 +76,7 @@ public class MigrationTest extends AbstractMigrationTest {
|
||||||
testMigrationTo7_x(true);
|
testMigrationTo7_x(true);
|
||||||
testMigrationTo8_x();
|
testMigrationTo8_x();
|
||||||
testMigrationTo9_x();
|
testMigrationTo9_x();
|
||||||
testMigrationTo12_x();
|
testMigrationTo12_x(true);
|
||||||
|
|
||||||
// Always test offline-token login during migration test
|
// Always test offline-token login during migration test
|
||||||
testOfflineTokenLogin();
|
testOfflineTokenLogin();
|
||||||
|
@ -92,7 +92,7 @@ public class MigrationTest extends AbstractMigrationTest {
|
||||||
testMigrationTo7_x(true);
|
testMigrationTo7_x(true);
|
||||||
testMigrationTo8_x();
|
testMigrationTo8_x();
|
||||||
testMigrationTo9_x();
|
testMigrationTo9_x();
|
||||||
testMigrationTo12_x();
|
testMigrationTo12_x(true);
|
||||||
|
|
||||||
// Always test offline-token login during migration test
|
// Always test offline-token login during migration test
|
||||||
testOfflineTokenLogin();
|
testOfflineTokenLogin();
|
||||||
|
@ -109,7 +109,7 @@ public class MigrationTest extends AbstractMigrationTest {
|
||||||
testMigrationTo7_x(true);
|
testMigrationTo7_x(true);
|
||||||
testMigrationTo8_x();
|
testMigrationTo8_x();
|
||||||
testMigrationTo9_x();
|
testMigrationTo9_x();
|
||||||
testMigrationTo12_x();
|
testMigrationTo12_x(false);
|
||||||
|
|
||||||
// Always test offline-token login during migration test
|
// Always test offline-token login during migration test
|
||||||
testOfflineTokenLogin();
|
testOfflineTokenLogin();
|
||||||
|
@ -127,7 +127,7 @@ public class MigrationTest extends AbstractMigrationTest {
|
||||||
testMigrationTo7_x(false);
|
testMigrationTo7_x(false);
|
||||||
testMigrationTo8_x();
|
testMigrationTo8_x();
|
||||||
testMigrationTo9_x();
|
testMigrationTo9_x();
|
||||||
testMigrationTo12_x();
|
testMigrationTo12_x(false);
|
||||||
|
|
||||||
// Always test offline-token login during migration test
|
// Always test offline-token login during migration test
|
||||||
testOfflineTokenLogin();
|
testOfflineTokenLogin();
|
||||||
|
|
|
@ -1630,7 +1630,8 @@
|
||||||
"actionTokenGeneratedByAdminLifespan" : "43200",
|
"actionTokenGeneratedByAdminLifespan" : "43200",
|
||||||
"bruteForceProtected" : "false",
|
"bruteForceProtected" : "false",
|
||||||
"_browser_header.contentSecurityPolicy" : "frame-src 'self'; frame-ancestors 'self'; object-src 'none';",
|
"_browser_header.contentSecurityPolicy" : "frame-src 'self'; frame-ancestors 'self'; object-src 'none';",
|
||||||
"waitIncrementSeconds" : "60"
|
"waitIncrementSeconds" : "60",
|
||||||
|
"custom_attribute": "custom_value"
|
||||||
},
|
},
|
||||||
"keycloakVersion" : "7.2.0.GA"
|
"keycloakVersion" : "7.2.0.GA"
|
||||||
}, {
|
}, {
|
||||||
|
|
|
@ -1526,7 +1526,8 @@
|
||||||
"bruteForceProtected" : "false",
|
"bruteForceProtected" : "false",
|
||||||
"_browser_header.contentSecurityPolicy" : "frame-src 'self'; frame-ancestors 'self'; object-src 'none';",
|
"_browser_header.contentSecurityPolicy" : "frame-src 'self'; frame-ancestors 'self'; object-src 'none';",
|
||||||
"waitIncrementSeconds" : "60",
|
"waitIncrementSeconds" : "60",
|
||||||
"offlineSessionMaxLifespanEnabled" : "false"
|
"offlineSessionMaxLifespanEnabled" : "false",
|
||||||
|
"custom_attribute": "custom_value"
|
||||||
},
|
},
|
||||||
"keycloakVersion" : "4.8.3.Final",
|
"keycloakVersion" : "4.8.3.Final",
|
||||||
"userManagedAccessAllowed" : false
|
"userManagedAccessAllowed" : false
|
||||||
|
|
|
@ -1705,7 +1705,9 @@
|
||||||
"resetCredentialsFlow" : "reset credentials",
|
"resetCredentialsFlow" : "reset credentials",
|
||||||
"clientAuthenticationFlow" : "clients",
|
"clientAuthenticationFlow" : "clients",
|
||||||
"dockerAuthenticationFlow" : "docker auth",
|
"dockerAuthenticationFlow" : "docker auth",
|
||||||
"attributes" : { },
|
"attributes" : {
|
||||||
|
"custom_attribute": "custom_value"
|
||||||
|
},
|
||||||
"keycloakVersion" : "9.0.3",
|
"keycloakVersion" : "9.0.3",
|
||||||
"userManagedAccessAllowed" : false
|
"userManagedAccessAllowed" : false
|
||||||
}, {
|
}, {
|
||||||
|
|
Loading…
Reference in a new issue