Compare commits

..
11 Commits
Author SHA1 Message Date
Aleksandr Skoblikov 4e82eed3e0 CB-4161 validate custom config status 2023-10-24 18:09:46 +02:00
Aleksandr Skoblikov 87f9bd5e49 CB-4161 auth fix 2023-10-24 17:39:38 +02:00
naumov b2fa46097e CB-3998 delete unsupported actions in updateResults 2023-09-12 09:48:11 +02:00
Dmitriy Osipov 6e736bae41 CB-3970: move error handlers closer to components (#1983)
* CB-3970: move error handlers closer to components

* CB-3970: handle errors of opening navNode

* CB-3970 fix: interrupt executor instead of throwing error
2023-09-07 14:43:06 +03:00
Alexey aa288c536b CB-3957 fix: verify change availability flags (#1988) 2023-09-07 14:42:20 +03:00
Alexey a2ebe8bd82 CB-3953 fix: git description message (#1981) 2023-09-04 11:32:23 +03:00
Alexey f1a75898af CB-3951 fix: check query history permissions (#1977) 2023-09-01 15:33:29 +02:00
Alexander SkoblikovandDenis Sinelnikov d3d8983134 CB-2551 additional creds auth (#1975)
* CB-2551. Fixed additional auth for disabled user

* CB-2551. Fixed additional auth for disabled user

* CB-2551. Fixed additional auth for disabled user

---------

Co-authored-by: Denis Sinelnikov <denis.sinelnikov@dbeaver.com>
2023-08-31 18:50:19 +03:00
AlexeyandDaria Marutkina da3f703639 CB-3891 feat: inverse git sync data (#1965)
Co-authored-by: Daria Marutkina <125263541+dariamarutkina@users.noreply.github.com>
2023-08-31 15:42:02 +03:00
Alexander Skoblikov 2ad858ea80 CB-3931 copy params only for test connection (#1973) 2023-08-30 18:11:06 +03:00
Alexander Skoblikov 81c1b67ab7 CB-3935 create project for new users correctly (#1972) 2023-08-30 18:00:44 +03:00
3707 changed files with 47573 additions and 79477 deletions
-35
View File
@@ -1,35 +0,0 @@
// For format details, see https://aka.ms/devcontainer.json. For config options, see the
// README at: https://github.com/devcontainers/templates/tree/main/src/java
{
"name": "Java",
// Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile
"image": "mcr.microsoft.com/devcontainers/java:1-17-bookworm",
"features": {
"ghcr.io/devcontainers/features/java:1": {
"version": "none",
"installMaven": "true",
"installGradle": "false"
},
"ghcr.io/devcontainers/features/github-cli:1": {},
"ghcr.io/devcontainers/features/node:1": {}
},
"hostRequirements": {
"cpus": 8,
"memory": "16gb",
"storage": "64gb"
}
// Use 'forwardPorts' to make a list of ports inside the container available locally.
// "forwardPorts": [],
// Use 'postCreateCommand' to run commands after the container is created.
// "postCreateCommand": "java -version",
// Configure tool-specific properties.
// "customizations": {},
// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
// "remoteUser": "root"
}
@@ -1,4 +1,4 @@
name: validation
name: "Commit Message Validation"
on:
pull_request:
@@ -11,7 +11,7 @@ on:
- edited
- ready_for_review
- labeled
jobs:
commit-message:
uses: dbeaver/dbeaver/.github/workflows/reused-commit-msgs-validator.yml@devel
validate-commit-message:
uses: dbeaver/dbeaver/.github/workflows/reused-commit-msgs-validator.yml@devel
-76
View File
@@ -1,76 +0,0 @@
name: frontend-cache
on:
push:
branches: ["devel"]
paths:
- "webapp/**"
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
jobs:
build_and_test:
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./webapp
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: "18"
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT
- name: restore yarn cache
uses: actions/cache@v3
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: restore node_modules
uses: actions/cache@v3
with:
path: "**/node_modules"
key: ${{ runner.os }}-node_modules-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-node_modules-
- name: restore typescript cache
uses: actions/cache@v3
with:
path: "**/packages/*/dist"
key: ${{ runner.os }}-dist-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-dist-
- name: yarn install
uses: borales/actions-yarn@v4
with:
dir: webapp
cmd: install
- name: yarn lerna bootstrap
uses: borales/actions-yarn@v4
with:
dir: webapp
cmd: lerna bootstrap
- name: build
uses: borales/actions-yarn@v4
with:
dir: webapp/packages/product-default
cmd: build # build tyescript source code
- name: test
uses: borales/actions-yarn@v4
with:
dir: webapp
cmd: lerna run test # build packages that have test script
-29
View File
@@ -1,29 +0,0 @@
name: cleanup caches by a branch
on:
pull_request:
types:
- closed
jobs:
cleanup:
runs-on: ubuntu-latest
steps:
- name: Cleanup
run: |
gh extension install actions/gh-actions-cache
echo "Fetching list of cache key"
cacheKeysForPR=$(gh actions-cache list -R $REPO -B $BRANCH -L 100 | cut -f 1 )
## Setting this to not fail the workflow while deleting cache keys.
set +e
echo "Deleting caches..."
for cacheKey in $cacheKeysForPR
do
gh actions-cache delete $cacheKey -R $REPO -B $BRANCH --confirm
done
echo "Done"
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
REPO: ${{ github.repository }}
BRANCH: refs/pull/${{ github.event.pull_request.number }}/merge
-80
View File
@@ -1,80 +0,0 @@
name: frontend
on:
# Triggers the workflow on push or pull request events but only for the "devel" branch
pull_request:
branches: ["devel"]
paths:
- "webapp/**" # monitor for the frontend changes
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# Allows you to reuse workflows by referencing their YAML files
workflow_call:
jobs:
build_and_test:
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./webapp
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: "20"
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT
- name: restore yarn cache
uses: actions/cache@v3
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: restore node_modules
uses: actions/cache@v3
with:
path: "**/node_modules"
key: ${{ runner.os }}-node_modules-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-node_modules-
- name: restore typescript cache
uses: actions/cache@v3
with:
path: "**/packages/*/dist"
key: ${{ runner.os }}-dist-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-dist-
- name: yarn install
uses: borales/actions-yarn@v4
with:
dir: webapp
cmd: install
- name: yarn lerna bootstrap
uses: borales/actions-yarn@v4
with:
dir: webapp
cmd: lerna bootstrap
- name: build
uses: borales/actions-yarn@v4
with:
dir: webapp/packages/product-default
cmd: bundle
- name: test
uses: borales/actions-yarn@v4
with:
dir: webapp
cmd: lerna run test
+72
View File
@@ -0,0 +1,72 @@
name: Run Jest Tests
# Controls when the workflow will run
on:
# Triggers the workflow on push or pull request events but only for the "devel" branch
pull_request:
branches: ["devel"]
paths:
- "webapp/**" # monitor for the frontend changes
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
run-jest-tests:
# The type of runner that the job will run on
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./webapp
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: "18"
- name: Cache node modules
id: cache-npm
uses: actions/cache@v3
env:
cache-name: cache-node-modules
with:
# npm cache files are stored in `~/.npm` on Linux/macOS
path: ~/.npm
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-
- if: ${{ steps.cache-npm.outputs.cache-hit != 'true' }}
name: List the state of node modules
continue-on-error: true
run: npm list
- name: Run install
uses: borales/actions-yarn@v4
with:
dir: webapp
cmd: install
- name: Run lerna bootstrap
uses: borales/actions-yarn@v4
with:
dir: webapp
cmd: lerna bootstrap
- name: Run pre test
uses: borales/actions-yarn@v4
with:
dir: webapp
cmd: pretest
- name: Run test
uses: borales/actions-yarn@v4
with:
dir: webapp
cmd: lerna run test
-1
View File
@@ -40,7 +40,6 @@ server/test/io.cloudbeaver.test.platform/workspace/.data/
.classpath
.settings/
workspace-dev-ce/
deploy/cloudbeaver
server/**/target
apps/**/target
+16 -22
View File
@@ -4,35 +4,31 @@
{
"type": "chrome",
"request": "launch",
"name": "Chrome",
"url": "http://localhost:8080",
"webRoot": "${workspaceFolder}/..",
"outFiles": [
"${workspaceFolder}/../cloudbeaver/packages/**/dist/**/*.{js,jsx}"
],
"smartStep": true,
"sourceMaps": true,
"disableNetworkCache": true,
"skipFiles": ["<node_internals>/**", "**/node_modules/**"]
"name": "Debug CE",
"url": "http://127.0.0.1:3100",
"webRoot": "${workspaceFolder}/webapp/packages/product-default"
},
{
"type": "java",
"name": "CloudBeaver CE",
"cwd": "${workspaceFolder}/workspace-dev-ce",
"cwd": "${workspaceFolder}/../opt/cbce",
"request": "launch",
"mainClass": "org.jkiss.dbeaver.launcher.DBeaverLauncher",
"mainClass": "org.eclipse.equinox.launcher.Main",
"classPaths": [
"${env:DBEAVER_DEVEL_ECLIPSE_PATH}/plugins/org.eclipse.equinox.launcher_1.6.400.v20210924-0641.jar"
],
"windows": {
"type": "java",
"name": "CloudBeaver CE",
"request": "launch",
"mainClass": "org.jkiss.dbeaver.launcher.DBeaverLauncher",
"mainClass": "org.eclipse.equinox.launcher.Main",
"args": [
"-product",
"io.cloudbeaver.product.ce.product",
"-configuration",
"file:${workspaceFolder}/../dbeaver-workspace/products/CloudbeaverServer.product/",
"file:${env:DBEAVER_DEVEL_ECLIPSE_WORKSPACE_PATH}/.metadata/.plugins/org.eclipse.pde.core/CloudbeaverServer.product/",
"-dev",
"file:${workspaceFolder}/../dbeaver-workspace/products/CloudbeaverServer.product/dev.properties",
"file:${env:DBEAVER_DEVEL_ECLIPSE_WORKSPACE_PATH}/.metadata/.plugins/org.eclipse.pde.core/CloudbeaverServer.product/dev.properties",
"-os",
"win32",
"-ws",
@@ -57,14 +53,14 @@
"type": "java",
"name": "CloudBeaver CE",
"request": "launch",
"mainClass": "org.jkiss.dbeaver.launcher.DBeaverLauncher",
"mainClass": "org.eclipse.equinox.launcher.Main",
"args": [
"-product",
"io.cloudbeaver.product.ce.product",
"-configuration",
"file:${workspaceFolder}/../dbeaver-workspace/products/CloudbeaverServer.product/",
"file:${env:DBEAVER_DEVEL_ECLIPSE_WORKSPACE_PATH}/.metadata/.plugins/org.eclipse.pde.core/CloudbeaverServer.product/",
"-dev",
"file:${workspaceFolder}/../dbeaver-workspace/products/CloudbeaverServer.product/dev.properties",
"file:${env:DBEAVER_DEVEL_ECLIPSE_WORKSPACE_PATH}/.metadata/.plugins/org.eclipse.pde.core/CloudbeaverServer.product/dev.properties",
"-os",
"macosx",
"-ws",
@@ -72,10 +68,8 @@
"-arch",
"aarch64",
"-nl",
"en",
"-showsplash",
"-web-config",
"conf/cloudbeaver.conf"
"en_US",
"-showsplash"
],
"vmArgs": [
"-XX:+IgnoreUnrecognizedVMOptions",
+5 -3
View File
@@ -1,15 +1,17 @@
{
"license": {
"scope": "typescript,typescriptreact,javascript,javascriptreact,css,scss",
"scope": "typescript,typescriptreact,javascript,javascriptreact",
"prefix": "license",
"body": [
"/*",
" * CloudBeaver - Cloud Database Manager",
" * Copyright (C) 2020-2024 DBeaver Corp and others",
" * Copyright (C) 2020-2023 DBeaver Corp and others",
" *",
" * Licensed under the Apache License, Version 2.0.",
" * you may not use this file except in compliance with the License.",
" */"
" */",
"",
""
]
}
}
+1 -1
View File
@@ -9,7 +9,6 @@
"java.jdt.ls.vmargs": "-XX:+UseParallelGC -XX:GCTimeRatio=4 -XX:AdaptiveSizePolicyWeight=90 -Dsun.zip.disableMemoryMapping=true -Xmx16G -Xms100m -Xlog:disable",
"java.compile.nullAnalysis.mode": "automatic",
"typescript.preferences.useAliasesForRenames": false,
"typescript.preferences.importModuleSpecifier": "relative",
"typescript.preferences.includePackageJsonAutoImports": "on",
"typescript.preferences.quoteStyle": "single",
@@ -22,6 +21,7 @@
"typescript",
"typescriptreact"
],
"eslint.packageManager": "yarn",
"eslint.workingDirectories": ["webapp"],
"editor.defaultFormatter": "esbenp.prettier-vscode",
+24 -69
View File
@@ -13,7 +13,7 @@
},
"tasks": [
{
"label": "Run Tests CE",
"label": "Run Tests",
"type": "shell",
"command": "yarn",
"group": "test",
@@ -21,56 +21,26 @@
},
{
"label": "Run DevServer CE",
"group": "build",
"isBackground": true,
"type": "shell",
"command": "yarn",
"args": ["dev"],
"args": [
"dev",
"--",
"--",
"--env",
"server=${input:stage.ce}",
"--host",
"0.0.0.0"
],
"isBackground": true,
"options": {
"env": {
"server": "${input:stage.ce}"
},
"cwd": "${workspaceFolder}/webapp/packages/product-default"
}
},
{
"label": "Generate dev proprties for CBCE",
"type": "shell",
"command": "mvn",
"osx": {
"args": [
"package",
"-q",
"exec:java",
"-Dexec.args= -eclipse.version ${eclipse-version} -config ${workspaceFolder}/../idea-workspace-dbeaver/rcp-gen.properties -productFile ${workspaceFolder}/server/product/web-server/CloudbeaverServer.product -projectsFolder ${workspaceFolder}/../ -eclipse ${workspaceFolder}/../dbeaver-workspace/dependencies -output ${workspaceFolder}/../dbeaver-workspace/products/CloudbeaverServer.product"
]
},
"windows": {
"args": [
"package",
"-q",
"exec:java",
"-Dexec.args= -eclipse.version ${eclipse-version} -config ${workspaceFolder}/../idea-workspace-dbeaver/rcp-gen.properties -productFile ${workspaceFolder}/server/product/web-server/CloudbeaverServer.product -projectsFolder ${workspaceFolder}/../ -eclipse ${workspaceFolder}/../dbeaver-workspace/dependencies -output ${workspaceFolder}/../dbeaver-workspace/products/CloudbeaverServer.product"
]
},
"options": {
"cwd": "${workspaceFolder}/../idea-rcp-launch-config-generator"
},
"presentation": {
"reveal": "silent",
"close": true,
"clear": false
}
},
{
"label": "Build CE",
"type": "shell",
"windows": {
"command": "./build-sqlite.bat"
},
"osx": {
"command": "./build-sqlite.sh"
},
"command": "./build-sqlite.bat",
"options": {
"cwd": "${workspaceFolder}/deploy"
},
@@ -79,37 +49,22 @@
"isDefault": true
}
},
{
"label": "Run Backend CE",
"type": "shell",
"windows": {
"command": "./run-server.bat"
},
"osx": {
"command": "./run-server.sh"
},
"options": {
"cwd": "${workspaceFolder}/deploy/cloudbeaver"
}
},
{
"label": "Yarn Install",
"type": "shell",
"command": "yarn install; yarn lerna bootstrap",
"args": [],
"presentation": {
"reveal": "silent",
"close": true,
"clear": false
}
"command": "yarn",
"args": []
},
{
"label": "Update TS references CE",
"label": "Lerna Bootstrap",
"type": "shell",
"command": "yarn lerna run update-ts-references --stream",
"options": {
"cwd": "${workspaceFolder}/webapp"
}
"command": "yarn",
"args": ["lerna", "bootstrap"]
},
{
"label": "Bootstrap",
"dependsOrder": "sequence",
"dependsOn": ["Yarn Install", "Lerna Bootstrap"]
}
],
"inputs": [
@@ -117,8 +72,8 @@
"type": "pickString",
"id": "stage.ce",
"description": "CE Stage servers",
"default": "http://localhost:8978/",
"options": ["http://localhost:8978/"]
"default": "http://127.0.0.1:8978/",
"options": ["http://127.0.0.1:8978/"]
}
]
}
+55 -30
View File
@@ -22,42 +22,67 @@ 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;
### CloudBeaver 23.1.5 - 2023-08-21
- The ability to use custom functions in the Grouping panel has been added;
- Pagination has been added to the Navigation tree and metadata viewer, allowing working with more than 1000 database items;
- "Connection Management" tab has been renamed to "Connection Templates" - now only connection templates are displayed;
- Custom settings have been added to the interface for the following dialogue connections: SQLite, DB2, SQL Server, MySQL, Oracle and PostgreSQL;
- The ability to rearrange columns in the Data Editor has been added;
- 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;
- Added the ability to set null values for BLOB and GIS data via the cell's context menu in the table;
- Oracle driver has been updated to version 23.2.0.0.0;
- SQLite driver has been updated to version 3.44.1.0;
### CloudBeaver 23.1.4 - 2023-08-07
- The SSL option is now available for establishing connections in MySQL and PostgreSQL.
- The filters for the Navigation tree now allow hiding and showing schemas within the interface.
- Access permissions can be specified for pre-configured connections via the configuration file.
- Reverse Proxy authentication now includes the option to provide users' First name and Last name.
- Trino driver has been upgraded to version 421.
- Different bug fixes and enhancements have been made.
### 24.0.3. 2024-04-22
- Unauthorized access vulnerability was fixed;
- Added the ability for users to configure personal settings for the interface, SQL editor, and data viewer through the settings panel;
- Added the ability to backup of the internal database before schema migration (for H2);
### CloudBeaver 23.1.3 - 2023-07-24
- Users can simultaneously edit resources, allowing them to work together;
- We have improved the UX in the search bar - users can delete a query or request by clicking on the cross icon;
- The search request considers file names and exclude the .sql file extension for now;
- Different bug fixes and enhancements have been made.
### 24.0.2. 2024-04-08
- Added the ability to import data to the database from CSV file;
- Implemented support for utilizing environment variables within connection configurations;
- The ability to select a case for column names has been added to CSV export;
- A new Apache Kyuubi driver has been added;
- Trino driver has been updated to version 438;
- Clickhouse driver has been updated to version 0.6.0-patch2;
- Have enhanced security of H2 connection;
### CloudBeaver 23.1.2 - 2023-07-10
- We have improved the SQL Editor functionality by adding support for displaying tables with nested arrays of objects;
- The ability to compress files during export allows for faster download speeds, particularly for larger files;
- New Settings panel displays the product configuration settings such as Minimum fetch size, Maximum fetch size, and Default fetch size from the Data Editor;
- Different bug fixes and enhancements have been made.
### 24.0.1. 2024-03-25
- Added support for two modes for committing changes to the database:
- Auto-commit transfers all changes that you make immediately to the database;
- Manual commit requires your confirmation before committing a change to the database or rolling it back.
### CloudBeaver 23.1.1 - 2023-06-26
- Connections are consistently displayed now when they are pre-configured into the workspace in the Global Configuration json file.
- Different bug fixes and enhancements have been made.
### CloudBeaver 23.1.0 - 2023-06-05
Changes since 23.0.0
- Data viewer:
- New grouping panel menu was added in the Data Viewer. This panel extracts unique values from the database column for count. Users can drag and drop the column to the grouping panel and get the results immediately. Sorting, filtering and exporting of the results are available on the Grouping panel.
- SQL Editor:
- We improved the performance of the SQL-editor - as a result, handling scripts with up to 10 000 lines does not present any challenges;
- In the SQL-editor, pressing Tab/Space followed by Enter now causes the cursor to move to a new line;
- In the SQL editor, when the cursor goes back on the query, the previous hints are displayed;
- Error when running SQL with semicolon has been fixed.
- Connections:
- If there is an error in saving the data, the tab for the chosen connection dialog will stay open to allow corrections;
- The URL-configuration for PostgreSQL now correctly displays only a single database.
- Driver management:
- The CE version now offers the updated sqlite-jdbc driver, version 3.41.2;
- CloudBeaver has the option to connect to H2 database version 2;
- The internal CloudBeaver database is upgraded to the newest H2 version 2 to avoid vulnerability issues. The database will be safely upgraded automatically for the servers with default configurations. You can perform this upgrade manually if you have a custom configuration for this database in your infrastructure.
- Connections:
- Option to increase the maximum size of text files displayed in the value panel (using the sqlTextPreviewMaxLength parameter) has been added;
- Support for custom logging configuration has been added. An external configuration file can be used instead of the default configuration.
### Old CloudBeaver releases
You can find information about earlier releases on the CloudBeaver wiki https://github.com/dbeaver/cloudbeaver/wiki/Releases.
@@ -1,6 +1,6 @@
/*
* DBeaver - Universal Database Manager
* Copyright (C) 2010-2024 DBeaver Corp and others
* Copyright (C) 2010-2023 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.
@@ -1,6 +1,6 @@
/*
* DBeaver - Universal Database Manager
* Copyright (C) 2010-2024 DBeaver Corp and others
* Copyright (C) 2010-2023 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.
@@ -1,6 +1,6 @@
/*
* DBeaver - Universal Database Manager
* Copyright (C) 2010-2024 DBeaver Corp and others
* Copyright (C) 2010-2023 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.
@@ -1,6 +1,6 @@
/*
* DBeaver - Universal Database Manager
* Copyright (C) 2010-2024 DBeaver Corp and others
* Copyright (C) 2010-2023 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.
+3 -3
View File
@@ -2,14 +2,14 @@
teams: [
{
subjectId: "admin",
teamName: "Admin",
name: "Admin",
description: "Administrative access. Has all permissions.",
permissions: [ "admin" ]
},
{
subjectId: "user",
teamName: "User",
description: "All users, including anonymous.",
name: "User",
description: "Standard user",
permissions: [ ]
}
]
+34
View File
@@ -0,0 +1,34 @@
// Product configuration. Customized web application behavior
// It is in JSONC format
{
// Global properties
core: {
// User defaults
user: {
defaultTheme: "light",
defaultLanguage: "en"
},
app: {
// Log viewer config
logViewer: {
refreshTimeout: 3000,
logBatchSize: 1000,
maxLogRecords: 2000,
maxFailedRequests: 3
}
},
authentication: {
primaryAuthProvider: 'local'
}
},
// Notifications config
core_events: {
notificationsPool: 5
},
plugin_data_spreadsheet_new: {
hidden: false
},
plugin_data_export: {
disabled: false
}
}
@@ -6,26 +6,10 @@
contentRoot: "web",
driversLocation: "drivers",
sslConfigurationPath:"${CLOUDBEAVER_SSL_CONF_PATH:workspace/.data/ssl-config.xml}",
rootURI: "/",
serviceURI: "/api/",
productSettings: {
# Global properties
core.theming.theme: 'light',
core.localization.localization: 'en',
plugin.sql-editor.autoSave: true,
plugin.sql-editor.disabled: false,
# max size of the file that can be uploaded to the editor (in kilobytes)
plugin.sql-editor.maxFileSize: 10240,
plugin.log-viewer.disabled: false,
plugin.log-viewer.logBatchSize: 1000,
plugin.log-viewer.maxFailedRequests: 3,
plugin.log-viewer.maxLogRecords: 2000,
plugin.log-viewer.refreshTimeout: 3000,
sql.proposals.insert.table.alias: PLAIN
},
productConfiguration: "conf/product.conf",
expireSessionAfterPeriod: 1800000,
@@ -33,21 +17,8 @@
enableSecurityManager: false,
sm: {
enableBruteForceProtection: "${CLOUDBEAVER_BRUTE_FORCE_PROTECTION_ENABLED:true}",
maxFailedLogin: "${CLOUDBEAVER_MAX_FAILED_LOGINS:10}",
minimumLoginTimeout: "${CLOUDBEAVER_MINIMUM_LOGIN_TIMEOUT:1}",
blockLoginPeriod: "${CLOUDBEAVER_BLOCK_PERIOD:300}",
passwordPolicy: {
minLength: "${CLOUDBEAVER_POLICY_MIN_LENGTH:8}",
requireMixedCase: "${CLOUDBEAVER_POLICY_REQUIRE_MIXED_CASE:true}",
minNumberCount: "${CLOUDBEAVER_POLICY_MIN_NUMBER_COUNT:1}",
minSymbolCount: "${CLOUDBEAVER_POLICY_MIN_SYMBOL_COUNT:0}"
}
},
database: {
driver: "h2_embedded_v2",
driver="h2_embedded_v2",
url: "jdbc:h2:${workspace}/.data/cb.h2v2.dat",
initialDataConfiguration: "conf/initial-data.conf",
pool: {
@@ -55,19 +26,16 @@
maxIdleConnections: 10,
maxConnections: 100,
validationQuery: "SELECT 1"
},
backupEnabled: "${CLOUDBEAVER_DB_BACKUP_ENABLED:true}"
}
}
},
app: {
anonymousAccessEnabled: true,
anonymousUserRole: "user",
defaultUserTeam: "user",
grantConnectionsAccessToAnonymousTeam: false,
supportsCustomConnections: false,
showReadOnlyConnectionInfo: false,
systemVariablesResolvingEnabled: "${CLOUDBEAVER_SYSTEM_VARIABLES_RESOLVING_ENABLED:false}",
forwardProxy: false,
@@ -94,9 +62,6 @@
"h2:h2_embedded",
"h2:h2_embedded_v2",
"clickhouse:yandex_clickhouse"
],
disabledBetaFeatures: [
]
}
@@ -9,21 +9,7 @@
rootURI: "/",
serviceURI: "/api/",
productSettings: {
# Global properties
core.theming.theme: 'light',
core.localization.localization: 'en',
plugin.sql-editor.autoSave: true,
plugin.sql-editor.disabled: false,
# max size of the file that can be uploaded to the editor (in kilobytes)
plugin.sql-editor.maxFileSize: 10240,
plugin.log-viewer.disabled: false,
plugin.log-viewer.logBatchSize: 1000,
plugin.log-viewer.maxFailedRequests: 3,
plugin.log-viewer.maxLogRecords: 2000,
plugin.log-viewer.refreshTimeout: 3000,
sql.proposals.insert.table.alias: PLAIN
},
productConfiguration: "conf/product.conf",
expireSessionAfterPeriod: 1800000,
@@ -32,7 +18,7 @@
enableSecurityManager: false,
database: {
driver:"h2_embedded_v2",
driver="h2_embedded_v2",
url: "jdbc:h2:${workspace}/.data/cb.h2v2.dat",
initialDataConfiguration: "conf/initial-data.conf",
pool: {
@@ -40,19 +26,6 @@
maxIdleConnections: 10,
maxConnections: 100,
validationQuery: "SELECT 1"
},
backupEnabled: "${CLOUDBEAVER_DB_BACKUP_ENABLED:true}"
},
sm: {
enableBruteForceProtection: "${CLOUDBEAVER_BRUTE_FORCE_PROTECTION_ENABLED:true}",
maxFailedLogin: "${CLOUDBEAVER_MAX_FAILED_LOGINS:10}",
minimumLoginTimeout: "${CLOUDBEAVER_MINIMUM_LOGIN_TIMEOUT:1}",
blockLoginPeriod: "${CLOUDBEAVER_BLOCK_PERIOD:300}",
passwordPolicy: {
minLength: "${CLOUDBEAVER_POLICY_MIN_LENGTH:8}",
requireMixedCase: "${CLOUDBEAVER_POLICY_REQUIRE_MIXED_CASE:true}",
minNumberCount: "${CLOUDBEAVER_POLICY_MIN_NUMBER_COUNT:1}",
minSymbolCount: "${CLOUDBEAVER_POLICY_MIN_SYMBOL_COUNT:0}"
}
}
@@ -63,7 +36,6 @@
grantConnectionsAccessToAnonymousTeam: false,
supportsCustomConnections: false,
showReadOnlyConnectionInfo: false,
systemVariablesResolvingEnabled: "${CLOUDBEAVER_SYSTEM_VARIABLES_RESOLVING_ENABLED:false}",
forwardProxy: false,
@@ -89,9 +61,6 @@
"h2:h2_embedded",
"h2:h2_embedded_v2",
"clickhouse:yandex_clickhouse"
],
disabledBetaFeatures: [
]
}
-63
View File
@@ -1,63 +0,0 @@
#!/bin/bash
set -Eeo pipefail
set +u
# #command line arguments
# CONFIGURATION_PATH=${1-"../config/sample-databases/DefaultConfiguration"}
# SAMPLE_DATABASE_PATH=${2-""}
# echo $CONFIGURATION_PATH
# echo $SAMPLE_DATABASE_PATH
echo "Clone and build Cloudbeaver"
rm -rf ./drivers
rm -rf ./cloudbeaver
mkdir ./cloudbeaver
mkdir ./cloudbeaver/server
mkdir ./cloudbeaver/conf
mkdir ./cloudbeaver/workspace
mkdir ./cloudbeaver/web
echo "Pull cloudbeaver platform"
cd ../..
echo "Pull dbeaver platform"
[ ! -d dbeaver ] && git clone --depth 1 https://github.com/dbeaver/dbeaver.git
[ ! -d dbeaver-common ] && git clone --depth 1 https://github.com/dbeaver/dbeaver-common.git
cd cloudbeaver/deploy
echo "Build CloudBeaver server"
cd ../server/product/aggregate
mvn clean verify $MAVEN_COMMON_OPTS -Dheadless-platform
if [[ "$?" -ne 0 ]] ; then
echo 'Could not perform package'; exit $rc
fi
cd ../../../deploy
echo "Copy server packages"
cp -rp ../server/product/web-server/target/products/io.cloudbeaver.product/all/all/all/* ./cloudbeaver/server
cp -p ./scripts/* ./cloudbeaver
mkdir cloudbeaver/samples
if [[ -z $SAMPLE_DATABASE_PATH ]]; then
SAMPLE_DATABASE_PATH=""
else
mkdir cloudbeaver/samples/db
cp -rp "${SAMPLE_DATABASE_PATH}" cloudbeaver/samples/
fi
if [[ -z "$CONFIGURATION_PATH" ]]; then
CONFIGURATION_PATH="../config/sample-databases/DefaultConfiguration"
fi
cp -rp ../config/core/* cloudbeaver/conf
cp -rp "${CONFIGURATION_PATH}"/GlobalConfiguration/.dbeaver/data-sources.json cloudbeaver/conf/initial-data-sources.conf
cp -p "${CONFIGURATION_PATH}"/*.conf cloudbeaver/conf/
mv drivers cloudbeaver
echo "End of backend build"
-21
View File
@@ -1,21 +0,0 @@
#!/bin/bash
set -Eeuo pipefail
echo "Build static content"
cd ../../cloudbeaver/webapp
yarn
yarn lerna run bootstrap
yarn lerna run bundle --no-bail --stream --scope=@cloudbeaver/product-default #-- -- --env source-map
if [[ "$?" -ne 0 ]] ; then
echo 'Application build failed'; exit $rc
fi
cd ../deploy
echo "Copy static content"
cp -rp ../webapp/packages/product-default/lib/* cloudbeaver/web
echo "Cloudbeaver is ready. Run run-server.sh in cloudbeaver folder to start the server."
Executable → Regular
+1 -9
View File
@@ -1,9 +1 @@
#!/bin/bash
set -Eeuo pipefail
#command line arguments
CONFIGURATION_PATH='../config/sample-databases/SQLiteConfiguration'
SAMPLE_DATABASE_PATH='../config/sample-databases/db'
source build-backend.sh
source build-frontend.sh
./build.sh '../config/sample-databases/SQLiteConfiguration' '../config/sample-databases/db'
+1 -2
View File
@@ -24,7 +24,6 @@ cd ..\..
echo Pull dbeaver platform
IF NOT EXIST dbeaver git clone https://github.com/dbeaver/dbeaver.git
IF NOT EXIST dbeaver-common git clone https://github.com/dbeaver/dbeaver-common.git
cd cloudbeaver\deploy
echo Build cloudbeaver server
@@ -58,7 +57,7 @@ cd ..\cloudbeaver\webapp
call yarn
call yarn lerna bootstrap
call yarn lerna run bundle --no-bail --stream --scope=@cloudbeaver/product-default &::-- -- --env source-map
call yarn lerna run build --no-bail --stream --scope=@cloudbeaver/product-default &::-- -- --env source-map
cd ..\deploy
+66 -4
View File
@@ -2,8 +2,70 @@
set -Eeuo pipefail
#command line arguments
CONFIGURATION_PATH="../config/sample-databases/DefaultConfiguration"
SAMPLE_DATABASE_PATH=""
CONFIGURATION_PATH=${1-"../config/sample-databases/DefaultConfiguration"}
SAMPLE_DATABASE_PATH=${2-""}
source build-backend.sh
source build-frontend.sh
echo "Clone and build Cloudbeaver"
rm -rf ./drivers
rm -rf ./cloudbeaver
mkdir ./cloudbeaver
mkdir ./cloudbeaver/server
mkdir ./cloudbeaver/conf
mkdir ./cloudbeaver/workspace
mkdir ./cloudbeaver/web
echo "Pull cloudbeaver platform"
cd ../..
echo "Pull dbeaver platform"
[ ! -d dbeaver ] && git clone https://github.com/dbeaver/dbeaver.git
cd cloudbeaver/deploy
echo "Build CloudBeaver server"
cd ../server/product/aggregate
mvn clean verify -U -Dheadless-platform
if [[ "$?" -ne 0 ]] ; then
echo 'Could not perform package'; exit $rc
fi
cd ../../../deploy
echo "Copy server packages"
cp -rp ../server/product/web-server/target/products/io.cloudbeaver.product/all/all/all/* ./cloudbeaver/server
cp -p ./scripts/* ./cloudbeaver
mkdir cloudbeaver/samples
if [[ ! -z "${SAMPLE_DATABASE_PATH}" ]]; then
mkdir cloudbeaver/samples/db
cp -rp "${SAMPLE_DATABASE_PATH}" cloudbeaver/samples/
fi
cp -rp ../config/core/* cloudbeaver/conf
cp -rp "${CONFIGURATION_PATH}"/GlobalConfiguration/.dbeaver/data-sources.json cloudbeaver/conf/initial-data-sources.conf
cp -p "${CONFIGURATION_PATH}"/*.conf cloudbeaver/conf/
mv drivers cloudbeaver
echo "Build static content"
cd ../
cd ../cloudbeaver/webapp
yarn
yarn lerna run bootstrap
yarn lerna run build --no-bail --stream --scope=@cloudbeaver/product-default #-- -- --env source-map
if [[ "$?" -ne 0 ]] ; then
echo 'Application build failed'; exit $rc
fi
cd ../deploy
echo "Copy static content"
cp -rp ../webapp/packages/product-default/lib/* cloudbeaver/web
echo "Cloudbeaver is ready. Run run-server.bat in cloudbeaver folder to start the server."
@@ -1,6 +1,4 @@
FROM dbeaver/base-java
MAINTAINER DBeaver Corp, devops@dbeaver.com
FROM eclipse-temurin:17.0.4.1_1-jre-focal
COPY cloudbeaver /opt/cloudbeaver
-47
View File
@@ -1,47 +0,0 @@
FROM ubuntu:24.04
MAINTAINER DBeaver Corp, devops@dbeaver.com
ENV DEBIAN_FRONTEND=noninteractive
RUN set -eux; \
apt-get update; \
apt-get install -y --no-install-recommends \
# curl required for historical reasons, see https://github.com/adoptium/containers/issues/255
curl \
wget \
# java.lang.UnsatisfiedLinkError: libfontmanager.so: libfreetype.so.6: cannot open shared object file: No such file or directory
# java.lang.NoClassDefFoundError: Could not initialize class sun.awt.X11FontManager
# https://github.com/docker-library/openjdk/pull/235#issuecomment-424466077
fontconfig \
# utilities for keeping Ubuntu and OpenJDK CA certificates in sync
# https://github.com/adoptium/containers/issues/293
ca-certificates p11-kit \
# jlink --strip-debug on 13+ needs objcopy: https://github.com/docker-library/openjdk/issues/351
# Error: java.io.IOException: Cannot run program "objcopy": error=2, No such file or directory
binutils \
tzdata \
# locales ensures proper character encoding and locale-specific behaviors using en_US.UTF-8
locales \
nano \
; \
echo "en_US.UTF-8 UTF-8" >> /etc/locale.gen; \
locale-gen en_US.UTF-8; \
rm -rf /var/lib/apt/lists/*
ENV LANG=en_US.UTF-8
ENV JAVA_HOME=/opt/java/openjdk
COPY --from=eclipse-temurin:17 $JAVA_HOME $JAVA_HOME
ENV PATH="${JAVA_HOME}/bin:${PATH}"
RUN set -eux; \
# https://github.com/docker-library/openjdk/issues/331#issuecomment-498834472
find "$JAVA_HOME/lib" -name '*.so' -exec dirname '{}' ';' | sort -u > /etc/ld.so.conf.d/docker-openjdk.conf; \
ldconfig; \
# https://github.com/docker-library/openjdk/issues/212#issuecomment-420979840
# https://openjdk.java.net/jeps/341
java -Xshare:dump;
### Patch java security
COPY java.security* ${JAVA_HOME}/conf/security/java.security
+1 -1
View File
@@ -1,3 +1,3 @@
cd ..
docker build -t dbeaver/cloudbeaver:dev . --file ./docker/cloudbeaver-ce/Dockerfile
docker build -t dbeaver/cloudbeaver:dev . --file ./docker/Dockerfile
+2 -36
View File
@@ -1,5 +1,5 @@
@echo off
for /f %%a in ('dir /B /S server\plugins\org.jkiss.dbeaver.launcher*.jar') do SET launcherJar="%%a"
for /f %%a in ('dir /B /S server\plugins\org.eclipse.equinox.launcher*.jar') do SET launcherJar="%%a"
echo "Starting Cloudbeaver Server"
@@ -10,38 +10,4 @@ IF NOT EXIST workspace\.metadata (
)
)
SET VMARGS_OPTS = ""
If Not Defined JAVA_OPTS (
SET VMARGS_OPTS = "-Xmx2048M"
)
java %JAVA_OPTS% ^
-Dfile.encoding=UTF-8 ^
--add-modules=ALL-SYSTEM ^
--add-opens=java.base/java.io=ALL-UNNAMED ^
--add-opens=java.base/java.lang=ALL-UNNAMED ^
--add-opens=java.base/java.lang.reflect=ALL-UNNAMED ^
--add-opens=java.base/java.net=ALL-UNNAMED ^
--add-opens=java.base/java.nio=ALL-UNNAMED ^
--add-opens=java.base/java.nio.charset=ALL-UNNAMED ^
--add-opens=java.base/java.text=ALL-UNNAMED ^
--add-opens=java.base/java.time=ALL-UNNAMED ^
--add-opens=java.base/java.util=ALL-UNNAMED ^
--add-opens=java.base/java.util.concurrent=ALL-UNNAMED ^
--add-opens=java.base/java.util.concurrent.atomic=ALL-UNNAMED ^
--add-opens=java.base/jdk.internal.vm=ALL-UNNAMED ^
--add-opens=java.base/jdk.internal.misc=ALL-UNNAMED ^
--add-opens=java.base/sun.nio.ch=ALL-UNNAMED ^
--add-opens=java.base/sun.security.ssl=ALL-UNNAMED ^
--add-opens=java.base/sun.security.action=ALL-UNNAMED ^
--add-opens=java.base/sun.security.util=ALL-UNNAMED ^
--add-opens=java.security.jgss/sun.security.jgss=ALL-UNNAMED ^
--add-opens=java.security.jgss/sun.security.krb5=ALL-UNNAMED ^
--add-opens=java.base/java.util.concurrent.atomic=ALL-UNNAMED ^
--add-opens=java.sql/java.sql=ALL-UNNAMED ^
-jar %launcherJar% ^
-product io.cloudbeaver.product.ce.product ^
-data %workspacePath% ^
-web-config conf/cloudbeaver.conf ^
-nl en ^
-registryMultiLanguage
java %JAVA_OPTS% --add-modules=ALL-SYSTEM --add-opens=java.base/java.io=ALL-UNNAMED --add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.base/java.lang.reflect=ALL-UNNAMED --add-opens=java.base/java.net=ALL-UNNAMED --add-opens=java.base/java.nio=ALL-UNNAMED --add-opens=java.base/java.nio.charset=ALL-UNNAMED --add-opens=java.base/java.text=ALL-UNNAMED --add-opens=java.base/java.time=ALL-UNNAMED --add-opens=java.base/java.util=ALL-UNNAMED --add-opens=java.base/java.util.concurrent=ALL-UNNAMED --add-opens=java.base/java.util.concurrent.atomic=ALL-UNNAMED --add-opens=java.base/jdk.internal.vm=ALL-UNNAMED --add-opens=java.base/jdk.internal.misc=ALL-UNNAMED --add-opens=java.base/sun.nio.ch=ALL-UNNAMED --add-opens=java.base/sun.security.ssl=ALL-UNNAMED --add-opens=java.base/sun.security.action=ALL-UNNAMED --add-opens=java.base/sun.security.util=ALL-UNNAMED --add-opens=java.security.jgss/sun.security.jgss=ALL-UNNAMED --add-opens=java.security.jgss/sun.security.krb5=ALL-UNNAMED --add-opens=java.base/java.util.concurrent.atomic=ALL-UNNAMED -jar %launcherJar% -product io.cloudbeaver.product.ce.product -web-config conf/cloudbeaver.conf -nl en -registryMultiLanguage
+3 -34
View File
@@ -1,40 +1,9 @@
#!/bin/bash
launcherJar=( server/plugins/org.jkiss.dbeaver.launcher*.jar )
launcherJar=( server/plugins/org.eclipse.equinox.launcher*.jar )
echo "Starting Cloudbeaver Server"
[ ! -d "workspace/.metadata" ] && mkdir -p workspace/.metadata \
&& mkdir -p workspace/GlobalConfiguration/.dbeaver \
&& [ ! -f "workspace/GlobalConfiguration/.dbeaver/data-sources.json" ] \
&& cp conf/initial-data-sources.conf workspace/GlobalConfiguration/.dbeaver/data-sources.json
[ ! -d "workspace/.metadata" ] && mkdir -p workspace/.metadata && mkdir -p workspace/GlobalConfiguration/.dbeaver && [ ! -f "workspace/GlobalConfiguration/.dbeaver/data-sources.json" ] && cp conf/initial-data-sources.conf workspace/GlobalConfiguration/.dbeaver/data-sources.json
exec java ${JAVA_OPTS} \
-Dfile.encoding=UTF-8 \
--add-modules=ALL-SYSTEM \
--add-opens=java.base/java.io=ALL-UNNAMED \
--add-opens=java.base/java.lang=ALL-UNNAMED \
--add-opens=java.base/java.lang.reflect=ALL-UNNAMED \
--add-opens=java.base/java.net=ALL-UNNAMED \
--add-opens=java.base/java.nio=ALL-UNNAMED \
--add-opens=java.base/java.nio.charset=ALL-UNNAMED \
--add-opens=java.base/java.text=ALL-UNNAMED \
--add-opens=java.base/java.time=ALL-UNNAMED \
--add-opens=java.base/java.util=ALL-UNNAMED \
--add-opens=java.base/java.util.concurrent=ALL-UNNAMED \
--add-opens=java.base/java.util.concurrent.atomic=ALL-UNNAMED \
--add-opens=java.base/jdk.internal.vm=ALL-UNNAMED \
--add-opens=java.base/jdk.internal.misc=ALL-UNNAMED \
--add-opens=java.base/sun.nio.ch=ALL-UNNAMED \
--add-opens=java.base/sun.security.ssl=ALL-UNNAMED \
--add-opens=java.base/sun.security.action=ALL-UNNAMED \
--add-opens=java.base/sun.security.util=ALL-UNNAMED \
--add-opens=java.security.jgss/sun.security.jgss=ALL-UNNAMED \
--add-opens=java.security.jgss/sun.security.krb5=ALL-UNNAMED \
--add-opens=java.base/java.util.concurrent.atomic=ALL-UNNAMED \
--add-opens=java.sql/java.sql=ALL-UNNAMED \
-jar ${launcherJar} \
-product io.cloudbeaver.product.ce.product \
-web-config conf/cloudbeaver.conf \
-nl en \
-registryMultiLanguage
java ${JAVA_OPTS} --add-modules=ALL-SYSTEM --add-opens=java.base/java.io=ALL-UNNAMED --add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.base/java.lang.reflect=ALL-UNNAMED --add-opens=java.base/java.net=ALL-UNNAMED --add-opens=java.base/java.nio=ALL-UNNAMED --add-opens=java.base/java.nio.charset=ALL-UNNAMED --add-opens=java.base/java.text=ALL-UNNAMED --add-opens=java.base/java.time=ALL-UNNAMED --add-opens=java.base/java.util=ALL-UNNAMED --add-opens=java.base/java.util.concurrent=ALL-UNNAMED --add-opens=java.base/java.util.concurrent.atomic=ALL-UNNAMED --add-opens=java.base/jdk.internal.vm=ALL-UNNAMED --add-opens=java.base/jdk.internal.misc=ALL-UNNAMED --add-opens=java.base/sun.nio.ch=ALL-UNNAMED --add-opens=java.base/sun.security.ssl=ALL-UNNAMED --add-opens=java.base/sun.security.action=ALL-UNNAMED --add-opens=java.base/sun.security.util=ALL-UNNAMED --add-opens=java.security.jgss/sun.security.jgss=ALL-UNNAMED --add-opens=java.security.jgss/sun.security.krb5=ALL-UNNAMED --add-opens=java.base/java.util.concurrent.atomic=ALL-UNNAMED -jar ${launcherJar} -product io.cloudbeaver.product.ce.product -web-config conf/cloudbeaver.conf -nl en -registryMultiLanguage
+10
View File
@@ -0,0 +1,10 @@
[program:cloudbeaver]
directory=/opt/cloudbeaver/
command=/opt/cloudbeaver/run-server.sh
stopasgroup=true
killasgroup=true
stopsignal=INT
autostart=true
autorestart=true
redirect_stderr=true
stdout_logfile=/var/log/cloudbeaver-server.log
+1 -1
View File
@@ -1,4 +1,4 @@
{
"projects": ["../dbeaver-common", "../dbeaver", "../cloudbeaver/server"],
"projects": ["../dbeaver", "../cloudbeaver/server"],
"targetPlatform": "./org.jkiss.cloudbeaver.tp.target"
}
+2 -1
View File
@@ -2,6 +2,7 @@
<?pde version="3.8"?>
<target name="org.jkiss.tp.cloudbeaver">
<locations>
<location path="../dbeaver-workspace/dependencies/plugins" type="Directory"/>
<location path="../eclipse/Eclipse.app/Contents/Eclipse/plugins" type="Directory"/>
<location path="../eclipse/plugins" type="Directory"/>
</locations>
</target>
-2
View File
@@ -1,2 +0,0 @@
dbeaver-common
dbeaver
-9
View File
@@ -1,9 +0,0 @@
projects:
schema:
include: ./**/*.graphqls
schema: "gql.ce"
extensions:
endpoints:
Default GraphQL Endpoint:
url: http://localhost:8080/api/gql
introspect: false
@@ -3,38 +3,34 @@ Bundle-ManifestVersion: 2
Bundle-Vendor: DBeaver Corp
Bundle-Name: Cloudbeaver Web Model
Bundle-SymbolicName: io.cloudbeaver.model;singleton:=true
Bundle-Version: 1.0.54.qualifier
Bundle-Release-Date: 20240603
Bundle-RequiredExecutionEnvironment: JavaSE-17
Bundle-Version: 1.0.36.qualifier
Bundle-Release-Date: 20230904
Bundle-RequiredExecutionEnvironment: JavaSE-11
Bundle-ActivationPolicy: lazy
Bundle-ClassPath: .
Require-Bundle: org.jkiss.dbeaver.data.gis;visibility:=reexport,
Require-Bundle: org.jkiss.dbeaver.data.gis;visibility:=reexport,
org.jkiss.dbeaver.model;visibility:=reexport,
org.jkiss.dbeaver.model.sm;visibility:=reexport,
org.jkiss.dbeaver.model.event;visibility:=reexport,
org.jkiss.dbeaver.model.nio;visibility:=reexport,
org.jkiss.dbeaver.registry;visibility:=reexport,
org.jkiss.dbeaver.net.ssh,
org.jkiss.bundle.graphql.java;visibility:=reexport,
org.jkiss.bundle.apache.dbcp,
com.google.gson;visibility:=reexport,
jakarta.servlet;visibility:=reexport
jakarta.servlet-api;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,
io.cloudbeaver.model,
io.cloudbeaver.model.app,
io.cloudbeaver.model.fs,
io.cloudbeaver.model.rm,
io.cloudbeaver.model.rm.local,
io.cloudbeaver.model.rm.lock,
io.cloudbeaver.model.session,
io.cloudbeaver.model.user,
io.cloudbeaver.model.utils,
io.cloudbeaver.registry,
io.cloudbeaver.server,
io.cloudbeaver.service,
@@ -19,9 +19,4 @@
</metaParameters>
</extension>
<extension point="com.dbeaver.secretController">
<controller id="void-secret" class="io.cloudbeaver.model.app.VoidSecretController"
label="Default secret controller" description="Default void secret controller"/>
</extension>
</plugin>
+1 -1
View File
@@ -10,7 +10,7 @@
<relativePath>../</relativePath>
</parent>
<artifactId>io.cloudbeaver.model</artifactId>
<version>1.0.54-SNAPSHOT</version>
<version>1.0.36-SNAPSHOT</version>
<packaging>eclipse-plugin</packaging>
</project>
@@ -14,6 +14,11 @@
<meta.element />
</appInfo>
</annotation>
<complexType>
<sequence>
<element ref="propertyGroup"/>
</sequence>
</complexType>
</element>
<element name="driver">
@@ -1,6 +1,6 @@
/*
* DBeaver - Universal Database Manager
* Copyright (C) 2010-2024 DBeaver Corp and others
* Copyright (C) 2010-2023 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.
@@ -62,12 +62,6 @@ public class BaseWebProjectImpl extends BaseProjectImpl implements RMControllerP
return resourceController;
}
@NotNull
@Override
public RMProject getRMProject() {
return project;
}
@Override
public boolean isVirtual() {
return true;
@@ -1,6 +1,6 @@
/*
* DBeaver - Universal Database Manager
* Copyright (C) 2010-2024 DBeaver Corp and others
* Copyright (C) 2010-2023 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.
@@ -17,26 +17,23 @@
package io.cloudbeaver;
import org.jkiss.dbeaver.model.access.DBAPermissionRealm;
import org.jkiss.dbeaver.model.rm.RMConstants;
/**
* General constants
*/
public interface DBWConstants {
public class DBWConstants {
String PERMISSION_ADMIN = DBAPermissionRealm.PERMISSION_ADMIN;
public static final String PERMISSION_ADMIN = DBAPermissionRealm.PERMISSION_ADMIN;
String PERMISSION_CONFIGURATION_MANAGER = RMConstants.PERMISSION_CONFIGURATION_MANAGER;
String PERMISSION_PRIVATE_PROJECT_ACCESS = "private-project-access";
String PERMISSION_SECRET_MANAGER = "secret-manager";
public static final String PERMISSION_CONFIGURATION_MANAGER = "configuration-manager";
public static final String PERMISSION_PRIVATE_PROJECT_ACCESS = "private-project-access";
public static final String PERMISSION_EDIT_STRUCTURE = "edit-meta";
public static final String PERMISSION_EDIT_DATA = "edit-data";
String PERMISSION_EDIT_STRUCTURE = "edit-meta";
String PERMISSION_EDIT_DATA = "edit-data";
public static final String STATE_ATTR_SIGN_IN_STATE = "state.signin";
String STATE_ATTR_SIGN_IN_STATE = "state.signin";
enum SignInState {
public enum SignInState {
GLOBAL,
EMBEDDED
}
@@ -1,6 +1,6 @@
/*
* DBeaver - Universal Database Manager
* Copyright (C) 2010-2024 DBeaver Corp and others
* Copyright (C) 2010-2023 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.
@@ -1,6 +1,6 @@
/*
* DBeaver - Universal Database Manager
* Copyright (C) 2010-2024 DBeaver Corp and others
* Copyright (C) 2010-2023 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.
@@ -1,6 +1,6 @@
/*
* DBeaver - Universal Database Manager
* Copyright (C) 2010-2024 DBeaver Corp and others
* Copyright (C) 2010-2023 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.
@@ -1,6 +1,6 @@
/*
* DBeaver - Universal Database Manager
* Copyright (C) 2010-2024 DBeaver Corp and others
* Copyright (C) 2010-2023 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.
@@ -1,6 +1,6 @@
/*
* DBeaver - Universal Database Manager
* Copyright (C) 2010-2024 DBeaver Corp and others
* Copyright (C) 2010-2023 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.
@@ -29,7 +29,6 @@ import org.jkiss.dbeaver.model.app.DBPProject;
import org.jkiss.dbeaver.model.connection.DBPConnectionConfiguration;
import org.jkiss.dbeaver.model.connection.DBPDriver;
import org.jkiss.dbeaver.model.net.DBWNetworkProfile;
import org.jkiss.dbeaver.model.preferences.DBPPreferenceStore;
import org.jkiss.dbeaver.model.runtime.DBRProgressMonitor;
import org.jkiss.dbeaver.model.secret.DBSSecretController;
import org.jkiss.dbeaver.model.struct.DBSObjectFilter;
@@ -52,7 +51,6 @@ public class WebDataSourceRegistryProxy implements DBPDataSourceRegistry, DataSo
this.dataSourceFilter = filter;
}
@NotNull
@Override
public DBPProject getProject() {
return dataSourceRegistry.getProject();
@@ -60,7 +58,7 @@ public class WebDataSourceRegistryProxy implements DBPDataSourceRegistry, DataSo
@Nullable
@Override
public DBPDataSourceContainer getDataSource(@NotNull String id) {
public DBPDataSourceContainer getDataSource(String id) {
DBPDataSourceContainer dataSource = dataSourceRegistry.getDataSource(id);
if (dataSource == null || dataSourceFilter != null && !dataSourceFilter.filter(dataSource)) {
return null;
@@ -70,7 +68,7 @@ public class WebDataSourceRegistryProxy implements DBPDataSourceRegistry, DataSo
@Nullable
@Override
public DBPDataSourceContainer getDataSource(@NotNull DBPDataSource dataSource) {
public DBPDataSourceContainer getDataSource(DBPDataSource dataSource) {
if (dataSourceFilter != null && !dataSourceFilter.filter(dataSource.getContainer())) {
return null;
}
@@ -109,13 +107,13 @@ public class WebDataSourceRegistryProxy implements DBPDataSourceRegistry, DataSo
@NotNull
@Override
public DBPDataSourceContainer createDataSource(@NotNull DBPDriver driver, @NotNull DBPConnectionConfiguration connConfig) {
public DBPDataSourceContainer createDataSource(DBPDriver driver, DBPConnectionConfiguration connConfig) {
return dataSourceRegistry.createDataSource(driver, connConfig);
}
@NotNull
@Override
public DBPDataSourceContainer createDataSource(@NotNull DBPDataSourceContainer source) {
public DBPDataSourceContainer createDataSource(DBPDataSourceContainer source) {
return dataSourceRegistry.createDataSource(source);
}
@@ -166,20 +164,18 @@ public class WebDataSourceRegistryProxy implements DBPDataSourceRegistry, DataSo
return dataSourceRegistry.getRootFolders();
}
@Nullable
@Override
public DBPDataSourceFolder getFolder(@NotNull String path) {
public DBPDataSourceFolder getFolder(String path) {
return dataSourceRegistry.getFolder(path);
}
@NotNull
@Override
public DBPDataSourceFolder addFolder(@Nullable DBPDataSourceFolder parent, @NotNull String name) {
public DBPDataSourceFolder addFolder(DBPDataSourceFolder parent, String name) {
return dataSourceRegistry.addFolder(parent, name);
}
@Override
public void removeFolder(@NotNull DBPDataSourceFolder folder, boolean dropContents) {
public void removeFolder(DBPDataSourceFolder folder, boolean dropContents) {
dataSourceRegistry.removeFolder(folder, dropContents);
}
@@ -201,19 +197,19 @@ public class WebDataSourceRegistryProxy implements DBPDataSourceRegistry, DataSo
}
@Override
public void updateSavedFilter(@NotNull DBSObjectFilter filter) {
public void updateSavedFilter(DBSObjectFilter filter) {
dataSourceRegistry.updateSavedFilter(filter);
}
@Override
public void removeSavedFilter(@NotNull String filterName) {
public void removeSavedFilter(String filterName) {
dataSourceRegistry.removeSavedFilter(filterName);
}
@Nullable
@Override
public DBWNetworkProfile getNetworkProfile(@Nullable String source, @NotNull String name) {
return dataSourceRegistry.getNetworkProfile(source, name);
public DBWNetworkProfile getNetworkProfile(String name) {
return dataSourceRegistry.getNetworkProfile(name);
}
@NotNull
@@ -223,18 +219,18 @@ public class WebDataSourceRegistryProxy implements DBPDataSourceRegistry, DataSo
}
@Override
public void updateNetworkProfile(@NotNull DBWNetworkProfile profile) {
public void updateNetworkProfile(DBWNetworkProfile profile) {
dataSourceRegistry.updateNetworkProfile(profile);
}
@Override
public void removeNetworkProfile(@NotNull DBWNetworkProfile profile) {
public void removeNetworkProfile(DBWNetworkProfile profile) {
dataSourceRegistry.removeNetworkProfile(profile);
}
@Nullable
@Override
public DBAAuthProfile getAuthProfile(@NotNull String id) {
public DBAAuthProfile getAuthProfile(String id) {
return dataSourceRegistry.getAuthProfile(id);
}
@@ -251,15 +247,10 @@ public class WebDataSourceRegistryProxy implements DBPDataSourceRegistry, DataSo
}
@Override
public void updateAuthProfile(@NotNull DBAAuthProfile profile) {
public void updateAuthProfile(DBAAuthProfile profile) {
dataSourceRegistry.updateAuthProfile(profile);
}
@Override
public void setAuthProfiles(@NotNull Collection<DBAAuthProfile> profiles) {
dataSourceRegistry.setAuthProfiles(profiles);
}
@Override
public void removeAuthProfile(DBAAuthProfile profile) {
dataSourceRegistry.removeAuthProfile(profile);
@@ -280,7 +271,6 @@ public class WebDataSourceRegistryProxy implements DBPDataSourceRegistry, DataSo
dataSourceRegistry.refreshConfig(dataSourceIds);
}
@Nullable
@Override
public Throwable getLastError() {
return dataSourceRegistry.getLastError();
@@ -297,7 +287,7 @@ public class WebDataSourceRegistryProxy implements DBPDataSourceRegistry, DataSo
}
@Override
public void notifyDataSourceListeners(@NotNull DBPEvent event) {
public void notifyDataSourceListeners(DBPEvent event) {
dataSourceRegistry.notifyDataSourceListeners(event);
}
@@ -317,18 +307,11 @@ public class WebDataSourceRegistryProxy implements DBPDataSourceRegistry, DataSo
dataSourceRegistry.setAuthCredentialsProvider(authCredentialsProvider);
}
@NotNull
@Override
public Set<DBPDataSourceFolder> getTemporaryFolders() {
return dataSourceRegistry.getTemporaryFolders();
}
@NotNull
@Override
public DBPPreferenceStore getPreferenceStore() {
return dataSourceRegistry.getPreferenceStore();
}
@Override
public boolean loadDataSources(
@NotNull List<DBPDataSourceConfigurationStorage> storages,
@@ -1,6 +1,6 @@
/*
* DBeaver - Universal Database Manager
* Copyright (C) 2010-2024 DBeaver Corp and others
* Copyright (C) 2010-2023 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.
@@ -1,6 +1,6 @@
/*
* DBeaver - Universal Database Manager
* Copyright (C) 2010-2024 DBeaver Corp and others
* Copyright (C) 2010-2023 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.
@@ -17,13 +17,11 @@
package io.cloudbeaver;
import org.jkiss.code.NotNull;
import org.jkiss.code.Nullable;
import org.jkiss.dbeaver.DBException;
import org.jkiss.dbeaver.Log;
import org.jkiss.dbeaver.model.app.DBPDataSourceRegistry;
import org.jkiss.dbeaver.model.app.DBPWorkspace;
import org.jkiss.dbeaver.model.auth.SMSessionContext;
import org.jkiss.dbeaver.model.preferences.DBPPreferenceStore;
import org.jkiss.dbeaver.model.rm.RMController;
import org.jkiss.dbeaver.model.rm.RMProject;
import org.jkiss.dbeaver.registry.rm.DataSourceRegistryRM;
@@ -31,21 +29,17 @@ import org.jkiss.dbeaver.runtime.DBWorkbench;
public abstract class WebProjectImpl extends BaseWebProjectImpl {
private static final Log log = Log.getLog(WebProjectImpl.class);
@NotNull
private final DBPPreferenceStore preferenceStore;
public WebProjectImpl(
@NotNull DBPWorkspace workspace,
@NotNull RMController resourceController,
@NotNull SMSessionContext sessionContext,
@NotNull RMProject project,
@NotNull DataSourceFilter dataSourceFilter,
@NotNull DBPPreferenceStore preferenceStore
@NotNull DataSourceFilter dataSourceFilter
) {
super(workspace, resourceController, sessionContext, project, dataSourceFilter);
this.preferenceStore = preferenceStore;
}
@Nullable
@Override
public Object getProjectProperty(String propName) {
try {
@@ -57,7 +51,7 @@ public abstract class WebProjectImpl extends BaseWebProjectImpl {
}
@Override
public void setProjectProperty(@NotNull String propName, @Nullable Object propValue) {
public void setProjectProperty(String propName, Object propValue) {
try {
getResourceController().setProjectProperty(getId(), propName, propValue);
} catch (DBException e) {
@@ -74,7 +68,7 @@ public abstract class WebProjectImpl extends BaseWebProjectImpl {
@Override
protected DBPDataSourceRegistry createDataSourceRegistry() {
return new WebDataSourceRegistryProxy(
new DataSourceRegistryRM(this, getResourceController(), preferenceStore),
new DataSourceRegistryRM(this, getResourceController()),
dataSourceFilter
);
}
@@ -1,6 +1,6 @@
/*
* DBeaver - Universal Database Manager
* Copyright (C) 2010-2024 DBeaver Corp and others
* Copyright (C) 2010-2023 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.
@@ -26,19 +26,8 @@ public class WebSessionProjectImpl extends WebProjectImpl {
private final WebSession webSession;
public WebSessionProjectImpl(
@NotNull WebSession webSession,
@NotNull RMProject project,
@NotNull DataSourceFilter dataSourceFilter
) {
super(
webSession.getWorkspace(),
webSession.getRmController(),
webSession.getSessionContext(),
project,
dataSourceFilter,
webSession.getUserPreferenceStore()
);
public WebSessionProjectImpl(@NotNull WebSession webSession, @NotNull RMProject project, @NotNull DataSourceFilter dataSourceFilter) {
super(webSession.getWorkspace(), webSession.getRmController(), webSession.getSessionContext(), project, dataSourceFilter);
this.webSession = webSession;
}
@@ -1,6 +1,6 @@
/*
* DBeaver - Universal Database Manager
* Copyright (C) 2010-2024 DBeaver Corp and others
* Copyright (C) 2010-2023 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.
@@ -25,7 +25,6 @@ public interface CBAuthConstants {
String CB_AUTH_ID_REQUEST_PARAM = "authId";
String CB_AUTO_LOGIN_REQUEST_PARAM = "autoLogin";
String CB_REDIRECT_URL_REQUEST_PARAM = "redirectUrl";
String CB_FORCE_SESSIONS_LOGOUT = "forceSessionsLogout";
// Default max idle time (10 minutes)
long MAX_SESSION_IDLE_TIME = 10 * 60 * 1000;
@@ -1,6 +1,6 @@
/*
* DBeaver - Universal Database Manager
* Copyright (C) 2010-2024 DBeaver Corp and others
* Copyright (C) 2010-2023 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.
@@ -1,6 +1,6 @@
/*
* DBeaver - Universal Database Manager
* Copyright (C) 2010-2024 DBeaver Corp and others
* Copyright (C) 2010-2023 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.
@@ -1,6 +1,6 @@
/*
* DBeaver - Universal Database Manager
* Copyright (C) 2010-2024 DBeaver Corp and others
* Copyright (C) 2010-2023 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.
@@ -1,6 +1,6 @@
/*
* DBeaver - Universal Database Manager
* Copyright (C) 2010-2024 DBeaver Corp and others
* Copyright (C) 2010-2023 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.
@@ -19,7 +19,6 @@ package io.cloudbeaver.auth;
import org.jkiss.code.NotNull;
import org.jkiss.code.Nullable;
import org.jkiss.dbeaver.DBException;
import org.jkiss.dbeaver.model.security.SMAuthProviderCustomConfiguration;
import java.util.Map;
@@ -27,25 +26,21 @@ import java.util.Map;
* Federated auth provider.
* Provides links to external auth resource
*/
public interface SMAuthProviderFederated extends SMSignOutLinkProvider {
public interface SMAuthProviderFederated {
/**
* Returns new identifying credentials which can be used to find/create user in database
*/
@NotNull
String getSignInLink(String id, @NotNull Map<String, Object> providerConfig) throws DBException;
@Override
default String getUserSignOutLink(
@NotNull SMAuthProviderCustomConfiguration providerConfig,
@NotNull Map<String, Object> userCredentials
) throws DBException {
return getCommonSignOutLink(providerConfig.getId(), providerConfig.getParameters());
}
@NotNull
String getSignOutLink(String id, @NotNull Map<String, Object> providerConfig) throws DBException;
@Nullable
String getMetadataLink(String id, @NotNull Map<String, Object> providerConfig) throws DBException;
@Nullable
String getAcsLink(String id, @NotNull Map<String, Object> providerConfig) throws DBException;
@Nullable
default String getRedirectLink(String id, @NotNull Map<String, Object> providerConfig) throws DBException {
return null;
@@ -1,6 +1,6 @@
/*
* DBeaver - Universal Database Manager
* Copyright (C) 2010-2024 DBeaver Corp and others
* Copyright (C) 2010-2023 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.
@@ -1,25 +0,0 @@
/*
* 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;
import org.jkiss.code.NotNull;
import java.util.Map;
public interface SMBruteForceProtected {
Object getInputUsername(@NotNull Map<String, Object> cred);
}
@@ -1,37 +0,0 @@
/*
* 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;
import org.jkiss.code.NotNull;
import org.jkiss.dbeaver.DBException;
import org.jkiss.dbeaver.model.security.SMAuthProviderCustomConfiguration;
import java.util.Map;
public interface SMSignOutLinkProvider {
/**
* @return a common link for logout, not related with the user context
*/
@NotNull
String getCommonSignOutLink(String id, @NotNull Map<String, Object> providerConfig) throws DBException;
String getUserSignOutLink(
@NotNull SMAuthProviderCustomConfiguration providerConfig,
@NotNull Map<String, Object> userCredentials
) throws DBException;
}
@@ -1,6 +1,6 @@
/*
* DBeaver - Universal Database Manager
* Copyright (C) 2010-2024 DBeaver Corp and others
* Copyright (C) 2010-2023 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.
@@ -1,6 +1,6 @@
/*
* DBeaver - Universal Database Manager
* Copyright (C) 2010-2024 DBeaver Corp and others
* Copyright (C) 2010-2023 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.
@@ -1,79 +0,0 @@
/*
* 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;
}
}
@@ -1,6 +1,6 @@
/*
* DBeaver - Universal Database Manager
* Copyright (C) 2010-2024 DBeaver Corp and others
* Copyright (C) 2010-2023 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.
@@ -1,6 +1,6 @@
/*
* DBeaver - Universal Database Manager
* Copyright (C) 2010-2024 DBeaver Corp and others
* Copyright (C) 2010-2023 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.
@@ -31,8 +31,4 @@ public interface SMProvisioner {
@NotNull SMAuthProviderCustomConfiguration customConfiguration,
@NotNull SMProvisioningFilter filter
) throws DBException;
default boolean isAuthRoleProvided(SMAuthProviderCustomConfiguration configuration) {
return false;
}
}
@@ -1,30 +0,0 @@
package io.cloudbeaver.model;
import org.jkiss.code.NotNull;
import org.jkiss.dbeaver.DBException;
import org.jkiss.dbeaver.model.DBPDataSourceContainer;
import org.jkiss.dbeaver.model.DBPDataSourceHandler;
import org.jkiss.dbeaver.model.connection.DBPDriver;
import org.jkiss.dbeaver.model.runtime.DBRProgressMonitor;
public abstract class BaseDatasourceAccessCheckHandler implements DBPDataSourceHandler {
@Override
public void beforeConnect(
DBRProgressMonitor monitor,
@NotNull DBPDataSourceContainer dataSourceContainer
) throws DBException {
if (isDriverDisabled(dataSourceContainer.getDriver())) {
throw new DBException("Driver disabled");
}
}
@Override
public void beforeDisconnect(
DBRProgressMonitor monitor,
@NotNull DBPDataSourceContainer dataSourceContainer
) throws DBException {
}
protected abstract boolean isDriverDisabled(DBPDriver driver);
}
@@ -1,6 +1,6 @@
/*
* DBeaver - Universal Database Manager
* Copyright (C) 2010-2024 DBeaver Corp and others
* Copyright (C) 2010-2023 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.
@@ -1,6 +1,6 @@
/*
* DBeaver - Universal Database Manager
* Copyright (C) 2010-2024 DBeaver Corp and others
* Copyright (C) 2010-2023 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.
@@ -1,6 +1,6 @@
/*
* DBeaver - Universal Database Manager
* Copyright (C) 2010-2024 DBeaver Corp and others
* Copyright (C) 2010-2023 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.
@@ -1,6 +1,6 @@
/*
* DBeaver - Universal Database Manager
* Copyright (C) 2010-2024 DBeaver Corp and others
* Copyright (C) 2010-2023 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.
@@ -443,17 +443,4 @@ public class WebConnectionInfo {
closeListeners.add(listener);
}
@Property
public int getKeepAliveInterval() {
return dataSourceContainer.getConnectionConfiguration().getKeepAliveInterval();
}
@Property
public List<WebSecretInfo> getSharedSecrets() throws DBException {
return dataSourceContainer.listSharedCredentials()
.stream()
.map(WebSecretInfo::new)
.collect(Collectors.toList());
}
}
@@ -1,6 +1,6 @@
/*
* DBeaver - Universal Database Manager
* Copyright (C) 2010-2024 DBeaver Corp and others
* Copyright (C) 2010-2023 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.
@@ -1,6 +1,6 @@
/*
* DBeaver - Universal Database Manager
* Copyright (C) 2010-2024 DBeaver Corp and others
* Copyright (C) 2010-2023 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.
@@ -20,8 +20,6 @@ import org.jkiss.code.NotNull;
import org.jkiss.dbeaver.model.net.DBWHandlerConfiguration;
import org.jkiss.dbeaver.model.net.DBWHandlerType;
import org.jkiss.dbeaver.model.net.ssh.SSHConstants;
import org.jkiss.dbeaver.model.preferences.DBPPropertyDescriptor;
import org.jkiss.dbeaver.registry.RegistryConstants;
import org.jkiss.utils.CommonUtils;
import java.util.LinkedHashMap;
@@ -85,11 +83,8 @@ public class WebNetworkHandlerConfig {
@NotNull
public Map<String, String> getSecureProperties() {
Map<String, String> secureProperties = new LinkedHashMap<>(configuration.getSecureProperties());
DBPPropertyDescriptor[] descriptor = configuration.getHandlerDescriptor().getHandlerProperties();
for (DBPPropertyDescriptor p : descriptor) {
if (p.hasFeature(RegistryConstants.ATTR_PASSWORD)) {
secureProperties.computeIfPresent(p.getId(), (k, v) -> CommonUtils.isEmpty(v) ? null : WebConnectionInfo.SECURED_VALUE);
}
for (Map.Entry<String, String> property : secureProperties.entrySet()) {
property.setValue(CommonUtils.isEmpty(property.getValue()) ? null : WebConnectionInfo.SECURED_VALUE);
}
return secureProperties;
}
@@ -1,6 +1,6 @@
/*
* DBeaver - Universal Database Manager
* Copyright (C) 2010-2024 DBeaver Corp and others
* Copyright (C) 2010-2023 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.
@@ -1,6 +1,6 @@
/*
* DBeaver - Universal Database Manager
* Copyright (C) 2010-2024 DBeaver Corp and others
* Copyright (C) 2010-2023 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.
@@ -1,6 +1,6 @@
/*
* DBeaver - Universal Database Manager
* Copyright (C) 2010-2024 DBeaver Corp and others
* Copyright (C) 2010-2023 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.
@@ -27,6 +27,7 @@ import org.jkiss.dbeaver.model.rm.RMResourceType;
import org.jkiss.utils.ArrayUtils;
import java.util.ArrayList;
import java.util.Collections;
public class WebProjectInfo {
private final WebSession session;
@@ -1,6 +1,6 @@
/*
* DBeaver - Universal Database Manager
* Copyright (C) 2010-2024 DBeaver Corp and others
* Copyright (C) 2010-2023 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.
@@ -18,7 +18,6 @@ package io.cloudbeaver.model;
import io.cloudbeaver.model.session.WebSession;
import org.jkiss.code.NotNull;
import org.jkiss.code.Nullable;
import org.jkiss.dbeaver.DBException;
import org.jkiss.dbeaver.model.*;
import org.jkiss.dbeaver.model.connection.DBPDriverConfigurationType;
@@ -28,7 +27,6 @@ import org.jkiss.dbeaver.model.meta.Property;
import org.jkiss.dbeaver.model.meta.PropertyLength;
import org.jkiss.dbeaver.model.preferences.DBPPropertyDescriptor;
import org.jkiss.dbeaver.model.preferences.DBPPropertySource;
import org.jkiss.dbeaver.registry.settings.ProductSettingDescriptor;
import org.jkiss.dbeaver.runtime.properties.ObjectPropertyDescriptor;
import org.jkiss.utils.CommonUtils;
@@ -90,11 +88,6 @@ public class WebPropertyInfo {
}
}
@Property
public String getHint() {
return property.getHint();
}
@Property
public int getOrder() {
return property instanceof ObjectPropertyDescriptor ? ((ObjectPropertyDescriptor) property).getOrderNumber() : -1;
@@ -175,11 +168,6 @@ public class WebPropertyInfo {
return new String[0];
}
@Property
public boolean isRequired() {
return property.isRequired();
}
public boolean hasFeature(@NotNull String feature) {
return property.hasFeature(feature);
}
@@ -244,12 +232,4 @@ public class WebPropertyInfo {
return CommonUtils.toString(value);
}
@Nullable
@Property
public List<String> getScopes() {
if (property instanceof ProductSettingDescriptor productSettingDescriptor) {
return productSettingDescriptor.getScopes();
}
return null;
}
}
@@ -1,38 +0,0 @@
/*
* 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.model;
import org.jkiss.dbeaver.model.meta.Property;
import org.jkiss.dbeaver.model.secret.DBSSecretValue;
public class WebSecretInfo {
private final DBSSecretValue secretValue;
public WebSecretInfo(DBSSecretValue secretValue) {
this.secretValue = secretValue;
}
@Property
public String getDisplayName() {
return secretValue.getDisplayName();
}
@Property
public String getSecretId() {
return secretValue.getUniqueId();
}
}
@@ -1,6 +1,6 @@
/*
* DBeaver - Universal Database Manager
* Copyright (C) 2010-2024 DBeaver Corp and others
* Copyright (C) 2010-2023 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.
@@ -1,6 +1,6 @@
/*
* DBeaver - Universal Database Manager
* Copyright (C) 2010-2024 DBeaver Corp and others
* Copyright (C) 2010-2023 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.
@@ -17,17 +17,26 @@
package io.cloudbeaver.model;
import io.cloudbeaver.utils.CBModelConstants;
import org.jkiss.dbeaver.model.websocket.event.MessageType;
import java.io.PrintWriter;
import java.io.StringWriter;
import java.time.Instant;
import java.time.LocalDateTime;
import java.time.ZoneId;
/**
* Web server message
*/
public class WebServerMessage {
public enum MessageType {
DEBUG,
INFO,
WARNING,
ERROR
}
private final MessageType type;
private final Instant time;
private final String message;
@@ -1,6 +1,6 @@
/*
* DBeaver - Universal Database Manager
* Copyright (C) 2010-2024 DBeaver Corp and others
* Copyright (C) 2010-2023 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.
@@ -1,34 +0,0 @@
/*
* 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.model.app;
import com.google.gson.Gson;
import com.google.gson.GsonBuilder;
/**
* Abstract class that contains methods for loading configuration with gson.
*/
public abstract class BaseServerConfigurationController<T extends WebServerConfiguration> implements WebServerConfigurationController<T> {
protected Gson getGson() {
return getGsonBuilder().create();
}
protected abstract GsonBuilder getGsonBuilder();
public abstract T getServerConfiguration();
}
@@ -1,6 +1,6 @@
/*
* DBeaver - Universal Database Manager
* Copyright (C) 2010-2024 DBeaver Corp and others
* Copyright (C) 2010-2023 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.
@@ -29,18 +29,16 @@ public abstract class BaseWebAppConfiguration implements WebAppConfiguration {
public static final String DEFAULT_APP_ANONYMOUS_TEAM_NAME = "user";
protected final Map<String, Object> plugins;
protected String defaultUserTeam = DEFAULT_APP_ANONYMOUS_TEAM_NAME;
protected String defaultUserTeam;
protected boolean resourceManagerEnabled;
protected boolean showReadOnlyConnectionInfo;
protected String[] enabledFeatures;
protected String[] disabledBetaFeatures;
public BaseWebAppConfiguration() {
this.plugins = new LinkedHashMap<>();
this.defaultUserTeam = DEFAULT_APP_ANONYMOUS_TEAM_NAME;
this.resourceManagerEnabled = true;
this.enabledFeatures = null;
this.disabledBetaFeatures = new String[0];
this.showReadOnlyConnectionInfo = false;
}
@@ -49,7 +47,6 @@ public abstract class BaseWebAppConfiguration implements WebAppConfiguration {
this.defaultUserTeam = src.defaultUserTeam;
this.resourceManagerEnabled = src.resourceManagerEnabled;
this.enabledFeatures = src.enabledFeatures;
this.disabledBetaFeatures = src.disabledBetaFeatures;
this.showReadOnlyConnectionInfo = src.showReadOnlyConnectionInfo;
}
@@ -108,8 +105,4 @@ public abstract class BaseWebAppConfiguration implements WebAppConfiguration {
public boolean isShowReadOnlyConnectionInfo() {
return showReadOnlyConnectionInfo;
}
public String[] getDisabledBetaFeatures() {
return disabledBetaFeatures;
}
}
@@ -1,6 +1,6 @@
/*
* DBeaver - Universal Database Manager
* Copyright (C) 2010-2024 DBeaver Corp and others
* Copyright (C) 2010-2023 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.
@@ -33,7 +33,6 @@ import org.jkiss.dbeaver.model.DBFileController;
import org.jkiss.dbeaver.model.app.DBPPlatform;
import org.jkiss.dbeaver.model.app.DBPWorkspace;
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;
@@ -41,7 +40,6 @@ import org.jkiss.dbeaver.model.rm.RMProject;
import org.jkiss.dbeaver.model.secret.DBSSecretController;
import org.jkiss.dbeaver.model.websocket.event.WSEventController;
import org.jkiss.dbeaver.registry.BaseApplicationImpl;
import org.jkiss.dbeaver.registry.BaseWorkspaceImpl;
import org.jkiss.dbeaver.runtime.IVariableResolver;
import org.jkiss.dbeaver.utils.GeneralUtils;
import org.jkiss.dbeaver.utils.RuntimeUtils;
@@ -65,8 +63,6 @@ public abstract class BaseWebApplication extends BaseApplicationImpl implements
private static final Log log = Log.getLog(BaseWebApplication.class);
private String instanceId;
@NotNull
@Override
public DBPWorkspace createWorkspace(@NotNull DBPPlatform platform, @NotNull IWorkspace eclipseWorkspace) {
@@ -103,21 +99,31 @@ public abstract class BaseWebApplication extends BaseApplicationImpl implements
return true;
}
protected boolean loadServerConfiguration() throws DBException {
@Nullable
protected Path loadServerConfiguration() throws DBException {
Path configFilePath = getMainConfigurationFilePath().toAbsolutePath();
Path configFolder = configFilePath.getParent();
// Configure logging
Path logbackConfigPath = getLogbackConfigPath(configFolder);
if (logbackConfigPath == null) {
System.err.println("Can't find slf4j configuration file in " + configFilePath.getParent());
} else {
System.setProperty("logback.configurationFile", logbackConfigPath.toString());
}
Log.setLogHandler(new SLF4JLogHandler());
// Load config file
log.debug("Loading configuration from " + configFilePath);
try {
getServerConfigurationController().loadServerConfiguration(configFilePath);
loadConfiguration(configFilePath);
} catch (Exception e) {
log.error("Error parsing configuration", e);
return false;
return null;
}
return true;
return configFilePath;
}
@Nullable
@@ -136,15 +142,7 @@ public abstract class BaseWebApplication extends BaseApplicationImpl implements
return null;
}
public Path getLogbackConfigPath() {
Path configFilePath = getMainConfigurationFilePath().toAbsolutePath();
Path configFolder = configFilePath.getParent();
// Configure logging
return getLogbackConfigPath(configFolder);
}
protected Path getMainConfigurationFilePath() {
private Path getMainConfigurationFilePath() {
String configPath = DEFAULT_CONFIG_FILE_PATH;
String[] args = Platform.getCommandLineArgs();
@@ -170,6 +168,8 @@ public abstract class BaseWebApplication extends BaseApplicationImpl implements
return Files.exists(customConfigPath) ? customConfigPath : configPath.resolve(fileName);
}
protected abstract void loadConfiguration(Path configPath) throws DBException;
@Override
public WebProjectImpl createProjectImpl(
@NotNull WebSession webSession,
@@ -189,21 +189,16 @@ public abstract class BaseWebApplication extends BaseApplicationImpl implements
* Advanced apps may implement it differently.
*/
@Override
public DBSSecretController getSecretController(
@NotNull SMCredentialsProvider credentialsProvider,
SMSessionContext smSessionContext
) throws DBException {
public DBSSecretController getSecretController(@NotNull SMCredentialsProvider credentialsProvider) throws DBException {
return VoidSecretController.INSTANCE;
}
public static Map<String, Object> getServerConfigProps(Map<String, Object> configProps) {
protected Map<String, Object> getServerConfigProps(Map<String, Object> configProps) {
return JSONUtils.getObject(configProps, "server");
}
@SuppressWarnings("unchecked")
public static void patchConfigurationWithProperties(
Map<String, Object> configProps, IVariableResolver varResolver
) {
public static void patchConfigurationWithProperties(Map<String, Object> configProps, IVariableResolver varResolver) {
for (Map.Entry<String, Object> entry : configProps.entrySet()) {
Object propValue = entry.getValue();
if (propValue instanceof String) {
@@ -226,7 +221,6 @@ public abstract class BaseWebApplication extends BaseApplicationImpl implements
@Override
public Object start(IApplicationContext context) {
initializeApplicationServices();
try {
startServer();
} catch (Exception e) {
@@ -238,27 +232,14 @@ public abstract class BaseWebApplication extends BaseApplicationImpl implements
protected abstract void startServer() throws DBException;
@Override
public synchronized String getApplicationInstanceId() throws DBException {
if (instanceId == null) {
try {
byte[] macAddress = RuntimeUtils.getLocalMacAddress();
instanceId = String.join(
"_",
ApplicationRegistry.getInstance().getApplication().getId(),
getWorkspaceIdProperty(), // 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);
}
public String getApplicationInstanceId() throws DBException {
try {
byte[] macAddress = RuntimeUtils.getLocalMacAddress();
String appId = ApplicationRegistry.getInstance().getApplication().getId();
return appId + "_" + CommonUtils.toHexString(macAddress) + getServerPort();
} catch (Exception e) {
throw new DBException("Error during generation instance id generation", e);
}
return instanceId;
}
@NotNull
public String getWorkspaceIdProperty() throws DBException {
return BaseWorkspaceImpl.readWorkspaceIdProperty();
}
public String getApplicationId() {
@@ -274,10 +255,4 @@ public abstract class BaseWebApplication extends BaseApplicationImpl implements
return null;
}
public abstract WebServerConfigurationController getServerConfigurationController();
@Override
public boolean isEnvironmentVariablesAccessible() {
return false;
}
}
@@ -1,6 +1,6 @@
/*
* DBeaver - Universal Database Manager
* Copyright (C) 2010-2024 DBeaver Corp and others
* Copyright (C) 2010-2023 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.
@@ -19,20 +19,12 @@ package io.cloudbeaver.model.app;
import org.jkiss.code.NotNull;
import org.jkiss.code.Nullable;
import org.jkiss.dbeaver.DBException;
import org.jkiss.dbeaver.model.auth.SMCredentialsProvider;
import org.jkiss.dbeaver.model.auth.SMSessionContext;
import org.jkiss.dbeaver.model.exec.DBCFeatureNotSupportedException;
import org.jkiss.dbeaver.model.secret.DBSSecretController;
import org.jkiss.dbeaver.model.secret.DBSSecretControllerAuthorized;
import org.jkiss.dbeaver.model.secret.DBSSecretObject;
import org.jkiss.dbeaver.model.secret.DBSSecretValue;
import java.util.List;
/**
* Void secret controller.
*/
public class VoidSecretController implements DBSSecretController, DBSSecretControllerAuthorized {
public class VoidSecretController implements DBSSecretController {
public static final VoidSecretController INSTANCE = new VoidSecretController();
@@ -42,30 +34,17 @@ public class VoidSecretController implements DBSSecretController, DBSSecretContr
@Nullable
@Override
public String getPrivateSecretValue(@NotNull String secretId) {
public String getSecretValue(@NotNull String secretId) {
return null;
}
@Override
public void setPrivateSecretValue(@NotNull String secretId, @Nullable String secretValue) throws DBException {
public void setSecretValue(@NotNull String secretId, @Nullable String secretValue) throws DBException {
throw new DBException("Secret controller is read-only");
}
@NotNull
@Override
public List<DBSSecretValue> discoverCurrentUserSecrets(@NotNull DBSSecretObject secretObject) throws DBException {
throw new DBCFeatureNotSupportedException("Secrets discovery not supported");
}
@Override
public void flushChanges() {
}
@Override
public void authorize(
@Nullable SMCredentialsProvider credentialsProvider,
@Nullable SMSessionContext smSessionContext
) throws DBException {
}
}
@@ -1,6 +1,6 @@
/*
* DBeaver - Universal Database Manager
* Copyright (C) 2010-2024 DBeaver Corp and others
* Copyright (C) 2010-2023 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.
@@ -1,6 +1,6 @@
/*
* DBeaver - Universal Database Manager
* Copyright (C) 2010-2024 DBeaver Corp and others
* Copyright (C) 2010-2023 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.
@@ -25,7 +25,6 @@ import org.jkiss.dbeaver.model.DBFileController;
import org.jkiss.dbeaver.model.app.DBPApplication;
import org.jkiss.dbeaver.model.app.DBPWorkspace;
import org.jkiss.dbeaver.model.auth.SMCredentialsProvider;
import org.jkiss.dbeaver.model.auth.SMSessionContext;
import org.jkiss.dbeaver.model.rm.RMController;
import org.jkiss.dbeaver.model.rm.RMProject;
import org.jkiss.dbeaver.model.secret.DBSSecretController;
@@ -43,8 +42,6 @@ public interface WebApplication extends DBPApplication {
WebAppConfiguration getAppConfiguration();
WebServerConfiguration getServerConfiguration();
Path getDataDirectory(boolean create);
Path getWorkspaceDirectory();
@@ -63,10 +60,7 @@ public interface WebApplication extends DBPApplication {
SMAdminController getAdminSecurityController(@NotNull SMCredentialsProvider credentialsProvider) throws DBException;
DBSSecretController getSecretController(
@NotNull SMCredentialsProvider credentialsProvider,
SMSessionContext smSessionContext
) throws DBException;
DBSSecretController getSecretController(@NotNull SMCredentialsProvider credentialsProvider) throws DBException;
RMController createResourceController(
@NotNull SMCredentialsProvider credentialsProvider,
@@ -1,6 +1,6 @@
/*
* DBeaver - Universal Database Manager
* Copyright (C) 2010-2024 DBeaver Corp and others
* Copyright (C) 2010-2023 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.
@@ -18,9 +18,6 @@
package io.cloudbeaver.model.app;
import io.cloudbeaver.auth.CBAuthConstants;
import org.jkiss.dbeaver.DBException;
import java.util.List;
public interface WebAuthApplication extends WebApplication {
WebAuthConfiguration getAuthConfiguration();
@@ -30,8 +27,4 @@ public interface WebAuthApplication extends WebApplication {
default long getMaxSessionIdleTime() {
return CBAuthConstants.MAX_SESSION_IDLE_TIME;
}
void flushConfiguration() throws DBException;
String getDefaultAuthRole();
}
@@ -1,6 +1,6 @@
/*
* DBeaver - Universal Database Manager
* Copyright (C) 2010-2024 DBeaver Corp and others
* Copyright (C) 2010-2023 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.
@@ -16,7 +16,6 @@
*/
package io.cloudbeaver.model.app;
import org.jkiss.code.NotNull;
import org.jkiss.code.Nullable;
import org.jkiss.dbeaver.model.security.SMAuthProviderCustomConfiguration;
@@ -37,6 +36,4 @@ public interface WebAuthConfiguration {
@Nullable
SMAuthProviderCustomConfiguration getAuthProviderConfiguration(String configId);
void addAuthProviderConfiguration(@NotNull SMAuthProviderCustomConfiguration config);
}
@@ -1,30 +0,0 @@
/*
* 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.model.app;
/**
* Web server configuration.
* Contains only server configuration properties.
*/
public interface WebServerConfiguration {
boolean isDevelMode();
default String getRootURI() {
return "";
}
}
@@ -1,34 +0,0 @@
/*
* 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.model.app;
import org.jkiss.dbeaver.DBException;
import java.nio.file.Path;
/**
* Server configuration controller.
* Works with app server configuration (loads, updates)
*/
public interface WebServerConfigurationController<T extends WebServerConfiguration> {
/**
* Loads server configuration.
*/
void loadServerConfiguration(Path configPath) throws DBException;
}
@@ -1,58 +0,0 @@
/*
* 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.model.fs;
import io.cloudbeaver.DBWebException;
import io.cloudbeaver.model.session.WebSession;
import org.jkiss.code.NotNull;
import org.jkiss.dbeaver.DBException;
import org.jkiss.dbeaver.model.fs.DBFVirtualFileSystem;
import org.jkiss.dbeaver.model.navigator.DBNModel;
import org.jkiss.dbeaver.model.navigator.DBNNode;
import org.jkiss.dbeaver.model.navigator.fs.DBNPathBase;
import org.jkiss.dbeaver.model.runtime.DBRProgressMonitor;
import java.nio.file.Path;
public class FSUtils {
@NotNull
public static String makeUniqueFsId(@NotNull DBFVirtualFileSystem fileSystem) {
return fileSystem.getType() + "://" + fileSystem.getId();
}
@NotNull
public static Path getPathFromNode(@NotNull WebSession webSession, @NotNull String nodePath) throws DBException {
DBNPathBase dbnPath = getNodeByPath(webSession, nodePath);
Path path = dbnPath.getPath();
if (path == null) {
throw new DBWebException("Path from node '" + nodePath + "' is empty");
}
return path;
}
@NotNull
public static DBNPathBase getNodeByPath(@NotNull WebSession webSession, @NotNull String nodePath) throws DBException {
DBRProgressMonitor monitor = webSession.getProgressMonitor();
DBNModel navigatorModel = webSession.getNavigatorModel();
DBNNode node = navigatorModel.getNodeByPath(monitor, nodePath);
if (!(node instanceof DBNPathBase dbnPath)) {
throw new DBWebException("Node '" + nodePath + "' is not found in File Systems");
}
return dbnPath;
}
}
@@ -1,18 +1,18 @@
/*
* DBeaver - Universal Database Manager
* Copyright (C) 2010-2024 DBeaver Corp and others
* Copyright (C) 2010-2023 DBeaver Corp
*
* 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
* All Rights Reserved.
*
* 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.
* NOTICE: All information contained herein is, and remains
* the property of DBeaver Corp and its suppliers, if any.
* The intellectual and technical concepts contained
* herein are proprietary to DBeaver Corp and its suppliers
* and may be covered by U.S. and Foreign Patents,
* patents in process, and are protected by trade secret or copyright law.
* Dissemination of this information or reproduction of this material
* is strictly forbidden unless prior written permission is obtained
* from DBeaver Corp.
*/
package io.cloudbeaver.model.rm;
@@ -56,25 +56,19 @@ public class DBNResourceManagerProject extends DBNAbstractResourceManagerNode {
return project.getId();
}
@NotNull
@Override
public String getNodeId() {
return project.getId();
}
@Override
public String getNodeType() {
return "rm.project";
}
@Override
public String getNodeDisplayName() {
public String getNodeName() {
return project.getDisplayName();
}
@Override
public String getLocalizedName(String locale) {
return getNodeDisplayName();
return getNodeName();
}
@Override
@@ -111,7 +105,6 @@ public class DBNResourceManagerProject extends DBNAbstractResourceManagerNode {
return ((DBNResourceManagerRoot) getParentNode()).getResourceController();
}
@Deprecated
@Override
public String getNodeItemPath() {
return getParentNode().getNodeItemPath() + "/" + getName();
@@ -125,7 +118,7 @@ public class DBNResourceManagerProject extends DBNAbstractResourceManagerNode {
@Override
public String toString() {
return getNodeDisplayName();
return getNodeName();
}
@@ -1,18 +1,18 @@
/*
* DBeaver - Universal Database Manager
* Copyright (C) 2010-2024 DBeaver Corp and others
* Copyright (C) 2010-2023 DBeaver Corp
*
* 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
* All Rights Reserved.
*
* 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.
* NOTICE: All information contained herein is, and remains
* the property of DBeaver Corp and its suppliers, if any.
* The intellectual and technical concepts contained
* herein are proprietary to DBeaver Corp and its suppliers
* and may be covered by U.S. and Foreign Patents,
* patents in process, and are protected by trade secret or copyright law.
* Dissemination of this information or reproduction of this material
* is strictly forbidden unless prior written permission is obtained
* from DBeaver Corp.
*/
package io.cloudbeaver.model.rm;
@@ -55,7 +55,7 @@ public class DBNResourceManagerResource extends DBNAbstractResourceManagerNode {
}
@Override
public String getNodeDisplayName() {
public String getNodeName() {
return resource.getName();
}
@@ -80,7 +80,7 @@ public class DBNResourceManagerResource extends DBNAbstractResourceManagerNode {
}
return DBIcon.TREE_FOLDER;
} else {
var fileExtension = IOUtils.getFileExtension(getNodeDisplayName());
var fileExtension = IOUtils.getFileExtension(getNodeName());
if (!CommonUtils.isEmpty(fileExtension)) {
RMProject project = getProjectNode();
if (project != null) {
@@ -154,10 +154,9 @@ public class DBNResourceManagerResource extends DBNAbstractResourceManagerNode {
throw new DBException("Can't detect resource root node");
}
@Deprecated
@Override
public String getNodeItemPath() {
return getParentNode().getNodeItemPath() + "/" + getNodeDisplayName();
return getParentNode().getNodeItemPath() + "/" + getNodeName();
}
@Override
@@ -175,7 +174,7 @@ public class DBNResourceManagerResource extends DBNAbstractResourceManagerNode {
String resourceName = resource.getName();
try {
if (newName.indexOf('.') == -1) {
String ext = IOUtils.getFileExtension(getNodeDisplayName());
String ext = IOUtils.getFileExtension(getNodeName());
if (!CommonUtils.isEmpty(ext)) {
newName += "." + ext;
}
@@ -194,7 +193,7 @@ public class DBNResourceManagerResource extends DBNAbstractResourceManagerNode {
@Override
public String toString() {
return getNodeDisplayName();
return getNodeName();
}
@Nullable
@@ -1,18 +1,18 @@
/*
* DBeaver - Universal Database Manager
* Copyright (C) 2010-2024 DBeaver Corp and others
* Copyright (C) 2010-2023 DBeaver Corp
*
* 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
* All Rights Reserved.
*
* 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.
* NOTICE: All information contained herein is, and remains
* the property of DBeaver Corp and its suppliers, if any.
* The intellectual and technical concepts contained
* herein are proprietary to DBeaver Corp and its suppliers
* and may be covered by U.S. and Foreign Patents,
* patents in process, and are protected by trade secret or copyright law.
* Dissemination of this information or reproduction of this material
* is strictly forbidden unless prior written permission is obtained
* from DBeaver Corp.
*/
package io.cloudbeaver.model.rm;
@@ -54,14 +54,8 @@ public class DBNResourceManagerRoot extends DBNNode implements DBPHiddenObject,
return "rm";
}
@NotNull
@Override
public String getNodeId() {
return "rm";
}
@Override
public String getNodeDisplayName() {
public String getNodeName() {
return "resources";
}
@@ -109,11 +103,10 @@ public class DBNResourceManagerRoot extends DBNNode implements DBPHiddenObject,
return projects;
}
@Deprecated
@Override
public String getNodeItemPath() {
// Path doesn't include project name
return NodePathType.ext.getPrefix() + getNodeDisplayName();
return NodePathType.ext.getPrefix() + getNodeName();
}
@Override
@@ -122,6 +115,11 @@ public class DBNResourceManagerRoot extends DBNNode implements DBPHiddenObject,
return this;
}
@Override
public String toString() {
return getNodeName();
}
@Override
public boolean isHidden() {
return true;
@@ -154,13 +152,8 @@ public class DBNResourceManagerRoot extends DBNNode implements DBPHiddenObject,
return;
}
var projectNode = getProjectNode(project);
var rmResourcePath = Arrays.stream(resourcePath.split("/"))
.filter(CommonUtils::isNotEmpty)
.toList();
projectNode.ifPresent(
dbnResourceManagerProject -> dbnResourceManagerProject.removeChildResourceNode(new ArrayDeque<>(
rmResourcePath))
);
var rmResourcePath = Arrays.asList(resourcePath.split("/"));
projectNode.ifPresent(dbnResourceManagerProject -> dbnResourceManagerProject.removeChildResourceNode(new ArrayDeque<>(rmResourcePath)));
}
@NotNull
@@ -1,6 +1,6 @@
/*
* DBeaver - Universal Database Manager
* Copyright (C) 2010-2024 DBeaver Corp and others
* Copyright (C) 2010-2023 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.
@@ -1,6 +1,6 @@
/*
* DBeaver - Universal Database Manager
* Copyright (C) 2010-2024 DBeaver Corp and others
* Copyright (C) 2010-2023 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.
@@ -43,12 +43,8 @@ import org.jkiss.dbeaver.model.runtime.VoidProgressMonitor;
import org.jkiss.dbeaver.model.security.SMController;
import org.jkiss.dbeaver.model.security.SMObjectType;
import org.jkiss.dbeaver.model.sql.DBQuotaException;
import org.jkiss.dbeaver.model.websocket.event.MessageType;
import org.jkiss.dbeaver.model.websocket.event.WSEventType;
import org.jkiss.dbeaver.model.websocket.event.WSSessionLogUpdatedEvent;
import org.jkiss.dbeaver.registry.*;
import org.jkiss.dbeaver.runtime.DBWorkbench;
import org.jkiss.dbeaver.utils.GeneralUtils;
import org.jkiss.utils.ArrayUtils;
import org.jkiss.utils.CommonUtils;
import org.jkiss.utils.IOUtils;
@@ -57,7 +53,6 @@ import org.jkiss.utils.Pair;
import java.io.IOException;
import java.nio.charset.StandardCharsets;
import java.nio.file.*;
import java.text.MessageFormat;
import java.time.OffsetDateTime;
import java.time.ZoneId;
import java.util.*;
@@ -282,7 +277,7 @@ public class LocalResourceController implements RMController {
throw new DBException("Error creating shared project path", e);
}
}
validateResourcePath(name);
validateResourcePath(name, PROJECT_REGEX);
RMProject project;
var projectPath = sharedProjectsPath.resolve(name);
if (Files.exists(projectPath)) {
@@ -311,8 +306,7 @@ public class LocalResourceController implements RMController {
RMProject project = makeProjectFromId(projectId, false);
Path targetPath = getProjectPath(projectId);
if (!Files.exists(targetPath)) {
log.debug(MessageFormat.format("Project folder ''{0}'' is not found", projectId));
return;
throw new DBException("Project '" + project.getName() + "' doesn't exists");
}
try {
log.debug("Deleting project '" + projectId + "'");
@@ -462,7 +456,6 @@ public class LocalResourceController implements RMController {
DBPDataSourceRegistry registry = project.getDataSourceRegistry();
var result = Path.of(folderPath);
var newName = result.getFileName().toString();
GeneralUtils.validateResourceName(newName);
var parent = result.getParent();
var parentFolder = parent == null ? null : registry.getFolder(parent.toString().replace("\\", "/"));
DBPDataSourceFolder newFolder = registry.addFolder(parentFolder, newName);
@@ -737,12 +730,6 @@ public class LocalResourceController implements RMController {
return makeResourcePath(projectId, getTargetPath(projectId, resourcePath), false).toArray(RMResource[]::new);
}
@Nullable
@Override
public RMResource getResource(@NotNull String projectId, @NotNull String resourcePath) throws DBException {
return makeResourceFromPath(projectId, getTargetPath(projectId, resourcePath), null, false, false, false);
}
@NotNull
@Override
public byte[] getResourceContents(@NotNull String projectId, @NotNull String resourcePath) throws DBException {
@@ -837,10 +824,19 @@ public class LocalResourceController implements RMController {
}
private void validateResourcePath(String resourcePath) throws DBException {
validateResourcePath(resourcePath, FILE_REGEX);
}
private void validateResourcePath(String resourcePath, String regex) throws DBException {
var fullPath = Paths.get(resourcePath);
for (Path path : fullPath) {
String fileName = IOUtils.getFileNameWithoutExtension(path);
GeneralUtils.validateResourceName(fileName);
if (path.toString().startsWith(".")) {
throw new DBException("Resource path '" + resourcePath + "' can't start with dot");
}
}
if (!resourcePath.matches(regex)) {
String illegalCharacters = resourcePath.replaceAll(regex, " ").strip();
throw new DBException("Resource path '" + resourcePath + "' contains illegal characters: " + illegalCharacters);
}
}
@@ -956,19 +952,7 @@ public class LocalResourceController implements RMController {
protected <T> T doProjectOperation(String projectId, RMFileOperation<T> operation) throws DBException {
for (RMFileOperationHandler fileHandler : fileHandlers) {
try {
fileHandler.projectOpened(projectId);
} catch (Exception e) {
if (credentialsProvider.getActiveUserCredentials() != null) {
WebAppUtils.getWebApplication().getEventController().addEvent(
new WSSessionLogUpdatedEvent(
WSEventType.SESSION_LOG_UPDATED,
credentialsProvider.getActiveUserCredentials().getSmSessionId(),
credentialsProvider.getActiveUserCredentials().getUserId(),
MessageType.ERROR,
e.getMessage()));
}
}
fileHandler.projectOpened(projectId);
}
return operation.doOperation();
}
@@ -978,15 +962,6 @@ public class LocalResourceController implements RMController {
try {
fileHandler.beforeFileRead(projectId, file);
} catch (Exception e) {
if (credentialsProvider.getActiveUserCredentials() != null) {
WebAppUtils.getWebApplication().getEventController().addEvent(
new WSSessionLogUpdatedEvent(
WSEventType.SESSION_LOG_UPDATED,
credentialsProvider.getActiveUserCredentials().getSmSessionId(),
credentialsProvider.getActiveUserCredentials().getUserId(),
MessageType.ERROR,
e.getMessage()));
}
log.error("Error before file reading", e);
}
}
@@ -1155,11 +1130,6 @@ public class LocalResourceController implements RMController {
return new Builder(workspace, credentialsProvider, smControllerSupplier);
}
@Override
public String ping() {
return "pong (RM)";
}
public static final class Builder {
private final SMCredentialsProvider credentialsProvider;
private final Supplier<SMController> smController;
@@ -1,6 +1,6 @@
/*
* DBeaver - Universal Database Manager
* Copyright (C) 2010-2024 DBeaver Corp and others
* Copyright (C) 2010-2023 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.
@@ -1,6 +1,6 @@
/*
* DBeaver - Universal Database Manager
* Copyright (C) 2010-2024 DBeaver Corp and others
* Copyright (C) 2010-2023 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.
@@ -1,6 +1,6 @@
/*
* DBeaver - Universal Database Manager
* Copyright (C) 2010-2024 DBeaver Corp and others
* Copyright (C) 2010-2023 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.
@@ -1,6 +1,6 @@
/*
* DBeaver - Universal Database Manager
* Copyright (C) 2010-2024 DBeaver Corp and others
* Copyright (C) 2010-2023 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.
@@ -1,6 +1,6 @@
/*
* DBeaver - Universal Database Manager
* Copyright (C) 2010-2024 DBeaver Corp and others
* Copyright (C) 2010-2023 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.
@@ -1,6 +1,6 @@
/*
* DBeaver - Universal Database Manager
* Copyright (C) 2010-2024 DBeaver Corp and others
* Copyright (C) 2010-2023 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.

Some files were not shown because too many files have changed in this diff Show More