Skip to content

Commit

Permalink
Backport to branch(3.12) : Change hard-coded password for Oracle user…
Browse files Browse the repository at this point in the history
… in JDBC adapter (#1784)
  • Loading branch information
brfrn169 authored May 27, 2024
1 parent 5612d7c commit 8b60def
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public class RdbEngineOracle implements RdbEngineStrategy {
@Override
public String[] createNamespaceSqls(String fullNamespace) {
return new String[] {
"CREATE USER " + fullNamespace + " IDENTIFIED BY \"oracle\"",
"CREATE USER " + fullNamespace + " IDENTIFIED BY \"Oracle1234!@#$\"",
"ALTER USER " + fullNamespace + " quota unlimited on USERS",
};
}
Expand Down Expand Up @@ -79,7 +79,7 @@ public String tryAddIfNotExistsToCreateTableSql(String createTableSql) {
@Override
public String[] createMetadataSchemaIfNotExistsSql(String metadataSchema) {
return new String[] {
"CREATE USER " + enclose(metadataSchema) + " IDENTIFIED BY \"oracle\"",
"CREATE USER " + enclose(metadataSchema) + " IDENTIFIED BY \"Oracle1234!@#$\"",
"ALTER USER " + enclose(metadataSchema) + " quota unlimited on USERS",
};
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,7 @@ public void createNamespace_forOracle_shouldExecuteCreateNamespaceStatement()
throws ExecutionException, SQLException {
createNamespace_forX_shouldExecuteCreateNamespaceStatement(
RdbEngine.ORACLE,
"CREATE USER \"my_ns\" IDENTIFIED BY \"oracle\"",
"CREATE USER \"my_ns\" IDENTIFIED BY \"Oracle1234!@#$\"",
"ALTER USER \"my_ns\" quota unlimited on USERS");
}

Expand Down Expand Up @@ -484,7 +484,7 @@ public void createTable_forOracle_shouldExecuteCreateTableStatement()
"ALTER TABLE \"my_ns\".\"foo_table\" INITRANS 3 MAXTRANS 255",
"CREATE INDEX \"index_my_ns_foo_table_c4\" ON \"my_ns\".\"foo_table\" (\"c4\")",
"CREATE INDEX \"index_my_ns_foo_table_c1\" ON \"my_ns\".\"foo_table\" (\"c1\")",
"CREATE USER \"" + tableMetadataSchemaName + "\" IDENTIFIED BY \"oracle\"",
"CREATE USER \"" + tableMetadataSchemaName + "\" IDENTIFIED BY \"Oracle1234!@#$\"",
"ALTER USER \"" + tableMetadataSchemaName + "\" quota unlimited on USERS",
"CREATE TABLE \""
+ tableMetadataSchemaName
Expand Down Expand Up @@ -738,7 +738,7 @@ public void createTable_WithClusteringOrderForOracle_shouldExecuteCreateTableSta
"CREATE UNIQUE INDEX \"my_ns.foo_table_clustering_order_idx\" ON \"my_ns\".\"foo_table\" (\"c3\" ASC,\"c1\" DESC,\"c4\" ASC)",
"CREATE INDEX \"index_my_ns_foo_table_c4\" ON \"my_ns\".\"foo_table\" (\"c4\")",
"CREATE INDEX \"index_my_ns_foo_table_c1\" ON \"my_ns\".\"foo_table\" (\"c1\")",
"CREATE USER \"" + tableMetadataSchemaName + "\" IDENTIFIED BY \"oracle\"",
"CREATE USER \"" + tableMetadataSchemaName + "\" IDENTIFIED BY \"Oracle1234!@#$\"",
"ALTER USER \"" + tableMetadataSchemaName + "\" quota unlimited on USERS",
"CREATE TABLE \""
+ tableMetadataSchemaName
Expand Down Expand Up @@ -1793,7 +1793,7 @@ private void dropIndex_forColumnTypeWithRequiredAlterationForX_ShouldDropIndexPr
RdbEngine.ORACLE,
"SELECT 1 FROM \"my_ns\".\"foo_table\" FETCH FIRST 1 ROWS ONLY",
"SELECT 1 FROM \"" + tableMetadataSchemaName + "\".\"metadata\" FETCH FIRST 1 ROWS ONLY",
"CREATE USER \"" + tableMetadataSchemaName + "\" IDENTIFIED BY \"oracle\"",
"CREATE USER \"" + tableMetadataSchemaName + "\" IDENTIFIED BY \"Oracle1234!@#$\"",
"ALTER USER \"" + tableMetadataSchemaName + "\" quota unlimited on USERS",
"CREATE TABLE \""
+ tableMetadataSchemaName
Expand Down Expand Up @@ -2608,7 +2608,7 @@ private List<String> prepareSqlForCreateSchemaStatements(RdbEngine rdbEngine) {
"CREATE USER "
+ rdbEngineStrategy.enclose(tableMetadataSchemaName)
+ " IDENTIFIED BY "
+ rdbEngineStrategy.enclose("oracle"));
+ rdbEngineStrategy.enclose("Oracle1234!@#$"));
statements.add(
"ALTER USER "
+ rdbEngineStrategy.enclose(tableMetadataSchemaName)
Expand Down

0 comments on commit 8b60def

Please sign in to comment.