From 2f07b23ff88cd66cf09673ede5d2b5a939d017b1 Mon Sep 17 00:00:00 2001 From: "denis.sinelnikov" Date: Wed, 4 Dec 2024 12:03:39 +0100 Subject: [PATCH 01/12] CB-5807. Implemented logic to get localized text by locale, translated global prefer and part of identity provider on en/ru --- .../registry/WebAuthProviderDescriptor.java | 2 ++ .../registry/WebAuthProviderProperty.java | 31 ++++++++++++++++++- .../META-INF/MANIFEST.MF | 1 + .../OSGI-INF/l10n/bundle.properties | 2 ++ .../OSGI-INF/l10n/bundle_ru.properties | 2 ++ .../io.cloudbeaver.server/build.properties | 1 + .../META-INF/MANIFEST.MF | 1 + .../OSGI-INF/l10n/bundle.properties | 19 ++++++++++++ .../OSGI-INF/l10n/bundle_ru.properties | 18 +++++++++++ .../build.properties | 1 + .../plugin.xml | 29 +++++++++-------- .../META-INF/MANIFEST.MF | 1 + .../OSGI-INF/l10n/bundle.properties | 16 ++++++++++ .../OSGI-INF/l10n/bundle_ru.properties | 16 ++++++++++ .../build.properties | 1 + .../plugin.xml | 16 +++++----- 16 files changed, 133 insertions(+), 24 deletions(-) create mode 100644 server/bundles/io.cloudbeaver.server/OSGI-INF/l10n/bundle.properties create mode 100644 server/bundles/io.cloudbeaver.server/OSGI-INF/l10n/bundle_ru.properties create mode 100644 server/bundles/io.cloudbeaver.service.ldap.auth/OSGI-INF/l10n/bundle.properties create mode 100644 server/bundles/io.cloudbeaver.service.ldap.auth/OSGI-INF/l10n/bundle_ru.properties create mode 100644 server/bundles/io.cloudbeaver.service.security/OSGI-INF/l10n/bundle.properties create mode 100644 server/bundles/io.cloudbeaver.service.security/OSGI-INF/l10n/bundle_ru.properties diff --git a/server/bundles/io.cloudbeaver.model/src/io/cloudbeaver/registry/WebAuthProviderDescriptor.java b/server/bundles/io.cloudbeaver.model/src/io/cloudbeaver/registry/WebAuthProviderDescriptor.java index 78a87c8fcb..4a47a4d323 100644 --- a/server/bundles/io.cloudbeaver.model/src/io/cloudbeaver/registry/WebAuthProviderDescriptor.java +++ b/server/bundles/io.cloudbeaver.model/src/io/cloudbeaver/registry/WebAuthProviderDescriptor.java @@ -22,6 +22,8 @@ import org.jkiss.dbeaver.DBException; import org.jkiss.dbeaver.Log; import org.jkiss.dbeaver.model.DBPImage; +import org.jkiss.dbeaver.model.DBPNamedObjectLocalized; +import org.jkiss.dbeaver.model.DBPObjectWithDescriptionLocalized; import org.jkiss.dbeaver.model.auth.AuthPropertyDescriptor; import org.jkiss.dbeaver.model.auth.SMAuthProvider; import org.jkiss.dbeaver.model.impl.AbstractDescriptor; diff --git a/server/bundles/io.cloudbeaver.model/src/io/cloudbeaver/registry/WebAuthProviderProperty.java b/server/bundles/io.cloudbeaver.model/src/io/cloudbeaver/registry/WebAuthProviderProperty.java index cf30e97988..9cd111c118 100644 --- a/server/bundles/io.cloudbeaver.model/src/io/cloudbeaver/registry/WebAuthProviderProperty.java +++ b/server/bundles/io.cloudbeaver.model/src/io/cloudbeaver/registry/WebAuthProviderProperty.java @@ -17,17 +17,27 @@ package io.cloudbeaver.registry; import org.eclipse.core.runtime.IConfigurationElement; +import org.eclipse.core.runtime.spi.RegistryContributor; import org.jkiss.code.NotNull; import org.jkiss.code.Nullable; +import org.jkiss.dbeaver.model.DBPNamedObjectLocalized; +import org.jkiss.dbeaver.model.DBPObjectWithDescriptionLocalized; import org.jkiss.dbeaver.model.impl.PropertyDescriptor; +import org.jkiss.dbeaver.utils.RuntimeUtils; +import org.osgi.framework.Bundle; +import org.osgi.framework.FrameworkUtil; -public class WebAuthProviderProperty extends PropertyDescriptor { +public class WebAuthProviderProperty extends PropertyDescriptor implements DBPNamedObjectLocalized, DBPObjectWithDescriptionLocalized { private final String[] requiredFeatures; @Nullable private final String type; + private final Bundle bundle; + public WebAuthProviderProperty(String category, IConfigurationElement config) { super(category, config); + bundle = FrameworkUtil.getBundle(getClass()).getBundleContext() + .getBundle(Long.parseLong(((RegistryContributor)config.getContributor()).getActualId())); String featuresAttr = config.getAttribute("requiredFeatures"); this.requiredFeatures = featuresAttr == null ? new String[0] : featuresAttr.split(","); this.type = config.getAttribute("type"); @@ -42,4 +52,23 @@ public String[] getRequiredFeatures() { public String getType() { return type; } + + @Override + public String getLocalizedName(String locale) { + try { + return RuntimeUtils.getBundleLocalization(bundle, locale).getString(this.getId()); + } catch (Exception e) { + return this.getName(); + } + } + + @Nullable + @Override + public String getLocalizedDescription(String locale) { + try { + return RuntimeUtils.getBundleLocalization(bundle, locale).getString(this.getId() + ".description"); + } catch (Exception e) { + return this.getDescription(); + } + } } diff --git a/server/bundles/io.cloudbeaver.server/META-INF/MANIFEST.MF b/server/bundles/io.cloudbeaver.server/META-INF/MANIFEST.MF index a7e70de63a..25f4864a82 100644 --- a/server/bundles/io.cloudbeaver.server/META-INF/MANIFEST.MF +++ b/server/bundles/io.cloudbeaver.server/META-INF/MANIFEST.MF @@ -37,4 +37,5 @@ Export-Package: io.cloudbeaver, io.cloudbeaver.service.navigator, io.cloudbeaver.service.sql Import-Package: org.slf4j +Bundle-Localization: OSGI-INF/l10n/bundle Automatic-Module-Name: io.cloudbeaver.server diff --git a/server/bundles/io.cloudbeaver.server/OSGI-INF/l10n/bundle.properties b/server/bundles/io.cloudbeaver.server/OSGI-INF/l10n/bundle.properties new file mode 100644 index 0000000000..3552b1a8df --- /dev/null +++ b/server/bundles/io.cloudbeaver.server/OSGI-INF/l10n/bundle.properties @@ -0,0 +1,2 @@ +log.api.graphql.debug = Enable detailed logging +log.api.graphql.debug.description = Enable detailed logging of GraphQL queries in the server log, including all provided variables \ No newline at end of file diff --git a/server/bundles/io.cloudbeaver.server/OSGI-INF/l10n/bundle_ru.properties b/server/bundles/io.cloudbeaver.server/OSGI-INF/l10n/bundle_ru.properties new file mode 100644 index 0000000000..ba1021b78d --- /dev/null +++ b/server/bundles/io.cloudbeaver.server/OSGI-INF/l10n/bundle_ru.properties @@ -0,0 +1,2 @@ +log.api.graphql.debug = \u0412\u043A\u043B\u044E\u0447\u0438\u0442\u044C \u043F\u043E\u0434\u0440\u043E\u0431\u043D\u043E\u0435 \u043B\u043E\u0433\u0433\u0438\u0440\u043E\u0432\u0430\u043D\u0438\u0435 +log.api.graphql.debug.description = \u0412\u043A\u043B\u044E\u0447\u0438\u0442\u0435 \u043F\u043E\u0434\u0440\u043E\u0431\u043D\u043E\u0435 \u043B\u043E\u0433\u0433\u0438\u0440\u043E\u0432\u0430\u043D\u0438\u0435 \u0437\u0430\u043F\u0440\u043E\u0441\u043E\u0432 GraphQL \u0432 \u0436\u0443\u0440\u043D\u0430\u043B\u0435 \u0441\u0435\u0440\u0432\u0435\u0440\u0430, \u0432\u043A\u043B\u044E\u0447\u0430\u044F \u0432\u0441\u0435 \u043F\u0440\u0435\u0434\u043E\u0441\u0442\u0430\u0432\u043B\u0435\u043D\u043D\u044B\u0435 \u043F\u0435\u0440\u0435\u043C\u0435\u043D\u043D\u044B\u0435 \ No newline at end of file diff --git a/server/bundles/io.cloudbeaver.server/build.properties b/server/bundles/io.cloudbeaver.server/build.properties index 0e7161380c..6728418a75 100644 --- a/server/bundles/io.cloudbeaver.server/build.properties +++ b/server/bundles/io.cloudbeaver.server/build.properties @@ -2,6 +2,7 @@ source.. = src/ output.. = target/classes/ bin.includes = .,\ META-INF/,\ + OSGI-INF/,\ schema/,\ static/,\ plugin.xml diff --git a/server/bundles/io.cloudbeaver.service.ldap.auth/META-INF/MANIFEST.MF b/server/bundles/io.cloudbeaver.service.ldap.auth/META-INF/MANIFEST.MF index aeb12d9208..4a0ee8d587 100644 --- a/server/bundles/io.cloudbeaver.service.ldap.auth/META-INF/MANIFEST.MF +++ b/server/bundles/io.cloudbeaver.service.ldap.auth/META-INF/MANIFEST.MF @@ -11,4 +11,5 @@ Bundle-ClassPath: . Require-Bundle: org.jkiss.dbeaver.model;visibility:=reexport, org.jkiss.dbeaver.registry;visibility:=reexport, io.cloudbeaver.model +Bundle-Localization: OSGI-INF/l10n/bundle Automatic-Module-Name: io.cloudbeaver.service.ldap.auth diff --git a/server/bundles/io.cloudbeaver.service.ldap.auth/OSGI-INF/l10n/bundle.properties b/server/bundles/io.cloudbeaver.service.ldap.auth/OSGI-INF/l10n/bundle.properties new file mode 100644 index 0000000000..2f8c680081 --- /dev/null +++ b/server/bundles/io.cloudbeaver.service.ldap.auth/OSGI-INF/l10n/bundle.properties @@ -0,0 +1,19 @@ +ldap-host = Host +ldap-host.description = LDAP server host +ldap-port = Port +ldap-port.description = LDAP server port, default is 389 +ldap-identifier-attr = User identifier attribute +ldap-identifier-attr.description = LDAP attribute used as a user ID. Will be automatically added to the beginning of the 'User DN' value during authorization if not explicitly specified +ldap-dn = Base Distinguished Name +ldap-dn.description = Base Distinguished Name applicable for all users, example: dc=myOrg,dc=com. Will be automatically added to the end of the 'User DN' value during authorization if not explicitly specified +ldap-bind-user = Bind User DN +ldap-bind-user.description = DN of user, who has permissions to search for users to check access to the application with the specified filter. +ldap-bind-user-pwd = Bind User Password +ldap-bind-user-pwd.description = Bind user password. +ldap-filter = User Filter +ldap-filter.description = Filter that will be used to verify users access to the application. To use the filter, the bind user configuration is mandatory. +user-dn = User DN +user-dn.description = LDAP user name +password = User password +password.description = LDAP user password + diff --git a/server/bundles/io.cloudbeaver.service.ldap.auth/OSGI-INF/l10n/bundle_ru.properties b/server/bundles/io.cloudbeaver.service.ldap.auth/OSGI-INF/l10n/bundle_ru.properties new file mode 100644 index 0000000000..77392d46d8 --- /dev/null +++ b/server/bundles/io.cloudbeaver.service.ldap.auth/OSGI-INF/l10n/bundle_ru.properties @@ -0,0 +1,18 @@ +ldap-host = \u0425\u043E\u0441\u0442 +ldap-host.description = \u0425\u043E\u0441\u0442 \u0441\u0435\u0440\u0432\u0435\u0440\u0430 LDAP +ldap-port = \u041F\u043E\u0440\u0442 +ldap-port.description = \u041F\u043E\u0440\u0442 LDAP-\u0441\u0435\u0440\u0432\u0435\u0440\u0430, \u043F\u043E \u0443\u043C\u043E\u043B\u0447\u0430\u043D\u0438\u044E 389 +ldap-identifier-attr = \u0410\u0442\u0440\u0438\u0431\u0443\u0442 \u0438\u0434\u0435\u043D\u0442\u0438\u0444\u0438\u043A\u0430\u0442\u043E\u0440\u0430 \u043F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u0442\u0435\u043B\u044F +ldap-identifier-attr.description = \u0410\u0442\u0440\u0438\u0431\u0443\u0442 LDAP, \u0438\u0441\u043F\u043E\u043B\u044C\u0437\u0443\u0435\u043C\u044B\u0439 \u0432 \u043A\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0438\u0434\u0435\u043D\u0442\u0438\u0444\u0438\u043A\u0430\u0442\u043E\u0440\u0430 \u043F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u0442\u0435\u043B\u044F. \u0411\u0443\u0434\u0435\u0442 \u0430\u0432\u0442\u043E\u043C\u0430\u0442\u0438\u0447\u0435\u0441\u043A\u0438 \u0434\u043E\u0431\u0430\u0432\u043B\u0435\u043D \u0432 \u043D\u0430\u0447\u0430\u043B\u043E \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u044F 'User DN' \u043F\u0440\u0438 \u0430\u0432\u0442\u043E\u0440\u0438\u0437\u0430\u0446\u0438\u0438, \u0435\u0441\u043B\u0438 \u043D\u0435 \u0443\u043A\u0430\u0437\u0430\u043D \u044F\u0432\u043D\u043E +ldap-dn = \u0411\u0430\u0437\u043E\u0432\u043E\u0435 \u043E\u0442\u043B\u0438\u0447\u0438\u0442\u0435\u043B\u044C\u043D\u043E\u0435 \u0438\u043C\u044F +ldap-dn.description = \u0411\u0430\u0437\u043E\u0432\u043E\u0435 \u043E\u0442\u043B\u0438\u0447\u0438\u0442\u0435\u043B\u044C\u043D\u043E\u0435 \u0438\u043C\u044F, \u043F\u0440\u0438\u043C\u0435\u043D\u0438\u043C\u043E\u0435 \u043A\u043E \u0432\u0441\u0435\u043C \u043F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u0442\u0435\u043B\u044F\u043C, \u043D\u0430\u043F\u0440\u0438\u043C\u0435\u0440: dc=myOrg,dc=com. \u0411\u0443\u0434\u0435\u0442 \u0430\u0432\u0442\u043E\u043C\u0430\u0442\u0438\u0447\u0435\u0441\u043A\u0438 \u0434\u043E\u0431\u0430\u0432\u043B\u0435\u043D\u043E \u0432 \u043A\u043E\u043D\u0435\u0446 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u044F 'User DN' \u043F\u0440\u0438 \u0430\u0432\u0442\u043E\u0440\u0438\u0437\u0430\u0446\u0438\u0438, \u0435\u0441\u043B\u0438 \u043D\u0435 \u0443\u043A\u0430\u0437\u0430\u043D\u043E \u044F\u0432\u043D\u043E +ldap-bind-user = \u041F\u0440\u0438\u0432\u044F\u0437\u043A\u0430 DN \u043F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u0442\u0435\u043B\u044F +ldap-bind-user.description = DN \u043F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u0442\u0435\u043B\u044F, \u043A\u043E\u0442\u043E\u0440\u044B\u0439 \u0438\u043C\u0435\u0435\u0442 \u043F\u0440\u0430\u0432\u0430 \u043D\u0430 \u043F\u043E\u0438\u0441\u043A \u043F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u0442\u0435\u043B\u0435\u0439 \u0434\u043B\u044F \u043F\u0440\u043E\u0432\u0435\u0440\u043A\u0438 \u0434\u043E\u0441\u0442\u0443\u043F\u0430 \u043A \u043F\u0440\u0438\u043B\u043E\u0436\u0435\u043D\u0438\u044E \u0441 \u0443\u043A\u0430\u0437\u0430\u043D\u043D\u044B\u043C \u0444\u0438\u043B\u044C\u0442\u0440\u043E\u043C. +ldap-bind-user-pwd = \u0421\u0432\u044F\u0437\u0430\u0442\u044C \u043F\u0430\u0440\u043E\u043B\u044C \u043F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u0442\u0435\u043B\u044F +ldap-bind-user-pwd.description = \u041F\u0440\u0438\u0432\u044F\u0437\u043A\u0430 \u043F\u0430\u0440\u043E\u043B\u044F \u043F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u0442\u0435\u043B\u044F. +ldap-filter = \u0424\u0438\u043B\u044C\u0442\u0440 \u043F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u0442\u0435\u043B\u044F +ldap-filter.description = \u0424\u0438\u043B\u044C\u0442\u0440, \u043A\u043E\u0442\u043E\u0440\u044B\u0439 \u0431\u0443\u0434\u0435\u0442 \u0438\u0441\u043F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u0442\u044C\u0441\u044F \u0434\u043B\u044F \u043F\u0440\u043E\u0432\u0435\u0440\u043A\u0438 \u0434\u043E\u0441\u0442\u0443\u043F\u0430 \u043F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u0442\u0435\u043B\u0435\u0439 \u043A \u043F\u0440\u0438\u043B\u043E\u0436\u0435\u043D\u0438\u044E. \u0414\u043B\u044F \u0438\u0441\u043F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u043D\u0438\u044F \u0444\u0438\u043B\u044C\u0442\u0440\u0430 \u043E\u0431\u044F\u0437\u0430\u0442\u0435\u043B\u044C\u043D\u0430 \u043D\u0430\u0441\u0442\u0440\u043E\u0439\u043A\u0430 bind user. +user-dn = \u0418\u043C\u044F \u043F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u0442\u0435\u043B\u044F DN +user-dn.description = LDAP \u0438\u043C\u044F \u043F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u0442\u0435\u043B\u044F +password = \u041F\u0430\u0440\u043E\u043B\u044C \u043F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u0442\u0435\u043B\u044F +password.description = LDAP \u043F\u0430\u0440\u043E\u043B\u044C \u043F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u0442\u0435\u043B\u044F diff --git a/server/bundles/io.cloudbeaver.service.ldap.auth/build.properties b/server/bundles/io.cloudbeaver.service.ldap.auth/build.properties index 95692a59c9..3c833df018 100644 --- a/server/bundles/io.cloudbeaver.service.ldap.auth/build.properties +++ b/server/bundles/io.cloudbeaver.service.ldap.auth/build.properties @@ -2,4 +2,5 @@ source.. = src/ output.. = target/classes/ bin.includes = .,\ META-INF/,\ + OSGI-INF/,\ plugin.xml diff --git a/server/bundles/io.cloudbeaver.service.ldap.auth/plugin.xml b/server/bundles/io.cloudbeaver.service.ldap.auth/plugin.xml index e908b7dc2a..c5c4b6bccb 100644 --- a/server/bundles/io.cloudbeaver.service.ldap.auth/plugin.xml +++ b/server/bundles/io.cloudbeaver.service.ldap.auth/plugin.xml @@ -10,30 +10,29 @@ > - - - + + - + - - - + - - + diff --git a/server/bundles/io.cloudbeaver.service.security/META-INF/MANIFEST.MF b/server/bundles/io.cloudbeaver.service.security/META-INF/MANIFEST.MF index 69fcfdb9bc..993bb39bfb 100644 --- a/server/bundles/io.cloudbeaver.service.security/META-INF/MANIFEST.MF +++ b/server/bundles/io.cloudbeaver.service.security/META-INF/MANIFEST.MF @@ -19,4 +19,5 @@ Export-Package: io.cloudbeaver.auth.provider.local, io.cloudbeaver.auth.provider.rp, io.cloudbeaver.service.security, io.cloudbeaver.service.security.db +Bundle-Localization: OSGI-INF/l10n/bundle Automatic-Module-Name: io.cloudbeaver.service.security diff --git a/server/bundles/io.cloudbeaver.service.security/OSGI-INF/l10n/bundle.properties b/server/bundles/io.cloudbeaver.service.security/OSGI-INF/l10n/bundle.properties new file mode 100644 index 0000000000..095f6731bc --- /dev/null +++ b/server/bundles/io.cloudbeaver.service.security/OSGI-INF/l10n/bundle.properties @@ -0,0 +1,16 @@ +logout-url = Logout URL +logout-url.description = Logout URL +user-header = Username header +user-header.description = Username header +team-header = Team header +team-header.description = Team header +team-delimiter = Team delimiter symbol +team-delimiter.description = Team delimiter symbol, default: | +first-name-header = First name header +first-name-header.description = First name header name +last-name-header = Last name header +last-name-header.description = Last name header name +full-name-header = Full name header +full-name-header.description = Full name header name +role-header = Role header +role-header.description = Role header name diff --git a/server/bundles/io.cloudbeaver.service.security/OSGI-INF/l10n/bundle_ru.properties b/server/bundles/io.cloudbeaver.service.security/OSGI-INF/l10n/bundle_ru.properties new file mode 100644 index 0000000000..e776a08af6 --- /dev/null +++ b/server/bundles/io.cloudbeaver.service.security/OSGI-INF/l10n/bundle_ru.properties @@ -0,0 +1,16 @@ +logout-url = URL-\u0430\u0434\u0440\u0435\u0441 \u0432\u044B\u0445\u043E\u0434\u0430 \u0438\u0437 \u0441\u0438\u0441\u0442\u0435\u043C\u044B +logout-url.description = URL-\u0430\u0434\u0440\u0435\u0441 \u0432\u044B\u0445\u043E\u0434\u0430 \u0438\u0437 \u0441\u0438\u0441\u0442\u0435\u043C\u044B +user-header = \u0417\u0430\u0433\u043E\u043B\u043E\u0432\u043E\u043A \u0438\u043C\u0435\u043D\u0438 \u043F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u0442\u0435\u043B\u044F +user-header.description = \u0417\u0430\u0433\u043E\u043B\u043E\u0432\u043E\u043A \u0438\u043C\u0435\u043D\u0438 \u043F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u0442\u0435\u043B\u044F +team-header = \u0417\u0430\u0433\u043E\u043B\u043E\u0432\u043E\u043A \u043A\u043E\u043C\u0430\u043D\u0434\u044B +team-header.description = \u0417\u0430\u0433\u043E\u043B\u043E\u0432\u043E\u043A \u043A\u043E\u043C\u0430\u043D\u0434\u044B +team-delimiter = \u0421\u0438\u043C\u0432\u043E\u043B \u0440\u0430\u0437\u0434\u0435\u043B\u0438\u0442\u0435\u043B\u044F \u043A\u043E\u043C\u0430\u043D\u0434 +team-delimiter.description = \u0421\u0438\u043C\u0432\u043E\u043B \u0440\u0430\u0437\u0434\u0435\u043B\u0438\u0442\u0435\u043B\u044F \u043A\u043E\u043C\u0430\u043D\u0434, \u043F\u043E \u0443\u043C\u043E\u043B\u0447\u0430\u043D\u0438\u044E: | +first-name-header = \u0417\u0430\u0433\u043E\u043B\u043E\u0432\u043E\u043A \u0438\u043C\u0435\u043D\u0438 +first-name-header.description = \u041D\u0430\u0437\u0432\u0430\u043D\u0438\u0435 \u0437\u0430\u0433\u043E\u043B\u043E\u0432\u043A\u0430 \u0438\u043C\u0435\u043D\u0438 +last-name-header = \u0417\u0430\u0433\u043E\u043B\u043E\u0432\u043E\u043A \u0444\u0430\u043C\u0438\u043B\u0438\u0438 +last-name-header.description = \u0418\u043C\u044F \u0437\u0430\u0433\u043E\u043B\u043E\u0432\u043A\u0430 \u0444\u0430\u043C\u0438\u043B\u0438\u0438 +full-name-header = \u0417\u0430\u0433\u043E\u043B\u043E\u0432\u043E\u043A \u043F\u043E\u043B\u043D\u043E\u0433\u043E \u0438\u043C\u0435\u043D\u0438 +full-name-header.description = \u0418\u043C\u044F \u0437\u0430\u0433\u043E\u043B\u043E\u0432\u043A\u0430 \u043F\u043E\u043B\u043D\u043E\u0433\u043E \u0438\u043C\u0435\u043D\u0438 +role-header = \u0417\u0430\u0433\u043E\u043B\u043E\u0432\u043E\u043A \u0440\u043E\u043B\u0438 +role-header.description = \u0418\u043C\u044F \u0437\u0430\u0433\u043E\u043B\u043E\u0432\u043A\u0430 \u0440\u043E\u043B\u0438 \ No newline at end of file diff --git a/server/bundles/io.cloudbeaver.service.security/build.properties b/server/bundles/io.cloudbeaver.service.security/build.properties index d9f1a1b5a9..261610303e 100644 --- a/server/bundles/io.cloudbeaver.service.security/build.properties +++ b/server/bundles/io.cloudbeaver.service.security/build.properties @@ -2,5 +2,6 @@ source.. = src/ output.. = target/classes/ bin.includes = .,\ META-INF/,\ + OSGI-INF/,\ db/,\ plugin.xml diff --git a/server/bundles/io.cloudbeaver.service.security/plugin.xml b/server/bundles/io.cloudbeaver.service.security/plugin.xml index e4b77aab29..64ed39e591 100644 --- a/server/bundles/io.cloudbeaver.service.security/plugin.xml +++ b/server/bundles/io.cloudbeaver.service.security/plugin.xml @@ -29,14 +29,14 @@ - - - - - - - - + + + + + + + + From 52d0d70d4a2754329eb67867e9c6a3752955f74a Mon Sep 17 00:00:00 2001 From: "denis.sinelnikov" Date: Tue, 10 Dec 2024 15:37:43 +0100 Subject: [PATCH 02/12] CB-5807. Refactor after review --- .../registry/WebAuthProviderProperty.java | 15 +++++++++++++-- .../OSGI-INF/l10n/bundle_ru.properties | 2 +- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/server/bundles/io.cloudbeaver.model/src/io/cloudbeaver/registry/WebAuthProviderProperty.java b/server/bundles/io.cloudbeaver.model/src/io/cloudbeaver/registry/WebAuthProviderProperty.java index 9cd111c118..32db0f32f9 100644 --- a/server/bundles/io.cloudbeaver.model/src/io/cloudbeaver/registry/WebAuthProviderProperty.java +++ b/server/bundles/io.cloudbeaver.model/src/io/cloudbeaver/registry/WebAuthProviderProperty.java @@ -17,6 +17,7 @@ package io.cloudbeaver.registry; import org.eclipse.core.runtime.IConfigurationElement; +import org.eclipse.core.runtime.Platform; import org.eclipse.core.runtime.spi.RegistryContributor; import org.jkiss.code.NotNull; import org.jkiss.code.Nullable; @@ -36,13 +37,23 @@ public class WebAuthProviderProperty extends PropertyDescriptor implements DBPNa public WebAuthProviderProperty(String category, IConfigurationElement config) { super(category, config); - bundle = FrameworkUtil.getBundle(getClass()).getBundleContext() - .getBundle(Long.parseLong(((RegistryContributor)config.getContributor()).getActualId())); + bundle = getBundle(config); String featuresAttr = config.getAttribute("requiredFeatures"); this.requiredFeatures = featuresAttr == null ? new String[0] : featuresAttr.split(","); this.type = config.getAttribute("type"); } + @NotNull + private Bundle getBundle(@NotNull IConfigurationElement config) { + final Bundle bundle; + String bundleName = config.getContributor().getName(); + bundle = Platform.getBundle(bundleName); + if (bundle == null) { + throw new IllegalStateException("Bundle '" + bundleName + "' not found"); + } + return bundle; + } + @NotNull public String[] getRequiredFeatures() { return requiredFeatures; diff --git a/server/bundles/io.cloudbeaver.server/OSGI-INF/l10n/bundle_ru.properties b/server/bundles/io.cloudbeaver.server/OSGI-INF/l10n/bundle_ru.properties index ba1021b78d..1ebf746727 100644 --- a/server/bundles/io.cloudbeaver.server/OSGI-INF/l10n/bundle_ru.properties +++ b/server/bundles/io.cloudbeaver.server/OSGI-INF/l10n/bundle_ru.properties @@ -1,2 +1,2 @@ log.api.graphql.debug = \u0412\u043A\u043B\u044E\u0447\u0438\u0442\u044C \u043F\u043E\u0434\u0440\u043E\u0431\u043D\u043E\u0435 \u043B\u043E\u0433\u0433\u0438\u0440\u043E\u0432\u0430\u043D\u0438\u0435 -log.api.graphql.debug.description = \u0412\u043A\u043B\u044E\u0447\u0438\u0442\u0435 \u043F\u043E\u0434\u0440\u043E\u0431\u043D\u043E\u0435 \u043B\u043E\u0433\u0433\u0438\u0440\u043E\u0432\u0430\u043D\u0438\u0435 \u0437\u0430\u043F\u0440\u043E\u0441\u043E\u0432 GraphQL \u0432 \u0436\u0443\u0440\u043D\u0430\u043B\u0435 \u0441\u0435\u0440\u0432\u0435\u0440\u0430, \u0432\u043A\u043B\u044E\u0447\u0430\u044F \u0432\u0441\u0435 \u043F\u0440\u0435\u0434\u043E\u0441\u0442\u0430\u0432\u043B\u0435\u043D\u043D\u044B\u0435 \u043F\u0435\u0440\u0435\u043C\u0435\u043D\u043D\u044B\u0435 \ No newline at end of file +log.api.graphql.debug.description = \u0412\u043A\u043B\u044E\u0447\u0438\u0442\u0435 \u043F\u043E\u0434\u0440\u043E\u0431\u043D\u043E\u0435 \u043B\u043E\u0433\u0438\u0440\u043E\u0432\u0430\u043D\u0438\u0435 \u0437\u0430\u043F\u0440\u043E\u0441\u043E\u0432 GraphQL \u0432 \u0436\u0443\u0440\u043D\u0430\u043B\u0435 \u0441\u0435\u0440\u0432\u0435\u0440\u0430, \u0432\u043A\u043B\u044E\u0447\u0430\u044F \u0432\u0441\u0435 \u043F\u0440\u0435\u0434\u043E\u0441\u0442\u0430\u0432\u043B\u0435\u043D\u043D\u044B\u0435 \u043F\u0435\u0440\u0435\u043C\u0435\u043D\u043D\u044B\u0435 \ No newline at end of file From ea316fae9fec03bc05e56ba5fed0ecffa0507649 Mon Sep 17 00:00:00 2001 From: "denis.sinelnikov" Date: Tue, 10 Dec 2024 15:58:22 +0100 Subject: [PATCH 03/12] CB-5807. Refactor after review, move logic to base class --- .../registry/WebAuthProviderProperty.java | 36 ++----------------- 1 file changed, 2 insertions(+), 34 deletions(-) diff --git a/server/bundles/io.cloudbeaver.model/src/io/cloudbeaver/registry/WebAuthProviderProperty.java b/server/bundles/io.cloudbeaver.model/src/io/cloudbeaver/registry/WebAuthProviderProperty.java index 32db0f32f9..3352b790ff 100644 --- a/server/bundles/io.cloudbeaver.model/src/io/cloudbeaver/registry/WebAuthProviderProperty.java +++ b/server/bundles/io.cloudbeaver.model/src/io/cloudbeaver/registry/WebAuthProviderProperty.java @@ -22,38 +22,25 @@ import org.jkiss.code.NotNull; import org.jkiss.code.Nullable; import org.jkiss.dbeaver.model.DBPNamedObjectLocalized; +import org.jkiss.dbeaver.model.DBPNamedObjectLocalizedBase; import org.jkiss.dbeaver.model.DBPObjectWithDescriptionLocalized; import org.jkiss.dbeaver.model.impl.PropertyDescriptor; import org.jkiss.dbeaver.utils.RuntimeUtils; import org.osgi.framework.Bundle; import org.osgi.framework.FrameworkUtil; -public class WebAuthProviderProperty extends PropertyDescriptor implements DBPNamedObjectLocalized, DBPObjectWithDescriptionLocalized { +public class WebAuthProviderProperty extends DBPNamedObjectLocalizedBase { private final String[] requiredFeatures; @Nullable private final String type; - private final Bundle bundle; - public WebAuthProviderProperty(String category, IConfigurationElement config) { super(category, config); - bundle = getBundle(config); String featuresAttr = config.getAttribute("requiredFeatures"); this.requiredFeatures = featuresAttr == null ? new String[0] : featuresAttr.split(","); this.type = config.getAttribute("type"); } - @NotNull - private Bundle getBundle(@NotNull IConfigurationElement config) { - final Bundle bundle; - String bundleName = config.getContributor().getName(); - bundle = Platform.getBundle(bundleName); - if (bundle == null) { - throw new IllegalStateException("Bundle '" + bundleName + "' not found"); - } - return bundle; - } - @NotNull public String[] getRequiredFeatures() { return requiredFeatures; @@ -63,23 +50,4 @@ public String[] getRequiredFeatures() { public String getType() { return type; } - - @Override - public String getLocalizedName(String locale) { - try { - return RuntimeUtils.getBundleLocalization(bundle, locale).getString(this.getId()); - } catch (Exception e) { - return this.getName(); - } - } - - @Nullable - @Override - public String getLocalizedDescription(String locale) { - try { - return RuntimeUtils.getBundleLocalization(bundle, locale).getString(this.getId() + ".description"); - } catch (Exception e) { - return this.getDescription(); - } - } } From e4f8d4d56057cddca074fd1b558e7f33d2e541db Mon Sep 17 00:00:00 2001 From: "denis.sinelnikov" Date: Tue, 10 Dec 2024 16:00:44 +0100 Subject: [PATCH 04/12] CB-5807. Refactor after review, move logic to base class --- .../registry/WebAuthProviderProperty.java | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/server/bundles/io.cloudbeaver.model/src/io/cloudbeaver/registry/WebAuthProviderProperty.java b/server/bundles/io.cloudbeaver.model/src/io/cloudbeaver/registry/WebAuthProviderProperty.java index 3352b790ff..1742a5253c 100644 --- a/server/bundles/io.cloudbeaver.model/src/io/cloudbeaver/registry/WebAuthProviderProperty.java +++ b/server/bundles/io.cloudbeaver.model/src/io/cloudbeaver/registry/WebAuthProviderProperty.java @@ -17,19 +17,11 @@ package io.cloudbeaver.registry; import org.eclipse.core.runtime.IConfigurationElement; -import org.eclipse.core.runtime.Platform; -import org.eclipse.core.runtime.spi.RegistryContributor; import org.jkiss.code.NotNull; import org.jkiss.code.Nullable; -import org.jkiss.dbeaver.model.DBPNamedObjectLocalized; -import org.jkiss.dbeaver.model.DBPNamedObjectLocalizedBase; -import org.jkiss.dbeaver.model.DBPObjectWithDescriptionLocalized; -import org.jkiss.dbeaver.model.impl.PropertyDescriptor; -import org.jkiss.dbeaver.utils.RuntimeUtils; -import org.osgi.framework.Bundle; -import org.osgi.framework.FrameworkUtil; +import org.jkiss.dbeaver.model.impl.BasePropertyDescriptor; -public class WebAuthProviderProperty extends DBPNamedObjectLocalizedBase { +public class WebAuthProviderProperty extends BasePropertyDescriptor { private final String[] requiredFeatures; @Nullable private final String type; From 12c558a99e3fa5799f23e63c853ae5ad703f243e Mon Sep 17 00:00:00 2001 From: "denis.sinelnikov" Date: Tue, 10 Dec 2024 17:01:27 +0100 Subject: [PATCH 05/12] CB-5807. Added new translation for IP --- .../src/io/cloudbeaver/registry/WebAuthProviderProperty.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server/bundles/io.cloudbeaver.model/src/io/cloudbeaver/registry/WebAuthProviderProperty.java b/server/bundles/io.cloudbeaver.model/src/io/cloudbeaver/registry/WebAuthProviderProperty.java index 1742a5253c..4d6d90338b 100644 --- a/server/bundles/io.cloudbeaver.model/src/io/cloudbeaver/registry/WebAuthProviderProperty.java +++ b/server/bundles/io.cloudbeaver.model/src/io/cloudbeaver/registry/WebAuthProviderProperty.java @@ -19,9 +19,9 @@ import org.eclipse.core.runtime.IConfigurationElement; import org.jkiss.code.NotNull; import org.jkiss.code.Nullable; -import org.jkiss.dbeaver.model.impl.BasePropertyDescriptor; +import org.jkiss.dbeaver.model.impl.LocalizedPropertyDescriptor; -public class WebAuthProviderProperty extends BasePropertyDescriptor { +public class WebAuthProviderProperty extends LocalizedPropertyDescriptor { private final String[] requiredFeatures; @Nullable private final String type; From bc7a813f80b9300ddcb54d99df52338243e9d2fb Mon Sep 17 00:00:00 2001 From: "denis.sinelnikov" Date: Wed, 11 Dec 2024 14:46:10 +0100 Subject: [PATCH 06/12] CB-5807. Refactor after review --- .../registry/WebAuthProviderDescriptor.java | 4 +-- .../registry/WebAuthProviderProperty.java | 10 +++++- .../registry/WebAuthProviderRegistry.java | 4 +-- ...bCommonAuthProviderPropertyDescriptor.java | 2 +- .../OSGI-INF/l10n/bundle.properties | 36 +++++++++---------- .../OSGI-INF/l10n/bundle_ru.properties | 36 +++++++++---------- .../OSGI-INF/l10n/bundle.properties | 32 ++++++++--------- .../OSGI-INF/l10n/bundle_ru.properties | 32 ++++++++--------- 8 files changed, 82 insertions(+), 74 deletions(-) diff --git a/server/bundles/io.cloudbeaver.model/src/io/cloudbeaver/registry/WebAuthProviderDescriptor.java b/server/bundles/io.cloudbeaver.model/src/io/cloudbeaver/registry/WebAuthProviderDescriptor.java index 4a47a4d323..aeeef9fe9b 100644 --- a/server/bundles/io.cloudbeaver.model/src/io/cloudbeaver/registry/WebAuthProviderDescriptor.java +++ b/server/bundles/io.cloudbeaver.model/src/io/cloudbeaver/registry/WebAuthProviderDescriptor.java @@ -51,7 +51,7 @@ public class WebAuthProviderDescriptor extends AbstractDescriptor { private final Map> metaParameters = new HashMap<>(); private SMAuthProvider instance; private final DBPImage icon; - private final Map configurationParameters = new LinkedHashMap<>(); + private final Map configurationParameters = new LinkedHashMap<>(); // private final List credentialProfiles = new ArrayList<>(); private final boolean configurable; private final boolean trusted; @@ -75,7 +75,7 @@ public WebAuthProviderDescriptor(IConfigurationElement cfg) { this.isCaseInsensitive = CommonUtils.toBoolean(cfg.getAttribute("caseInsensitive")); for (IConfigurationElement cfgElement : cfg.getChildren("configuration")) { - List properties = WebAuthProviderRegistry.readProperties(cfgElement); + List properties = WebAuthProviderRegistry.readProperties(cfgElement, getId()); for (WebAuthProviderProperty property : properties) { configurationParameters.put(CommonUtils.toString(property.getId()), property); } diff --git a/server/bundles/io.cloudbeaver.model/src/io/cloudbeaver/registry/WebAuthProviderProperty.java b/server/bundles/io.cloudbeaver.model/src/io/cloudbeaver/registry/WebAuthProviderProperty.java index 4d6d90338b..a074a4980c 100644 --- a/server/bundles/io.cloudbeaver.model/src/io/cloudbeaver/registry/WebAuthProviderProperty.java +++ b/server/bundles/io.cloudbeaver.model/src/io/cloudbeaver/registry/WebAuthProviderProperty.java @@ -26,8 +26,11 @@ public class WebAuthProviderProperty extends LocalizedPropertyDescriptor { @Nullable private final String type; - public WebAuthProviderProperty(String category, IConfigurationElement config) { + private final String authProviderId; + + public WebAuthProviderProperty(String category, IConfigurationElement config, String authProviderId) { super(category, config); + this.authProviderId = authProviderId; String featuresAttr = config.getAttribute("requiredFeatures"); this.requiredFeatures = featuresAttr == null ? new String[0] : featuresAttr.split(","); this.type = config.getAttribute("type"); @@ -42,4 +45,9 @@ public String[] getRequiredFeatures() { public String getType() { return type; } + + @Override + public String getPropertyId() { + return "prop.auth.model." + authProviderId + "." + this.getId(); + } } diff --git a/server/bundles/io.cloudbeaver.model/src/io/cloudbeaver/registry/WebAuthProviderRegistry.java b/server/bundles/io.cloudbeaver.model/src/io/cloudbeaver/registry/WebAuthProviderRegistry.java index e2a842ffdb..c4cc0d1e02 100644 --- a/server/bundles/io.cloudbeaver.model/src/io/cloudbeaver/registry/WebAuthProviderRegistry.java +++ b/server/bundles/io.cloudbeaver.model/src/io/cloudbeaver/registry/WebAuthProviderRegistry.java @@ -81,13 +81,13 @@ private void loadExtensions(IExtensionRegistry registry) { } } - static List readProperties(IConfigurationElement root) { + static List readProperties(IConfigurationElement root, String authProviderId) { List properties = new ArrayList<>(); for (IConfigurationElement propGroup : ArrayUtils.safeArray(root.getChildren(PropertyDescriptor.TAG_PROPERTY_GROUP))) { String category = propGroup.getAttribute(PropertyDescriptor.ATTR_LABEL); IConfigurationElement[] propElements = propGroup.getChildren(PropertyDescriptor.TAG_PROPERTY); for (IConfigurationElement prop : propElements) { - WebAuthProviderProperty propertyDescriptor = new WebAuthProviderProperty(category, prop); + WebAuthProviderProperty propertyDescriptor = new WebAuthProviderProperty(category, prop, authProviderId); properties.add(propertyDescriptor); } } diff --git a/server/bundles/io.cloudbeaver.model/src/io/cloudbeaver/registry/WebCommonAuthProviderPropertyDescriptor.java b/server/bundles/io.cloudbeaver.model/src/io/cloudbeaver/registry/WebCommonAuthProviderPropertyDescriptor.java index 818f2a55a4..aba6f9af3f 100644 --- a/server/bundles/io.cloudbeaver.model/src/io/cloudbeaver/registry/WebCommonAuthProviderPropertyDescriptor.java +++ b/server/bundles/io.cloudbeaver.model/src/io/cloudbeaver/registry/WebCommonAuthProviderPropertyDescriptor.java @@ -34,7 +34,7 @@ public class WebCommonAuthProviderPropertyDescriptor extends AbstractDescriptor public WebCommonAuthProviderPropertyDescriptor(IConfigurationElement cfg) { super(cfg); - configurationParameters = WebAuthProviderRegistry.readProperties(cfg); + configurationParameters = WebAuthProviderRegistry.readProperties(cfg, null); String supportedCategoriesAttr = cfg.getAttribute("supportedProviderCategories"); if (CommonUtils.isNotEmpty(supportedCategoriesAttr)) { supportedProviderCategories.addAll(Arrays.stream(supportedCategoriesAttr.split(",")).toList()); diff --git a/server/bundles/io.cloudbeaver.service.ldap.auth/OSGI-INF/l10n/bundle.properties b/server/bundles/io.cloudbeaver.service.ldap.auth/OSGI-INF/l10n/bundle.properties index 2f8c680081..d6918a3638 100644 --- a/server/bundles/io.cloudbeaver.service.ldap.auth/OSGI-INF/l10n/bundle.properties +++ b/server/bundles/io.cloudbeaver.service.ldap.auth/OSGI-INF/l10n/bundle.properties @@ -1,19 +1,19 @@ -ldap-host = Host -ldap-host.description = LDAP server host -ldap-port = Port -ldap-port.description = LDAP server port, default is 389 -ldap-identifier-attr = User identifier attribute -ldap-identifier-attr.description = LDAP attribute used as a user ID. Will be automatically added to the beginning of the 'User DN' value during authorization if not explicitly specified -ldap-dn = Base Distinguished Name -ldap-dn.description = Base Distinguished Name applicable for all users, example: dc=myOrg,dc=com. Will be automatically added to the end of the 'User DN' value during authorization if not explicitly specified -ldap-bind-user = Bind User DN -ldap-bind-user.description = DN of user, who has permissions to search for users to check access to the application with the specified filter. -ldap-bind-user-pwd = Bind User Password -ldap-bind-user-pwd.description = Bind user password. -ldap-filter = User Filter -ldap-filter.description = Filter that will be used to verify users access to the application. To use the filter, the bind user configuration is mandatory. -user-dn = User DN -user-dn.description = LDAP user name -password = User password -password.description = LDAP user password +prop.auth.model.ldap.ldap-host = Host +prop.auth.model.ldap.ldap-host.description = LDAP server host +prop.auth.model.ldap.ldap-port = Port +prop.auth.model.ldap.ldap-port.description = LDAP server port, default is 389 +prop.auth.model.ldap.ldap-identifier-attr = User identifier attribute +prop.auth.model.ldap.ldap-identifier-attr.description = LDAP attribute used as a user ID. Will be automatically added to the beginning of the 'User DN' value during authorization if not explicitly specified +prop.auth.model.ldap.ldap-dn = Base Distinguished Name +prop.auth.model.ldap.ldap-dn.description = Base Distinguished Name applicable for all users, example: dc=myOrg,dc=com. Will be automatically added to the end of the 'User DN' value during authorization if not explicitly specified +prop.auth.model.ldap.ldap-bind-user = Bind User DN +prop.auth.model.ldap.ldap-bind-user.description = DN of user, who has permissions to search for users to check access to the application with the specified filter. +prop.auth.model.ldap.ldap-bind-user-pwd = Bind User Password +prop.auth.model.ldap.ldap-bind-user-pwd.description = Bind user password. +prop.auth.model.ldap.ldap-filter = User Filter +prop.auth.model.ldap.ldap-filter.description = Filter that will be used to verify users access to the application. To use the filter, the bind user configuration is mandatory. +prop.auth.model.ldap.user-dn = User DN +prop.auth.model.ldap.user-dn.description = LDAP user name +prop.auth.model.ldap.password = User password +prop.auth.model.ldap.password.description = LDAP user password diff --git a/server/bundles/io.cloudbeaver.service.ldap.auth/OSGI-INF/l10n/bundle_ru.properties b/server/bundles/io.cloudbeaver.service.ldap.auth/OSGI-INF/l10n/bundle_ru.properties index 77392d46d8..297d608e44 100644 --- a/server/bundles/io.cloudbeaver.service.ldap.auth/OSGI-INF/l10n/bundle_ru.properties +++ b/server/bundles/io.cloudbeaver.service.ldap.auth/OSGI-INF/l10n/bundle_ru.properties @@ -1,18 +1,18 @@ -ldap-host = \u0425\u043E\u0441\u0442 -ldap-host.description = \u0425\u043E\u0441\u0442 \u0441\u0435\u0440\u0432\u0435\u0440\u0430 LDAP -ldap-port = \u041F\u043E\u0440\u0442 -ldap-port.description = \u041F\u043E\u0440\u0442 LDAP-\u0441\u0435\u0440\u0432\u0435\u0440\u0430, \u043F\u043E \u0443\u043C\u043E\u043B\u0447\u0430\u043D\u0438\u044E 389 -ldap-identifier-attr = \u0410\u0442\u0440\u0438\u0431\u0443\u0442 \u0438\u0434\u0435\u043D\u0442\u0438\u0444\u0438\u043A\u0430\u0442\u043E\u0440\u0430 \u043F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u0442\u0435\u043B\u044F -ldap-identifier-attr.description = \u0410\u0442\u0440\u0438\u0431\u0443\u0442 LDAP, \u0438\u0441\u043F\u043E\u043B\u044C\u0437\u0443\u0435\u043C\u044B\u0439 \u0432 \u043A\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0438\u0434\u0435\u043D\u0442\u0438\u0444\u0438\u043A\u0430\u0442\u043E\u0440\u0430 \u043F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u0442\u0435\u043B\u044F. \u0411\u0443\u0434\u0435\u0442 \u0430\u0432\u0442\u043E\u043C\u0430\u0442\u0438\u0447\u0435\u0441\u043A\u0438 \u0434\u043E\u0431\u0430\u0432\u043B\u0435\u043D \u0432 \u043D\u0430\u0447\u0430\u043B\u043E \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u044F 'User DN' \u043F\u0440\u0438 \u0430\u0432\u0442\u043E\u0440\u0438\u0437\u0430\u0446\u0438\u0438, \u0435\u0441\u043B\u0438 \u043D\u0435 \u0443\u043A\u0430\u0437\u0430\u043D \u044F\u0432\u043D\u043E -ldap-dn = \u0411\u0430\u0437\u043E\u0432\u043E\u0435 \u043E\u0442\u043B\u0438\u0447\u0438\u0442\u0435\u043B\u044C\u043D\u043E\u0435 \u0438\u043C\u044F -ldap-dn.description = \u0411\u0430\u0437\u043E\u0432\u043E\u0435 \u043E\u0442\u043B\u0438\u0447\u0438\u0442\u0435\u043B\u044C\u043D\u043E\u0435 \u0438\u043C\u044F, \u043F\u0440\u0438\u043C\u0435\u043D\u0438\u043C\u043E\u0435 \u043A\u043E \u0432\u0441\u0435\u043C \u043F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u0442\u0435\u043B\u044F\u043C, \u043D\u0430\u043F\u0440\u0438\u043C\u0435\u0440: dc=myOrg,dc=com. \u0411\u0443\u0434\u0435\u0442 \u0430\u0432\u0442\u043E\u043C\u0430\u0442\u0438\u0447\u0435\u0441\u043A\u0438 \u0434\u043E\u0431\u0430\u0432\u043B\u0435\u043D\u043E \u0432 \u043A\u043E\u043D\u0435\u0446 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u044F 'User DN' \u043F\u0440\u0438 \u0430\u0432\u0442\u043E\u0440\u0438\u0437\u0430\u0446\u0438\u0438, \u0435\u0441\u043B\u0438 \u043D\u0435 \u0443\u043A\u0430\u0437\u0430\u043D\u043E \u044F\u0432\u043D\u043E -ldap-bind-user = \u041F\u0440\u0438\u0432\u044F\u0437\u043A\u0430 DN \u043F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u0442\u0435\u043B\u044F -ldap-bind-user.description = DN \u043F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u0442\u0435\u043B\u044F, \u043A\u043E\u0442\u043E\u0440\u044B\u0439 \u0438\u043C\u0435\u0435\u0442 \u043F\u0440\u0430\u0432\u0430 \u043D\u0430 \u043F\u043E\u0438\u0441\u043A \u043F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u0442\u0435\u043B\u0435\u0439 \u0434\u043B\u044F \u043F\u0440\u043E\u0432\u0435\u0440\u043A\u0438 \u0434\u043E\u0441\u0442\u0443\u043F\u0430 \u043A \u043F\u0440\u0438\u043B\u043E\u0436\u0435\u043D\u0438\u044E \u0441 \u0443\u043A\u0430\u0437\u0430\u043D\u043D\u044B\u043C \u0444\u0438\u043B\u044C\u0442\u0440\u043E\u043C. -ldap-bind-user-pwd = \u0421\u0432\u044F\u0437\u0430\u0442\u044C \u043F\u0430\u0440\u043E\u043B\u044C \u043F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u0442\u0435\u043B\u044F -ldap-bind-user-pwd.description = \u041F\u0440\u0438\u0432\u044F\u0437\u043A\u0430 \u043F\u0430\u0440\u043E\u043B\u044F \u043F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u0442\u0435\u043B\u044F. -ldap-filter = \u0424\u0438\u043B\u044C\u0442\u0440 \u043F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u0442\u0435\u043B\u044F -ldap-filter.description = \u0424\u0438\u043B\u044C\u0442\u0440, \u043A\u043E\u0442\u043E\u0440\u044B\u0439 \u0431\u0443\u0434\u0435\u0442 \u0438\u0441\u043F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u0442\u044C\u0441\u044F \u0434\u043B\u044F \u043F\u0440\u043E\u0432\u0435\u0440\u043A\u0438 \u0434\u043E\u0441\u0442\u0443\u043F\u0430 \u043F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u0442\u0435\u043B\u0435\u0439 \u043A \u043F\u0440\u0438\u043B\u043E\u0436\u0435\u043D\u0438\u044E. \u0414\u043B\u044F \u0438\u0441\u043F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u043D\u0438\u044F \u0444\u0438\u043B\u044C\u0442\u0440\u0430 \u043E\u0431\u044F\u0437\u0430\u0442\u0435\u043B\u044C\u043D\u0430 \u043D\u0430\u0441\u0442\u0440\u043E\u0439\u043A\u0430 bind user. -user-dn = \u0418\u043C\u044F \u043F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u0442\u0435\u043B\u044F DN -user-dn.description = LDAP \u0438\u043C\u044F \u043F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u0442\u0435\u043B\u044F -password = \u041F\u0430\u0440\u043E\u043B\u044C \u043F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u0442\u0435\u043B\u044F -password.description = LDAP \u043F\u0430\u0440\u043E\u043B\u044C \u043F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u0442\u0435\u043B\u044F +prop.auth.model.ldap.ldap-host = \u0425\u043E\u0441\u0442 +prop.auth.model.ldap.ldap-host.description = \u0425\u043E\u0441\u0442 \u0441\u0435\u0440\u0432\u0435\u0440\u0430 LDAP +prop.auth.model.ldap.ldap-port = \u041F\u043E\u0440\u0442 +prop.auth.model.ldap.ldap-port.description = \u041F\u043E\u0440\u0442 LDAP-\u0441\u0435\u0440\u0432\u0435\u0440\u0430, \u043F\u043E \u0443\u043C\u043E\u043B\u0447\u0430\u043D\u0438\u044E 389 +prop.auth.model.ldap.ldap-identifier-attr = \u0410\u0442\u0440\u0438\u0431\u0443\u0442 \u0438\u0434\u0435\u043D\u0442\u0438\u0444\u0438\u043A\u0430\u0442\u043E\u0440\u0430 \u043F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u0442\u0435\u043B\u044F +prop.auth.model.ldap.ldap-identifier-attr.description = \u0410\u0442\u0440\u0438\u0431\u0443\u0442 LDAP, \u0438\u0441\u043F\u043E\u043B\u044C\u0437\u0443\u0435\u043C\u044B\u0439 \u0432 \u043A\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0438\u0434\u0435\u043D\u0442\u0438\u0444\u0438\u043A\u0430\u0442\u043E\u0440\u0430 \u043F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u0442\u0435\u043B\u044F. \u0411\u0443\u0434\u0435\u0442 \u0430\u0432\u0442\u043E\u043C\u0430\u0442\u0438\u0447\u0435\u0441\u043A\u0438 \u0434\u043E\u0431\u0430\u0432\u043B\u0435\u043D \u0432 \u043D\u0430\u0447\u0430\u043B\u043E \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u044F 'User DN' \u043F\u0440\u0438 \u0430\u0432\u0442\u043E\u0440\u0438\u0437\u0430\u0446\u0438\u0438, \u0435\u0441\u043B\u0438 \u043D\u0435 \u0443\u043A\u0430\u0437\u0430\u043D \u044F\u0432\u043D\u043E +prop.auth.model.ldap.ldap-dn = \u0411\u0430\u0437\u043E\u0432\u043E\u0435 \u043E\u0442\u043B\u0438\u0447\u0438\u0442\u0435\u043B\u044C\u043D\u043E\u0435 \u0438\u043C\u044F +prop.auth.model.ldap.ldap-dn.description = \u0411\u0430\u0437\u043E\u0432\u043E\u0435 \u043E\u0442\u043B\u0438\u0447\u0438\u0442\u0435\u043B\u044C\u043D\u043E\u0435 \u0438\u043C\u044F, \u043F\u0440\u0438\u043C\u0435\u043D\u0438\u043C\u043E\u0435 \u043A\u043E \u0432\u0441\u0435\u043C \u043F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u0442\u0435\u043B\u044F\u043C, \u043D\u0430\u043F\u0440\u0438\u043C\u0435\u0440: dc=myOrg,dc=com. \u0411\u0443\u0434\u0435\u0442 \u0430\u0432\u0442\u043E\u043C\u0430\u0442\u0438\u0447\u0435\u0441\u043A\u0438 \u0434\u043E\u0431\u0430\u0432\u043B\u0435\u043D\u043E \u0432 \u043A\u043E\u043D\u0435\u0446 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u044F 'User DN' \u043F\u0440\u0438 \u0430\u0432\u0442\u043E\u0440\u0438\u0437\u0430\u0446\u0438\u0438, \u0435\u0441\u043B\u0438 \u043D\u0435 \u0443\u043A\u0430\u0437\u0430\u043D\u043E \u044F\u0432\u043D\u043E +prop.auth.model.ldap.ldap-bind-user = \u041F\u0440\u0438\u0432\u044F\u0437\u043A\u0430 DN \u043F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u0442\u0435\u043B\u044F +prop.auth.model.ldap.ldap-bind-user.description = DN \u043F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u0442\u0435\u043B\u044F, \u043A\u043E\u0442\u043E\u0440\u044B\u0439 \u0438\u043C\u0435\u0435\u0442 \u043F\u0440\u0430\u0432\u0430 \u043D\u0430 \u043F\u043E\u0438\u0441\u043A \u043F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u0442\u0435\u043B\u0435\u0439 \u0434\u043B\u044F \u043F\u0440\u043E\u0432\u0435\u0440\u043A\u0438 \u0434\u043E\u0441\u0442\u0443\u043F\u0430 \u043A \u043F\u0440\u0438\u043B\u043E\u0436\u0435\u043D\u0438\u044E \u0441 \u0443\u043A\u0430\u0437\u0430\u043D\u043D\u044B\u043C \u0444\u0438\u043B\u044C\u0442\u0440\u043E\u043C. +prop.auth.model.ldap.ldap-bind-user-pwd = \u0421\u0432\u044F\u0437\u0430\u0442\u044C \u043F\u0430\u0440\u043E\u043B\u044C \u043F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u0442\u0435\u043B\u044F +prop.auth.model.ldap.ldap-bind-user-pwd.description = \u041F\u0440\u0438\u0432\u044F\u0437\u043A\u0430 \u043F\u0430\u0440\u043E\u043B\u044F \u043F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u0442\u0435\u043B\u044F. +prop.auth.model.ldap.ldap-filter = \u0424\u0438\u043B\u044C\u0442\u0440 \u043F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u0442\u0435\u043B\u044F +prop.auth.model.ldap.ldap-filter.description = \u0424\u0438\u043B\u044C\u0442\u0440, \u043A\u043E\u0442\u043E\u0440\u044B\u0439 \u0431\u0443\u0434\u0435\u0442 \u0438\u0441\u043F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u0442\u044C\u0441\u044F \u0434\u043B\u044F \u043F\u0440\u043E\u0432\u0435\u0440\u043A\u0438 \u0434\u043E\u0441\u0442\u0443\u043F\u0430 \u043F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u0442\u0435\u043B\u0435\u0439 \u043A \u043F\u0440\u0438\u043B\u043E\u0436\u0435\u043D\u0438\u044E. \u0414\u043B\u044F \u0438\u0441\u043F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u043D\u0438\u044F \u0444\u0438\u043B\u044C\u0442\u0440\u0430 \u043E\u0431\u044F\u0437\u0430\u0442\u0435\u043B\u044C\u043D\u0430 \u043D\u0430\u0441\u0442\u0440\u043E\u0439\u043A\u0430 bind user. +prop.auth.model.ldap.user-dn = \u0418\u043C\u044F \u043F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u0442\u0435\u043B\u044F DN +prop.auth.model.ldap.user-dn.description = LDAP \u0438\u043C\u044F \u043F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u0442\u0435\u043B\u044F +prop.auth.model.ldap.password = \u041F\u0430\u0440\u043E\u043B\u044C \u043F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u0442\u0435\u043B\u044F +prop.auth.model.ldap.password.description = LDAP \u043F\u0430\u0440\u043E\u043B\u044C \u043F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u0442\u0435\u043B\u044F diff --git a/server/bundles/io.cloudbeaver.service.security/OSGI-INF/l10n/bundle.properties b/server/bundles/io.cloudbeaver.service.security/OSGI-INF/l10n/bundle.properties index 095f6731bc..c871cdc03a 100644 --- a/server/bundles/io.cloudbeaver.service.security/OSGI-INF/l10n/bundle.properties +++ b/server/bundles/io.cloudbeaver.service.security/OSGI-INF/l10n/bundle.properties @@ -1,16 +1,16 @@ -logout-url = Logout URL -logout-url.description = Logout URL -user-header = Username header -user-header.description = Username header -team-header = Team header -team-header.description = Team header -team-delimiter = Team delimiter symbol -team-delimiter.description = Team delimiter symbol, default: | -first-name-header = First name header -first-name-header.description = First name header name -last-name-header = Last name header -last-name-header.description = Last name header name -full-name-header = Full name header -full-name-header.description = Full name header name -role-header = Role header -role-header.description = Role header name +prop.auth.model.reverseProxy.logout-url = Logout URL +prop.auth.model.reverseProxy.logout-url.description = Logout URL +prop.auth.model.reverseProxy.user-header = Username header +prop.auth.model.reverseProxy.user-header.description = Username header +prop.auth.model.reverseProxy.team-header = Team header +prop.auth.model.reverseProxy.team-header.description = Team header +prop.auth.model.reverseProxy.team-delimiter = Team delimiter symbol +prop.auth.model.reverseProxy.team-delimiter.description = Team delimiter symbol, default: | +prop.auth.model.reverseProxy.first-name-header = First name header +prop.auth.model.reverseProxy.first-name-header.description = First name header name +prop.auth.model.reverseProxy.last-name-header = Last name header +prop.auth.model.reverseProxy.last-name-header.description = Last name header name +prop.auth.model.reverseProxy.full-name-header = Full name header +prop.auth.model.reverseProxy.full-name-header.description = Full name header name +prop.auth.model.reverseProxy.role-header = Role header +prop.auth.model.reverseProxy.role-header.description = Role header name diff --git a/server/bundles/io.cloudbeaver.service.security/OSGI-INF/l10n/bundle_ru.properties b/server/bundles/io.cloudbeaver.service.security/OSGI-INF/l10n/bundle_ru.properties index e776a08af6..3ea886d38a 100644 --- a/server/bundles/io.cloudbeaver.service.security/OSGI-INF/l10n/bundle_ru.properties +++ b/server/bundles/io.cloudbeaver.service.security/OSGI-INF/l10n/bundle_ru.properties @@ -1,16 +1,16 @@ -logout-url = URL-\u0430\u0434\u0440\u0435\u0441 \u0432\u044B\u0445\u043E\u0434\u0430 \u0438\u0437 \u0441\u0438\u0441\u0442\u0435\u043C\u044B -logout-url.description = URL-\u0430\u0434\u0440\u0435\u0441 \u0432\u044B\u0445\u043E\u0434\u0430 \u0438\u0437 \u0441\u0438\u0441\u0442\u0435\u043C\u044B -user-header = \u0417\u0430\u0433\u043E\u043B\u043E\u0432\u043E\u043A \u0438\u043C\u0435\u043D\u0438 \u043F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u0442\u0435\u043B\u044F -user-header.description = \u0417\u0430\u0433\u043E\u043B\u043E\u0432\u043E\u043A \u0438\u043C\u0435\u043D\u0438 \u043F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u0442\u0435\u043B\u044F -team-header = \u0417\u0430\u0433\u043E\u043B\u043E\u0432\u043E\u043A \u043A\u043E\u043C\u0430\u043D\u0434\u044B -team-header.description = \u0417\u0430\u0433\u043E\u043B\u043E\u0432\u043E\u043A \u043A\u043E\u043C\u0430\u043D\u0434\u044B -team-delimiter = \u0421\u0438\u043C\u0432\u043E\u043B \u0440\u0430\u0437\u0434\u0435\u043B\u0438\u0442\u0435\u043B\u044F \u043A\u043E\u043C\u0430\u043D\u0434 -team-delimiter.description = \u0421\u0438\u043C\u0432\u043E\u043B \u0440\u0430\u0437\u0434\u0435\u043B\u0438\u0442\u0435\u043B\u044F \u043A\u043E\u043C\u0430\u043D\u0434, \u043F\u043E \u0443\u043C\u043E\u043B\u0447\u0430\u043D\u0438\u044E: | -first-name-header = \u0417\u0430\u0433\u043E\u043B\u043E\u0432\u043E\u043A \u0438\u043C\u0435\u043D\u0438 -first-name-header.description = \u041D\u0430\u0437\u0432\u0430\u043D\u0438\u0435 \u0437\u0430\u0433\u043E\u043B\u043E\u0432\u043A\u0430 \u0438\u043C\u0435\u043D\u0438 -last-name-header = \u0417\u0430\u0433\u043E\u043B\u043E\u0432\u043E\u043A \u0444\u0430\u043C\u0438\u043B\u0438\u0438 -last-name-header.description = \u0418\u043C\u044F \u0437\u0430\u0433\u043E\u043B\u043E\u0432\u043A\u0430 \u0444\u0430\u043C\u0438\u043B\u0438\u0438 -full-name-header = \u0417\u0430\u0433\u043E\u043B\u043E\u0432\u043E\u043A \u043F\u043E\u043B\u043D\u043E\u0433\u043E \u0438\u043C\u0435\u043D\u0438 -full-name-header.description = \u0418\u043C\u044F \u0437\u0430\u0433\u043E\u043B\u043E\u0432\u043A\u0430 \u043F\u043E\u043B\u043D\u043E\u0433\u043E \u0438\u043C\u0435\u043D\u0438 -role-header = \u0417\u0430\u0433\u043E\u043B\u043E\u0432\u043E\u043A \u0440\u043E\u043B\u0438 -role-header.description = \u0418\u043C\u044F \u0437\u0430\u0433\u043E\u043B\u043E\u0432\u043A\u0430 \u0440\u043E\u043B\u0438 \ No newline at end of file +prop.auth.model.reverseProxy.logout-url = URL-\u0430\u0434\u0440\u0435\u0441 \u0432\u044B\u0445\u043E\u0434\u0430 \u0438\u0437 \u0441\u0438\u0441\u0442\u0435\u043C\u044B +prop.auth.model.reverseProxy.logout-url.description = URL-\u0430\u0434\u0440\u0435\u0441 \u0432\u044B\u0445\u043E\u0434\u0430 \u0438\u0437 \u0441\u0438\u0441\u0442\u0435\u043C\u044B +prop.auth.model.reverseProxy.user-header = \u0417\u0430\u0433\u043E\u043B\u043E\u0432\u043E\u043A \u0438\u043C\u0435\u043D\u0438 \u043F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u0442\u0435\u043B\u044F +prop.auth.model.reverseProxy.user-header.description = \u0417\u0430\u0433\u043E\u043B\u043E\u0432\u043E\u043A \u0438\u043C\u0435\u043D\u0438 \u043F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u0442\u0435\u043B\u044F +prop.auth.model.reverseProxy.team-header = \u0417\u0430\u0433\u043E\u043B\u043E\u0432\u043E\u043A \u043A\u043E\u043C\u0430\u043D\u0434\u044B +prop.auth.model.reverseProxy.team-header.description = \u0417\u0430\u0433\u043E\u043B\u043E\u0432\u043E\u043A \u043A\u043E\u043C\u0430\u043D\u0434\u044B +prop.auth.model.reverseProxy.team-delimiter = \u0421\u0438\u043C\u0432\u043E\u043B \u0440\u0430\u0437\u0434\u0435\u043B\u0438\u0442\u0435\u043B\u044F \u043A\u043E\u043C\u0430\u043D\u0434 +prop.auth.model.reverseProxy.team-delimiter.description = \u0421\u0438\u043C\u0432\u043E\u043B \u0440\u0430\u0437\u0434\u0435\u043B\u0438\u0442\u0435\u043B\u044F \u043A\u043E\u043C\u0430\u043D\u0434, \u043F\u043E \u0443\u043C\u043E\u043B\u0447\u0430\u043D\u0438\u044E: | +prop.auth.model.reverseProxy.first-name-header = \u0417\u0430\u0433\u043E\u043B\u043E\u0432\u043E\u043A \u0438\u043C\u0435\u043D\u0438 +prop.auth.model.reverseProxy.first-name-header.description = \u041D\u0430\u0437\u0432\u0430\u043D\u0438\u0435 \u0437\u0430\u0433\u043E\u043B\u043E\u0432\u043A\u0430 \u0438\u043C\u0435\u043D\u0438 +prop.auth.model.reverseProxy.last-name-header = \u0417\u0430\u0433\u043E\u043B\u043E\u0432\u043E\u043A \u0444\u0430\u043C\u0438\u043B\u0438\u0438 +prop.auth.model.reverseProxy.last-name-header.description = \u0418\u043C\u044F \u0437\u0430\u0433\u043E\u043B\u043E\u0432\u043A\u0430 \u0444\u0430\u043C\u0438\u043B\u0438\u0438 +prop.auth.model.reverseProxy.full-name-header = \u0417\u0430\u0433\u043E\u043B\u043E\u0432\u043E\u043A \u043F\u043E\u043B\u043D\u043E\u0433\u043E \u0438\u043C\u0435\u043D\u0438 +prop.auth.model.reverseProxy.full-name-header.description = \u0418\u043C\u044F \u0437\u0430\u0433\u043E\u043B\u043E\u0432\u043A\u0430 \u043F\u043E\u043B\u043D\u043E\u0433\u043E \u0438\u043C\u0435\u043D\u0438 +prop.auth.model.reverseProxy.role-header = \u0417\u0430\u0433\u043E\u043B\u043E\u0432\u043E\u043A \u0440\u043E\u043B\u0438 +prop.auth.model.reverseProxy.role-header.description = \u0418\u043C\u044F \u0437\u0430\u0433\u043E\u043B\u043E\u0432\u043A\u0430 \u0440\u043E\u043B\u0438 \ No newline at end of file From 8bade97590e9dfbaae2f8d48254fcf0482b42d2e Mon Sep 17 00:00:00 2001 From: "denis.sinelnikov" Date: Wed, 11 Dec 2024 15:03:02 +0100 Subject: [PATCH 07/12] CB-5807. Refactor after review --- .../io/cloudbeaver/registry/WebAuthProviderProperty.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/server/bundles/io.cloudbeaver.model/src/io/cloudbeaver/registry/WebAuthProviderProperty.java b/server/bundles/io.cloudbeaver.model/src/io/cloudbeaver/registry/WebAuthProviderProperty.java index a074a4980c..16bae13e03 100644 --- a/server/bundles/io.cloudbeaver.model/src/io/cloudbeaver/registry/WebAuthProviderProperty.java +++ b/server/bundles/io.cloudbeaver.model/src/io/cloudbeaver/registry/WebAuthProviderProperty.java @@ -48,6 +48,10 @@ public String getType() { @Override public String getPropertyId() { - return "prop.auth.model." + authProviderId + "." + this.getId(); + if (authProviderId != null) { + return "prop.auth.model." + authProviderId + "." + this.getId(); + } else { + return this.getId(); + } } } From 721d679b5c96987a2eba811e49dd627db7ca6601 Mon Sep 17 00:00:00 2001 From: "denis.sinelnikov" Date: Wed, 11 Dec 2024 16:54:16 +0100 Subject: [PATCH 08/12] CB-5807. Refactor after review --- .../src/io/cloudbeaver/registry/WebAuthProviderProperty.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/bundles/io.cloudbeaver.model/src/io/cloudbeaver/registry/WebAuthProviderProperty.java b/server/bundles/io.cloudbeaver.model/src/io/cloudbeaver/registry/WebAuthProviderProperty.java index 16bae13e03..73867179d8 100644 --- a/server/bundles/io.cloudbeaver.model/src/io/cloudbeaver/registry/WebAuthProviderProperty.java +++ b/server/bundles/io.cloudbeaver.model/src/io/cloudbeaver/registry/WebAuthProviderProperty.java @@ -51,7 +51,7 @@ public String getPropertyId() { if (authProviderId != null) { return "prop.auth.model." + authProviderId + "." + this.getId(); } else { - return this.getId(); + return "prop.auth.model." + this.getId(); } } } From 0e41be4f07e9ef820ec02b5d3cb5aaeb5509b38a Mon Sep 17 00:00:00 2001 From: "denis.sinelnikov" Date: Fri, 13 Dec 2024 16:50:54 +0100 Subject: [PATCH 09/12] CB-5807. Fixed typo in ru locale --- .../io.cloudbeaver.server/OSGI-INF/l10n/bundle_ru.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/bundles/io.cloudbeaver.server/OSGI-INF/l10n/bundle_ru.properties b/server/bundles/io.cloudbeaver.server/OSGI-INF/l10n/bundle_ru.properties index 1ebf746727..9bbef88573 100644 --- a/server/bundles/io.cloudbeaver.server/OSGI-INF/l10n/bundle_ru.properties +++ b/server/bundles/io.cloudbeaver.server/OSGI-INF/l10n/bundle_ru.properties @@ -1,2 +1,2 @@ -log.api.graphql.debug = \u0412\u043A\u043B\u044E\u0447\u0438\u0442\u044C \u043F\u043E\u0434\u0440\u043E\u0431\u043D\u043E\u0435 \u043B\u043E\u0433\u0433\u0438\u0440\u043E\u0432\u0430\u043D\u0438\u0435 +log.api.graphql.debug = \u0412\u043A\u043B\u044E\u0447\u0438\u0442\u044C \u043F\u043E\u0434\u0440\u043E\u0431\u043D\u043E\u0435 \u043B\u043E\u0433\u0438\u0440\u043E\u0432\u0430\u043D\u0438\u0435 log.api.graphql.debug.description = \u0412\u043A\u043B\u044E\u0447\u0438\u0442\u0435 \u043F\u043E\u0434\u0440\u043E\u0431\u043D\u043E\u0435 \u043B\u043E\u0433\u0438\u0440\u043E\u0432\u0430\u043D\u0438\u0435 \u0437\u0430\u043F\u0440\u043E\u0441\u043E\u0432 GraphQL \u0432 \u0436\u0443\u0440\u043D\u0430\u043B\u0435 \u0441\u0435\u0440\u0432\u0435\u0440\u0430, \u0432\u043A\u043B\u044E\u0447\u0430\u044F \u0432\u0441\u0435 \u043F\u0440\u0435\u0434\u043E\u0441\u0442\u0430\u0432\u043B\u0435\u043D\u043D\u044B\u0435 \u043F\u0435\u0440\u0435\u043C\u0435\u043D\u043D\u044B\u0435 \ No newline at end of file From 33ba65b194b3e9c16b8cf11e28a2b5063434c5b4 Mon Sep 17 00:00:00 2001 From: "denis.sinelnikov" Date: Mon, 16 Dec 2024 17:41:46 +0100 Subject: [PATCH 10/12] CB-5807. Refactor after review --- .../service/auth/DBWServiceAuth.java | 2 +- .../service/auth/WebServiceBindingAuth.java | 2 +- .../service/auth/impl/WebServiceAuthImpl.java | 4 +- .../user/WebAuthCredentialsProfileInfo.java | 50 +++++++++++++++++++ .../auth/model/user/WebAuthProviderInfo.java | 5 +- 5 files changed, 58 insertions(+), 5 deletions(-) create mode 100644 server/bundles/io.cloudbeaver.service.auth/src/io/cloudbeaver/service/auth/model/user/WebAuthCredentialsProfileInfo.java diff --git a/server/bundles/io.cloudbeaver.service.auth/src/io/cloudbeaver/service/auth/DBWServiceAuth.java b/server/bundles/io.cloudbeaver.service.auth/src/io/cloudbeaver/service/auth/DBWServiceAuth.java index 12d1266369..a4c6fdca2a 100644 --- a/server/bundles/io.cloudbeaver.service.auth/src/io/cloudbeaver/service/auth/DBWServiceAuth.java +++ b/server/bundles/io.cloudbeaver.service.auth/src/io/cloudbeaver/service/auth/DBWServiceAuth.java @@ -56,7 +56,7 @@ WebLogoutInfo authLogout( WebUserInfo activeUser(@NotNull WebSession webSession) throws DBWebException; @WebAction(authRequired = false) - WebAuthProviderInfo[] getAuthProviders(); + WebAuthProviderInfo[] getAuthProviders(WebSession webSession); @WebAction() boolean changeLocalPassword(@NotNull WebSession webSession, @NotNull String oldPassword, @NotNull String newPassword) throws DBWebException; diff --git a/server/bundles/io.cloudbeaver.service.auth/src/io/cloudbeaver/service/auth/WebServiceBindingAuth.java b/server/bundles/io.cloudbeaver.service.auth/src/io/cloudbeaver/service/auth/WebServiceBindingAuth.java index 7c01c9610c..373198ffea 100644 --- a/server/bundles/io.cloudbeaver.service.auth/src/io/cloudbeaver/service/auth/WebServiceBindingAuth.java +++ b/server/bundles/io.cloudbeaver.service.auth/src/io/cloudbeaver/service/auth/WebServiceBindingAuth.java @@ -61,7 +61,7 @@ public void bindWiring(DBWBindingContext model) throws DBWebException { CommonUtils.toBoolean(env.getArgument("linkUser")) )) .dataFetcher("activeUser", env -> getService(env).activeUser(getWebSession(env, false))) - .dataFetcher("authProviders", env -> getService(env).getAuthProviders()) + .dataFetcher("authProviders", env -> getService(env).getAuthProviders(getWebSession(env))) .dataFetcher("authChangeLocalPassword", env -> getService(env).changeLocalPassword( getWebSession(env), env.getArgument("oldPassword"), diff --git a/server/bundles/io.cloudbeaver.service.auth/src/io/cloudbeaver/service/auth/impl/WebServiceAuthImpl.java b/server/bundles/io.cloudbeaver.service.auth/src/io/cloudbeaver/service/auth/impl/WebServiceAuthImpl.java index e8e008afba..479be5eeef 100644 --- a/server/bundles/io.cloudbeaver.service.auth/src/io/cloudbeaver/service/auth/impl/WebServiceAuthImpl.java +++ b/server/bundles/io.cloudbeaver.service.auth/src/io/cloudbeaver/service/auth/impl/WebServiceAuthImpl.java @@ -222,9 +222,9 @@ public WebUserInfo activeUser(@NotNull WebSession webSession) throws DBWebExcept } @Override - public WebAuthProviderInfo[] getAuthProviders() { + public WebAuthProviderInfo[] getAuthProviders(WebSession webSession) { return WebAuthProviderRegistry.getInstance().getAuthProviders() - .stream().map(WebAuthProviderInfo::new) + .stream().map(p -> new WebAuthProviderInfo(webSession, p)) .toArray(WebAuthProviderInfo[]::new); } diff --git a/server/bundles/io.cloudbeaver.service.auth/src/io/cloudbeaver/service/auth/model/user/WebAuthCredentialsProfileInfo.java b/server/bundles/io.cloudbeaver.service.auth/src/io/cloudbeaver/service/auth/model/user/WebAuthCredentialsProfileInfo.java new file mode 100644 index 0000000000..33e9e46715 --- /dev/null +++ b/server/bundles/io.cloudbeaver.service.auth/src/io/cloudbeaver/service/auth/model/user/WebAuthCredentialsProfileInfo.java @@ -0,0 +1,50 @@ +/* + * 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.service.auth.model.user; + +import io.cloudbeaver.model.WebPropertyInfo; +import io.cloudbeaver.model.session.WebSession; +import io.cloudbeaver.registry.WebAuthProviderDescriptor; +import org.jkiss.dbeaver.model.security.SMAuthCredentialsProfile; + +import java.util.List; + +public class WebAuthCredentialsProfileInfo { + private final SMAuthCredentialsProfile profile; + private final WebSession webSession; + + public WebAuthCredentialsProfileInfo(WebSession webSession, SMAuthCredentialsProfile profile) { + this.profile = profile; + this.webSession = webSession; + } + + public String getId() { + return profile.getId(); + } + + public String getLabel() { + return profile.getLabel(); + } + + public String getDescription() { + return profile.getDescription(); + } + + public List getCredentialParameters() { + return profile.getCredentialParameters().stream().map(p -> new WebPropertyInfo(webSession, p)).toList(); + } +} diff --git a/server/bundles/io.cloudbeaver.service.auth/src/io/cloudbeaver/service/auth/model/user/WebAuthProviderInfo.java b/server/bundles/io.cloudbeaver.service.auth/src/io/cloudbeaver/service/auth/model/user/WebAuthProviderInfo.java index 90257b64e6..9b0e181e23 100644 --- a/server/bundles/io.cloudbeaver.service.auth/src/io/cloudbeaver/service/auth/model/user/WebAuthProviderInfo.java +++ b/server/bundles/io.cloudbeaver.service.auth/src/io/cloudbeaver/service/auth/model/user/WebAuthProviderInfo.java @@ -20,6 +20,7 @@ import io.cloudbeaver.auth.SMAuthProviderFederated; import io.cloudbeaver.auth.provisioning.SMProvisioner; import io.cloudbeaver.model.app.ServletAuthConfiguration; +import io.cloudbeaver.model.session.WebSession; import io.cloudbeaver.registry.WebAuthProviderConfiguration; import io.cloudbeaver.registry.WebAuthProviderDescriptor; import io.cloudbeaver.server.CBApplication; @@ -39,9 +40,11 @@ public class WebAuthProviderInfo { private static final Log log = Log.getLog(WebAuthProviderInfo.class); private final WebAuthProviderDescriptor descriptor; + private final WebSession webSession; - public WebAuthProviderInfo(WebAuthProviderDescriptor descriptor) { + public WebAuthProviderInfo(WebSession webSession, WebAuthProviderDescriptor descriptor) { this.descriptor = descriptor; + this.webSession = webSession; } WebAuthProviderDescriptor getDescriptor() { From 6965284662ad473c0124cc73ee083be78b64974f Mon Sep 17 00:00:00 2001 From: "denis.sinelnikov" Date: Tue, 17 Dec 2024 12:02:39 +0100 Subject: [PATCH 11/12] CB-5807. Revert --- .../service/auth/DBWServiceAuth.java | 2 +- .../service/auth/WebServiceBindingAuth.java | 2 +- .../service/auth/impl/WebServiceAuthImpl.java | 4 +- .../user/WebAuthCredentialsProfileInfo.java | 50 ------------------- .../auth/model/user/WebAuthProviderInfo.java | 4 +- .../plugin.xml | 4 +- 6 files changed, 7 insertions(+), 59 deletions(-) delete mode 100644 server/bundles/io.cloudbeaver.service.auth/src/io/cloudbeaver/service/auth/model/user/WebAuthCredentialsProfileInfo.java diff --git a/server/bundles/io.cloudbeaver.service.auth/src/io/cloudbeaver/service/auth/DBWServiceAuth.java b/server/bundles/io.cloudbeaver.service.auth/src/io/cloudbeaver/service/auth/DBWServiceAuth.java index a4c6fdca2a..12d1266369 100644 --- a/server/bundles/io.cloudbeaver.service.auth/src/io/cloudbeaver/service/auth/DBWServiceAuth.java +++ b/server/bundles/io.cloudbeaver.service.auth/src/io/cloudbeaver/service/auth/DBWServiceAuth.java @@ -56,7 +56,7 @@ WebLogoutInfo authLogout( WebUserInfo activeUser(@NotNull WebSession webSession) throws DBWebException; @WebAction(authRequired = false) - WebAuthProviderInfo[] getAuthProviders(WebSession webSession); + WebAuthProviderInfo[] getAuthProviders(); @WebAction() boolean changeLocalPassword(@NotNull WebSession webSession, @NotNull String oldPassword, @NotNull String newPassword) throws DBWebException; diff --git a/server/bundles/io.cloudbeaver.service.auth/src/io/cloudbeaver/service/auth/WebServiceBindingAuth.java b/server/bundles/io.cloudbeaver.service.auth/src/io/cloudbeaver/service/auth/WebServiceBindingAuth.java index 373198ffea..7c01c9610c 100644 --- a/server/bundles/io.cloudbeaver.service.auth/src/io/cloudbeaver/service/auth/WebServiceBindingAuth.java +++ b/server/bundles/io.cloudbeaver.service.auth/src/io/cloudbeaver/service/auth/WebServiceBindingAuth.java @@ -61,7 +61,7 @@ public void bindWiring(DBWBindingContext model) throws DBWebException { CommonUtils.toBoolean(env.getArgument("linkUser")) )) .dataFetcher("activeUser", env -> getService(env).activeUser(getWebSession(env, false))) - .dataFetcher("authProviders", env -> getService(env).getAuthProviders(getWebSession(env))) + .dataFetcher("authProviders", env -> getService(env).getAuthProviders()) .dataFetcher("authChangeLocalPassword", env -> getService(env).changeLocalPassword( getWebSession(env), env.getArgument("oldPassword"), diff --git a/server/bundles/io.cloudbeaver.service.auth/src/io/cloudbeaver/service/auth/impl/WebServiceAuthImpl.java b/server/bundles/io.cloudbeaver.service.auth/src/io/cloudbeaver/service/auth/impl/WebServiceAuthImpl.java index 479be5eeef..e8e008afba 100644 --- a/server/bundles/io.cloudbeaver.service.auth/src/io/cloudbeaver/service/auth/impl/WebServiceAuthImpl.java +++ b/server/bundles/io.cloudbeaver.service.auth/src/io/cloudbeaver/service/auth/impl/WebServiceAuthImpl.java @@ -222,9 +222,9 @@ public WebUserInfo activeUser(@NotNull WebSession webSession) throws DBWebExcept } @Override - public WebAuthProviderInfo[] getAuthProviders(WebSession webSession) { + public WebAuthProviderInfo[] getAuthProviders() { return WebAuthProviderRegistry.getInstance().getAuthProviders() - .stream().map(p -> new WebAuthProviderInfo(webSession, p)) + .stream().map(WebAuthProviderInfo::new) .toArray(WebAuthProviderInfo[]::new); } diff --git a/server/bundles/io.cloudbeaver.service.auth/src/io/cloudbeaver/service/auth/model/user/WebAuthCredentialsProfileInfo.java b/server/bundles/io.cloudbeaver.service.auth/src/io/cloudbeaver/service/auth/model/user/WebAuthCredentialsProfileInfo.java deleted file mode 100644 index 33e9e46715..0000000000 --- a/server/bundles/io.cloudbeaver.service.auth/src/io/cloudbeaver/service/auth/model/user/WebAuthCredentialsProfileInfo.java +++ /dev/null @@ -1,50 +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.service.auth.model.user; - -import io.cloudbeaver.model.WebPropertyInfo; -import io.cloudbeaver.model.session.WebSession; -import io.cloudbeaver.registry.WebAuthProviderDescriptor; -import org.jkiss.dbeaver.model.security.SMAuthCredentialsProfile; - -import java.util.List; - -public class WebAuthCredentialsProfileInfo { - private final SMAuthCredentialsProfile profile; - private final WebSession webSession; - - public WebAuthCredentialsProfileInfo(WebSession webSession, SMAuthCredentialsProfile profile) { - this.profile = profile; - this.webSession = webSession; - } - - public String getId() { - return profile.getId(); - } - - public String getLabel() { - return profile.getLabel(); - } - - public String getDescription() { - return profile.getDescription(); - } - - public List getCredentialParameters() { - return profile.getCredentialParameters().stream().map(p -> new WebPropertyInfo(webSession, p)).toList(); - } -} diff --git a/server/bundles/io.cloudbeaver.service.auth/src/io/cloudbeaver/service/auth/model/user/WebAuthProviderInfo.java b/server/bundles/io.cloudbeaver.service.auth/src/io/cloudbeaver/service/auth/model/user/WebAuthProviderInfo.java index 9b0e181e23..7919d5b7b1 100644 --- a/server/bundles/io.cloudbeaver.service.auth/src/io/cloudbeaver/service/auth/model/user/WebAuthProviderInfo.java +++ b/server/bundles/io.cloudbeaver.service.auth/src/io/cloudbeaver/service/auth/model/user/WebAuthProviderInfo.java @@ -40,11 +40,9 @@ public class WebAuthProviderInfo { private static final Log log = Log.getLog(WebAuthProviderInfo.class); private final WebAuthProviderDescriptor descriptor; - private final WebSession webSession; - public WebAuthProviderInfo(WebSession webSession, WebAuthProviderDescriptor descriptor) { + public WebAuthProviderInfo(WebAuthProviderDescriptor descriptor) { this.descriptor = descriptor; - this.webSession = webSession; } WebAuthProviderDescriptor getDescriptor() { diff --git a/server/bundles/io.cloudbeaver.service.ldap.auth/plugin.xml b/server/bundles/io.cloudbeaver.service.ldap.auth/plugin.xml index c5c4b6bccb..18e0023dab 100644 --- a/server/bundles/io.cloudbeaver.service.ldap.auth/plugin.xml +++ b/server/bundles/io.cloudbeaver.service.ldap.auth/plugin.xml @@ -31,8 +31,8 @@ - - + From c545f3ff686cac3779661c507bb6a3dcc7da5697 Mon Sep 17 00:00:00 2001 From: "denis.sinelnikov" Date: Tue, 17 Dec 2024 17:31:29 +0100 Subject: [PATCH 12/12] CB-5807. Remove comment --- .../src/io/cloudbeaver/registry/WebAuthProviderDescriptor.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/bundles/io.cloudbeaver.model/src/io/cloudbeaver/registry/WebAuthProviderDescriptor.java b/server/bundles/io.cloudbeaver.model/src/io/cloudbeaver/registry/WebAuthProviderDescriptor.java index aeeef9fe9b..bbe49bfaa1 100644 --- a/server/bundles/io.cloudbeaver.model/src/io/cloudbeaver/registry/WebAuthProviderDescriptor.java +++ b/server/bundles/io.cloudbeaver.model/src/io/cloudbeaver/registry/WebAuthProviderDescriptor.java @@ -51,7 +51,7 @@ public class WebAuthProviderDescriptor extends AbstractDescriptor { private final Map> metaParameters = new HashMap<>(); private SMAuthProvider instance; private final DBPImage icon; - private final Map configurationParameters = new LinkedHashMap<>(); // + private final Map configurationParameters = new LinkedHashMap<>(); private final List credentialProfiles = new ArrayList<>(); private final boolean configurable; private final boolean trusted;