Skip to content

Commit

Permalink
Merge branch 'devel' into CB-4956-federated-authorization-is-not-alwa…
Browse files Browse the repository at this point in the history
…ys-successful
  • Loading branch information
dariamarutkina authored May 20, 2024
2 parents cca4b48 + 72ce16b commit c8b53e2
Show file tree
Hide file tree
Showing 41 changed files with 725 additions and 164 deletions.
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,16 @@ You can see live demo of CloudBeaver here: https://demo.cloudbeaver.io

## Changelog

### 24.0.5. 2024-05-20
- The process of application update was improved - you can track the application update process now;
- All popup dialogs became available for screen readers, including JAWS, to improve the experience for users with disabilities;
- Data Editor:
- Large text values (more than 100 Kb) are now automatically opened in the Value panel;
- DuckDB:
- Spatial data visualization support was added;
- The driver has been updated to version 0.10.2;
- Different bug fixes and enhancements have been made.

### 24.0.4. 2024-05-06
- Added the ability to stop the process of file upload in the table;
- Row count calculation in the grid can be cancelled for Data Editor and SQL Editor;
Expand Down
11 changes: 3 additions & 8 deletions deploy/docker/Dockerfile → deploy/docker/base-java/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,11 @@ FROM ubuntu:23.10

MAINTAINER DBeaver Corp, [email protected]

ENV DEBIAN_FRONTEND=noninteractive

RUN set -eux; \
apt-get update; \
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
apt-get install -y --no-install-recommends \
# curl required for historical reasons, see https://github.com/adoptium/containers/issues/255
curl \
wget \
Expand Down Expand Up @@ -43,10 +45,3 @@ RUN set -eux; \

### Patch java security
COPY java.security* ${JAVA_HOME}/conf/security/java.security

COPY cloudbeaver /opt/cloudbeaver

EXPOSE 8978
RUN find /opt/cloudbeaver -type d -exec chmod 775 {} \;
WORKDIR /opt/cloudbeaver/
ENTRYPOINT ["./run-server.sh"]
10 changes: 10 additions & 0 deletions deploy/docker/cloudbeaver-ce/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
FROM dbeaver/base-java

MAINTAINER DBeaver Corp, [email protected]

COPY cloudbeaver /opt/cloudbeaver

EXPOSE 8978
RUN find /opt/cloudbeaver -type d -exec chmod 775 {} \;
WORKDIR /opt/cloudbeaver/
ENTRYPOINT ["./run-server.sh"]
File renamed without changes.
2 changes: 1 addition & 1 deletion deploy/docker/make-docker-container.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
cd ..
docker build -t dbeaver/cloudbeaver:dev . --file ./docker/Dockerfile
docker build -t dbeaver/cloudbeaver:dev . --file ./docker/cloudbeaver-ce/Dockerfile

10 changes: 0 additions & 10 deletions deploy/supervisor/cloudbeaver.conf

This file was deleted.

1 change: 1 addition & 0 deletions server/bundles/io.cloudbeaver.model/META-INF/MANIFEST.MF
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ Require-Bundle: org.jkiss.dbeaver.data.gis;visibility:=reexport,
Export-Package: io.cloudbeaver,
io.cloudbeaver.auth,
io.cloudbeaver.auth.provider,
io.cloudbeaver.auth.provider.fa,
io.cloudbeaver.auth.provider.local,
io.cloudbeaver.auth.provisioning,
io.cloudbeaver.websocket,
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
/*
* DBeaver - Universal Database Manager
* Copyright (C) 2010-2024 DBeaver Corp and others
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package io.cloudbeaver.auth.provider.fa;

import org.jkiss.code.NotNull;
import org.jkiss.code.Nullable;
import org.jkiss.dbeaver.model.auth.*;

import java.time.LocalDateTime;
import java.util.Map;

public abstract class AbstractSessionExternal implements SMSessionExternal {

@NotNull
protected final Map<String, Object> authParameters;
@NotNull
protected final SMSession parentSession;
@NotNull
protected final SMAuthSpace space;

protected AbstractSessionExternal(
@NotNull SMSession parentSession,
@NotNull SMAuthSpace space,
@NotNull Map<String, Object> authParameters
) {
this.parentSession = parentSession;
this.space = space;
this.authParameters = authParameters;
}

@NotNull
@Override
public SMAuthSpace getSessionSpace() {
return space;
}

@NotNull
@Override
public SMSessionContext getSessionContext() {
return this.parentSession.getSessionContext();
}

@Nullable
@Override
public SMSessionPrincipal getSessionPrincipal() {
return parentSession.getSessionPrincipal();
}

@NotNull
@Override
public LocalDateTime getSessionStart() {
return parentSession.getSessionStart();
}

@Override
public void close() {
// do nothing
}

@Override
public Map<String, Object> getAuthParameters() {
return authParameters;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
import org.jkiss.dbeaver.model.auth.SMCredentialsProvider;
import org.jkiss.dbeaver.model.auth.SMSessionContext;
import org.jkiss.dbeaver.model.data.json.JSONUtils;
import org.jkiss.dbeaver.model.impl.app.ApplicationRegistry;
import org.jkiss.dbeaver.model.rm.RMController;
import org.jkiss.dbeaver.model.rm.RMProject;
import org.jkiss.dbeaver.model.secret.DBSSecretController;
Expand Down Expand Up @@ -248,8 +249,13 @@ public synchronized String getApplicationInstanceId() throws DBException {
if (instanceId == null) {
try {
byte[] macAddress = RuntimeUtils.getLocalMacAddress();
// workspace id from is read from property file
instanceId = BaseWorkspaceImpl.readWorkspaceIdProperty() + "_" + CommonUtils.toHexString(macAddress);
instanceId = String.join(
"_",
ApplicationRegistry.getInstance().getApplication().getId(),
BaseWorkspaceImpl.readWorkspaceIdProperty(), // workspace id is read from property file
CommonUtils.toHexString(macAddress),
CommonUtils.toString(getServerPort())
);
} catch (Exception e) {
throw new DBException("Error during generation instance id generation", e);
}
Expand Down
1 change: 1 addition & 0 deletions server/bundles/io.cloudbeaver.server/META-INF/MANIFEST.MF
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ Export-Package: io.cloudbeaver,
io.cloudbeaver.server.events,
io.cloudbeaver.server,
io.cloudbeaver.server.actions,
io.cloudbeaver.server.jobs,
io.cloudbeaver.server.servlets,
io.cloudbeaver.service,
io.cloudbeaver.service.navigator,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ public void handleEvent(@NotNull EVENT event) {
break;
case USER_DELETED:
if (event instanceof WSUserDeletedEvent userDeletedEvent) {
sessionManager.closeUserSession(userDeletedEvent.getUserId());
sessionManager.closeUserSession(userDeletedEvent.getDeletedUserId());
}
break;
default:
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Vendor: Cloudbeaver LDAP
Bundle-Vendor: DBeaver Corp
Bundle-SymbolicName: io.cloudbeaver.service.ldap.auth;singleton:=true
Bundle-Version: 1.0.0.qualifier
Bundle-Release-Date: 20240506
Bundle-RequiredExecutionEnvironment: JavaSE-17
Bundle-ActivationPolicy: lazy
Bundle-ClassPath: .
Require-Bundle: org.jkiss.dbeaver.model;visibility:=reexport,
org.jkiss.dbeaver.registry;visibility:=reexport,
io.cloudbeaver.model
Automatic-Module-Name: io.cloudbeaver.service.ldap.auth
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
source.. = src/
output.. = target/classes/
bin.includes = .,\
META-INF/,\
plugin.xml
31 changes: 31 additions & 0 deletions server/bundles/io.cloudbeaver.service.ldap.auth/plugin.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
<?xml version="1.0" encoding="UTF-8"?>
<?eclipse version="3.2"?>

<plugin>
<extension point="org.jkiss.dbeaver.auth.provider">
<authProvider id="ldap" label="LDAP" description="LDAP authentication provider"
configurable="true"
class="io.cloudbeaver.service.ldap.auth.LdapAuthProvider"
icon="platform:/plugin/org.jkiss.dbeaver.model/icons/idp/ldap.png"
>
<configuration>
<propertyGroup label="LDAP" description="LDAP authentication">
<property id="ldap-host" label="Host" type="string" description="LDAP server host" required="true"/>
<property id="ldap-port" label="Port" type="integer" defaultValue="389" required="true" description="LDAP server port, default is 389"/>
<property id="ldap-dn" label="Base Distinguished Name" type="string"
description="Base Distinguished Name applicable for all users, example: dc=myOrg,dc=com"
required="true"
/>
</propertyGroup>
</configuration>
<credentials>
<propertyGroup label="Auth credentials">
<property id="units" label="Unit paths" type="string" description="LDAP unit paths separated by commas. Example ou=unit1,ou=unit2" user="true"/>
<property id="user" label="User name" type="string" description="LDAP user name" user="true"/>
<property id="password" label="User password" type="string" description="LDAP user password"
user="true" encryption="plain"/>
</propertyGroup>
</credentials>
</authProvider>
</extension>
</plugin>
16 changes: 16 additions & 0 deletions server/bundles/io.cloudbeaver.service.ldap.auth/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>io.cloudbeaver</groupId>
<artifactId>bundles</artifactId>
<version>1.0.0-SNAPSHOT</version>
<relativePath>../</relativePath>
</parent>
<artifactId>io.cloudbeaver.service.ldap.auth</artifactId>
<version>1.0.0-SNAPSHOT</version>
<packaging>eclipse-plugin</packaging>

</project>
Loading

0 comments on commit c8b53e2

Please sign in to comment.