Skip to content

Commit

Permalink
Merge branch 'devel' into dbeaver/dbeaver-vscode#7-drivers-download
Browse files Browse the repository at this point in the history
  • Loading branch information
Wroud authored Nov 21, 2024
2 parents aeb2394 + b816a6d commit ac00c95
Show file tree
Hide file tree
Showing 76 changed files with 293 additions and 122 deletions.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@ You can see a live demo of CloudBeaver here: https://demo.cloudbeaver.io

## Changelog

### 24.2.5. 2024-11-18
- Updated user storage mechanism: New user logins are now stored in lowercase to prevent duplicate entries (e.g., "ADMIN" and "admin"). Note: This update does not affect previously created user logins;
- A new setting in Global Preferences was added to restrict data import for non-admin users.

### 24.2.4. 2024-11-04
- General:
- Data export: Added the ability to export JSON values as embedded JSON;
Expand Down
4 changes: 2 additions & 2 deletions server/bundles/io.cloudbeaver.model/META-INF/MANIFEST.MF
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ Bundle-ManifestVersion: 2
Bundle-Vendor: DBeaver Corp
Bundle-Name: Cloudbeaver Web Model
Bundle-SymbolicName: io.cloudbeaver.model;singleton:=true
Bundle-Version: 1.0.65.qualifier
Bundle-Release-Date: 20241118
Bundle-Version: 1.0.66.qualifier
Bundle-Release-Date: 20241202
Bundle-RequiredExecutionEnvironment: JavaSE-17
Bundle-ActivationPolicy: lazy
Bundle-ClassPath: .
Expand Down
2 changes: 1 addition & 1 deletion server/bundles/io.cloudbeaver.model/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<relativePath>../</relativePath>
</parent>
<artifactId>io.cloudbeaver.model</artifactId>
<version>1.0.65-SNAPSHOT</version>
<version>1.0.66-SNAPSHOT</version>
<packaging>eclipse-plugin</packaging>

</project>
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
import graphql.language.SourceLocation;
import org.jkiss.dbeaver.DBException;
import org.jkiss.dbeaver.model.sql.SQLState;
import org.jkiss.dbeaver.utils.GeneralUtils;
import org.jkiss.utils.CommonUtils;

import java.io.PrintWriter;
Expand Down Expand Up @@ -100,7 +99,7 @@ public ErrorClassification getErrorType() {
@Override
public Map<String, Object> getExtensions() {
StringWriter buf = new StringWriter();
GeneralUtils.getRootCause(this).printStackTrace(new PrintWriter(buf, true));
CommonUtils.getRootCause(this).printStackTrace(new PrintWriter(buf, true));

Map<String, Object> extensions = new LinkedHashMap<>();
String stString = buf.toString();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ public class WebAuthProviderDescriptor extends AbstractDescriptor {
private final boolean trusted;
private final boolean isPrivate;
private final boolean isAuthHidden;
private final boolean isCaseInsensitive;
private final String[] requiredFeatures;
private final boolean isRequired;
private final String[] types;
Expand All @@ -69,6 +70,7 @@ public WebAuthProviderDescriptor(IConfigurationElement cfg) {
this.isPrivate = CommonUtils.toBoolean(cfg.getAttribute("private"));
this.isRequired = CommonUtils.toBoolean(cfg.getAttribute("required"));
this.isAuthHidden = CommonUtils.toBoolean(cfg.getAttribute("authHidden"));
this.isCaseInsensitive = CommonUtils.toBoolean(cfg.getAttribute("caseInsensitive"));

for (IConfigurationElement cfgElement : cfg.getChildren("configuration")) {
List<WebAuthProviderProperty> properties = WebAuthProviderRegistry.readProperties(cfgElement);
Expand Down Expand Up @@ -132,6 +134,10 @@ public boolean isAuthHidden() {
return isAuthHidden;
}

public boolean isCaseInsensitive() {
return isCaseInsensitive;
}

public List<WebAuthProviderProperty> getConfigurationParameters() {
return new ArrayList<>(configurationParameters.values());
}
Expand Down
4 changes: 2 additions & 2 deletions server/bundles/io.cloudbeaver.product.ce/META-INF/MANIFEST.MF
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ Bundle-ManifestVersion: 2
Bundle-Vendor: DBeaver Corp
Bundle-Name: Cloudbeaver Community Product
Bundle-SymbolicName: io.cloudbeaver.product.ce;singleton:=true
Bundle-Version: 24.2.5.qualifier
Bundle-Release-Date: 20241118
Bundle-Version: 24.3.0.qualifier
Bundle-Release-Date: 20241202
Bundle-RequiredExecutionEnvironment: JavaSE-17
Bundle-ActivationPolicy: lazy
Bundle-ClassPath: .
Expand Down
2 changes: 1 addition & 1 deletion server/bundles/io.cloudbeaver.product.ce/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<relativePath>../</relativePath>
</parent>
<artifactId>io.cloudbeaver.product.ce</artifactId>
<version>24.2.5-SNAPSHOT</version>
<version>24.3.0-SNAPSHOT</version>
<packaging>eclipse-plugin</packaging>

</project>
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: Base JDBC drivers
Bundle-SymbolicName: io.cloudbeaver.resources.drivers.base;singleton:=true
Bundle-Version: 1.0.110.qualifier
Bundle-Release-Date: 20241118
Bundle-Version: 1.0.111.qualifier
Bundle-Release-Date: 20241202
Bundle-Vendor: DBeaver Corp
Bundle-ActivationPolicy: lazy
Automatic-Module-Name: io.cloudbeaver.resources.drivers.base
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@
<relativePath>../</relativePath>
</parent>
<artifactId>io.cloudbeaver.resources.drivers.base</artifactId>
<version>1.0.110-SNAPSHOT</version>
<version>1.0.111-SNAPSHOT</version>
<packaging>eclipse-plugin</packaging>
</project>
4 changes: 2 additions & 2 deletions server/bundles/io.cloudbeaver.server/META-INF/MANIFEST.MF
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ Bundle-ManifestVersion: 2
Bundle-Vendor: DBeaver Corp
Bundle-Name: Cloudbeaver Web Server
Bundle-SymbolicName: io.cloudbeaver.server;singleton:=true
Bundle-Version: 24.2.5.qualifier
Bundle-Release-Date: 20241118
Bundle-Version: 24.3.0.qualifier
Bundle-Release-Date: 20241202
Bundle-RequiredExecutionEnvironment: JavaSE-17
Bundle-ActivationPolicy: lazy
Bundle-Activator: io.cloudbeaver.server.CBPlatformActivator
Expand Down
2 changes: 1 addition & 1 deletion server/bundles/io.cloudbeaver.server/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<relativePath>../</relativePath>
</parent>
<artifactId>io.cloudbeaver.server</artifactId>
<version>24.2.5-SNAPSHOT</version>
<version>24.3.0-SNAPSHOT</version>
<packaging>eclipse-plugin</packaging>

</project>
Original file line number Diff line number Diff line change
Expand Up @@ -529,7 +529,7 @@ public synchronized void finishConfiguration(
}

if (isConfigurationMode()) {
finishSecurityServiceConfiguration(adminName, adminPassword, authInfoList);
finishSecurityServiceConfiguration(adminName.toLowerCase(), adminPassword, authInfoList);
}

// Save runtime configuration
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@

public class CBAbstractWebSocket extends Session.Listener.AbstractAutoDemanding {
private static final Log log = Log.getLog(CBAbstractWebSocket.class);
protected static final Gson gson = WSUtils.gson;
protected static final Gson gson = WSUtils.clientGson;

public void handleEvent(WSEvent event) {
if (!isOpen()) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ Bundle-ManifestVersion: 2
Bundle-Vendor: DBeaver Corp
Bundle-Name: Cloudbeaver Web Service - Administration
Bundle-SymbolicName: io.cloudbeaver.service.admin;singleton:=true
Bundle-Version: 1.0.109.qualifier
Bundle-Release-Date: 20241118
Bundle-Version: 1.0.110.qualifier
Bundle-Release-Date: 20241202
Bundle-RequiredExecutionEnvironment: JavaSE-17
Bundle-ActivationPolicy: lazy
Bundle-ClassPath: .
Expand Down
2 changes: 1 addition & 1 deletion server/bundles/io.cloudbeaver.service.admin/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<relativePath>../</relativePath>
</parent>
<artifactId>io.cloudbeaver.service.admin</artifactId>
<version>1.0.109-SNAPSHOT</version>
<version>1.0.110-SNAPSHOT</version>
<packaging>eclipse-plugin</packaging>

</project>
Original file line number Diff line number Diff line change
Expand Up @@ -161,12 +161,13 @@ public AdminUserInfo createUser(
if (userName.isEmpty()) {
throw new DBWebException("Empty user name");
}
webSession.addInfoMessage("Create new user - " + userName);
String userId = userName.toLowerCase();
webSession.addInfoMessage("Create new user - " + userId);

try {
var securityController = webSession.getAdminSecurityController();
securityController.createUser(userName, Map.of(), enabled, authRole);
var smUser = securityController.getUserById(userName);
securityController.createUser(userId, Map.of(), enabled, authRole);
var smUser = securityController.getUserById(userId);
return new AdminUserInfo(webSession, new WebUser(smUser));
} catch (Exception e) {
throw new DBWebException("Error creating new user", e);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ Bundle-ManifestVersion: 2
Bundle-Vendor: DBeaver Corp
Bundle-Name: Cloudbeaver Web Service - Authentication
Bundle-SymbolicName: io.cloudbeaver.service.auth;singleton:=true
Bundle-Version: 1.0.109.qualifier
Bundle-Release-Date: 20241118
Bundle-Version: 1.0.110.qualifier
Bundle-Release-Date: 20241202
Bundle-RequiredExecutionEnvironment: JavaSE-17
Bundle-ActivationPolicy: lazy
Bundle-ClassPath: .
Expand Down
2 changes: 1 addition & 1 deletion server/bundles/io.cloudbeaver.service.auth/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<relativePath>../</relativePath>
</parent>
<artifactId>io.cloudbeaver.service.auth</artifactId>
<version>1.0.109-SNAPSHOT</version>
<version>1.0.110-SNAPSHOT</version>
<packaging>eclipse-plugin</packaging>

</project>
Original file line number Diff line number Diff line change
Expand Up @@ -98,9 +98,13 @@ public void reverseProxyAuthentication(@NotNull HttpServletRequest request, @Not
String firstName = request.getHeader(resolveParam(paramConfigMap.get(RPConstants.PARAM_FIRST_NAME), RPAuthProvider.X_FIRST_NAME));
String lastName = request.getHeader(resolveParam(paramConfigMap.get(RPConstants.PARAM_LAST_NAME), RPAuthProvider.X_LAST_NAME));
String fullName = request.getHeader(resolveParam(paramConfigMap.get(RPConstants.PARAM_FULL_NAME), RPAuthProvider.X_FULL_NAME));
String logoutUrl = Objects.requireNonNull(configuration).getParameter(RPConstants.PARAM_LOGOUT_URL);
String teamDelimiter = resolveParam(JSONUtils.getString(configuration.getParameters(),
RPConstants.PARAM_TEAM_DELIMITER), "\\|");
String logoutUrl = null;
String teamDelimiter = DEFAULT_TEAM_DELIMITER;
if (configuration != null) {
logoutUrl = configuration.getParameter(RPConstants.PARAM_LOGOUT_URL);
teamDelimiter = resolveParam(JSONUtils.getString(configuration.getParameters(),
RPConstants.PARAM_TEAM_DELIMITER), DEFAULT_TEAM_DELIMITER);
}
List<String> userTeams = teams == null ? null : (teams.isEmpty() ? List.of() : List.of(teams.split(teamDelimiter)));
if (userName != null) {
try {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ Bundle-ManifestVersion: 2
Bundle-Vendor: DBeaver Corp
Bundle-Name: Cloudbeaver Web Service - Data Transfer
Bundle-SymbolicName: io.cloudbeaver.service.data.transfer;singleton:=true
Bundle-Version: 1.0.110.qualifier
Bundle-Release-Date: 20241118
Bundle-Version: 1.0.111.qualifier
Bundle-Release-Date: 20241202
Bundle-RequiredExecutionEnvironment: JavaSE-17
Bundle-ActivationPolicy: lazy
Bundle-ClassPath: .
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<relativePath>../</relativePath>
</parent>
<artifactId>io.cloudbeaver.service.data.transfer</artifactId>
<version>1.0.110-SNAPSHOT</version>
<version>1.0.111-SNAPSHOT</version>
<packaging>eclipse-plugin</packaging>

</project>
Original file line number Diff line number Diff line change
Expand Up @@ -362,7 +362,7 @@ private void importData(
processorInstance,
properties);
DatabaseMappingContainer databaseMappingContainer =
new DatabaseMappingContainer(databaseConsumerSettings, producer.getDatabaseObject());
new DatabaseMappingContainer(monitor, databaseConsumerSettings, producer.getDatabaseObject(), consumer.getTargetObject());
databaseMappingContainer.getAttributeMappings(monitor);
databaseMappingContainer.setTarget(dataContainer);
consumer.setContainerMapping(databaseMappingContainer);
Expand Down
4 changes: 2 additions & 2 deletions server/bundles/io.cloudbeaver.service.fs/META-INF/MANIFEST.MF
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ Bundle-ManifestVersion: 2
Bundle-Vendor: DBeaver Corp
Bundle-Name: Cloudbeaver Web Service - File System
Bundle-SymbolicName: io.cloudbeaver.service.fs;singleton:=true
Bundle-Version: 1.0.27.qualifier
Bundle-Release-Date: 20241118
Bundle-Version: 1.0.28.qualifier
Bundle-Release-Date: 20241202
Bundle-RequiredExecutionEnvironment: JavaSE-17
Bundle-ActivationPolicy: lazy
Bundle-ClassPath: .
Expand Down
2 changes: 1 addition & 1 deletion server/bundles/io.cloudbeaver.service.fs/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<relativePath>../</relativePath>
</parent>
<artifactId>io.cloudbeaver.service.fs</artifactId>
<version>1.0.27-SNAPSHOT</version>
<version>1.0.28-SNAPSHOT</version>
<packaging>eclipse-plugin</packaging>

</project>
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@
import org.jkiss.dbeaver.DBException;
import org.jkiss.dbeaver.model.data.json.JSONUtils;
import org.jkiss.dbeaver.model.navigator.fs.DBNPathBase;
import org.jkiss.dbeaver.utils.GeneralUtils;
import org.jkiss.utils.CommonUtils;
import org.jkiss.utils.IOUtils;

Expand Down Expand Up @@ -100,7 +99,7 @@ private void doPost(WebSession session, HttpServletRequest request, HttpServletR
}
} catch (Exception e) {
throw new DBWebException("File Upload Failed: Unable to Save File to the File System",
GeneralUtils.getRootCause(e));
CommonUtils.getRootCause(e));
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ Bundle-ManifestVersion: 2
Bundle-Vendor: DBeaver Corp
Bundle-Name: Cloudbeaver Web Service - Metadata
Bundle-SymbolicName: io.cloudbeaver.service.metadata;singleton:=true
Bundle-Version: 1.0.113.qualifier
Bundle-Release-Date: 20241118
Bundle-Version: 1.0.114.qualifier
Bundle-Release-Date: 20241202
Bundle-RequiredExecutionEnvironment: JavaSE-17
Bundle-ActivationPolicy: lazy
Bundle-ClassPath: .
Expand Down
2 changes: 1 addition & 1 deletion server/bundles/io.cloudbeaver.service.metadata/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<relativePath>../</relativePath>
</parent>
<artifactId>io.cloudbeaver.service.metadata</artifactId>
<version>1.0.113-SNAPSHOT</version>
<version>1.0.114-SNAPSHOT</version>
<packaging>eclipse-plugin</packaging>

</project>
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ Bundle-ManifestVersion: 2
Bundle-Vendor: DBeaver Corp
Bundle-Name: Cloudbeaver Resource manager NIO implementation
Bundle-SymbolicName: io.cloudbeaver.service.rm.nio;singleton:=true
Bundle-Version: 1.0.27.qualifier
Bundle-Release-Date: 20241118
Bundle-Version: 1.0.28.qualifier
Bundle-Release-Date: 20241202
Bundle-RequiredExecutionEnvironment: JavaSE-17
Bundle-ActivationPolicy: lazy
Bundle-ClassPath: .
Expand Down
2 changes: 1 addition & 1 deletion server/bundles/io.cloudbeaver.service.rm.nio/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<relativePath>../</relativePath>
</parent>
<artifactId>io.cloudbeaver.service.rm.nio</artifactId>
<version>1.0.27-SNAPSHOT</version>
<version>1.0.28-SNAPSHOT</version>
<packaging>eclipse-plugin</packaging>

</project>
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@

import java.net.URI;
import java.nio.file.Path;
import java.util.List;

public class RMVirtualFileSystem extends AbstractVirtualFileSystem {
@NotNull
Expand Down Expand Up @@ -83,7 +84,7 @@ public Path getPathByURI(@NotNull DBRProgressMonitor monitor, @NotNull URI uri)

@NotNull
@Override
public DBFVirtualFileSystemRoot[] getRootFolders(DBRProgressMonitor monitor) throws DBException {
return new RMVirtualFileSystemRoot[]{new RMVirtualFileSystemRoot(this, rmProject, rmNioFileSystemProvider)};
public List<? extends DBFVirtualFileSystemRoot> getRootFolders(DBRProgressMonitor monitor) throws DBException {
return List.of(new RMVirtualFileSystemRoot(this, rmProject, rmNioFileSystemProvider));
}
}
4 changes: 2 additions & 2 deletions server/bundles/io.cloudbeaver.service.rm/META-INF/MANIFEST.MF
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ Bundle-ManifestVersion: 2
Bundle-Vendor: DBeaver Corp
Bundle-Name: Cloudbeaver Web Service - Resource manager
Bundle-SymbolicName: io.cloudbeaver.service.rm;singleton:=true
Bundle-Version: 1.0.62.qualifier
Bundle-Release-Date: 20241118
Bundle-Version: 1.0.63.qualifier
Bundle-Release-Date: 20241202
Bundle-RequiredExecutionEnvironment: JavaSE-17
Bundle-ActivationPolicy: lazy
Bundle-ClassPath: .
Expand Down
2 changes: 1 addition & 1 deletion server/bundles/io.cloudbeaver.service.rm/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<relativePath>../</relativePath>
</parent>
<artifactId>io.cloudbeaver.service.rm</artifactId>
<version>1.0.62-SNAPSHOT</version>
<version>1.0.63-SNAPSHOT</version>
<packaging>eclipse-plugin</packaging>

</project>
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ Bundle-ManifestVersion: 2
Bundle-Name: Cloudbeaver Web Service - Security
Bundle-Vendor: DBeaver Corp
Bundle-SymbolicName: io.cloudbeaver.service.security;singleton:=true
Bundle-Version: 1.0.65.qualifier
Bundle-Release-Date: 20241118
Bundle-Version: 1.0.66.qualifier
Bundle-Release-Date: 20241202
Bundle-RequiredExecutionEnvironment: JavaSE-17
Bundle-ActivationPolicy: lazy
Bundle-ClassPath: .
Expand Down
1 change: 1 addition & 0 deletions server/bundles/io.cloudbeaver.service.security/plugin.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
<plugin>
<extension point="org.jkiss.dbeaver.auth.provider">
<authProvider id="local" label="Local"
caseInsensitive="true"
description="Local name/password based authentication"
class="io.cloudbeaver.auth.provider.local.LocalAuthProvider"
icon="platform:/plugin/org.jkiss.dbeaver.model/icons/tree/key.png">
Expand Down
2 changes: 1 addition & 1 deletion server/bundles/io.cloudbeaver.service.security/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<relativePath>../</relativePath>
</parent>
<artifactId>io.cloudbeaver.service.security</artifactId>
<version>1.0.65-SNAPSHOT</version>
<version>1.0.66-SNAPSHOT</version>
<packaging>eclipse-plugin</packaging>

</project>
Loading

0 comments on commit ac00c95

Please sign in to comment.