diff --git a/README.md b/README.md index 7127c95dc0..fecb8e19a2 100644 --- a/README.md +++ b/README.md @@ -22,6 +22,14 @@ You can see live demo of CloudBeaver here: https://demo.cloudbeaver.io ## Changelog +### 23.3.4. 2024-02-05 +- Text wrap is activated by default for texts and BLOBs in the Values panel for better visibility. User can switch to the one-line mode using a button on the toolbar; +- Added the ability to edit the default preferences of the following parts: interface, tools and data viewer in the settings panel in the administrative part; +- Added ability to configure reverse proxy header name and redirect URL at logout. Admin will now be able to configure all settings; +- Update PostgreSQL driver to 42.5.2; +- Added the ability to display the OpenStreetMap layer with the default coordinate system ESPG 4326; +- ClickHouse Legacy driver has been removed to prevent potential vulnerability issues; +- Different bug fixes and enhancements have been made. ### 23.3.3. 2024-01-22 - Added password policy for the local authorization. Password parameters can be set in the configuration file; diff --git a/server/bundles/io.cloudbeaver.service.security/db/cb_schema_update_11.sql b/server/bundles/io.cloudbeaver.service.security/db/cb_schema_update_11.sql index 34d76049b9..71dfd179e9 100644 --- a/server/bundles/io.cloudbeaver.service.security/db/cb_schema_update_11.sql +++ b/server/bundles/io.cloudbeaver.service.security/db/cb_schema_update_11.sql @@ -1,6 +1,6 @@ -ALTER TABLE {table_prefix}CB_AUTH_TOKEN ADD COLUMN AUTH_ROLE VARCHAR(32); +ALTER TABLE {table_prefix}CB_AUTH_TOKEN ADD AUTH_ROLE VARCHAR(32); -ALTER TABLE {table_prefix}CB_USER ADD COLUMN DEFAULT_AUTH_ROLE VARCHAR(32) NULL; +ALTER TABLE {table_prefix}CB_USER ADD DEFAULT_AUTH_ROLE VARCHAR(32) NULL; CREATE TABLE {table_prefix}CB_TEAM ( diff --git a/server/bundles/io.cloudbeaver.service.security/db/cb_schema_update_13.sql b/server/bundles/io.cloudbeaver.service.security/db/cb_schema_update_13.sql index 200cc664ea..f76655eee0 100644 --- a/server/bundles/io.cloudbeaver.service.security/db/cb_schema_update_13.sql +++ b/server/bundles/io.cloudbeaver.service.security/db/cb_schema_update_13.sql @@ -1,2 +1,2 @@ ALTER TABLE {table_prefix}CB_USER_SECRETS - ADD COLUMN ENCODING_TYPE VARCHAR(32) DEFAULT 'PLAINTEXT' NOT NULL; \ No newline at end of file + ADD ENCODING_TYPE VARCHAR(32) DEFAULT 'PLAINTEXT' NOT NULL; \ No newline at end of file diff --git a/server/bundles/io.cloudbeaver.service.security/db/cb_schema_update_14.sql b/server/bundles/io.cloudbeaver.service.security/db/cb_schema_update_14.sql index 39927e4dd4..743f481099 100644 --- a/server/bundles/io.cloudbeaver.service.security/db/cb_schema_update_14.sql +++ b/server/bundles/io.cloudbeaver.service.security/db/cb_schema_update_14.sql @@ -1,2 +1,2 @@ ALTER TABLE {table_prefix}CB_AUTH_ATTEMPT - ADD COLUMN IS_MAIN_AUTH CHAR(1) DEFAULT 'Y' NOT NULL; \ No newline at end of file + ADD IS_MAIN_AUTH CHAR(1) DEFAULT 'Y' NOT NULL; \ No newline at end of file diff --git a/server/bundles/io.cloudbeaver.service.security/db/cb_schema_update_15.sql b/server/bundles/io.cloudbeaver.service.security/db/cb_schema_update_15.sql index 50324a3188..4f1add7d8f 100644 --- a/server/bundles/io.cloudbeaver.service.security/db/cb_schema_update_15.sql +++ b/server/bundles/io.cloudbeaver.service.security/db/cb_schema_update_15.sql @@ -1,2 +1,2 @@ ALTER TABLE {table_prefix}CB_AUTH_ATTEMPT - ADD COLUMN AUTH_USERNAME VARCHAR(128) NULL; \ No newline at end of file + ADD AUTH_USERNAME VARCHAR(128) NULL; \ No newline at end of file diff --git a/server/bundles/io.cloudbeaver.service.security/db/cb_schema_update_16.sql b/server/bundles/io.cloudbeaver.service.security/db/cb_schema_update_16.sql index 42e350c4c2..71db4cc431 100644 --- a/server/bundles/io.cloudbeaver.service.security/db/cb_schema_update_16.sql +++ b/server/bundles/io.cloudbeaver.service.security/db/cb_schema_update_16.sql @@ -26,4 +26,4 @@ SELECT USER_ID, SECRET_ID, SECRET_VALUE, ENCODING_TYPE, UPDATE_TIME, UPDATE_TIME DROP TABLE {table_prefix}CB_USER_SECRETS; ALTER TABLE {table_prefix}CB_AUTH_SUBJECT - ADD COLUMN IS_SECRET_STORAGE CHAR(1) DEFAULT 'Y' NOT NULL; \ No newline at end of file + ADD IS_SECRET_STORAGE CHAR(1) DEFAULT 'Y' NOT NULL; \ No newline at end of file diff --git a/server/bundles/io.cloudbeaver.service.security/src/io/cloudbeaver/service/security/CBEmbeddedSecurityController.java b/server/bundles/io.cloudbeaver.service.security/src/io/cloudbeaver/service/security/CBEmbeddedSecurityController.java index bd1491b9b0..b40c620e01 100644 --- a/server/bundles/io.cloudbeaver.service.security/src/io/cloudbeaver/service/security/CBEmbeddedSecurityController.java +++ b/server/bundles/io.cloudbeaver.service.security/src/io/cloudbeaver/service/security/CBEmbeddedSecurityController.java @@ -1410,10 +1410,12 @@ private String createNewAuthAttempt( String authAttemptId = UUID.randomUUID().toString(); try (Connection dbCon = database.openConnection()) { try (JDBCTransaction txn = new JDBCTransaction(dbCon)) { - if (smConfig.isCheckBruteforce() - && this.getAuthProvider(authProviderId).getInstance() instanceof SMBruteForceProtected bruteforceProtected) { - BruteForceUtils.checkBruteforce(smConfig, - getLatestUserLogins(dbCon, authProviderId, bruteforceProtected.getInputUsername(authData).toString())); + if (smConfig.isCheckBruteforce() && this.getAuthProvider(authProviderId).getInstance() instanceof SMBruteForceProtected bruteforceProtected) { + Object inputUsername = bruteforceProtected.getInputUsername(authData); + if (inputUsername != null) { + BruteForceUtils.checkBruteforce(smConfig, + getLatestUserLogins(dbCon, authProviderId, inputUsername.toString())); + } } try (PreparedStatement dbStat = dbCon.prepareStatement( database.normalizeTableNames( @@ -1435,7 +1437,12 @@ private String createNewAuthAttempt( } dbStat.setString(7, isMainSession ? CHAR_BOOL_TRUE : CHAR_BOOL_FALSE); if (this.getAuthProvider(authProviderId).getInstance() instanceof SMBruteForceProtected bruteforceProtected) { - dbStat.setString(8, bruteforceProtected.getInputUsername(authData).toString()); + Object inputUsername = bruteforceProtected.getInputUsername(authData); + if (inputUsername != null) { + dbStat.setString(8, inputUsername.toString()); + } else { + dbStat.setString(8, null); + } } else { dbStat.setString(8, null); } diff --git a/server/bundles/io.cloudbeaver.service.security/src/io/cloudbeaver/service/security/db/CBDatabase.java b/server/bundles/io.cloudbeaver.service.security/src/io/cloudbeaver/service/security/db/CBDatabase.java index 5cddbba56a..b1255969d6 100644 --- a/server/bundles/io.cloudbeaver.service.security/src/io/cloudbeaver/service/security/db/CBDatabase.java +++ b/server/bundles/io.cloudbeaver.service.security/src/io/cloudbeaver/service/security/db/CBDatabase.java @@ -73,7 +73,7 @@ public class CBDatabase { public static final String SCHEMA_UPDATE_SQL_PATH = "db/cb_schema_update_"; private static final int LEGACY_SCHEMA_VERSION = 1; - private static final int CURRENT_SCHEMA_VERSION = 17; + private static final int CURRENT_SCHEMA_VERSION = 16; private static final String DEFAULT_DB_USER_NAME = "cb-data"; private static final String DEFAULT_DB_PWD_FILE = ".database-credentials.dat"; diff --git a/webapp/packages/plugin-sql-editor/src/SqlEditor.tsx b/webapp/packages/plugin-sql-editor/src/SqlEditor.tsx index 83a0671135..4a9778d3de 100644 --- a/webapp/packages/plugin-sql-editor/src/SqlEditor.tsx +++ b/webapp/packages/plugin-sql-editor/src/SqlEditor.tsx @@ -41,11 +41,11 @@ export const SqlEditor = observer(function SqlEditor({ state }) { - + - + diff --git a/webapp/packages/plugin-sql-editor/src/SqlEditor/SqlEditor.tsx b/webapp/packages/plugin-sql-editor/src/SqlEditor/SqlEditor.tsx index 566fa1f50b..b7f7b9a034 100644 --- a/webapp/packages/plugin-sql-editor/src/SqlEditor/SqlEditor.tsx +++ b/webapp/packages/plugin-sql-editor/src/SqlEditor/SqlEditor.tsx @@ -79,10 +79,9 @@ export const SqlEditor = observer(function SqlEditor({ state, c useEffect(() => { if (isEditorEmpty) { - split.fixate('maximize', true); + split.state.setDisable(true); } else if (split.state.disable) { - split.fixate('resize', false); - split.state.setSize(-1); + split.state.setDisable(false); } }, [isEditorEmpty]);