-
Notifications
You must be signed in to change notification settings - Fork 392
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'devel' into CB-4956-federated-authorization-is-not-alwa…
…ys-successful
- Loading branch information
Showing
41 changed files
with
725 additions
and
164 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 \ | ||
|
@@ -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"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
|
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
79 changes: 79 additions & 0 deletions
79
...les/io.cloudbeaver.model/src/io/cloudbeaver/auth/provider/fa/AbstractSessionExternal.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 14 additions & 0 deletions
14
server/bundles/io.cloudbeaver.service.ldap.auth/META-INF/MANIFEST.MF
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
5 changes: 5 additions & 0 deletions
5
server/bundles/io.cloudbeaver.service.ldap.auth/build.properties
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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
31
server/bundles/io.cloudbeaver.service.ldap.auth/plugin.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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> |
Oops, something went wrong.