From 188c722dae55c5a6c5f214338318e9c82cc22c40 Mon Sep 17 00:00:00 2001 From: Ilya Buziuk Date: Fri, 31 Mar 2023 13:49:49 +0200 Subject: [PATCH 01/75] chore: Adding @Deprecated annotation to the unused services that will be removed in the future versions Signed-off-by: Ilya Buziuk --- .../multiuser/api/permission/server/PermissionsService.java | 3 ++- .../multiuser/resource/api/free/FreeResourcesLimitService.java | 3 ++- .../che/multiuser/resource/api/usage/ResourceService.java | 3 ++- .../org/eclipse/che/api/devfile/server/DevfileService.java | 1 + .../main/java/org/eclipse/che/api/ssh/server/SshService.java | 3 ++- .../org/eclipse/che/api/user/server/PreferencesService.java | 3 ++- .../java/org/eclipse/che/api/user/server/ProfileService.java | 3 ++- .../che/api/workspace/activity/WorkspaceActivityService.java | 3 ++- .../org/eclipse/che/api/workspace/server/WorkspaceService.java | 1 + 9 files changed, 16 insertions(+), 7 deletions(-) diff --git a/multiuser/api/che-multiuser-api-permission/src/main/java/org/eclipse/che/multiuser/api/permission/server/PermissionsService.java b/multiuser/api/che-multiuser-api-permission/src/main/java/org/eclipse/che/multiuser/api/permission/server/PermissionsService.java index 1e28f59322..4ade94c2d7 100644 --- a/multiuser/api/che-multiuser-api-permission/src/main/java/org/eclipse/che/multiuser/api/permission/server/PermissionsService.java +++ b/multiuser/api/che-multiuser-api-permission/src/main/java/org/eclipse/che/multiuser/api/permission/server/PermissionsService.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012-2021 Red Hat, Inc. + * Copyright (c) 2012-2023 Red Hat, Inc. * This program and the accompanying materials are made * available under the terms of the Eclipse Public License 2.0 * which is available at https://www.eclipse.org/legal/epl-2.0/ @@ -55,6 +55,7 @@ import org.eclipse.che.multiuser.api.permission.shared.model.PermissionsDomain; * * @author Sergii Leschenko */ +@Deprecated @Tag(name = "permissions", description = "Permissions REST API") @Path("/permissions") public class PermissionsService extends Service { diff --git a/multiuser/api/che-multiuser-api-resource/src/main/java/org/eclipse/che/multiuser/resource/api/free/FreeResourcesLimitService.java b/multiuser/api/che-multiuser-api-resource/src/main/java/org/eclipse/che/multiuser/resource/api/free/FreeResourcesLimitService.java index 0b496397b7..dafd74956a 100644 --- a/multiuser/api/che-multiuser-api-resource/src/main/java/org/eclipse/che/multiuser/resource/api/free/FreeResourcesLimitService.java +++ b/multiuser/api/che-multiuser-api-resource/src/main/java/org/eclipse/che/multiuser/resource/api/free/FreeResourcesLimitService.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012-2021 Red Hat, Inc. + * Copyright (c) 2012-2023 Red Hat, Inc. * This program and the accompanying materials are made * available under the terms of the Eclipse Public License 2.0 * which is available at https://www.eclipse.org/legal/epl-2.0/ @@ -46,6 +46,7 @@ import org.eclipse.che.multiuser.resource.shared.dto.FreeResourcesLimitDto; * * @author Sergii Leschenko */ +@Deprecated @Tag(name = "resource-free", description = "Free resources limit REST API") @Path("/resource/free") public class FreeResourcesLimitService extends Service { diff --git a/multiuser/api/che-multiuser-api-resource/src/main/java/org/eclipse/che/multiuser/resource/api/usage/ResourceService.java b/multiuser/api/che-multiuser-api-resource/src/main/java/org/eclipse/che/multiuser/resource/api/usage/ResourceService.java index cbdeb4d9bb..81981f7efc 100644 --- a/multiuser/api/che-multiuser-api-resource/src/main/java/org/eclipse/che/multiuser/resource/api/usage/ResourceService.java +++ b/multiuser/api/che-multiuser-api-resource/src/main/java/org/eclipse/che/multiuser/resource/api/usage/ResourceService.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012-2021 Red Hat, Inc. + * Copyright (c) 2012-2023 Red Hat, Inc. * This program and the accompanying materials are made * available under the terms of the Eclipse Public License 2.0 * which is available at https://www.eclipse.org/legal/epl-2.0/ @@ -41,6 +41,7 @@ import org.eclipse.che.multiuser.resource.shared.dto.ResourcesDetailsDto; * * @author Sergii Leschenko */ +@Deprecated @Tag(name = "resource", description = "Resource REST API") @Path("/resource") public class ResourceService extends Service { diff --git a/wsmaster/che-core-api-devfile/src/main/java/org/eclipse/che/api/devfile/server/DevfileService.java b/wsmaster/che-core-api-devfile/src/main/java/org/eclipse/che/api/devfile/server/DevfileService.java index c725c8dbe5..d8c0b28769 100644 --- a/wsmaster/che-core-api-devfile/src/main/java/org/eclipse/che/api/devfile/server/DevfileService.java +++ b/wsmaster/che-core-api-devfile/src/main/java/org/eclipse/che/api/devfile/server/DevfileService.java @@ -34,6 +34,7 @@ import org.eclipse.che.api.core.rest.Service; import org.eclipse.che.api.workspace.server.devfile.schema.DevfileSchemaProvider; /** Defines Devfile REST API. */ +@Deprecated @Tag(name = "devfile", description = "Devfile REST API") @Path("/devfile") public class DevfileService extends Service { diff --git a/wsmaster/che-core-api-ssh/src/main/java/org/eclipse/che/api/ssh/server/SshService.java b/wsmaster/che-core-api-ssh/src/main/java/org/eclipse/che/api/ssh/server/SshService.java index 9a9106a486..b945e6a9ed 100644 --- a/wsmaster/che-core-api-ssh/src/main/java/org/eclipse/che/api/ssh/server/SshService.java +++ b/wsmaster/che-core-api-ssh/src/main/java/org/eclipse/che/api/ssh/server/SshService.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012-2021 Red Hat, Inc. + * Copyright (c) 2012-2023 Red Hat, Inc. * This program and the accompanying materials are made * available under the terms of the Eclipse Public License 2.0 * which is available at https://www.eclipse.org/legal/epl-2.0/ @@ -60,6 +60,7 @@ import org.eclipse.che.commons.env.EnvironmentContext; * * @author Sergii Leschenko */ +@Deprecated @Tag(name = "ssh", description = "Ssh REST API") @Path("/ssh") public class SshService extends Service { diff --git a/wsmaster/che-core-api-user/src/main/java/org/eclipse/che/api/user/server/PreferencesService.java b/wsmaster/che-core-api-user/src/main/java/org/eclipse/che/api/user/server/PreferencesService.java index 8a1d956274..d4d3b5b6e0 100644 --- a/wsmaster/che-core-api-user/src/main/java/org/eclipse/che/api/user/server/PreferencesService.java +++ b/wsmaster/che-core-api-user/src/main/java/org/eclipse/che/api/user/server/PreferencesService.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012-2021 Red Hat, Inc. + * Copyright (c) 2012-2023 Red Hat, Inc. * This program and the accompanying materials are made * available under the terms of the Eclipse Public License 2.0 * which is available at https://www.eclipse.org/legal/epl-2.0/ @@ -40,6 +40,7 @@ import org.eclipse.che.commons.env.EnvironmentContext; * * @author Yevhenii Voevodin */ +@Deprecated @Path("/preferences") @Tag(name = "preferences", description = "Preferences REST API") public class PreferencesService extends Service { diff --git a/wsmaster/che-core-api-user/src/main/java/org/eclipse/che/api/user/server/ProfileService.java b/wsmaster/che-core-api-user/src/main/java/org/eclipse/che/api/user/server/ProfileService.java index bae2cde06d..798e2d4d46 100644 --- a/wsmaster/che-core-api-user/src/main/java/org/eclipse/che/api/user/server/ProfileService.java +++ b/wsmaster/che-core-api-user/src/main/java/org/eclipse/che/api/user/server/ProfileService.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012-2021 Red Hat, Inc. + * Copyright (c) 2012-2023 Red Hat, Inc. * This program and the accompanying materials are made * available under the terms of the Eclipse Public License 2.0 * which is available at https://www.eclipse.org/legal/epl-2.0/ @@ -48,6 +48,7 @@ import org.eclipse.che.dto.server.DtoFactory; * * @author Yevhenii Voevodin */ +@Deprecated @Tag(name = "profile", description = "Profile REST API") @Path("/profile") public class ProfileService extends Service { diff --git a/wsmaster/che-core-api-workspace-activity/src/main/java/org/eclipse/che/api/workspace/activity/WorkspaceActivityService.java b/wsmaster/che-core-api-workspace-activity/src/main/java/org/eclipse/che/api/workspace/activity/WorkspaceActivityService.java index 1bbe544c19..f9baa259d3 100644 --- a/wsmaster/che-core-api-workspace-activity/src/main/java/org/eclipse/che/api/workspace/activity/WorkspaceActivityService.java +++ b/wsmaster/che-core-api-workspace-activity/src/main/java/org/eclipse/che/api/workspace/activity/WorkspaceActivityService.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012-2021 Red Hat, Inc. + * Copyright (c) 2012-2023 Red Hat, Inc. * This program and the accompanying materials are made * available under the terms of the Eclipse Public License 2.0 * which is available at https://www.eclipse.org/legal/epl-2.0/ @@ -51,6 +51,7 @@ import org.slf4j.LoggerFactory; * * @author Anton Korneta */ +@Deprecated @Singleton @Path("/activity") @Tag( diff --git a/wsmaster/che-core-api-workspace/src/main/java/org/eclipse/che/api/workspace/server/WorkspaceService.java b/wsmaster/che-core-api-workspace/src/main/java/org/eclipse/che/api/workspace/server/WorkspaceService.java index bcf772c738..558f6885d3 100644 --- a/wsmaster/che-core-api-workspace/src/main/java/org/eclipse/che/api/workspace/server/WorkspaceService.java +++ b/wsmaster/che-core-api-workspace/src/main/java/org/eclipse/che/api/workspace/server/WorkspaceService.java @@ -97,6 +97,7 @@ import org.eclipse.che.commons.env.EnvironmentContext; * @author Yevhenii Voevodin * @author Igor Vinokur */ +@Deprecated @Tag(name = "workspace", description = "Workspace REST API") @Path("/workspace") public class WorkspaceService extends Service { From b24e3c7d9530bed4a7927df4b498ba1bc836a3f3 Mon Sep 17 00:00:00 2001 From: Anatolii Bazko Date: Tue, 4 Apr 2023 10:14:40 +0300 Subject: [PATCH 02/75] feat: support retrieving Git user data when PAT is configured (#489) * feat: support retrieving Git user data when PAT is configured Signed-off-by: Anatolii Bazko --- .../che/api/deploy/WsMasterModule.java | 2 + .../infrastructure-factory/pom.xml | 4 + .../KubernetesPersonalAccessTokenManager.java | 21 ++++- .../GitconfigUserDataConfigurator.java | 9 ++- .../GitconfigUserdataConfiguratorTest.java | 9 ++- .../che/security/oauth/EmbeddedOAuthAPI.java | 3 +- .../devops/AzureDevOpsUserDataFetcher.java | 65 ++++++--------- .../BitbucketServerUserDataFetcher.java | 53 +++++++++--- .../BitbucketServerUserDataFetcherTest.java | 21 +++-- .../server/bitbucket/BitbucketUser.java | 31 ++++++- .../bitbucket/BitbucketUserDataFetcher.java | 7 +- .../bitbucket/BitbucketApiClientTest.java | 5 +- .../__files/bitbucket/rest/user/response.json | 3 +- .../server/github/GithubUserDataFetcher.java | 77 +++++++----------- .../github/GithubGitUserDataFetcherTest.java | 13 ++- .../server/gitlab/GitlabUserDataFetcher.java | 81 +++++-------------- .../gitlab/GitlabUserDataFetcherTest.java | 14 +++- wsmaster/che-core-api-factory/pom.xml | 4 + .../scm/AbstractGitUserDataFetcher.java | 78 ++++++++++++++++++ .../server/scm/GitUserDataFetcher.java | 12 ++- .../factory/server/scm/OAuthTokenFetcher.java | 34 ++++++++ .../scm/PersonalAccessTokenManager.java | 22 ++++- 22 files changed, 375 insertions(+), 193 deletions(-) create mode 100644 wsmaster/che-core-api-factory/src/main/java/org/eclipse/che/api/factory/server/scm/AbstractGitUserDataFetcher.java create mode 100644 wsmaster/che-core-api-factory/src/main/java/org/eclipse/che/api/factory/server/scm/OAuthTokenFetcher.java diff --git a/assembly/assembly-wsmaster-war/src/main/java/org/eclipse/che/api/deploy/WsMasterModule.java b/assembly/assembly-wsmaster-war/src/main/java/org/eclipse/che/api/deploy/WsMasterModule.java index 054727dcbf..97867dfe71 100644 --- a/assembly/assembly-wsmaster-war/src/main/java/org/eclipse/che/api/deploy/WsMasterModule.java +++ b/assembly/assembly-wsmaster-war/src/main/java/org/eclipse/che/api/deploy/WsMasterModule.java @@ -50,6 +50,7 @@ import org.eclipse.che.api.factory.server.github.GithubFactoryParametersResolver import org.eclipse.che.api.factory.server.github.GithubScmFileResolver; import org.eclipse.che.api.factory.server.gitlab.GitlabFactoryParametersResolver; import org.eclipse.che.api.factory.server.gitlab.GitlabScmFileResolver; +import org.eclipse.che.api.factory.server.scm.OAuthTokenFetcher; import org.eclipse.che.api.metrics.WsMasterMetricsModule; import org.eclipse.che.api.system.server.ServiceTermination; import org.eclipse.che.api.system.server.SystemModule; @@ -408,6 +409,7 @@ public class WsMasterModule extends AbstractModule { bind(TokenValidator.class).to(NotImplementedTokenValidator.class); bind(ProfileDao.class).to(JpaProfileDao.class); bind(OAuthAPI.class).to(EmbeddedOAuthAPI.class).asEagerSingleton(); + bind(OAuthTokenFetcher.class).to(EmbeddedOAuthAPI.class).asEagerSingleton(); } bind(AdminPermissionInitializer.class).asEagerSingleton(); diff --git a/infrastructures/infrastructure-factory/pom.xml b/infrastructures/infrastructure-factory/pom.xml index be534ffb61..de6e2064fa 100644 --- a/infrastructures/infrastructure-factory/pom.xml +++ b/infrastructures/infrastructure-factory/pom.xml @@ -55,6 +55,10 @@ org.eclipse.che.core che-core-api-workspace + + org.eclipse.che.core + che-core-commons-annotations + org.eclipse.che.core che-core-commons-lang diff --git a/infrastructures/infrastructure-factory/src/main/java/org/eclipse/che/api/factory/server/scm/kubernetes/KubernetesPersonalAccessTokenManager.java b/infrastructures/infrastructure-factory/src/main/java/org/eclipse/che/api/factory/server/scm/kubernetes/KubernetesPersonalAccessTokenManager.java index e4aac41eec..2175d19b2b 100644 --- a/infrastructures/infrastructure-factory/src/main/java/org/eclipse/che/api/factory/server/scm/kubernetes/KubernetesPersonalAccessTokenManager.java +++ b/infrastructures/infrastructure-factory/src/main/java/org/eclipse/che/api/factory/server/scm/kubernetes/KubernetesPersonalAccessTokenManager.java @@ -37,6 +37,7 @@ import org.eclipse.che.api.factory.server.scm.exception.ScmUnauthorizedException import org.eclipse.che.api.factory.server.scm.exception.UnknownScmProviderException; import org.eclipse.che.api.factory.server.scm.exception.UnsatisfiedScmPreconditionException; import org.eclipse.che.api.workspace.server.spi.InfrastructureException; +import org.eclipse.che.commons.annotation.Nullable; import org.eclipse.che.commons.env.EnvironmentContext; import org.eclipse.che.commons.lang.NameGenerator; import org.eclipse.che.commons.lang.StringUtils; @@ -140,7 +141,21 @@ public class KubernetesPersonalAccessTokenManager implements PersonalAccessToken public Optional get(Subject cheUser, String scmServerUrl) throws ScmConfigurationPersistenceException, ScmUnauthorizedException, ScmCommunicationException { + return doGetPersonalAccessToken(cheUser, null, scmServerUrl); + } + @Override + public Optional get( + Subject cheUser, String oAuthProviderName, @Nullable String scmServerUrl) + throws ScmConfigurationPersistenceException, ScmUnauthorizedException, + ScmCommunicationException { + return doGetPersonalAccessToken(cheUser, oAuthProviderName, scmServerUrl); + } + + private Optional doGetPersonalAccessToken( + Subject cheUser, @Nullable String oAuthProviderName, @Nullable String scmServerUrl) + throws ScmConfigurationPersistenceException, ScmUnauthorizedException, + ScmCommunicationException { try { for (KubernetesNamespaceMeta namespaceMeta : namespaceFactory.list()) { List secrets = @@ -152,7 +167,11 @@ public class KubernetesPersonalAccessTokenManager implements PersonalAccessToken Map annotations = secret.getMetadata().getAnnotations(); String trimmedUrl = StringUtils.trimEnd(annotations.get(ANNOTATION_SCM_URL), '/'); if (annotations.get(ANNOTATION_CHE_USERID).equals(cheUser.getUserId()) - && trimmedUrl.equals(StringUtils.trimEnd(scmServerUrl, '/'))) { + && (oAuthProviderName == null + || oAuthProviderName.equals( + annotations.get(ANNOTATION_SCM_PERSONAL_ACCESS_TOKEN_NAME))) + && (scmServerUrl == null + || trimmedUrl.equals(StringUtils.trimEnd(scmServerUrl, '/')))) { String token = new String(Base64.getDecoder().decode(secret.getData().get("token"))).trim(); PersonalAccessToken personalAccessToken = diff --git a/infrastructures/kubernetes/src/main/java/org/eclipse/che/workspace/infrastructure/kubernetes/namespace/configurator/GitconfigUserDataConfigurator.java b/infrastructures/kubernetes/src/main/java/org/eclipse/che/workspace/infrastructure/kubernetes/namespace/configurator/GitconfigUserDataConfigurator.java index 2cfdd84112..6691c424f3 100644 --- a/infrastructures/kubernetes/src/main/java/org/eclipse/che/workspace/infrastructure/kubernetes/namespace/configurator/GitconfigUserDataConfigurator.java +++ b/infrastructures/kubernetes/src/main/java/org/eclipse/che/workspace/infrastructure/kubernetes/namespace/configurator/GitconfigUserDataConfigurator.java @@ -22,8 +22,7 @@ import java.util.Set; import javax.inject.Inject; import org.eclipse.che.api.factory.server.scm.GitUserData; import org.eclipse.che.api.factory.server.scm.GitUserDataFetcher; -import org.eclipse.che.api.factory.server.scm.exception.ScmCommunicationException; -import org.eclipse.che.api.factory.server.scm.exception.ScmUnauthorizedException; +import org.eclipse.che.api.factory.server.scm.exception.*; import org.eclipse.che.api.user.server.UserManager; import org.eclipse.che.api.workspace.server.spi.InfrastructureException; import org.eclipse.che.api.workspace.server.spi.NamespaceResolutionContext; @@ -57,7 +56,11 @@ public class GitconfigUserDataConfigurator implements NamespaceConfigurator { try { gitUserData = fetcher.fetchGitUserData(); break; - } catch (ScmUnauthorizedException | ScmCommunicationException e) { + } catch (ScmUnauthorizedException + | ScmCommunicationException + | ScmConfigurationPersistenceException + | ScmItemNotFoundException + | ScmBadRequestException e) { LOG.debug("No GitUserDataFetcher is configured. " + e.getMessage()); } } diff --git a/infrastructures/kubernetes/src/test/java/org/eclipse/che/workspace/infrastructure/kubernetes/namespace/configurator/GitconfigUserdataConfiguratorTest.java b/infrastructures/kubernetes/src/test/java/org/eclipse/che/workspace/infrastructure/kubernetes/namespace/configurator/GitconfigUserdataConfiguratorTest.java index fcb9bf807f..966e08c7eb 100644 --- a/infrastructures/kubernetes/src/test/java/org/eclipse/che/workspace/infrastructure/kubernetes/namespace/configurator/GitconfigUserdataConfiguratorTest.java +++ b/infrastructures/kubernetes/src/test/java/org/eclipse/che/workspace/infrastructure/kubernetes/namespace/configurator/GitconfigUserdataConfiguratorTest.java @@ -25,8 +25,7 @@ import java.util.Map; import java.util.Set; import org.eclipse.che.api.factory.server.scm.GitUserData; import org.eclipse.che.api.factory.server.scm.GitUserDataFetcher; -import org.eclipse.che.api.factory.server.scm.exception.ScmCommunicationException; -import org.eclipse.che.api.factory.server.scm.exception.ScmUnauthorizedException; +import org.eclipse.che.api.factory.server.scm.exception.*; import org.eclipse.che.api.user.server.UserManager; import org.eclipse.che.api.workspace.server.spi.InfrastructureException; import org.eclipse.che.api.workspace.server.spi.NamespaceResolutionContext; @@ -72,7 +71,8 @@ public class GitconfigUserdataConfiguratorTest { @Test public void createUserdataConfigmapWhenDoesNotExist() throws ScmCommunicationException, ScmUnauthorizedException, InfrastructureException, - InterruptedException { + InterruptedException, ScmItemNotFoundException, ScmConfigurationPersistenceException, + ScmBadRequestException { // given when(gitUserDataFetcher.fetchGitUserData()).thenReturn(new GitUserData("gitUser", "gitEmail")); @@ -93,7 +93,8 @@ public class GitconfigUserdataConfiguratorTest { @Test public void doNothingWhenSecretAlreadyExists() throws InfrastructureException, InterruptedException, ScmCommunicationException, - ScmUnauthorizedException { + ScmUnauthorizedException, ScmItemNotFoundException, ScmConfigurationPersistenceException, + ScmBadRequestException { // given when(gitUserDataFetcher.fetchGitUserData()).thenReturn(new GitUserData("gitUser", "gitEmail")); Map annotations = diff --git a/wsmaster/che-core-api-auth/src/main/java/org/eclipse/che/security/oauth/EmbeddedOAuthAPI.java b/wsmaster/che-core-api-auth/src/main/java/org/eclipse/che/security/oauth/EmbeddedOAuthAPI.java index 08c8f6ec37..352d7bbc20 100644 --- a/wsmaster/che-core-api-auth/src/main/java/org/eclipse/che/security/oauth/EmbeddedOAuthAPI.java +++ b/wsmaster/che-core-api-auth/src/main/java/org/eclipse/che/security/oauth/EmbeddedOAuthAPI.java @@ -37,6 +37,7 @@ import org.eclipse.che.api.core.UnauthorizedException; import org.eclipse.che.api.core.rest.shared.dto.Link; import org.eclipse.che.api.core.rest.shared.dto.LinkParameter; import org.eclipse.che.api.core.util.LinksHelper; +import org.eclipse.che.api.factory.server.scm.OAuthTokenFetcher; import org.eclipse.che.api.factory.server.scm.PersonalAccessToken; import org.eclipse.che.api.factory.server.scm.PersonalAccessTokenManager; import org.eclipse.che.api.factory.server.scm.exception.ScmCommunicationException; @@ -55,7 +56,7 @@ import org.slf4j.LoggerFactory; * @author Mykhailo Kuznietsov */ @Singleton -public class EmbeddedOAuthAPI implements OAuthAPI { +public class EmbeddedOAuthAPI implements OAuthAPI, OAuthTokenFetcher { private static final Logger LOG = LoggerFactory.getLogger(EmbeddedOAuthAPI.class); @Inject diff --git a/wsmaster/che-core-api-factory-azure-devops/src/main/java/org/eclipse/che/api/factory/server/azure/devops/AzureDevOpsUserDataFetcher.java b/wsmaster/che-core-api-factory-azure-devops/src/main/java/org/eclipse/che/api/factory/server/azure/devops/AzureDevOpsUserDataFetcher.java index bf15508b1f..75f126570d 100644 --- a/wsmaster/che-core-api-factory-azure-devops/src/main/java/org/eclipse/che/api/factory/server/azure/devops/AzureDevOpsUserDataFetcher.java +++ b/wsmaster/che-core-api-factory-azure-devops/src/main/java/org/eclipse/che/api/factory/server/azure/devops/AzureDevOpsUserDataFetcher.java @@ -16,75 +16,56 @@ import static org.eclipse.che.api.factory.server.azure.devops.AzureDevOps.getAut import javax.inject.Inject; import javax.inject.Named; import org.eclipse.che.api.auth.shared.dto.OAuthToken; -import org.eclipse.che.api.core.BadRequestException; -import org.eclipse.che.api.core.ConflictException; -import org.eclipse.che.api.core.ForbiddenException; -import org.eclipse.che.api.core.NotFoundException; -import org.eclipse.che.api.core.ServerException; -import org.eclipse.che.api.core.UnauthorizedException; +import org.eclipse.che.api.factory.server.scm.AbstractGitUserDataFetcher; import org.eclipse.che.api.factory.server.scm.GitUserData; -import org.eclipse.che.api.factory.server.scm.GitUserDataFetcher; +import org.eclipse.che.api.factory.server.scm.OAuthTokenFetcher; +import org.eclipse.che.api.factory.server.scm.PersonalAccessToken; +import org.eclipse.che.api.factory.server.scm.PersonalAccessTokenManager; import org.eclipse.che.api.factory.server.scm.exception.ScmBadRequestException; import org.eclipse.che.api.factory.server.scm.exception.ScmCommunicationException; import org.eclipse.che.api.factory.server.scm.exception.ScmItemNotFoundException; -import org.eclipse.che.api.factory.server.scm.exception.ScmUnauthorizedException; -import org.eclipse.che.commons.env.EnvironmentContext; -import org.eclipse.che.commons.subject.Subject; -import org.eclipse.che.security.oauth.OAuthAPI; /** * Azure DevOps user data fetcher. * * @author Anatolii Bazko */ -public class AzureDevOpsUserDataFetcher implements GitUserDataFetcher { +public class AzureDevOpsUserDataFetcher extends AbstractGitUserDataFetcher { private final String cheApiEndpoint; private final String[] scopes; - private final OAuthAPI oAuthAPI; - private final AzureDevOpsApiClient azureDevOpsApiClient; @Inject public AzureDevOpsUserDataFetcher( - OAuthAPI oAuthAPI, + OAuthTokenFetcher oAuthTokenFetcher, + PersonalAccessTokenManager personalAccessTokenManager, AzureDevOpsApiClient azureDevOpsApiClient, @Named("che.api") String cheApiEndpoint, @Named("che.integration.azure.devops.application_scopes") String[] scopes) { + super(AzureDevOps.PROVIDER_NAME, personalAccessTokenManager, oAuthTokenFetcher); this.scopes = scopes; this.cheApiEndpoint = cheApiEndpoint; - this.oAuthAPI = oAuthAPI; this.azureDevOpsApiClient = azureDevOpsApiClient; } @Override - public GitUserData fetchGitUserData() throws ScmUnauthorizedException, ScmCommunicationException { - OAuthToken oAuthToken; - try { - oAuthToken = oAuthAPI.getToken(AzureDevOps.PROVIDER_NAME); - AzureDevOpsUser user = azureDevOpsApiClient.getUserWithOAuthToken(oAuthToken.getToken()); - return new GitUserData(user.getDisplayName(), user.getEmailAddress()); - } catch (UnauthorizedException e) { - Subject cheSubject = EnvironmentContext.getCurrent().getSubject(); - throw new ScmUnauthorizedException( - cheSubject.getUserName() - + " is not authorized in " - + AzureDevOps.PROVIDER_NAME - + " OAuth provider.", - AzureDevOps.PROVIDER_NAME, - "2.0", - getLocalAuthenticateUrl()); - } catch (NotFoundException - | ServerException - | ForbiddenException - | BadRequestException - | ScmItemNotFoundException - | ScmBadRequestException - | ConflictException e) { - throw new ScmCommunicationException(e.getMessage(), e); - } + protected GitUserData fetchGitUserDataWithOAuthToken(OAuthToken oAuthToken) + throws ScmItemNotFoundException, ScmCommunicationException, ScmBadRequestException { + AzureDevOpsUser user = azureDevOpsApiClient.getUserWithOAuthToken(oAuthToken.getToken()); + return new GitUserData(user.getDisplayName(), user.getEmailAddress()); } - private String getLocalAuthenticateUrl() { + @Override + protected GitUserData fetchGitUserDataWithPersonalAccessToken( + PersonalAccessToken personalAccessToken) + throws ScmItemNotFoundException, ScmCommunicationException, ScmBadRequestException { + AzureDevOpsUser user = + azureDevOpsApiClient.getUserWithPAT( + personalAccessToken.getToken(), personalAccessToken.getScmOrganization()); + return new GitUserData(user.getDisplayName(), user.getEmailAddress()); + } + + protected String getLocalAuthenticateUrl() { return cheApiEndpoint + getAuthenticateUrlPath(scopes); } } diff --git a/wsmaster/che-core-api-factory-bitbucket-server/src/main/java/org/eclipse/che/api/factory/server/bitbucket/BitbucketServerUserDataFetcher.java b/wsmaster/che-core-api-factory-bitbucket-server/src/main/java/org/eclipse/che/api/factory/server/bitbucket/BitbucketServerUserDataFetcher.java index 70ed0fa9a7..1e584bd162 100644 --- a/wsmaster/che-core-api-factory-bitbucket-server/src/main/java/org/eclipse/che/api/factory/server/bitbucket/BitbucketServerUserDataFetcher.java +++ b/wsmaster/che-core-api-factory-bitbucket-server/src/main/java/org/eclipse/che/api/factory/server/bitbucket/BitbucketServerUserDataFetcher.java @@ -16,32 +16,51 @@ import static java.util.stream.Collectors.toList; import com.google.common.base.Splitter; import java.util.Collections; import java.util.List; +import java.util.Optional; import javax.inject.Inject; import javax.inject.Named; import org.eclipse.che.api.factory.server.bitbucket.server.BitbucketServerApiClient; import org.eclipse.che.api.factory.server.bitbucket.server.BitbucketUser; import org.eclipse.che.api.factory.server.scm.GitUserData; import org.eclipse.che.api.factory.server.scm.GitUserDataFetcher; +import org.eclipse.che.api.factory.server.scm.PersonalAccessToken; +import org.eclipse.che.api.factory.server.scm.PersonalAccessTokenManager; import org.eclipse.che.api.factory.server.scm.exception.ScmCommunicationException; +import org.eclipse.che.api.factory.server.scm.exception.ScmConfigurationPersistenceException; import org.eclipse.che.api.factory.server.scm.exception.ScmItemNotFoundException; import org.eclipse.che.api.factory.server.scm.exception.ScmUnauthorizedException; import org.eclipse.che.commons.annotation.Nullable; import org.eclipse.che.commons.env.EnvironmentContext; import org.eclipse.che.commons.lang.StringUtils; import org.eclipse.che.commons.subject.Subject; +import org.eclipse.che.security.oauth.OAuthAPI; +import org.eclipse.che.security.oauth1.NoopOAuthAuthenticator; /** Bitbucket git user data retriever. */ public class BitbucketServerUserDataFetcher implements GitUserDataFetcher { + private final String OAUTH_PROVIDER_NAME = "bitbucket"; + private final String apiEndpoint; + /** Bitbucket API client. */ private final BitbucketServerApiClient bitbucketServerApiClient; + private final PersonalAccessTokenManager personalAccessTokenManager; + private final OAuthAPI oAuthAPI; + private final List registeredBitbucketEndpoints; @Inject public BitbucketServerUserDataFetcher( + @Named("che.api") String apiEndpoint, + @Nullable @Named("che.integration.bitbucket.server_endpoints") String bitbucketEndpoints, BitbucketServerApiClient bitbucketServerApiClient, - @Nullable @Named("che.integration.bitbucket.server_endpoints") String bitbucketEndpoints) { + OAuthAPI oAuthAPI, + PersonalAccessTokenManager personalAccessTokenManager) { + this.oAuthAPI = oAuthAPI; + this.apiEndpoint = apiEndpoint; + this.bitbucketServerApiClient = bitbucketServerApiClient; + this.personalAccessTokenManager = personalAccessTokenManager; if (bitbucketEndpoints != null) { this.registeredBitbucketEndpoints = Splitter.on(",") @@ -51,27 +70,41 @@ public class BitbucketServerUserDataFetcher implements GitUserDataFetcher { } else { this.registeredBitbucketEndpoints = Collections.emptyList(); } - this.bitbucketServerApiClient = bitbucketServerApiClient; } @Override - public GitUserData fetchGitUserData() throws ScmUnauthorizedException, ScmCommunicationException { - GitUserData gitUserData = null; + public GitUserData fetchGitUserData() + throws ScmUnauthorizedException, ScmCommunicationException, + ScmConfigurationPersistenceException, ScmItemNotFoundException { + Subject cheSubject = EnvironmentContext.getCurrent().getSubject(); for (String bitbucketServerEndpoint : this.registeredBitbucketEndpoints) { if (bitbucketServerApiClient.isConnected(bitbucketServerEndpoint)) { - Subject cheSubject = EnvironmentContext.getCurrent().getSubject(); try { BitbucketUser user = bitbucketServerApiClient.getUser(cheSubject); - gitUserData = new GitUserData(user.getName(), user.getEmailAddress()); + return new GitUserData(user.getDisplayName(), user.getEmailAddress()); } catch (ScmItemNotFoundException e) { throw new ScmCommunicationException(e.getMessage(), e); } - break; } } - if (gitUserData == null) { - throw new ScmCommunicationException("Failed to retrieve git user data from Bitbucket"); + + // Try go get user data using personal access token + Optional personalAccessToken = + this.personalAccessTokenManager.get(cheSubject, OAUTH_PROVIDER_NAME, null); + if (personalAccessToken.isPresent()) { + PersonalAccessToken token = personalAccessToken.get(); + HttpBitbucketServerApiClient httpBitbucketServerApiClient = + new HttpBitbucketServerApiClient( + StringUtils.trimEnd(token.getScmProviderUrl(), '/'), + new NoopOAuthAuthenticator(), + oAuthAPI, + this.apiEndpoint); + + BitbucketUser user = + httpBitbucketServerApiClient.getUser(token.getScmUserName(), token.getToken()); + return new GitUserData(user.getDisplayName(), user.getEmailAddress()); } - return gitUserData; + + throw new ScmCommunicationException("Failed to retrieve git user data from Bitbucket"); } } diff --git a/wsmaster/che-core-api-factory-bitbucket-server/src/test/java/org/eclipse/che/api/factory/server/bitbucket/BitbucketServerUserDataFetcherTest.java b/wsmaster/che-core-api-factory-bitbucket-server/src/test/java/org/eclipse/che/api/factory/server/bitbucket/BitbucketServerUserDataFetcherTest.java index 4804c6af1b..c4654c3be8 100644 --- a/wsmaster/che-core-api-factory-bitbucket-server/src/test/java/org/eclipse/che/api/factory/server/bitbucket/BitbucketServerUserDataFetcherTest.java +++ b/wsmaster/che-core-api-factory-bitbucket-server/src/test/java/org/eclipse/che/api/factory/server/bitbucket/BitbucketServerUserDataFetcherTest.java @@ -19,13 +19,12 @@ import java.net.MalformedURLException; import org.eclipse.che.api.factory.server.bitbucket.server.BitbucketServerApiClient; import org.eclipse.che.api.factory.server.bitbucket.server.BitbucketUser; import org.eclipse.che.api.factory.server.scm.GitUserData; -import org.eclipse.che.api.factory.server.scm.exception.ScmBadRequestException; -import org.eclipse.che.api.factory.server.scm.exception.ScmCommunicationException; -import org.eclipse.che.api.factory.server.scm.exception.ScmItemNotFoundException; -import org.eclipse.che.api.factory.server.scm.exception.ScmUnauthorizedException; +import org.eclipse.che.api.factory.server.scm.PersonalAccessTokenManager; +import org.eclipse.che.api.factory.server.scm.exception.*; import org.eclipse.che.commons.env.EnvironmentContext; import org.eclipse.che.commons.subject.Subject; import org.eclipse.che.commons.subject.SubjectImpl; +import org.eclipse.che.security.oauth.OAuthAPI; import org.mockito.Mock; import org.mockito.testng.MockitoTestNGListener; import org.testng.annotations.BeforeMethod; @@ -37,6 +36,8 @@ public class BitbucketServerUserDataFetcherTest { String someBitbucketURL = "https://some.bitbucketserver.com"; Subject subject; @Mock BitbucketServerApiClient bitbucketServerApiClient; + @Mock PersonalAccessTokenManager personalAccessTokenManager; + @Mock OAuthAPI oAuthAPI; BitbucketUser bitbucketUser; BitbucketServerUserDataFetcher fetcher; @@ -45,7 +46,13 @@ public class BitbucketServerUserDataFetcherTest { subject = new SubjectImpl("another_user", "user987", "token111", false); bitbucketUser = new BitbucketUser("User", "user", 32423523, "NORMAL", true, "user", "user@users.com"); - fetcher = new BitbucketServerUserDataFetcher(bitbucketServerApiClient, someBitbucketURL); + fetcher = + new BitbucketServerUserDataFetcher( + "api.local", + someBitbucketURL, + bitbucketServerApiClient, + oAuthAPI, + personalAccessTokenManager); EnvironmentContext context = new EnvironmentContext(); context.setSubject(subject); EnvironmentContext.setCurrent(context); @@ -54,14 +61,14 @@ public class BitbucketServerUserDataFetcherTest { @Test public void shouldBeAbleToFetchPersonalAccessToken() throws ScmUnauthorizedException, ScmCommunicationException, ScmItemNotFoundException, - ScmBadRequestException { + ScmBadRequestException, ScmConfigurationPersistenceException { // given when(bitbucketServerApiClient.isConnected(eq(someBitbucketURL))).thenReturn(true); when(bitbucketServerApiClient.getUser(eq(subject))).thenReturn(bitbucketUser); // when GitUserData gitUserData = fetcher.fetchGitUserData(); // then - assertEquals(gitUserData.getScmUsername(), "user"); + assertEquals(gitUserData.getScmUsername(), "User"); assertEquals(gitUserData.getScmUserEmail(), "user@users.com"); } } diff --git a/wsmaster/che-core-api-factory-bitbucket/src/main/java/org/eclipse/che/api/factory/server/bitbucket/BitbucketUser.java b/wsmaster/che-core-api-factory-bitbucket/src/main/java/org/eclipse/che/api/factory/server/bitbucket/BitbucketUser.java index 5b64975380..d48e46e0a4 100644 --- a/wsmaster/che-core-api-factory-bitbucket/src/main/java/org/eclipse/che/api/factory/server/bitbucket/BitbucketUser.java +++ b/wsmaster/che-core-api-factory-bitbucket/src/main/java/org/eclipse/che/api/factory/server/bitbucket/BitbucketUser.java @@ -13,13 +13,16 @@ package org.eclipse.che.api.factory.server.bitbucket; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.Objects; +import com.google.common.base.Objects; @JsonIgnoreProperties(ignoreUnknown = true) public class BitbucketUser { private String name; private String id; + @JsonProperty("display_name") + private String displayName; + public String getName() { return name; } @@ -38,21 +41,41 @@ public class BitbucketUser { this.id = id; } + public String getDisplayName() { + return displayName; + } + + public void setDisplayName(String displayName) { + this.displayName = displayName; + } + @Override public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; BitbucketUser that = (BitbucketUser) o; - return Objects.equals(name, that.name) && Objects.equals(id, that.id); + return Objects.equal(name, that.name) + && Objects.equal(id, that.id) + && Objects.equal(displayName, that.displayName); } @Override public int hashCode() { - return Objects.hash(name, id); + return Objects.hashCode(name, id, displayName); } @Override public String toString() { - return "BitbucketUser{" + "name='" + name + '\'' + ", id='" + id + '\'' + '}'; + return "BitbucketUser{" + + "name='" + + name + + '\'' + + ", id='" + + id + + '\'' + + ", displayName='" + + displayName + + '\'' + + '}'; } } diff --git a/wsmaster/che-core-api-factory-bitbucket/src/main/java/org/eclipse/che/api/factory/server/bitbucket/BitbucketUserDataFetcher.java b/wsmaster/che-core-api-factory-bitbucket/src/main/java/org/eclipse/che/api/factory/server/bitbucket/BitbucketUserDataFetcher.java index 2baf7c535b..6ce3e4b670 100644 --- a/wsmaster/che-core-api-factory-bitbucket/src/main/java/org/eclipse/che/api/factory/server/bitbucket/BitbucketUserDataFetcher.java +++ b/wsmaster/che-core-api-factory-bitbucket/src/main/java/org/eclipse/che/api/factory/server/bitbucket/BitbucketUserDataFetcher.java @@ -33,7 +33,10 @@ import org.eclipse.che.commons.env.EnvironmentContext; import org.eclipse.che.commons.subject.Subject; import org.eclipse.che.security.oauth.OAuthAPI; -/** Bitbucket user data retriever. */ +/** + * Bitbucket user data retriever. TODO: extends {@code AbstractGitUserDataFetcher} when we support + * personal access tokens for BitBucket. + */ public class BitbucketUserDataFetcher implements GitUserDataFetcher { private final String apiEndpoint; private final OAuthAPI oAuthAPI; @@ -70,7 +73,7 @@ public class BitbucketUserDataFetcher implements GitUserDataFetcher { BitbucketUserEmail emailResponse = bitbucketApiClient.getEmail(oAuthToken.getToken()); String email = emailResponse.getValues().length > 0 ? emailResponse.getValues()[0].getEmail() : ""; - return new GitUserData(user.getName(), email); + return new GitUserData(user.getDisplayName(), email); } catch (UnauthorizedException e) { Subject cheSubject = EnvironmentContext.getCurrent().getSubject(); throw new ScmUnauthorizedException( diff --git a/wsmaster/che-core-api-factory-bitbucket/src/test/java/org/eclipse/che/api/factory/server/bitbucket/BitbucketApiClientTest.java b/wsmaster/che-core-api-factory-bitbucket/src/test/java/org/eclipse/che/api/factory/server/bitbucket/BitbucketApiClientTest.java index 70fa2bd3d3..f2ddfca57b 100644 --- a/wsmaster/che-core-api-factory-bitbucket/src/test/java/org/eclipse/che/api/factory/server/bitbucket/BitbucketApiClientTest.java +++ b/wsmaster/che-core-api-factory-bitbucket/src/test/java/org/eclipse/che/api/factory/server/bitbucket/BitbucketApiClientTest.java @@ -71,8 +71,11 @@ public class BitbucketApiClientTest { user.getId(), "bitbucket-user_id_123", "Bitbucket user id was not parsed properly by client"); + assertEquals(user.getName(), "user", "Bitbucket user name was not parsed properly by client"); assertEquals( - user.getName(), "Bitbucket User", "Bitbucket user name was not parsed properly by client"); + user.getDisplayName(), + "Bitbucket User", + "Bitbucket user display name was not parsed properly by client"); } @Test diff --git a/wsmaster/che-core-api-factory-bitbucket/src/test/resources/__files/bitbucket/rest/user/response.json b/wsmaster/che-core-api-factory-bitbucket/src/test/resources/__files/bitbucket/rest/user/response.json index 2319f0b164..8c05e1c37f 100644 --- a/wsmaster/che-core-api-factory-bitbucket/src/test/resources/__files/bitbucket/rest/user/response.json +++ b/wsmaster/che-core-api-factory-bitbucket/src/test/resources/__files/bitbucket/rest/user/response.json @@ -1,4 +1,5 @@ { - "username": "Bitbucket User", + "username": "user", + "display_name": "Bitbucket User", "account_id": "bitbucket-user_id_123" } \ No newline at end of file diff --git a/wsmaster/che-core-api-factory-github/src/main/java/org/eclipse/che/api/factory/server/github/GithubUserDataFetcher.java b/wsmaster/che-core-api-factory-github/src/main/java/org/eclipse/che/api/factory/server/github/GithubUserDataFetcher.java index 013d0954a5..e05c48b21c 100644 --- a/wsmaster/che-core-api-factory-github/src/main/java/org/eclipse/che/api/factory/server/github/GithubUserDataFetcher.java +++ b/wsmaster/che-core-api-factory-github/src/main/java/org/eclipse/che/api/factory/server/github/GithubUserDataFetcher.java @@ -17,28 +17,19 @@ import java.util.Set; import javax.inject.Inject; import javax.inject.Named; import org.eclipse.che.api.auth.shared.dto.OAuthToken; -import org.eclipse.che.api.core.BadRequestException; -import org.eclipse.che.api.core.ConflictException; -import org.eclipse.che.api.core.ForbiddenException; -import org.eclipse.che.api.core.NotFoundException; -import org.eclipse.che.api.core.ServerException; -import org.eclipse.che.api.core.UnauthorizedException; +import org.eclipse.che.api.factory.server.scm.AbstractGitUserDataFetcher; import org.eclipse.che.api.factory.server.scm.GitUserData; -import org.eclipse.che.api.factory.server.scm.GitUserDataFetcher; +import org.eclipse.che.api.factory.server.scm.OAuthTokenFetcher; +import org.eclipse.che.api.factory.server.scm.PersonalAccessToken; +import org.eclipse.che.api.factory.server.scm.PersonalAccessTokenManager; import org.eclipse.che.api.factory.server.scm.exception.ScmBadRequestException; import org.eclipse.che.api.factory.server.scm.exception.ScmCommunicationException; import org.eclipse.che.api.factory.server.scm.exception.ScmItemNotFoundException; -import org.eclipse.che.api.factory.server.scm.exception.ScmUnauthorizedException; import org.eclipse.che.commons.annotation.Nullable; -import org.eclipse.che.commons.env.EnvironmentContext; -import org.eclipse.che.commons.subject.Subject; -import org.eclipse.che.security.oauth.OAuthAPI; /** GitHub user data retriever. */ -public class GithubUserDataFetcher implements GitUserDataFetcher { +public class GithubUserDataFetcher extends AbstractGitUserDataFetcher { private final String apiEndpoint; - private final OAuthAPI oAuthAPI; - /** GitHub API client. */ private final GithubApiClient githubApiClient; @@ -53,48 +44,42 @@ public class GithubUserDataFetcher implements GitUserDataFetcher { public GithubUserDataFetcher( @Named("che.api") String apiEndpoint, @Nullable @Named("che.integration.github.oauth_endpoint") String oauthEndpoint, - OAuthAPI oAuthAPI) { - this(apiEndpoint, oAuthAPI, new GithubApiClient(oauthEndpoint)); + OAuthTokenFetcher oAuthTokenFetcher, + PersonalAccessTokenManager personalAccessTokenManager) { + this( + apiEndpoint, + oAuthTokenFetcher, + personalAccessTokenManager, + new GithubApiClient(oauthEndpoint)); } /** Constructor used for testing only. */ public GithubUserDataFetcher( - String apiEndpoint, OAuthAPI oAuthAPI, GithubApiClient githubApiClient) { - this.apiEndpoint = apiEndpoint; - this.oAuthAPI = oAuthAPI; + String apiEndpoint, + OAuthTokenFetcher oAuthTokenFetcher, + PersonalAccessTokenManager personalAccessTokenManager, + GithubApiClient githubApiClient) { + super(OAUTH_PROVIDER_NAME, personalAccessTokenManager, oAuthTokenFetcher); this.githubApiClient = githubApiClient; + this.apiEndpoint = apiEndpoint; } @Override - public GitUserData fetchGitUserData() throws ScmUnauthorizedException, ScmCommunicationException { - OAuthToken oAuthToken; - try { - oAuthToken = oAuthAPI.getToken(OAUTH_PROVIDER_NAME); - // Find the user associated to the OAuth token by querying the GitHub API. - GithubUser user = githubApiClient.getUser(oAuthToken.getToken()); - return new GitUserData(user.getName(), user.getEmail()); - } catch (UnauthorizedException e) { - Subject cheSubject = EnvironmentContext.getCurrent().getSubject(); - throw new ScmUnauthorizedException( - cheSubject.getUserName() - + " is not authorized in " - + OAUTH_PROVIDER_NAME - + " OAuth provider.", - OAUTH_PROVIDER_NAME, - "2.0", - getLocalAuthenticateUrl()); - } catch (NotFoundException - | ServerException - | ForbiddenException - | BadRequestException - | ScmItemNotFoundException - | ScmBadRequestException - | ConflictException e) { - throw new ScmCommunicationException(e.getMessage(), e); - } + protected GitUserData fetchGitUserDataWithOAuthToken(OAuthToken oAuthToken) + throws ScmItemNotFoundException, ScmCommunicationException, ScmBadRequestException { + GithubUser user = githubApiClient.getUser(oAuthToken.getToken()); + return new GitUserData(user.getName(), user.getEmail()); } - private String getLocalAuthenticateUrl() { + @Override + protected GitUserData fetchGitUserDataWithPersonalAccessToken( + PersonalAccessToken personalAccessToken) + throws ScmItemNotFoundException, ScmCommunicationException, ScmBadRequestException { + GithubUser user = githubApiClient.getUser(personalAccessToken.getToken()); + return new GitUserData(user.getName(), user.getEmail()); + } + + protected String getLocalAuthenticateUrl() { return apiEndpoint + "/oauth/authenticate?oauth_provider=" + OAUTH_PROVIDER_NAME diff --git a/wsmaster/che-core-api-factory-github/src/test/java/org/eclipse/che/api/factory/server/github/GithubGitUserDataFetcherTest.java b/wsmaster/che-core-api-factory-github/src/test/java/org/eclipse/che/api/factory/server/github/GithubGitUserDataFetcherTest.java index 64c9158df3..714dd961b2 100644 --- a/wsmaster/che-core-api-factory-github/src/test/java/org/eclipse/che/api/factory/server/github/GithubGitUserDataFetcherTest.java +++ b/wsmaster/che-core-api-factory-github/src/test/java/org/eclipse/che/api/factory/server/github/GithubGitUserDataFetcherTest.java @@ -28,7 +28,8 @@ import com.github.tomakehurst.wiremock.common.Slf4jNotifier; import com.google.common.net.HttpHeaders; import org.eclipse.che.api.auth.shared.dto.OAuthToken; import org.eclipse.che.api.factory.server.scm.GitUserData; -import org.eclipse.che.security.oauth.OAuthAPI; +import org.eclipse.che.api.factory.server.scm.OAuthTokenFetcher; +import org.eclipse.che.api.factory.server.scm.PersonalAccessTokenManager; import org.mockito.Mock; import org.mockito.testng.MockitoTestNGListener; import org.testng.annotations.AfterMethod; @@ -39,7 +40,8 @@ import org.testng.annotations.Test; @Listeners(MockitoTestNGListener.class) public class GithubGitUserDataFetcherTest { - @Mock OAuthAPI oAuthAPI; + @Mock OAuthTokenFetcher oAuthTokenFetcher; + @Mock PersonalAccessTokenManager personalAccessTokenManager; GithubUserDataFetcher githubGUDFetcher; final int httpPort = 3301; @@ -57,7 +59,10 @@ public class GithubGitUserDataFetcherTest { wireMock = new WireMock("localhost", httpPort); githubGUDFetcher = new GithubUserDataFetcher( - "http://che.api", oAuthAPI, new GithubApiClient(wireMockServer.url("/"))); + "http://che.api", + oAuthTokenFetcher, + personalAccessTokenManager, + new GithubApiClient(wireMockServer.url("/"))); stubFor( get(urlEqualTo("/api/v3/user")) .withHeader(HttpHeaders.AUTHORIZATION, equalTo("token " + githubOauthToken)) @@ -76,7 +81,7 @@ public class GithubGitUserDataFetcherTest { @Test public void shouldFetchGitUserData() throws Exception { OAuthToken oAuthToken = newDto(OAuthToken.class).withToken(githubOauthToken).withScope("repo"); - when(oAuthAPI.getToken(anyString())).thenReturn(oAuthToken); + when(oAuthTokenFetcher.getToken(anyString())).thenReturn(oAuthToken); GitUserData gitUserData = githubGUDFetcher.fetchGitUserData(); diff --git a/wsmaster/che-core-api-factory-gitlab/src/main/java/org/eclipse/che/api/factory/server/gitlab/GitlabUserDataFetcher.java b/wsmaster/che-core-api-factory-gitlab/src/main/java/org/eclipse/che/api/factory/server/gitlab/GitlabUserDataFetcher.java index 8d4ae6065a..2d22fafede 100644 --- a/wsmaster/che-core-api-factory-gitlab/src/main/java/org/eclipse/che/api/factory/server/gitlab/GitlabUserDataFetcher.java +++ b/wsmaster/che-core-api-factory-gitlab/src/main/java/org/eclipse/che/api/factory/server/gitlab/GitlabUserDataFetcher.java @@ -11,7 +11,6 @@ */ package org.eclipse.che.api.factory.server.gitlab; -import static java.lang.String.format; import static java.util.stream.Collectors.toList; import com.google.common.base.Joiner; @@ -23,29 +22,17 @@ import java.util.Set; import javax.inject.Inject; import javax.inject.Named; import org.eclipse.che.api.auth.shared.dto.OAuthToken; -import org.eclipse.che.api.core.BadRequestException; -import org.eclipse.che.api.core.ConflictException; -import org.eclipse.che.api.core.ForbiddenException; -import org.eclipse.che.api.core.NotFoundException; -import org.eclipse.che.api.core.ServerException; -import org.eclipse.che.api.core.UnauthorizedException; -import org.eclipse.che.api.factory.server.scm.GitUserData; -import org.eclipse.che.api.factory.server.scm.GitUserDataFetcher; +import org.eclipse.che.api.factory.server.scm.*; import org.eclipse.che.api.factory.server.scm.exception.ScmBadRequestException; import org.eclipse.che.api.factory.server.scm.exception.ScmCommunicationException; import org.eclipse.che.api.factory.server.scm.exception.ScmItemNotFoundException; -import org.eclipse.che.api.factory.server.scm.exception.ScmUnauthorizedException; import org.eclipse.che.commons.annotation.Nullable; -import org.eclipse.che.commons.env.EnvironmentContext; import org.eclipse.che.commons.lang.StringUtils; -import org.eclipse.che.commons.subject.Subject; import org.eclipse.che.inject.ConfigurationException; -import org.eclipse.che.security.oauth.OAuthAPI; /** Gitlab OAuth token retriever. */ -public class GitlabUserDataFetcher implements GitUserDataFetcher { +public class GitlabUserDataFetcher extends AbstractGitUserDataFetcher { private final String apiEndpoint; - private final OAuthAPI oAuthAPI; /** Name of this OAuth provider as found in OAuthAPI. */ private static final String OAUTH_PROVIDER_NAME = "gitlab"; @@ -60,7 +47,9 @@ public class GitlabUserDataFetcher implements GitUserDataFetcher { @Nullable @Named("che.integration.gitlab.server_endpoints") String gitlabEndpoints, @Nullable @Named("che.integration.gitlab.oauth_endpoint") String oauthEndpoint, @Named("che.api") String apiEndpoint, - OAuthAPI oAuthAPI) { + PersonalAccessTokenManager personalAccessTokenManager, + OAuthTokenFetcher oAuthTokenFetcher) { + super(OAUTH_PROVIDER_NAME, personalAccessTokenManager, oAuthTokenFetcher); this.apiEndpoint = apiEndpoint; if (gitlabEndpoints != null) { this.registeredGitlabEndpoints = @@ -76,58 +65,30 @@ public class GitlabUserDataFetcher implements GitUserDataFetcher { throw new ConfigurationException( "GitLab OAuth integration endpoint must be present in registered GitLab endpoints list."); } - this.oAuthAPI = oAuthAPI; - } else { - this.oAuthAPI = null; } } @Override - public GitUserData fetchGitUserData() throws ScmUnauthorizedException, ScmCommunicationException { - if (oAuthAPI == null) { - throw new ScmCommunicationException( - format( - "OAuth 2 is not configured for SCM provider [%s]. For details, refer " - + "the documentation in section of SCM providers configuration.", - OAUTH_PROVIDER_NAME)); - } - OAuthToken oAuthToken; - try { - oAuthToken = oAuthAPI.getToken(OAUTH_PROVIDER_NAME); - } catch (UnauthorizedException e) { - Subject cheSubject = EnvironmentContext.getCurrent().getSubject(); - throw new ScmUnauthorizedException( - cheSubject.getUserName() - + " is not authorized in " - + OAUTH_PROVIDER_NAME - + " OAuth provider.", - OAUTH_PROVIDER_NAME, - "2.0", - getLocalAuthenticateUrl()); - } catch (NotFoundException - | ServerException - | ForbiddenException - | BadRequestException - | ConflictException e) { - throw new ScmCommunicationException(e.getMessage(), e); - } - GitUserData gitUserData = null; + protected GitUserData fetchGitUserDataWithOAuthToken(OAuthToken oAuthToken) + throws ScmItemNotFoundException, ScmCommunicationException, ScmBadRequestException { for (String gitlabServerEndpoint : this.registeredGitlabEndpoints) { - try { - GitlabUser user = new GitlabApiClient(gitlabServerEndpoint).getUser(oAuthToken.getToken()); - gitUserData = new GitUserData(user.getName(), user.getEmail()); - break; - } catch (ScmItemNotFoundException | ScmBadRequestException e) { - throw new ScmCommunicationException(e.getMessage(), e); - } + GitlabUser user = new GitlabApiClient(gitlabServerEndpoint).getUser(oAuthToken.getToken()); + return new GitUserData(user.getName(), user.getEmail()); } - if (gitUserData == null) { - throw new ScmCommunicationException("Failed to retrieve git user data from Gitlab"); - } - return gitUserData; + throw new ScmCommunicationException("Failed to retrieve git user data from Gitlab"); } - private String getLocalAuthenticateUrl() { + @Override + protected GitUserData fetchGitUserDataWithPersonalAccessToken( + PersonalAccessToken personalAccessToken) + throws ScmItemNotFoundException, ScmCommunicationException, ScmBadRequestException { + GitlabUser user = + new GitlabApiClient(personalAccessToken.getScmProviderUrl()) + .getUser(personalAccessToken.getToken()); + return new GitUserData(user.getName(), user.getEmail()); + } + + protected String getLocalAuthenticateUrl() { return apiEndpoint + "/oauth/authenticate?oauth_provider=" + OAUTH_PROVIDER_NAME diff --git a/wsmaster/che-core-api-factory-gitlab/src/test/java/org/eclipse/che/api/factory/server/gitlab/GitlabUserDataFetcherTest.java b/wsmaster/che-core-api-factory-gitlab/src/test/java/org/eclipse/che/api/factory/server/gitlab/GitlabUserDataFetcherTest.java index 9596ebe37c..953c24540e 100644 --- a/wsmaster/che-core-api-factory-gitlab/src/test/java/org/eclipse/che/api/factory/server/gitlab/GitlabUserDataFetcherTest.java +++ b/wsmaster/che-core-api-factory-gitlab/src/test/java/org/eclipse/che/api/factory/server/gitlab/GitlabUserDataFetcherTest.java @@ -28,7 +28,8 @@ import com.github.tomakehurst.wiremock.common.Slf4jNotifier; import com.google.common.net.HttpHeaders; import org.eclipse.che.api.auth.shared.dto.OAuthToken; import org.eclipse.che.api.factory.server.scm.GitUserData; -import org.eclipse.che.security.oauth.OAuthAPI; +import org.eclipse.che.api.factory.server.scm.OAuthTokenFetcher; +import org.eclipse.che.api.factory.server.scm.PersonalAccessTokenManager; import org.mockito.Mock; import org.mockito.testng.MockitoTestNGListener; import org.testng.annotations.AfterMethod; @@ -39,7 +40,8 @@ import org.testng.annotations.Test; @Listeners(MockitoTestNGListener.class) public class GitlabUserDataFetcherTest { - @Mock OAuthAPI oAuthAPI; + @Mock OAuthTokenFetcher oAuthTokenFetcher; + @Mock PersonalAccessTokenManager personalAccessTokenManager; GitlabUserDataFetcher gitlabUserDataFetcher; @@ -55,7 +57,11 @@ public class GitlabUserDataFetcherTest { wireMock = new WireMock("localhost", wireMockServer.port()); gitlabUserDataFetcher = new GitlabUserDataFetcher( - wireMockServer.url("/"), wireMockServer.url("/"), "http://che.api", oAuthAPI); + wireMockServer.url("/"), + wireMockServer.url("/"), + "http://che.api", + personalAccessTokenManager, + oAuthTokenFetcher); stubFor( get(urlEqualTo("/api/v4/user")) @@ -75,7 +81,7 @@ public class GitlabUserDataFetcherTest { public void shouldFetchGitUserData() throws Exception { OAuthToken oAuthToken = newDto(OAuthToken.class).withToken("oauthtoken").withScope("api write_repository openid"); - when(oAuthAPI.getToken(anyString())).thenReturn(oAuthToken); + when(oAuthTokenFetcher.getToken(anyString())).thenReturn(oAuthToken); GitUserData gitUserData = gitlabUserDataFetcher.fetchGitUserData(); assertEquals(gitUserData.getScmUsername(), "John Smith"); diff --git a/wsmaster/che-core-api-factory/pom.xml b/wsmaster/che-core-api-factory/pom.xml index 8c68104708..97ceca9be7 100644 --- a/wsmaster/che-core-api-factory/pom.xml +++ b/wsmaster/che-core-api-factory/pom.xml @@ -62,6 +62,10 @@ jakarta.ws.rs jakarta.ws.rs-api + + org.eclipse.che.core + che-core-api-auth-shared + org.eclipse.che.core che-core-api-core diff --git a/wsmaster/che-core-api-factory/src/main/java/org/eclipse/che/api/factory/server/scm/AbstractGitUserDataFetcher.java b/wsmaster/che-core-api-factory/src/main/java/org/eclipse/che/api/factory/server/scm/AbstractGitUserDataFetcher.java new file mode 100644 index 0000000000..a5a25ed403 --- /dev/null +++ b/wsmaster/che-core-api-factory/src/main/java/org/eclipse/che/api/factory/server/scm/AbstractGitUserDataFetcher.java @@ -0,0 +1,78 @@ +/* + * Copyright (c) 2012-2023 Red Hat, Inc. + * This program and the accompanying materials are made + * available under the terms of the Eclipse Public License 2.0 + * which is available at https://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 + * + * Contributors: + * Red Hat, Inc. - initial API and implementation + */ +package org.eclipse.che.api.factory.server.scm; + +import java.util.Optional; +import org.eclipse.che.api.auth.shared.dto.OAuthToken; +import org.eclipse.che.api.core.*; +import org.eclipse.che.api.factory.server.scm.exception.*; +import org.eclipse.che.commons.env.EnvironmentContext; +import org.eclipse.che.commons.subject.Subject; + +/** + * Abstraction to fetch git user data from the specific git provider using OAuth 2.0 or personal + * access. + * + * @author Anatolii Bazko + */ +public abstract class AbstractGitUserDataFetcher implements GitUserDataFetcher { + protected final String oAuthProviderName; + protected final PersonalAccessTokenManager personalAccessTokenManager; + protected final OAuthTokenFetcher oAuthTokenFetcher; + + public AbstractGitUserDataFetcher( + String oAuthProviderName, + PersonalAccessTokenManager personalAccessTokenManager, + OAuthTokenFetcher oAuthTokenFetcher) { + this.oAuthProviderName = oAuthProviderName; + this.personalAccessTokenManager = personalAccessTokenManager; + this.oAuthTokenFetcher = oAuthTokenFetcher; + } + + public GitUserData fetchGitUserData() + throws ScmUnauthorizedException, ScmCommunicationException, + ScmConfigurationPersistenceException, ScmItemNotFoundException, ScmBadRequestException { + Subject cheSubject = EnvironmentContext.getCurrent().getSubject(); + try { + OAuthToken oAuthToken = oAuthTokenFetcher.getToken(oAuthProviderName); + return fetchGitUserDataWithOAuthToken(oAuthToken); + } catch (UnauthorizedException e) { + throw new ScmUnauthorizedException( + cheSubject.getUserName() + + " is not authorized in " + + oAuthProviderName + + " OAuth provider.", + oAuthProviderName, + "2.0", + getLocalAuthenticateUrl()); + } catch (NotFoundException e) { + Optional personalAccessToken = + personalAccessTokenManager.get(cheSubject, oAuthProviderName, null); + if (personalAccessToken.isPresent()) { + return fetchGitUserDataWithPersonalAccessToken(personalAccessToken.get()); + } + throw new ScmCommunicationException( + "There are no tokes for the user " + cheSubject.getUserId()); + } catch (ServerException | ForbiddenException | BadRequestException | ConflictException e) { + throw new ScmCommunicationException(e.getMessage(), e); + } + } + + protected abstract GitUserData fetchGitUserDataWithOAuthToken(OAuthToken oAuthToken) + throws ScmItemNotFoundException, ScmCommunicationException, ScmBadRequestException; + + protected abstract GitUserData fetchGitUserDataWithPersonalAccessToken( + PersonalAccessToken personalAccessToken) + throws ScmItemNotFoundException, ScmCommunicationException, ScmBadRequestException; + + protected abstract String getLocalAuthenticateUrl(); +} diff --git a/wsmaster/che-core-api-factory/src/main/java/org/eclipse/che/api/factory/server/scm/GitUserDataFetcher.java b/wsmaster/che-core-api-factory/src/main/java/org/eclipse/che/api/factory/server/scm/GitUserDataFetcher.java index 4ee49ca43b..01e787026f 100644 --- a/wsmaster/che-core-api-factory/src/main/java/org/eclipse/che/api/factory/server/scm/GitUserDataFetcher.java +++ b/wsmaster/che-core-api-factory/src/main/java/org/eclipse/che/api/factory/server/scm/GitUserDataFetcher.java @@ -11,19 +11,27 @@ */ package org.eclipse.che.api.factory.server.scm; +import org.eclipse.che.api.factory.server.scm.exception.ScmBadRequestException; import org.eclipse.che.api.factory.server.scm.exception.ScmCommunicationException; +import org.eclipse.che.api.factory.server.scm.exception.ScmConfigurationPersistenceException; +import org.eclipse.che.api.factory.server.scm.exception.ScmItemNotFoundException; import org.eclipse.che.api.factory.server.scm.exception.ScmUnauthorizedException; public interface GitUserDataFetcher { /** - * Retrieve a {@link GitUserData} object from concrete scm provider + * Retrieve a {@link GitUserData} object from concrete scm provider. If OAuthProvider is not + * configured, then personal access token should be taken into account. * * @return - {@link GitUserData} object. * @throws ScmUnauthorizedException - in case if user is not authorized che server to create a new * token. Further user interaction is needed before calling this method next time. * @throws ScmCommunicationException - Some unexpected problem occurred during communication with * scm provider. + * @throws ScmConfigurationPersistenceException - problem occurred during communication with + * permanent storage. */ - GitUserData fetchGitUserData() throws ScmUnauthorizedException, ScmCommunicationException; + GitUserData fetchGitUserData() + throws ScmUnauthorizedException, ScmCommunicationException, + ScmConfigurationPersistenceException, ScmItemNotFoundException, ScmBadRequestException; } diff --git a/wsmaster/che-core-api-factory/src/main/java/org/eclipse/che/api/factory/server/scm/OAuthTokenFetcher.java b/wsmaster/che-core-api-factory/src/main/java/org/eclipse/che/api/factory/server/scm/OAuthTokenFetcher.java new file mode 100644 index 0000000000..833fd92626 --- /dev/null +++ b/wsmaster/che-core-api-factory/src/main/java/org/eclipse/che/api/factory/server/scm/OAuthTokenFetcher.java @@ -0,0 +1,34 @@ +/* + * Copyright (c) 2012-2023 Red Hat, Inc. + * This program and the accompanying materials are made + * available under the terms of the Eclipse Public License 2.0 + * which is available at https://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 + * + * Contributors: + * Red Hat, Inc. - initial API and implementation + */ +package org.eclipse.che.api.factory.server.scm; + +import org.eclipse.che.api.auth.shared.dto.OAuthToken; +import org.eclipse.che.api.core.*; + +/** + * OAuth 2.0 token fetcher is designed to use a dependency in che-core-api-factory module. It is + * needed to avoid circular dependency between che-core-api-factory and che-core-api-auth modules. + * + * @author Anatolii Bazko + */ +public interface OAuthTokenFetcher { + + /** + * Fetches OAuth token for the given OAuth provider name. + * + * @param oAuthProviderName OAuth provider name (e.g. github, bitbucket) + * @return OAuth token + */ + OAuthToken getToken(String oAuthProviderName) + throws NotFoundException, UnauthorizedException, ServerException, ForbiddenException, + BadRequestException, ConflictException; +} diff --git a/wsmaster/che-core-api-factory/src/main/java/org/eclipse/che/api/factory/server/scm/PersonalAccessTokenManager.java b/wsmaster/che-core-api-factory/src/main/java/org/eclipse/che/api/factory/server/scm/PersonalAccessTokenManager.java index aea7fee295..8fb8df6f33 100644 --- a/wsmaster/che-core-api-factory/src/main/java/org/eclipse/che/api/factory/server/scm/PersonalAccessTokenManager.java +++ b/wsmaster/che-core-api-factory/src/main/java/org/eclipse/che/api/factory/server/scm/PersonalAccessTokenManager.java @@ -17,6 +17,7 @@ import org.eclipse.che.api.factory.server.scm.exception.ScmConfigurationPersiste import org.eclipse.che.api.factory.server.scm.exception.ScmUnauthorizedException; import org.eclipse.che.api.factory.server.scm.exception.UnknownScmProviderException; import org.eclipse.che.api.factory.server.scm.exception.UnsatisfiedScmPreconditionException; +import org.eclipse.che.commons.annotation.Nullable; import org.eclipse.che.commons.subject.Subject; /** Manages {@link PersonalAccessToken}s in Che's permanent storage. */ @@ -45,13 +46,32 @@ public interface PersonalAccessTokenManager { * @param cheUser Che user object * @param scmServerUrl Git provider endpoint * @return personal access token - * @throws ScmConfigurationPersistenceException - problem occurred during communication with * + * @throws ScmConfigurationPersistenceException - problem occurred during communication with * permanent storage. */ Optional get(Subject cheUser, String scmServerUrl) throws ScmConfigurationPersistenceException, ScmUnauthorizedException, ScmCommunicationException; + /** + * Gets {@link PersonalAccessToken} from permanent storage for the given OAuth provider name. It + * is useful when OAuth provider is not configured and Git provider endpoint is unknown. {@code + * scmServerUrl} can be provided as an additional clause. + * + * @param cheUser Che user object + * @param oAuthProviderName OAuth provider name to get token for + * @param scmServerUrl Git provider endpoint + * @return personal access token + * @throws ScmConfigurationPersistenceException - problem occurred during communication with + * permanent storage. + * @throws ScmUnauthorizedException - scm authorization required. + * @throws ScmCommunicationException - problem occurred during communication with scm provider. + */ + Optional get( + Subject cheUser, String oAuthProviderName, @Nullable String scmServerUrl) + throws ScmConfigurationPersistenceException, ScmUnauthorizedException, + ScmCommunicationException; + /** * Gets {@link PersonalAccessToken} from permanent storage. If the token is not found try to fetch * it from scm provider and save it in a permanent storage and set (update) git-credentials. From 8dda567e23dafcc132a92a3ba4413f0ca3996874 Mon Sep 17 00:00:00 2001 From: Anatolii Bazko Date: Tue, 4 Apr 2023 16:31:00 +0300 Subject: [PATCH 03/75] fix: Support Azure DevOps repository urls without project (#490) Signed-off-by: Anatolii Bazko --- .../server/azure/devops/AzureDevOpsURLParser.java | 15 +++++++++------ .../server/azure/devops/AzureDevOpsUrl.java | 6 +++++- .../azure/devops/AzureDevOpsURLParserTest.java | 1 + 3 files changed, 15 insertions(+), 7 deletions(-) diff --git a/wsmaster/che-core-api-factory-azure-devops/src/main/java/org/eclipse/che/api/factory/server/azure/devops/AzureDevOpsURLParser.java b/wsmaster/che-core-api-factory-azure-devops/src/main/java/org/eclipse/che/api/factory/server/azure/devops/AzureDevOpsURLParser.java index a35987378c..5cad6fda72 100644 --- a/wsmaster/che-core-api-factory-azure-devops/src/main/java/org/eclipse/che/api/factory/server/azure/devops/AzureDevOpsURLParser.java +++ b/wsmaster/che-core-api-factory-azure-devops/src/main/java/org/eclipse/che/api/factory/server/azure/devops/AzureDevOpsURLParser.java @@ -51,7 +51,7 @@ public class AzureDevOpsURLParser { this.azureDevOpsPattern = compile( format( - "^https://(?[^@]++)?@?%s/(?[^/]++)/?(?[^/]++)/_git/" + "^https://(?[^@]++)?@?%s/(?[^/]++)/((?[^/]++)/)?_git/" + "(?[^?]++)" + "([?&]path=(?[^&]++))?" + "([?&]version=GT(?[^&]++))?" @@ -67,17 +67,20 @@ public class AzureDevOpsURLParser { public AzureDevOpsUrl parse(String url) { Matcher matcher = azureDevOpsPattern.matcher(url); if (!matcher.matches()) { - throw new IllegalArgumentException( - format( - "The given url %s is not a valid. It should start with https://@%s/ or https://%s/", - url, azureDevOpsScmApiEndpointHost, azureDevOpsScmApiEndpointHost)); + throw new IllegalArgumentException(format("The given url %s is not a valid.", url)); + } + + String project = null; + try { + project = matcher.group("project"); + } catch (IllegalArgumentException e) { } - String project = matcher.group("project"); String repoName = matcher.group("repoName"); if (repoName.endsWith(".git")) { repoName = repoName.substring(0, repoName.length() - 4); } + String organization = matcher.group("organization"); String branch = matcher.group("branch"); String tag = matcher.group("tag"); diff --git a/wsmaster/che-core-api-factory-azure-devops/src/main/java/org/eclipse/che/api/factory/server/azure/devops/AzureDevOpsUrl.java b/wsmaster/che-core-api-factory-azure-devops/src/main/java/org/eclipse/che/api/factory/server/azure/devops/AzureDevOpsUrl.java index ac25cf9655..e69d102bf8 100644 --- a/wsmaster/che-core-api-factory-azure-devops/src/main/java/org/eclipse/che/api/factory/server/azure/devops/AzureDevOpsUrl.java +++ b/wsmaster/che-core-api-factory-azure-devops/src/main/java/org/eclipse/che/api/factory/server/azure/devops/AzureDevOpsUrl.java @@ -149,7 +149,11 @@ public class AzureDevOpsUrl extends DefaultFactoryUrl { } private StringJoiner getRepoPathJoiner() { - return new StringJoiner("/").add(hostName).add(organization).add(project); + StringJoiner repoPath = new StringJoiner("/").add(hostName).add(organization); + if (project != null) { + repoPath.add("_git"); + } + return repoPath; } @Override diff --git a/wsmaster/che-core-api-factory-azure-devops/src/test/java/org/eclipse/che/api/factory/server/azure/devops/AzureDevOpsURLParserTest.java b/wsmaster/che-core-api-factory-azure-devops/src/test/java/org/eclipse/che/api/factory/server/azure/devops/AzureDevOpsURLParserTest.java index 9a631c9565..cbe43a6206 100644 --- a/wsmaster/che-core-api-factory-azure-devops/src/test/java/org/eclipse/che/api/factory/server/azure/devops/AzureDevOpsURLParserTest.java +++ b/wsmaster/che-core-api-factory-azure-devops/src/test/java/org/eclipse/che/api/factory/server/azure/devops/AzureDevOpsURLParserTest.java @@ -133,6 +133,7 @@ public class AzureDevOpsURLParserTest { null, "MyTag" }, + {"https://MyOrg@dev.azure.com/MyOrg/_git/MyRepo", "MyOrg", null, "MyRepo", null, null}, }; } From c9e8f5eae94b38e1e3db1b3dfc266cc9d3acb61e Mon Sep 17 00:00:00 2001 From: che-bot <39771996+che-bot@users.noreply.github.com> Date: Wed, 5 Apr 2023 01:20:09 +0200 Subject: [PATCH 04/75] chore: Update from ubi8-minimal:8.7-1085 to ubi8-minimal:8.7-1085.1679482090 (#475) Signed-off-by: Nick Boldt Co-authored-by: Nick Boldt --- dockerfiles/che/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dockerfiles/che/Dockerfile b/dockerfiles/che/Dockerfile index 9b196db622..66ed5dae10 100644 --- a/dockerfiles/che/Dockerfile +++ b/dockerfiles/che/Dockerfile @@ -10,7 +10,7 @@ # # https://access.redhat.com/containers/?tab=tags#/registry.access.redhat.com/ubi8-minimal -FROM registry.access.redhat.com/ubi8-minimal:8.7-1085 +FROM registry.access.redhat.com/ubi8-minimal:8.7-1085.1679482090 USER root ENV CHE_HOME=/home/user/eclipse-che ENV JAVA_HOME=/usr/lib/jvm/jre From 16dff88b2e1037dc76aff4772f0933b6cdd37500 Mon Sep 17 00:00:00 2001 From: che-bot <39771996+che-bot@users.noreply.github.com> Date: Tue, 11 Apr 2023 15:43:46 +0200 Subject: [PATCH 05/75] chore: Update from ubi8-minimal:8.7-1085.1679482090 to ubi8-minimal:8.7-1107 (#492) Signed-off-by: Nick Boldt Co-authored-by: Nick Boldt --- dockerfiles/che/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dockerfiles/che/Dockerfile b/dockerfiles/che/Dockerfile index 66ed5dae10..6e3f2d8890 100644 --- a/dockerfiles/che/Dockerfile +++ b/dockerfiles/che/Dockerfile @@ -10,7 +10,7 @@ # # https://access.redhat.com/containers/?tab=tags#/registry.access.redhat.com/ubi8-minimal -FROM registry.access.redhat.com/ubi8-minimal:8.7-1085.1679482090 +FROM registry.access.redhat.com/ubi8-minimal:8.7-1107 USER root ENV CHE_HOME=/home/user/eclipse-che ENV JAVA_HOME=/usr/lib/jvm/jre From 251a6e1095a3f4d173582601ffe2e9767889e053 Mon Sep 17 00:00:00 2001 From: Shmaraiev Oleksandr Date: Thu, 13 Apr 2023 10:10:00 +0300 Subject: [PATCH 06/75] Create the 'Dockerfile' to configure ci-operator (#495) --- .ci/openshift-ci/Dockerfile | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 .ci/openshift-ci/Dockerfile diff --git a/.ci/openshift-ci/Dockerfile b/.ci/openshift-ci/Dockerfile new file mode 100644 index 0000000000..320c5fbc4d --- /dev/null +++ b/.ci/openshift-ci/Dockerfile @@ -0,0 +1,28 @@ +#!/bin/bash +# +# Copyright (c) 2019-2021 Red Hat, Inc. +# This program and the accompanying materials are made +# available under the terms of the Eclipse Public License 2.0 +# which is available at https://www.eclipse.org/legal/epl-2.0/ +# +# SPDX-License-Identifier: EPL-2.0 +# +# Contributors: +# Red Hat, Inc. - initial API and implementation + +# Dockerfile to bootstrap build and test in openshift-ci + +FROM registry.ci.openshift.org/openshift/release:golang-1.18 + +SHELL ["/bin/bash", "-c"] + +# Install yq, kubectl, chectl cli used by olm/olm.sh script. +RUN yum install --assumeyes -d1 python3-pip httpd-tools && \ + pip3 install --upgrade setuptools && \ + pip3 install yq && \ + curl -LO https://storage.googleapis.com/kubernetes-release/release/$(curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt)/bin/linux/amd64/kubectl && \ + chmod +x ./kubectl && \ + mv ./kubectl /usr/local/bin && \ + bash <(curl -sL https://www.eclipse.org/che/chectl/) --channel=next && \ + curl https://mirror.openshift.com/pub/openshift-v4/clients/ocp/4.12.4/openshift-client-linux.tar.gz | tar xvzf - -C /usr/local/bin/ oc && \ + chmod ug+x /usr/local/bin/oc From d0549d4fc59b36116ae053bcff231738ce68972f Mon Sep 17 00:00:00 2001 From: David Kwon Date: Thu, 13 Apr 2023 16:10:38 -0400 Subject: [PATCH 07/75] feat: add OpenShift web console dashboard definition Signed-off-by: David Kwon --- docs/grafana/openshift-console-dashboard.json | 3735 +++++++++++++++++ 1 file changed, 3735 insertions(+) create mode 100644 docs/grafana/openshift-console-dashboard.json diff --git a/docs/grafana/openshift-console-dashboard.json b/docs/grafana/openshift-console-dashboard.json new file mode 100644 index 0000000000..a74b8d0e16 --- /dev/null +++ b/docs/grafana/openshift-console-dashboard.json @@ -0,0 +1,3735 @@ +{ + "annotations": { + "list": [ + { + "builtIn": 1, + "datasource": "-- Grafana --", + "enable": true, + "hide": true, + "iconColor": "rgba(0, 211, 255, 1)", + "limit": 100, + "name": "Annotations & Alerts", + "showIn": 0, + "type": "dashboard" + }, + { + "datasource": null, + "enable": true, + "expr": "resets(process_uptime_seconds{instance=\"$instance\"}[1m]) > 0", + "iconColor": "rgba(255, 96, 96, 1)", + "name": "Restart Detection", + "showIn": 0, + "step": "1m", + "tagKeys": "restart-tag", + "textFormat": "uptime reset", + "titleFormat": "Restart" + } + ] + }, + "description": "Che Server JVM", + "editable": true, + "gnetId": 4701, + "graphTooltip": 1, + "id": 6, + "iteration": 1681311119023, + "links": [], + "rows": [ + { + "collapse": false, + "height": "100px", + "panels": [ + { + "cacheTimeout": null, + "colorBackground": false, + "colorValue": true, + "colors": [ + "rgba(245, 54, 54, 0.9)", + "rgba(237, 129, 40, 0.89)", + "rgba(50, 172, 45, 0.97)" + ], + "datasource": null, + "decimals": 1, + "editable": true, + "error": false, + "format": "", + "gauge": { + "maxValue": 100, + "minValue": 0, + "show": false, + "thresholdLabels": false, + "thresholdMarkers": true + }, + "gridPos": { + "h": 3, + "w": 8, + "x": 0, + "y": 1 + }, + "height": "", + "id": 63, + "interval": null, + "links": [], + "mappingType": 1, + "mappingTypes": [ + { + "name": "value to text", + "value": 1 + }, + { + "name": "range to text", + "value": 2 + } + ], + "maxDataPoints": 100, + "nullPointMode": "connected", + "nullText": null, + "postfix": "hours", + "postfixFontSize": "80%", + "prefix": "", + "prefixFontSize": "70%", + "rangeMaps": [ + { + "from": "null", + "text": "N/A", + "to": "null" + } + ], + "sparkline": { + "fillColor": "rgba(31, 118, 189, 0.18)", + "full": false, + "lineColor": "rgb(31, 120, 193)", + "show": false + }, + "tableColumn": "", + "span": 2, + "targets": [ + { + "expr": "process_uptime_seconds{instance=\"$instance\"} / (60 * 60)", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "", + "metric": "", + "refId": "A", + "step": 14400 + } + ], + "thresholds": "", + "title": "Uptime", + "type": "singlestat", + "valueFontSize": "80%", + "valueMaps": [ + { + "op": "=", + "text": "N/A", + "value": "null" + } + ], + "valueName": "current" + }, + { + "cacheTimeout": null, + "colorBackground": false, + "colorValue": true, + "colors": [ + "rgba(50, 172, 45, 0.97)", + "rgba(237, 129, 40, 0.89)", + "rgba(245, 54, 54, 0.9)" + ], + "datasource": null, + "decimals": 2, + "editable": true, + "error": false, + "format": "none", + "gauge": { + "maxValue": 100, + "minValue": 0, + "show": false, + "thresholdLabels": false, + "thresholdMarkers": true + }, + "gridPos": { + "h": 3, + "w": 8, + "x": 8, + "y": 1 + }, + "id": 65, + "interval": null, + "links": [], + "mappingType": 1, + "mappingTypes": [ + { + "name": "value to text", + "value": 1 + }, + { + "name": "range to text", + "value": 2 + } + ], + "maxDataPoints": 100, + "nullPointMode": "connected", + "nullText": null, + "postfix": "%", + "postfixFontSize": "80%", + "prefix": "", + "prefixFontSize": "70%", + "rangeMaps": [ + { + "from": "null", + "text": "N/A", + "to": "null" + } + ], + "sparkline": { + "fillColor": "rgba(31, 118, 189, 0.18)", + "full": false, + "lineColor": "rgb(31, 120, 193)", + "show": false + }, + "tableColumn": "", + "span": 2, + "targets": [ + { + "expr": "sum(jvm_memory_used_bytes{instance=\"$instance\", area=\"heap\"})*100/sum(jvm_memory_max_bytes{instance=\"$instance\", area=\"heap\"})", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "", + "refId": "A", + "step": 14400 + } + ], + "thresholds": "70,90", + "title": "Heap used", + "type": "singlestat", + "valueFontSize": "80%", + "valueMaps": [ + { + "op": "=", + "text": "N/A", + "value": "null" + } + ], + "valueName": "current" + }, + { + "cacheTimeout": null, + "colorBackground": false, + "colorValue": true, + "colors": [ + "rgba(50, 172, 45, 0.97)", + "rgba(237, 129, 40, 0.89)", + "rgba(245, 54, 54, 0.9)" + ], + "datasource": null, + "decimals": 2, + "editable": true, + "error": false, + "format": "none", + "gauge": { + "maxValue": 100, + "minValue": 0, + "show": false, + "thresholdLabels": false, + "thresholdMarkers": true + }, + "gridPos": { + "h": 3, + "w": 8, + "x": 16, + "y": 1 + }, + "id": 75, + "interval": null, + "links": [], + "mappingType": 2, + "mappingTypes": [ + { + "name": "value to text", + "value": 1 + }, + { + "name": "range to text", + "value": 2 + } + ], + "maxDataPoints": 100, + "nullPointMode": "connected", + "nullText": null, + "postfix": "%", + "postfixFontSize": "80%", + "prefix": "", + "prefixFontSize": "70%", + "rangeMaps": [ + { + "from": "null", + "text": "N/A", + "to": "null" + }, + { + "from": "-99999999999999999999999999999999", + "text": "N/A", + "to": "0" + } + ], + "sparkline": { + "fillColor": "rgba(31, 118, 189, 0.18)", + "full": false, + "lineColor": "rgb(31, 120, 193)", + "show": false + }, + "tableColumn": "", + "span": 2, + "targets": [ + { + "expr": "sum(jvm_memory_used_bytes{instance=\"$instance\", area=\"nonheap\"})*100/sum(jvm_memory_max_bytes{instance=\"$instance\", area=\"nonheap\"})", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "", + "refId": "A", + "step": 14400 + } + ], + "thresholds": "70,90", + "title": "Non-Heap used", + "type": "singlestat", + "valueFontSize": "80%", + "valueMaps": [ + { + "op": "=", + "text": "N/A", + "value": "null" + }, + { + "op": "=", + "text": "x", + "value": "" + } + ], + "valueName": "current" + } + ], + "repeat": null, + "repeatIteration": null, + "repeatRowId": null, + "showTitle": true, + "title": "Quick Facts", + "titleSize": "h6" + }, + { + "collapse": false, + "height": "250px", + "panels": [ + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": null, + "editable": true, + "error": false, + "fill": 1, + "fillGradient": 0, + "grid": { + "leftLogBase": 1, + "leftMax": null, + "leftMin": null, + "rightLogBase": 1, + "rightMax": null, + "rightMin": null + }, + "gridPos": { + "h": 7, + "w": 6, + "x": 0, + "y": 5 + }, + "hiddenSeries": false, + "id": 24, + "legend": { + "avg": false, + "current": true, + "max": true, + "min": false, + "show": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 1, + "links": [], + "nullPointMode": "null", + "options": { + "dataLinks": [] + }, + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "span": 6, + "targets": [ + { + "expr": "sum(jvm_memory_used_bytes{instance=\"$instance\", area=\"heap\"})", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "used", + "metric": "", + "refId": "A", + "step": 2400 + }, + { + "expr": "sum(jvm_memory_committed_bytes{instance=\"$instance\", area=\"heap\"})", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "committed", + "refId": "B", + "step": 2400 + }, + { + "expr": "sum(jvm_memory_max_bytes{instance=\"$instance\", area=\"heap\"})", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "max", + "refId": "C", + "step": 2400 + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "JVM Heap", + "tooltip": { + "msResolution": false, + "shared": true, + "sort": 0, + "value_type": "cumulative" + }, + "type": "graph", + "x-axis": true, + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "y-axis": true, + "y_formats": [ + "mbytes", + "short" + ], + "yaxes": [ + { + "format": "bytes", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": null, + "editable": true, + "error": false, + "fill": 1, + "fillGradient": 0, + "grid": { + "leftLogBase": 1, + "leftMax": null, + "leftMin": null, + "rightLogBase": 1, + "rightMax": null, + "rightMin": null + }, + "gridPos": { + "h": 7, + "w": 6, + "x": 6, + "y": 5 + }, + "hiddenSeries": false, + "id": 25, + "legend": { + "avg": false, + "current": true, + "max": true, + "min": false, + "show": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 1, + "links": [], + "nullPointMode": "null", + "options": { + "dataLinks": [] + }, + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "span": 6, + "targets": [ + { + "expr": "sum(jvm_memory_used_bytes{instance=\"$instance\", area=\"nonheap\"})", + "format": "time_series", + "interval": "", + "intervalFactor": 2, + "legendFormat": "used", + "metric": "", + "refId": "A", + "step": 2400 + }, + { + "expr": "sum(jvm_memory_committed_bytes{instance=\"$instance\", area=\"nonheap\"})", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "committed", + "refId": "B", + "step": 2400 + }, + { + "expr": "sum(jvm_memory_max_bytes{instance=\"$instance\", area=\"nonheap\"})", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "max", + "refId": "C", + "step": 2400 + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "JVM Non-Heap", + "tooltip": { + "msResolution": false, + "shared": true, + "sort": 0, + "value_type": "cumulative" + }, + "type": "graph", + "x-axis": true, + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "y-axis": true, + "y_formats": [ + "mbytes", + "short" + ], + "yaxes": [ + { + "format": "bytes", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": null, + "editable": true, + "error": false, + "fill": 1, + "fillGradient": 0, + "grid": { + "leftLogBase": 1, + "leftMax": null, + "leftMin": null, + "rightLogBase": 1, + "rightMax": null, + "rightMin": null + }, + "gridPos": { + "h": 7, + "w": 6, + "x": 12, + "y": 5 + }, + "hiddenSeries": false, + "id": 26, + "legend": { + "alignAsTable": false, + "avg": false, + "current": true, + "max": true, + "min": false, + "show": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 1, + "links": [], + "nullPointMode": "null", + "options": { + "dataLinks": [] + }, + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "span": 6, + "targets": [ + { + "expr": "sum(jvm_memory_used_bytes{instance=\"$instance\"})", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "used", + "metric": "", + "refId": "A", + "step": 2400 + }, + { + "expr": "sum(jvm_memory_committed_bytes{instance=\"$instance\"})", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "committed", + "refId": "B", + "step": 2400 + }, + { + "expr": "sum(jvm_memory_max_bytes{instance=\"$instance\"})", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "max", + "refId": "C", + "step": 2400 + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "JVM Total", + "tooltip": { + "msResolution": false, + "shared": true, + "sort": 0, + "value_type": "cumulative" + }, + "type": "graph", + "x-axis": true, + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "y-axis": true, + "y_formats": [ + "mbytes", + "short" + ], + "yaxes": [ + { + "format": "bytes", + "label": "", + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": null, + "editable": true, + "error": false, + "fill": 1, + "fillGradient": 0, + "grid": { + "leftLogBase": 1, + "leftMax": null, + "leftMin": null, + "rightLogBase": 1, + "rightMax": null, + "rightMin": null + }, + "gridPos": { + "h": 7, + "w": 6, + "x": 18, + "y": 5 + }, + "hiddenSeries": false, + "id": 86, + "legend": { + "avg": false, + "current": true, + "max": true, + "min": false, + "show": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 1, + "links": [], + "nullPointMode": "null", + "options": { + "dataLinks": [] + }, + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "span": 6, + "targets": [ + { + "expr": "process_memory_vss_bytes{instance=\"$instance\"}", + "format": "time_series", + "hide": true, + "intervalFactor": 2, + "legendFormat": "vss", + "metric": "", + "refId": "A", + "step": 2400 + }, + { + "expr": "process_memory_rss_bytes{instance=\"$instance\"}", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "rss", + "refId": "B" + }, + { + "expr": "process_memory_pss_bytes{instance=\"$instance\"}", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "pss", + "refId": "C" + }, + { + "expr": "process_memory_swap_bytes{instance=\"$instance\"}", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "swap", + "refId": "D" + }, + { + "expr": "process_memory_swappss_bytes{instance=\"$instance\"}", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "swappss", + "refId": "E" + }, + { + "expr": "process_memory_pss_bytes{instance=\"$instance\"} + process_memory_swap_bytes{instance=\"$instance\"}", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "phys (pss+swap)", + "refId": "F" + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "JVM Process Memory", + "tooltip": { + "msResolution": false, + "shared": true, + "sort": 0, + "value_type": "cumulative" + }, + "type": "graph", + "x-axis": true, + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "y-axis": true, + "y_formats": [ + "mbytes", + "short" + ], + "yaxes": [ + { + "format": "bytes", + "label": "", + "logBase": 1, + "max": null, + "min": "0", + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + } + ], + "repeat": null, + "repeatIteration": null, + "repeatRowId": null, + "showTitle": true, + "title": "JVM Memory", + "titleSize": "h6" + }, + { + "collapse": false, + "height": "250px", + "panels": [ + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": null, + "editable": true, + "error": false, + "fill": 1, + "fillGradient": 0, + "grid": { + "leftLogBase": 1, + "leftMax": null, + "leftMin": null, + "rightLogBase": 1, + "rightMax": null, + "rightMin": null + }, + "gridPos": { + "h": 7, + "w": 6, + "x": 0, + "y": 13 + }, + "hiddenSeries": false, + "id": 106, + "legend": { + "avg": false, + "current": true, + "max": true, + "min": false, + "show": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 1, + "links": [], + "nullPointMode": "null", + "options": { + "dataLinks": [] + }, + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "span": 6, + "targets": [ + { + "expr": "system_cpu_usage{instance=\"$instance\"} * 100", + "format": "time_series", + "hide": false, + "intervalFactor": 1, + "legendFormat": "system", + "metric": "", + "refId": "A", + "step": 2400 + }, + { + "expr": "process_cpu_usage{instance=\"$instance\"} * 100", + "format": "time_series", + "hide": false, + "intervalFactor": 1, + "legendFormat": "process", + "refId": "B" + }, + { + "expr": "avg_over_time(process_cpu_usage{instance=\"$instance\"}[1h]) * 100", + "format": "time_series", + "hide": false, + "intervalFactor": 1, + "legendFormat": "process-1h", + "refId": "C" + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "CPU Usage (%)", + "tooltip": { + "msResolution": false, + "shared": true, + "sort": 0, + "value_type": "cumulative" + }, + "type": "graph", + "x-axis": true, + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "y-axis": true, + "y_formats": [ + "short", + "short" + ], + "yaxes": [ + { + "decimals": 1, + "format": "percentunit", + "label": "", + "logBase": 1, + "max": "1", + "min": 0, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": null, + "editable": true, + "error": false, + "fill": 1, + "fillGradient": 0, + "grid": { + "leftLogBase": 1, + "leftMax": null, + "leftMin": null, + "rightLogBase": 1, + "rightMax": null, + "rightMin": null + }, + "gridPos": { + "h": 7, + "w": 6, + "x": 6, + "y": 13 + }, + "hiddenSeries": false, + "id": 93, + "legend": { + "avg": false, + "current": true, + "max": true, + "min": false, + "show": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 1, + "links": [], + "nullPointMode": "null", + "options": { + "dataLinks": [] + }, + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "span": 6, + "targets": [ + { + "expr": "system_load_average_1m{instance=\"$instance\"}", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "system-1m", + "metric": "", + "refId": "A", + "step": 2400 + }, + { + "expr": "system_cpu_count{instance=\"$instance\"}", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "cpu", + "refId": "B" + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "Load", + "tooltip": { + "msResolution": false, + "shared": true, + "sort": 0, + "value_type": "cumulative" + }, + "type": "graph", + "x-axis": true, + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "y-axis": true, + "y_formats": [ + "short", + "short" + ], + "yaxes": [ + { + "decimals": 1, + "format": "short", + "label": "", + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": null, + "editable": true, + "error": false, + "fill": 1, + "fillGradient": 0, + "grid": { + "leftLogBase": 1, + "leftMax": null, + "leftMin": null, + "rightLogBase": 1, + "rightMax": null, + "rightMin": null + }, + "gridPos": { + "h": 7, + "w": 6, + "x": 12, + "y": 13 + }, + "hiddenSeries": false, + "id": 32, + "legend": { + "avg": false, + "current": true, + "max": true, + "min": false, + "show": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 1, + "links": [], + "nullPointMode": "null", + "options": { + "dataLinks": [] + }, + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "span": 6, + "targets": [ + { + "expr": "jvm_threads_live{instance=\"$instance\"} or jvm_threads_live_threads{instance=\"$instance\"}", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "live", + "metric": "", + "refId": "A", + "step": 2400 + }, + { + "expr": "jvm_threads_daemon{instance=\"$instance\"} or jvm_threads_daemon_threads{instance=\"$instance\"}", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "daemon", + "metric": "", + "refId": "B", + "step": 2400 + }, + { + "expr": "jvm_threads_peak{instance=\"$instance\"} or jvm_threads_peak_threads{instance=\"$instance\"}", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "peak", + "refId": "C", + "step": 2400 + }, + { + "expr": "process_threads{instance=\"$instance\"}", + "format": "time_series", + "interval": "", + "intervalFactor": 2, + "legendFormat": "process", + "refId": "D", + "step": 2400 + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "Threads", + "tooltip": { + "msResolution": false, + "shared": true, + "sort": 0, + "value_type": "cumulative" + }, + "type": "graph", + "x-axis": true, + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "y-axis": true, + "y_formats": [ + "short", + "short" + ], + "yaxes": [ + { + "decimals": 0, + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "aliasColors": { + "blocked": "#bf1b00", + "new": "#fce2de", + "runnable": "#7eb26d", + "terminated": "#511749", + "timed-waiting": "#c15c17", + "waiting": "#eab839" + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": null, + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 7, + "w": 6, + "x": 18, + "y": 13 + }, + "hiddenSeries": false, + "id": 124, + "legend": { + "alignAsTable": false, + "avg": false, + "current": true, + "max": true, + "min": false, + "rightSide": false, + "show": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 1, + "links": [], + "nullPointMode": "null", + "options": { + "dataLinks": [] + }, + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "span": 6, + "targets": [ + { + "expr": "jvm_threads_states_threads{instance=\"$instance\"}", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "{{state}}", + "refId": "A" + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "Thread States", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "aliasColors": { + "debug": "#1F78C1", + "error": "#BF1B00", + "info": "#508642", + "trace": "#6ED0E0", + "warn": "#EAB839" + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": null, + "editable": true, + "error": false, + "fill": 1, + "fillGradient": 0, + "grid": { + "leftLogBase": 1, + "leftMax": null, + "leftMin": null, + "rightLogBase": 1, + "rightMax": null, + "rightMin": null + }, + "gridPos": { + "h": 7, + "w": 18, + "x": 0, + "y": 20 + }, + "height": "", + "hiddenSeries": false, + "id": 91, + "legend": { + "alignAsTable": false, + "avg": false, + "current": true, + "hideEmpty": false, + "hideZero": false, + "max": true, + "min": false, + "rightSide": false, + "show": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 1, + "links": [], + "nullPointMode": "null", + "options": { + "dataLinks": [] + }, + "percentage": true, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [ + { + "alias": "error", + "yaxis": 1 + }, + { + "alias": "warn", + "yaxis": 1 + } + ], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "span": 6, + "targets": [ + { + "expr": "increase(logback_events_total{instance=\"$instance\"}[1m])", + "format": "time_series", + "interval": "", + "intervalFactor": 2, + "legendFormat": "{{level}}", + "metric": "", + "refId": "A", + "step": 1200 + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "Log Events (1m)", + "tooltip": { + "msResolution": false, + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "x-axis": true, + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "y-axis": true, + "y_formats": [ + "short", + "short" + ], + "yaxes": [ + { + "decimals": 0, + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": "0", + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": null, + "editable": true, + "error": false, + "fill": 1, + "fillGradient": 0, + "grid": { + "leftLogBase": 1, + "leftMax": null, + "leftMin": null, + "rightLogBase": 1, + "rightMax": null, + "rightMin": null + }, + "gridPos": { + "h": 7, + "w": 6, + "x": 18, + "y": 20 + }, + "hiddenSeries": false, + "id": 61, + "legend": { + "avg": false, + "current": true, + "max": true, + "min": false, + "show": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 1, + "links": [], + "nullPointMode": "null", + "options": { + "dataLinks": [] + }, + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "span": 6, + "targets": [ + { + "expr": "process_open_fds{instance=\"$instance\"}", + "format": "time_series", + "hide": false, + "intervalFactor": 2, + "legendFormat": "open", + "metric": "", + "refId": "A", + "step": 2400 + }, + { + "expr": "process_max_fds{instance=\"$instance\"}", + "format": "time_series", + "hide": false, + "intervalFactor": 2, + "legendFormat": "max", + "metric": "", + "refId": "B", + "step": 2400 + }, + { + "expr": "process_files_open{instance=\"$instance\"} or process_files_open_files{instance=\"$instance\"}", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "open", + "refId": "C" + }, + { + "expr": "process_files_max{instance=\"$instance\"} or process_files_max_files{instance=\"$instance\"}", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "max", + "refId": "D" + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "File Descriptors", + "tooltip": { + "msResolution": false, + "shared": true, + "sort": 0, + "value_type": "cumulative" + }, + "type": "graph", + "x-axis": true, + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "y-axis": true, + "y_formats": [ + "short", + "short" + ], + "yaxes": [ + { + "decimals": 0, + "format": "short", + "label": null, + "logBase": 10, + "max": null, + "min": 0, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + } + ], + "repeat": null, + "repeatIteration": null, + "repeatRowId": null, + "showTitle": true, + "title": "JVM Misc", + "titleSize": "h6" + }, + { + "collapse": false, + "height": "250px", + "panels": [ + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": null, + "editable": true, + "error": false, + "fill": 1, + "fillGradient": 0, + "grid": { + "leftLogBase": 1, + "leftMax": null, + "leftMin": null, + "rightLogBase": 1, + "rightMax": null, + "rightMin": null + }, + "gridPos": { + "h": 7, + "w": 8, + "x": 0, + "y": 28 + }, + "hiddenSeries": false, + "id": 3, + "legend": { + "alignAsTable": false, + "avg": false, + "current": true, + "max": true, + "min": false, + "rightSide": false, + "show": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 1, + "links": [], + "maxPerRow": 3, + "nullPointMode": "null", + "options": { + "dataLinks": [] + }, + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "repeat": null, + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "span": 6, + "targets": [ + { + "expr": "jvm_memory_used_bytes{instance=\"$instance\", id=\"Eden Space\"}", + "format": "time_series", + "hide": false, + "interval": "", + "intervalFactor": 2, + "legendFormat": "used", + "metric": "", + "refId": "A", + "step": 1800 + }, + { + "expr": "jvm_memory_committed_bytes{instance=\"$instance\", id=~\"Eden Space\"}", + "format": "time_series", + "hide": false, + "interval": "", + "intervalFactor": 2, + "legendFormat": "committed", + "metric": "", + "refId": "B", + "step": 1800 + }, + { + "expr": "jvm_memory_max_bytes{instance=\"$instance\", id=\"Eden Space\"}", + "format": "time_series", + "hide": false, + "interval": "", + "intervalFactor": 2, + "legendFormat": "max", + "metric": "", + "refId": "C", + "step": 1800 + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "Eden Space", + "tooltip": { + "msResolution": false, + "shared": true, + "sort": 0, + "value_type": "cumulative" + }, + "type": "graph", + "x-axis": true, + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "y-axis": true, + "y_formats": [ + "mbytes", + "short" + ], + "yaxes": [ + { + "format": "bytes", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": null, + "editable": true, + "error": false, + "fill": 1, + "fillGradient": 0, + "grid": { + "leftLogBase": 1, + "leftMax": null, + "leftMin": null, + "rightLogBase": 1, + "rightMax": null, + "rightMin": null + }, + "gridPos": { + "h": 7, + "w": 8, + "x": 8, + "y": 28 + }, + "hiddenSeries": false, + "id": 134, + "legend": { + "alignAsTable": false, + "avg": false, + "current": true, + "max": true, + "min": false, + "rightSide": false, + "show": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 1, + "links": [], + "maxPerRow": 3, + "nullPointMode": "null", + "options": { + "dataLinks": [] + }, + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "repeat": null, + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "span": 6, + "targets": [ + { + "expr": "jvm_memory_used_bytes{instance=\"$instance\", id=\"Survivor Space\"}", + "format": "time_series", + "hide": false, + "interval": "", + "intervalFactor": 2, + "legendFormat": "used", + "metric": "", + "refId": "A", + "step": 1800 + }, + { + "expr": "jvm_memory_committed_bytes{instance=\"$instance\", id=\"Survivor Space\"}", + "format": "time_series", + "hide": false, + "interval": "", + "intervalFactor": 2, + "legendFormat": "committed", + "metric": "", + "refId": "B", + "step": 1800 + }, + { + "expr": "jvm_memory_max_bytes{instance=\"$instance\", id=\"Survivor Space\"}", + "format": "time_series", + "hide": false, + "interval": "", + "intervalFactor": 2, + "legendFormat": "max", + "metric": "", + "refId": "C", + "step": 1800 + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "Survivor Space", + "tooltip": { + "msResolution": false, + "shared": true, + "sort": 0, + "value_type": "cumulative" + }, + "type": "graph", + "x-axis": true, + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "y-axis": true, + "y_formats": [ + "mbytes", + "short" + ], + "yaxes": [ + { + "format": "bytes", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": null, + "editable": true, + "error": false, + "fill": 1, + "fillGradient": 0, + "grid": { + "leftLogBase": 1, + "leftMax": null, + "leftMin": null, + "rightLogBase": 1, + "rightMax": null, + "rightMin": null + }, + "gridPos": { + "h": 7, + "w": 8, + "x": 16, + "y": 28 + }, + "hiddenSeries": false, + "id": 135, + "legend": { + "alignAsTable": false, + "avg": false, + "current": true, + "max": true, + "min": false, + "rightSide": false, + "show": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 1, + "links": [], + "maxPerRow": 3, + "nullPointMode": "null", + "options": { + "dataLinks": [] + }, + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "repeat": null, + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "span": 6, + "targets": [ + { + "expr": "jvm_memory_used_bytes{instance=\"$instance\", id=\"Tenured Gen\"}", + "format": "time_series", + "hide": false, + "interval": "", + "intervalFactor": 2, + "legendFormat": "used", + "metric": "", + "refId": "A", + "step": 1800 + }, + { + "expr": "jvm_memory_committed_bytes{instance=\"$instance\", id=\"Tenured Gen\"}", + "format": "time_series", + "hide": false, + "interval": "", + "intervalFactor": 2, + "legendFormat": "committed", + "metric": "", + "refId": "B", + "step": 1800 + }, + { + "expr": "jvm_memory_max_bytes{instance=\"$instance\", id=\"Tenured Gen\"}", + "format": "time_series", + "hide": false, + "interval": "", + "intervalFactor": 2, + "legendFormat": "max", + "metric": "", + "refId": "C", + "step": 1800 + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "Tenured Gen", + "tooltip": { + "msResolution": false, + "shared": true, + "sort": 0, + "value_type": "cumulative" + }, + "type": "graph", + "x-axis": true, + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "y-axis": true, + "y_formats": [ + "mbytes", + "short" + ], + "yaxes": [ + { + "format": "bytes", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + } + ], + "repeat": null, + "repeatIteration": null, + "repeatRowId": null, + "showTitle": true, + "title": "JVM Memory Pools (Heap)", + "titleSize": "h6" + }, + { + "collapse": false, + "height": "250px", + "panels": [ + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": null, + "editable": true, + "error": false, + "fill": 1, + "fillGradient": 0, + "grid": { + "leftLogBase": 1, + "leftMax": null, + "leftMin": null, + "rightLogBase": 1, + "rightMax": null, + "rightMin": null + }, + "gridPos": { + "h": 7, + "w": 8, + "x": 0, + "y": 36 + }, + "hiddenSeries": false, + "id": 78, + "legend": { + "alignAsTable": false, + "avg": false, + "current": true, + "max": true, + "min": false, + "rightSide": false, + "show": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 1, + "links": [], + "maxPerRow": 3, + "nullPointMode": "null", + "options": { + "dataLinks": [] + }, + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "repeat": "null", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "span": 6, + "targets": [ + { + "expr": "jvm_memory_used_bytes{instance=\"$instance\", id=\"Metaspace\"}", + "format": "time_series", + "hide": false, + "interval": "", + "intervalFactor": 2, + "legendFormat": "used", + "metric": "", + "refId": "A", + "step": 1800 + }, + { + "expr": "jvm_memory_committed_bytes{instance=\"$instance\", id=\"Metaspace\"}", + "format": "time_series", + "hide": false, + "interval": "", + "intervalFactor": 2, + "legendFormat": "committed", + "metric": "", + "refId": "B", + "step": 1800 + }, + { + "expr": "jvm_memory_max_bytes{instance=\"$instance\", id=\"Metaspace\"}", + "format": "time_series", + "hide": false, + "interval": "", + "intervalFactor": 2, + "legendFormat": "max", + "metric": "", + "refId": "C", + "step": 1800 + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "Metaspace", + "tooltip": { + "msResolution": false, + "shared": true, + "sort": 0, + "value_type": "cumulative" + }, + "type": "graph", + "x-axis": true, + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "y-axis": true, + "y_formats": [ + "mbytes", + "short" + ], + "yaxes": [ + { + "format": "bytes", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": null, + "editable": true, + "error": false, + "fill": 1, + "fillGradient": 0, + "grid": { + "leftLogBase": 1, + "leftMax": null, + "leftMin": null, + "rightLogBase": 1, + "rightMax": null, + "rightMin": null + }, + "gridPos": { + "h": 7, + "w": 8, + "x": 8, + "y": 36 + }, + "hiddenSeries": false, + "id": 136, + "legend": { + "alignAsTable": false, + "avg": false, + "current": true, + "max": true, + "min": false, + "rightSide": false, + "show": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 1, + "links": [], + "maxPerRow": 3, + "nullPointMode": "null", + "options": { + "dataLinks": [] + }, + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "repeat": null, + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "span": 6, + "targets": [ + { + "expr": "jvm_memory_used_bytes{instance=\"$instance\", id=\"Compressed Class Space\"}", + "format": "time_series", + "hide": false, + "interval": "", + "intervalFactor": 2, + "legendFormat": "used", + "metric": "", + "refId": "A", + "step": 1800 + }, + { + "expr": "jvm_memory_committed_bytes{instance=\"$instance\", id=\"Compressed Class Space\"}", + "format": "time_series", + "hide": false, + "interval": "", + "intervalFactor": 2, + "legendFormat": "committed", + "metric": "", + "refId": "B", + "step": 1800 + }, + { + "expr": "jvm_memory_max_bytes{instance=\"$instance\", id=\"Compressed Class Space\"}", + "format": "time_series", + "hide": false, + "interval": "", + "intervalFactor": 2, + "legendFormat": "max", + "metric": "", + "refId": "C", + "step": 1800 + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "Compressed Class Space", + "tooltip": { + "msResolution": false, + "shared": true, + "sort": 0, + "value_type": "cumulative" + }, + "type": "graph", + "x-axis": true, + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "y-axis": true, + "y_formats": [ + "mbytes", + "short" + ], + "yaxes": [ + { + "format": "bytes", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": null, + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 7, + "w": 8, + "x": 16, + "y": 36 + }, + "hiddenSeries": false, + "id": 138, + "legend": { + "avg": false, + "current": true, + "max": true, + "min": false, + "show": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 1, + "nullPointMode": "null", + "options": { + "dataLinks": [] + }, + "percentage": false, + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "span": 6, + "targets": [ + { + "expr": "jvm_memory_used_bytes{instance=\"$instance\", id=\"CodeHeap 'profiled nmethods'\"}", + "interval": "", + "intervalFactor": 2, + "legendFormat": "used", + "refId": "A" + }, + { + "expr": "jvm_memory_committed_bytes{instance=\"$instance\", id=\"CodeHeap 'profiled nmethods'\"}", + "interval": "", + "intervalFactor": 2, + "legendFormat": "committed", + "refId": "B" + }, + { + "expr": "jvm_memory_max_bytes{instance=\"$instance\", id=\"CodeHeap 'profiled nmethods'\"}", + "interval": "", + "intervalFactor": 2, + "legendFormat": "max", + "refId": "C" + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "CodeHeap 'profiled nmethods'", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "bytes", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": null, + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 6, + "w": 8, + "x": 0, + "y": 43 + }, + "hiddenSeries": false, + "id": 140, + "legend": { + "avg": false, + "current": true, + "max": true, + "min": false, + "show": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 1, + "nullPointMode": "null", + "options": { + "dataLinks": [] + }, + "percentage": false, + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "span": 6, + "targets": [ + { + "expr": "jvm_memory_used_bytes{instance=\"$instance\", id=\"CodeHeap 'non-profiled nmethods'\"}", + "interval": "", + "intervalFactor": 2, + "legendFormat": "used", + "refId": "A" + }, + { + "expr": "jvm_memory_committed_bytes{instance=\"$instance\", id=\"CodeHeap 'non-profiled nmethods'\"}", + "interval": "", + "intervalFactor": 2, + "legendFormat": "committed", + "refId": "B" + }, + { + "expr": "jvm_memory_max_bytes{instance=\"$instance\", id=\"CodeHeap 'non-profiled nmethods'\"}", + "interval": "", + "intervalFactor": 2, + "legendFormat": "max", + "refId": "C" + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "CodeHeap 'non-profiled nmethods'", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "bytes", + "label": null, + "logBase": 1, + "max": null, + "min": "0", + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": null, + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 6, + "w": 8, + "x": 8, + "y": 43 + }, + "hiddenSeries": false, + "id": 142, + "legend": { + "avg": false, + "current": true, + "max": true, + "min": false, + "show": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 1, + "nullPointMode": "null", + "options": { + "dataLinks": [] + }, + "percentage": false, + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "span": 6, + "targets": [ + { + "expr": "jvm_memory_used_bytes{instance=\"$instance\", id=\"CodeHeap 'non-nmethods'\"}", + "interval": "", + "intervalFactor": 2, + "legendFormat": "used", + "refId": "A" + }, + { + "expr": "jvm_memory_committed_bytes{instance=\"$instance\", id=\"CodeHeap 'non-nmethods'\"}", + "interval": "", + "intervalFactor": 2, + "legendFormat": "committed", + "refId": "B" + }, + { + "expr": "jvm_memory_max_bytes{instance=\"$instance\", id=\"CodeHeap 'non-nmethods'\"}", + "interval": "", + "intervalFactor": 2, + "legendFormat": "max", + "refId": "C" + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "CodeHeap 'non-nmethods'", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "bytes", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + } + ], + "repeat": null, + "repeatIteration": null, + "repeatRowId": null, + "showTitle": true, + "title": "JVM Memory Pools (Non-Heap)", + "titleSize": "h6" + }, + { + "collapse": false, + "height": "250px", + "panels": [ + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": null, + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 7, + "w": 8, + "x": 0, + "y": 50 + }, + "hiddenSeries": false, + "id": 98, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "links": [], + "nullPointMode": "null", + "options": { + "dataLinks": [] + }, + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "span": 6, + "targets": [ + { + "expr": "rate(jvm_gc_pause_seconds_count{instance=\"$instance\"}[1m])", + "format": "time_series", + "hide": false, + "intervalFactor": 2, + "legendFormat": "{{action}} ({{cause}})", + "refId": "A" + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "Collections (ops/s)", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "ops", + "label": null, + "logBase": 1, + "max": null, + "min": "0", + "show": true + }, + { + "format": "short", + "label": "", + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": null, + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 7, + "w": 8, + "x": 8, + "y": 50 + }, + "hiddenSeries": false, + "id": 101, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "links": [], + "nullPointMode": "null", + "options": { + "dataLinks": [] + }, + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "span": 6, + "targets": [ + { + "expr": "rate(jvm_gc_pause_seconds_sum{instance=\"$instance\"}[1m])/rate(jvm_gc_pause_seconds_count{instance=\"$instance\"}[1m])", + "format": "time_series", + "hide": false, + "instant": false, + "intervalFactor": 1, + "legendFormat": "avg {{action}} ({{cause}})", + "refId": "A" + }, + { + "expr": "jvm_gc_pause_seconds_max{instance=\"$instance\"}", + "format": "time_series", + "hide": false, + "instant": false, + "intervalFactor": 1, + "legendFormat": "max {{action}} ({{cause}})", + "refId": "B" + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "Pause Durations", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "s", + "label": null, + "logBase": 1, + "max": null, + "min": "0", + "show": true + }, + { + "format": "short", + "label": "", + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": null, + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 7, + "w": 8, + "x": 16, + "y": 50 + }, + "hiddenSeries": false, + "id": 99, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "links": [], + "nullPointMode": "null", + "options": { + "dataLinks": [] + }, + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "span": 6, + "targets": [ + { + "expr": "rate(jvm_gc_memory_allocated_bytes_total{instance=\"$instance\"}[1m])", + "format": "time_series", + "interval": "", + "intervalFactor": 1, + "legendFormat": "allocated", + "refId": "A" + }, + { + "expr": "rate(jvm_gc_memory_promoted_bytes_total{instance=\"$instance\"}[1m])", + "format": "time_series", + "interval": "", + "intervalFactor": 1, + "legendFormat": "promoted", + "refId": "B" + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "Allocated/Promoted", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "Bps", + "label": null, + "logBase": 1, + "max": null, + "min": "0", + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + } + ], + "repeat": null, + "repeatIteration": null, + "repeatRowId": null, + "showTitle": true, + "title": "Garbage Collection", + "titleSize": "h6" + }, + { + "collapse": false, + "height": "250px", + "panels": [ + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": null, + "editable": true, + "error": false, + "fill": 1, + "fillGradient": 0, + "grid": { + "leftLogBase": 1, + "leftMax": null, + "leftMin": null, + "rightLogBase": 1, + "rightMax": null, + "rightMin": null + }, + "gridPos": { + "h": 7, + "w": 12, + "x": 0, + "y": 58 + }, + "hiddenSeries": false, + "id": 37, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "links": [], + "nullPointMode": "null", + "options": { + "dataLinks": [] + }, + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "span": 6, + "targets": [ + { + "expr": "jvm_classes_loaded{instance=\"$instance\"} or jvm_classes_loaded_classes{instance=\"$instance\"}", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "loaded", + "metric": "", + "refId": "A", + "step": 1200 + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "Classes loaded", + "tooltip": { + "msResolution": false, + "shared": true, + "sort": 0, + "value_type": "cumulative" + }, + "type": "graph", + "x-axis": true, + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "y-axis": true, + "y_formats": [ + "short", + "short" + ], + "yaxes": [ + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": null, + "editable": true, + "error": false, + "fill": 1, + "fillGradient": 0, + "grid": { + "leftLogBase": 1, + "leftMax": null, + "leftMin": null, + "rightLogBase": 1, + "rightMax": null, + "rightMin": null + }, + "gridPos": { + "h": 7, + "w": 12, + "x": 12, + "y": 58 + }, + "hiddenSeries": false, + "id": 38, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "links": [], + "nullPointMode": "null", + "options": { + "dataLinks": [] + }, + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "span": 6, + "targets": [ + { + "expr": "delta(jvm_classes_loaded{instance=\"$instance\"}[5m]) or delta(jvm_classes_loaded_classes{instance=\"$instance\"}[5m])", + "format": "time_series", + "hide": false, + "interval": "", + "intervalFactor": 2, + "legendFormat": "delta", + "metric": "", + "refId": "A", + "step": 1200 + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "Class delta (5m)", + "tooltip": { + "msResolution": false, + "shared": true, + "sort": 0, + "value_type": "cumulative" + }, + "type": "graph", + "x-axis": true, + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "y-axis": true, + "y_formats": [ + "ops", + "short" + ], + "yaxes": [ + { + "decimals": null, + "format": "short", + "label": "", + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + } + ], + "repeat": null, + "repeatIteration": null, + "repeatRowId": null, + "showTitle": true, + "title": "Classloading", + "titleSize": "h6" + }, + { + "collapse": false, + "height": "250px", + "panels": [ + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": null, + "editable": true, + "error": false, + "fill": 1, + "fillGradient": 0, + "grid": { + "leftLogBase": 1, + "leftMax": null, + "leftMin": null, + "rightLogBase": 1, + "rightMax": null, + "rightMin": null + }, + "gridPos": { + "h": 7, + "w": 6, + "x": 0, + "y": 66 + }, + "hiddenSeries": false, + "id": 33, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "links": [], + "nullPointMode": "null", + "options": { + "dataLinks": [] + }, + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "span": 6, + "targets": [ + { + "expr": "jvm_buffer_memory_used_bytes{instance=\"$instance\", id=\"direct\"}", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "used", + "metric": "", + "refId": "A", + "step": 2400 + }, + { + "expr": "jvm_buffer_total_capacity_bytes{instance=\"$instance\", id=\"direct\"}", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "capacity", + "metric": "", + "refId": "B", + "step": 2400 + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "Direct Buffers", + "tooltip": { + "msResolution": false, + "shared": true, + "sort": 0, + "value_type": "cumulative" + }, + "type": "graph", + "x-axis": true, + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "y-axis": true, + "y_formats": [ + "short", + "short" + ], + "yaxes": [ + { + "format": "bytes", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": null, + "editable": true, + "error": false, + "fill": 1, + "fillGradient": 0, + "grid": { + "leftLogBase": 1, + "leftMax": null, + "leftMin": null, + "rightLogBase": 1, + "rightMax": null, + "rightMin": null + }, + "gridPos": { + "h": 7, + "w": 6, + "x": 6, + "y": 66 + }, + "hiddenSeries": false, + "id": 83, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "links": [], + "nullPointMode": "null", + "options": { + "dataLinks": [] + }, + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "span": 6, + "targets": [ + { + "expr": "jvm_buffer_count{instance=\"$instance\", id=\"direct\"} or jvm_buffer_count_buffers{instance=\"$instance\", id=\"direct\"}", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "count", + "metric": "", + "refId": "A", + "step": 2400 + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "Direct Buffers", + "tooltip": { + "msResolution": false, + "shared": true, + "sort": 0, + "value_type": "cumulative" + }, + "type": "graph", + "x-axis": true, + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "y-axis": true, + "y_formats": [ + "short", + "short" + ], + "yaxes": [ + { + "decimals": 0, + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": null, + "editable": true, + "error": false, + "fill": 1, + "fillGradient": 0, + "grid": { + "leftLogBase": 1, + "leftMax": null, + "leftMin": null, + "rightLogBase": 1, + "rightMax": null, + "rightMin": null + }, + "gridPos": { + "h": 7, + "w": 6, + "x": 12, + "y": 66 + }, + "hiddenSeries": false, + "id": 85, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "links": [], + "nullPointMode": "null", + "options": { + "dataLinks": [] + }, + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "span": 6, + "targets": [ + { + "expr": "jvm_buffer_memory_used_bytes{instance=\"$instance\", id=\"mapped\"}", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "used", + "metric": "", + "refId": "A", + "step": 2400 + }, + { + "expr": "jvm_buffer_total_capacity_bytes{instance=\"$instance\", id=\"mapped\"}", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "capacity", + "metric": "", + "refId": "B", + "step": 2400 + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "Mapped Buffers", + "tooltip": { + "msResolution": false, + "shared": true, + "sort": 0, + "value_type": "cumulative" + }, + "type": "graph", + "x-axis": true, + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "y-axis": true, + "y_formats": [ + "short", + "short" + ], + "yaxes": [ + { + "format": "bytes", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": null, + "editable": true, + "error": false, + "fill": 1, + "fillGradient": 0, + "grid": { + "leftLogBase": 1, + "leftMax": null, + "leftMin": null, + "rightLogBase": 1, + "rightMax": null, + "rightMin": null + }, + "gridPos": { + "h": 7, + "w": 6, + "x": 18, + "y": 66 + }, + "hiddenSeries": false, + "id": 84, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "links": [], + "nullPointMode": "null", + "options": { + "dataLinks": [] + }, + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "span": 6, + "targets": [ + { + "expr": "jvm_buffer_count{instance=\"$instance\", id=\"mapped\"} or jvm_buffer_count_buffers{instance=\"$instance\", id=\"mapped\"}", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "count", + "metric": "", + "refId": "A", + "step": 2400 + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "Mapped Buffers", + "tooltip": { + "msResolution": false, + "shared": true, + "sort": 0, + "value_type": "cumulative" + }, + "type": "graph", + "x-axis": true, + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "y-axis": true, + "y_formats": [ + "short", + "short" + ], + "yaxes": [ + { + "decimals": 0, + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + } + ], + "repeat": null, + "repeatIteration": null, + "repeatRowId": null, + "showTitle": true, + "title": "Buffer Pools", + "titleSize": "h6" + } + ], + "refresh": "15m", + "schemaVersion": 22, + "style": "dark", + "tags": [ + "dev-spaces" + ], + "templating": { + "list": [ + { + "allFormat": "glob", + "allValue": null, + "current": { + "text": "10.128.2.176:8087", + "value": "10.128.2.176:8087" + }, + "datasource": null, + "definition": "", + "hide": 0, + "includeAll": false, + "index": -1, + "label": "Instance", + "multi": false, + "multiFormat": "glob", + "name": "instance", + "options": [], + "query": "label_values(jvm_memory_used_bytes, instance)", + "refresh": 2, + "regex": "", + "skipUrlSync": false, + "sort": 0, + "tagValuesQuery": "", + "tags": [], + "tagsQuery": "", + "type": "query", + "useTags": false + } + ] + }, + "time": { + "from": "now-24h", + "to": "now" + }, + "timepicker": { + "now": true, + "refresh_intervals": [ + "5s", + "10s", + "30s", + "1m", + "5m", + "15m", + "30m", + "1h", + "2h", + "1d" + ], + "time_options": [ + "5m", + "15m", + "1h", + "6h", + "12h", + "24h", + "2d", + "7d", + "30d" + ] + }, + "timezone": "browser", + "title": "Che Server JVM", + "uid": "Jv-xDZrmk", + "variables": { + "list": [] + }, + "version": 1 +} From 8d0d9ac5d82350901d77c2ff00f60abc78833d2e Mon Sep 17 00:00:00 2001 From: Igor Vinokur Date: Wed, 19 Apr 2023 09:37:29 +0300 Subject: [PATCH 08/75] Withdraw scm-userid value in PAT secrets and use scm-username instead (#496) Withdraw the scm-userid annotation from the PAT secret structure. Rework the PAT validation to check scm-username instead scm-userid. --- .../KubernetesPersonalAccessTokenManager.java | 3 --- .../KubernetesGitCredentialManagerTest.java | 12 ++-------- ...ernetesPersonalAccessTokenManagerTest.java | 8 +------ ...AzureDevOpsPersonalAccessTokenFetcher.java | 3 +-- ...eDevOpsPersonalAccessTokenFetcherTest.java | 2 +- .../BitbucketPersonalAccessTokenFetcher.java | 1 - ...tbucketPersonalAccessTokenFetcherTest.java | 4 ---- .../GithubPersonalAccessTokenFetcher.java | 3 +-- .../GithubPersonalAccessTokenFetcherTest.java | 6 +---- .../gitlab/GitlabOAuthTokenFetcher.java | 3 +-- .../gitlab/GitlabOAuthTokenFetcherTest.java | 5 ++-- .../server/scm/PersonalAccessToken.java | 24 ++----------------- 12 files changed, 12 insertions(+), 62 deletions(-) diff --git a/infrastructures/infrastructure-factory/src/main/java/org/eclipse/che/api/factory/server/scm/kubernetes/KubernetesPersonalAccessTokenManager.java b/infrastructures/infrastructure-factory/src/main/java/org/eclipse/che/api/factory/server/scm/kubernetes/KubernetesPersonalAccessTokenManager.java index 2175d19b2b..dca15f0951 100644 --- a/infrastructures/infrastructure-factory/src/main/java/org/eclipse/che/api/factory/server/scm/kubernetes/KubernetesPersonalAccessTokenManager.java +++ b/infrastructures/infrastructure-factory/src/main/java/org/eclipse/che/api/factory/server/scm/kubernetes/KubernetesPersonalAccessTokenManager.java @@ -59,7 +59,6 @@ public class KubernetesPersonalAccessTokenManager implements PersonalAccessToken public static final String NAME_PATTERN = "personal-access-token-"; public static final String ANNOTATION_CHE_USERID = "che.eclipse.org/che-userid"; - public static final String ANNOTATION_SCM_USERID = "che.eclipse.org/scm-userid"; public static final String ANNOTATION_SCM_USERNAME = "che.eclipse.org/scm-username"; public static final String ANNOTATION_SCM_ORGANIZATION = "che.eclipse.org/scm-organization"; public static final String ANNOTATION_SCM_PERSONAL_ACCESS_TOKEN_ID = @@ -97,7 +96,6 @@ public class KubernetesPersonalAccessTokenManager implements PersonalAccessToken .withAnnotations( new ImmutableMap.Builder() .put(ANNOTATION_CHE_USERID, personalAccessToken.getCheUserId()) - .put(ANNOTATION_SCM_USERID, personalAccessToken.getScmUserId()) .put(ANNOTATION_SCM_USERNAME, personalAccessToken.getScmUserName()) .put(ANNOTATION_SCM_URL, personalAccessToken.getScmProviderUrl()) .put( @@ -180,7 +178,6 @@ public class KubernetesPersonalAccessTokenManager implements PersonalAccessToken annotations.get(ANNOTATION_CHE_USERID), annotations.get(ANNOTATION_SCM_ORGANIZATION), annotations.get(ANNOTATION_SCM_USERNAME), - annotations.get(ANNOTATION_SCM_USERID), annotations.get(ANNOTATION_SCM_PERSONAL_ACCESS_TOKEN_NAME), annotations.get(ANNOTATION_SCM_PERSONAL_ACCESS_TOKEN_ID), token); diff --git a/infrastructures/infrastructure-factory/src/test/java/org/eclipse/che/api/factory/server/scm/kubernetes/KubernetesGitCredentialManagerTest.java b/infrastructures/infrastructure-factory/src/test/java/org/eclipse/che/api/factory/server/scm/kubernetes/KubernetesGitCredentialManagerTest.java index eb6d39a681..3c8d6b1e78 100644 --- a/infrastructures/infrastructure-factory/src/test/java/org/eclipse/che/api/factory/server/scm/kubernetes/KubernetesGitCredentialManagerTest.java +++ b/infrastructures/infrastructure-factory/src/test/java/org/eclipse/che/api/factory/server/scm/kubernetes/KubernetesGitCredentialManagerTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012-2021 Red Hat, Inc. + * Copyright (c) 2012-2023 Red Hat, Inc. * This program and the accompanying materials are made * available under the terms of the Eclipse Public License 2.0 * which is available at https://www.eclipse.org/legal/epl-2.0/ @@ -93,13 +93,7 @@ public class KubernetesGitCredentialManagerTest { PersonalAccessToken token = new PersonalAccessToken( - "https://bitbucket.com", - "cheUser", - "username", - "userId", - "token-name", - "tid-23434", - "token123"); + "https://bitbucket.com", "cheUser", "username", "token-name", "tid-23434", "token123"); // when kubernetesGitCredentialManager.createOrReplace(token); @@ -132,7 +126,6 @@ public class KubernetesGitCredentialManagerTest { "https://bitbucket.com", "cheUser", "username", - "userId", "oauth2-token-name", "tid-23434", "token123"); @@ -158,7 +151,6 @@ public class KubernetesGitCredentialManagerTest { "https://bitbucket.com:5648", "cheUser", "username", - "userId", "token-name", "tid-23434", "token123"); diff --git a/infrastructures/infrastructure-factory/src/test/java/org/eclipse/che/api/factory/server/scm/kubernetes/KubernetesPersonalAccessTokenManagerTest.java b/infrastructures/infrastructure-factory/src/test/java/org/eclipse/che/api/factory/server/scm/kubernetes/KubernetesPersonalAccessTokenManagerTest.java index 9457c1e08c..f24bdc5288 100644 --- a/infrastructures/infrastructure-factory/src/test/java/org/eclipse/che/api/factory/server/scm/kubernetes/KubernetesPersonalAccessTokenManagerTest.java +++ b/infrastructures/infrastructure-factory/src/test/java/org/eclipse/che/api/factory/server/scm/kubernetes/KubernetesPersonalAccessTokenManagerTest.java @@ -130,13 +130,7 @@ public class KubernetesPersonalAccessTokenManagerTest { PersonalAccessToken token = new PersonalAccessToken( - "https://bitbucket.com", - "cheUser", - "username", - "userId", - "token-name", - "tid-24", - "token123"); + "https://bitbucket.com", "cheUser", "username", "token-name", "tid-24", "token123"); // when personalAccessTokenManager.save(token); diff --git a/wsmaster/che-core-api-factory-azure-devops/src/main/java/org/eclipse/che/api/factory/server/azure/devops/AzureDevOpsPersonalAccessTokenFetcher.java b/wsmaster/che-core-api-factory-azure-devops/src/main/java/org/eclipse/che/api/factory/server/azure/devops/AzureDevOpsPersonalAccessTokenFetcher.java index 8d19308d95..b028ff77e0 100644 --- a/wsmaster/che-core-api-factory-azure-devops/src/main/java/org/eclipse/che/api/factory/server/azure/devops/AzureDevOpsPersonalAccessTokenFetcher.java +++ b/wsmaster/che-core-api-factory-azure-devops/src/main/java/org/eclipse/che/api/factory/server/azure/devops/AzureDevOpsPersonalAccessTokenFetcher.java @@ -87,7 +87,6 @@ public class AzureDevOpsPersonalAccessTokenFetcher implements PersonalAccessToke scmServerUrl, cheSubject.getUserId(), user.getEmailAddress(), - user.getId(), NameGenerator.generate(OAUTH_2_PREFIX, 5), NameGenerator.generate("id-", 5), oAuthToken.getToken()); @@ -144,7 +143,7 @@ public class AzureDevOpsPersonalAccessTokenFetcher implements PersonalAccessToke azureDevOpsApiClient.getUserWithPAT( personalAccessToken.getToken(), personalAccessToken.getScmOrganization()); } - return Optional.of(personalAccessToken.getScmUserId().equals(user.getId())); + return Optional.of(personalAccessToken.getScmUserName().equals(user.getEmailAddress())); } catch (ScmItemNotFoundException | ScmCommunicationException | ScmBadRequestException e) { return Optional.of(Boolean.FALSE); } diff --git a/wsmaster/che-core-api-factory-azure-devops/src/test/java/org/eclipse/che/api/factory/server/azure/devops/AzureDevOpsPersonalAccessTokenFetcherTest.java b/wsmaster/che-core-api-factory-azure-devops/src/test/java/org/eclipse/che/api/factory/server/azure/devops/AzureDevOpsPersonalAccessTokenFetcherTest.java index aac1a6e44a..5068f24504 100644 --- a/wsmaster/che-core-api-factory-azure-devops/src/test/java/org/eclipse/che/api/factory/server/azure/devops/AzureDevOpsPersonalAccessTokenFetcherTest.java +++ b/wsmaster/che-core-api-factory-azure-devops/src/test/java/org/eclipse/che/api/factory/server/azure/devops/AzureDevOpsPersonalAccessTokenFetcherTest.java @@ -57,7 +57,7 @@ public class AzureDevOpsPersonalAccessTokenFetcherTest { public void fetchPersonalAccessTokenShouldReturnToken() throws Exception { when(oAuthAPI.getToken(AzureDevOps.PROVIDER_NAME)).thenReturn(oAuthToken); when(azureDevOpsApiClient.getUserWithOAuthToken(any())).thenReturn(azureDevOpsUser); - when(azureDevOpsUser.getId()).thenReturn("user-id"); + when(azureDevOpsUser.getEmailAddress()).thenReturn("user-email"); PersonalAccessToken personalAccessToken = personalAccessTokenFetcher.fetchPersonalAccessToken( diff --git a/wsmaster/che-core-api-factory-bitbucket/src/main/java/org/eclipse/che/api/factory/server/bitbucket/BitbucketPersonalAccessTokenFetcher.java b/wsmaster/che-core-api-factory-bitbucket/src/main/java/org/eclipse/che/api/factory/server/bitbucket/BitbucketPersonalAccessTokenFetcher.java index fa7a1687a6..046bce6a7d 100644 --- a/wsmaster/che-core-api-factory-bitbucket/src/main/java/org/eclipse/che/api/factory/server/bitbucket/BitbucketPersonalAccessTokenFetcher.java +++ b/wsmaster/che-core-api-factory-bitbucket/src/main/java/org/eclipse/che/api/factory/server/bitbucket/BitbucketPersonalAccessTokenFetcher.java @@ -90,7 +90,6 @@ public class BitbucketPersonalAccessTokenFetcher implements PersonalAccessTokenF scmServerUrl, cheSubject.getUserId(), user.getName(), - user.getId(), NameGenerator.generate(OAUTH_PROVIDER_NAME, 5), NameGenerator.generate("id-", 5), oAuthToken.getToken()); diff --git a/wsmaster/che-core-api-factory-bitbucket/src/test/java/org/eclipse/che/api/factory/server/bitbucket/BitbucketPersonalAccessTokenFetcherTest.java b/wsmaster/che-core-api-factory-bitbucket/src/test/java/org/eclipse/che/api/factory/server/bitbucket/BitbucketPersonalAccessTokenFetcherTest.java index 81b5b815be..8cd3a1b382 100644 --- a/wsmaster/che-core-api-factory-bitbucket/src/test/java/org/eclipse/che/api/factory/server/bitbucket/BitbucketPersonalAccessTokenFetcherTest.java +++ b/wsmaster/che-core-api-factory-bitbucket/src/test/java/org/eclipse/che/api/factory/server/bitbucket/BitbucketPersonalAccessTokenFetcherTest.java @@ -87,7 +87,6 @@ public class BitbucketPersonalAccessTokenFetcherTest { "https://bitbucket.org/", "cheUserId", "scmUserName", - "scmUserId", "scmTokenName", "scmTokenId", bitbucketOauthToken); @@ -169,7 +168,6 @@ public class BitbucketPersonalAccessTokenFetcherTest { "https://bitbucket.org", "cheUser", "username", - "123456789", "token-name", "tid-23434", bitbucketOauthToken); @@ -194,7 +192,6 @@ public class BitbucketPersonalAccessTokenFetcherTest { "https://bitbucket.org", "cheUser", "username", - "123456789", OAUTH_2_PREFIX + "-token-name", "tid-23434", bitbucketOauthToken); @@ -211,7 +208,6 @@ public class BitbucketPersonalAccessTokenFetcherTest { "https://bitbucket.org", "cheUser", "username", - "123456789", OAUTH_2_PREFIX + "-token-name", "tid-23434", bitbucketOauthToken); diff --git a/wsmaster/che-core-api-factory-github/src/main/java/org/eclipse/che/api/factory/server/github/GithubPersonalAccessTokenFetcher.java b/wsmaster/che-core-api-factory-github/src/main/java/org/eclipse/che/api/factory/server/github/GithubPersonalAccessTokenFetcher.java index defb1d98b6..a5dd1ba535 100644 --- a/wsmaster/che-core-api-factory-github/src/main/java/org/eclipse/che/api/factory/server/github/GithubPersonalAccessTokenFetcher.java +++ b/wsmaster/che-core-api-factory-github/src/main/java/org/eclipse/che/api/factory/server/github/GithubPersonalAccessTokenFetcher.java @@ -157,7 +157,6 @@ public class GithubPersonalAccessTokenFetcher implements PersonalAccessTokenFetc scmServerUrl, cheSubject.getUserId(), user.getLogin(), - Long.toString(user.getId()), NameGenerator.generate(OAUTH_2_PREFIX, 5), NameGenerator.generate("id-", 5), oAuthToken.getToken()); @@ -212,7 +211,7 @@ public class GithubPersonalAccessTokenFetcher implements PersonalAccessTokenFetc } else { // No REST API for PAT-s in Github found yet. Just try to do some action. GithubUser user = githubApiClient.getUser(personalAccessToken.getToken()); - if (personalAccessToken.getScmUserId().equals(Long.toString(user.getId()))) { + if (personalAccessToken.getScmUserName().equals(user.getLogin())) { return Optional.of(Boolean.TRUE); } else { return Optional.of(Boolean.FALSE); diff --git a/wsmaster/che-core-api-factory-github/src/test/java/org/eclipse/che/api/factory/server/github/GithubPersonalAccessTokenFetcherTest.java b/wsmaster/che-core-api-factory-github/src/test/java/org/eclipse/che/api/factory/server/github/GithubPersonalAccessTokenFetcherTest.java index b2d6166ac7..9084bc40d2 100644 --- a/wsmaster/che-core-api-factory-github/src/test/java/org/eclipse/che/api/factory/server/github/GithubPersonalAccessTokenFetcherTest.java +++ b/wsmaster/che-core-api-factory-github/src/test/java/org/eclipse/che/api/factory/server/github/GithubPersonalAccessTokenFetcherTest.java @@ -91,7 +91,6 @@ public class GithubPersonalAccessTokenFetcherTest { "https://github.com/", "cheUserId", "scmUserName", - "scmUserId", "scmTokenName", "scmTokenId", githubOauthToken); @@ -203,8 +202,7 @@ public class GithubPersonalAccessTokenFetcherTest { new PersonalAccessToken( wireMockServer.url("/"), "cheUser", - "username", - "123456789", + "github-user", "token-name", "tid-23434", githubOauthToken); @@ -230,7 +228,6 @@ public class GithubPersonalAccessTokenFetcherTest { wireMockServer.url("/"), "cheUser", "username", - "123456789", OAUTH_2_PREFIX + "-token-name", "tid-23434", githubOauthToken); @@ -247,7 +244,6 @@ public class GithubPersonalAccessTokenFetcherTest { wireMockServer.url("/"), "cheUser", "username", - "123456789", OAUTH_2_PREFIX + "-token-name", "tid-23434", githubOauthToken); diff --git a/wsmaster/che-core-api-factory-gitlab/src/main/java/org/eclipse/che/api/factory/server/gitlab/GitlabOAuthTokenFetcher.java b/wsmaster/che-core-api-factory-gitlab/src/main/java/org/eclipse/che/api/factory/server/gitlab/GitlabOAuthTokenFetcher.java index bfbdf42322..091146a7bd 100644 --- a/wsmaster/che-core-api-factory-gitlab/src/main/java/org/eclipse/che/api/factory/server/gitlab/GitlabOAuthTokenFetcher.java +++ b/wsmaster/che-core-api-factory-gitlab/src/main/java/org/eclipse/che/api/factory/server/gitlab/GitlabOAuthTokenFetcher.java @@ -111,7 +111,6 @@ public class GitlabOAuthTokenFetcher implements PersonalAccessTokenFetcher { scmServerUrl, cheSubject.getUserId(), user.getUsername(), - Long.toString(user.getId()), NameGenerator.generate(OAUTH_2_PREFIX, 5), NameGenerator.generate("id-", 5), oAuthToken.getToken()); @@ -171,7 +170,7 @@ public class GitlabOAuthTokenFetcher implements PersonalAccessTokenFetcher { // latest GitLab version, we just perform check by accessing something from API. try { GitlabUser user = gitlabApiClient.getUser(personalAccessToken.getToken()); - if (personalAccessToken.getScmUserId().equals(Long.toString(user.getId()))) { + if (personalAccessToken.getScmUserName().equals(user.getUsername())) { return Optional.of(Boolean.TRUE); } else { return Optional.of(Boolean.FALSE); diff --git a/wsmaster/che-core-api-factory-gitlab/src/test/java/org/eclipse/che/api/factory/server/gitlab/GitlabOAuthTokenFetcherTest.java b/wsmaster/che-core-api-factory-gitlab/src/test/java/org/eclipse/che/api/factory/server/gitlab/GitlabOAuthTokenFetcherTest.java index c99ec8eff7..b61650c490 100644 --- a/wsmaster/che-core-api-factory-gitlab/src/test/java/org/eclipse/che/api/factory/server/gitlab/GitlabOAuthTokenFetcherTest.java +++ b/wsmaster/che-core-api-factory-gitlab/src/test/java/org/eclipse/che/api/factory/server/gitlab/GitlabOAuthTokenFetcherTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012-2021 Red Hat, Inc. + * Copyright (c) 2012-2023 Red Hat, Inc. * This program and the accompanying materials are made * available under the terms of the Eclipse Public License 2.0 * which is available at https://www.eclipse.org/legal/epl-2.0/ @@ -170,8 +170,7 @@ public class GitlabOAuthTokenFetcherTest { new PersonalAccessToken( wireMockServer.baseUrl(), "cheUser", - "username", - "1", + "john_smith", "token-name", "tid-23434", "token123"); diff --git a/wsmaster/che-core-api-factory/src/main/java/org/eclipse/che/api/factory/server/scm/PersonalAccessToken.java b/wsmaster/che-core-api-factory/src/main/java/org/eclipse/che/api/factory/server/scm/PersonalAccessToken.java index 0d9654703e..acc065d686 100644 --- a/wsmaster/che-core-api-factory/src/main/java/org/eclipse/che/api/factory/server/scm/PersonalAccessToken.java +++ b/wsmaster/che-core-api-factory/src/main/java/org/eclipse/che/api/factory/server/scm/PersonalAccessToken.java @@ -26,7 +26,6 @@ public class PersonalAccessToken { /** Organization that user belongs to. Can be null if user is not a member of any organization. */ @Nullable private final String scmOrganization; - private final String scmUserId; private final String scmTokenName; private final String scmTokenId; private final String token; @@ -37,14 +36,12 @@ public class PersonalAccessToken { String cheUserId, String scmOrganization, String scmUserName, - String scmUserId, String scmTokenName, String scmTokenId, String token) { this.scmProviderUrl = scmProviderUrl; this.scmOrganization = scmOrganization; this.scmUserName = scmUserName; - this.scmUserId = scmUserId; this.scmTokenName = scmTokenName; this.scmTokenId = scmTokenId; this.token = token; @@ -55,11 +52,10 @@ public class PersonalAccessToken { String scmProviderUrl, String cheUserId, String scmUserName, - String scmUserId, String scmTokenName, String scmTokenId, String token) { - this(scmProviderUrl, cheUserId, null, scmUserName, scmUserId, scmTokenName, scmTokenId, token); + this(scmProviderUrl, cheUserId, null, scmUserName, scmTokenName, scmTokenId, token); } public PersonalAccessToken(String scmProviderUrl, String scmUserName, String token) { @@ -70,7 +66,6 @@ public class PersonalAccessToken { scmUserName, null, null, - null, token); } @@ -90,10 +85,6 @@ public class PersonalAccessToken { return scmUserName; } - public String getScmUserId() { - return scmUserId; - } - public String getToken() { return token; } @@ -115,7 +106,6 @@ public class PersonalAccessToken { return Objects.equal(scmProviderUrl, that.scmProviderUrl) && Objects.equal(scmUserName, that.scmUserName) && Objects.equal(scmOrganization, that.scmOrganization) - && Objects.equal(scmUserId, that.scmUserId) && Objects.equal(scmTokenName, that.scmTokenName) && Objects.equal(scmTokenId, that.scmTokenId) && Objects.equal(token, that.token) @@ -125,14 +115,7 @@ public class PersonalAccessToken { @Override public int hashCode() { return Objects.hashCode( - scmProviderUrl, - scmUserName, - scmOrganization, - scmUserId, - scmTokenName, - scmTokenId, - token, - cheUserId); + scmProviderUrl, scmUserName, scmOrganization, scmTokenName, scmTokenId, token, cheUserId); } @Override @@ -147,9 +130,6 @@ public class PersonalAccessToken { + ", scmOrganization='" + scmOrganization + '\'' - + ", scmUserId='" - + scmUserId - + '\'' + ", scmTokenName='" + scmTokenName + '\'' From d0402f0b8e5d42e433cbbd2316e6c893c6648e29 Mon Sep 17 00:00:00 2001 From: Mykhailo Kuznietsov Date: Mon, 17 Apr 2023 17:08:51 +0000 Subject: [PATCH 09/75] chore: Bump to 7.65.0-SNAPSHOT in main Signed-off-by: Mykhailo Kuznietsov --- assembly/assembly-che-tomcat/pom.xml | 2 +- assembly/assembly-main/pom.xml | 2 +- assembly/assembly-root-war/pom.xml | 2 +- assembly/assembly-swagger-war/pom.xml | 2 +- assembly/assembly-wsmaster-war/pom.xml | 2 +- assembly/pom.xml | 2 +- core/che-core-api-core/pom.xml | 2 +- core/che-core-api-dto-maven-plugin/pom.xml | 2 +- core/che-core-api-dto/pom.xml | 2 +- core/che-core-api-model/pom.xml | 2 +- core/che-core-db-vendor-h2/pom.xml | 2 +- core/che-core-db-vendor-mysql/pom.xml | 2 +- core/che-core-db-vendor-postgresql/pom.xml | 2 +- core/che-core-db/pom.xml | 2 +- core/che-core-logback/pom.xml | 2 +- core/che-core-metrics-core/pom.xml | 2 +- core/che-core-tracing-core/pom.xml | 2 +- core/che-core-tracing-metrics/pom.xml | 2 +- core/che-core-tracing-web/pom.xml | 2 +- core/che-core-typescript-dto-maven-plugin/pom.xml | 2 +- core/commons/che-core-commons-annotations/pom.xml | 2 +- core/commons/che-core-commons-inject/pom.xml | 2 +- core/commons/che-core-commons-j2ee/pom.xml | 2 +- core/commons/che-core-commons-json/pom.xml | 2 +- core/commons/che-core-commons-lang/pom.xml | 2 +- core/commons/che-core-commons-observability/pom.xml | 2 +- core/commons/che-core-commons-schedule/pom.xml | 2 +- core/commons/che-core-commons-test/pom.xml | 2 +- core/commons/che-core-commons-tracing/pom.xml | 2 +- core/commons/pom.xml | 2 +- core/pom.xml | 2 +- infrastructures/infrastructure-distributed/pom.xml | 2 +- infrastructures/infrastructure-factory/pom.xml | 2 +- infrastructures/infrastructure-metrics/pom.xml | 2 +- infrastructures/infrastructure-permission/pom.xml | 2 +- infrastructures/kubernetes/pom.xml | 2 +- infrastructures/openshift/pom.xml | 2 +- infrastructures/pom.xml | 2 +- .../api/che-multiuser-api-authentication-commons/pom.xml | 2 +- multiuser/api/che-multiuser-api-authorization-impl/pom.xml | 2 +- multiuser/api/che-multiuser-api-authorization/pom.xml | 2 +- multiuser/api/che-multiuser-api-organization-shared/pom.xml | 2 +- multiuser/api/che-multiuser-api-organization/pom.xml | 2 +- multiuser/api/che-multiuser-api-permission-shared/pom.xml | 2 +- multiuser/api/che-multiuser-api-permission/pom.xml | 2 +- multiuser/api/che-multiuser-api-resource-shared/pom.xml | 2 +- multiuser/api/che-multiuser-api-resource/pom.xml | 2 +- multiuser/api/che-multiuser-api-workspace-activity/pom.xml | 2 +- multiuser/api/pom.xml | 2 +- .../integration-tests/che-multiuser-cascade-removal/pom.xml | 2 +- multiuser/integration-tests/che-multiuser-mysql-tck/pom.xml | 2 +- .../integration-tests/che-multiuser-postgresql-tck/pom.xml | 2 +- multiuser/integration-tests/pom.xml | 2 +- multiuser/keycloak/che-multiuser-keycloak-server/pom.xml | 2 +- multiuser/keycloak/che-multiuser-keycloak-shared/pom.xml | 2 +- .../keycloak/che-multiuser-keycloak-token-provider/pom.xml | 2 +- .../keycloak/che-multiuser-keycloak-user-remover/pom.xml | 2 +- multiuser/keycloak/pom.xml | 2 +- .../che-multiuser-machine-authentication-shared/pom.xml | 2 +- .../machine-auth/che-multiuser-machine-authentication/pom.xml | 2 +- multiuser/machine-auth/pom.xml | 2 +- multiuser/oidc/pom.xml | 2 +- multiuser/permission/che-multiuser-permission-devfile/pom.xml | 2 +- multiuser/permission/che-multiuser-permission-logger/pom.xml | 2 +- .../permission/che-multiuser-permission-resource/pom.xml | 2 +- multiuser/permission/che-multiuser-permission-system/pom.xml | 2 +- multiuser/permission/che-multiuser-permission-user/pom.xml | 2 +- .../che-multiuser-permission-workspace-activity/pom.xml | 2 +- .../permission/che-multiuser-permission-workspace/pom.xml | 2 +- multiuser/permission/pom.xml | 2 +- multiuser/personal-account/pom.xml | 2 +- multiuser/pom.xml | 2 +- multiuser/sql-schema/pom.xml | 2 +- pom.xml | 4 ++-- typescript-dto/dto-pom.xml | 2 +- wsmaster/che-core-api-account/pom.xml | 2 +- wsmaster/che-core-api-auth-azure-devops/pom.xml | 2 +- wsmaster/che-core-api-auth-bitbucket/pom.xml | 2 +- wsmaster/che-core-api-auth-github/pom.xml | 2 +- wsmaster/che-core-api-auth-gitlab/pom.xml | 2 +- wsmaster/che-core-api-auth-openshift/pom.xml | 2 +- wsmaster/che-core-api-auth-shared/pom.xml | 2 +- wsmaster/che-core-api-auth/pom.xml | 2 +- wsmaster/che-core-api-devfile-shared/pom.xml | 2 +- wsmaster/che-core-api-devfile/pom.xml | 2 +- wsmaster/che-core-api-factory-azure-devops/pom.xml | 2 +- wsmaster/che-core-api-factory-bitbucket-server/pom.xml | 2 +- wsmaster/che-core-api-factory-bitbucket/pom.xml | 2 +- wsmaster/che-core-api-factory-git-ssh/pom.xml | 2 +- wsmaster/che-core-api-factory-github/pom.xml | 2 +- wsmaster/che-core-api-factory-gitlab/pom.xml | 2 +- wsmaster/che-core-api-factory-shared/pom.xml | 2 +- wsmaster/che-core-api-factory/pom.xml | 2 +- wsmaster/che-core-api-logger-shared/pom.xml | 2 +- wsmaster/che-core-api-logger/pom.xml | 2 +- wsmaster/che-core-api-metrics/pom.xml | 2 +- wsmaster/che-core-api-ssh-shared/pom.xml | 2 +- wsmaster/che-core-api-ssh/pom.xml | 2 +- wsmaster/che-core-api-system-shared/pom.xml | 2 +- wsmaster/che-core-api-system/pom.xml | 2 +- wsmaster/che-core-api-user-shared/pom.xml | 2 +- wsmaster/che-core-api-user/pom.xml | 2 +- wsmaster/che-core-api-workspace-activity/pom.xml | 2 +- wsmaster/che-core-api-workspace-shared/pom.xml | 2 +- wsmaster/che-core-api-workspace/pom.xml | 2 +- wsmaster/che-core-sql-schema/pom.xml | 2 +- wsmaster/integration-tests/cascade-removal/pom.xml | 2 +- wsmaster/integration-tests/mysql-tck/pom.xml | 2 +- wsmaster/integration-tests/pom.xml | 2 +- wsmaster/integration-tests/postgresql-tck/pom.xml | 2 +- wsmaster/pom.xml | 2 +- 111 files changed, 112 insertions(+), 112 deletions(-) diff --git a/assembly/assembly-che-tomcat/pom.xml b/assembly/assembly-che-tomcat/pom.xml index b39ac09594..0d4cd29ba8 100644 --- a/assembly/assembly-che-tomcat/pom.xml +++ b/assembly/assembly-che-tomcat/pom.xml @@ -17,7 +17,7 @@ che-assembly-parent org.eclipse.che - 7.64.0-SNAPSHOT + 7.65.0-SNAPSHOT assembly-che-tomcat jar diff --git a/assembly/assembly-main/pom.xml b/assembly/assembly-main/pom.xml index bb1a34f630..50fc5efcde 100644 --- a/assembly/assembly-main/pom.xml +++ b/assembly/assembly-main/pom.xml @@ -17,7 +17,7 @@ che-assembly-parent org.eclipse.che - 7.64.0-SNAPSHOT + 7.65.0-SNAPSHOT assembly-main pom diff --git a/assembly/assembly-root-war/pom.xml b/assembly/assembly-root-war/pom.xml index 8c9382607b..2643d1353c 100644 --- a/assembly/assembly-root-war/pom.xml +++ b/assembly/assembly-root-war/pom.xml @@ -17,7 +17,7 @@ che-assembly-parent org.eclipse.che - 7.64.0-SNAPSHOT + 7.65.0-SNAPSHOT assembly-root-war war diff --git a/assembly/assembly-swagger-war/pom.xml b/assembly/assembly-swagger-war/pom.xml index 3cc8a784a6..7e421e25cd 100644 --- a/assembly/assembly-swagger-war/pom.xml +++ b/assembly/assembly-swagger-war/pom.xml @@ -17,7 +17,7 @@ che-assembly-parent org.eclipse.che - 7.64.0-SNAPSHOT + 7.65.0-SNAPSHOT assembly-swagger-war war diff --git a/assembly/assembly-wsmaster-war/pom.xml b/assembly/assembly-wsmaster-war/pom.xml index f3a824af4e..d8471bc737 100644 --- a/assembly/assembly-wsmaster-war/pom.xml +++ b/assembly/assembly-wsmaster-war/pom.xml @@ -17,7 +17,7 @@ che-assembly-parent org.eclipse.che - 7.64.0-SNAPSHOT + 7.65.0-SNAPSHOT assembly-wsmaster-war war diff --git a/assembly/pom.xml b/assembly/pom.xml index a4b3447411..3b031c453f 100644 --- a/assembly/pom.xml +++ b/assembly/pom.xml @@ -17,7 +17,7 @@ che-server org.eclipse.che - 7.64.0-SNAPSHOT + 7.65.0-SNAPSHOT ../pom.xml che-assembly-parent diff --git a/core/che-core-api-core/pom.xml b/core/che-core-api-core/pom.xml index 6655121de5..28d7c8f7bb 100644 --- a/core/che-core-api-core/pom.xml +++ b/core/che-core-api-core/pom.xml @@ -17,7 +17,7 @@ che-core-parent org.eclipse.che.core - 7.64.0-SNAPSHOT + 7.65.0-SNAPSHOT che-core-api-core jar diff --git a/core/che-core-api-dto-maven-plugin/pom.xml b/core/che-core-api-dto-maven-plugin/pom.xml index a556b4702e..97291b31c8 100644 --- a/core/che-core-api-dto-maven-plugin/pom.xml +++ b/core/che-core-api-dto-maven-plugin/pom.xml @@ -17,7 +17,7 @@ che-core-parent org.eclipse.che.core - 7.64.0-SNAPSHOT + 7.65.0-SNAPSHOT che-core-api-dto-maven-plugin maven-plugin diff --git a/core/che-core-api-dto/pom.xml b/core/che-core-api-dto/pom.xml index a852641714..681a5dfdd0 100644 --- a/core/che-core-api-dto/pom.xml +++ b/core/che-core-api-dto/pom.xml @@ -17,7 +17,7 @@ che-core-parent org.eclipse.che.core - 7.64.0-SNAPSHOT + 7.65.0-SNAPSHOT che-core-api-dto jar diff --git a/core/che-core-api-model/pom.xml b/core/che-core-api-model/pom.xml index 9d5264f466..e6c50def25 100644 --- a/core/che-core-api-model/pom.xml +++ b/core/che-core-api-model/pom.xml @@ -17,7 +17,7 @@ che-core-parent org.eclipse.che.core - 7.64.0-SNAPSHOT + 7.65.0-SNAPSHOT che-core-api-model jar diff --git a/core/che-core-db-vendor-h2/pom.xml b/core/che-core-db-vendor-h2/pom.xml index 385f8675a0..9250aeb211 100644 --- a/core/che-core-db-vendor-h2/pom.xml +++ b/core/che-core-db-vendor-h2/pom.xml @@ -17,7 +17,7 @@ che-core-parent org.eclipse.che.core - 7.64.0-SNAPSHOT + 7.65.0-SNAPSHOT che-core-db-vendor-h2 Che Core :: Commons :: DB :: Vendor H2 diff --git a/core/che-core-db-vendor-mysql/pom.xml b/core/che-core-db-vendor-mysql/pom.xml index 84c059b545..7c10f477f2 100644 --- a/core/che-core-db-vendor-mysql/pom.xml +++ b/core/che-core-db-vendor-mysql/pom.xml @@ -17,7 +17,7 @@ che-core-parent org.eclipse.che.core - 7.64.0-SNAPSHOT + 7.65.0-SNAPSHOT che-core-db-vendor-mysql Che Core :: Commons :: DB :: Vendor MySQL diff --git a/core/che-core-db-vendor-postgresql/pom.xml b/core/che-core-db-vendor-postgresql/pom.xml index 2c8d8e2099..e3f4cdd82a 100644 --- a/core/che-core-db-vendor-postgresql/pom.xml +++ b/core/che-core-db-vendor-postgresql/pom.xml @@ -17,7 +17,7 @@ che-core-parent org.eclipse.che.core - 7.64.0-SNAPSHOT + 7.65.0-SNAPSHOT che-core-db-vendor-postgresql Che Core :: Commons :: DB :: Vendor PostgreSQL diff --git a/core/che-core-db/pom.xml b/core/che-core-db/pom.xml index ad283752e9..7fe24c71c7 100644 --- a/core/che-core-db/pom.xml +++ b/core/che-core-db/pom.xml @@ -17,7 +17,7 @@ che-core-parent org.eclipse.che.core - 7.64.0-SNAPSHOT + 7.65.0-SNAPSHOT che-core-db Che Core :: Commons :: DB diff --git a/core/che-core-logback/pom.xml b/core/che-core-logback/pom.xml index 5e559f2261..588379ceaf 100644 --- a/core/che-core-logback/pom.xml +++ b/core/che-core-logback/pom.xml @@ -17,7 +17,7 @@ che-core-parent org.eclipse.che.core - 7.64.0-SNAPSHOT + 7.65.0-SNAPSHOT che-core-logback jar diff --git a/core/che-core-metrics-core/pom.xml b/core/che-core-metrics-core/pom.xml index fe6a2422ee..b9ffba4187 100644 --- a/core/che-core-metrics-core/pom.xml +++ b/core/che-core-metrics-core/pom.xml @@ -17,7 +17,7 @@ che-core-parent org.eclipse.che.core - 7.64.0-SNAPSHOT + 7.65.0-SNAPSHOT che-core-metrics-core Che Core :: Commons :: Metrics :: Core diff --git a/core/che-core-tracing-core/pom.xml b/core/che-core-tracing-core/pom.xml index 741f641c19..6feb954444 100644 --- a/core/che-core-tracing-core/pom.xml +++ b/core/che-core-tracing-core/pom.xml @@ -17,7 +17,7 @@ che-core-parent org.eclipse.che.core - 7.64.0-SNAPSHOT + 7.65.0-SNAPSHOT che-core-tracing-core Che Core :: Commons :: Tracing :: Core diff --git a/core/che-core-tracing-metrics/pom.xml b/core/che-core-tracing-metrics/pom.xml index 8e2fea26d1..afd5b796ad 100644 --- a/core/che-core-tracing-metrics/pom.xml +++ b/core/che-core-tracing-metrics/pom.xml @@ -17,7 +17,7 @@ che-core-parent org.eclipse.che.core - 7.64.0-SNAPSHOT + 7.65.0-SNAPSHOT che-core-tracing-metrics Che Core :: Commons :: Tracing :: Metrics diff --git a/core/che-core-tracing-web/pom.xml b/core/che-core-tracing-web/pom.xml index 81e71faea3..15030b66e5 100644 --- a/core/che-core-tracing-web/pom.xml +++ b/core/che-core-tracing-web/pom.xml @@ -17,7 +17,7 @@ che-core-parent org.eclipse.che.core - 7.64.0-SNAPSHOT + 7.65.0-SNAPSHOT che-core-tracing-web Che Core :: Commons :: Tracing :: Web diff --git a/core/che-core-typescript-dto-maven-plugin/pom.xml b/core/che-core-typescript-dto-maven-plugin/pom.xml index 3289a34f78..15c71ae71e 100644 --- a/core/che-core-typescript-dto-maven-plugin/pom.xml +++ b/core/che-core-typescript-dto-maven-plugin/pom.xml @@ -17,7 +17,7 @@ che-core-parent org.eclipse.che.core - 7.64.0-SNAPSHOT + 7.65.0-SNAPSHOT che-core-typescript-dto-maven-plugin maven-plugin diff --git a/core/commons/che-core-commons-annotations/pom.xml b/core/commons/che-core-commons-annotations/pom.xml index 05b7736c98..c64de6976c 100644 --- a/core/commons/che-core-commons-annotations/pom.xml +++ b/core/commons/che-core-commons-annotations/pom.xml @@ -17,7 +17,7 @@ che-core-commons-parent org.eclipse.che.core - 7.64.0-SNAPSHOT + 7.65.0-SNAPSHOT che-core-commons-annotations jar diff --git a/core/commons/che-core-commons-inject/pom.xml b/core/commons/che-core-commons-inject/pom.xml index d50def8670..9e607f3f29 100644 --- a/core/commons/che-core-commons-inject/pom.xml +++ b/core/commons/che-core-commons-inject/pom.xml @@ -17,7 +17,7 @@ che-core-commons-parent org.eclipse.che.core - 7.64.0-SNAPSHOT + 7.65.0-SNAPSHOT che-core-commons-inject jar diff --git a/core/commons/che-core-commons-j2ee/pom.xml b/core/commons/che-core-commons-j2ee/pom.xml index 1bb4655bde..6c5436322c 100644 --- a/core/commons/che-core-commons-j2ee/pom.xml +++ b/core/commons/che-core-commons-j2ee/pom.xml @@ -17,7 +17,7 @@ che-core-commons-parent org.eclipse.che.core - 7.64.0-SNAPSHOT + 7.65.0-SNAPSHOT che-core-commons-j2ee jar diff --git a/core/commons/che-core-commons-json/pom.xml b/core/commons/che-core-commons-json/pom.xml index c6e18ebf87..5f2fa72196 100644 --- a/core/commons/che-core-commons-json/pom.xml +++ b/core/commons/che-core-commons-json/pom.xml @@ -17,7 +17,7 @@ che-core-commons-parent org.eclipse.che.core - 7.64.0-SNAPSHOT + 7.65.0-SNAPSHOT che-core-commons-json jar diff --git a/core/commons/che-core-commons-lang/pom.xml b/core/commons/che-core-commons-lang/pom.xml index a650de6c78..685f7505b0 100644 --- a/core/commons/che-core-commons-lang/pom.xml +++ b/core/commons/che-core-commons-lang/pom.xml @@ -17,7 +17,7 @@ che-core-commons-parent org.eclipse.che.core - 7.64.0-SNAPSHOT + 7.65.0-SNAPSHOT che-core-commons-lang jar diff --git a/core/commons/che-core-commons-observability/pom.xml b/core/commons/che-core-commons-observability/pom.xml index d5bca73f4e..492539a82c 100644 --- a/core/commons/che-core-commons-observability/pom.xml +++ b/core/commons/che-core-commons-observability/pom.xml @@ -17,7 +17,7 @@ che-core-commons-parent org.eclipse.che.core - 7.64.0-SNAPSHOT + 7.65.0-SNAPSHOT che-core-commons-observability Che Core :: Commons :: Tracing and Monitoring wrapper diff --git a/core/commons/che-core-commons-schedule/pom.xml b/core/commons/che-core-commons-schedule/pom.xml index 1cea30b790..b9cad0a562 100644 --- a/core/commons/che-core-commons-schedule/pom.xml +++ b/core/commons/che-core-commons-schedule/pom.xml @@ -17,7 +17,7 @@ che-core-commons-parent org.eclipse.che.core - 7.64.0-SNAPSHOT + 7.65.0-SNAPSHOT che-core-commons-schedule jar diff --git a/core/commons/che-core-commons-test/pom.xml b/core/commons/che-core-commons-test/pom.xml index 2642bc4dbc..ecc177b5bd 100644 --- a/core/commons/che-core-commons-test/pom.xml +++ b/core/commons/che-core-commons-test/pom.xml @@ -17,7 +17,7 @@ che-core-commons-parent org.eclipse.che.core - 7.64.0-SNAPSHOT + 7.65.0-SNAPSHOT che-core-commons-test jar diff --git a/core/commons/che-core-commons-tracing/pom.xml b/core/commons/che-core-commons-tracing/pom.xml index 0afd37424a..14f10c4801 100644 --- a/core/commons/che-core-commons-tracing/pom.xml +++ b/core/commons/che-core-commons-tracing/pom.xml @@ -17,7 +17,7 @@ che-core-commons-parent org.eclipse.che.core - 7.64.0-SNAPSHOT + 7.65.0-SNAPSHOT che-core-commons-tracing Che Core :: Commons :: Tracing diff --git a/core/commons/pom.xml b/core/commons/pom.xml index 86432a0207..5f824af8f1 100644 --- a/core/commons/pom.xml +++ b/core/commons/pom.xml @@ -17,7 +17,7 @@ che-core-parent org.eclipse.che.core - 7.64.0-SNAPSHOT + 7.65.0-SNAPSHOT ../pom.xml che-core-commons-parent diff --git a/core/pom.xml b/core/pom.xml index 7260371f64..b30766b756 100644 --- a/core/pom.xml +++ b/core/pom.xml @@ -17,7 +17,7 @@ che-server org.eclipse.che - 7.64.0-SNAPSHOT + 7.65.0-SNAPSHOT ../pom.xml org.eclipse.che.core diff --git a/infrastructures/infrastructure-distributed/pom.xml b/infrastructures/infrastructure-distributed/pom.xml index c50cde6a43..b40a10912f 100644 --- a/infrastructures/infrastructure-distributed/pom.xml +++ b/infrastructures/infrastructure-distributed/pom.xml @@ -17,7 +17,7 @@ che-infrastructures-parent org.eclipse.che.infrastructure - 7.64.0-SNAPSHOT + 7.65.0-SNAPSHOT infrastructure-distributed jar diff --git a/infrastructures/infrastructure-factory/pom.xml b/infrastructures/infrastructure-factory/pom.xml index de6e2064fa..05589b058a 100644 --- a/infrastructures/infrastructure-factory/pom.xml +++ b/infrastructures/infrastructure-factory/pom.xml @@ -17,7 +17,7 @@ che-infrastructures-parent org.eclipse.che.infrastructure - 7.64.0-SNAPSHOT + 7.65.0-SNAPSHOT infrastructure-factory jar diff --git a/infrastructures/infrastructure-metrics/pom.xml b/infrastructures/infrastructure-metrics/pom.xml index ca0d478a4c..1b4a897828 100644 --- a/infrastructures/infrastructure-metrics/pom.xml +++ b/infrastructures/infrastructure-metrics/pom.xml @@ -17,7 +17,7 @@ che-infrastructures-parent org.eclipse.che.infrastructure - 7.64.0-SNAPSHOT + 7.65.0-SNAPSHOT ../pom.xml infrastructure-metrics diff --git a/infrastructures/infrastructure-permission/pom.xml b/infrastructures/infrastructure-permission/pom.xml index b93a42dbe9..eaa4660e4e 100644 --- a/infrastructures/infrastructure-permission/pom.xml +++ b/infrastructures/infrastructure-permission/pom.xml @@ -17,7 +17,7 @@ che-infrastructures-parent org.eclipse.che.infrastructure - 7.64.0-SNAPSHOT + 7.65.0-SNAPSHOT infrastructure-permission Infrastructure :: Kubernetes Permissions diff --git a/infrastructures/kubernetes/pom.xml b/infrastructures/kubernetes/pom.xml index 0cbb19c8fd..155bac6288 100644 --- a/infrastructures/kubernetes/pom.xml +++ b/infrastructures/kubernetes/pom.xml @@ -17,7 +17,7 @@ che-infrastructures-parent org.eclipse.che.infrastructure - 7.64.0-SNAPSHOT + 7.65.0-SNAPSHOT infrastructure-kubernetes Infrastructure :: Kubernetes diff --git a/infrastructures/openshift/pom.xml b/infrastructures/openshift/pom.xml index d2f33baf0a..ac502dcbbb 100644 --- a/infrastructures/openshift/pom.xml +++ b/infrastructures/openshift/pom.xml @@ -17,7 +17,7 @@ che-infrastructures-parent org.eclipse.che.infrastructure - 7.64.0-SNAPSHOT + 7.65.0-SNAPSHOT infrastructure-openshift Infrastructure :: OpenShift diff --git a/infrastructures/pom.xml b/infrastructures/pom.xml index 3f1a428760..477c96c5d2 100644 --- a/infrastructures/pom.xml +++ b/infrastructures/pom.xml @@ -17,7 +17,7 @@ che-server org.eclipse.che - 7.64.0-SNAPSHOT + 7.65.0-SNAPSHOT ../pom.xml org.eclipse.che.infrastructure diff --git a/multiuser/api/che-multiuser-api-authentication-commons/pom.xml b/multiuser/api/che-multiuser-api-authentication-commons/pom.xml index 2f19ceb1f6..e87f1c1359 100644 --- a/multiuser/api/che-multiuser-api-authentication-commons/pom.xml +++ b/multiuser/api/che-multiuser-api-authentication-commons/pom.xml @@ -17,7 +17,7 @@ che-multiuser-api org.eclipse.che.multiuser - 7.64.0-SNAPSHOT + 7.65.0-SNAPSHOT che-multiuser-api-authentication-commons jar diff --git a/multiuser/api/che-multiuser-api-authorization-impl/pom.xml b/multiuser/api/che-multiuser-api-authorization-impl/pom.xml index c58a4c3ba8..42ca5174c4 100644 --- a/multiuser/api/che-multiuser-api-authorization-impl/pom.xml +++ b/multiuser/api/che-multiuser-api-authorization-impl/pom.xml @@ -17,7 +17,7 @@ che-multiuser-api org.eclipse.che.multiuser - 7.64.0-SNAPSHOT + 7.65.0-SNAPSHOT che-multiuser-api-authorization-impl jar diff --git a/multiuser/api/che-multiuser-api-authorization/pom.xml b/multiuser/api/che-multiuser-api-authorization/pom.xml index 9e0ba2612a..1fa53da776 100644 --- a/multiuser/api/che-multiuser-api-authorization/pom.xml +++ b/multiuser/api/che-multiuser-api-authorization/pom.xml @@ -17,7 +17,7 @@ che-multiuser-api org.eclipse.che.multiuser - 7.64.0-SNAPSHOT + 7.65.0-SNAPSHOT che-multiuser-api-authorization jar diff --git a/multiuser/api/che-multiuser-api-organization-shared/pom.xml b/multiuser/api/che-multiuser-api-organization-shared/pom.xml index 12e38b3fae..a9e5e091ce 100644 --- a/multiuser/api/che-multiuser-api-organization-shared/pom.xml +++ b/multiuser/api/che-multiuser-api-organization-shared/pom.xml @@ -17,7 +17,7 @@ che-multiuser-api org.eclipse.che.multiuser - 7.64.0-SNAPSHOT + 7.65.0-SNAPSHOT che-multiuser-api-organization-shared jar diff --git a/multiuser/api/che-multiuser-api-organization/pom.xml b/multiuser/api/che-multiuser-api-organization/pom.xml index f8423448cb..441e4fbe32 100644 --- a/multiuser/api/che-multiuser-api-organization/pom.xml +++ b/multiuser/api/che-multiuser-api-organization/pom.xml @@ -17,7 +17,7 @@ che-multiuser-api org.eclipse.che.multiuser - 7.64.0-SNAPSHOT + 7.65.0-SNAPSHOT che-multiuser-api-organization jar diff --git a/multiuser/api/che-multiuser-api-permission-shared/pom.xml b/multiuser/api/che-multiuser-api-permission-shared/pom.xml index 75842f3e47..82544d471b 100644 --- a/multiuser/api/che-multiuser-api-permission-shared/pom.xml +++ b/multiuser/api/che-multiuser-api-permission-shared/pom.xml @@ -17,7 +17,7 @@ che-multiuser-api org.eclipse.che.multiuser - 7.64.0-SNAPSHOT + 7.65.0-SNAPSHOT che-multiuser-api-permission-shared jar diff --git a/multiuser/api/che-multiuser-api-permission/pom.xml b/multiuser/api/che-multiuser-api-permission/pom.xml index 133ee791e1..e2965d58e3 100644 --- a/multiuser/api/che-multiuser-api-permission/pom.xml +++ b/multiuser/api/che-multiuser-api-permission/pom.xml @@ -17,7 +17,7 @@ che-multiuser-api org.eclipse.che.multiuser - 7.64.0-SNAPSHOT + 7.65.0-SNAPSHOT che-multiuser-api-permission jar diff --git a/multiuser/api/che-multiuser-api-resource-shared/pom.xml b/multiuser/api/che-multiuser-api-resource-shared/pom.xml index 693d25e9fb..6f8521c017 100644 --- a/multiuser/api/che-multiuser-api-resource-shared/pom.xml +++ b/multiuser/api/che-multiuser-api-resource-shared/pom.xml @@ -17,7 +17,7 @@ che-multiuser-api org.eclipse.che.multiuser - 7.64.0-SNAPSHOT + 7.65.0-SNAPSHOT che-multiuser-api-resource-shared jar diff --git a/multiuser/api/che-multiuser-api-resource/pom.xml b/multiuser/api/che-multiuser-api-resource/pom.xml index a5d14e958e..bbb386bbce 100644 --- a/multiuser/api/che-multiuser-api-resource/pom.xml +++ b/multiuser/api/che-multiuser-api-resource/pom.xml @@ -17,7 +17,7 @@ che-multiuser-api org.eclipse.che.multiuser - 7.64.0-SNAPSHOT + 7.65.0-SNAPSHOT che-multiuser-api-resource jar diff --git a/multiuser/api/che-multiuser-api-workspace-activity/pom.xml b/multiuser/api/che-multiuser-api-workspace-activity/pom.xml index 59c96f196a..7ac41495e2 100644 --- a/multiuser/api/che-multiuser-api-workspace-activity/pom.xml +++ b/multiuser/api/che-multiuser-api-workspace-activity/pom.xml @@ -17,7 +17,7 @@ che-multiuser-api org.eclipse.che.multiuser - 7.64.0-SNAPSHOT + 7.65.0-SNAPSHOT che-multiuser-api-workspace-activity jar diff --git a/multiuser/api/pom.xml b/multiuser/api/pom.xml index 3048de5a8e..ad0d423385 100644 --- a/multiuser/api/pom.xml +++ b/multiuser/api/pom.xml @@ -17,7 +17,7 @@ che-multiuser-parent org.eclipse.che.multiuser - 7.64.0-SNAPSHOT + 7.65.0-SNAPSHOT ../pom.xml che-multiuser-api diff --git a/multiuser/integration-tests/che-multiuser-cascade-removal/pom.xml b/multiuser/integration-tests/che-multiuser-cascade-removal/pom.xml index 40f4df67d9..7d07718a11 100644 --- a/multiuser/integration-tests/che-multiuser-cascade-removal/pom.xml +++ b/multiuser/integration-tests/che-multiuser-cascade-removal/pom.xml @@ -17,7 +17,7 @@ che-multiuser-integration-tests org.eclipse.che.multiuser - 7.64.0-SNAPSHOT + 7.65.0-SNAPSHOT che-multiuser-cascade-removal jar diff --git a/multiuser/integration-tests/che-multiuser-mysql-tck/pom.xml b/multiuser/integration-tests/che-multiuser-mysql-tck/pom.xml index c0ea353b03..5d2ccd3216 100644 --- a/multiuser/integration-tests/che-multiuser-mysql-tck/pom.xml +++ b/multiuser/integration-tests/che-multiuser-mysql-tck/pom.xml @@ -17,7 +17,7 @@ che-multiuser-integration-tests org.eclipse.che.multiuser - 7.64.0-SNAPSHOT + 7.65.0-SNAPSHOT che-multiuser-mysql-tck jar diff --git a/multiuser/integration-tests/che-multiuser-postgresql-tck/pom.xml b/multiuser/integration-tests/che-multiuser-postgresql-tck/pom.xml index 04268668b7..2893e2524e 100644 --- a/multiuser/integration-tests/che-multiuser-postgresql-tck/pom.xml +++ b/multiuser/integration-tests/che-multiuser-postgresql-tck/pom.xml @@ -17,7 +17,7 @@ che-multiuser-integration-tests org.eclipse.che.multiuser - 7.64.0-SNAPSHOT + 7.65.0-SNAPSHOT che-multiuser-postgresql-tck jar diff --git a/multiuser/integration-tests/pom.xml b/multiuser/integration-tests/pom.xml index 090e28aba5..0a7a47789e 100644 --- a/multiuser/integration-tests/pom.xml +++ b/multiuser/integration-tests/pom.xml @@ -17,7 +17,7 @@ che-multiuser-parent org.eclipse.che.multiuser - 7.64.0-SNAPSHOT + 7.65.0-SNAPSHOT che-multiuser-integration-tests pom diff --git a/multiuser/keycloak/che-multiuser-keycloak-server/pom.xml b/multiuser/keycloak/che-multiuser-keycloak-server/pom.xml index 05020e4613..e6bf4b34de 100644 --- a/multiuser/keycloak/che-multiuser-keycloak-server/pom.xml +++ b/multiuser/keycloak/che-multiuser-keycloak-server/pom.xml @@ -17,7 +17,7 @@ che-multiuser-keycloak org.eclipse.che.multiuser - 7.64.0-SNAPSHOT + 7.65.0-SNAPSHOT che-multiuser-keycloak-server jar diff --git a/multiuser/keycloak/che-multiuser-keycloak-shared/pom.xml b/multiuser/keycloak/che-multiuser-keycloak-shared/pom.xml index 1b5af3d6a1..c05a86a0da 100644 --- a/multiuser/keycloak/che-multiuser-keycloak-shared/pom.xml +++ b/multiuser/keycloak/che-multiuser-keycloak-shared/pom.xml @@ -17,7 +17,7 @@ che-multiuser-keycloak org.eclipse.che.multiuser - 7.64.0-SNAPSHOT + 7.65.0-SNAPSHOT che-multiuser-keycloak-shared jar diff --git a/multiuser/keycloak/che-multiuser-keycloak-token-provider/pom.xml b/multiuser/keycloak/che-multiuser-keycloak-token-provider/pom.xml index d76e623fdd..d22fad6e9c 100644 --- a/multiuser/keycloak/che-multiuser-keycloak-token-provider/pom.xml +++ b/multiuser/keycloak/che-multiuser-keycloak-token-provider/pom.xml @@ -17,7 +17,7 @@ che-multiuser-keycloak org.eclipse.che.multiuser - 7.64.0-SNAPSHOT + 7.65.0-SNAPSHOT che-multiuser-keycloak-token-provider Che Multiuser :: Keycloak Token Provider diff --git a/multiuser/keycloak/che-multiuser-keycloak-user-remover/pom.xml b/multiuser/keycloak/che-multiuser-keycloak-user-remover/pom.xml index 5cafd1a91d..b902800285 100644 --- a/multiuser/keycloak/che-multiuser-keycloak-user-remover/pom.xml +++ b/multiuser/keycloak/che-multiuser-keycloak-user-remover/pom.xml @@ -17,7 +17,7 @@ che-multiuser-keycloak org.eclipse.che.multiuser - 7.64.0-SNAPSHOT + 7.65.0-SNAPSHOT che-multiuser-keycloak-user-remover jar diff --git a/multiuser/keycloak/pom.xml b/multiuser/keycloak/pom.xml index 04b7beb2e8..291af23013 100644 --- a/multiuser/keycloak/pom.xml +++ b/multiuser/keycloak/pom.xml @@ -17,7 +17,7 @@ che-multiuser-parent org.eclipse.che.multiuser - 7.64.0-SNAPSHOT + 7.65.0-SNAPSHOT ../pom.xml che-multiuser-keycloak diff --git a/multiuser/machine-auth/che-multiuser-machine-authentication-shared/pom.xml b/multiuser/machine-auth/che-multiuser-machine-authentication-shared/pom.xml index b46306b06b..8d6f88a5ff 100644 --- a/multiuser/machine-auth/che-multiuser-machine-authentication-shared/pom.xml +++ b/multiuser/machine-auth/che-multiuser-machine-authentication-shared/pom.xml @@ -17,7 +17,7 @@ che-multiuser-machine-auth org.eclipse.che.multiuser - 7.64.0-SNAPSHOT + 7.65.0-SNAPSHOT che-multiuser-machine-authentication-shared jar diff --git a/multiuser/machine-auth/che-multiuser-machine-authentication/pom.xml b/multiuser/machine-auth/che-multiuser-machine-authentication/pom.xml index d4fa05fad5..10be4b1341 100644 --- a/multiuser/machine-auth/che-multiuser-machine-authentication/pom.xml +++ b/multiuser/machine-auth/che-multiuser-machine-authentication/pom.xml @@ -17,7 +17,7 @@ che-multiuser-machine-auth org.eclipse.che.multiuser - 7.64.0-SNAPSHOT + 7.65.0-SNAPSHOT che-multiuser-machine-authentication jar diff --git a/multiuser/machine-auth/pom.xml b/multiuser/machine-auth/pom.xml index 72616e3527..01a3a7790c 100644 --- a/multiuser/machine-auth/pom.xml +++ b/multiuser/machine-auth/pom.xml @@ -17,7 +17,7 @@ che-multiuser-parent org.eclipse.che.multiuser - 7.64.0-SNAPSHOT + 7.65.0-SNAPSHOT ../pom.xml che-multiuser-machine-auth diff --git a/multiuser/oidc/pom.xml b/multiuser/oidc/pom.xml index 504228c24c..97963dfe3d 100644 --- a/multiuser/oidc/pom.xml +++ b/multiuser/oidc/pom.xml @@ -17,7 +17,7 @@ che-multiuser-parent org.eclipse.che.multiuser - 7.64.0-SNAPSHOT + 7.65.0-SNAPSHOT che-multiuser-oidc jar diff --git a/multiuser/permission/che-multiuser-permission-devfile/pom.xml b/multiuser/permission/che-multiuser-permission-devfile/pom.xml index 50a9fa8945..b361207740 100644 --- a/multiuser/permission/che-multiuser-permission-devfile/pom.xml +++ b/multiuser/permission/che-multiuser-permission-devfile/pom.xml @@ -17,7 +17,7 @@ che-multiuser-permission org.eclipse.che.multiuser - 7.64.0-SNAPSHOT + 7.65.0-SNAPSHOT che-multiuser-permission-devfile Che Multiuser :: Devfile Permissions diff --git a/multiuser/permission/che-multiuser-permission-logger/pom.xml b/multiuser/permission/che-multiuser-permission-logger/pom.xml index a96b015894..d09474a570 100644 --- a/multiuser/permission/che-multiuser-permission-logger/pom.xml +++ b/multiuser/permission/che-multiuser-permission-logger/pom.xml @@ -17,7 +17,7 @@ che-multiuser-permission org.eclipse.che.multiuser - 7.64.0-SNAPSHOT + 7.65.0-SNAPSHOT che-multiuser-permission-logger Che Multiuser :: Logger Permissions diff --git a/multiuser/permission/che-multiuser-permission-resource/pom.xml b/multiuser/permission/che-multiuser-permission-resource/pom.xml index dd90df41da..1e45641f4d 100644 --- a/multiuser/permission/che-multiuser-permission-resource/pom.xml +++ b/multiuser/permission/che-multiuser-permission-resource/pom.xml @@ -17,7 +17,7 @@ che-multiuser-permission org.eclipse.che.multiuser - 7.64.0-SNAPSHOT + 7.65.0-SNAPSHOT che-multiuser-permission-resource Che Multiuser :: Resource :: Permissions diff --git a/multiuser/permission/che-multiuser-permission-system/pom.xml b/multiuser/permission/che-multiuser-permission-system/pom.xml index 84749b3ebe..e435147e0b 100644 --- a/multiuser/permission/che-multiuser-permission-system/pom.xml +++ b/multiuser/permission/che-multiuser-permission-system/pom.xml @@ -17,7 +17,7 @@ che-multiuser-permission org.eclipse.che.multiuser - 7.64.0-SNAPSHOT + 7.65.0-SNAPSHOT che-multiuser-permission-system Che Multiuser :: System Permissions diff --git a/multiuser/permission/che-multiuser-permission-user/pom.xml b/multiuser/permission/che-multiuser-permission-user/pom.xml index 49bd736913..4a43389f25 100644 --- a/multiuser/permission/che-multiuser-permission-user/pom.xml +++ b/multiuser/permission/che-multiuser-permission-user/pom.xml @@ -17,7 +17,7 @@ che-multiuser-permission org.eclipse.che.multiuser - 7.64.0-SNAPSHOT + 7.65.0-SNAPSHOT che-multiuser-permission-user Che Multiuser :: User Permissions diff --git a/multiuser/permission/che-multiuser-permission-workspace-activity/pom.xml b/multiuser/permission/che-multiuser-permission-workspace-activity/pom.xml index 2d489faa3f..72f65b829f 100644 --- a/multiuser/permission/che-multiuser-permission-workspace-activity/pom.xml +++ b/multiuser/permission/che-multiuser-permission-workspace-activity/pom.xml @@ -17,7 +17,7 @@ che-multiuser-permission org.eclipse.che.multiuser - 7.64.0-SNAPSHOT + 7.65.0-SNAPSHOT che-multiuser-permission-workspace-activity Che Multiuser :: Workspace Activity Permissions diff --git a/multiuser/permission/che-multiuser-permission-workspace/pom.xml b/multiuser/permission/che-multiuser-permission-workspace/pom.xml index e8c816194d..ace47ae956 100644 --- a/multiuser/permission/che-multiuser-permission-workspace/pom.xml +++ b/multiuser/permission/che-multiuser-permission-workspace/pom.xml @@ -17,7 +17,7 @@ che-multiuser-permission org.eclipse.che.multiuser - 7.64.0-SNAPSHOT + 7.65.0-SNAPSHOT che-multiuser-permission-workspace Che Multiuser :: Workspace Permissions diff --git a/multiuser/permission/pom.xml b/multiuser/permission/pom.xml index 07f459b507..679d660adc 100644 --- a/multiuser/permission/pom.xml +++ b/multiuser/permission/pom.xml @@ -17,7 +17,7 @@ che-multiuser-parent org.eclipse.che.multiuser - 7.64.0-SNAPSHOT + 7.65.0-SNAPSHOT ../pom.xml che-multiuser-permission diff --git a/multiuser/personal-account/pom.xml b/multiuser/personal-account/pom.xml index 40e4ee3ccc..38fb9dd3e7 100644 --- a/multiuser/personal-account/pom.xml +++ b/multiuser/personal-account/pom.xml @@ -17,7 +17,7 @@ che-multiuser-parent org.eclipse.che.multiuser - 7.64.0-SNAPSHOT + 7.65.0-SNAPSHOT che-multiuser-personal-account jar diff --git a/multiuser/pom.xml b/multiuser/pom.xml index 0a293a3a29..4e1353b56b 100644 --- a/multiuser/pom.xml +++ b/multiuser/pom.xml @@ -17,7 +17,7 @@ che-server org.eclipse.che - 7.64.0-SNAPSHOT + 7.65.0-SNAPSHOT ../pom.xml org.eclipse.che.multiuser diff --git a/multiuser/sql-schema/pom.xml b/multiuser/sql-schema/pom.xml index 657e0e1c34..6eaa86d92b 100644 --- a/multiuser/sql-schema/pom.xml +++ b/multiuser/sql-schema/pom.xml @@ -17,7 +17,7 @@ che-multiuser-parent org.eclipse.che.multiuser - 7.64.0-SNAPSHOT + 7.65.0-SNAPSHOT ../pom.xml che-multiuser-sql-schema diff --git a/pom.xml b/pom.xml index 9169bd8db7..41d3fd50bc 100644 --- a/pom.xml +++ b/pom.xml @@ -16,7 +16,7 @@ 4.0.0 org.eclipse.che che-server - 7.64.0-SNAPSHOT + 7.65.0-SNAPSHOT pom Che Server Eclipse Che Server @@ -100,7 +100,7 @@ Red Hat, Inc. - initial API and implementation ${project.version} - 7.64.0-SNAPSHOT + 7.65.0-SNAPSHOT 1.0-beta2 Red Hat, Inc. diff --git a/typescript-dto/dto-pom.xml b/typescript-dto/dto-pom.xml index c5111c01d1..e890df678c 100644 --- a/typescript-dto/dto-pom.xml +++ b/typescript-dto/dto-pom.xml @@ -23,7 +23,7 @@ pom Che TypeScript DTO - 7.64.0-SNAPSHOT + 7.65.0-SNAPSHOT diff --git a/wsmaster/che-core-api-account/pom.xml b/wsmaster/che-core-api-account/pom.xml index bdb9aa70c1..d2ab34d9e2 100644 --- a/wsmaster/che-core-api-account/pom.xml +++ b/wsmaster/che-core-api-account/pom.xml @@ -17,7 +17,7 @@ che-master-parent org.eclipse.che.core - 7.64.0-SNAPSHOT + 7.65.0-SNAPSHOT che-core-api-account Che Core :: API :: Account diff --git a/wsmaster/che-core-api-auth-azure-devops/pom.xml b/wsmaster/che-core-api-auth-azure-devops/pom.xml index 08453a3e8a..dc01ac10b6 100644 --- a/wsmaster/che-core-api-auth-azure-devops/pom.xml +++ b/wsmaster/che-core-api-auth-azure-devops/pom.xml @@ -17,7 +17,7 @@ che-master-parent org.eclipse.che.core - 7.64.0-SNAPSHOT + 7.65.0-SNAPSHOT che-core-api-auth-azure-devops jar diff --git a/wsmaster/che-core-api-auth-bitbucket/pom.xml b/wsmaster/che-core-api-auth-bitbucket/pom.xml index a0ec07fae2..5140b46928 100644 --- a/wsmaster/che-core-api-auth-bitbucket/pom.xml +++ b/wsmaster/che-core-api-auth-bitbucket/pom.xml @@ -17,7 +17,7 @@ che-master-parent org.eclipse.che.core - 7.64.0-SNAPSHOT + 7.65.0-SNAPSHOT che-core-api-auth-bitbucket jar diff --git a/wsmaster/che-core-api-auth-github/pom.xml b/wsmaster/che-core-api-auth-github/pom.xml index 8a2ff694d1..44acb5aaa1 100644 --- a/wsmaster/che-core-api-auth-github/pom.xml +++ b/wsmaster/che-core-api-auth-github/pom.xml @@ -17,7 +17,7 @@ che-master-parent org.eclipse.che.core - 7.64.0-SNAPSHOT + 7.65.0-SNAPSHOT che-core-api-auth-github jar diff --git a/wsmaster/che-core-api-auth-gitlab/pom.xml b/wsmaster/che-core-api-auth-gitlab/pom.xml index 74fe2af7e5..123da5a45c 100644 --- a/wsmaster/che-core-api-auth-gitlab/pom.xml +++ b/wsmaster/che-core-api-auth-gitlab/pom.xml @@ -17,7 +17,7 @@ che-master-parent org.eclipse.che.core - 7.64.0-SNAPSHOT + 7.65.0-SNAPSHOT che-core-api-auth-gitlab jar diff --git a/wsmaster/che-core-api-auth-openshift/pom.xml b/wsmaster/che-core-api-auth-openshift/pom.xml index 4c2c67c52e..c1ff72698a 100644 --- a/wsmaster/che-core-api-auth-openshift/pom.xml +++ b/wsmaster/che-core-api-auth-openshift/pom.xml @@ -17,7 +17,7 @@ che-master-parent org.eclipse.che.core - 7.64.0-SNAPSHOT + 7.65.0-SNAPSHOT che-core-api-auth-openshift jar diff --git a/wsmaster/che-core-api-auth-shared/pom.xml b/wsmaster/che-core-api-auth-shared/pom.xml index 578f840f7b..79ec9f332a 100644 --- a/wsmaster/che-core-api-auth-shared/pom.xml +++ b/wsmaster/che-core-api-auth-shared/pom.xml @@ -17,7 +17,7 @@ che-master-parent org.eclipse.che.core - 7.64.0-SNAPSHOT + 7.65.0-SNAPSHOT che-core-api-auth-shared jar diff --git a/wsmaster/che-core-api-auth/pom.xml b/wsmaster/che-core-api-auth/pom.xml index 016eb1d66c..d94980f8e7 100644 --- a/wsmaster/che-core-api-auth/pom.xml +++ b/wsmaster/che-core-api-auth/pom.xml @@ -17,7 +17,7 @@ che-master-parent org.eclipse.che.core - 7.64.0-SNAPSHOT + 7.65.0-SNAPSHOT che-core-api-auth jar diff --git a/wsmaster/che-core-api-devfile-shared/pom.xml b/wsmaster/che-core-api-devfile-shared/pom.xml index 39b5dd9c5c..8f027161d1 100644 --- a/wsmaster/che-core-api-devfile-shared/pom.xml +++ b/wsmaster/che-core-api-devfile-shared/pom.xml @@ -17,7 +17,7 @@ che-master-parent org.eclipse.che.core - 7.64.0-SNAPSHOT + 7.65.0-SNAPSHOT che-core-api-devfile-shared jar diff --git a/wsmaster/che-core-api-devfile/pom.xml b/wsmaster/che-core-api-devfile/pom.xml index 7288b66844..bc1cbfa7c8 100644 --- a/wsmaster/che-core-api-devfile/pom.xml +++ b/wsmaster/che-core-api-devfile/pom.xml @@ -17,7 +17,7 @@ che-master-parent org.eclipse.che.core - 7.64.0-SNAPSHOT + 7.65.0-SNAPSHOT che-core-api-devfile jar diff --git a/wsmaster/che-core-api-factory-azure-devops/pom.xml b/wsmaster/che-core-api-factory-azure-devops/pom.xml index b4470b73f1..39503f8adf 100644 --- a/wsmaster/che-core-api-factory-azure-devops/pom.xml +++ b/wsmaster/che-core-api-factory-azure-devops/pom.xml @@ -17,7 +17,7 @@ che-master-parent org.eclipse.che.core - 7.64.0-SNAPSHOT + 7.65.0-SNAPSHOT che-core-api-factory-azure-devops jar diff --git a/wsmaster/che-core-api-factory-bitbucket-server/pom.xml b/wsmaster/che-core-api-factory-bitbucket-server/pom.xml index 4e566cf889..b7728e1193 100644 --- a/wsmaster/che-core-api-factory-bitbucket-server/pom.xml +++ b/wsmaster/che-core-api-factory-bitbucket-server/pom.xml @@ -17,7 +17,7 @@ che-master-parent org.eclipse.che.core - 7.64.0-SNAPSHOT + 7.65.0-SNAPSHOT che-core-api-factory-bitbucket-server jar diff --git a/wsmaster/che-core-api-factory-bitbucket/pom.xml b/wsmaster/che-core-api-factory-bitbucket/pom.xml index 113803b49a..4835d085b6 100644 --- a/wsmaster/che-core-api-factory-bitbucket/pom.xml +++ b/wsmaster/che-core-api-factory-bitbucket/pom.xml @@ -17,7 +17,7 @@ che-master-parent org.eclipse.che.core - 7.64.0-SNAPSHOT + 7.65.0-SNAPSHOT che-core-api-factory-bitbucket jar diff --git a/wsmaster/che-core-api-factory-git-ssh/pom.xml b/wsmaster/che-core-api-factory-git-ssh/pom.xml index eaa0046fcb..af96e565a8 100644 --- a/wsmaster/che-core-api-factory-git-ssh/pom.xml +++ b/wsmaster/che-core-api-factory-git-ssh/pom.xml @@ -17,7 +17,7 @@ che-master-parent org.eclipse.che.core - 7.64.0-SNAPSHOT + 7.65.0-SNAPSHOT che-core-api-factory-git-ssh jar diff --git a/wsmaster/che-core-api-factory-github/pom.xml b/wsmaster/che-core-api-factory-github/pom.xml index daeaa2b160..d686aacbd1 100644 --- a/wsmaster/che-core-api-factory-github/pom.xml +++ b/wsmaster/che-core-api-factory-github/pom.xml @@ -17,7 +17,7 @@ che-master-parent org.eclipse.che.core - 7.64.0-SNAPSHOT + 7.65.0-SNAPSHOT che-core-api-factory-github jar diff --git a/wsmaster/che-core-api-factory-gitlab/pom.xml b/wsmaster/che-core-api-factory-gitlab/pom.xml index 82e6993b9f..f052d73b82 100644 --- a/wsmaster/che-core-api-factory-gitlab/pom.xml +++ b/wsmaster/che-core-api-factory-gitlab/pom.xml @@ -17,7 +17,7 @@ che-master-parent org.eclipse.che.core - 7.64.0-SNAPSHOT + 7.65.0-SNAPSHOT che-core-api-factory-gitlab jar diff --git a/wsmaster/che-core-api-factory-shared/pom.xml b/wsmaster/che-core-api-factory-shared/pom.xml index f3d3ebff41..596a0aebc6 100644 --- a/wsmaster/che-core-api-factory-shared/pom.xml +++ b/wsmaster/che-core-api-factory-shared/pom.xml @@ -17,7 +17,7 @@ che-master-parent org.eclipse.che.core - 7.64.0-SNAPSHOT + 7.65.0-SNAPSHOT che-core-api-factory-shared jar diff --git a/wsmaster/che-core-api-factory/pom.xml b/wsmaster/che-core-api-factory/pom.xml index 97ceca9be7..90c971b822 100644 --- a/wsmaster/che-core-api-factory/pom.xml +++ b/wsmaster/che-core-api-factory/pom.xml @@ -17,7 +17,7 @@ che-master-parent org.eclipse.che.core - 7.64.0-SNAPSHOT + 7.65.0-SNAPSHOT che-core-api-factory jar diff --git a/wsmaster/che-core-api-logger-shared/pom.xml b/wsmaster/che-core-api-logger-shared/pom.xml index 56d04d9ac2..4ae2f2dd8c 100644 --- a/wsmaster/che-core-api-logger-shared/pom.xml +++ b/wsmaster/che-core-api-logger-shared/pom.xml @@ -17,7 +17,7 @@ che-master-parent org.eclipse.che.core - 7.64.0-SNAPSHOT + 7.65.0-SNAPSHOT che-core-api-logger-shared jar diff --git a/wsmaster/che-core-api-logger/pom.xml b/wsmaster/che-core-api-logger/pom.xml index 11484f275d..38b452f72b 100644 --- a/wsmaster/che-core-api-logger/pom.xml +++ b/wsmaster/che-core-api-logger/pom.xml @@ -17,7 +17,7 @@ che-master-parent org.eclipse.che.core - 7.64.0-SNAPSHOT + 7.65.0-SNAPSHOT che-core-api-logger jar diff --git a/wsmaster/che-core-api-metrics/pom.xml b/wsmaster/che-core-api-metrics/pom.xml index 6ca2851219..429f4ad782 100644 --- a/wsmaster/che-core-api-metrics/pom.xml +++ b/wsmaster/che-core-api-metrics/pom.xml @@ -17,7 +17,7 @@ che-master-parent org.eclipse.che.core - 7.64.0-SNAPSHOT + 7.65.0-SNAPSHOT che-core-api-metrics jar diff --git a/wsmaster/che-core-api-ssh-shared/pom.xml b/wsmaster/che-core-api-ssh-shared/pom.xml index 9afa82dfc5..1caacadd5e 100644 --- a/wsmaster/che-core-api-ssh-shared/pom.xml +++ b/wsmaster/che-core-api-ssh-shared/pom.xml @@ -17,7 +17,7 @@ che-master-parent org.eclipse.che.core - 7.64.0-SNAPSHOT + 7.65.0-SNAPSHOT che-core-api-ssh-shared jar diff --git a/wsmaster/che-core-api-ssh/pom.xml b/wsmaster/che-core-api-ssh/pom.xml index 1fdc6d9eac..8a3c8aed2f 100644 --- a/wsmaster/che-core-api-ssh/pom.xml +++ b/wsmaster/che-core-api-ssh/pom.xml @@ -17,7 +17,7 @@ che-master-parent org.eclipse.che.core - 7.64.0-SNAPSHOT + 7.65.0-SNAPSHOT che-core-api-ssh jar diff --git a/wsmaster/che-core-api-system-shared/pom.xml b/wsmaster/che-core-api-system-shared/pom.xml index e878d3a2c6..fe8de5de7b 100644 --- a/wsmaster/che-core-api-system-shared/pom.xml +++ b/wsmaster/che-core-api-system-shared/pom.xml @@ -17,7 +17,7 @@ che-master-parent org.eclipse.che.core - 7.64.0-SNAPSHOT + 7.65.0-SNAPSHOT che-core-api-system-shared jar diff --git a/wsmaster/che-core-api-system/pom.xml b/wsmaster/che-core-api-system/pom.xml index 05ad7fede2..b2a6b76962 100644 --- a/wsmaster/che-core-api-system/pom.xml +++ b/wsmaster/che-core-api-system/pom.xml @@ -17,7 +17,7 @@ che-master-parent org.eclipse.che.core - 7.64.0-SNAPSHOT + 7.65.0-SNAPSHOT che-core-api-system jar diff --git a/wsmaster/che-core-api-user-shared/pom.xml b/wsmaster/che-core-api-user-shared/pom.xml index 4f850d7038..6172e29449 100644 --- a/wsmaster/che-core-api-user-shared/pom.xml +++ b/wsmaster/che-core-api-user-shared/pom.xml @@ -17,7 +17,7 @@ che-master-parent org.eclipse.che.core - 7.64.0-SNAPSHOT + 7.65.0-SNAPSHOT che-core-api-user-shared Che Core :: API :: User :: Shared diff --git a/wsmaster/che-core-api-user/pom.xml b/wsmaster/che-core-api-user/pom.xml index 0377eb8ebf..1b9855e3a7 100644 --- a/wsmaster/che-core-api-user/pom.xml +++ b/wsmaster/che-core-api-user/pom.xml @@ -17,7 +17,7 @@ che-master-parent org.eclipse.che.core - 7.64.0-SNAPSHOT + 7.65.0-SNAPSHOT che-core-api-user Che Core :: API :: User diff --git a/wsmaster/che-core-api-workspace-activity/pom.xml b/wsmaster/che-core-api-workspace-activity/pom.xml index c75c1e4845..8094efcc52 100644 --- a/wsmaster/che-core-api-workspace-activity/pom.xml +++ b/wsmaster/che-core-api-workspace-activity/pom.xml @@ -17,7 +17,7 @@ che-master-parent org.eclipse.che.core - 7.64.0-SNAPSHOT + 7.65.0-SNAPSHOT che-core-api-workspace-activity jar diff --git a/wsmaster/che-core-api-workspace-shared/pom.xml b/wsmaster/che-core-api-workspace-shared/pom.xml index e3e3be7d47..a4b6f2d104 100644 --- a/wsmaster/che-core-api-workspace-shared/pom.xml +++ b/wsmaster/che-core-api-workspace-shared/pom.xml @@ -17,7 +17,7 @@ che-master-parent org.eclipse.che.core - 7.64.0-SNAPSHOT + 7.65.0-SNAPSHOT che-core-api-workspace-shared jar diff --git a/wsmaster/che-core-api-workspace/pom.xml b/wsmaster/che-core-api-workspace/pom.xml index e2d5a11f3c..c9178ddfda 100644 --- a/wsmaster/che-core-api-workspace/pom.xml +++ b/wsmaster/che-core-api-workspace/pom.xml @@ -17,7 +17,7 @@ che-master-parent org.eclipse.che.core - 7.64.0-SNAPSHOT + 7.65.0-SNAPSHOT che-core-api-workspace jar diff --git a/wsmaster/che-core-sql-schema/pom.xml b/wsmaster/che-core-sql-schema/pom.xml index baf046ab5a..375e67258a 100644 --- a/wsmaster/che-core-sql-schema/pom.xml +++ b/wsmaster/che-core-sql-schema/pom.xml @@ -17,7 +17,7 @@ che-master-parent org.eclipse.che.core - 7.64.0-SNAPSHOT + 7.65.0-SNAPSHOT che-core-sql-schema Che Core :: SQL :: Schema diff --git a/wsmaster/integration-tests/cascade-removal/pom.xml b/wsmaster/integration-tests/cascade-removal/pom.xml index 7717e44ca2..21c5dbfdb8 100644 --- a/wsmaster/integration-tests/cascade-removal/pom.xml +++ b/wsmaster/integration-tests/cascade-removal/pom.xml @@ -17,7 +17,7 @@ integration-tests-parent org.eclipse.che.core - 7.64.0-SNAPSHOT + 7.65.0-SNAPSHOT cascade-removal Integration Tests :: Cascade Removal diff --git a/wsmaster/integration-tests/mysql-tck/pom.xml b/wsmaster/integration-tests/mysql-tck/pom.xml index e5d29001a2..efb7d5b560 100644 --- a/wsmaster/integration-tests/mysql-tck/pom.xml +++ b/wsmaster/integration-tests/mysql-tck/pom.xml @@ -17,7 +17,7 @@ integration-tests-parent org.eclipse.che.core - 7.64.0-SNAPSHOT + 7.65.0-SNAPSHOT mysql-tck jar diff --git a/wsmaster/integration-tests/pom.xml b/wsmaster/integration-tests/pom.xml index f8b8beb390..b9946d276b 100644 --- a/wsmaster/integration-tests/pom.xml +++ b/wsmaster/integration-tests/pom.xml @@ -17,7 +17,7 @@ che-master-parent org.eclipse.che.core - 7.64.0-SNAPSHOT + 7.65.0-SNAPSHOT ../pom.xml integration-tests-parent diff --git a/wsmaster/integration-tests/postgresql-tck/pom.xml b/wsmaster/integration-tests/postgresql-tck/pom.xml index e94ebc5f77..c30887e37d 100644 --- a/wsmaster/integration-tests/postgresql-tck/pom.xml +++ b/wsmaster/integration-tests/postgresql-tck/pom.xml @@ -17,7 +17,7 @@ integration-tests-parent org.eclipse.che.core - 7.64.0-SNAPSHOT + 7.65.0-SNAPSHOT postgresql-tck jar diff --git a/wsmaster/pom.xml b/wsmaster/pom.xml index 731a5047ac..3d491a8f52 100644 --- a/wsmaster/pom.xml +++ b/wsmaster/pom.xml @@ -17,7 +17,7 @@ che-core-parent org.eclipse.che.core - 7.64.0-SNAPSHOT + 7.65.0-SNAPSHOT ../core/pom.xml che-master-parent From aa41ce0c746cf606578a0440a5c0e83c3fb73d74 Mon Sep 17 00:00:00 2001 From: Igor Vinokur Date: Thu, 20 Apr 2023 10:07:54 +0300 Subject: [PATCH 10/75] Update the `Readme.md` with build and debug instructions (#503) Update the Readme.md with build and debug instructions. --- README.md | 58 ++++++++++++++++++++++++++++++++++++++----------------- 1 file changed, 40 insertions(+), 18 deletions(-) diff --git a/README.md b/README.md index 5b62c47702..a494bc5d28 100644 --- a/README.md +++ b/README.md @@ -1,27 +1,49 @@ # What is Che server -Che Server is a core component of the [Eclipse Che](https://github.com/eclipse/che/). This component is responsible for creation and managing of Che workspaces, but will some day be replaced by the [Dev Workspace Operator](https://github.com/devfile/devworkspace-operator). +Che Server provides an API for managing Kubernetes namespaces, and to retrieve devfile content from repositories, +hosted on GitHub, GitLab, Bitbucket, and Microsoft Azure Repos. # Project structure -Che Server is mostly a Java web application deployed on a Apache Tomcat server in a container. -- ['pom.xml'](https://github.com/eclipse-che/che-server/tree/main/pom.xml) The root Maven module, that lists all dependencies and structure. -- ['assembly'](https://github.com/eclipse-che/che-server/tree/main/assembly) - module for final assemblies of Che web applications -- ['dockerfiles'](https://github.com/eclipse-che/che-server/tree/main/dockerfiles) - directory contains image Dockerfile for Che Server, as well as additional images. -- ['core'](https://github.com/eclipse-che/che-server/tree/main/core) - core and utility modules for Che. -- ['wsmaster'](https://github.com/eclipse-che/che-server/tree/main/wsmaster) - primary modules of the Che Server API. -- ['multiuser'](https://github.com/eclipse-che/che-server/tree/main/multiuser) - modules related to multiuser implementation of Che. -- ['infrastructure'](https://github.com/eclipse-che/che-server/tree/main/infrastructure) - implementations for the underlying infrastructure, on which Che is running (Kubernetes, Openshift, etc.) -- ['deploy'](https://github.com/eclipse-che/che-server/tree/main/deploy) - deployment files for Helm installation. -- ['typescript-dto'](https://github.com/eclipse-che/che-server/tree/main/typescript-dto) module, that provides DTO objects for typescript projects that may depend on Che Server, such as Che Theia. +Che Server is mostly a Java web application deployed on an Apache Tomcat server in a container. Che Server uses the following modules: +### OAuth1 / OAuth2 API implementations +- wsmaster/che-core-api-auth +- wsmaster/che-core-api-azure-devops +- wsmaster/che-core-api-bitbucket +- wsmaster/che-core-api-github +- wsmaster/che-core-api-gitlab +### Factory flow implementations +- wsmaster/che-core-api-factory-azure-devops +- wsmaster/che-core-api-factory-bitbucket +- wsmaster/che-core-api-factory-bitbucket-server +- wsmaster/che-core-api-factory-github +- wsmaster/che-core-api-factory-gitlab +- wsmaster/che-core-api-factory-shared +### Kubernetes namespace provisioning +- infrastructures/kubernetes +- infrastructure/openshift +- infrastructures/infrastructure-factory + +Other modules are deprecated and will be removed in the future. # Build requirements -- Apache Maven 3.6.3 or Higher -- JDK Version 11 +- Apache Maven 3.6.3 or later +- JDK 11 - Podman or Docker (required for running integration tests) -# Build and debug -Run `mvn clean install` to build -Activate a faster profile build by adding `-Pfast` -To debug, run `mvn clean install -X` and connect your IDE to the debug port +# Sources build +Run `mvn clean install` to build. Activate a faster profile build by adding `-Pfast`. + +# Image build and push +1. Go to the `dockerfiles` directory. +2. Run `./build.sh`. +3. Tag the **che-server** image with your account: `docker tag quay.io/eclipse/che-server:next //che-server:next`. +4. Push the **che-server** image to your account: `docker push //che-server:next`. + +# Debug +1. Deploy Che to a [Red Hat OpenShift](https://www.eclipse.org/che/docs/stable/administration-guide/installing-che-on-openshift-using-cli/) or [Minikube](https://www.eclipse.org/che/docs/stable/administration-guide/installing-che-on-minikube/) cluster by using a previously built image: `chectl server:start --platform= --cheimage=//che-server:next`. +2. Enable local debugging of the Eclipse Che server: `chectl server:debug`. +3. In your IDE, create a new Remote JVM Debug configuration on `localhost:8000`. +4. Hit a breakpoint in the code and activate the debug configuration. + # CI There are several [GitHub Actions](https://github.com/eclipse-che/che-server/actions) workflows implemented for this repository: @@ -52,7 +74,7 @@ Downstream builds can be found at the link below, which is _internal to Red Hat_ # Join the community The Eclipse Che community is globally reachable through public chat rooms, mailing list and weekly calls. -See https://www.eclipse.org/che/docs/che-7/overview/introduction-to-eclipse-che/#_joining_the_community +See the Eclipse Che Documentation about [how you can join our community](https://www.eclipse.org/che/docs/stable/overview/introduction-to-eclipse-che/#_joining_the_community). ## Report issues From b333b7bdb98cde4b446ba831505959c73f74cd86 Mon Sep 17 00:00:00 2001 From: Mykhailo Kuznietsov Date: Fri, 21 Apr 2023 01:28:40 +0000 Subject: [PATCH 11/75] chore: Bump to 7.66.0-SNAPSHOT in main Signed-off-by: Mykhailo Kuznietsov --- assembly/assembly-che-tomcat/pom.xml | 2 +- assembly/assembly-main/pom.xml | 2 +- assembly/assembly-root-war/pom.xml | 2 +- assembly/assembly-swagger-war/pom.xml | 2 +- assembly/assembly-wsmaster-war/pom.xml | 2 +- assembly/pom.xml | 2 +- core/che-core-api-core/pom.xml | 2 +- core/che-core-api-dto-maven-plugin/pom.xml | 2 +- core/che-core-api-dto/pom.xml | 2 +- core/che-core-api-model/pom.xml | 2 +- core/che-core-db-vendor-h2/pom.xml | 2 +- core/che-core-db-vendor-mysql/pom.xml | 2 +- core/che-core-db-vendor-postgresql/pom.xml | 2 +- core/che-core-db/pom.xml | 2 +- core/che-core-logback/pom.xml | 2 +- core/che-core-metrics-core/pom.xml | 2 +- core/che-core-tracing-core/pom.xml | 2 +- core/che-core-tracing-metrics/pom.xml | 2 +- core/che-core-tracing-web/pom.xml | 2 +- core/che-core-typescript-dto-maven-plugin/pom.xml | 2 +- core/commons/che-core-commons-annotations/pom.xml | 2 +- core/commons/che-core-commons-inject/pom.xml | 2 +- core/commons/che-core-commons-j2ee/pom.xml | 2 +- core/commons/che-core-commons-json/pom.xml | 2 +- core/commons/che-core-commons-lang/pom.xml | 2 +- core/commons/che-core-commons-observability/pom.xml | 2 +- core/commons/che-core-commons-schedule/pom.xml | 2 +- core/commons/che-core-commons-test/pom.xml | 2 +- core/commons/che-core-commons-tracing/pom.xml | 2 +- core/commons/pom.xml | 2 +- core/pom.xml | 2 +- infrastructures/infrastructure-distributed/pom.xml | 2 +- infrastructures/infrastructure-factory/pom.xml | 2 +- infrastructures/infrastructure-metrics/pom.xml | 2 +- infrastructures/infrastructure-permission/pom.xml | 2 +- infrastructures/kubernetes/pom.xml | 2 +- infrastructures/openshift/pom.xml | 2 +- infrastructures/pom.xml | 2 +- .../api/che-multiuser-api-authentication-commons/pom.xml | 2 +- multiuser/api/che-multiuser-api-authorization-impl/pom.xml | 2 +- multiuser/api/che-multiuser-api-authorization/pom.xml | 2 +- multiuser/api/che-multiuser-api-organization-shared/pom.xml | 2 +- multiuser/api/che-multiuser-api-organization/pom.xml | 2 +- multiuser/api/che-multiuser-api-permission-shared/pom.xml | 2 +- multiuser/api/che-multiuser-api-permission/pom.xml | 2 +- multiuser/api/che-multiuser-api-resource-shared/pom.xml | 2 +- multiuser/api/che-multiuser-api-resource/pom.xml | 2 +- multiuser/api/che-multiuser-api-workspace-activity/pom.xml | 2 +- multiuser/api/pom.xml | 2 +- .../integration-tests/che-multiuser-cascade-removal/pom.xml | 2 +- multiuser/integration-tests/che-multiuser-mysql-tck/pom.xml | 2 +- .../integration-tests/che-multiuser-postgresql-tck/pom.xml | 2 +- multiuser/integration-tests/pom.xml | 2 +- multiuser/keycloak/che-multiuser-keycloak-server/pom.xml | 2 +- multiuser/keycloak/che-multiuser-keycloak-shared/pom.xml | 2 +- .../keycloak/che-multiuser-keycloak-token-provider/pom.xml | 2 +- .../keycloak/che-multiuser-keycloak-user-remover/pom.xml | 2 +- multiuser/keycloak/pom.xml | 2 +- .../che-multiuser-machine-authentication-shared/pom.xml | 2 +- .../machine-auth/che-multiuser-machine-authentication/pom.xml | 2 +- multiuser/machine-auth/pom.xml | 2 +- multiuser/oidc/pom.xml | 2 +- multiuser/permission/che-multiuser-permission-devfile/pom.xml | 2 +- multiuser/permission/che-multiuser-permission-logger/pom.xml | 2 +- .../permission/che-multiuser-permission-resource/pom.xml | 2 +- multiuser/permission/che-multiuser-permission-system/pom.xml | 2 +- multiuser/permission/che-multiuser-permission-user/pom.xml | 2 +- .../che-multiuser-permission-workspace-activity/pom.xml | 2 +- .../permission/che-multiuser-permission-workspace/pom.xml | 2 +- multiuser/permission/pom.xml | 2 +- multiuser/personal-account/pom.xml | 2 +- multiuser/pom.xml | 2 +- multiuser/sql-schema/pom.xml | 2 +- pom.xml | 4 ++-- typescript-dto/dto-pom.xml | 2 +- wsmaster/che-core-api-account/pom.xml | 2 +- wsmaster/che-core-api-auth-azure-devops/pom.xml | 2 +- wsmaster/che-core-api-auth-bitbucket/pom.xml | 2 +- wsmaster/che-core-api-auth-github/pom.xml | 2 +- wsmaster/che-core-api-auth-gitlab/pom.xml | 2 +- wsmaster/che-core-api-auth-openshift/pom.xml | 2 +- wsmaster/che-core-api-auth-shared/pom.xml | 2 +- wsmaster/che-core-api-auth/pom.xml | 2 +- wsmaster/che-core-api-devfile-shared/pom.xml | 2 +- wsmaster/che-core-api-devfile/pom.xml | 2 +- wsmaster/che-core-api-factory-azure-devops/pom.xml | 2 +- wsmaster/che-core-api-factory-bitbucket-server/pom.xml | 2 +- wsmaster/che-core-api-factory-bitbucket/pom.xml | 2 +- wsmaster/che-core-api-factory-git-ssh/pom.xml | 2 +- wsmaster/che-core-api-factory-github/pom.xml | 2 +- wsmaster/che-core-api-factory-gitlab/pom.xml | 2 +- wsmaster/che-core-api-factory-shared/pom.xml | 2 +- wsmaster/che-core-api-factory/pom.xml | 2 +- wsmaster/che-core-api-logger-shared/pom.xml | 2 +- wsmaster/che-core-api-logger/pom.xml | 2 +- wsmaster/che-core-api-metrics/pom.xml | 2 +- wsmaster/che-core-api-ssh-shared/pom.xml | 2 +- wsmaster/che-core-api-ssh/pom.xml | 2 +- wsmaster/che-core-api-system-shared/pom.xml | 2 +- wsmaster/che-core-api-system/pom.xml | 2 +- wsmaster/che-core-api-user-shared/pom.xml | 2 +- wsmaster/che-core-api-user/pom.xml | 2 +- wsmaster/che-core-api-workspace-activity/pom.xml | 2 +- wsmaster/che-core-api-workspace-shared/pom.xml | 2 +- wsmaster/che-core-api-workspace/pom.xml | 2 +- wsmaster/che-core-sql-schema/pom.xml | 2 +- wsmaster/integration-tests/cascade-removal/pom.xml | 2 +- wsmaster/integration-tests/mysql-tck/pom.xml | 2 +- wsmaster/integration-tests/pom.xml | 2 +- wsmaster/integration-tests/postgresql-tck/pom.xml | 2 +- wsmaster/pom.xml | 2 +- 111 files changed, 112 insertions(+), 112 deletions(-) diff --git a/assembly/assembly-che-tomcat/pom.xml b/assembly/assembly-che-tomcat/pom.xml index 0d4cd29ba8..4303330841 100644 --- a/assembly/assembly-che-tomcat/pom.xml +++ b/assembly/assembly-che-tomcat/pom.xml @@ -17,7 +17,7 @@ che-assembly-parent org.eclipse.che - 7.65.0-SNAPSHOT + 7.66.0-SNAPSHOT assembly-che-tomcat jar diff --git a/assembly/assembly-main/pom.xml b/assembly/assembly-main/pom.xml index 50fc5efcde..529271a800 100644 --- a/assembly/assembly-main/pom.xml +++ b/assembly/assembly-main/pom.xml @@ -17,7 +17,7 @@ che-assembly-parent org.eclipse.che - 7.65.0-SNAPSHOT + 7.66.0-SNAPSHOT assembly-main pom diff --git a/assembly/assembly-root-war/pom.xml b/assembly/assembly-root-war/pom.xml index 2643d1353c..0da1e98e4f 100644 --- a/assembly/assembly-root-war/pom.xml +++ b/assembly/assembly-root-war/pom.xml @@ -17,7 +17,7 @@ che-assembly-parent org.eclipse.che - 7.65.0-SNAPSHOT + 7.66.0-SNAPSHOT assembly-root-war war diff --git a/assembly/assembly-swagger-war/pom.xml b/assembly/assembly-swagger-war/pom.xml index 7e421e25cd..1e342a91da 100644 --- a/assembly/assembly-swagger-war/pom.xml +++ b/assembly/assembly-swagger-war/pom.xml @@ -17,7 +17,7 @@ che-assembly-parent org.eclipse.che - 7.65.0-SNAPSHOT + 7.66.0-SNAPSHOT assembly-swagger-war war diff --git a/assembly/assembly-wsmaster-war/pom.xml b/assembly/assembly-wsmaster-war/pom.xml index d8471bc737..4a26690f70 100644 --- a/assembly/assembly-wsmaster-war/pom.xml +++ b/assembly/assembly-wsmaster-war/pom.xml @@ -17,7 +17,7 @@ che-assembly-parent org.eclipse.che - 7.65.0-SNAPSHOT + 7.66.0-SNAPSHOT assembly-wsmaster-war war diff --git a/assembly/pom.xml b/assembly/pom.xml index 3b031c453f..dd06ef1a77 100644 --- a/assembly/pom.xml +++ b/assembly/pom.xml @@ -17,7 +17,7 @@ che-server org.eclipse.che - 7.65.0-SNAPSHOT + 7.66.0-SNAPSHOT ../pom.xml che-assembly-parent diff --git a/core/che-core-api-core/pom.xml b/core/che-core-api-core/pom.xml index 28d7c8f7bb..be765d1348 100644 --- a/core/che-core-api-core/pom.xml +++ b/core/che-core-api-core/pom.xml @@ -17,7 +17,7 @@ che-core-parent org.eclipse.che.core - 7.65.0-SNAPSHOT + 7.66.0-SNAPSHOT che-core-api-core jar diff --git a/core/che-core-api-dto-maven-plugin/pom.xml b/core/che-core-api-dto-maven-plugin/pom.xml index 97291b31c8..36cc4ea41e 100644 --- a/core/che-core-api-dto-maven-plugin/pom.xml +++ b/core/che-core-api-dto-maven-plugin/pom.xml @@ -17,7 +17,7 @@ che-core-parent org.eclipse.che.core - 7.65.0-SNAPSHOT + 7.66.0-SNAPSHOT che-core-api-dto-maven-plugin maven-plugin diff --git a/core/che-core-api-dto/pom.xml b/core/che-core-api-dto/pom.xml index 681a5dfdd0..9d3db0d38a 100644 --- a/core/che-core-api-dto/pom.xml +++ b/core/che-core-api-dto/pom.xml @@ -17,7 +17,7 @@ che-core-parent org.eclipse.che.core - 7.65.0-SNAPSHOT + 7.66.0-SNAPSHOT che-core-api-dto jar diff --git a/core/che-core-api-model/pom.xml b/core/che-core-api-model/pom.xml index e6c50def25..99df7a9064 100644 --- a/core/che-core-api-model/pom.xml +++ b/core/che-core-api-model/pom.xml @@ -17,7 +17,7 @@ che-core-parent org.eclipse.che.core - 7.65.0-SNAPSHOT + 7.66.0-SNAPSHOT che-core-api-model jar diff --git a/core/che-core-db-vendor-h2/pom.xml b/core/che-core-db-vendor-h2/pom.xml index 9250aeb211..c610acc299 100644 --- a/core/che-core-db-vendor-h2/pom.xml +++ b/core/che-core-db-vendor-h2/pom.xml @@ -17,7 +17,7 @@ che-core-parent org.eclipse.che.core - 7.65.0-SNAPSHOT + 7.66.0-SNAPSHOT che-core-db-vendor-h2 Che Core :: Commons :: DB :: Vendor H2 diff --git a/core/che-core-db-vendor-mysql/pom.xml b/core/che-core-db-vendor-mysql/pom.xml index 7c10f477f2..fab2b18c9f 100644 --- a/core/che-core-db-vendor-mysql/pom.xml +++ b/core/che-core-db-vendor-mysql/pom.xml @@ -17,7 +17,7 @@ che-core-parent org.eclipse.che.core - 7.65.0-SNAPSHOT + 7.66.0-SNAPSHOT che-core-db-vendor-mysql Che Core :: Commons :: DB :: Vendor MySQL diff --git a/core/che-core-db-vendor-postgresql/pom.xml b/core/che-core-db-vendor-postgresql/pom.xml index e3f4cdd82a..3b859e9c04 100644 --- a/core/che-core-db-vendor-postgresql/pom.xml +++ b/core/che-core-db-vendor-postgresql/pom.xml @@ -17,7 +17,7 @@ che-core-parent org.eclipse.che.core - 7.65.0-SNAPSHOT + 7.66.0-SNAPSHOT che-core-db-vendor-postgresql Che Core :: Commons :: DB :: Vendor PostgreSQL diff --git a/core/che-core-db/pom.xml b/core/che-core-db/pom.xml index 7fe24c71c7..e929840135 100644 --- a/core/che-core-db/pom.xml +++ b/core/che-core-db/pom.xml @@ -17,7 +17,7 @@ che-core-parent org.eclipse.che.core - 7.65.0-SNAPSHOT + 7.66.0-SNAPSHOT che-core-db Che Core :: Commons :: DB diff --git a/core/che-core-logback/pom.xml b/core/che-core-logback/pom.xml index 588379ceaf..a7feb615f6 100644 --- a/core/che-core-logback/pom.xml +++ b/core/che-core-logback/pom.xml @@ -17,7 +17,7 @@ che-core-parent org.eclipse.che.core - 7.65.0-SNAPSHOT + 7.66.0-SNAPSHOT che-core-logback jar diff --git a/core/che-core-metrics-core/pom.xml b/core/che-core-metrics-core/pom.xml index b9ffba4187..0db09c0f19 100644 --- a/core/che-core-metrics-core/pom.xml +++ b/core/che-core-metrics-core/pom.xml @@ -17,7 +17,7 @@ che-core-parent org.eclipse.che.core - 7.65.0-SNAPSHOT + 7.66.0-SNAPSHOT che-core-metrics-core Che Core :: Commons :: Metrics :: Core diff --git a/core/che-core-tracing-core/pom.xml b/core/che-core-tracing-core/pom.xml index 6feb954444..fb4690596a 100644 --- a/core/che-core-tracing-core/pom.xml +++ b/core/che-core-tracing-core/pom.xml @@ -17,7 +17,7 @@ che-core-parent org.eclipse.che.core - 7.65.0-SNAPSHOT + 7.66.0-SNAPSHOT che-core-tracing-core Che Core :: Commons :: Tracing :: Core diff --git a/core/che-core-tracing-metrics/pom.xml b/core/che-core-tracing-metrics/pom.xml index afd5b796ad..c112c6fb6a 100644 --- a/core/che-core-tracing-metrics/pom.xml +++ b/core/che-core-tracing-metrics/pom.xml @@ -17,7 +17,7 @@ che-core-parent org.eclipse.che.core - 7.65.0-SNAPSHOT + 7.66.0-SNAPSHOT che-core-tracing-metrics Che Core :: Commons :: Tracing :: Metrics diff --git a/core/che-core-tracing-web/pom.xml b/core/che-core-tracing-web/pom.xml index 15030b66e5..f35d1c8f92 100644 --- a/core/che-core-tracing-web/pom.xml +++ b/core/che-core-tracing-web/pom.xml @@ -17,7 +17,7 @@ che-core-parent org.eclipse.che.core - 7.65.0-SNAPSHOT + 7.66.0-SNAPSHOT che-core-tracing-web Che Core :: Commons :: Tracing :: Web diff --git a/core/che-core-typescript-dto-maven-plugin/pom.xml b/core/che-core-typescript-dto-maven-plugin/pom.xml index 15c71ae71e..bff459aedf 100644 --- a/core/che-core-typescript-dto-maven-plugin/pom.xml +++ b/core/che-core-typescript-dto-maven-plugin/pom.xml @@ -17,7 +17,7 @@ che-core-parent org.eclipse.che.core - 7.65.0-SNAPSHOT + 7.66.0-SNAPSHOT che-core-typescript-dto-maven-plugin maven-plugin diff --git a/core/commons/che-core-commons-annotations/pom.xml b/core/commons/che-core-commons-annotations/pom.xml index c64de6976c..13f1ee4ae7 100644 --- a/core/commons/che-core-commons-annotations/pom.xml +++ b/core/commons/che-core-commons-annotations/pom.xml @@ -17,7 +17,7 @@ che-core-commons-parent org.eclipse.che.core - 7.65.0-SNAPSHOT + 7.66.0-SNAPSHOT che-core-commons-annotations jar diff --git a/core/commons/che-core-commons-inject/pom.xml b/core/commons/che-core-commons-inject/pom.xml index 9e607f3f29..1b89b6fddd 100644 --- a/core/commons/che-core-commons-inject/pom.xml +++ b/core/commons/che-core-commons-inject/pom.xml @@ -17,7 +17,7 @@ che-core-commons-parent org.eclipse.che.core - 7.65.0-SNAPSHOT + 7.66.0-SNAPSHOT che-core-commons-inject jar diff --git a/core/commons/che-core-commons-j2ee/pom.xml b/core/commons/che-core-commons-j2ee/pom.xml index 6c5436322c..071c7992b1 100644 --- a/core/commons/che-core-commons-j2ee/pom.xml +++ b/core/commons/che-core-commons-j2ee/pom.xml @@ -17,7 +17,7 @@ che-core-commons-parent org.eclipse.che.core - 7.65.0-SNAPSHOT + 7.66.0-SNAPSHOT che-core-commons-j2ee jar diff --git a/core/commons/che-core-commons-json/pom.xml b/core/commons/che-core-commons-json/pom.xml index 5f2fa72196..0373fd81d1 100644 --- a/core/commons/che-core-commons-json/pom.xml +++ b/core/commons/che-core-commons-json/pom.xml @@ -17,7 +17,7 @@ che-core-commons-parent org.eclipse.che.core - 7.65.0-SNAPSHOT + 7.66.0-SNAPSHOT che-core-commons-json jar diff --git a/core/commons/che-core-commons-lang/pom.xml b/core/commons/che-core-commons-lang/pom.xml index 685f7505b0..1adeafadd6 100644 --- a/core/commons/che-core-commons-lang/pom.xml +++ b/core/commons/che-core-commons-lang/pom.xml @@ -17,7 +17,7 @@ che-core-commons-parent org.eclipse.che.core - 7.65.0-SNAPSHOT + 7.66.0-SNAPSHOT che-core-commons-lang jar diff --git a/core/commons/che-core-commons-observability/pom.xml b/core/commons/che-core-commons-observability/pom.xml index 492539a82c..1cbb950bd7 100644 --- a/core/commons/che-core-commons-observability/pom.xml +++ b/core/commons/che-core-commons-observability/pom.xml @@ -17,7 +17,7 @@ che-core-commons-parent org.eclipse.che.core - 7.65.0-SNAPSHOT + 7.66.0-SNAPSHOT che-core-commons-observability Che Core :: Commons :: Tracing and Monitoring wrapper diff --git a/core/commons/che-core-commons-schedule/pom.xml b/core/commons/che-core-commons-schedule/pom.xml index b9cad0a562..84c2b480eb 100644 --- a/core/commons/che-core-commons-schedule/pom.xml +++ b/core/commons/che-core-commons-schedule/pom.xml @@ -17,7 +17,7 @@ che-core-commons-parent org.eclipse.che.core - 7.65.0-SNAPSHOT + 7.66.0-SNAPSHOT che-core-commons-schedule jar diff --git a/core/commons/che-core-commons-test/pom.xml b/core/commons/che-core-commons-test/pom.xml index ecc177b5bd..928f11e913 100644 --- a/core/commons/che-core-commons-test/pom.xml +++ b/core/commons/che-core-commons-test/pom.xml @@ -17,7 +17,7 @@ che-core-commons-parent org.eclipse.che.core - 7.65.0-SNAPSHOT + 7.66.0-SNAPSHOT che-core-commons-test jar diff --git a/core/commons/che-core-commons-tracing/pom.xml b/core/commons/che-core-commons-tracing/pom.xml index 14f10c4801..2a3969438e 100644 --- a/core/commons/che-core-commons-tracing/pom.xml +++ b/core/commons/che-core-commons-tracing/pom.xml @@ -17,7 +17,7 @@ che-core-commons-parent org.eclipse.che.core - 7.65.0-SNAPSHOT + 7.66.0-SNAPSHOT che-core-commons-tracing Che Core :: Commons :: Tracing diff --git a/core/commons/pom.xml b/core/commons/pom.xml index 5f824af8f1..75a65436f3 100644 --- a/core/commons/pom.xml +++ b/core/commons/pom.xml @@ -17,7 +17,7 @@ che-core-parent org.eclipse.che.core - 7.65.0-SNAPSHOT + 7.66.0-SNAPSHOT ../pom.xml che-core-commons-parent diff --git a/core/pom.xml b/core/pom.xml index b30766b756..85ad5cb420 100644 --- a/core/pom.xml +++ b/core/pom.xml @@ -17,7 +17,7 @@ che-server org.eclipse.che - 7.65.0-SNAPSHOT + 7.66.0-SNAPSHOT ../pom.xml org.eclipse.che.core diff --git a/infrastructures/infrastructure-distributed/pom.xml b/infrastructures/infrastructure-distributed/pom.xml index b40a10912f..6eef5cfb1a 100644 --- a/infrastructures/infrastructure-distributed/pom.xml +++ b/infrastructures/infrastructure-distributed/pom.xml @@ -17,7 +17,7 @@ che-infrastructures-parent org.eclipse.che.infrastructure - 7.65.0-SNAPSHOT + 7.66.0-SNAPSHOT infrastructure-distributed jar diff --git a/infrastructures/infrastructure-factory/pom.xml b/infrastructures/infrastructure-factory/pom.xml index 05589b058a..4421fdbda9 100644 --- a/infrastructures/infrastructure-factory/pom.xml +++ b/infrastructures/infrastructure-factory/pom.xml @@ -17,7 +17,7 @@ che-infrastructures-parent org.eclipse.che.infrastructure - 7.65.0-SNAPSHOT + 7.66.0-SNAPSHOT infrastructure-factory jar diff --git a/infrastructures/infrastructure-metrics/pom.xml b/infrastructures/infrastructure-metrics/pom.xml index 1b4a897828..65ccfac9f4 100644 --- a/infrastructures/infrastructure-metrics/pom.xml +++ b/infrastructures/infrastructure-metrics/pom.xml @@ -17,7 +17,7 @@ che-infrastructures-parent org.eclipse.che.infrastructure - 7.65.0-SNAPSHOT + 7.66.0-SNAPSHOT ../pom.xml infrastructure-metrics diff --git a/infrastructures/infrastructure-permission/pom.xml b/infrastructures/infrastructure-permission/pom.xml index eaa4660e4e..018b68a21d 100644 --- a/infrastructures/infrastructure-permission/pom.xml +++ b/infrastructures/infrastructure-permission/pom.xml @@ -17,7 +17,7 @@ che-infrastructures-parent org.eclipse.che.infrastructure - 7.65.0-SNAPSHOT + 7.66.0-SNAPSHOT infrastructure-permission Infrastructure :: Kubernetes Permissions diff --git a/infrastructures/kubernetes/pom.xml b/infrastructures/kubernetes/pom.xml index 155bac6288..b2eb38ed2a 100644 --- a/infrastructures/kubernetes/pom.xml +++ b/infrastructures/kubernetes/pom.xml @@ -17,7 +17,7 @@ che-infrastructures-parent org.eclipse.che.infrastructure - 7.65.0-SNAPSHOT + 7.66.0-SNAPSHOT infrastructure-kubernetes Infrastructure :: Kubernetes diff --git a/infrastructures/openshift/pom.xml b/infrastructures/openshift/pom.xml index ac502dcbbb..5658e50708 100644 --- a/infrastructures/openshift/pom.xml +++ b/infrastructures/openshift/pom.xml @@ -17,7 +17,7 @@ che-infrastructures-parent org.eclipse.che.infrastructure - 7.65.0-SNAPSHOT + 7.66.0-SNAPSHOT infrastructure-openshift Infrastructure :: OpenShift diff --git a/infrastructures/pom.xml b/infrastructures/pom.xml index 477c96c5d2..213a6d8610 100644 --- a/infrastructures/pom.xml +++ b/infrastructures/pom.xml @@ -17,7 +17,7 @@ che-server org.eclipse.che - 7.65.0-SNAPSHOT + 7.66.0-SNAPSHOT ../pom.xml org.eclipse.che.infrastructure diff --git a/multiuser/api/che-multiuser-api-authentication-commons/pom.xml b/multiuser/api/che-multiuser-api-authentication-commons/pom.xml index e87f1c1359..ed41d36f6d 100644 --- a/multiuser/api/che-multiuser-api-authentication-commons/pom.xml +++ b/multiuser/api/che-multiuser-api-authentication-commons/pom.xml @@ -17,7 +17,7 @@ che-multiuser-api org.eclipse.che.multiuser - 7.65.0-SNAPSHOT + 7.66.0-SNAPSHOT che-multiuser-api-authentication-commons jar diff --git a/multiuser/api/che-multiuser-api-authorization-impl/pom.xml b/multiuser/api/che-multiuser-api-authorization-impl/pom.xml index 42ca5174c4..cc7bcd3b54 100644 --- a/multiuser/api/che-multiuser-api-authorization-impl/pom.xml +++ b/multiuser/api/che-multiuser-api-authorization-impl/pom.xml @@ -17,7 +17,7 @@ che-multiuser-api org.eclipse.che.multiuser - 7.65.0-SNAPSHOT + 7.66.0-SNAPSHOT che-multiuser-api-authorization-impl jar diff --git a/multiuser/api/che-multiuser-api-authorization/pom.xml b/multiuser/api/che-multiuser-api-authorization/pom.xml index 1fa53da776..c409afad3e 100644 --- a/multiuser/api/che-multiuser-api-authorization/pom.xml +++ b/multiuser/api/che-multiuser-api-authorization/pom.xml @@ -17,7 +17,7 @@ che-multiuser-api org.eclipse.che.multiuser - 7.65.0-SNAPSHOT + 7.66.0-SNAPSHOT che-multiuser-api-authorization jar diff --git a/multiuser/api/che-multiuser-api-organization-shared/pom.xml b/multiuser/api/che-multiuser-api-organization-shared/pom.xml index a9e5e091ce..6c96c2ed8c 100644 --- a/multiuser/api/che-multiuser-api-organization-shared/pom.xml +++ b/multiuser/api/che-multiuser-api-organization-shared/pom.xml @@ -17,7 +17,7 @@ che-multiuser-api org.eclipse.che.multiuser - 7.65.0-SNAPSHOT + 7.66.0-SNAPSHOT che-multiuser-api-organization-shared jar diff --git a/multiuser/api/che-multiuser-api-organization/pom.xml b/multiuser/api/che-multiuser-api-organization/pom.xml index 441e4fbe32..6752d40ccb 100644 --- a/multiuser/api/che-multiuser-api-organization/pom.xml +++ b/multiuser/api/che-multiuser-api-organization/pom.xml @@ -17,7 +17,7 @@ che-multiuser-api org.eclipse.che.multiuser - 7.65.0-SNAPSHOT + 7.66.0-SNAPSHOT che-multiuser-api-organization jar diff --git a/multiuser/api/che-multiuser-api-permission-shared/pom.xml b/multiuser/api/che-multiuser-api-permission-shared/pom.xml index 82544d471b..fa0b3036d9 100644 --- a/multiuser/api/che-multiuser-api-permission-shared/pom.xml +++ b/multiuser/api/che-multiuser-api-permission-shared/pom.xml @@ -17,7 +17,7 @@ che-multiuser-api org.eclipse.che.multiuser - 7.65.0-SNAPSHOT + 7.66.0-SNAPSHOT che-multiuser-api-permission-shared jar diff --git a/multiuser/api/che-multiuser-api-permission/pom.xml b/multiuser/api/che-multiuser-api-permission/pom.xml index e2965d58e3..669902914b 100644 --- a/multiuser/api/che-multiuser-api-permission/pom.xml +++ b/multiuser/api/che-multiuser-api-permission/pom.xml @@ -17,7 +17,7 @@ che-multiuser-api org.eclipse.che.multiuser - 7.65.0-SNAPSHOT + 7.66.0-SNAPSHOT che-multiuser-api-permission jar diff --git a/multiuser/api/che-multiuser-api-resource-shared/pom.xml b/multiuser/api/che-multiuser-api-resource-shared/pom.xml index 6f8521c017..dfd89b45bb 100644 --- a/multiuser/api/che-multiuser-api-resource-shared/pom.xml +++ b/multiuser/api/che-multiuser-api-resource-shared/pom.xml @@ -17,7 +17,7 @@ che-multiuser-api org.eclipse.che.multiuser - 7.65.0-SNAPSHOT + 7.66.0-SNAPSHOT che-multiuser-api-resource-shared jar diff --git a/multiuser/api/che-multiuser-api-resource/pom.xml b/multiuser/api/che-multiuser-api-resource/pom.xml index bbb386bbce..8d52891b10 100644 --- a/multiuser/api/che-multiuser-api-resource/pom.xml +++ b/multiuser/api/che-multiuser-api-resource/pom.xml @@ -17,7 +17,7 @@ che-multiuser-api org.eclipse.che.multiuser - 7.65.0-SNAPSHOT + 7.66.0-SNAPSHOT che-multiuser-api-resource jar diff --git a/multiuser/api/che-multiuser-api-workspace-activity/pom.xml b/multiuser/api/che-multiuser-api-workspace-activity/pom.xml index 7ac41495e2..fd4fe00011 100644 --- a/multiuser/api/che-multiuser-api-workspace-activity/pom.xml +++ b/multiuser/api/che-multiuser-api-workspace-activity/pom.xml @@ -17,7 +17,7 @@ che-multiuser-api org.eclipse.che.multiuser - 7.65.0-SNAPSHOT + 7.66.0-SNAPSHOT che-multiuser-api-workspace-activity jar diff --git a/multiuser/api/pom.xml b/multiuser/api/pom.xml index ad0d423385..925dba50e2 100644 --- a/multiuser/api/pom.xml +++ b/multiuser/api/pom.xml @@ -17,7 +17,7 @@ che-multiuser-parent org.eclipse.che.multiuser - 7.65.0-SNAPSHOT + 7.66.0-SNAPSHOT ../pom.xml che-multiuser-api diff --git a/multiuser/integration-tests/che-multiuser-cascade-removal/pom.xml b/multiuser/integration-tests/che-multiuser-cascade-removal/pom.xml index 7d07718a11..0868bd5f46 100644 --- a/multiuser/integration-tests/che-multiuser-cascade-removal/pom.xml +++ b/multiuser/integration-tests/che-multiuser-cascade-removal/pom.xml @@ -17,7 +17,7 @@ che-multiuser-integration-tests org.eclipse.che.multiuser - 7.65.0-SNAPSHOT + 7.66.0-SNAPSHOT che-multiuser-cascade-removal jar diff --git a/multiuser/integration-tests/che-multiuser-mysql-tck/pom.xml b/multiuser/integration-tests/che-multiuser-mysql-tck/pom.xml index 5d2ccd3216..9aada3ac9c 100644 --- a/multiuser/integration-tests/che-multiuser-mysql-tck/pom.xml +++ b/multiuser/integration-tests/che-multiuser-mysql-tck/pom.xml @@ -17,7 +17,7 @@ che-multiuser-integration-tests org.eclipse.che.multiuser - 7.65.0-SNAPSHOT + 7.66.0-SNAPSHOT che-multiuser-mysql-tck jar diff --git a/multiuser/integration-tests/che-multiuser-postgresql-tck/pom.xml b/multiuser/integration-tests/che-multiuser-postgresql-tck/pom.xml index 2893e2524e..a128166e42 100644 --- a/multiuser/integration-tests/che-multiuser-postgresql-tck/pom.xml +++ b/multiuser/integration-tests/che-multiuser-postgresql-tck/pom.xml @@ -17,7 +17,7 @@ che-multiuser-integration-tests org.eclipse.che.multiuser - 7.65.0-SNAPSHOT + 7.66.0-SNAPSHOT che-multiuser-postgresql-tck jar diff --git a/multiuser/integration-tests/pom.xml b/multiuser/integration-tests/pom.xml index 0a7a47789e..98f16c51a8 100644 --- a/multiuser/integration-tests/pom.xml +++ b/multiuser/integration-tests/pom.xml @@ -17,7 +17,7 @@ che-multiuser-parent org.eclipse.che.multiuser - 7.65.0-SNAPSHOT + 7.66.0-SNAPSHOT che-multiuser-integration-tests pom diff --git a/multiuser/keycloak/che-multiuser-keycloak-server/pom.xml b/multiuser/keycloak/che-multiuser-keycloak-server/pom.xml index e6bf4b34de..845ba3b345 100644 --- a/multiuser/keycloak/che-multiuser-keycloak-server/pom.xml +++ b/multiuser/keycloak/che-multiuser-keycloak-server/pom.xml @@ -17,7 +17,7 @@ che-multiuser-keycloak org.eclipse.che.multiuser - 7.65.0-SNAPSHOT + 7.66.0-SNAPSHOT che-multiuser-keycloak-server jar diff --git a/multiuser/keycloak/che-multiuser-keycloak-shared/pom.xml b/multiuser/keycloak/che-multiuser-keycloak-shared/pom.xml index c05a86a0da..e630944923 100644 --- a/multiuser/keycloak/che-multiuser-keycloak-shared/pom.xml +++ b/multiuser/keycloak/che-multiuser-keycloak-shared/pom.xml @@ -17,7 +17,7 @@ che-multiuser-keycloak org.eclipse.che.multiuser - 7.65.0-SNAPSHOT + 7.66.0-SNAPSHOT che-multiuser-keycloak-shared jar diff --git a/multiuser/keycloak/che-multiuser-keycloak-token-provider/pom.xml b/multiuser/keycloak/che-multiuser-keycloak-token-provider/pom.xml index d22fad6e9c..417770ab0b 100644 --- a/multiuser/keycloak/che-multiuser-keycloak-token-provider/pom.xml +++ b/multiuser/keycloak/che-multiuser-keycloak-token-provider/pom.xml @@ -17,7 +17,7 @@ che-multiuser-keycloak org.eclipse.che.multiuser - 7.65.0-SNAPSHOT + 7.66.0-SNAPSHOT che-multiuser-keycloak-token-provider Che Multiuser :: Keycloak Token Provider diff --git a/multiuser/keycloak/che-multiuser-keycloak-user-remover/pom.xml b/multiuser/keycloak/che-multiuser-keycloak-user-remover/pom.xml index b902800285..8d69d00118 100644 --- a/multiuser/keycloak/che-multiuser-keycloak-user-remover/pom.xml +++ b/multiuser/keycloak/che-multiuser-keycloak-user-remover/pom.xml @@ -17,7 +17,7 @@ che-multiuser-keycloak org.eclipse.che.multiuser - 7.65.0-SNAPSHOT + 7.66.0-SNAPSHOT che-multiuser-keycloak-user-remover jar diff --git a/multiuser/keycloak/pom.xml b/multiuser/keycloak/pom.xml index 291af23013..5cf2262cc6 100644 --- a/multiuser/keycloak/pom.xml +++ b/multiuser/keycloak/pom.xml @@ -17,7 +17,7 @@ che-multiuser-parent org.eclipse.che.multiuser - 7.65.0-SNAPSHOT + 7.66.0-SNAPSHOT ../pom.xml che-multiuser-keycloak diff --git a/multiuser/machine-auth/che-multiuser-machine-authentication-shared/pom.xml b/multiuser/machine-auth/che-multiuser-machine-authentication-shared/pom.xml index 8d6f88a5ff..00943b4eda 100644 --- a/multiuser/machine-auth/che-multiuser-machine-authentication-shared/pom.xml +++ b/multiuser/machine-auth/che-multiuser-machine-authentication-shared/pom.xml @@ -17,7 +17,7 @@ che-multiuser-machine-auth org.eclipse.che.multiuser - 7.65.0-SNAPSHOT + 7.66.0-SNAPSHOT che-multiuser-machine-authentication-shared jar diff --git a/multiuser/machine-auth/che-multiuser-machine-authentication/pom.xml b/multiuser/machine-auth/che-multiuser-machine-authentication/pom.xml index 10be4b1341..5071118962 100644 --- a/multiuser/machine-auth/che-multiuser-machine-authentication/pom.xml +++ b/multiuser/machine-auth/che-multiuser-machine-authentication/pom.xml @@ -17,7 +17,7 @@ che-multiuser-machine-auth org.eclipse.che.multiuser - 7.65.0-SNAPSHOT + 7.66.0-SNAPSHOT che-multiuser-machine-authentication jar diff --git a/multiuser/machine-auth/pom.xml b/multiuser/machine-auth/pom.xml index 01a3a7790c..2fdba29468 100644 --- a/multiuser/machine-auth/pom.xml +++ b/multiuser/machine-auth/pom.xml @@ -17,7 +17,7 @@ che-multiuser-parent org.eclipse.che.multiuser - 7.65.0-SNAPSHOT + 7.66.0-SNAPSHOT ../pom.xml che-multiuser-machine-auth diff --git a/multiuser/oidc/pom.xml b/multiuser/oidc/pom.xml index 97963dfe3d..8e921ae0a0 100644 --- a/multiuser/oidc/pom.xml +++ b/multiuser/oidc/pom.xml @@ -17,7 +17,7 @@ che-multiuser-parent org.eclipse.che.multiuser - 7.65.0-SNAPSHOT + 7.66.0-SNAPSHOT che-multiuser-oidc jar diff --git a/multiuser/permission/che-multiuser-permission-devfile/pom.xml b/multiuser/permission/che-multiuser-permission-devfile/pom.xml index b361207740..ea8c84e8a2 100644 --- a/multiuser/permission/che-multiuser-permission-devfile/pom.xml +++ b/multiuser/permission/che-multiuser-permission-devfile/pom.xml @@ -17,7 +17,7 @@ che-multiuser-permission org.eclipse.che.multiuser - 7.65.0-SNAPSHOT + 7.66.0-SNAPSHOT che-multiuser-permission-devfile Che Multiuser :: Devfile Permissions diff --git a/multiuser/permission/che-multiuser-permission-logger/pom.xml b/multiuser/permission/che-multiuser-permission-logger/pom.xml index d09474a570..b77819029b 100644 --- a/multiuser/permission/che-multiuser-permission-logger/pom.xml +++ b/multiuser/permission/che-multiuser-permission-logger/pom.xml @@ -17,7 +17,7 @@ che-multiuser-permission org.eclipse.che.multiuser - 7.65.0-SNAPSHOT + 7.66.0-SNAPSHOT che-multiuser-permission-logger Che Multiuser :: Logger Permissions diff --git a/multiuser/permission/che-multiuser-permission-resource/pom.xml b/multiuser/permission/che-multiuser-permission-resource/pom.xml index 1e45641f4d..5773299aac 100644 --- a/multiuser/permission/che-multiuser-permission-resource/pom.xml +++ b/multiuser/permission/che-multiuser-permission-resource/pom.xml @@ -17,7 +17,7 @@ che-multiuser-permission org.eclipse.che.multiuser - 7.65.0-SNAPSHOT + 7.66.0-SNAPSHOT che-multiuser-permission-resource Che Multiuser :: Resource :: Permissions diff --git a/multiuser/permission/che-multiuser-permission-system/pom.xml b/multiuser/permission/che-multiuser-permission-system/pom.xml index e435147e0b..6dcf456914 100644 --- a/multiuser/permission/che-multiuser-permission-system/pom.xml +++ b/multiuser/permission/che-multiuser-permission-system/pom.xml @@ -17,7 +17,7 @@ che-multiuser-permission org.eclipse.che.multiuser - 7.65.0-SNAPSHOT + 7.66.0-SNAPSHOT che-multiuser-permission-system Che Multiuser :: System Permissions diff --git a/multiuser/permission/che-multiuser-permission-user/pom.xml b/multiuser/permission/che-multiuser-permission-user/pom.xml index 4a43389f25..856fafe019 100644 --- a/multiuser/permission/che-multiuser-permission-user/pom.xml +++ b/multiuser/permission/che-multiuser-permission-user/pom.xml @@ -17,7 +17,7 @@ che-multiuser-permission org.eclipse.che.multiuser - 7.65.0-SNAPSHOT + 7.66.0-SNAPSHOT che-multiuser-permission-user Che Multiuser :: User Permissions diff --git a/multiuser/permission/che-multiuser-permission-workspace-activity/pom.xml b/multiuser/permission/che-multiuser-permission-workspace-activity/pom.xml index 72f65b829f..c520101f61 100644 --- a/multiuser/permission/che-multiuser-permission-workspace-activity/pom.xml +++ b/multiuser/permission/che-multiuser-permission-workspace-activity/pom.xml @@ -17,7 +17,7 @@ che-multiuser-permission org.eclipse.che.multiuser - 7.65.0-SNAPSHOT + 7.66.0-SNAPSHOT che-multiuser-permission-workspace-activity Che Multiuser :: Workspace Activity Permissions diff --git a/multiuser/permission/che-multiuser-permission-workspace/pom.xml b/multiuser/permission/che-multiuser-permission-workspace/pom.xml index ace47ae956..39cd08c081 100644 --- a/multiuser/permission/che-multiuser-permission-workspace/pom.xml +++ b/multiuser/permission/che-multiuser-permission-workspace/pom.xml @@ -17,7 +17,7 @@ che-multiuser-permission org.eclipse.che.multiuser - 7.65.0-SNAPSHOT + 7.66.0-SNAPSHOT che-multiuser-permission-workspace Che Multiuser :: Workspace Permissions diff --git a/multiuser/permission/pom.xml b/multiuser/permission/pom.xml index 679d660adc..7e7da66410 100644 --- a/multiuser/permission/pom.xml +++ b/multiuser/permission/pom.xml @@ -17,7 +17,7 @@ che-multiuser-parent org.eclipse.che.multiuser - 7.65.0-SNAPSHOT + 7.66.0-SNAPSHOT ../pom.xml che-multiuser-permission diff --git a/multiuser/personal-account/pom.xml b/multiuser/personal-account/pom.xml index 38fb9dd3e7..858b6564a5 100644 --- a/multiuser/personal-account/pom.xml +++ b/multiuser/personal-account/pom.xml @@ -17,7 +17,7 @@ che-multiuser-parent org.eclipse.che.multiuser - 7.65.0-SNAPSHOT + 7.66.0-SNAPSHOT che-multiuser-personal-account jar diff --git a/multiuser/pom.xml b/multiuser/pom.xml index 4e1353b56b..c8455db1b3 100644 --- a/multiuser/pom.xml +++ b/multiuser/pom.xml @@ -17,7 +17,7 @@ che-server org.eclipse.che - 7.65.0-SNAPSHOT + 7.66.0-SNAPSHOT ../pom.xml org.eclipse.che.multiuser diff --git a/multiuser/sql-schema/pom.xml b/multiuser/sql-schema/pom.xml index 6eaa86d92b..3090f529a2 100644 --- a/multiuser/sql-schema/pom.xml +++ b/multiuser/sql-schema/pom.xml @@ -17,7 +17,7 @@ che-multiuser-parent org.eclipse.che.multiuser - 7.65.0-SNAPSHOT + 7.66.0-SNAPSHOT ../pom.xml che-multiuser-sql-schema diff --git a/pom.xml b/pom.xml index 41d3fd50bc..3d74155662 100644 --- a/pom.xml +++ b/pom.xml @@ -16,7 +16,7 @@ 4.0.0 org.eclipse.che che-server - 7.65.0-SNAPSHOT + 7.66.0-SNAPSHOT pom Che Server Eclipse Che Server @@ -100,7 +100,7 @@ Red Hat, Inc. - initial API and implementation ${project.version} - 7.65.0-SNAPSHOT + 7.66.0-SNAPSHOT 1.0-beta2 Red Hat, Inc. diff --git a/typescript-dto/dto-pom.xml b/typescript-dto/dto-pom.xml index e890df678c..2f487e095b 100644 --- a/typescript-dto/dto-pom.xml +++ b/typescript-dto/dto-pom.xml @@ -23,7 +23,7 @@ pom Che TypeScript DTO - 7.65.0-SNAPSHOT + 7.66.0-SNAPSHOT diff --git a/wsmaster/che-core-api-account/pom.xml b/wsmaster/che-core-api-account/pom.xml index d2ab34d9e2..6c840c6bdd 100644 --- a/wsmaster/che-core-api-account/pom.xml +++ b/wsmaster/che-core-api-account/pom.xml @@ -17,7 +17,7 @@ che-master-parent org.eclipse.che.core - 7.65.0-SNAPSHOT + 7.66.0-SNAPSHOT che-core-api-account Che Core :: API :: Account diff --git a/wsmaster/che-core-api-auth-azure-devops/pom.xml b/wsmaster/che-core-api-auth-azure-devops/pom.xml index dc01ac10b6..88e720c215 100644 --- a/wsmaster/che-core-api-auth-azure-devops/pom.xml +++ b/wsmaster/che-core-api-auth-azure-devops/pom.xml @@ -17,7 +17,7 @@ che-master-parent org.eclipse.che.core - 7.65.0-SNAPSHOT + 7.66.0-SNAPSHOT che-core-api-auth-azure-devops jar diff --git a/wsmaster/che-core-api-auth-bitbucket/pom.xml b/wsmaster/che-core-api-auth-bitbucket/pom.xml index 5140b46928..03c25578b5 100644 --- a/wsmaster/che-core-api-auth-bitbucket/pom.xml +++ b/wsmaster/che-core-api-auth-bitbucket/pom.xml @@ -17,7 +17,7 @@ che-master-parent org.eclipse.che.core - 7.65.0-SNAPSHOT + 7.66.0-SNAPSHOT che-core-api-auth-bitbucket jar diff --git a/wsmaster/che-core-api-auth-github/pom.xml b/wsmaster/che-core-api-auth-github/pom.xml index 44acb5aaa1..d05c4e9d44 100644 --- a/wsmaster/che-core-api-auth-github/pom.xml +++ b/wsmaster/che-core-api-auth-github/pom.xml @@ -17,7 +17,7 @@ che-master-parent org.eclipse.che.core - 7.65.0-SNAPSHOT + 7.66.0-SNAPSHOT che-core-api-auth-github jar diff --git a/wsmaster/che-core-api-auth-gitlab/pom.xml b/wsmaster/che-core-api-auth-gitlab/pom.xml index 123da5a45c..ca653c0db0 100644 --- a/wsmaster/che-core-api-auth-gitlab/pom.xml +++ b/wsmaster/che-core-api-auth-gitlab/pom.xml @@ -17,7 +17,7 @@ che-master-parent org.eclipse.che.core - 7.65.0-SNAPSHOT + 7.66.0-SNAPSHOT che-core-api-auth-gitlab jar diff --git a/wsmaster/che-core-api-auth-openshift/pom.xml b/wsmaster/che-core-api-auth-openshift/pom.xml index c1ff72698a..93256e9673 100644 --- a/wsmaster/che-core-api-auth-openshift/pom.xml +++ b/wsmaster/che-core-api-auth-openshift/pom.xml @@ -17,7 +17,7 @@ che-master-parent org.eclipse.che.core - 7.65.0-SNAPSHOT + 7.66.0-SNAPSHOT che-core-api-auth-openshift jar diff --git a/wsmaster/che-core-api-auth-shared/pom.xml b/wsmaster/che-core-api-auth-shared/pom.xml index 79ec9f332a..bd2444b879 100644 --- a/wsmaster/che-core-api-auth-shared/pom.xml +++ b/wsmaster/che-core-api-auth-shared/pom.xml @@ -17,7 +17,7 @@ che-master-parent org.eclipse.che.core - 7.65.0-SNAPSHOT + 7.66.0-SNAPSHOT che-core-api-auth-shared jar diff --git a/wsmaster/che-core-api-auth/pom.xml b/wsmaster/che-core-api-auth/pom.xml index d94980f8e7..a17fa10cc4 100644 --- a/wsmaster/che-core-api-auth/pom.xml +++ b/wsmaster/che-core-api-auth/pom.xml @@ -17,7 +17,7 @@ che-master-parent org.eclipse.che.core - 7.65.0-SNAPSHOT + 7.66.0-SNAPSHOT che-core-api-auth jar diff --git a/wsmaster/che-core-api-devfile-shared/pom.xml b/wsmaster/che-core-api-devfile-shared/pom.xml index 8f027161d1..04879f6317 100644 --- a/wsmaster/che-core-api-devfile-shared/pom.xml +++ b/wsmaster/che-core-api-devfile-shared/pom.xml @@ -17,7 +17,7 @@ che-master-parent org.eclipse.che.core - 7.65.0-SNAPSHOT + 7.66.0-SNAPSHOT che-core-api-devfile-shared jar diff --git a/wsmaster/che-core-api-devfile/pom.xml b/wsmaster/che-core-api-devfile/pom.xml index bc1cbfa7c8..becf79870c 100644 --- a/wsmaster/che-core-api-devfile/pom.xml +++ b/wsmaster/che-core-api-devfile/pom.xml @@ -17,7 +17,7 @@ che-master-parent org.eclipse.che.core - 7.65.0-SNAPSHOT + 7.66.0-SNAPSHOT che-core-api-devfile jar diff --git a/wsmaster/che-core-api-factory-azure-devops/pom.xml b/wsmaster/che-core-api-factory-azure-devops/pom.xml index 39503f8adf..ccace498d1 100644 --- a/wsmaster/che-core-api-factory-azure-devops/pom.xml +++ b/wsmaster/che-core-api-factory-azure-devops/pom.xml @@ -17,7 +17,7 @@ che-master-parent org.eclipse.che.core - 7.65.0-SNAPSHOT + 7.66.0-SNAPSHOT che-core-api-factory-azure-devops jar diff --git a/wsmaster/che-core-api-factory-bitbucket-server/pom.xml b/wsmaster/che-core-api-factory-bitbucket-server/pom.xml index b7728e1193..d11d16e300 100644 --- a/wsmaster/che-core-api-factory-bitbucket-server/pom.xml +++ b/wsmaster/che-core-api-factory-bitbucket-server/pom.xml @@ -17,7 +17,7 @@ che-master-parent org.eclipse.che.core - 7.65.0-SNAPSHOT + 7.66.0-SNAPSHOT che-core-api-factory-bitbucket-server jar diff --git a/wsmaster/che-core-api-factory-bitbucket/pom.xml b/wsmaster/che-core-api-factory-bitbucket/pom.xml index 4835d085b6..e088b58c61 100644 --- a/wsmaster/che-core-api-factory-bitbucket/pom.xml +++ b/wsmaster/che-core-api-factory-bitbucket/pom.xml @@ -17,7 +17,7 @@ che-master-parent org.eclipse.che.core - 7.65.0-SNAPSHOT + 7.66.0-SNAPSHOT che-core-api-factory-bitbucket jar diff --git a/wsmaster/che-core-api-factory-git-ssh/pom.xml b/wsmaster/che-core-api-factory-git-ssh/pom.xml index af96e565a8..56d54f51f3 100644 --- a/wsmaster/che-core-api-factory-git-ssh/pom.xml +++ b/wsmaster/che-core-api-factory-git-ssh/pom.xml @@ -17,7 +17,7 @@ che-master-parent org.eclipse.che.core - 7.65.0-SNAPSHOT + 7.66.0-SNAPSHOT che-core-api-factory-git-ssh jar diff --git a/wsmaster/che-core-api-factory-github/pom.xml b/wsmaster/che-core-api-factory-github/pom.xml index d686aacbd1..bd8bf21856 100644 --- a/wsmaster/che-core-api-factory-github/pom.xml +++ b/wsmaster/che-core-api-factory-github/pom.xml @@ -17,7 +17,7 @@ che-master-parent org.eclipse.che.core - 7.65.0-SNAPSHOT + 7.66.0-SNAPSHOT che-core-api-factory-github jar diff --git a/wsmaster/che-core-api-factory-gitlab/pom.xml b/wsmaster/che-core-api-factory-gitlab/pom.xml index f052d73b82..cc765436af 100644 --- a/wsmaster/che-core-api-factory-gitlab/pom.xml +++ b/wsmaster/che-core-api-factory-gitlab/pom.xml @@ -17,7 +17,7 @@ che-master-parent org.eclipse.che.core - 7.65.0-SNAPSHOT + 7.66.0-SNAPSHOT che-core-api-factory-gitlab jar diff --git a/wsmaster/che-core-api-factory-shared/pom.xml b/wsmaster/che-core-api-factory-shared/pom.xml index 596a0aebc6..b573f60b0d 100644 --- a/wsmaster/che-core-api-factory-shared/pom.xml +++ b/wsmaster/che-core-api-factory-shared/pom.xml @@ -17,7 +17,7 @@ che-master-parent org.eclipse.che.core - 7.65.0-SNAPSHOT + 7.66.0-SNAPSHOT che-core-api-factory-shared jar diff --git a/wsmaster/che-core-api-factory/pom.xml b/wsmaster/che-core-api-factory/pom.xml index 90c971b822..8ea3c9e4da 100644 --- a/wsmaster/che-core-api-factory/pom.xml +++ b/wsmaster/che-core-api-factory/pom.xml @@ -17,7 +17,7 @@ che-master-parent org.eclipse.che.core - 7.65.0-SNAPSHOT + 7.66.0-SNAPSHOT che-core-api-factory jar diff --git a/wsmaster/che-core-api-logger-shared/pom.xml b/wsmaster/che-core-api-logger-shared/pom.xml index 4ae2f2dd8c..ff2d811c4d 100644 --- a/wsmaster/che-core-api-logger-shared/pom.xml +++ b/wsmaster/che-core-api-logger-shared/pom.xml @@ -17,7 +17,7 @@ che-master-parent org.eclipse.che.core - 7.65.0-SNAPSHOT + 7.66.0-SNAPSHOT che-core-api-logger-shared jar diff --git a/wsmaster/che-core-api-logger/pom.xml b/wsmaster/che-core-api-logger/pom.xml index 38b452f72b..36c5aa4c17 100644 --- a/wsmaster/che-core-api-logger/pom.xml +++ b/wsmaster/che-core-api-logger/pom.xml @@ -17,7 +17,7 @@ che-master-parent org.eclipse.che.core - 7.65.0-SNAPSHOT + 7.66.0-SNAPSHOT che-core-api-logger jar diff --git a/wsmaster/che-core-api-metrics/pom.xml b/wsmaster/che-core-api-metrics/pom.xml index 429f4ad782..c2a45a3ff5 100644 --- a/wsmaster/che-core-api-metrics/pom.xml +++ b/wsmaster/che-core-api-metrics/pom.xml @@ -17,7 +17,7 @@ che-master-parent org.eclipse.che.core - 7.65.0-SNAPSHOT + 7.66.0-SNAPSHOT che-core-api-metrics jar diff --git a/wsmaster/che-core-api-ssh-shared/pom.xml b/wsmaster/che-core-api-ssh-shared/pom.xml index 1caacadd5e..f01f690861 100644 --- a/wsmaster/che-core-api-ssh-shared/pom.xml +++ b/wsmaster/che-core-api-ssh-shared/pom.xml @@ -17,7 +17,7 @@ che-master-parent org.eclipse.che.core - 7.65.0-SNAPSHOT + 7.66.0-SNAPSHOT che-core-api-ssh-shared jar diff --git a/wsmaster/che-core-api-ssh/pom.xml b/wsmaster/che-core-api-ssh/pom.xml index 8a3c8aed2f..f368ba4f82 100644 --- a/wsmaster/che-core-api-ssh/pom.xml +++ b/wsmaster/che-core-api-ssh/pom.xml @@ -17,7 +17,7 @@ che-master-parent org.eclipse.che.core - 7.65.0-SNAPSHOT + 7.66.0-SNAPSHOT che-core-api-ssh jar diff --git a/wsmaster/che-core-api-system-shared/pom.xml b/wsmaster/che-core-api-system-shared/pom.xml index fe8de5de7b..3c0be5cb0b 100644 --- a/wsmaster/che-core-api-system-shared/pom.xml +++ b/wsmaster/che-core-api-system-shared/pom.xml @@ -17,7 +17,7 @@ che-master-parent org.eclipse.che.core - 7.65.0-SNAPSHOT + 7.66.0-SNAPSHOT che-core-api-system-shared jar diff --git a/wsmaster/che-core-api-system/pom.xml b/wsmaster/che-core-api-system/pom.xml index b2a6b76962..47203e9f4d 100644 --- a/wsmaster/che-core-api-system/pom.xml +++ b/wsmaster/che-core-api-system/pom.xml @@ -17,7 +17,7 @@ che-master-parent org.eclipse.che.core - 7.65.0-SNAPSHOT + 7.66.0-SNAPSHOT che-core-api-system jar diff --git a/wsmaster/che-core-api-user-shared/pom.xml b/wsmaster/che-core-api-user-shared/pom.xml index 6172e29449..6868a8a855 100644 --- a/wsmaster/che-core-api-user-shared/pom.xml +++ b/wsmaster/che-core-api-user-shared/pom.xml @@ -17,7 +17,7 @@ che-master-parent org.eclipse.che.core - 7.65.0-SNAPSHOT + 7.66.0-SNAPSHOT che-core-api-user-shared Che Core :: API :: User :: Shared diff --git a/wsmaster/che-core-api-user/pom.xml b/wsmaster/che-core-api-user/pom.xml index 1b9855e3a7..79d27e5ffd 100644 --- a/wsmaster/che-core-api-user/pom.xml +++ b/wsmaster/che-core-api-user/pom.xml @@ -17,7 +17,7 @@ che-master-parent org.eclipse.che.core - 7.65.0-SNAPSHOT + 7.66.0-SNAPSHOT che-core-api-user Che Core :: API :: User diff --git a/wsmaster/che-core-api-workspace-activity/pom.xml b/wsmaster/che-core-api-workspace-activity/pom.xml index 8094efcc52..9f94967c41 100644 --- a/wsmaster/che-core-api-workspace-activity/pom.xml +++ b/wsmaster/che-core-api-workspace-activity/pom.xml @@ -17,7 +17,7 @@ che-master-parent org.eclipse.che.core - 7.65.0-SNAPSHOT + 7.66.0-SNAPSHOT che-core-api-workspace-activity jar diff --git a/wsmaster/che-core-api-workspace-shared/pom.xml b/wsmaster/che-core-api-workspace-shared/pom.xml index a4b6f2d104..da0b22743a 100644 --- a/wsmaster/che-core-api-workspace-shared/pom.xml +++ b/wsmaster/che-core-api-workspace-shared/pom.xml @@ -17,7 +17,7 @@ che-master-parent org.eclipse.che.core - 7.65.0-SNAPSHOT + 7.66.0-SNAPSHOT che-core-api-workspace-shared jar diff --git a/wsmaster/che-core-api-workspace/pom.xml b/wsmaster/che-core-api-workspace/pom.xml index c9178ddfda..54f6920ff2 100644 --- a/wsmaster/che-core-api-workspace/pom.xml +++ b/wsmaster/che-core-api-workspace/pom.xml @@ -17,7 +17,7 @@ che-master-parent org.eclipse.che.core - 7.65.0-SNAPSHOT + 7.66.0-SNAPSHOT che-core-api-workspace jar diff --git a/wsmaster/che-core-sql-schema/pom.xml b/wsmaster/che-core-sql-schema/pom.xml index 375e67258a..98f14a90ec 100644 --- a/wsmaster/che-core-sql-schema/pom.xml +++ b/wsmaster/che-core-sql-schema/pom.xml @@ -17,7 +17,7 @@ che-master-parent org.eclipse.che.core - 7.65.0-SNAPSHOT + 7.66.0-SNAPSHOT che-core-sql-schema Che Core :: SQL :: Schema diff --git a/wsmaster/integration-tests/cascade-removal/pom.xml b/wsmaster/integration-tests/cascade-removal/pom.xml index 21c5dbfdb8..09fcd8e690 100644 --- a/wsmaster/integration-tests/cascade-removal/pom.xml +++ b/wsmaster/integration-tests/cascade-removal/pom.xml @@ -17,7 +17,7 @@ integration-tests-parent org.eclipse.che.core - 7.65.0-SNAPSHOT + 7.66.0-SNAPSHOT cascade-removal Integration Tests :: Cascade Removal diff --git a/wsmaster/integration-tests/mysql-tck/pom.xml b/wsmaster/integration-tests/mysql-tck/pom.xml index efb7d5b560..04485bcc03 100644 --- a/wsmaster/integration-tests/mysql-tck/pom.xml +++ b/wsmaster/integration-tests/mysql-tck/pom.xml @@ -17,7 +17,7 @@ integration-tests-parent org.eclipse.che.core - 7.65.0-SNAPSHOT + 7.66.0-SNAPSHOT mysql-tck jar diff --git a/wsmaster/integration-tests/pom.xml b/wsmaster/integration-tests/pom.xml index b9946d276b..47d904aa77 100644 --- a/wsmaster/integration-tests/pom.xml +++ b/wsmaster/integration-tests/pom.xml @@ -17,7 +17,7 @@ che-master-parent org.eclipse.che.core - 7.65.0-SNAPSHOT + 7.66.0-SNAPSHOT ../pom.xml integration-tests-parent diff --git a/wsmaster/integration-tests/postgresql-tck/pom.xml b/wsmaster/integration-tests/postgresql-tck/pom.xml index c30887e37d..a93b5d520a 100644 --- a/wsmaster/integration-tests/postgresql-tck/pom.xml +++ b/wsmaster/integration-tests/postgresql-tck/pom.xml @@ -17,7 +17,7 @@ integration-tests-parent org.eclipse.che.core - 7.65.0-SNAPSHOT + 7.66.0-SNAPSHOT postgresql-tck jar diff --git a/wsmaster/pom.xml b/wsmaster/pom.xml index 3d491a8f52..3395cc705b 100644 --- a/wsmaster/pom.xml +++ b/wsmaster/pom.xml @@ -17,7 +17,7 @@ che-core-parent org.eclipse.che.core - 7.65.0-SNAPSHOT + 7.66.0-SNAPSHOT ../core/pom.xml che-master-parent From 75979a6d6a914e80c873d91778e20a93f920e8a4 Mon Sep 17 00:00:00 2001 From: Mykhailo Kuznietsov Date: Thu, 27 Apr 2023 15:06:41 +0300 Subject: [PATCH 12/75] chore: che-21993 replace deprecated set-output in actions (#502) --- .github/workflows/next-build.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/next-build.yml b/.github/workflows/next-build.yml index df0e6ee7b8..a2206fda14 100644 --- a/.github/workflows/next-build.yml +++ b/.github/workflows/next-build.yml @@ -45,8 +45,7 @@ jobs: - name: Build docker images id: build run: | - SHORT_SHA1=$(git rev-parse --short HEAD) - echo ::set-output name=short_sha1::${SHORT_SHA1} + echo "short_sha1=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT ./dockerfiles/build.sh --tag:next --sha-tag - name: Push docker images run: | From 725506d26fb007e9bd08832b2913f7594d66e30f Mon Sep 17 00:00:00 2001 From: Igor Vinokur Date: Tue, 9 May 2023 16:14:38 +0300 Subject: [PATCH 13/75] Fix provider name constant in the BitbucketServerUserDataFetcher calss (#511) Change the OAUTH_PROVIDER_NAME constant from bitbucket to bitbucket-server in order to fix the git user data initialisation flow, when a PAT is initialised in a user namespace. --- .../server/bitbucket/BitbucketServerUserDataFetcher.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wsmaster/che-core-api-factory-bitbucket-server/src/main/java/org/eclipse/che/api/factory/server/bitbucket/BitbucketServerUserDataFetcher.java b/wsmaster/che-core-api-factory-bitbucket-server/src/main/java/org/eclipse/che/api/factory/server/bitbucket/BitbucketServerUserDataFetcher.java index 1e584bd162..1af8941794 100644 --- a/wsmaster/che-core-api-factory-bitbucket-server/src/main/java/org/eclipse/che/api/factory/server/bitbucket/BitbucketServerUserDataFetcher.java +++ b/wsmaster/che-core-api-factory-bitbucket-server/src/main/java/org/eclipse/che/api/factory/server/bitbucket/BitbucketServerUserDataFetcher.java @@ -39,7 +39,7 @@ import org.eclipse.che.security.oauth1.NoopOAuthAuthenticator; /** Bitbucket git user data retriever. */ public class BitbucketServerUserDataFetcher implements GitUserDataFetcher { - private final String OAUTH_PROVIDER_NAME = "bitbucket"; + private final String OAUTH_PROVIDER_NAME = "bitbucket-server"; private final String apiEndpoint; /** Bitbucket API client. */ From eac9cef22b57b0415da0d12c6a9f51855ac053f4 Mon Sep 17 00:00:00 2001 From: David Kwon Date: Wed, 3 May 2023 16:22:02 -0400 Subject: [PATCH 14/75] feat: allow che-operator to detect user-profile secret Signed-off-by: David Kwon --- .../namespace/configurator/UserProfileConfigurator.java | 1 + 1 file changed, 1 insertion(+) diff --git a/infrastructures/kubernetes/src/main/java/org/eclipse/che/workspace/infrastructure/kubernetes/namespace/configurator/UserProfileConfigurator.java b/infrastructures/kubernetes/src/main/java/org/eclipse/che/workspace/infrastructure/kubernetes/namespace/configurator/UserProfileConfigurator.java index 826a5d6399..7bfdb64a0f 100644 --- a/infrastructures/kubernetes/src/main/java/org/eclipse/che/workspace/infrastructure/kubernetes/namespace/configurator/UserProfileConfigurator.java +++ b/infrastructures/kubernetes/src/main/java/org/eclipse/che/workspace/infrastructure/kubernetes/namespace/configurator/UserProfileConfigurator.java @@ -83,6 +83,7 @@ public class UserProfileConfigurator implements NamespaceConfigurator { .withName(USER_PROFILE_SECRET_NAME) .addToLabels(DEV_WORKSPACE_MOUNT_LABEL, "true") .addToLabels(DEV_WORKSPACE_WATCH_SECRET_LABEL, "true") + .addToLabels("app.kubernetes.io/part-of", "che.eclipse.org") .addToAnnotations(DEV_WORKSPACE_MOUNT_AS_ANNOTATION, "file") .addToAnnotations(DEV_WORKSPACE_MOUNT_PATH_ANNOTATION, USER_PROFILE_SECRET_MOUNT_PATH) .endMetadata() From 1fb16e5b631033350d5dc615917c5a669a07309e Mon Sep 17 00:00:00 2001 From: Mykhailo Kuznietsov Date: Mon, 8 May 2023 18:09:06 +0000 Subject: [PATCH 15/75] chore: Bump to 7.67.0-SNAPSHOT in main Signed-off-by: Mykhailo Kuznietsov --- assembly/assembly-che-tomcat/pom.xml | 2 +- assembly/assembly-main/pom.xml | 2 +- assembly/assembly-root-war/pom.xml | 2 +- assembly/assembly-swagger-war/pom.xml | 2 +- assembly/assembly-wsmaster-war/pom.xml | 2 +- assembly/pom.xml | 2 +- core/che-core-api-core/pom.xml | 2 +- core/che-core-api-dto-maven-plugin/pom.xml | 2 +- core/che-core-api-dto/pom.xml | 2 +- core/che-core-api-model/pom.xml | 2 +- core/che-core-db-vendor-h2/pom.xml | 2 +- core/che-core-db-vendor-mysql/pom.xml | 2 +- core/che-core-db-vendor-postgresql/pom.xml | 2 +- core/che-core-db/pom.xml | 2 +- core/che-core-logback/pom.xml | 2 +- core/che-core-metrics-core/pom.xml | 2 +- core/che-core-tracing-core/pom.xml | 2 +- core/che-core-tracing-metrics/pom.xml | 2 +- core/che-core-tracing-web/pom.xml | 2 +- core/che-core-typescript-dto-maven-plugin/pom.xml | 2 +- core/commons/che-core-commons-annotations/pom.xml | 2 +- core/commons/che-core-commons-inject/pom.xml | 2 +- core/commons/che-core-commons-j2ee/pom.xml | 2 +- core/commons/che-core-commons-json/pom.xml | 2 +- core/commons/che-core-commons-lang/pom.xml | 2 +- core/commons/che-core-commons-observability/pom.xml | 2 +- core/commons/che-core-commons-schedule/pom.xml | 2 +- core/commons/che-core-commons-test/pom.xml | 2 +- core/commons/che-core-commons-tracing/pom.xml | 2 +- core/commons/pom.xml | 2 +- core/pom.xml | 2 +- infrastructures/infrastructure-distributed/pom.xml | 2 +- infrastructures/infrastructure-factory/pom.xml | 2 +- infrastructures/infrastructure-metrics/pom.xml | 2 +- infrastructures/infrastructure-permission/pom.xml | 2 +- infrastructures/kubernetes/pom.xml | 2 +- infrastructures/openshift/pom.xml | 2 +- infrastructures/pom.xml | 2 +- .../api/che-multiuser-api-authentication-commons/pom.xml | 2 +- multiuser/api/che-multiuser-api-authorization-impl/pom.xml | 2 +- multiuser/api/che-multiuser-api-authorization/pom.xml | 2 +- multiuser/api/che-multiuser-api-organization-shared/pom.xml | 2 +- multiuser/api/che-multiuser-api-organization/pom.xml | 2 +- multiuser/api/che-multiuser-api-permission-shared/pom.xml | 2 +- multiuser/api/che-multiuser-api-permission/pom.xml | 2 +- multiuser/api/che-multiuser-api-resource-shared/pom.xml | 2 +- multiuser/api/che-multiuser-api-resource/pom.xml | 2 +- multiuser/api/che-multiuser-api-workspace-activity/pom.xml | 2 +- multiuser/api/pom.xml | 2 +- .../integration-tests/che-multiuser-cascade-removal/pom.xml | 2 +- multiuser/integration-tests/che-multiuser-mysql-tck/pom.xml | 2 +- .../integration-tests/che-multiuser-postgresql-tck/pom.xml | 2 +- multiuser/integration-tests/pom.xml | 2 +- multiuser/keycloak/che-multiuser-keycloak-server/pom.xml | 2 +- multiuser/keycloak/che-multiuser-keycloak-shared/pom.xml | 2 +- .../keycloak/che-multiuser-keycloak-token-provider/pom.xml | 2 +- .../keycloak/che-multiuser-keycloak-user-remover/pom.xml | 2 +- multiuser/keycloak/pom.xml | 2 +- .../che-multiuser-machine-authentication-shared/pom.xml | 2 +- .../machine-auth/che-multiuser-machine-authentication/pom.xml | 2 +- multiuser/machine-auth/pom.xml | 2 +- multiuser/oidc/pom.xml | 2 +- multiuser/permission/che-multiuser-permission-devfile/pom.xml | 2 +- multiuser/permission/che-multiuser-permission-logger/pom.xml | 2 +- .../permission/che-multiuser-permission-resource/pom.xml | 2 +- multiuser/permission/che-multiuser-permission-system/pom.xml | 2 +- multiuser/permission/che-multiuser-permission-user/pom.xml | 2 +- .../che-multiuser-permission-workspace-activity/pom.xml | 2 +- .../permission/che-multiuser-permission-workspace/pom.xml | 2 +- multiuser/permission/pom.xml | 2 +- multiuser/personal-account/pom.xml | 2 +- multiuser/pom.xml | 2 +- multiuser/sql-schema/pom.xml | 2 +- pom.xml | 4 ++-- typescript-dto/dto-pom.xml | 2 +- wsmaster/che-core-api-account/pom.xml | 2 +- wsmaster/che-core-api-auth-azure-devops/pom.xml | 2 +- wsmaster/che-core-api-auth-bitbucket/pom.xml | 2 +- wsmaster/che-core-api-auth-github/pom.xml | 2 +- wsmaster/che-core-api-auth-gitlab/pom.xml | 2 +- wsmaster/che-core-api-auth-openshift/pom.xml | 2 +- wsmaster/che-core-api-auth-shared/pom.xml | 2 +- wsmaster/che-core-api-auth/pom.xml | 2 +- wsmaster/che-core-api-devfile-shared/pom.xml | 2 +- wsmaster/che-core-api-devfile/pom.xml | 2 +- wsmaster/che-core-api-factory-azure-devops/pom.xml | 2 +- wsmaster/che-core-api-factory-bitbucket-server/pom.xml | 2 +- wsmaster/che-core-api-factory-bitbucket/pom.xml | 2 +- wsmaster/che-core-api-factory-git-ssh/pom.xml | 2 +- wsmaster/che-core-api-factory-github/pom.xml | 2 +- wsmaster/che-core-api-factory-gitlab/pom.xml | 2 +- wsmaster/che-core-api-factory-shared/pom.xml | 2 +- wsmaster/che-core-api-factory/pom.xml | 2 +- wsmaster/che-core-api-logger-shared/pom.xml | 2 +- wsmaster/che-core-api-logger/pom.xml | 2 +- wsmaster/che-core-api-metrics/pom.xml | 2 +- wsmaster/che-core-api-ssh-shared/pom.xml | 2 +- wsmaster/che-core-api-ssh/pom.xml | 2 +- wsmaster/che-core-api-system-shared/pom.xml | 2 +- wsmaster/che-core-api-system/pom.xml | 2 +- wsmaster/che-core-api-user-shared/pom.xml | 2 +- wsmaster/che-core-api-user/pom.xml | 2 +- wsmaster/che-core-api-workspace-activity/pom.xml | 2 +- wsmaster/che-core-api-workspace-shared/pom.xml | 2 +- wsmaster/che-core-api-workspace/pom.xml | 2 +- wsmaster/che-core-sql-schema/pom.xml | 2 +- wsmaster/integration-tests/cascade-removal/pom.xml | 2 +- wsmaster/integration-tests/mysql-tck/pom.xml | 2 +- wsmaster/integration-tests/pom.xml | 2 +- wsmaster/integration-tests/postgresql-tck/pom.xml | 2 +- wsmaster/pom.xml | 2 +- 111 files changed, 112 insertions(+), 112 deletions(-) diff --git a/assembly/assembly-che-tomcat/pom.xml b/assembly/assembly-che-tomcat/pom.xml index 4303330841..067d651f02 100644 --- a/assembly/assembly-che-tomcat/pom.xml +++ b/assembly/assembly-che-tomcat/pom.xml @@ -17,7 +17,7 @@ che-assembly-parent org.eclipse.che - 7.66.0-SNAPSHOT + 7.67.0-SNAPSHOT assembly-che-tomcat jar diff --git a/assembly/assembly-main/pom.xml b/assembly/assembly-main/pom.xml index 529271a800..46fdfa55a2 100644 --- a/assembly/assembly-main/pom.xml +++ b/assembly/assembly-main/pom.xml @@ -17,7 +17,7 @@ che-assembly-parent org.eclipse.che - 7.66.0-SNAPSHOT + 7.67.0-SNAPSHOT assembly-main pom diff --git a/assembly/assembly-root-war/pom.xml b/assembly/assembly-root-war/pom.xml index 0da1e98e4f..11b26224a9 100644 --- a/assembly/assembly-root-war/pom.xml +++ b/assembly/assembly-root-war/pom.xml @@ -17,7 +17,7 @@ che-assembly-parent org.eclipse.che - 7.66.0-SNAPSHOT + 7.67.0-SNAPSHOT assembly-root-war war diff --git a/assembly/assembly-swagger-war/pom.xml b/assembly/assembly-swagger-war/pom.xml index 1e342a91da..bb03a2e6d3 100644 --- a/assembly/assembly-swagger-war/pom.xml +++ b/assembly/assembly-swagger-war/pom.xml @@ -17,7 +17,7 @@ che-assembly-parent org.eclipse.che - 7.66.0-SNAPSHOT + 7.67.0-SNAPSHOT assembly-swagger-war war diff --git a/assembly/assembly-wsmaster-war/pom.xml b/assembly/assembly-wsmaster-war/pom.xml index 4a26690f70..ab9f6350eb 100644 --- a/assembly/assembly-wsmaster-war/pom.xml +++ b/assembly/assembly-wsmaster-war/pom.xml @@ -17,7 +17,7 @@ che-assembly-parent org.eclipse.che - 7.66.0-SNAPSHOT + 7.67.0-SNAPSHOT assembly-wsmaster-war war diff --git a/assembly/pom.xml b/assembly/pom.xml index dd06ef1a77..70ff503699 100644 --- a/assembly/pom.xml +++ b/assembly/pom.xml @@ -17,7 +17,7 @@ che-server org.eclipse.che - 7.66.0-SNAPSHOT + 7.67.0-SNAPSHOT ../pom.xml che-assembly-parent diff --git a/core/che-core-api-core/pom.xml b/core/che-core-api-core/pom.xml index be765d1348..f9d952ce15 100644 --- a/core/che-core-api-core/pom.xml +++ b/core/che-core-api-core/pom.xml @@ -17,7 +17,7 @@ che-core-parent org.eclipse.che.core - 7.66.0-SNAPSHOT + 7.67.0-SNAPSHOT che-core-api-core jar diff --git a/core/che-core-api-dto-maven-plugin/pom.xml b/core/che-core-api-dto-maven-plugin/pom.xml index 36cc4ea41e..4698810e50 100644 --- a/core/che-core-api-dto-maven-plugin/pom.xml +++ b/core/che-core-api-dto-maven-plugin/pom.xml @@ -17,7 +17,7 @@ che-core-parent org.eclipse.che.core - 7.66.0-SNAPSHOT + 7.67.0-SNAPSHOT che-core-api-dto-maven-plugin maven-plugin diff --git a/core/che-core-api-dto/pom.xml b/core/che-core-api-dto/pom.xml index 9d3db0d38a..f382f15a69 100644 --- a/core/che-core-api-dto/pom.xml +++ b/core/che-core-api-dto/pom.xml @@ -17,7 +17,7 @@ che-core-parent org.eclipse.che.core - 7.66.0-SNAPSHOT + 7.67.0-SNAPSHOT che-core-api-dto jar diff --git a/core/che-core-api-model/pom.xml b/core/che-core-api-model/pom.xml index 99df7a9064..3711f21afa 100644 --- a/core/che-core-api-model/pom.xml +++ b/core/che-core-api-model/pom.xml @@ -17,7 +17,7 @@ che-core-parent org.eclipse.che.core - 7.66.0-SNAPSHOT + 7.67.0-SNAPSHOT che-core-api-model jar diff --git a/core/che-core-db-vendor-h2/pom.xml b/core/che-core-db-vendor-h2/pom.xml index c610acc299..8143b08aad 100644 --- a/core/che-core-db-vendor-h2/pom.xml +++ b/core/che-core-db-vendor-h2/pom.xml @@ -17,7 +17,7 @@ che-core-parent org.eclipse.che.core - 7.66.0-SNAPSHOT + 7.67.0-SNAPSHOT che-core-db-vendor-h2 Che Core :: Commons :: DB :: Vendor H2 diff --git a/core/che-core-db-vendor-mysql/pom.xml b/core/che-core-db-vendor-mysql/pom.xml index fab2b18c9f..7a54621f49 100644 --- a/core/che-core-db-vendor-mysql/pom.xml +++ b/core/che-core-db-vendor-mysql/pom.xml @@ -17,7 +17,7 @@ che-core-parent org.eclipse.che.core - 7.66.0-SNAPSHOT + 7.67.0-SNAPSHOT che-core-db-vendor-mysql Che Core :: Commons :: DB :: Vendor MySQL diff --git a/core/che-core-db-vendor-postgresql/pom.xml b/core/che-core-db-vendor-postgresql/pom.xml index 3b859e9c04..87e3edf1a9 100644 --- a/core/che-core-db-vendor-postgresql/pom.xml +++ b/core/che-core-db-vendor-postgresql/pom.xml @@ -17,7 +17,7 @@ che-core-parent org.eclipse.che.core - 7.66.0-SNAPSHOT + 7.67.0-SNAPSHOT che-core-db-vendor-postgresql Che Core :: Commons :: DB :: Vendor PostgreSQL diff --git a/core/che-core-db/pom.xml b/core/che-core-db/pom.xml index e929840135..7f9a93590a 100644 --- a/core/che-core-db/pom.xml +++ b/core/che-core-db/pom.xml @@ -17,7 +17,7 @@ che-core-parent org.eclipse.che.core - 7.66.0-SNAPSHOT + 7.67.0-SNAPSHOT che-core-db Che Core :: Commons :: DB diff --git a/core/che-core-logback/pom.xml b/core/che-core-logback/pom.xml index a7feb615f6..71cf280943 100644 --- a/core/che-core-logback/pom.xml +++ b/core/che-core-logback/pom.xml @@ -17,7 +17,7 @@ che-core-parent org.eclipse.che.core - 7.66.0-SNAPSHOT + 7.67.0-SNAPSHOT che-core-logback jar diff --git a/core/che-core-metrics-core/pom.xml b/core/che-core-metrics-core/pom.xml index 0db09c0f19..1ff73e26df 100644 --- a/core/che-core-metrics-core/pom.xml +++ b/core/che-core-metrics-core/pom.xml @@ -17,7 +17,7 @@ che-core-parent org.eclipse.che.core - 7.66.0-SNAPSHOT + 7.67.0-SNAPSHOT che-core-metrics-core Che Core :: Commons :: Metrics :: Core diff --git a/core/che-core-tracing-core/pom.xml b/core/che-core-tracing-core/pom.xml index fb4690596a..c5c759d206 100644 --- a/core/che-core-tracing-core/pom.xml +++ b/core/che-core-tracing-core/pom.xml @@ -17,7 +17,7 @@ che-core-parent org.eclipse.che.core - 7.66.0-SNAPSHOT + 7.67.0-SNAPSHOT che-core-tracing-core Che Core :: Commons :: Tracing :: Core diff --git a/core/che-core-tracing-metrics/pom.xml b/core/che-core-tracing-metrics/pom.xml index c112c6fb6a..7efdf17b1d 100644 --- a/core/che-core-tracing-metrics/pom.xml +++ b/core/che-core-tracing-metrics/pom.xml @@ -17,7 +17,7 @@ che-core-parent org.eclipse.che.core - 7.66.0-SNAPSHOT + 7.67.0-SNAPSHOT che-core-tracing-metrics Che Core :: Commons :: Tracing :: Metrics diff --git a/core/che-core-tracing-web/pom.xml b/core/che-core-tracing-web/pom.xml index f35d1c8f92..10385ab443 100644 --- a/core/che-core-tracing-web/pom.xml +++ b/core/che-core-tracing-web/pom.xml @@ -17,7 +17,7 @@ che-core-parent org.eclipse.che.core - 7.66.0-SNAPSHOT + 7.67.0-SNAPSHOT che-core-tracing-web Che Core :: Commons :: Tracing :: Web diff --git a/core/che-core-typescript-dto-maven-plugin/pom.xml b/core/che-core-typescript-dto-maven-plugin/pom.xml index bff459aedf..018e2ba7f0 100644 --- a/core/che-core-typescript-dto-maven-plugin/pom.xml +++ b/core/che-core-typescript-dto-maven-plugin/pom.xml @@ -17,7 +17,7 @@ che-core-parent org.eclipse.che.core - 7.66.0-SNAPSHOT + 7.67.0-SNAPSHOT che-core-typescript-dto-maven-plugin maven-plugin diff --git a/core/commons/che-core-commons-annotations/pom.xml b/core/commons/che-core-commons-annotations/pom.xml index 13f1ee4ae7..8d0bebd65d 100644 --- a/core/commons/che-core-commons-annotations/pom.xml +++ b/core/commons/che-core-commons-annotations/pom.xml @@ -17,7 +17,7 @@ che-core-commons-parent org.eclipse.che.core - 7.66.0-SNAPSHOT + 7.67.0-SNAPSHOT che-core-commons-annotations jar diff --git a/core/commons/che-core-commons-inject/pom.xml b/core/commons/che-core-commons-inject/pom.xml index 1b89b6fddd..4e81e2b974 100644 --- a/core/commons/che-core-commons-inject/pom.xml +++ b/core/commons/che-core-commons-inject/pom.xml @@ -17,7 +17,7 @@ che-core-commons-parent org.eclipse.che.core - 7.66.0-SNAPSHOT + 7.67.0-SNAPSHOT che-core-commons-inject jar diff --git a/core/commons/che-core-commons-j2ee/pom.xml b/core/commons/che-core-commons-j2ee/pom.xml index 071c7992b1..3851d53567 100644 --- a/core/commons/che-core-commons-j2ee/pom.xml +++ b/core/commons/che-core-commons-j2ee/pom.xml @@ -17,7 +17,7 @@ che-core-commons-parent org.eclipse.che.core - 7.66.0-SNAPSHOT + 7.67.0-SNAPSHOT che-core-commons-j2ee jar diff --git a/core/commons/che-core-commons-json/pom.xml b/core/commons/che-core-commons-json/pom.xml index 0373fd81d1..2b235d27e9 100644 --- a/core/commons/che-core-commons-json/pom.xml +++ b/core/commons/che-core-commons-json/pom.xml @@ -17,7 +17,7 @@ che-core-commons-parent org.eclipse.che.core - 7.66.0-SNAPSHOT + 7.67.0-SNAPSHOT che-core-commons-json jar diff --git a/core/commons/che-core-commons-lang/pom.xml b/core/commons/che-core-commons-lang/pom.xml index 1adeafadd6..78fcafbbd9 100644 --- a/core/commons/che-core-commons-lang/pom.xml +++ b/core/commons/che-core-commons-lang/pom.xml @@ -17,7 +17,7 @@ che-core-commons-parent org.eclipse.che.core - 7.66.0-SNAPSHOT + 7.67.0-SNAPSHOT che-core-commons-lang jar diff --git a/core/commons/che-core-commons-observability/pom.xml b/core/commons/che-core-commons-observability/pom.xml index 1cbb950bd7..457f6e78b4 100644 --- a/core/commons/che-core-commons-observability/pom.xml +++ b/core/commons/che-core-commons-observability/pom.xml @@ -17,7 +17,7 @@ che-core-commons-parent org.eclipse.che.core - 7.66.0-SNAPSHOT + 7.67.0-SNAPSHOT che-core-commons-observability Che Core :: Commons :: Tracing and Monitoring wrapper diff --git a/core/commons/che-core-commons-schedule/pom.xml b/core/commons/che-core-commons-schedule/pom.xml index 84c2b480eb..a093cb3c5a 100644 --- a/core/commons/che-core-commons-schedule/pom.xml +++ b/core/commons/che-core-commons-schedule/pom.xml @@ -17,7 +17,7 @@ che-core-commons-parent org.eclipse.che.core - 7.66.0-SNAPSHOT + 7.67.0-SNAPSHOT che-core-commons-schedule jar diff --git a/core/commons/che-core-commons-test/pom.xml b/core/commons/che-core-commons-test/pom.xml index 928f11e913..b05236e3b0 100644 --- a/core/commons/che-core-commons-test/pom.xml +++ b/core/commons/che-core-commons-test/pom.xml @@ -17,7 +17,7 @@ che-core-commons-parent org.eclipse.che.core - 7.66.0-SNAPSHOT + 7.67.0-SNAPSHOT che-core-commons-test jar diff --git a/core/commons/che-core-commons-tracing/pom.xml b/core/commons/che-core-commons-tracing/pom.xml index 2a3969438e..94680276ca 100644 --- a/core/commons/che-core-commons-tracing/pom.xml +++ b/core/commons/che-core-commons-tracing/pom.xml @@ -17,7 +17,7 @@ che-core-commons-parent org.eclipse.che.core - 7.66.0-SNAPSHOT + 7.67.0-SNAPSHOT che-core-commons-tracing Che Core :: Commons :: Tracing diff --git a/core/commons/pom.xml b/core/commons/pom.xml index 75a65436f3..71af3800a6 100644 --- a/core/commons/pom.xml +++ b/core/commons/pom.xml @@ -17,7 +17,7 @@ che-core-parent org.eclipse.che.core - 7.66.0-SNAPSHOT + 7.67.0-SNAPSHOT ../pom.xml che-core-commons-parent diff --git a/core/pom.xml b/core/pom.xml index 85ad5cb420..a5e980f14d 100644 --- a/core/pom.xml +++ b/core/pom.xml @@ -17,7 +17,7 @@ che-server org.eclipse.che - 7.66.0-SNAPSHOT + 7.67.0-SNAPSHOT ../pom.xml org.eclipse.che.core diff --git a/infrastructures/infrastructure-distributed/pom.xml b/infrastructures/infrastructure-distributed/pom.xml index 6eef5cfb1a..e36a3c2c90 100644 --- a/infrastructures/infrastructure-distributed/pom.xml +++ b/infrastructures/infrastructure-distributed/pom.xml @@ -17,7 +17,7 @@ che-infrastructures-parent org.eclipse.che.infrastructure - 7.66.0-SNAPSHOT + 7.67.0-SNAPSHOT infrastructure-distributed jar diff --git a/infrastructures/infrastructure-factory/pom.xml b/infrastructures/infrastructure-factory/pom.xml index 4421fdbda9..d89615b38b 100644 --- a/infrastructures/infrastructure-factory/pom.xml +++ b/infrastructures/infrastructure-factory/pom.xml @@ -17,7 +17,7 @@ che-infrastructures-parent org.eclipse.che.infrastructure - 7.66.0-SNAPSHOT + 7.67.0-SNAPSHOT infrastructure-factory jar diff --git a/infrastructures/infrastructure-metrics/pom.xml b/infrastructures/infrastructure-metrics/pom.xml index 65ccfac9f4..8d5c336b81 100644 --- a/infrastructures/infrastructure-metrics/pom.xml +++ b/infrastructures/infrastructure-metrics/pom.xml @@ -17,7 +17,7 @@ che-infrastructures-parent org.eclipse.che.infrastructure - 7.66.0-SNAPSHOT + 7.67.0-SNAPSHOT ../pom.xml infrastructure-metrics diff --git a/infrastructures/infrastructure-permission/pom.xml b/infrastructures/infrastructure-permission/pom.xml index 018b68a21d..faee4319b5 100644 --- a/infrastructures/infrastructure-permission/pom.xml +++ b/infrastructures/infrastructure-permission/pom.xml @@ -17,7 +17,7 @@ che-infrastructures-parent org.eclipse.che.infrastructure - 7.66.0-SNAPSHOT + 7.67.0-SNAPSHOT infrastructure-permission Infrastructure :: Kubernetes Permissions diff --git a/infrastructures/kubernetes/pom.xml b/infrastructures/kubernetes/pom.xml index b2eb38ed2a..6f1b15386e 100644 --- a/infrastructures/kubernetes/pom.xml +++ b/infrastructures/kubernetes/pom.xml @@ -17,7 +17,7 @@ che-infrastructures-parent org.eclipse.che.infrastructure - 7.66.0-SNAPSHOT + 7.67.0-SNAPSHOT infrastructure-kubernetes Infrastructure :: Kubernetes diff --git a/infrastructures/openshift/pom.xml b/infrastructures/openshift/pom.xml index 5658e50708..e87a428004 100644 --- a/infrastructures/openshift/pom.xml +++ b/infrastructures/openshift/pom.xml @@ -17,7 +17,7 @@ che-infrastructures-parent org.eclipse.che.infrastructure - 7.66.0-SNAPSHOT + 7.67.0-SNAPSHOT infrastructure-openshift Infrastructure :: OpenShift diff --git a/infrastructures/pom.xml b/infrastructures/pom.xml index 213a6d8610..9d72d41eec 100644 --- a/infrastructures/pom.xml +++ b/infrastructures/pom.xml @@ -17,7 +17,7 @@ che-server org.eclipse.che - 7.66.0-SNAPSHOT + 7.67.0-SNAPSHOT ../pom.xml org.eclipse.che.infrastructure diff --git a/multiuser/api/che-multiuser-api-authentication-commons/pom.xml b/multiuser/api/che-multiuser-api-authentication-commons/pom.xml index ed41d36f6d..5fb8f56968 100644 --- a/multiuser/api/che-multiuser-api-authentication-commons/pom.xml +++ b/multiuser/api/che-multiuser-api-authentication-commons/pom.xml @@ -17,7 +17,7 @@ che-multiuser-api org.eclipse.che.multiuser - 7.66.0-SNAPSHOT + 7.67.0-SNAPSHOT che-multiuser-api-authentication-commons jar diff --git a/multiuser/api/che-multiuser-api-authorization-impl/pom.xml b/multiuser/api/che-multiuser-api-authorization-impl/pom.xml index cc7bcd3b54..164e7d036f 100644 --- a/multiuser/api/che-multiuser-api-authorization-impl/pom.xml +++ b/multiuser/api/che-multiuser-api-authorization-impl/pom.xml @@ -17,7 +17,7 @@ che-multiuser-api org.eclipse.che.multiuser - 7.66.0-SNAPSHOT + 7.67.0-SNAPSHOT che-multiuser-api-authorization-impl jar diff --git a/multiuser/api/che-multiuser-api-authorization/pom.xml b/multiuser/api/che-multiuser-api-authorization/pom.xml index c409afad3e..4b81d98e65 100644 --- a/multiuser/api/che-multiuser-api-authorization/pom.xml +++ b/multiuser/api/che-multiuser-api-authorization/pom.xml @@ -17,7 +17,7 @@ che-multiuser-api org.eclipse.che.multiuser - 7.66.0-SNAPSHOT + 7.67.0-SNAPSHOT che-multiuser-api-authorization jar diff --git a/multiuser/api/che-multiuser-api-organization-shared/pom.xml b/multiuser/api/che-multiuser-api-organization-shared/pom.xml index 6c96c2ed8c..7f18729bfc 100644 --- a/multiuser/api/che-multiuser-api-organization-shared/pom.xml +++ b/multiuser/api/che-multiuser-api-organization-shared/pom.xml @@ -17,7 +17,7 @@ che-multiuser-api org.eclipse.che.multiuser - 7.66.0-SNAPSHOT + 7.67.0-SNAPSHOT che-multiuser-api-organization-shared jar diff --git a/multiuser/api/che-multiuser-api-organization/pom.xml b/multiuser/api/che-multiuser-api-organization/pom.xml index 6752d40ccb..dbe20d2b45 100644 --- a/multiuser/api/che-multiuser-api-organization/pom.xml +++ b/multiuser/api/che-multiuser-api-organization/pom.xml @@ -17,7 +17,7 @@ che-multiuser-api org.eclipse.che.multiuser - 7.66.0-SNAPSHOT + 7.67.0-SNAPSHOT che-multiuser-api-organization jar diff --git a/multiuser/api/che-multiuser-api-permission-shared/pom.xml b/multiuser/api/che-multiuser-api-permission-shared/pom.xml index fa0b3036d9..98f67c002f 100644 --- a/multiuser/api/che-multiuser-api-permission-shared/pom.xml +++ b/multiuser/api/che-multiuser-api-permission-shared/pom.xml @@ -17,7 +17,7 @@ che-multiuser-api org.eclipse.che.multiuser - 7.66.0-SNAPSHOT + 7.67.0-SNAPSHOT che-multiuser-api-permission-shared jar diff --git a/multiuser/api/che-multiuser-api-permission/pom.xml b/multiuser/api/che-multiuser-api-permission/pom.xml index 669902914b..cf37d44a33 100644 --- a/multiuser/api/che-multiuser-api-permission/pom.xml +++ b/multiuser/api/che-multiuser-api-permission/pom.xml @@ -17,7 +17,7 @@ che-multiuser-api org.eclipse.che.multiuser - 7.66.0-SNAPSHOT + 7.67.0-SNAPSHOT che-multiuser-api-permission jar diff --git a/multiuser/api/che-multiuser-api-resource-shared/pom.xml b/multiuser/api/che-multiuser-api-resource-shared/pom.xml index dfd89b45bb..ff3c5e20ff 100644 --- a/multiuser/api/che-multiuser-api-resource-shared/pom.xml +++ b/multiuser/api/che-multiuser-api-resource-shared/pom.xml @@ -17,7 +17,7 @@ che-multiuser-api org.eclipse.che.multiuser - 7.66.0-SNAPSHOT + 7.67.0-SNAPSHOT che-multiuser-api-resource-shared jar diff --git a/multiuser/api/che-multiuser-api-resource/pom.xml b/multiuser/api/che-multiuser-api-resource/pom.xml index 8d52891b10..17f4d4cfc1 100644 --- a/multiuser/api/che-multiuser-api-resource/pom.xml +++ b/multiuser/api/che-multiuser-api-resource/pom.xml @@ -17,7 +17,7 @@ che-multiuser-api org.eclipse.che.multiuser - 7.66.0-SNAPSHOT + 7.67.0-SNAPSHOT che-multiuser-api-resource jar diff --git a/multiuser/api/che-multiuser-api-workspace-activity/pom.xml b/multiuser/api/che-multiuser-api-workspace-activity/pom.xml index fd4fe00011..bf6a64d7bd 100644 --- a/multiuser/api/che-multiuser-api-workspace-activity/pom.xml +++ b/multiuser/api/che-multiuser-api-workspace-activity/pom.xml @@ -17,7 +17,7 @@ che-multiuser-api org.eclipse.che.multiuser - 7.66.0-SNAPSHOT + 7.67.0-SNAPSHOT che-multiuser-api-workspace-activity jar diff --git a/multiuser/api/pom.xml b/multiuser/api/pom.xml index 925dba50e2..0019db62f0 100644 --- a/multiuser/api/pom.xml +++ b/multiuser/api/pom.xml @@ -17,7 +17,7 @@ che-multiuser-parent org.eclipse.che.multiuser - 7.66.0-SNAPSHOT + 7.67.0-SNAPSHOT ../pom.xml che-multiuser-api diff --git a/multiuser/integration-tests/che-multiuser-cascade-removal/pom.xml b/multiuser/integration-tests/che-multiuser-cascade-removal/pom.xml index 0868bd5f46..e225b2f514 100644 --- a/multiuser/integration-tests/che-multiuser-cascade-removal/pom.xml +++ b/multiuser/integration-tests/che-multiuser-cascade-removal/pom.xml @@ -17,7 +17,7 @@ che-multiuser-integration-tests org.eclipse.che.multiuser - 7.66.0-SNAPSHOT + 7.67.0-SNAPSHOT che-multiuser-cascade-removal jar diff --git a/multiuser/integration-tests/che-multiuser-mysql-tck/pom.xml b/multiuser/integration-tests/che-multiuser-mysql-tck/pom.xml index 9aada3ac9c..eb1bb35e0b 100644 --- a/multiuser/integration-tests/che-multiuser-mysql-tck/pom.xml +++ b/multiuser/integration-tests/che-multiuser-mysql-tck/pom.xml @@ -17,7 +17,7 @@ che-multiuser-integration-tests org.eclipse.che.multiuser - 7.66.0-SNAPSHOT + 7.67.0-SNAPSHOT che-multiuser-mysql-tck jar diff --git a/multiuser/integration-tests/che-multiuser-postgresql-tck/pom.xml b/multiuser/integration-tests/che-multiuser-postgresql-tck/pom.xml index a128166e42..c3e82d1e51 100644 --- a/multiuser/integration-tests/che-multiuser-postgresql-tck/pom.xml +++ b/multiuser/integration-tests/che-multiuser-postgresql-tck/pom.xml @@ -17,7 +17,7 @@ che-multiuser-integration-tests org.eclipse.che.multiuser - 7.66.0-SNAPSHOT + 7.67.0-SNAPSHOT che-multiuser-postgresql-tck jar diff --git a/multiuser/integration-tests/pom.xml b/multiuser/integration-tests/pom.xml index 98f16c51a8..783b3d52b5 100644 --- a/multiuser/integration-tests/pom.xml +++ b/multiuser/integration-tests/pom.xml @@ -17,7 +17,7 @@ che-multiuser-parent org.eclipse.che.multiuser - 7.66.0-SNAPSHOT + 7.67.0-SNAPSHOT che-multiuser-integration-tests pom diff --git a/multiuser/keycloak/che-multiuser-keycloak-server/pom.xml b/multiuser/keycloak/che-multiuser-keycloak-server/pom.xml index 845ba3b345..37a5ac8470 100644 --- a/multiuser/keycloak/che-multiuser-keycloak-server/pom.xml +++ b/multiuser/keycloak/che-multiuser-keycloak-server/pom.xml @@ -17,7 +17,7 @@ che-multiuser-keycloak org.eclipse.che.multiuser - 7.66.0-SNAPSHOT + 7.67.0-SNAPSHOT che-multiuser-keycloak-server jar diff --git a/multiuser/keycloak/che-multiuser-keycloak-shared/pom.xml b/multiuser/keycloak/che-multiuser-keycloak-shared/pom.xml index e630944923..173be133cb 100644 --- a/multiuser/keycloak/che-multiuser-keycloak-shared/pom.xml +++ b/multiuser/keycloak/che-multiuser-keycloak-shared/pom.xml @@ -17,7 +17,7 @@ che-multiuser-keycloak org.eclipse.che.multiuser - 7.66.0-SNAPSHOT + 7.67.0-SNAPSHOT che-multiuser-keycloak-shared jar diff --git a/multiuser/keycloak/che-multiuser-keycloak-token-provider/pom.xml b/multiuser/keycloak/che-multiuser-keycloak-token-provider/pom.xml index 417770ab0b..308f75df16 100644 --- a/multiuser/keycloak/che-multiuser-keycloak-token-provider/pom.xml +++ b/multiuser/keycloak/che-multiuser-keycloak-token-provider/pom.xml @@ -17,7 +17,7 @@ che-multiuser-keycloak org.eclipse.che.multiuser - 7.66.0-SNAPSHOT + 7.67.0-SNAPSHOT che-multiuser-keycloak-token-provider Che Multiuser :: Keycloak Token Provider diff --git a/multiuser/keycloak/che-multiuser-keycloak-user-remover/pom.xml b/multiuser/keycloak/che-multiuser-keycloak-user-remover/pom.xml index 8d69d00118..44f9515704 100644 --- a/multiuser/keycloak/che-multiuser-keycloak-user-remover/pom.xml +++ b/multiuser/keycloak/che-multiuser-keycloak-user-remover/pom.xml @@ -17,7 +17,7 @@ che-multiuser-keycloak org.eclipse.che.multiuser - 7.66.0-SNAPSHOT + 7.67.0-SNAPSHOT che-multiuser-keycloak-user-remover jar diff --git a/multiuser/keycloak/pom.xml b/multiuser/keycloak/pom.xml index 5cf2262cc6..4c5eab0ff6 100644 --- a/multiuser/keycloak/pom.xml +++ b/multiuser/keycloak/pom.xml @@ -17,7 +17,7 @@ che-multiuser-parent org.eclipse.che.multiuser - 7.66.0-SNAPSHOT + 7.67.0-SNAPSHOT ../pom.xml che-multiuser-keycloak diff --git a/multiuser/machine-auth/che-multiuser-machine-authentication-shared/pom.xml b/multiuser/machine-auth/che-multiuser-machine-authentication-shared/pom.xml index 00943b4eda..2732c5526a 100644 --- a/multiuser/machine-auth/che-multiuser-machine-authentication-shared/pom.xml +++ b/multiuser/machine-auth/che-multiuser-machine-authentication-shared/pom.xml @@ -17,7 +17,7 @@ che-multiuser-machine-auth org.eclipse.che.multiuser - 7.66.0-SNAPSHOT + 7.67.0-SNAPSHOT che-multiuser-machine-authentication-shared jar diff --git a/multiuser/machine-auth/che-multiuser-machine-authentication/pom.xml b/multiuser/machine-auth/che-multiuser-machine-authentication/pom.xml index 5071118962..f53720bff6 100644 --- a/multiuser/machine-auth/che-multiuser-machine-authentication/pom.xml +++ b/multiuser/machine-auth/che-multiuser-machine-authentication/pom.xml @@ -17,7 +17,7 @@ che-multiuser-machine-auth org.eclipse.che.multiuser - 7.66.0-SNAPSHOT + 7.67.0-SNAPSHOT che-multiuser-machine-authentication jar diff --git a/multiuser/machine-auth/pom.xml b/multiuser/machine-auth/pom.xml index 2fdba29468..b0cc2ab9b6 100644 --- a/multiuser/machine-auth/pom.xml +++ b/multiuser/machine-auth/pom.xml @@ -17,7 +17,7 @@ che-multiuser-parent org.eclipse.che.multiuser - 7.66.0-SNAPSHOT + 7.67.0-SNAPSHOT ../pom.xml che-multiuser-machine-auth diff --git a/multiuser/oidc/pom.xml b/multiuser/oidc/pom.xml index 8e921ae0a0..568de9d972 100644 --- a/multiuser/oidc/pom.xml +++ b/multiuser/oidc/pom.xml @@ -17,7 +17,7 @@ che-multiuser-parent org.eclipse.che.multiuser - 7.66.0-SNAPSHOT + 7.67.0-SNAPSHOT che-multiuser-oidc jar diff --git a/multiuser/permission/che-multiuser-permission-devfile/pom.xml b/multiuser/permission/che-multiuser-permission-devfile/pom.xml index ea8c84e8a2..4822f1f702 100644 --- a/multiuser/permission/che-multiuser-permission-devfile/pom.xml +++ b/multiuser/permission/che-multiuser-permission-devfile/pom.xml @@ -17,7 +17,7 @@ che-multiuser-permission org.eclipse.che.multiuser - 7.66.0-SNAPSHOT + 7.67.0-SNAPSHOT che-multiuser-permission-devfile Che Multiuser :: Devfile Permissions diff --git a/multiuser/permission/che-multiuser-permission-logger/pom.xml b/multiuser/permission/che-multiuser-permission-logger/pom.xml index b77819029b..2e40c7e502 100644 --- a/multiuser/permission/che-multiuser-permission-logger/pom.xml +++ b/multiuser/permission/che-multiuser-permission-logger/pom.xml @@ -17,7 +17,7 @@ che-multiuser-permission org.eclipse.che.multiuser - 7.66.0-SNAPSHOT + 7.67.0-SNAPSHOT che-multiuser-permission-logger Che Multiuser :: Logger Permissions diff --git a/multiuser/permission/che-multiuser-permission-resource/pom.xml b/multiuser/permission/che-multiuser-permission-resource/pom.xml index 5773299aac..c34b2aca56 100644 --- a/multiuser/permission/che-multiuser-permission-resource/pom.xml +++ b/multiuser/permission/che-multiuser-permission-resource/pom.xml @@ -17,7 +17,7 @@ che-multiuser-permission org.eclipse.che.multiuser - 7.66.0-SNAPSHOT + 7.67.0-SNAPSHOT che-multiuser-permission-resource Che Multiuser :: Resource :: Permissions diff --git a/multiuser/permission/che-multiuser-permission-system/pom.xml b/multiuser/permission/che-multiuser-permission-system/pom.xml index 6dcf456914..bd91e3bb34 100644 --- a/multiuser/permission/che-multiuser-permission-system/pom.xml +++ b/multiuser/permission/che-multiuser-permission-system/pom.xml @@ -17,7 +17,7 @@ che-multiuser-permission org.eclipse.che.multiuser - 7.66.0-SNAPSHOT + 7.67.0-SNAPSHOT che-multiuser-permission-system Che Multiuser :: System Permissions diff --git a/multiuser/permission/che-multiuser-permission-user/pom.xml b/multiuser/permission/che-multiuser-permission-user/pom.xml index 856fafe019..3eccf8cae7 100644 --- a/multiuser/permission/che-multiuser-permission-user/pom.xml +++ b/multiuser/permission/che-multiuser-permission-user/pom.xml @@ -17,7 +17,7 @@ che-multiuser-permission org.eclipse.che.multiuser - 7.66.0-SNAPSHOT + 7.67.0-SNAPSHOT che-multiuser-permission-user Che Multiuser :: User Permissions diff --git a/multiuser/permission/che-multiuser-permission-workspace-activity/pom.xml b/multiuser/permission/che-multiuser-permission-workspace-activity/pom.xml index c520101f61..0e3791ff19 100644 --- a/multiuser/permission/che-multiuser-permission-workspace-activity/pom.xml +++ b/multiuser/permission/che-multiuser-permission-workspace-activity/pom.xml @@ -17,7 +17,7 @@ che-multiuser-permission org.eclipse.che.multiuser - 7.66.0-SNAPSHOT + 7.67.0-SNAPSHOT che-multiuser-permission-workspace-activity Che Multiuser :: Workspace Activity Permissions diff --git a/multiuser/permission/che-multiuser-permission-workspace/pom.xml b/multiuser/permission/che-multiuser-permission-workspace/pom.xml index 39cd08c081..1ae22106ca 100644 --- a/multiuser/permission/che-multiuser-permission-workspace/pom.xml +++ b/multiuser/permission/che-multiuser-permission-workspace/pom.xml @@ -17,7 +17,7 @@ che-multiuser-permission org.eclipse.che.multiuser - 7.66.0-SNAPSHOT + 7.67.0-SNAPSHOT che-multiuser-permission-workspace Che Multiuser :: Workspace Permissions diff --git a/multiuser/permission/pom.xml b/multiuser/permission/pom.xml index 7e7da66410..c58258d660 100644 --- a/multiuser/permission/pom.xml +++ b/multiuser/permission/pom.xml @@ -17,7 +17,7 @@ che-multiuser-parent org.eclipse.che.multiuser - 7.66.0-SNAPSHOT + 7.67.0-SNAPSHOT ../pom.xml che-multiuser-permission diff --git a/multiuser/personal-account/pom.xml b/multiuser/personal-account/pom.xml index 858b6564a5..81e2526309 100644 --- a/multiuser/personal-account/pom.xml +++ b/multiuser/personal-account/pom.xml @@ -17,7 +17,7 @@ che-multiuser-parent org.eclipse.che.multiuser - 7.66.0-SNAPSHOT + 7.67.0-SNAPSHOT che-multiuser-personal-account jar diff --git a/multiuser/pom.xml b/multiuser/pom.xml index c8455db1b3..47268b8a26 100644 --- a/multiuser/pom.xml +++ b/multiuser/pom.xml @@ -17,7 +17,7 @@ che-server org.eclipse.che - 7.66.0-SNAPSHOT + 7.67.0-SNAPSHOT ../pom.xml org.eclipse.che.multiuser diff --git a/multiuser/sql-schema/pom.xml b/multiuser/sql-schema/pom.xml index 3090f529a2..164d2a8c58 100644 --- a/multiuser/sql-schema/pom.xml +++ b/multiuser/sql-schema/pom.xml @@ -17,7 +17,7 @@ che-multiuser-parent org.eclipse.che.multiuser - 7.66.0-SNAPSHOT + 7.67.0-SNAPSHOT ../pom.xml che-multiuser-sql-schema diff --git a/pom.xml b/pom.xml index 3d74155662..04fcb83b25 100644 --- a/pom.xml +++ b/pom.xml @@ -16,7 +16,7 @@ 4.0.0 org.eclipse.che che-server - 7.66.0-SNAPSHOT + 7.67.0-SNAPSHOT pom Che Server Eclipse Che Server @@ -100,7 +100,7 @@ Red Hat, Inc. - initial API and implementation ${project.version} - 7.66.0-SNAPSHOT + 7.67.0-SNAPSHOT 1.0-beta2 Red Hat, Inc. diff --git a/typescript-dto/dto-pom.xml b/typescript-dto/dto-pom.xml index 2f487e095b..5b8413bb8c 100644 --- a/typescript-dto/dto-pom.xml +++ b/typescript-dto/dto-pom.xml @@ -23,7 +23,7 @@ pom Che TypeScript DTO - 7.66.0-SNAPSHOT + 7.67.0-SNAPSHOT diff --git a/wsmaster/che-core-api-account/pom.xml b/wsmaster/che-core-api-account/pom.xml index 6c840c6bdd..47d05d2afb 100644 --- a/wsmaster/che-core-api-account/pom.xml +++ b/wsmaster/che-core-api-account/pom.xml @@ -17,7 +17,7 @@ che-master-parent org.eclipse.che.core - 7.66.0-SNAPSHOT + 7.67.0-SNAPSHOT che-core-api-account Che Core :: API :: Account diff --git a/wsmaster/che-core-api-auth-azure-devops/pom.xml b/wsmaster/che-core-api-auth-azure-devops/pom.xml index 88e720c215..62079d2b4f 100644 --- a/wsmaster/che-core-api-auth-azure-devops/pom.xml +++ b/wsmaster/che-core-api-auth-azure-devops/pom.xml @@ -17,7 +17,7 @@ che-master-parent org.eclipse.che.core - 7.66.0-SNAPSHOT + 7.67.0-SNAPSHOT che-core-api-auth-azure-devops jar diff --git a/wsmaster/che-core-api-auth-bitbucket/pom.xml b/wsmaster/che-core-api-auth-bitbucket/pom.xml index 03c25578b5..6c31a87c3a 100644 --- a/wsmaster/che-core-api-auth-bitbucket/pom.xml +++ b/wsmaster/che-core-api-auth-bitbucket/pom.xml @@ -17,7 +17,7 @@ che-master-parent org.eclipse.che.core - 7.66.0-SNAPSHOT + 7.67.0-SNAPSHOT che-core-api-auth-bitbucket jar diff --git a/wsmaster/che-core-api-auth-github/pom.xml b/wsmaster/che-core-api-auth-github/pom.xml index d05c4e9d44..a1ddad429a 100644 --- a/wsmaster/che-core-api-auth-github/pom.xml +++ b/wsmaster/che-core-api-auth-github/pom.xml @@ -17,7 +17,7 @@ che-master-parent org.eclipse.che.core - 7.66.0-SNAPSHOT + 7.67.0-SNAPSHOT che-core-api-auth-github jar diff --git a/wsmaster/che-core-api-auth-gitlab/pom.xml b/wsmaster/che-core-api-auth-gitlab/pom.xml index ca653c0db0..a1623d3775 100644 --- a/wsmaster/che-core-api-auth-gitlab/pom.xml +++ b/wsmaster/che-core-api-auth-gitlab/pom.xml @@ -17,7 +17,7 @@ che-master-parent org.eclipse.che.core - 7.66.0-SNAPSHOT + 7.67.0-SNAPSHOT che-core-api-auth-gitlab jar diff --git a/wsmaster/che-core-api-auth-openshift/pom.xml b/wsmaster/che-core-api-auth-openshift/pom.xml index 93256e9673..9df079f74c 100644 --- a/wsmaster/che-core-api-auth-openshift/pom.xml +++ b/wsmaster/che-core-api-auth-openshift/pom.xml @@ -17,7 +17,7 @@ che-master-parent org.eclipse.che.core - 7.66.0-SNAPSHOT + 7.67.0-SNAPSHOT che-core-api-auth-openshift jar diff --git a/wsmaster/che-core-api-auth-shared/pom.xml b/wsmaster/che-core-api-auth-shared/pom.xml index bd2444b879..b0be7fb656 100644 --- a/wsmaster/che-core-api-auth-shared/pom.xml +++ b/wsmaster/che-core-api-auth-shared/pom.xml @@ -17,7 +17,7 @@ che-master-parent org.eclipse.che.core - 7.66.0-SNAPSHOT + 7.67.0-SNAPSHOT che-core-api-auth-shared jar diff --git a/wsmaster/che-core-api-auth/pom.xml b/wsmaster/che-core-api-auth/pom.xml index a17fa10cc4..9e106bf63c 100644 --- a/wsmaster/che-core-api-auth/pom.xml +++ b/wsmaster/che-core-api-auth/pom.xml @@ -17,7 +17,7 @@ che-master-parent org.eclipse.che.core - 7.66.0-SNAPSHOT + 7.67.0-SNAPSHOT che-core-api-auth jar diff --git a/wsmaster/che-core-api-devfile-shared/pom.xml b/wsmaster/che-core-api-devfile-shared/pom.xml index 04879f6317..b828712ff1 100644 --- a/wsmaster/che-core-api-devfile-shared/pom.xml +++ b/wsmaster/che-core-api-devfile-shared/pom.xml @@ -17,7 +17,7 @@ che-master-parent org.eclipse.che.core - 7.66.0-SNAPSHOT + 7.67.0-SNAPSHOT che-core-api-devfile-shared jar diff --git a/wsmaster/che-core-api-devfile/pom.xml b/wsmaster/che-core-api-devfile/pom.xml index becf79870c..82f8bcfa37 100644 --- a/wsmaster/che-core-api-devfile/pom.xml +++ b/wsmaster/che-core-api-devfile/pom.xml @@ -17,7 +17,7 @@ che-master-parent org.eclipse.che.core - 7.66.0-SNAPSHOT + 7.67.0-SNAPSHOT che-core-api-devfile jar diff --git a/wsmaster/che-core-api-factory-azure-devops/pom.xml b/wsmaster/che-core-api-factory-azure-devops/pom.xml index ccace498d1..bc1f995cf9 100644 --- a/wsmaster/che-core-api-factory-azure-devops/pom.xml +++ b/wsmaster/che-core-api-factory-azure-devops/pom.xml @@ -17,7 +17,7 @@ che-master-parent org.eclipse.che.core - 7.66.0-SNAPSHOT + 7.67.0-SNAPSHOT che-core-api-factory-azure-devops jar diff --git a/wsmaster/che-core-api-factory-bitbucket-server/pom.xml b/wsmaster/che-core-api-factory-bitbucket-server/pom.xml index d11d16e300..df54fa5d5d 100644 --- a/wsmaster/che-core-api-factory-bitbucket-server/pom.xml +++ b/wsmaster/che-core-api-factory-bitbucket-server/pom.xml @@ -17,7 +17,7 @@ che-master-parent org.eclipse.che.core - 7.66.0-SNAPSHOT + 7.67.0-SNAPSHOT che-core-api-factory-bitbucket-server jar diff --git a/wsmaster/che-core-api-factory-bitbucket/pom.xml b/wsmaster/che-core-api-factory-bitbucket/pom.xml index e088b58c61..65144cb889 100644 --- a/wsmaster/che-core-api-factory-bitbucket/pom.xml +++ b/wsmaster/che-core-api-factory-bitbucket/pom.xml @@ -17,7 +17,7 @@ che-master-parent org.eclipse.che.core - 7.66.0-SNAPSHOT + 7.67.0-SNAPSHOT che-core-api-factory-bitbucket jar diff --git a/wsmaster/che-core-api-factory-git-ssh/pom.xml b/wsmaster/che-core-api-factory-git-ssh/pom.xml index 56d54f51f3..de9b1fe249 100644 --- a/wsmaster/che-core-api-factory-git-ssh/pom.xml +++ b/wsmaster/che-core-api-factory-git-ssh/pom.xml @@ -17,7 +17,7 @@ che-master-parent org.eclipse.che.core - 7.66.0-SNAPSHOT + 7.67.0-SNAPSHOT che-core-api-factory-git-ssh jar diff --git a/wsmaster/che-core-api-factory-github/pom.xml b/wsmaster/che-core-api-factory-github/pom.xml index bd8bf21856..d0ab7bd600 100644 --- a/wsmaster/che-core-api-factory-github/pom.xml +++ b/wsmaster/che-core-api-factory-github/pom.xml @@ -17,7 +17,7 @@ che-master-parent org.eclipse.che.core - 7.66.0-SNAPSHOT + 7.67.0-SNAPSHOT che-core-api-factory-github jar diff --git a/wsmaster/che-core-api-factory-gitlab/pom.xml b/wsmaster/che-core-api-factory-gitlab/pom.xml index cc765436af..39701a3aa9 100644 --- a/wsmaster/che-core-api-factory-gitlab/pom.xml +++ b/wsmaster/che-core-api-factory-gitlab/pom.xml @@ -17,7 +17,7 @@ che-master-parent org.eclipse.che.core - 7.66.0-SNAPSHOT + 7.67.0-SNAPSHOT che-core-api-factory-gitlab jar diff --git a/wsmaster/che-core-api-factory-shared/pom.xml b/wsmaster/che-core-api-factory-shared/pom.xml index b573f60b0d..7e32761113 100644 --- a/wsmaster/che-core-api-factory-shared/pom.xml +++ b/wsmaster/che-core-api-factory-shared/pom.xml @@ -17,7 +17,7 @@ che-master-parent org.eclipse.che.core - 7.66.0-SNAPSHOT + 7.67.0-SNAPSHOT che-core-api-factory-shared jar diff --git a/wsmaster/che-core-api-factory/pom.xml b/wsmaster/che-core-api-factory/pom.xml index 8ea3c9e4da..279a3b0fad 100644 --- a/wsmaster/che-core-api-factory/pom.xml +++ b/wsmaster/che-core-api-factory/pom.xml @@ -17,7 +17,7 @@ che-master-parent org.eclipse.che.core - 7.66.0-SNAPSHOT + 7.67.0-SNAPSHOT che-core-api-factory jar diff --git a/wsmaster/che-core-api-logger-shared/pom.xml b/wsmaster/che-core-api-logger-shared/pom.xml index ff2d811c4d..a76aaa997f 100644 --- a/wsmaster/che-core-api-logger-shared/pom.xml +++ b/wsmaster/che-core-api-logger-shared/pom.xml @@ -17,7 +17,7 @@ che-master-parent org.eclipse.che.core - 7.66.0-SNAPSHOT + 7.67.0-SNAPSHOT che-core-api-logger-shared jar diff --git a/wsmaster/che-core-api-logger/pom.xml b/wsmaster/che-core-api-logger/pom.xml index 36c5aa4c17..c3e3834639 100644 --- a/wsmaster/che-core-api-logger/pom.xml +++ b/wsmaster/che-core-api-logger/pom.xml @@ -17,7 +17,7 @@ che-master-parent org.eclipse.che.core - 7.66.0-SNAPSHOT + 7.67.0-SNAPSHOT che-core-api-logger jar diff --git a/wsmaster/che-core-api-metrics/pom.xml b/wsmaster/che-core-api-metrics/pom.xml index c2a45a3ff5..6e95b54883 100644 --- a/wsmaster/che-core-api-metrics/pom.xml +++ b/wsmaster/che-core-api-metrics/pom.xml @@ -17,7 +17,7 @@ che-master-parent org.eclipse.che.core - 7.66.0-SNAPSHOT + 7.67.0-SNAPSHOT che-core-api-metrics jar diff --git a/wsmaster/che-core-api-ssh-shared/pom.xml b/wsmaster/che-core-api-ssh-shared/pom.xml index f01f690861..f4d2d7fdde 100644 --- a/wsmaster/che-core-api-ssh-shared/pom.xml +++ b/wsmaster/che-core-api-ssh-shared/pom.xml @@ -17,7 +17,7 @@ che-master-parent org.eclipse.che.core - 7.66.0-SNAPSHOT + 7.67.0-SNAPSHOT che-core-api-ssh-shared jar diff --git a/wsmaster/che-core-api-ssh/pom.xml b/wsmaster/che-core-api-ssh/pom.xml index f368ba4f82..6e18f416a7 100644 --- a/wsmaster/che-core-api-ssh/pom.xml +++ b/wsmaster/che-core-api-ssh/pom.xml @@ -17,7 +17,7 @@ che-master-parent org.eclipse.che.core - 7.66.0-SNAPSHOT + 7.67.0-SNAPSHOT che-core-api-ssh jar diff --git a/wsmaster/che-core-api-system-shared/pom.xml b/wsmaster/che-core-api-system-shared/pom.xml index 3c0be5cb0b..5aa6bc38f1 100644 --- a/wsmaster/che-core-api-system-shared/pom.xml +++ b/wsmaster/che-core-api-system-shared/pom.xml @@ -17,7 +17,7 @@ che-master-parent org.eclipse.che.core - 7.66.0-SNAPSHOT + 7.67.0-SNAPSHOT che-core-api-system-shared jar diff --git a/wsmaster/che-core-api-system/pom.xml b/wsmaster/che-core-api-system/pom.xml index 47203e9f4d..f0700219f8 100644 --- a/wsmaster/che-core-api-system/pom.xml +++ b/wsmaster/che-core-api-system/pom.xml @@ -17,7 +17,7 @@ che-master-parent org.eclipse.che.core - 7.66.0-SNAPSHOT + 7.67.0-SNAPSHOT che-core-api-system jar diff --git a/wsmaster/che-core-api-user-shared/pom.xml b/wsmaster/che-core-api-user-shared/pom.xml index 6868a8a855..c8efeb5b94 100644 --- a/wsmaster/che-core-api-user-shared/pom.xml +++ b/wsmaster/che-core-api-user-shared/pom.xml @@ -17,7 +17,7 @@ che-master-parent org.eclipse.che.core - 7.66.0-SNAPSHOT + 7.67.0-SNAPSHOT che-core-api-user-shared Che Core :: API :: User :: Shared diff --git a/wsmaster/che-core-api-user/pom.xml b/wsmaster/che-core-api-user/pom.xml index 79d27e5ffd..e773832a41 100644 --- a/wsmaster/che-core-api-user/pom.xml +++ b/wsmaster/che-core-api-user/pom.xml @@ -17,7 +17,7 @@ che-master-parent org.eclipse.che.core - 7.66.0-SNAPSHOT + 7.67.0-SNAPSHOT che-core-api-user Che Core :: API :: User diff --git a/wsmaster/che-core-api-workspace-activity/pom.xml b/wsmaster/che-core-api-workspace-activity/pom.xml index 9f94967c41..3a788e86bc 100644 --- a/wsmaster/che-core-api-workspace-activity/pom.xml +++ b/wsmaster/che-core-api-workspace-activity/pom.xml @@ -17,7 +17,7 @@ che-master-parent org.eclipse.che.core - 7.66.0-SNAPSHOT + 7.67.0-SNAPSHOT che-core-api-workspace-activity jar diff --git a/wsmaster/che-core-api-workspace-shared/pom.xml b/wsmaster/che-core-api-workspace-shared/pom.xml index da0b22743a..a3981b8ab2 100644 --- a/wsmaster/che-core-api-workspace-shared/pom.xml +++ b/wsmaster/che-core-api-workspace-shared/pom.xml @@ -17,7 +17,7 @@ che-master-parent org.eclipse.che.core - 7.66.0-SNAPSHOT + 7.67.0-SNAPSHOT che-core-api-workspace-shared jar diff --git a/wsmaster/che-core-api-workspace/pom.xml b/wsmaster/che-core-api-workspace/pom.xml index 54f6920ff2..88733b2580 100644 --- a/wsmaster/che-core-api-workspace/pom.xml +++ b/wsmaster/che-core-api-workspace/pom.xml @@ -17,7 +17,7 @@ che-master-parent org.eclipse.che.core - 7.66.0-SNAPSHOT + 7.67.0-SNAPSHOT che-core-api-workspace jar diff --git a/wsmaster/che-core-sql-schema/pom.xml b/wsmaster/che-core-sql-schema/pom.xml index 98f14a90ec..546e31347a 100644 --- a/wsmaster/che-core-sql-schema/pom.xml +++ b/wsmaster/che-core-sql-schema/pom.xml @@ -17,7 +17,7 @@ che-master-parent org.eclipse.che.core - 7.66.0-SNAPSHOT + 7.67.0-SNAPSHOT che-core-sql-schema Che Core :: SQL :: Schema diff --git a/wsmaster/integration-tests/cascade-removal/pom.xml b/wsmaster/integration-tests/cascade-removal/pom.xml index 09fcd8e690..fc34ecb87c 100644 --- a/wsmaster/integration-tests/cascade-removal/pom.xml +++ b/wsmaster/integration-tests/cascade-removal/pom.xml @@ -17,7 +17,7 @@ integration-tests-parent org.eclipse.che.core - 7.66.0-SNAPSHOT + 7.67.0-SNAPSHOT cascade-removal Integration Tests :: Cascade Removal diff --git a/wsmaster/integration-tests/mysql-tck/pom.xml b/wsmaster/integration-tests/mysql-tck/pom.xml index 04485bcc03..7783eea368 100644 --- a/wsmaster/integration-tests/mysql-tck/pom.xml +++ b/wsmaster/integration-tests/mysql-tck/pom.xml @@ -17,7 +17,7 @@ integration-tests-parent org.eclipse.che.core - 7.66.0-SNAPSHOT + 7.67.0-SNAPSHOT mysql-tck jar diff --git a/wsmaster/integration-tests/pom.xml b/wsmaster/integration-tests/pom.xml index 47d904aa77..75e2f7b5cc 100644 --- a/wsmaster/integration-tests/pom.xml +++ b/wsmaster/integration-tests/pom.xml @@ -17,7 +17,7 @@ che-master-parent org.eclipse.che.core - 7.66.0-SNAPSHOT + 7.67.0-SNAPSHOT ../pom.xml integration-tests-parent diff --git a/wsmaster/integration-tests/postgresql-tck/pom.xml b/wsmaster/integration-tests/postgresql-tck/pom.xml index a93b5d520a..c287bd4876 100644 --- a/wsmaster/integration-tests/postgresql-tck/pom.xml +++ b/wsmaster/integration-tests/postgresql-tck/pom.xml @@ -17,7 +17,7 @@ integration-tests-parent org.eclipse.che.core - 7.66.0-SNAPSHOT + 7.67.0-SNAPSHOT postgresql-tck jar diff --git a/wsmaster/pom.xml b/wsmaster/pom.xml index 3395cc705b..083d3f81f0 100644 --- a/wsmaster/pom.xml +++ b/wsmaster/pom.xml @@ -17,7 +17,7 @@ che-core-parent org.eclipse.che.core - 7.66.0-SNAPSHOT + 7.67.0-SNAPSHOT ../core/pom.xml che-master-parent From cefc638dadbef350735616ae9ec01eaeadb1b711 Mon Sep 17 00:00:00 2001 From: Igor Vinokur Date: Tue, 16 May 2023 13:53:10 +0300 Subject: [PATCH 16/75] Pass user slug instead of user id when creating a PAT for bitbucket-server (#512) Pass user neme instead of user id when creating a PAT secret for bitbucket-server in order to fix the generation of thegit-credentials-secret secret which requires the user name: https://:@. --- .../BitbucketServerPersonalAccessTokenFetcher.java | 2 +- ...BitbucketServerPersonalAccessTokenFetcherTest.java | 11 ++++++++++- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/wsmaster/che-core-api-factory-bitbucket-server/src/main/java/org/eclipse/che/api/factory/server/bitbucket/BitbucketServerPersonalAccessTokenFetcher.java b/wsmaster/che-core-api-factory-bitbucket-server/src/main/java/org/eclipse/che/api/factory/server/bitbucket/BitbucketServerPersonalAccessTokenFetcher.java index 157387e30e..50ae813f7b 100644 --- a/wsmaster/che-core-api-factory-bitbucket-server/src/main/java/org/eclipse/che/api/factory/server/bitbucket/BitbucketServerPersonalAccessTokenFetcher.java +++ b/wsmaster/che-core-api-factory-bitbucket-server/src/main/java/org/eclipse/che/api/factory/server/bitbucket/BitbucketServerPersonalAccessTokenFetcher.java @@ -97,7 +97,7 @@ public class BitbucketServerPersonalAccessTokenFetcher implements PersonalAccess scmServerUrl, EnvironmentContext.getCurrent().getSubject().getUserId(), user.getName(), - valueOf(user.getId()), + user.getSlug(), token.getName(), valueOf(token.getId()), token.getToken()); diff --git a/wsmaster/che-core-api-factory-bitbucket-server/src/test/java/org/eclipse/che/api/factory/server/bitbucket/BitbucketServerPersonalAccessTokenFetcherTest.java b/wsmaster/che-core-api-factory-bitbucket-server/src/test/java/org/eclipse/che/api/factory/server/bitbucket/BitbucketServerPersonalAccessTokenFetcherTest.java index 058f40be47..ad2843634d 100644 --- a/wsmaster/che-core-api-factory-bitbucket-server/src/test/java/org/eclipse/che/api/factory/server/bitbucket/BitbucketServerPersonalAccessTokenFetcherTest.java +++ b/wsmaster/che-core-api-factory-bitbucket-server/src/test/java/org/eclipse/che/api/factory/server/bitbucket/BitbucketServerPersonalAccessTokenFetcherTest.java @@ -11,11 +11,13 @@ */ package org.eclipse.che.api.factory.server.bitbucket; +import static java.lang.String.valueOf; import static org.mockito.ArgumentMatchers.eq; import static org.mockito.Mockito.doThrow; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.verify; import static org.mockito.Mockito.when; +import static org.testng.Assert.assertEquals; import static org.testng.Assert.assertFalse; import static org.testng.Assert.assertNotNull; import static org.testng.Assert.assertNull; @@ -72,7 +74,8 @@ public class BitbucketServerPersonalAccessTokenFetcherTest { URL apiEndpoint = new URL("https://che.server.com"); subject = new SubjectImpl("another_user", "user987", "token111", false); bitbucketUser = - new BitbucketUser("User", "user", 32423523, "NORMAL", true, "user", "user@users.com"); + new BitbucketUser( + "User User", "user-name", 32423523, "NORMAL", true, "user-slug", "user@users.com"); bitbucketPersonalAccessToken = new BitbucketPersonalAccessToken( 234234, @@ -153,6 +156,12 @@ public class BitbucketServerPersonalAccessTokenFetcherTest { PersonalAccessToken result = fetcher.fetchPersonalAccessToken(subject, someBitbucketURL); // then assertNotNull(result); + assertEquals(result.getScmProviderUrl(), someBitbucketURL); + assertEquals(result.getCheUserId(), subject.getUserId()); + assertEquals(result.getScmOrganization(), bitbucketUser.getName()); + assertEquals(result.getScmUserName(), bitbucketUser.getSlug()); + assertEquals(result.getScmTokenId(), valueOf(bitbucketPersonalAccessToken.getId())); + assertEquals(result.getToken(), bitbucketPersonalAccessToken.getToken()); } @Test From 559de5a7f1a996e3680a0de1efd559dfea80d922 Mon Sep 17 00:00:00 2001 From: Mykhailo Kuznietsov Date: Wed, 17 May 2023 16:18:23 +0000 Subject: [PATCH 17/75] chore: Bump to 7.68.0-SNAPSHOT in main Signed-off-by: Mykhailo Kuznietsov --- assembly/assembly-che-tomcat/pom.xml | 2 +- assembly/assembly-main/pom.xml | 2 +- assembly/assembly-root-war/pom.xml | 2 +- assembly/assembly-swagger-war/pom.xml | 2 +- assembly/assembly-wsmaster-war/pom.xml | 2 +- assembly/pom.xml | 2 +- core/che-core-api-core/pom.xml | 2 +- core/che-core-api-dto-maven-plugin/pom.xml | 2 +- core/che-core-api-dto/pom.xml | 2 +- core/che-core-api-model/pom.xml | 2 +- core/che-core-db-vendor-h2/pom.xml | 2 +- core/che-core-db-vendor-mysql/pom.xml | 2 +- core/che-core-db-vendor-postgresql/pom.xml | 2 +- core/che-core-db/pom.xml | 2 +- core/che-core-logback/pom.xml | 2 +- core/che-core-metrics-core/pom.xml | 2 +- core/che-core-tracing-core/pom.xml | 2 +- core/che-core-tracing-metrics/pom.xml | 2 +- core/che-core-tracing-web/pom.xml | 2 +- core/che-core-typescript-dto-maven-plugin/pom.xml | 2 +- core/commons/che-core-commons-annotations/pom.xml | 2 +- core/commons/che-core-commons-inject/pom.xml | 2 +- core/commons/che-core-commons-j2ee/pom.xml | 2 +- core/commons/che-core-commons-json/pom.xml | 2 +- core/commons/che-core-commons-lang/pom.xml | 2 +- core/commons/che-core-commons-observability/pom.xml | 2 +- core/commons/che-core-commons-schedule/pom.xml | 2 +- core/commons/che-core-commons-test/pom.xml | 2 +- core/commons/che-core-commons-tracing/pom.xml | 2 +- core/commons/pom.xml | 2 +- core/pom.xml | 2 +- infrastructures/infrastructure-distributed/pom.xml | 2 +- infrastructures/infrastructure-factory/pom.xml | 2 +- infrastructures/infrastructure-metrics/pom.xml | 2 +- infrastructures/infrastructure-permission/pom.xml | 2 +- infrastructures/kubernetes/pom.xml | 2 +- infrastructures/openshift/pom.xml | 2 +- infrastructures/pom.xml | 2 +- .../api/che-multiuser-api-authentication-commons/pom.xml | 2 +- multiuser/api/che-multiuser-api-authorization-impl/pom.xml | 2 +- multiuser/api/che-multiuser-api-authorization/pom.xml | 2 +- multiuser/api/che-multiuser-api-organization-shared/pom.xml | 2 +- multiuser/api/che-multiuser-api-organization/pom.xml | 2 +- multiuser/api/che-multiuser-api-permission-shared/pom.xml | 2 +- multiuser/api/che-multiuser-api-permission/pom.xml | 2 +- multiuser/api/che-multiuser-api-resource-shared/pom.xml | 2 +- multiuser/api/che-multiuser-api-resource/pom.xml | 2 +- multiuser/api/che-multiuser-api-workspace-activity/pom.xml | 2 +- multiuser/api/pom.xml | 2 +- .../integration-tests/che-multiuser-cascade-removal/pom.xml | 2 +- multiuser/integration-tests/che-multiuser-mysql-tck/pom.xml | 2 +- .../integration-tests/che-multiuser-postgresql-tck/pom.xml | 2 +- multiuser/integration-tests/pom.xml | 2 +- multiuser/keycloak/che-multiuser-keycloak-server/pom.xml | 2 +- multiuser/keycloak/che-multiuser-keycloak-shared/pom.xml | 2 +- .../keycloak/che-multiuser-keycloak-token-provider/pom.xml | 2 +- .../keycloak/che-multiuser-keycloak-user-remover/pom.xml | 2 +- multiuser/keycloak/pom.xml | 2 +- .../che-multiuser-machine-authentication-shared/pom.xml | 2 +- .../machine-auth/che-multiuser-machine-authentication/pom.xml | 2 +- multiuser/machine-auth/pom.xml | 2 +- multiuser/oidc/pom.xml | 2 +- multiuser/permission/che-multiuser-permission-devfile/pom.xml | 2 +- multiuser/permission/che-multiuser-permission-logger/pom.xml | 2 +- .../permission/che-multiuser-permission-resource/pom.xml | 2 +- multiuser/permission/che-multiuser-permission-system/pom.xml | 2 +- multiuser/permission/che-multiuser-permission-user/pom.xml | 2 +- .../che-multiuser-permission-workspace-activity/pom.xml | 2 +- .../permission/che-multiuser-permission-workspace/pom.xml | 2 +- multiuser/permission/pom.xml | 2 +- multiuser/personal-account/pom.xml | 2 +- multiuser/pom.xml | 2 +- multiuser/sql-schema/pom.xml | 2 +- pom.xml | 4 ++-- typescript-dto/dto-pom.xml | 2 +- wsmaster/che-core-api-account/pom.xml | 2 +- wsmaster/che-core-api-auth-azure-devops/pom.xml | 2 +- wsmaster/che-core-api-auth-bitbucket/pom.xml | 2 +- wsmaster/che-core-api-auth-github/pom.xml | 2 +- wsmaster/che-core-api-auth-gitlab/pom.xml | 2 +- wsmaster/che-core-api-auth-openshift/pom.xml | 2 +- wsmaster/che-core-api-auth-shared/pom.xml | 2 +- wsmaster/che-core-api-auth/pom.xml | 2 +- wsmaster/che-core-api-devfile-shared/pom.xml | 2 +- wsmaster/che-core-api-devfile/pom.xml | 2 +- wsmaster/che-core-api-factory-azure-devops/pom.xml | 2 +- wsmaster/che-core-api-factory-bitbucket-server/pom.xml | 2 +- wsmaster/che-core-api-factory-bitbucket/pom.xml | 2 +- wsmaster/che-core-api-factory-git-ssh/pom.xml | 2 +- wsmaster/che-core-api-factory-github/pom.xml | 2 +- wsmaster/che-core-api-factory-gitlab/pom.xml | 2 +- wsmaster/che-core-api-factory-shared/pom.xml | 2 +- wsmaster/che-core-api-factory/pom.xml | 2 +- wsmaster/che-core-api-logger-shared/pom.xml | 2 +- wsmaster/che-core-api-logger/pom.xml | 2 +- wsmaster/che-core-api-metrics/pom.xml | 2 +- wsmaster/che-core-api-ssh-shared/pom.xml | 2 +- wsmaster/che-core-api-ssh/pom.xml | 2 +- wsmaster/che-core-api-system-shared/pom.xml | 2 +- wsmaster/che-core-api-system/pom.xml | 2 +- wsmaster/che-core-api-user-shared/pom.xml | 2 +- wsmaster/che-core-api-user/pom.xml | 2 +- wsmaster/che-core-api-workspace-activity/pom.xml | 2 +- wsmaster/che-core-api-workspace-shared/pom.xml | 2 +- wsmaster/che-core-api-workspace/pom.xml | 2 +- wsmaster/che-core-sql-schema/pom.xml | 2 +- wsmaster/integration-tests/cascade-removal/pom.xml | 2 +- wsmaster/integration-tests/mysql-tck/pom.xml | 2 +- wsmaster/integration-tests/pom.xml | 2 +- wsmaster/integration-tests/postgresql-tck/pom.xml | 2 +- wsmaster/pom.xml | 2 +- 111 files changed, 112 insertions(+), 112 deletions(-) diff --git a/assembly/assembly-che-tomcat/pom.xml b/assembly/assembly-che-tomcat/pom.xml index 067d651f02..fb87d40eaa 100644 --- a/assembly/assembly-che-tomcat/pom.xml +++ b/assembly/assembly-che-tomcat/pom.xml @@ -17,7 +17,7 @@ che-assembly-parent org.eclipse.che - 7.67.0-SNAPSHOT + 7.68.0-SNAPSHOT assembly-che-tomcat jar diff --git a/assembly/assembly-main/pom.xml b/assembly/assembly-main/pom.xml index 46fdfa55a2..d4c96bcd2e 100644 --- a/assembly/assembly-main/pom.xml +++ b/assembly/assembly-main/pom.xml @@ -17,7 +17,7 @@ che-assembly-parent org.eclipse.che - 7.67.0-SNAPSHOT + 7.68.0-SNAPSHOT assembly-main pom diff --git a/assembly/assembly-root-war/pom.xml b/assembly/assembly-root-war/pom.xml index 11b26224a9..45ebbc09a9 100644 --- a/assembly/assembly-root-war/pom.xml +++ b/assembly/assembly-root-war/pom.xml @@ -17,7 +17,7 @@ che-assembly-parent org.eclipse.che - 7.67.0-SNAPSHOT + 7.68.0-SNAPSHOT assembly-root-war war diff --git a/assembly/assembly-swagger-war/pom.xml b/assembly/assembly-swagger-war/pom.xml index bb03a2e6d3..de923d3f99 100644 --- a/assembly/assembly-swagger-war/pom.xml +++ b/assembly/assembly-swagger-war/pom.xml @@ -17,7 +17,7 @@ che-assembly-parent org.eclipse.che - 7.67.0-SNAPSHOT + 7.68.0-SNAPSHOT assembly-swagger-war war diff --git a/assembly/assembly-wsmaster-war/pom.xml b/assembly/assembly-wsmaster-war/pom.xml index ab9f6350eb..482a92573d 100644 --- a/assembly/assembly-wsmaster-war/pom.xml +++ b/assembly/assembly-wsmaster-war/pom.xml @@ -17,7 +17,7 @@ che-assembly-parent org.eclipse.che - 7.67.0-SNAPSHOT + 7.68.0-SNAPSHOT assembly-wsmaster-war war diff --git a/assembly/pom.xml b/assembly/pom.xml index 70ff503699..ea6f5172e5 100644 --- a/assembly/pom.xml +++ b/assembly/pom.xml @@ -17,7 +17,7 @@ che-server org.eclipse.che - 7.67.0-SNAPSHOT + 7.68.0-SNAPSHOT ../pom.xml che-assembly-parent diff --git a/core/che-core-api-core/pom.xml b/core/che-core-api-core/pom.xml index f9d952ce15..b164567122 100644 --- a/core/che-core-api-core/pom.xml +++ b/core/che-core-api-core/pom.xml @@ -17,7 +17,7 @@ che-core-parent org.eclipse.che.core - 7.67.0-SNAPSHOT + 7.68.0-SNAPSHOT che-core-api-core jar diff --git a/core/che-core-api-dto-maven-plugin/pom.xml b/core/che-core-api-dto-maven-plugin/pom.xml index 4698810e50..7c375c87fa 100644 --- a/core/che-core-api-dto-maven-plugin/pom.xml +++ b/core/che-core-api-dto-maven-plugin/pom.xml @@ -17,7 +17,7 @@ che-core-parent org.eclipse.che.core - 7.67.0-SNAPSHOT + 7.68.0-SNAPSHOT che-core-api-dto-maven-plugin maven-plugin diff --git a/core/che-core-api-dto/pom.xml b/core/che-core-api-dto/pom.xml index f382f15a69..042ef01ab0 100644 --- a/core/che-core-api-dto/pom.xml +++ b/core/che-core-api-dto/pom.xml @@ -17,7 +17,7 @@ che-core-parent org.eclipse.che.core - 7.67.0-SNAPSHOT + 7.68.0-SNAPSHOT che-core-api-dto jar diff --git a/core/che-core-api-model/pom.xml b/core/che-core-api-model/pom.xml index 3711f21afa..c1e0dcde9d 100644 --- a/core/che-core-api-model/pom.xml +++ b/core/che-core-api-model/pom.xml @@ -17,7 +17,7 @@ che-core-parent org.eclipse.che.core - 7.67.0-SNAPSHOT + 7.68.0-SNAPSHOT che-core-api-model jar diff --git a/core/che-core-db-vendor-h2/pom.xml b/core/che-core-db-vendor-h2/pom.xml index 8143b08aad..0e967e8a82 100644 --- a/core/che-core-db-vendor-h2/pom.xml +++ b/core/che-core-db-vendor-h2/pom.xml @@ -17,7 +17,7 @@ che-core-parent org.eclipse.che.core - 7.67.0-SNAPSHOT + 7.68.0-SNAPSHOT che-core-db-vendor-h2 Che Core :: Commons :: DB :: Vendor H2 diff --git a/core/che-core-db-vendor-mysql/pom.xml b/core/che-core-db-vendor-mysql/pom.xml index 7a54621f49..7628d07df3 100644 --- a/core/che-core-db-vendor-mysql/pom.xml +++ b/core/che-core-db-vendor-mysql/pom.xml @@ -17,7 +17,7 @@ che-core-parent org.eclipse.che.core - 7.67.0-SNAPSHOT + 7.68.0-SNAPSHOT che-core-db-vendor-mysql Che Core :: Commons :: DB :: Vendor MySQL diff --git a/core/che-core-db-vendor-postgresql/pom.xml b/core/che-core-db-vendor-postgresql/pom.xml index 87e3edf1a9..b489b6584d 100644 --- a/core/che-core-db-vendor-postgresql/pom.xml +++ b/core/che-core-db-vendor-postgresql/pom.xml @@ -17,7 +17,7 @@ che-core-parent org.eclipse.che.core - 7.67.0-SNAPSHOT + 7.68.0-SNAPSHOT che-core-db-vendor-postgresql Che Core :: Commons :: DB :: Vendor PostgreSQL diff --git a/core/che-core-db/pom.xml b/core/che-core-db/pom.xml index 7f9a93590a..854cbe25fe 100644 --- a/core/che-core-db/pom.xml +++ b/core/che-core-db/pom.xml @@ -17,7 +17,7 @@ che-core-parent org.eclipse.che.core - 7.67.0-SNAPSHOT + 7.68.0-SNAPSHOT che-core-db Che Core :: Commons :: DB diff --git a/core/che-core-logback/pom.xml b/core/che-core-logback/pom.xml index 71cf280943..21838be36d 100644 --- a/core/che-core-logback/pom.xml +++ b/core/che-core-logback/pom.xml @@ -17,7 +17,7 @@ che-core-parent org.eclipse.che.core - 7.67.0-SNAPSHOT + 7.68.0-SNAPSHOT che-core-logback jar diff --git a/core/che-core-metrics-core/pom.xml b/core/che-core-metrics-core/pom.xml index 1ff73e26df..f4a20bf6da 100644 --- a/core/che-core-metrics-core/pom.xml +++ b/core/che-core-metrics-core/pom.xml @@ -17,7 +17,7 @@ che-core-parent org.eclipse.che.core - 7.67.0-SNAPSHOT + 7.68.0-SNAPSHOT che-core-metrics-core Che Core :: Commons :: Metrics :: Core diff --git a/core/che-core-tracing-core/pom.xml b/core/che-core-tracing-core/pom.xml index c5c759d206..f731cb193a 100644 --- a/core/che-core-tracing-core/pom.xml +++ b/core/che-core-tracing-core/pom.xml @@ -17,7 +17,7 @@ che-core-parent org.eclipse.che.core - 7.67.0-SNAPSHOT + 7.68.0-SNAPSHOT che-core-tracing-core Che Core :: Commons :: Tracing :: Core diff --git a/core/che-core-tracing-metrics/pom.xml b/core/che-core-tracing-metrics/pom.xml index 7efdf17b1d..74b04f9583 100644 --- a/core/che-core-tracing-metrics/pom.xml +++ b/core/che-core-tracing-metrics/pom.xml @@ -17,7 +17,7 @@ che-core-parent org.eclipse.che.core - 7.67.0-SNAPSHOT + 7.68.0-SNAPSHOT che-core-tracing-metrics Che Core :: Commons :: Tracing :: Metrics diff --git a/core/che-core-tracing-web/pom.xml b/core/che-core-tracing-web/pom.xml index 10385ab443..05a0746aa3 100644 --- a/core/che-core-tracing-web/pom.xml +++ b/core/che-core-tracing-web/pom.xml @@ -17,7 +17,7 @@ che-core-parent org.eclipse.che.core - 7.67.0-SNAPSHOT + 7.68.0-SNAPSHOT che-core-tracing-web Che Core :: Commons :: Tracing :: Web diff --git a/core/che-core-typescript-dto-maven-plugin/pom.xml b/core/che-core-typescript-dto-maven-plugin/pom.xml index 018e2ba7f0..f811362a57 100644 --- a/core/che-core-typescript-dto-maven-plugin/pom.xml +++ b/core/che-core-typescript-dto-maven-plugin/pom.xml @@ -17,7 +17,7 @@ che-core-parent org.eclipse.che.core - 7.67.0-SNAPSHOT + 7.68.0-SNAPSHOT che-core-typescript-dto-maven-plugin maven-plugin diff --git a/core/commons/che-core-commons-annotations/pom.xml b/core/commons/che-core-commons-annotations/pom.xml index 8d0bebd65d..1b77160415 100644 --- a/core/commons/che-core-commons-annotations/pom.xml +++ b/core/commons/che-core-commons-annotations/pom.xml @@ -17,7 +17,7 @@ che-core-commons-parent org.eclipse.che.core - 7.67.0-SNAPSHOT + 7.68.0-SNAPSHOT che-core-commons-annotations jar diff --git a/core/commons/che-core-commons-inject/pom.xml b/core/commons/che-core-commons-inject/pom.xml index 4e81e2b974..93f465491e 100644 --- a/core/commons/che-core-commons-inject/pom.xml +++ b/core/commons/che-core-commons-inject/pom.xml @@ -17,7 +17,7 @@ che-core-commons-parent org.eclipse.che.core - 7.67.0-SNAPSHOT + 7.68.0-SNAPSHOT che-core-commons-inject jar diff --git a/core/commons/che-core-commons-j2ee/pom.xml b/core/commons/che-core-commons-j2ee/pom.xml index 3851d53567..102ac81e3b 100644 --- a/core/commons/che-core-commons-j2ee/pom.xml +++ b/core/commons/che-core-commons-j2ee/pom.xml @@ -17,7 +17,7 @@ che-core-commons-parent org.eclipse.che.core - 7.67.0-SNAPSHOT + 7.68.0-SNAPSHOT che-core-commons-j2ee jar diff --git a/core/commons/che-core-commons-json/pom.xml b/core/commons/che-core-commons-json/pom.xml index 2b235d27e9..dc3ad186fa 100644 --- a/core/commons/che-core-commons-json/pom.xml +++ b/core/commons/che-core-commons-json/pom.xml @@ -17,7 +17,7 @@ che-core-commons-parent org.eclipse.che.core - 7.67.0-SNAPSHOT + 7.68.0-SNAPSHOT che-core-commons-json jar diff --git a/core/commons/che-core-commons-lang/pom.xml b/core/commons/che-core-commons-lang/pom.xml index 78fcafbbd9..8d059b052a 100644 --- a/core/commons/che-core-commons-lang/pom.xml +++ b/core/commons/che-core-commons-lang/pom.xml @@ -17,7 +17,7 @@ che-core-commons-parent org.eclipse.che.core - 7.67.0-SNAPSHOT + 7.68.0-SNAPSHOT che-core-commons-lang jar diff --git a/core/commons/che-core-commons-observability/pom.xml b/core/commons/che-core-commons-observability/pom.xml index 457f6e78b4..5bdb9a7c31 100644 --- a/core/commons/che-core-commons-observability/pom.xml +++ b/core/commons/che-core-commons-observability/pom.xml @@ -17,7 +17,7 @@ che-core-commons-parent org.eclipse.che.core - 7.67.0-SNAPSHOT + 7.68.0-SNAPSHOT che-core-commons-observability Che Core :: Commons :: Tracing and Monitoring wrapper diff --git a/core/commons/che-core-commons-schedule/pom.xml b/core/commons/che-core-commons-schedule/pom.xml index a093cb3c5a..1c00a9ec79 100644 --- a/core/commons/che-core-commons-schedule/pom.xml +++ b/core/commons/che-core-commons-schedule/pom.xml @@ -17,7 +17,7 @@ che-core-commons-parent org.eclipse.che.core - 7.67.0-SNAPSHOT + 7.68.0-SNAPSHOT che-core-commons-schedule jar diff --git a/core/commons/che-core-commons-test/pom.xml b/core/commons/che-core-commons-test/pom.xml index b05236e3b0..a26297935b 100644 --- a/core/commons/che-core-commons-test/pom.xml +++ b/core/commons/che-core-commons-test/pom.xml @@ -17,7 +17,7 @@ che-core-commons-parent org.eclipse.che.core - 7.67.0-SNAPSHOT + 7.68.0-SNAPSHOT che-core-commons-test jar diff --git a/core/commons/che-core-commons-tracing/pom.xml b/core/commons/che-core-commons-tracing/pom.xml index 94680276ca..3530b3fb5d 100644 --- a/core/commons/che-core-commons-tracing/pom.xml +++ b/core/commons/che-core-commons-tracing/pom.xml @@ -17,7 +17,7 @@ che-core-commons-parent org.eclipse.che.core - 7.67.0-SNAPSHOT + 7.68.0-SNAPSHOT che-core-commons-tracing Che Core :: Commons :: Tracing diff --git a/core/commons/pom.xml b/core/commons/pom.xml index 71af3800a6..99b054d574 100644 --- a/core/commons/pom.xml +++ b/core/commons/pom.xml @@ -17,7 +17,7 @@ che-core-parent org.eclipse.che.core - 7.67.0-SNAPSHOT + 7.68.0-SNAPSHOT ../pom.xml che-core-commons-parent diff --git a/core/pom.xml b/core/pom.xml index a5e980f14d..cd648a0a84 100644 --- a/core/pom.xml +++ b/core/pom.xml @@ -17,7 +17,7 @@ che-server org.eclipse.che - 7.67.0-SNAPSHOT + 7.68.0-SNAPSHOT ../pom.xml org.eclipse.che.core diff --git a/infrastructures/infrastructure-distributed/pom.xml b/infrastructures/infrastructure-distributed/pom.xml index e36a3c2c90..d97fd380c5 100644 --- a/infrastructures/infrastructure-distributed/pom.xml +++ b/infrastructures/infrastructure-distributed/pom.xml @@ -17,7 +17,7 @@ che-infrastructures-parent org.eclipse.che.infrastructure - 7.67.0-SNAPSHOT + 7.68.0-SNAPSHOT infrastructure-distributed jar diff --git a/infrastructures/infrastructure-factory/pom.xml b/infrastructures/infrastructure-factory/pom.xml index d89615b38b..d22dd2c550 100644 --- a/infrastructures/infrastructure-factory/pom.xml +++ b/infrastructures/infrastructure-factory/pom.xml @@ -17,7 +17,7 @@ che-infrastructures-parent org.eclipse.che.infrastructure - 7.67.0-SNAPSHOT + 7.68.0-SNAPSHOT infrastructure-factory jar diff --git a/infrastructures/infrastructure-metrics/pom.xml b/infrastructures/infrastructure-metrics/pom.xml index 8d5c336b81..7eea92dc78 100644 --- a/infrastructures/infrastructure-metrics/pom.xml +++ b/infrastructures/infrastructure-metrics/pom.xml @@ -17,7 +17,7 @@ che-infrastructures-parent org.eclipse.che.infrastructure - 7.67.0-SNAPSHOT + 7.68.0-SNAPSHOT ../pom.xml infrastructure-metrics diff --git a/infrastructures/infrastructure-permission/pom.xml b/infrastructures/infrastructure-permission/pom.xml index faee4319b5..8be95ca560 100644 --- a/infrastructures/infrastructure-permission/pom.xml +++ b/infrastructures/infrastructure-permission/pom.xml @@ -17,7 +17,7 @@ che-infrastructures-parent org.eclipse.che.infrastructure - 7.67.0-SNAPSHOT + 7.68.0-SNAPSHOT infrastructure-permission Infrastructure :: Kubernetes Permissions diff --git a/infrastructures/kubernetes/pom.xml b/infrastructures/kubernetes/pom.xml index 6f1b15386e..ec9011e8f7 100644 --- a/infrastructures/kubernetes/pom.xml +++ b/infrastructures/kubernetes/pom.xml @@ -17,7 +17,7 @@ che-infrastructures-parent org.eclipse.che.infrastructure - 7.67.0-SNAPSHOT + 7.68.0-SNAPSHOT infrastructure-kubernetes Infrastructure :: Kubernetes diff --git a/infrastructures/openshift/pom.xml b/infrastructures/openshift/pom.xml index e87a428004..521aa6f164 100644 --- a/infrastructures/openshift/pom.xml +++ b/infrastructures/openshift/pom.xml @@ -17,7 +17,7 @@ che-infrastructures-parent org.eclipse.che.infrastructure - 7.67.0-SNAPSHOT + 7.68.0-SNAPSHOT infrastructure-openshift Infrastructure :: OpenShift diff --git a/infrastructures/pom.xml b/infrastructures/pom.xml index 9d72d41eec..0a71e7a50d 100644 --- a/infrastructures/pom.xml +++ b/infrastructures/pom.xml @@ -17,7 +17,7 @@ che-server org.eclipse.che - 7.67.0-SNAPSHOT + 7.68.0-SNAPSHOT ../pom.xml org.eclipse.che.infrastructure diff --git a/multiuser/api/che-multiuser-api-authentication-commons/pom.xml b/multiuser/api/che-multiuser-api-authentication-commons/pom.xml index 5fb8f56968..b09ed019c0 100644 --- a/multiuser/api/che-multiuser-api-authentication-commons/pom.xml +++ b/multiuser/api/che-multiuser-api-authentication-commons/pom.xml @@ -17,7 +17,7 @@ che-multiuser-api org.eclipse.che.multiuser - 7.67.0-SNAPSHOT + 7.68.0-SNAPSHOT che-multiuser-api-authentication-commons jar diff --git a/multiuser/api/che-multiuser-api-authorization-impl/pom.xml b/multiuser/api/che-multiuser-api-authorization-impl/pom.xml index 164e7d036f..108b0a3a41 100644 --- a/multiuser/api/che-multiuser-api-authorization-impl/pom.xml +++ b/multiuser/api/che-multiuser-api-authorization-impl/pom.xml @@ -17,7 +17,7 @@ che-multiuser-api org.eclipse.che.multiuser - 7.67.0-SNAPSHOT + 7.68.0-SNAPSHOT che-multiuser-api-authorization-impl jar diff --git a/multiuser/api/che-multiuser-api-authorization/pom.xml b/multiuser/api/che-multiuser-api-authorization/pom.xml index 4b81d98e65..037afc733a 100644 --- a/multiuser/api/che-multiuser-api-authorization/pom.xml +++ b/multiuser/api/che-multiuser-api-authorization/pom.xml @@ -17,7 +17,7 @@ che-multiuser-api org.eclipse.che.multiuser - 7.67.0-SNAPSHOT + 7.68.0-SNAPSHOT che-multiuser-api-authorization jar diff --git a/multiuser/api/che-multiuser-api-organization-shared/pom.xml b/multiuser/api/che-multiuser-api-organization-shared/pom.xml index 7f18729bfc..99d1680851 100644 --- a/multiuser/api/che-multiuser-api-organization-shared/pom.xml +++ b/multiuser/api/che-multiuser-api-organization-shared/pom.xml @@ -17,7 +17,7 @@ che-multiuser-api org.eclipse.che.multiuser - 7.67.0-SNAPSHOT + 7.68.0-SNAPSHOT che-multiuser-api-organization-shared jar diff --git a/multiuser/api/che-multiuser-api-organization/pom.xml b/multiuser/api/che-multiuser-api-organization/pom.xml index dbe20d2b45..147aa39e90 100644 --- a/multiuser/api/che-multiuser-api-organization/pom.xml +++ b/multiuser/api/che-multiuser-api-organization/pom.xml @@ -17,7 +17,7 @@ che-multiuser-api org.eclipse.che.multiuser - 7.67.0-SNAPSHOT + 7.68.0-SNAPSHOT che-multiuser-api-organization jar diff --git a/multiuser/api/che-multiuser-api-permission-shared/pom.xml b/multiuser/api/che-multiuser-api-permission-shared/pom.xml index 98f67c002f..3cc4a38aef 100644 --- a/multiuser/api/che-multiuser-api-permission-shared/pom.xml +++ b/multiuser/api/che-multiuser-api-permission-shared/pom.xml @@ -17,7 +17,7 @@ che-multiuser-api org.eclipse.che.multiuser - 7.67.0-SNAPSHOT + 7.68.0-SNAPSHOT che-multiuser-api-permission-shared jar diff --git a/multiuser/api/che-multiuser-api-permission/pom.xml b/multiuser/api/che-multiuser-api-permission/pom.xml index cf37d44a33..ab7b36bff4 100644 --- a/multiuser/api/che-multiuser-api-permission/pom.xml +++ b/multiuser/api/che-multiuser-api-permission/pom.xml @@ -17,7 +17,7 @@ che-multiuser-api org.eclipse.che.multiuser - 7.67.0-SNAPSHOT + 7.68.0-SNAPSHOT che-multiuser-api-permission jar diff --git a/multiuser/api/che-multiuser-api-resource-shared/pom.xml b/multiuser/api/che-multiuser-api-resource-shared/pom.xml index ff3c5e20ff..e31aed0afa 100644 --- a/multiuser/api/che-multiuser-api-resource-shared/pom.xml +++ b/multiuser/api/che-multiuser-api-resource-shared/pom.xml @@ -17,7 +17,7 @@ che-multiuser-api org.eclipse.che.multiuser - 7.67.0-SNAPSHOT + 7.68.0-SNAPSHOT che-multiuser-api-resource-shared jar diff --git a/multiuser/api/che-multiuser-api-resource/pom.xml b/multiuser/api/che-multiuser-api-resource/pom.xml index 17f4d4cfc1..60ce5c1a58 100644 --- a/multiuser/api/che-multiuser-api-resource/pom.xml +++ b/multiuser/api/che-multiuser-api-resource/pom.xml @@ -17,7 +17,7 @@ che-multiuser-api org.eclipse.che.multiuser - 7.67.0-SNAPSHOT + 7.68.0-SNAPSHOT che-multiuser-api-resource jar diff --git a/multiuser/api/che-multiuser-api-workspace-activity/pom.xml b/multiuser/api/che-multiuser-api-workspace-activity/pom.xml index bf6a64d7bd..e95f4b41b7 100644 --- a/multiuser/api/che-multiuser-api-workspace-activity/pom.xml +++ b/multiuser/api/che-multiuser-api-workspace-activity/pom.xml @@ -17,7 +17,7 @@ che-multiuser-api org.eclipse.che.multiuser - 7.67.0-SNAPSHOT + 7.68.0-SNAPSHOT che-multiuser-api-workspace-activity jar diff --git a/multiuser/api/pom.xml b/multiuser/api/pom.xml index 0019db62f0..a650e99c56 100644 --- a/multiuser/api/pom.xml +++ b/multiuser/api/pom.xml @@ -17,7 +17,7 @@ che-multiuser-parent org.eclipse.che.multiuser - 7.67.0-SNAPSHOT + 7.68.0-SNAPSHOT ../pom.xml che-multiuser-api diff --git a/multiuser/integration-tests/che-multiuser-cascade-removal/pom.xml b/multiuser/integration-tests/che-multiuser-cascade-removal/pom.xml index e225b2f514..7b6ede72da 100644 --- a/multiuser/integration-tests/che-multiuser-cascade-removal/pom.xml +++ b/multiuser/integration-tests/che-multiuser-cascade-removal/pom.xml @@ -17,7 +17,7 @@ che-multiuser-integration-tests org.eclipse.che.multiuser - 7.67.0-SNAPSHOT + 7.68.0-SNAPSHOT che-multiuser-cascade-removal jar diff --git a/multiuser/integration-tests/che-multiuser-mysql-tck/pom.xml b/multiuser/integration-tests/che-multiuser-mysql-tck/pom.xml index eb1bb35e0b..77a84e6f99 100644 --- a/multiuser/integration-tests/che-multiuser-mysql-tck/pom.xml +++ b/multiuser/integration-tests/che-multiuser-mysql-tck/pom.xml @@ -17,7 +17,7 @@ che-multiuser-integration-tests org.eclipse.che.multiuser - 7.67.0-SNAPSHOT + 7.68.0-SNAPSHOT che-multiuser-mysql-tck jar diff --git a/multiuser/integration-tests/che-multiuser-postgresql-tck/pom.xml b/multiuser/integration-tests/che-multiuser-postgresql-tck/pom.xml index c3e82d1e51..e2991b077a 100644 --- a/multiuser/integration-tests/che-multiuser-postgresql-tck/pom.xml +++ b/multiuser/integration-tests/che-multiuser-postgresql-tck/pom.xml @@ -17,7 +17,7 @@ che-multiuser-integration-tests org.eclipse.che.multiuser - 7.67.0-SNAPSHOT + 7.68.0-SNAPSHOT che-multiuser-postgresql-tck jar diff --git a/multiuser/integration-tests/pom.xml b/multiuser/integration-tests/pom.xml index 783b3d52b5..fbdbe0c39a 100644 --- a/multiuser/integration-tests/pom.xml +++ b/multiuser/integration-tests/pom.xml @@ -17,7 +17,7 @@ che-multiuser-parent org.eclipse.che.multiuser - 7.67.0-SNAPSHOT + 7.68.0-SNAPSHOT che-multiuser-integration-tests pom diff --git a/multiuser/keycloak/che-multiuser-keycloak-server/pom.xml b/multiuser/keycloak/che-multiuser-keycloak-server/pom.xml index 37a5ac8470..3d40f1b15f 100644 --- a/multiuser/keycloak/che-multiuser-keycloak-server/pom.xml +++ b/multiuser/keycloak/che-multiuser-keycloak-server/pom.xml @@ -17,7 +17,7 @@ che-multiuser-keycloak org.eclipse.che.multiuser - 7.67.0-SNAPSHOT + 7.68.0-SNAPSHOT che-multiuser-keycloak-server jar diff --git a/multiuser/keycloak/che-multiuser-keycloak-shared/pom.xml b/multiuser/keycloak/che-multiuser-keycloak-shared/pom.xml index 173be133cb..769ec747c9 100644 --- a/multiuser/keycloak/che-multiuser-keycloak-shared/pom.xml +++ b/multiuser/keycloak/che-multiuser-keycloak-shared/pom.xml @@ -17,7 +17,7 @@ che-multiuser-keycloak org.eclipse.che.multiuser - 7.67.0-SNAPSHOT + 7.68.0-SNAPSHOT che-multiuser-keycloak-shared jar diff --git a/multiuser/keycloak/che-multiuser-keycloak-token-provider/pom.xml b/multiuser/keycloak/che-multiuser-keycloak-token-provider/pom.xml index 308f75df16..2837af624b 100644 --- a/multiuser/keycloak/che-multiuser-keycloak-token-provider/pom.xml +++ b/multiuser/keycloak/che-multiuser-keycloak-token-provider/pom.xml @@ -17,7 +17,7 @@ che-multiuser-keycloak org.eclipse.che.multiuser - 7.67.0-SNAPSHOT + 7.68.0-SNAPSHOT che-multiuser-keycloak-token-provider Che Multiuser :: Keycloak Token Provider diff --git a/multiuser/keycloak/che-multiuser-keycloak-user-remover/pom.xml b/multiuser/keycloak/che-multiuser-keycloak-user-remover/pom.xml index 44f9515704..8de707c00b 100644 --- a/multiuser/keycloak/che-multiuser-keycloak-user-remover/pom.xml +++ b/multiuser/keycloak/che-multiuser-keycloak-user-remover/pom.xml @@ -17,7 +17,7 @@ che-multiuser-keycloak org.eclipse.che.multiuser - 7.67.0-SNAPSHOT + 7.68.0-SNAPSHOT che-multiuser-keycloak-user-remover jar diff --git a/multiuser/keycloak/pom.xml b/multiuser/keycloak/pom.xml index 4c5eab0ff6..533475c266 100644 --- a/multiuser/keycloak/pom.xml +++ b/multiuser/keycloak/pom.xml @@ -17,7 +17,7 @@ che-multiuser-parent org.eclipse.che.multiuser - 7.67.0-SNAPSHOT + 7.68.0-SNAPSHOT ../pom.xml che-multiuser-keycloak diff --git a/multiuser/machine-auth/che-multiuser-machine-authentication-shared/pom.xml b/multiuser/machine-auth/che-multiuser-machine-authentication-shared/pom.xml index 2732c5526a..8e7b74dd95 100644 --- a/multiuser/machine-auth/che-multiuser-machine-authentication-shared/pom.xml +++ b/multiuser/machine-auth/che-multiuser-machine-authentication-shared/pom.xml @@ -17,7 +17,7 @@ che-multiuser-machine-auth org.eclipse.che.multiuser - 7.67.0-SNAPSHOT + 7.68.0-SNAPSHOT che-multiuser-machine-authentication-shared jar diff --git a/multiuser/machine-auth/che-multiuser-machine-authentication/pom.xml b/multiuser/machine-auth/che-multiuser-machine-authentication/pom.xml index f53720bff6..71f77f5003 100644 --- a/multiuser/machine-auth/che-multiuser-machine-authentication/pom.xml +++ b/multiuser/machine-auth/che-multiuser-machine-authentication/pom.xml @@ -17,7 +17,7 @@ che-multiuser-machine-auth org.eclipse.che.multiuser - 7.67.0-SNAPSHOT + 7.68.0-SNAPSHOT che-multiuser-machine-authentication jar diff --git a/multiuser/machine-auth/pom.xml b/multiuser/machine-auth/pom.xml index b0cc2ab9b6..17c203cd6f 100644 --- a/multiuser/machine-auth/pom.xml +++ b/multiuser/machine-auth/pom.xml @@ -17,7 +17,7 @@ che-multiuser-parent org.eclipse.che.multiuser - 7.67.0-SNAPSHOT + 7.68.0-SNAPSHOT ../pom.xml che-multiuser-machine-auth diff --git a/multiuser/oidc/pom.xml b/multiuser/oidc/pom.xml index 568de9d972..a972d853f2 100644 --- a/multiuser/oidc/pom.xml +++ b/multiuser/oidc/pom.xml @@ -17,7 +17,7 @@ che-multiuser-parent org.eclipse.che.multiuser - 7.67.0-SNAPSHOT + 7.68.0-SNAPSHOT che-multiuser-oidc jar diff --git a/multiuser/permission/che-multiuser-permission-devfile/pom.xml b/multiuser/permission/che-multiuser-permission-devfile/pom.xml index 4822f1f702..a1da00f2df 100644 --- a/multiuser/permission/che-multiuser-permission-devfile/pom.xml +++ b/multiuser/permission/che-multiuser-permission-devfile/pom.xml @@ -17,7 +17,7 @@ che-multiuser-permission org.eclipse.che.multiuser - 7.67.0-SNAPSHOT + 7.68.0-SNAPSHOT che-multiuser-permission-devfile Che Multiuser :: Devfile Permissions diff --git a/multiuser/permission/che-multiuser-permission-logger/pom.xml b/multiuser/permission/che-multiuser-permission-logger/pom.xml index 2e40c7e502..a190dd2df6 100644 --- a/multiuser/permission/che-multiuser-permission-logger/pom.xml +++ b/multiuser/permission/che-multiuser-permission-logger/pom.xml @@ -17,7 +17,7 @@ che-multiuser-permission org.eclipse.che.multiuser - 7.67.0-SNAPSHOT + 7.68.0-SNAPSHOT che-multiuser-permission-logger Che Multiuser :: Logger Permissions diff --git a/multiuser/permission/che-multiuser-permission-resource/pom.xml b/multiuser/permission/che-multiuser-permission-resource/pom.xml index c34b2aca56..e9f159e24b 100644 --- a/multiuser/permission/che-multiuser-permission-resource/pom.xml +++ b/multiuser/permission/che-multiuser-permission-resource/pom.xml @@ -17,7 +17,7 @@ che-multiuser-permission org.eclipse.che.multiuser - 7.67.0-SNAPSHOT + 7.68.0-SNAPSHOT che-multiuser-permission-resource Che Multiuser :: Resource :: Permissions diff --git a/multiuser/permission/che-multiuser-permission-system/pom.xml b/multiuser/permission/che-multiuser-permission-system/pom.xml index bd91e3bb34..9eb770d2f4 100644 --- a/multiuser/permission/che-multiuser-permission-system/pom.xml +++ b/multiuser/permission/che-multiuser-permission-system/pom.xml @@ -17,7 +17,7 @@ che-multiuser-permission org.eclipse.che.multiuser - 7.67.0-SNAPSHOT + 7.68.0-SNAPSHOT che-multiuser-permission-system Che Multiuser :: System Permissions diff --git a/multiuser/permission/che-multiuser-permission-user/pom.xml b/multiuser/permission/che-multiuser-permission-user/pom.xml index 3eccf8cae7..adfe766f19 100644 --- a/multiuser/permission/che-multiuser-permission-user/pom.xml +++ b/multiuser/permission/che-multiuser-permission-user/pom.xml @@ -17,7 +17,7 @@ che-multiuser-permission org.eclipse.che.multiuser - 7.67.0-SNAPSHOT + 7.68.0-SNAPSHOT che-multiuser-permission-user Che Multiuser :: User Permissions diff --git a/multiuser/permission/che-multiuser-permission-workspace-activity/pom.xml b/multiuser/permission/che-multiuser-permission-workspace-activity/pom.xml index 0e3791ff19..b2f52e86e5 100644 --- a/multiuser/permission/che-multiuser-permission-workspace-activity/pom.xml +++ b/multiuser/permission/che-multiuser-permission-workspace-activity/pom.xml @@ -17,7 +17,7 @@ che-multiuser-permission org.eclipse.che.multiuser - 7.67.0-SNAPSHOT + 7.68.0-SNAPSHOT che-multiuser-permission-workspace-activity Che Multiuser :: Workspace Activity Permissions diff --git a/multiuser/permission/che-multiuser-permission-workspace/pom.xml b/multiuser/permission/che-multiuser-permission-workspace/pom.xml index 1ae22106ca..04d8a239be 100644 --- a/multiuser/permission/che-multiuser-permission-workspace/pom.xml +++ b/multiuser/permission/che-multiuser-permission-workspace/pom.xml @@ -17,7 +17,7 @@ che-multiuser-permission org.eclipse.che.multiuser - 7.67.0-SNAPSHOT + 7.68.0-SNAPSHOT che-multiuser-permission-workspace Che Multiuser :: Workspace Permissions diff --git a/multiuser/permission/pom.xml b/multiuser/permission/pom.xml index c58258d660..781cdf7257 100644 --- a/multiuser/permission/pom.xml +++ b/multiuser/permission/pom.xml @@ -17,7 +17,7 @@ che-multiuser-parent org.eclipse.che.multiuser - 7.67.0-SNAPSHOT + 7.68.0-SNAPSHOT ../pom.xml che-multiuser-permission diff --git a/multiuser/personal-account/pom.xml b/multiuser/personal-account/pom.xml index 81e2526309..a3fdbd902d 100644 --- a/multiuser/personal-account/pom.xml +++ b/multiuser/personal-account/pom.xml @@ -17,7 +17,7 @@ che-multiuser-parent org.eclipse.che.multiuser - 7.67.0-SNAPSHOT + 7.68.0-SNAPSHOT che-multiuser-personal-account jar diff --git a/multiuser/pom.xml b/multiuser/pom.xml index 47268b8a26..770fc71b1e 100644 --- a/multiuser/pom.xml +++ b/multiuser/pom.xml @@ -17,7 +17,7 @@ che-server org.eclipse.che - 7.67.0-SNAPSHOT + 7.68.0-SNAPSHOT ../pom.xml org.eclipse.che.multiuser diff --git a/multiuser/sql-schema/pom.xml b/multiuser/sql-schema/pom.xml index 164d2a8c58..3604836a35 100644 --- a/multiuser/sql-schema/pom.xml +++ b/multiuser/sql-schema/pom.xml @@ -17,7 +17,7 @@ che-multiuser-parent org.eclipse.che.multiuser - 7.67.0-SNAPSHOT + 7.68.0-SNAPSHOT ../pom.xml che-multiuser-sql-schema diff --git a/pom.xml b/pom.xml index 04fcb83b25..54d15e137f 100644 --- a/pom.xml +++ b/pom.xml @@ -16,7 +16,7 @@ 4.0.0 org.eclipse.che che-server - 7.67.0-SNAPSHOT + 7.68.0-SNAPSHOT pom Che Server Eclipse Che Server @@ -100,7 +100,7 @@ Red Hat, Inc. - initial API and implementation ${project.version} - 7.67.0-SNAPSHOT + 7.68.0-SNAPSHOT 1.0-beta2 Red Hat, Inc. diff --git a/typescript-dto/dto-pom.xml b/typescript-dto/dto-pom.xml index 5b8413bb8c..c521d1a2d0 100644 --- a/typescript-dto/dto-pom.xml +++ b/typescript-dto/dto-pom.xml @@ -23,7 +23,7 @@ pom Che TypeScript DTO - 7.67.0-SNAPSHOT + 7.68.0-SNAPSHOT diff --git a/wsmaster/che-core-api-account/pom.xml b/wsmaster/che-core-api-account/pom.xml index 47d05d2afb..8c68a8885d 100644 --- a/wsmaster/che-core-api-account/pom.xml +++ b/wsmaster/che-core-api-account/pom.xml @@ -17,7 +17,7 @@ che-master-parent org.eclipse.che.core - 7.67.0-SNAPSHOT + 7.68.0-SNAPSHOT che-core-api-account Che Core :: API :: Account diff --git a/wsmaster/che-core-api-auth-azure-devops/pom.xml b/wsmaster/che-core-api-auth-azure-devops/pom.xml index 62079d2b4f..2ca4b08a7f 100644 --- a/wsmaster/che-core-api-auth-azure-devops/pom.xml +++ b/wsmaster/che-core-api-auth-azure-devops/pom.xml @@ -17,7 +17,7 @@ che-master-parent org.eclipse.che.core - 7.67.0-SNAPSHOT + 7.68.0-SNAPSHOT che-core-api-auth-azure-devops jar diff --git a/wsmaster/che-core-api-auth-bitbucket/pom.xml b/wsmaster/che-core-api-auth-bitbucket/pom.xml index 6c31a87c3a..73ff5722bb 100644 --- a/wsmaster/che-core-api-auth-bitbucket/pom.xml +++ b/wsmaster/che-core-api-auth-bitbucket/pom.xml @@ -17,7 +17,7 @@ che-master-parent org.eclipse.che.core - 7.67.0-SNAPSHOT + 7.68.0-SNAPSHOT che-core-api-auth-bitbucket jar diff --git a/wsmaster/che-core-api-auth-github/pom.xml b/wsmaster/che-core-api-auth-github/pom.xml index a1ddad429a..d2aacd8006 100644 --- a/wsmaster/che-core-api-auth-github/pom.xml +++ b/wsmaster/che-core-api-auth-github/pom.xml @@ -17,7 +17,7 @@ che-master-parent org.eclipse.che.core - 7.67.0-SNAPSHOT + 7.68.0-SNAPSHOT che-core-api-auth-github jar diff --git a/wsmaster/che-core-api-auth-gitlab/pom.xml b/wsmaster/che-core-api-auth-gitlab/pom.xml index a1623d3775..44c910c22c 100644 --- a/wsmaster/che-core-api-auth-gitlab/pom.xml +++ b/wsmaster/che-core-api-auth-gitlab/pom.xml @@ -17,7 +17,7 @@ che-master-parent org.eclipse.che.core - 7.67.0-SNAPSHOT + 7.68.0-SNAPSHOT che-core-api-auth-gitlab jar diff --git a/wsmaster/che-core-api-auth-openshift/pom.xml b/wsmaster/che-core-api-auth-openshift/pom.xml index 9df079f74c..06290de582 100644 --- a/wsmaster/che-core-api-auth-openshift/pom.xml +++ b/wsmaster/che-core-api-auth-openshift/pom.xml @@ -17,7 +17,7 @@ che-master-parent org.eclipse.che.core - 7.67.0-SNAPSHOT + 7.68.0-SNAPSHOT che-core-api-auth-openshift jar diff --git a/wsmaster/che-core-api-auth-shared/pom.xml b/wsmaster/che-core-api-auth-shared/pom.xml index b0be7fb656..2a30b36bfc 100644 --- a/wsmaster/che-core-api-auth-shared/pom.xml +++ b/wsmaster/che-core-api-auth-shared/pom.xml @@ -17,7 +17,7 @@ che-master-parent org.eclipse.che.core - 7.67.0-SNAPSHOT + 7.68.0-SNAPSHOT che-core-api-auth-shared jar diff --git a/wsmaster/che-core-api-auth/pom.xml b/wsmaster/che-core-api-auth/pom.xml index 9e106bf63c..1cb05d044f 100644 --- a/wsmaster/che-core-api-auth/pom.xml +++ b/wsmaster/che-core-api-auth/pom.xml @@ -17,7 +17,7 @@ che-master-parent org.eclipse.che.core - 7.67.0-SNAPSHOT + 7.68.0-SNAPSHOT che-core-api-auth jar diff --git a/wsmaster/che-core-api-devfile-shared/pom.xml b/wsmaster/che-core-api-devfile-shared/pom.xml index b828712ff1..61e5dbbb73 100644 --- a/wsmaster/che-core-api-devfile-shared/pom.xml +++ b/wsmaster/che-core-api-devfile-shared/pom.xml @@ -17,7 +17,7 @@ che-master-parent org.eclipse.che.core - 7.67.0-SNAPSHOT + 7.68.0-SNAPSHOT che-core-api-devfile-shared jar diff --git a/wsmaster/che-core-api-devfile/pom.xml b/wsmaster/che-core-api-devfile/pom.xml index 82f8bcfa37..3d3254d8ed 100644 --- a/wsmaster/che-core-api-devfile/pom.xml +++ b/wsmaster/che-core-api-devfile/pom.xml @@ -17,7 +17,7 @@ che-master-parent org.eclipse.che.core - 7.67.0-SNAPSHOT + 7.68.0-SNAPSHOT che-core-api-devfile jar diff --git a/wsmaster/che-core-api-factory-azure-devops/pom.xml b/wsmaster/che-core-api-factory-azure-devops/pom.xml index bc1f995cf9..54fcc75a6a 100644 --- a/wsmaster/che-core-api-factory-azure-devops/pom.xml +++ b/wsmaster/che-core-api-factory-azure-devops/pom.xml @@ -17,7 +17,7 @@ che-master-parent org.eclipse.che.core - 7.67.0-SNAPSHOT + 7.68.0-SNAPSHOT che-core-api-factory-azure-devops jar diff --git a/wsmaster/che-core-api-factory-bitbucket-server/pom.xml b/wsmaster/che-core-api-factory-bitbucket-server/pom.xml index df54fa5d5d..0615942ab1 100644 --- a/wsmaster/che-core-api-factory-bitbucket-server/pom.xml +++ b/wsmaster/che-core-api-factory-bitbucket-server/pom.xml @@ -17,7 +17,7 @@ che-master-parent org.eclipse.che.core - 7.67.0-SNAPSHOT + 7.68.0-SNAPSHOT che-core-api-factory-bitbucket-server jar diff --git a/wsmaster/che-core-api-factory-bitbucket/pom.xml b/wsmaster/che-core-api-factory-bitbucket/pom.xml index 65144cb889..9c45b872d8 100644 --- a/wsmaster/che-core-api-factory-bitbucket/pom.xml +++ b/wsmaster/che-core-api-factory-bitbucket/pom.xml @@ -17,7 +17,7 @@ che-master-parent org.eclipse.che.core - 7.67.0-SNAPSHOT + 7.68.0-SNAPSHOT che-core-api-factory-bitbucket jar diff --git a/wsmaster/che-core-api-factory-git-ssh/pom.xml b/wsmaster/che-core-api-factory-git-ssh/pom.xml index de9b1fe249..51575a2ff1 100644 --- a/wsmaster/che-core-api-factory-git-ssh/pom.xml +++ b/wsmaster/che-core-api-factory-git-ssh/pom.xml @@ -17,7 +17,7 @@ che-master-parent org.eclipse.che.core - 7.67.0-SNAPSHOT + 7.68.0-SNAPSHOT che-core-api-factory-git-ssh jar diff --git a/wsmaster/che-core-api-factory-github/pom.xml b/wsmaster/che-core-api-factory-github/pom.xml index d0ab7bd600..39325422e5 100644 --- a/wsmaster/che-core-api-factory-github/pom.xml +++ b/wsmaster/che-core-api-factory-github/pom.xml @@ -17,7 +17,7 @@ che-master-parent org.eclipse.che.core - 7.67.0-SNAPSHOT + 7.68.0-SNAPSHOT che-core-api-factory-github jar diff --git a/wsmaster/che-core-api-factory-gitlab/pom.xml b/wsmaster/che-core-api-factory-gitlab/pom.xml index 39701a3aa9..8145340cfc 100644 --- a/wsmaster/che-core-api-factory-gitlab/pom.xml +++ b/wsmaster/che-core-api-factory-gitlab/pom.xml @@ -17,7 +17,7 @@ che-master-parent org.eclipse.che.core - 7.67.0-SNAPSHOT + 7.68.0-SNAPSHOT che-core-api-factory-gitlab jar diff --git a/wsmaster/che-core-api-factory-shared/pom.xml b/wsmaster/che-core-api-factory-shared/pom.xml index 7e32761113..4a283d8232 100644 --- a/wsmaster/che-core-api-factory-shared/pom.xml +++ b/wsmaster/che-core-api-factory-shared/pom.xml @@ -17,7 +17,7 @@ che-master-parent org.eclipse.che.core - 7.67.0-SNAPSHOT + 7.68.0-SNAPSHOT che-core-api-factory-shared jar diff --git a/wsmaster/che-core-api-factory/pom.xml b/wsmaster/che-core-api-factory/pom.xml index 279a3b0fad..368a97e004 100644 --- a/wsmaster/che-core-api-factory/pom.xml +++ b/wsmaster/che-core-api-factory/pom.xml @@ -17,7 +17,7 @@ che-master-parent org.eclipse.che.core - 7.67.0-SNAPSHOT + 7.68.0-SNAPSHOT che-core-api-factory jar diff --git a/wsmaster/che-core-api-logger-shared/pom.xml b/wsmaster/che-core-api-logger-shared/pom.xml index a76aaa997f..43faa4ec27 100644 --- a/wsmaster/che-core-api-logger-shared/pom.xml +++ b/wsmaster/che-core-api-logger-shared/pom.xml @@ -17,7 +17,7 @@ che-master-parent org.eclipse.che.core - 7.67.0-SNAPSHOT + 7.68.0-SNAPSHOT che-core-api-logger-shared jar diff --git a/wsmaster/che-core-api-logger/pom.xml b/wsmaster/che-core-api-logger/pom.xml index c3e3834639..5f83c98369 100644 --- a/wsmaster/che-core-api-logger/pom.xml +++ b/wsmaster/che-core-api-logger/pom.xml @@ -17,7 +17,7 @@ che-master-parent org.eclipse.che.core - 7.67.0-SNAPSHOT + 7.68.0-SNAPSHOT che-core-api-logger jar diff --git a/wsmaster/che-core-api-metrics/pom.xml b/wsmaster/che-core-api-metrics/pom.xml index 6e95b54883..1b9209a270 100644 --- a/wsmaster/che-core-api-metrics/pom.xml +++ b/wsmaster/che-core-api-metrics/pom.xml @@ -17,7 +17,7 @@ che-master-parent org.eclipse.che.core - 7.67.0-SNAPSHOT + 7.68.0-SNAPSHOT che-core-api-metrics jar diff --git a/wsmaster/che-core-api-ssh-shared/pom.xml b/wsmaster/che-core-api-ssh-shared/pom.xml index f4d2d7fdde..1ac2438082 100644 --- a/wsmaster/che-core-api-ssh-shared/pom.xml +++ b/wsmaster/che-core-api-ssh-shared/pom.xml @@ -17,7 +17,7 @@ che-master-parent org.eclipse.che.core - 7.67.0-SNAPSHOT + 7.68.0-SNAPSHOT che-core-api-ssh-shared jar diff --git a/wsmaster/che-core-api-ssh/pom.xml b/wsmaster/che-core-api-ssh/pom.xml index 6e18f416a7..5fb4641be2 100644 --- a/wsmaster/che-core-api-ssh/pom.xml +++ b/wsmaster/che-core-api-ssh/pom.xml @@ -17,7 +17,7 @@ che-master-parent org.eclipse.che.core - 7.67.0-SNAPSHOT + 7.68.0-SNAPSHOT che-core-api-ssh jar diff --git a/wsmaster/che-core-api-system-shared/pom.xml b/wsmaster/che-core-api-system-shared/pom.xml index 5aa6bc38f1..faa6fe12ad 100644 --- a/wsmaster/che-core-api-system-shared/pom.xml +++ b/wsmaster/che-core-api-system-shared/pom.xml @@ -17,7 +17,7 @@ che-master-parent org.eclipse.che.core - 7.67.0-SNAPSHOT + 7.68.0-SNAPSHOT che-core-api-system-shared jar diff --git a/wsmaster/che-core-api-system/pom.xml b/wsmaster/che-core-api-system/pom.xml index f0700219f8..1258305230 100644 --- a/wsmaster/che-core-api-system/pom.xml +++ b/wsmaster/che-core-api-system/pom.xml @@ -17,7 +17,7 @@ che-master-parent org.eclipse.che.core - 7.67.0-SNAPSHOT + 7.68.0-SNAPSHOT che-core-api-system jar diff --git a/wsmaster/che-core-api-user-shared/pom.xml b/wsmaster/che-core-api-user-shared/pom.xml index c8efeb5b94..f56c9b2c1c 100644 --- a/wsmaster/che-core-api-user-shared/pom.xml +++ b/wsmaster/che-core-api-user-shared/pom.xml @@ -17,7 +17,7 @@ che-master-parent org.eclipse.che.core - 7.67.0-SNAPSHOT + 7.68.0-SNAPSHOT che-core-api-user-shared Che Core :: API :: User :: Shared diff --git a/wsmaster/che-core-api-user/pom.xml b/wsmaster/che-core-api-user/pom.xml index e773832a41..fca9820f4d 100644 --- a/wsmaster/che-core-api-user/pom.xml +++ b/wsmaster/che-core-api-user/pom.xml @@ -17,7 +17,7 @@ che-master-parent org.eclipse.che.core - 7.67.0-SNAPSHOT + 7.68.0-SNAPSHOT che-core-api-user Che Core :: API :: User diff --git a/wsmaster/che-core-api-workspace-activity/pom.xml b/wsmaster/che-core-api-workspace-activity/pom.xml index 3a788e86bc..fb103e25d5 100644 --- a/wsmaster/che-core-api-workspace-activity/pom.xml +++ b/wsmaster/che-core-api-workspace-activity/pom.xml @@ -17,7 +17,7 @@ che-master-parent org.eclipse.che.core - 7.67.0-SNAPSHOT + 7.68.0-SNAPSHOT che-core-api-workspace-activity jar diff --git a/wsmaster/che-core-api-workspace-shared/pom.xml b/wsmaster/che-core-api-workspace-shared/pom.xml index a3981b8ab2..19d3f73918 100644 --- a/wsmaster/che-core-api-workspace-shared/pom.xml +++ b/wsmaster/che-core-api-workspace-shared/pom.xml @@ -17,7 +17,7 @@ che-master-parent org.eclipse.che.core - 7.67.0-SNAPSHOT + 7.68.0-SNAPSHOT che-core-api-workspace-shared jar diff --git a/wsmaster/che-core-api-workspace/pom.xml b/wsmaster/che-core-api-workspace/pom.xml index 88733b2580..30fb2ea10b 100644 --- a/wsmaster/che-core-api-workspace/pom.xml +++ b/wsmaster/che-core-api-workspace/pom.xml @@ -17,7 +17,7 @@ che-master-parent org.eclipse.che.core - 7.67.0-SNAPSHOT + 7.68.0-SNAPSHOT che-core-api-workspace jar diff --git a/wsmaster/che-core-sql-schema/pom.xml b/wsmaster/che-core-sql-schema/pom.xml index 546e31347a..0abc322206 100644 --- a/wsmaster/che-core-sql-schema/pom.xml +++ b/wsmaster/che-core-sql-schema/pom.xml @@ -17,7 +17,7 @@ che-master-parent org.eclipse.che.core - 7.67.0-SNAPSHOT + 7.68.0-SNAPSHOT che-core-sql-schema Che Core :: SQL :: Schema diff --git a/wsmaster/integration-tests/cascade-removal/pom.xml b/wsmaster/integration-tests/cascade-removal/pom.xml index fc34ecb87c..691dd00a30 100644 --- a/wsmaster/integration-tests/cascade-removal/pom.xml +++ b/wsmaster/integration-tests/cascade-removal/pom.xml @@ -17,7 +17,7 @@ integration-tests-parent org.eclipse.che.core - 7.67.0-SNAPSHOT + 7.68.0-SNAPSHOT cascade-removal Integration Tests :: Cascade Removal diff --git a/wsmaster/integration-tests/mysql-tck/pom.xml b/wsmaster/integration-tests/mysql-tck/pom.xml index 7783eea368..d4646ddc94 100644 --- a/wsmaster/integration-tests/mysql-tck/pom.xml +++ b/wsmaster/integration-tests/mysql-tck/pom.xml @@ -17,7 +17,7 @@ integration-tests-parent org.eclipse.che.core - 7.67.0-SNAPSHOT + 7.68.0-SNAPSHOT mysql-tck jar diff --git a/wsmaster/integration-tests/pom.xml b/wsmaster/integration-tests/pom.xml index 75e2f7b5cc..3a5a460674 100644 --- a/wsmaster/integration-tests/pom.xml +++ b/wsmaster/integration-tests/pom.xml @@ -17,7 +17,7 @@ che-master-parent org.eclipse.che.core - 7.67.0-SNAPSHOT + 7.68.0-SNAPSHOT ../pom.xml integration-tests-parent diff --git a/wsmaster/integration-tests/postgresql-tck/pom.xml b/wsmaster/integration-tests/postgresql-tck/pom.xml index c287bd4876..35d3b5c0dc 100644 --- a/wsmaster/integration-tests/postgresql-tck/pom.xml +++ b/wsmaster/integration-tests/postgresql-tck/pom.xml @@ -17,7 +17,7 @@ integration-tests-parent org.eclipse.che.core - 7.67.0-SNAPSHOT + 7.68.0-SNAPSHOT postgresql-tck jar diff --git a/wsmaster/pom.xml b/wsmaster/pom.xml index 083d3f81f0..e6d0ad9811 100644 --- a/wsmaster/pom.xml +++ b/wsmaster/pom.xml @@ -17,7 +17,7 @@ che-core-parent org.eclipse.che.core - 7.67.0-SNAPSHOT + 7.68.0-SNAPSHOT ../core/pom.xml che-master-parent From 3b74041d5d22c74c13927af2db92f5c0e13c3558 Mon Sep 17 00:00:00 2001 From: Shmaraiev Oleksandr Date: Mon, 22 May 2023 11:22:03 +0300 Subject: [PATCH 18/75] Create tests to check 'Git zero-config' flow as PR checks (#494) * Create 'Dockerfile' file to configure ci-operator * Update 'build-pr-check.yml' github action * Add tests to check git flow without PAT setup * Add tests to check git flow with PAT setup --------- Co-authored-by: artaleks9 Co-authored-by: Igor Vinokur --- .ci/openshift-ci/Dockerfile | 2 +- .ci/openshift-ci/common.sh | 313 ++++++++++++++++++ .ci/openshift-ci/devworkspace-test.yaml | 21 ++ .ci/openshift-ci/htpasswdProvider.yaml | 12 + .ci/openshift-ci/pat-secret.yaml | 16 + .../test-bitbucket-no-pat-oauth-flow.sh | 31 ++ .../test-github-no-pat-oauth-flow.sh | 31 ++ .../test-github-with-pat-setup-flow.sh | 36 ++ .../test-gitlab-no-pat-oauth-flow.sh | 31 ++ .../test-gitlab-with-pat-setup-flow.sh | 36 ++ .github/workflows/build-pr-check.yml | 23 ++ 11 files changed, 551 insertions(+), 1 deletion(-) create mode 100644 .ci/openshift-ci/common.sh create mode 100644 .ci/openshift-ci/devworkspace-test.yaml create mode 100644 .ci/openshift-ci/htpasswdProvider.yaml create mode 100644 .ci/openshift-ci/pat-secret.yaml create mode 100644 .ci/openshift-ci/test-bitbucket-no-pat-oauth-flow.sh create mode 100644 .ci/openshift-ci/test-github-no-pat-oauth-flow.sh create mode 100644 .ci/openshift-ci/test-github-with-pat-setup-flow.sh create mode 100644 .ci/openshift-ci/test-gitlab-no-pat-oauth-flow.sh create mode 100644 .ci/openshift-ci/test-gitlab-with-pat-setup-flow.sh diff --git a/.ci/openshift-ci/Dockerfile b/.ci/openshift-ci/Dockerfile index 320c5fbc4d..7c912ee523 100644 --- a/.ci/openshift-ci/Dockerfile +++ b/.ci/openshift-ci/Dockerfile @@ -1,6 +1,6 @@ #!/bin/bash # -# Copyright (c) 2019-2021 Red Hat, Inc. +# Copyright (c) 2023 Red Hat, Inc. # This program and the accompanying materials are made # available under the terms of the Eclipse Public License 2.0 # which is available at https://www.eclipse.org/legal/epl-2.0/ diff --git a/.ci/openshift-ci/common.sh b/.ci/openshift-ci/common.sh new file mode 100644 index 0000000000..4c6fe9a5f8 --- /dev/null +++ b/.ci/openshift-ci/common.sh @@ -0,0 +1,313 @@ +#!/bin/bash +# +# Copyright (c) 2023 Red Hat, Inc. +# This program and the accompanying materials are made +# available under the terms of the Eclipse Public License 2.0 +# which is available at https://www.eclipse.org/legal/epl-2.0/ +# +# SPDX-License-Identifier: EPL-2.0 +# +# Contributors: +# Red Hat, Inc. - initial API and implementation +# + +set -e +# only exit with zero if all commands of the pipeline exit successfully +set -o pipefail + +PR_IMAGE_TAG="pr-${PULL_NUMBER}" + +export CHE_NAMESPACE=${CHE_NAMESPACE:-"eclipse-che"} +export CHE_SERVER_IMAGE=${CHE_SERVER_IMAGE:-"quay.io/eclipse/che-server:${PR_IMAGE_TAG}"} +export ARTIFACTS_DIR=${ARTIFACT_DIR:-"/tmp/artifacts"} +export CHE_FORWARDED_PORT="8081" +export OCP_ADMIN_USER_NAME=${OCP_ADMIN_USER_NAME:-"admin"} +export OCP_NON_ADMIN_USER_NAME=${OCP_NON_ADMIN_USER_NAME:-"user"} +export OCP_LOGIN_PASSWORD=${OCP_LOGIN_PASSWORD:-"passw"} +export ADMIN_CHE_NAMESPACE=${OCP_ADMIN_USER_NAME}"-che" +export USER_CHE_NAMESPACE=${OCP_NON_ADMIN_USER_NAME}"-che" +export GIT_PROVIDER_USERNAME=${GIT_PROVIDER_USERNAME:-"chepullreq1"} +export PUBLIC_REPO_WORKSPACE_NAME=${PUBLIC_REPO_WORKSPACE_NAME:-"public-repo-wksp-testname"} +export PRIVATE_REPO_WORKSPACE_NAME=${PRIVATE_REPO_WORKSPACE_NAME:-"private-repo-wksp-testname"} +export PUBLIC_PROJECT_NAME=${PUBLIC_PROJECT_NAME:-"public-repo"} +export PRIVATE_PROJECT_NAME=${PRIVATE_PROJECT_NAME:-"private-repo"} +export YAML_FILE_NAME=${YAML_FILE_NAME:-"devfile.yaml"} + +provisionOpenShiftOAuthUser() { + echo -e "[INFO] Provisioning Openshift OAuth user" + htpasswd -c -B -b users.htpasswd ${OCP_ADMIN_USER_NAME} ${OCP_LOGIN_PASSWORD} + htpasswd -b users.htpasswd ${OCP_NON_ADMIN_USER_NAME} ${OCP_LOGIN_PASSWORD} + oc create secret generic htpass-secret --from-file=htpasswd="users.htpasswd" -n openshift-config + oc apply -f ".ci/openshift-ci/htpasswdProvider.yaml" + oc adm policy add-cluster-role-to-user cluster-admin ${OCP_ADMIN_USER_NAME} + + echo -e "[INFO] Waiting for htpasswd auth to be working up to 5 minutes" + CURRENT_TIME=$(date +%s) + ENDTIME=$((CURRENT_TIME + 300)) + while [ "$(date +%s)" -lt $ENDTIME ]; do + if oc login -u=${OCP_ADMIN_USER_NAME} -p=${OCP_LOGIN_PASSWORD} --insecure-skip-tls-verify=false; then + break + fi + sleep 10 + done +} + +createCustomResourcesFile() { + cat > custom-resources.yaml <<-END +apiVersion: org.eclipse.che/v2 +spec: + devEnvironments: + maxNumberOfRunningWorkspacesPerUser: 10000 +END + + echo "Generated custom resources file" + cat custom-resources.yaml +} + +deployChe() { + chectl server:deploy --cheimage=$CHE_SERVER_IMAGE \ + --che-operator-cr-patch-yaml=custom-resources.yaml \ + --platform=openshift \ + --telemetry=off \ + --batch +} + +# this command starts port forwarding between the local machine and the che-host service in the OpenShift cluster. +forwardPortToService() { + oc port-forward service/che-host ${CHE_FORWARDED_PORT}:8080 -n ${CHE_NAMESPACE} & + sleep 3s +} + +killProcessByPort() { + fuser -k ${CHE_FORWARDED_PORT}/tcp +} + +requestFactoryResolverGitRepoUrl() { + GIT_REPO_URL=$1 + CLUSTER_ACCESS_TOKEN=$(oc whoami -t) + + curl -i -X 'POST' \ + http://localhost:${CHE_FORWARDED_PORT}/api/factory/resolver \ + -H 'accept: */*' \ + -H "Authorization: Bearer ${CLUSTER_ACCESS_TOKEN}" \ + -H 'Content-Type: application/json' \ + -d '{ + "url": "'${GIT_REPO_URL}'" + }' +} + +# check that factory resolver returns correct value without any PAT/OAuth setup +testFactoryResolverNoPatOAuth() { + PUBLIC_REPO_URL=$1 + PRIVATE_REPO_URL=$2 + + echo "[INFO] Check factory resolver for public repository with NO PAT/OAuth setup" + if [ "$(requestFactoryResolverGitRepoUrl ${PUBLIC_REPO_URL} | grep "HTTP/1.1 200")" ]; then + echo "[INFO] Factory resolver returned 'HTTP/1.1 200' status code." + else + echo "[ERROR] Factory resolver returned wrong status code. Expected: HTTP/1.1 200." + exit 1 + fi + + echo "[INFO] Check factory resolver for private repository with NO PAT/OAuth setup" + if [ "$(requestFactoryResolverGitRepoUrl ${PRIVATE_REPO_URL} | grep "HTTP/1.1 400")" ]; then + echo "[INFO] Factory resolver returned 'HTTP/1.1 400' status code. Expected client side error." + else + echo "[ERROR] Factory resolver returned wrong status code. Expected 'HTTP/1.1 400'." + exit 1 + fi +} + +# check that factory resolver returns correct value with PAT/OAuth setup +testFactoryResolverWithPatOAuth() { + PUBLIC_REPO_URL=$1 + PRIVATE_REPO_URL=$2 + + echo "[INFO] Check factory resolver for public repository with PAT/OAuth setup" + if [ "$(requestFactoryResolverGitRepoUrl ${PUBLIC_REPO_URL} | grep "HTTP/1.1 200")" ]; then + echo "[INFO] Factory resolver returned 'HTTP/1.1 200' status code." + else + echo "[ERROR] Factory resolver returned wrong status code. Expected: HTTP/1.1 200" + exit 1 + fi + + echo "[INFO] Check factory resolver for private repository with PAT/OAuth setup" + if [ "$(requestFactoryResolverGitRepoUrl ${PRIVATE_REPO_URL} | grep "HTTP/1.1 200")" ]; then + echo "[INFO] Factory resolver returned 'HTTP/1.1 200' status code." + else + echo "[ERROR] Factory resolver returned wrong status code. Expected: HTTP/1.1 200" + exit 1 + fi +} + +requestProvisionNamespace() { + CLUSTER_ACCESS_TOKEN=$(oc whoami -t) + + curl -i -X 'POST' \ + http://localhost:${CHE_FORWARDED_PORT}/api/kubernetes/namespace/provision \ + -H 'accept: application/json' \ + -H "Authorization: Bearer ${CLUSTER_ACCESS_TOKEN}" \ + -d '' +} + +initUserNamespace() { + OCP_USER_NAME=$1 + + echo "[INFO] Initialize user namespace" + oc login -u=${OCP_USER_NAME} -p=${OCP_LOGIN_PASSWORD} --insecure-skip-tls-verify=false + if [ "$(requestProvisionNamespace | grep "HTTP/1.1 200")" ]; then + echo "[INFO] Request provision user namespace returned 'HTTP/1.1 200' status code." + else + echo "[ERROR] Request provision user namespace returned wrong status code. Expected: HTTP/1.1 200" + exit 1 + fi +} + +setupPersonalAccessToken() { + GIT_PROVIDER_TYPE=$1 + GIT_PROVIDER_URL=$2 + GIT_PROVIDER_USER_ID=$3 + GIT_PROVIDER_PAT=$4 + + echo "[INFO] Setup Personal Access Token Secret" + oc project ${USER_CHE_NAMESPACE} + CHE_USER_ID=$(oc get secret user-profile -o jsonpath='{.data.id}' | base64 -d) + ENCODED_PAT=$(echo -n ${GIT_PROVIDER_PAT} | base64) + cat .ci/openshift-ci/pat-secret.yaml > pat-secret.yaml + + # patch the pat-secret.yaml file + sed -i "s#che-user-id#${CHE_USER_ID}#g" pat-secret.yaml + sed -i "s#git-provider-name#${GIT_PROVIDER_TYPE}#g" pat-secret.yaml + sed -i "s#git-provider-url#${GIT_PROVIDER_URL}#g" pat-secret.yaml + sed -i "s#git-provider-user-id#${GIT_PROVIDER_USER_ID}#g" pat-secret.yaml + sed -i "s#encoded-access-token#${ENCODED_PAT}#g" pat-secret.yaml + + cat pat-secret.yaml + + oc apply -f pat-secret.yaml -n ${USER_CHE_NAMESPACE} +} + +runTestWorkspaceWithGitRepoUrl() { + WS_NAME=$1 + PROJECT_NAME=$2 + GIT_REPO_URL=$3 + OCP_USER_NAMESPACE=$4 + + oc project ${OCP_USER_NAMESPACE} + cat .ci/openshift-ci/devworkspace-test.yaml > devworkspace-test.yaml + + # patch the devworkspace-test.yaml file + sed -i "s#ws-name#${WS_NAME}#g" devworkspace-test.yaml + sed -i "s#project-name#${PROJECT_NAME}#g" devworkspace-test.yaml + sed -i "s#git-repo-url#${GIT_REPO_URL}#g" devworkspace-test.yaml + + cat devworkspace-test.yaml + + oc apply -f devworkspace-test.yaml -n ${OCP_USER_NAMESPACE} + oc wait -n ${OCP_USER_NAMESPACE} --for=condition=Ready dw ${WS_NAME} --timeout=360s + echo "[INFO] Test workspace is run" +} + +testProjectIsCloned() { + PROJECT_NAME=$1 + OCP_USER_NAMESPACE=$2 + + WORKSPACE_POD_NAME=$(oc get pods -n ${OCP_USER_NAMESPACE} | grep workspace | awk '{print $1}') + if oc exec -it -n ${OCP_USER_NAMESPACE} ${WORKSPACE_POD_NAME} -- test -f /projects/${PROJECT_NAME}/${YAML_FILE_NAME}; then + echo "[INFO] Project file /projects/${PROJECT_NAME}/${YAML_FILE_NAME} exists." + else + echo "[ERROR] Project file /projects/${PROJECT_NAME}/${YAML_FILE_NAME} does not exist." + return 1 + fi +} + +testGitCredentials() { + OCP_USER_NAMESPACE=$1 + GIT_PROVIDER_PAT=$2 + + echo "[INFO] Check the 'git credentials' is in a workspace" + gitCredentials="${GIT_PROVIDER_USERNAME}:${GIT_PROVIDER_PAT}" + WORKSPACE_POD_NAME=$(oc get pods -n ${OCP_USER_NAMESPACE} | grep workspace | awk '{print $1}') + if oc exec -it -n ${OCP_USER_NAMESPACE} ${WORKSPACE_POD_NAME} -- cat /.git-credentials/credentials | grep -q ${gitCredentials}; then + echo "[INFO] Git credentials file '/.git-credentials/credentials' exists and has the expected content." + else + echo "[ERROR] Git credentials file '/.git-credentials/credentials' does not exist or has incorrect content." + return 1 + fi +} + +deleteTestWorkspace() { + WS_NAME=$1 + OCP_USER_NAMESPACE=$2 + + oc delete dw ${WS_NAME} -n ${OCP_USER_NAMESPACE} +} + +# Catch the finish of the job and write logs in artifacts. +catchFinish() { + local RESULT=$? + killProcessByPort + if [ "$RESULT" != "0" ]; then + set +e + collectEclipseCheLogs + set -e + fi + + [[ "${RESULT}" != "0" ]] && echo "[ERROR] Job failed." || echo "[INFO] Job completed successfully." + exit $RESULT +} + +collectEclipseCheLogs() { + mkdir -p ${ARTIFACTS_DIR}/che-logs + + # Collect all Eclipse Che logs and cluster CR + chectl server:logs -n $CHE_NAMESPACE --directory ${ARTIFACTS_DIR}/che-logs --telemetry off + oc get checluster -o yaml -n $CHE_NAMESPACE > "${ARTIFACTS_DIR}/che-cluster.yaml" +} + +testClonePublicRepoNoPatOAuth() { + WS_NAME=$1 + PROJECT_NAME=$2 + GIT_REPO_URL=$3 + OCP_USER_NAMESPACE=$4 + + runTestWorkspaceWithGitRepoUrl ${WS_NAME} ${PROJECT_NAME} ${GIT_REPO_URL} ${OCP_USER_NAMESPACE} + echo "[INFO] Check the public repository is cloned with NO PAT/OAuth setup" + testProjectIsCloned ${PROJECT_NAME} ${OCP_USER_NAMESPACE} || exit 1 + deleteTestWorkspace ${WS_NAME} ${OCP_USER_NAMESPACE} +} + +testClonePrivateRepoNoPatOAuth() { + WS_NAME=$1 + PROJECT_NAME=$2 + GIT_REPO_URL=$3 + OCP_USER_NAMESPACE=$4 + + runTestWorkspaceWithGitRepoUrl ${WS_NAME} ${PROJECT_NAME} ${GIT_REPO_URL} ${OCP_USER_NAMESPACE} + echo "[INFO] Check the private repository is NOT cloned with NO PAT/OAuth setup" + testProjectIsCloned ${PROJECT_NAME} ${OCP_USER_NAMESPACE} && exit 1 + deleteTestWorkspace ${WS_NAME} ${OCP_USER_NAMESPACE} +} + +testCloneGitRepoWithSetupPat() { + WS_NAME=$1 + PROJECT_NAME=$2 + GIT_REPO_URL=$3 + OCP_USER_NAMESPACE=$4 + GIT_PROVIDER_PATH=$5 + + runTestWorkspaceWithGitRepoUrl ${WS_NAME} ${PROJECT_NAME} ${GIT_REPO_URL} ${OCP_USER_NAMESPACE} + testProjectIsCloned ${PROJECT_NAME} ${OCP_USER_NAMESPACE} || exit 1 + testGitCredentials ${OCP_USER_NAMESPACE} ${GIT_PROVIDER_PAT} + deleteTestWorkspace ${WS_NAME} ${OCP_USER_NAMESPACE} +} + +setupTestEnvironment() { + OCP_USER_NAME=$1 + + provisionOpenShiftOAuthUser + createCustomResourcesFile + deployChe + forwardPortToService + initUserNamespace ${OCP_USER_NAME} +} diff --git a/.ci/openshift-ci/devworkspace-test.yaml b/.ci/openshift-ci/devworkspace-test.yaml new file mode 100644 index 0000000000..9a52720f2c --- /dev/null +++ b/.ci/openshift-ci/devworkspace-test.yaml @@ -0,0 +1,21 @@ +kind: DevWorkspace +apiVersion: workspace.devfile.io/v1alpha2 +metadata: + name: ws-name +spec: + started: true + template: + projects: + - name: project-name + git: + remotes: + origin: git-repo-url + contributions: + - name: che-code + uri: https://eclipse-che.github.io/che-plugin-registry/main/v3/plugins/che-incubator/che-code/latest/devfile.yaml + components: + - name: che-code-runtime-description + container: + env: + - name: CODE_HOST + value: 0.0.0.0 diff --git a/.ci/openshift-ci/htpasswdProvider.yaml b/.ci/openshift-ci/htpasswdProvider.yaml new file mode 100644 index 0000000000..1bfe61860d --- /dev/null +++ b/.ci/openshift-ci/htpasswdProvider.yaml @@ -0,0 +1,12 @@ +apiVersion: config.openshift.io/v1 +kind: OAuth +metadata: + name: cluster +spec: + identityProviders: + - name: htpasswd + mappingMethod: claim + type: HTPasswd + htpasswd: + fileData: + name: htpass-secret diff --git a/.ci/openshift-ci/pat-secret.yaml b/.ci/openshift-ci/pat-secret.yaml new file mode 100644 index 0000000000..f45ed810d5 --- /dev/null +++ b/.ci/openshift-ci/pat-secret.yaml @@ -0,0 +1,16 @@ +kind: Secret +apiVersion: v1 +metadata: + name: personal-access-token + labels: + app.kubernetes.io/component: scm-personal-access-token + app.kubernetes.io/part-of: che.eclipse.org + annotations: + che.eclipse.org/che-userid: che-user-id + che.eclipse.org/scm-personal-access-token-name: git-provider-name + che.eclipse.org/scm-url: git-provider-url + che.eclipse.org/scm-userid: 'git-provider-user-id' + che.eclipse.org/scm-username: chepullreq1 +data: + token: encoded-access-token +type: Opaque diff --git a/.ci/openshift-ci/test-bitbucket-no-pat-oauth-flow.sh b/.ci/openshift-ci/test-bitbucket-no-pat-oauth-flow.sh new file mode 100644 index 0000000000..6516c7afb1 --- /dev/null +++ b/.ci/openshift-ci/test-bitbucket-no-pat-oauth-flow.sh @@ -0,0 +1,31 @@ +#!/bin/bash +# +# Copyright (c) 2023 Red Hat, Inc. +# This program and the accompanying materials are made +# available under the terms of the Eclipse Public License 2.0 +# which is available at https://www.eclipse.org/legal/epl-2.0/ +# +# SPDX-License-Identifier: EPL-2.0 +# +# Contributors: +# Red Hat, Inc. - initial API and implementation +# + +# exit immediately when a command fails +set -ex +# only exit with zero if all commands of the pipeline exit successfully +set -o pipefail + +export PUBLIC_REPO_URL=${PUBLIC_REPO_URL:-"https://chepullreq1@bitbucket.org/chepullreq/public-repo.git"} +export PRIVATE_REPO_URL=${PRIVATE_REPO_URL:-"https://chepullreq1@bitbucket.org/chepullreq/private-repo.git"} + +# import common test functions +SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )" +source "${SCRIPT_DIR}"/common.sh + +trap "catchFinish" EXIT SIGINT + +setupTestEnvironment ${OCP_NON_ADMIN_USER_NAME} +testFactoryResolverNoPatOAuth ${PUBLIC_REPO_URL} ${PRIVATE_REPO_URL} +testClonePublicRepoNoPatOAuth ${PUBLIC_REPO_WORKSPACE_NAME} ${PUBLIC_PROJECT_NAME} ${PUBLIC_REPO_URL} ${USER_CHE_NAMESPACE} +testClonePrivateRepoNoPatOAuth ${PRIVATE_REPO_WORKSPACE_NAME} ${PRIVATE_PROJECT_NAME} ${PRIVATE_REPO_URL} ${USER_CHE_NAMESPACE} diff --git a/.ci/openshift-ci/test-github-no-pat-oauth-flow.sh b/.ci/openshift-ci/test-github-no-pat-oauth-flow.sh new file mode 100644 index 0000000000..22d025cd41 --- /dev/null +++ b/.ci/openshift-ci/test-github-no-pat-oauth-flow.sh @@ -0,0 +1,31 @@ +#!/bin/bash +# +# Copyright (c) 2023 Red Hat, Inc. +# This program and the accompanying materials are made +# available under the terms of the Eclipse Public License 2.0 +# which is available at https://www.eclipse.org/legal/epl-2.0/ +# +# SPDX-License-Identifier: EPL-2.0 +# +# Contributors: +# Red Hat, Inc. - initial API and implementation +# + +# exit immediately when a command fails +set -ex +# only exit with zero if all commands of the pipeline exit successfully +set -o pipefail + +export PUBLIC_REPO_URL=${PUBLIC_REPO_URL:-"https://github.com/chepullreq1/public-repo.git"} +export PRIVATE_REPO_URL=${PRIVATE_REPO_URL:-"https://github.com/chepullreq1/private-repo.git"} + +# import common test functions +SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )" +source "${SCRIPT_DIR}"/common.sh + +trap "catchFinish" EXIT SIGINT + +setupTestEnvironment ${OCP_NON_ADMIN_USER_NAME} +testFactoryResolverNoPatOAuth ${PUBLIC_REPO_URL} ${PRIVATE_REPO_URL} +testClonePublicRepoNoPatOAuth ${PUBLIC_REPO_WORKSPACE_NAME} ${PUBLIC_PROJECT_NAME} ${PUBLIC_REPO_URL} ${USER_CHE_NAMESPACE} +testClonePrivateRepoNoPatOAuth ${PRIVATE_REPO_WORKSPACE_NAME} ${PRIVATE_PROJECT_NAME} ${PRIVATE_REPO_URL} ${USER_CHE_NAMESPACE} diff --git a/.ci/openshift-ci/test-github-with-pat-setup-flow.sh b/.ci/openshift-ci/test-github-with-pat-setup-flow.sh new file mode 100644 index 0000000000..53a01cf8e3 --- /dev/null +++ b/.ci/openshift-ci/test-github-with-pat-setup-flow.sh @@ -0,0 +1,36 @@ +#!/bin/bash +# +# Copyright (c) 2023 Red Hat, Inc. +# This program and the accompanying materials are made +# available under the terms of the Eclipse Public License 2.0 +# which is available at https://www.eclipse.org/legal/epl-2.0/ +# +# SPDX-License-Identifier: EPL-2.0 +# +# Contributors: +# Red Hat, Inc. - initial API and implementation +# + +# exit immediately when a command fails +set -ex +# only exit with zero if all commands of the pipeline exit successfully +set -o pipefail + +export PUBLIC_REPO_URL=${PUBLIC_REPO_URL:-"https://github.com/chepullreq1/public-repo.git"} +export PRIVATE_REPO_URL=${PRIVATE_REPO_URL:-"https://github.com/chepullreq1/private-repo.git"} +export GIT_PROVIDER_TYPE=${GIT_PROVIDER_TYPE:-"github"} +export GIT_PROVIDER_URL=${GIT_PROVIDER_URL:-"https://github.com"} + +# import common test functions +SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )" +source "${SCRIPT_DIR}"/common.sh + +trap "catchFinish" EXIT SIGINT + +setupTestEnvironment ${OCP_NON_ADMIN_USER_NAME} +setupPersonalAccessToken ${GIT_PROVIDER_TYPE} ${GIT_PROVIDER_URL} ${GITHUB_USER_ID} ${GITHUB_PAT} +testFactoryResolverWithPatOAuth ${PUBLIC_REPO_URL} ${PRIVATE_REPO_URL} +echo "[INFO] Check clone public repository with PAT setup" +testCloneGitRepoWithSetupPat ${PUBLIC_REPO_WORKSPACE_NAME} ${PUBLIC_PROJECT_NAME} ${PUBLIC_REPO_URL} ${USER_CHE_NAMESPACE} ${GITHUB_PAT} +echo "[INFO] Check clone private repository with PAT setup" +testCloneGitRepoWithSetupPat ${PRIVATE_REPO_WORKSPACE_NAME} ${PRIVATE_PROJECT_NAME} ${PRIVATE_REPO_URL} ${USER_CHE_NAMESPACE} ${GITHUB_PAT} diff --git a/.ci/openshift-ci/test-gitlab-no-pat-oauth-flow.sh b/.ci/openshift-ci/test-gitlab-no-pat-oauth-flow.sh new file mode 100644 index 0000000000..6d67a5cc64 --- /dev/null +++ b/.ci/openshift-ci/test-gitlab-no-pat-oauth-flow.sh @@ -0,0 +1,31 @@ +#!/bin/bash +# +# Copyright (c) 2023 Red Hat, Inc. +# This program and the accompanying materials are made +# available under the terms of the Eclipse Public License 2.0 +# which is available at https://www.eclipse.org/legal/epl-2.0/ +# +# SPDX-License-Identifier: EPL-2.0 +# +# Contributors: +# Red Hat, Inc. - initial API and implementation +# + +# exit immediately when a command fails +set -ex +# only exit with zero if all commands of the pipeline exit successfully +set -o pipefail + +export PUBLIC_REPO_URL=${PUBLIC_REPO_URL:-"https://gitlab.com/chepullreq1/public-repo.git"} +export PRIVATE_REPO_URL=${PRIVATE_REPO_URL:-"https://gitlab.com/chepullreq1/private-repo.git"} + +# import common test functions +SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )" +source "${SCRIPT_DIR}"/common.sh + +trap "catchFinish" EXIT SIGINT + +setupTestEnvironment ${OCP_NON_ADMIN_USER_NAME} +testFactoryResolverNoPatOAuth ${PUBLIC_REPO_URL} ${PRIVATE_REPO_URL} +testClonePublicRepoNoPatOAuth ${PUBLIC_REPO_WORKSPACE_NAME} ${PUBLIC_PROJECT_NAME} ${PUBLIC_REPO_URL} ${USER_CHE_NAMESPACE} +testClonePrivateRepoNoPatOAuth ${PRIVATE_REPO_WORKSPACE_NAME} ${PRIVATE_PROJECT_NAME} ${PRIVATE_REPO_URL} ${USER_CHE_NAMESPACE} diff --git a/.ci/openshift-ci/test-gitlab-with-pat-setup-flow.sh b/.ci/openshift-ci/test-gitlab-with-pat-setup-flow.sh new file mode 100644 index 0000000000..2c2b44f429 --- /dev/null +++ b/.ci/openshift-ci/test-gitlab-with-pat-setup-flow.sh @@ -0,0 +1,36 @@ +#!/bin/bash +# +# Copyright (c) 2023 Red Hat, Inc. +# This program and the accompanying materials are made +# available under the terms of the Eclipse Public License 2.0 +# which is available at https://www.eclipse.org/legal/epl-2.0/ +# +# SPDX-License-Identifier: EPL-2.0 +# +# Contributors: +# Red Hat, Inc. - initial API and implementation +# + +# exit immediately when a command fails +set -ex +# only exit with zero if all commands of the pipeline exit successfully +set -o pipefail + +export PUBLIC_REPO_URL=${PUBLIC_REPO_URL:-"https://gitlab.com/chepullreq1/public-repo.git"} +export PRIVATE_REPO_URL=${PRIVATE_REPO_URL:-"https://gitlab.com/chepullreq1/private-repo.git"} +export GIT_PROVIDER_TYPE=${GIT_PROVIDER_TYPE:-"gitlab"} +export GIT_PROVIDER_URL=${GIT_PROVIDER_URL:-"https://gitlab.com"} + +# import common test functions +SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )" +source "${SCRIPT_DIR}"/common.sh + +trap "catchFinish" EXIT SIGINT + +setupTestEnvironment ${OCP_NON_ADMIN_USER_NAME} +setupPersonalAccessToken ${GIT_PROVIDER_TYPE} ${GIT_PROVIDER_URL} ${GITLAB_USER_ID} ${GITLAB_PAT} +testFactoryResolverWithPatOAuth ${PUBLIC_REPO_URL} ${PRIVATE_REPO_URL} +echo "[INFO] Check clone public repository with PAT setup" +testCloneGitRepoWithSetupPat ${PUBLIC_REPO_WORKSPACE_NAME} ${PUBLIC_PROJECT_NAME} ${PUBLIC_REPO_URL} ${USER_CHE_NAMESPACE} ${GITLAB_PAT} +echo "[INFO] Check clone private repository with PAT setup" +testCloneGitRepoWithSetupPat ${PRIVATE_REPO_WORKSPACE_NAME} ${PRIVATE_PROJECT_NAME} ${PRIVATE_REPO_URL} ${USER_CHE_NAMESPACE} ${GITLAB_PAT} diff --git a/.github/workflows/build-pr-check.yml b/.github/workflows/build-pr-check.yml index c9dee916ad..b9c73f0785 100644 --- a/.github/workflows/build-pr-check.yml +++ b/.github/workflows/build-pr-check.yml @@ -11,6 +11,9 @@ name: build-pr-check on: [push, pull_request] +env: + PR_IMAGE_TAG: pr-${{ github.event.pull_request.number }} + jobs: build: runs-on: ubuntu-22.04 @@ -26,5 +29,25 @@ jobs: distribution: 'temurin' java-version: '11' cache: 'maven' + - name: Login to docker.io + if: github.event_name == 'pull_request' + uses: docker/login-action@v2 + with: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_PASSWORD }} + registry: docker.io + - name: Login to quay.io + if: github.event_name == 'pull_request' + uses: docker/login-action@v2 + with: + username: ${{ secrets.QUAY_USERNAME }} + password: ${{ secrets.QUAY_PASSWORD }} + registry: quay.io - name: Build with Maven run: mvn -B clean install -U -Pintegration + - name: Build docker images + if: github.event_name == 'pull_request' + run: ./dockerfiles/build.sh --tag:${{ env.PR_IMAGE_TAG }} + - name: Push docker images + if: github.event_name == 'pull_request' + run: docker push quay.io/eclipse/che-server:${{ env.PR_IMAGE_TAG }} From ae4f6a33a523c4d68ab038006fac3e26e2c895b0 Mon Sep 17 00:00:00 2001 From: che-bot <39771996+che-bot@users.noreply.github.com> Date: Thu, 25 May 2023 15:51:18 +0200 Subject: [PATCH 19/75] chore: Update from ubi8-minimal:8.7-1107 to ubi8-minimal:8.8-860 (#515) Signed-off-by: Nick Boldt Co-authored-by: Nick Boldt --- dockerfiles/che/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dockerfiles/che/Dockerfile b/dockerfiles/che/Dockerfile index 6e3f2d8890..d48b7f754a 100644 --- a/dockerfiles/che/Dockerfile +++ b/dockerfiles/che/Dockerfile @@ -10,7 +10,7 @@ # # https://access.redhat.com/containers/?tab=tags#/registry.access.redhat.com/ubi8-minimal -FROM registry.access.redhat.com/ubi8-minimal:8.7-1107 +FROM registry.access.redhat.com/ubi8-minimal:8.8-860 USER root ENV CHE_HOME=/home/user/eclipse-che ENV JAVA_HOME=/usr/lib/jvm/jre From dd873a597bb4f11ac9adf8806f39eccbefab479d Mon Sep 17 00:00:00 2001 From: Anatolii Bazko Date: Thu, 25 May 2023 17:20:59 +0300 Subject: [PATCH 20/75] chore: Use CheServer client factory to handle Kubernetes operation in a user namespace (#516) Signed-off-by: Anatolii Bazko --- .../KubernetesGitCredentialManager.java | 11 +- .../KubernetesPersonalAccessTokenManager.java | 20 +- .../KubernetesGitCredentialManagerTest.java | 12 +- ...ernetesPersonalAccessTokenManagerTest.java | 15 +- .../kubernetes/KubernetesInfrastructure.java | 5 +- .../namespace/KubernetesNamespace.java | 28 +-- .../namespace/KubernetesNamespaceFactory.java | 26 ++- .../CredentialsSecretConfigurator.java | 13 +- .../GitconfigUserDataConfigurator.java | 16 +- .../PreferencesConfigMapConfigurator.java | 13 +- .../configurator/SshKeysConfigurator.java | 11 +- .../UserPermissionConfigurator.java | 11 +- .../UserPreferencesConfigurator.java | 18 +- .../configurator/UserProfileConfigurator.java | 14 +- .../WorkspaceServiceAccountConfigurator.java | 16 +- .../KubernetesInfrastructureTest.java | 9 +- .../KubernetesNamespaceFactoryTest.java | 188 +++++------------- .../namespace/KubernetesNamespaceTest.java | 40 ++-- .../CredentialsSecretConfiguratorTest.java | 10 +- .../GitconfigUserdataConfiguratorTest.java | 11 +- .../PreferencesConfigMapConfiguratorTest.java | 12 +- .../configurator/SshKeysConfiguratorTest.java | 8 +- .../UserPreferencesConfiguratorTest.java | 11 +- .../openshift/OpenShiftInfrastructure.java | 5 +- .../openshift/project/OpenShiftProject.java | 27 ++- .../project/OpenShiftProjectFactory.java | 38 ++-- ...ftWorkspaceServiceAccountConfigurator.java | 12 +- .../OpenShiftInfrastructureTest.java | 9 +- .../project/OpenShiftProjectFactoryTest.java | 128 +++++------- ...rkspaceServiceAccountConfiguratorTest.java | 13 +- 30 files changed, 304 insertions(+), 446 deletions(-) diff --git a/infrastructures/infrastructure-factory/src/main/java/org/eclipse/che/api/factory/server/scm/kubernetes/KubernetesGitCredentialManager.java b/infrastructures/infrastructure-factory/src/main/java/org/eclipse/che/api/factory/server/scm/kubernetes/KubernetesGitCredentialManager.java index 3930c65966..908ee290e8 100644 --- a/infrastructures/infrastructure-factory/src/main/java/org/eclipse/che/api/factory/server/scm/kubernetes/KubernetesGitCredentialManager.java +++ b/infrastructures/infrastructure-factory/src/main/java/org/eclipse/che/api/factory/server/scm/kubernetes/KubernetesGitCredentialManager.java @@ -43,7 +43,7 @@ import org.eclipse.che.api.factory.server.scm.exception.UnsatisfiedScmPreconditi import org.eclipse.che.api.workspace.server.spi.InfrastructureException; import org.eclipse.che.commons.lang.NameGenerator; import org.eclipse.che.commons.lang.StringUtils; -import org.eclipse.che.workspace.infrastructure.kubernetes.KubernetesClientFactory; +import org.eclipse.che.workspace.infrastructure.kubernetes.CheServerKubernetesClientFactory; import org.eclipse.che.workspace.infrastructure.kubernetes.api.shared.KubernetesNamespaceMeta; import org.eclipse.che.workspace.infrastructure.kubernetes.namespace.KubernetesNamespaceFactory; @@ -86,13 +86,14 @@ public class KubernetesGitCredentialManager implements GitCredentialManager { ANNOTATION_DEV_WORKSPACE_MOUNT_PATH, CREDENTIALS_MOUNT_PATH); private final KubernetesNamespaceFactory namespaceFactory; - private final KubernetesClientFactory clientFactory; + private final CheServerKubernetesClientFactory cheServerKubernetesClientFactory; @Inject public KubernetesGitCredentialManager( - KubernetesNamespaceFactory namespaceFactory, KubernetesClientFactory clientFactory) { + KubernetesNamespaceFactory namespaceFactory, + CheServerKubernetesClientFactory cheServerKubernetesClientFactory) { this.namespaceFactory = namespaceFactory; - this.clientFactory = clientFactory; + this.cheServerKubernetesClientFactory = cheServerKubernetesClientFactory; } @Override @@ -100,7 +101,7 @@ public class KubernetesGitCredentialManager implements GitCredentialManager { throws UnsatisfiedScmPreconditionException, ScmConfigurationPersistenceException { try { final String namespace = getFirstNamespace(); - final KubernetesClient client = clientFactory.create(); + final KubernetesClient client = cheServerKubernetesClientFactory.create(); // to avoid duplicating secrets we try to reuse existing one by matching // hostname/username if possible, and update it. Otherwise, create new one. Optional existing = diff --git a/infrastructures/infrastructure-factory/src/main/java/org/eclipse/che/api/factory/server/scm/kubernetes/KubernetesPersonalAccessTokenManager.java b/infrastructures/infrastructure-factory/src/main/java/org/eclipse/che/api/factory/server/scm/kubernetes/KubernetesPersonalAccessTokenManager.java index dca15f0951..d7278cba4b 100644 --- a/infrastructures/infrastructure-factory/src/main/java/org/eclipse/che/api/factory/server/scm/kubernetes/KubernetesPersonalAccessTokenManager.java +++ b/infrastructures/infrastructure-factory/src/main/java/org/eclipse/che/api/factory/server/scm/kubernetes/KubernetesPersonalAccessTokenManager.java @@ -42,7 +42,7 @@ import org.eclipse.che.commons.env.EnvironmentContext; import org.eclipse.che.commons.lang.NameGenerator; import org.eclipse.che.commons.lang.StringUtils; import org.eclipse.che.commons.subject.Subject; -import org.eclipse.che.workspace.infrastructure.kubernetes.KubernetesClientFactory; +import org.eclipse.che.workspace.infrastructure.kubernetes.CheServerKubernetesClientFactory; import org.eclipse.che.workspace.infrastructure.kubernetes.api.shared.KubernetesNamespaceMeta; import org.eclipse.che.workspace.infrastructure.kubernetes.namespace.KubernetesNamespaceFactory; @@ -69,18 +69,18 @@ public class KubernetesPersonalAccessTokenManager implements PersonalAccessToken public static final String TOKEN_DATA_FIELD = "token"; private final KubernetesNamespaceFactory namespaceFactory; - private final KubernetesClientFactory clientFactory; + private final CheServerKubernetesClientFactory cheServerKubernetesClientFactory; private final ScmPersonalAccessTokenFetcher scmPersonalAccessTokenFetcher; private final GitCredentialManager gitCredentialManager; @Inject public KubernetesPersonalAccessTokenManager( KubernetesNamespaceFactory namespaceFactory, - KubernetesClientFactory clientFactory, + CheServerKubernetesClientFactory cheServerKubernetesClientFactory, ScmPersonalAccessTokenFetcher scmPersonalAccessTokenFetcher, GitCredentialManager gitCredentialManager) { this.namespaceFactory = namespaceFactory; - this.clientFactory = clientFactory; + this.cheServerKubernetesClientFactory = cheServerKubernetesClientFactory; this.scmPersonalAccessTokenFetcher = scmPersonalAccessTokenFetcher; this.gitCredentialManager = gitCredentialManager; } @@ -119,7 +119,11 @@ public class KubernetesPersonalAccessTokenManager implements PersonalAccessToken personalAccessToken.getToken().getBytes(StandardCharsets.UTF_8)))) .build(); - clientFactory.create().secrets().inNamespace(namespace).createOrReplace(secret); + cheServerKubernetesClientFactory + .create() + .secrets() + .inNamespace(namespace) + .createOrReplace(secret); } catch (KubernetesClientException | InfrastructureException e) { throw new ScmConfigurationPersistenceException(e.getMessage(), e); } @@ -188,7 +192,11 @@ public class KubernetesPersonalAccessTokenManager implements PersonalAccessToken // be valid. If no valid token can be found, the caller should react in the same way // as it reacts if no token exists. Usually, that means that process of new token // retrieval would be initiated. - clientFactory.create().secrets().inNamespace(namespaceMeta.getName()).delete(secret); + cheServerKubernetesClientFactory + .create() + .secrets() + .inNamespace(namespaceMeta.getName()) + .delete(secret); } } } diff --git a/infrastructures/infrastructure-factory/src/test/java/org/eclipse/che/api/factory/server/scm/kubernetes/KubernetesGitCredentialManagerTest.java b/infrastructures/infrastructure-factory/src/test/java/org/eclipse/che/api/factory/server/scm/kubernetes/KubernetesGitCredentialManagerTest.java index 3c8d6b1e78..9f9bf8c8b7 100644 --- a/infrastructures/infrastructure-factory/src/test/java/org/eclipse/che/api/factory/server/scm/kubernetes/KubernetesGitCredentialManagerTest.java +++ b/infrastructures/infrastructure-factory/src/test/java/org/eclipse/che/api/factory/server/scm/kubernetes/KubernetesGitCredentialManagerTest.java @@ -43,7 +43,7 @@ import java.util.HashMap; import java.util.Map; import org.eclipse.che.api.factory.server.scm.PersonalAccessToken; import org.eclipse.che.commons.lang.NameGenerator; -import org.eclipse.che.workspace.infrastructure.kubernetes.KubernetesClientFactory; +import org.eclipse.che.workspace.infrastructure.kubernetes.CheServerKubernetesClientFactory; import org.eclipse.che.workspace.infrastructure.kubernetes.api.server.impls.KubernetesNamespaceMetaImpl; import org.eclipse.che.workspace.infrastructure.kubernetes.api.shared.KubernetesNamespaceMeta; import org.eclipse.che.workspace.infrastructure.kubernetes.namespace.KubernetesNamespaceFactory; @@ -58,7 +58,7 @@ import org.testng.annotations.Test; public class KubernetesGitCredentialManagerTest { @Mock private KubernetesNamespaceFactory namespaceFactory; - @Mock private KubernetesClientFactory clientFactory; + @Mock private CheServerKubernetesClientFactory cheServerKubernetesClientFactory; @Mock private KubernetesClient kubeClient; @Mock private MixedOperation> secretsMixedOperation; @@ -74,7 +74,7 @@ public class KubernetesGitCredentialManagerTest { @BeforeMethod protected void init() { kubernetesGitCredentialManager = - new KubernetesGitCredentialManager(namespaceFactory, clientFactory); + new KubernetesGitCredentialManager(namespaceFactory, cheServerKubernetesClientFactory); assertNotNull(this.kubernetesGitCredentialManager); } @@ -83,7 +83,7 @@ public class KubernetesGitCredentialManagerTest { KubernetesNamespaceMeta meta = new KubernetesNamespaceMetaImpl("test"); when(namespaceFactory.list()).thenReturn(Collections.singletonList(meta)); - when(clientFactory.create()).thenReturn(kubeClient); + when(cheServerKubernetesClientFactory.create()).thenReturn(kubeClient); when(kubeClient.secrets()).thenReturn(secretsMixedOperation); when(secretsMixedOperation.inNamespace(eq(meta.getName()))).thenReturn(nonNamespaceOperation); when(nonNamespaceOperation.withLabels(anyMap())).thenReturn(filterWatchDeletable); @@ -113,7 +113,7 @@ public class KubernetesGitCredentialManagerTest { KubernetesNamespaceMeta meta = new KubernetesNamespaceMetaImpl("test"); when(namespaceFactory.list()).thenReturn(Collections.singletonList(meta)); - when(clientFactory.create()).thenReturn(kubeClient); + when(cheServerKubernetesClientFactory.create()).thenReturn(kubeClient); when(kubeClient.secrets()).thenReturn(secretsMixedOperation); when(secretsMixedOperation.inNamespace(eq(meta.getName()))).thenReturn(nonNamespaceOperation); when(nonNamespaceOperation.withLabels(anyMap())).thenReturn(filterWatchDeletable); @@ -173,7 +173,7 @@ public class KubernetesGitCredentialManagerTest { when(namespaceFactory.list()).thenReturn(Collections.singletonList(namespaceMeta)); - when(clientFactory.create()).thenReturn(kubeClient); + when(cheServerKubernetesClientFactory.create()).thenReturn(kubeClient); when(kubeClient.secrets()).thenReturn(secretsMixedOperation); when(secretsMixedOperation.inNamespace(eq(namespaceMeta.getName()))) .thenReturn(nonNamespaceOperation); diff --git a/infrastructures/infrastructure-factory/src/test/java/org/eclipse/che/api/factory/server/scm/kubernetes/KubernetesPersonalAccessTokenManagerTest.java b/infrastructures/infrastructure-factory/src/test/java/org/eclipse/che/api/factory/server/scm/kubernetes/KubernetesPersonalAccessTokenManagerTest.java index f24bdc5288..f8207607db 100644 --- a/infrastructures/infrastructure-factory/src/test/java/org/eclipse/che/api/factory/server/scm/kubernetes/KubernetesPersonalAccessTokenManagerTest.java +++ b/infrastructures/infrastructure-factory/src/test/java/org/eclipse/che/api/factory/server/scm/kubernetes/KubernetesPersonalAccessTokenManagerTest.java @@ -45,7 +45,7 @@ import org.eclipse.che.api.factory.server.scm.GitCredentialManager; import org.eclipse.che.api.factory.server.scm.PersonalAccessToken; import org.eclipse.che.api.factory.server.scm.ScmPersonalAccessTokenFetcher; import org.eclipse.che.commons.subject.SubjectImpl; -import org.eclipse.che.workspace.infrastructure.kubernetes.KubernetesClientFactory; +import org.eclipse.che.workspace.infrastructure.kubernetes.CheServerKubernetesClientFactory; import org.eclipse.che.workspace.infrastructure.kubernetes.api.server.impls.KubernetesNamespaceMetaImpl; import org.eclipse.che.workspace.infrastructure.kubernetes.api.shared.KubernetesNamespaceMeta; import org.eclipse.che.workspace.infrastructure.kubernetes.namespace.KubernetesNamespace; @@ -64,7 +64,7 @@ import org.testng.annotations.Test; public class KubernetesPersonalAccessTokenManagerTest { @Mock private KubernetesNamespaceFactory namespaceFactory; - @Mock private KubernetesClientFactory clientFactory; + @Mock private CheServerKubernetesClientFactory cheServerKubernetesClientFactory; @Mock private ScmPersonalAccessTokenFetcher scmPersonalAccessTokenFetcher; @Mock private KubernetesClient kubeClient; @@ -80,7 +80,10 @@ public class KubernetesPersonalAccessTokenManagerTest { protected void init() { personalAccessTokenManager = new KubernetesPersonalAccessTokenManager( - namespaceFactory, clientFactory, scmPersonalAccessTokenFetcher, gitCredentialManager); + namespaceFactory, + cheServerKubernetesClientFactory, + scmPersonalAccessTokenFetcher, + gitCredentialManager); assertNotNull(this.personalAccessTokenManager); } @@ -123,7 +126,7 @@ public class KubernetesPersonalAccessTokenManagerTest { KubernetesNamespaceMeta meta = new KubernetesNamespaceMetaImpl("test"); when(namespaceFactory.list()).thenReturn(Collections.singletonList(meta)); - when(clientFactory.create()).thenReturn(kubeClient); + when(cheServerKubernetesClientFactory.create()).thenReturn(kubeClient); when(kubeClient.secrets()).thenReturn(secretsMixedOperation); when(secretsMixedOperation.inNamespace(eq(meta.getName()))).thenReturn(nonNamespaceOperation); ArgumentCaptor captor = ArgumentCaptor.forClass(Secret.class); @@ -259,7 +262,7 @@ public class KubernetesPersonalAccessTokenManagerTest { when(namespaceFactory.access(eq(null), eq(meta.getName()))).thenReturn(kubernetesnamespace); when(kubernetesnamespace.secrets()).thenReturn(secrets); when(scmPersonalAccessTokenFetcher.isValid(any(PersonalAccessToken.class))).thenReturn(false); - when(clientFactory.create()).thenReturn(kubeClient); + when(cheServerKubernetesClientFactory.create()).thenReturn(kubeClient); when(kubeClient.secrets()).thenReturn(secretsMixedOperation); when(secretsMixedOperation.inNamespace(eq(meta.getName()))).thenReturn(nonNamespaceOperation); Map data1 = @@ -296,7 +299,7 @@ public class KubernetesPersonalAccessTokenManagerTest { PersonalAccessToken token = invocation.getArgument(0); return "id2".equals(token.getScmTokenId()); }); - when(clientFactory.create()).thenReturn(kubeClient); + when(cheServerKubernetesClientFactory.create()).thenReturn(kubeClient); when(kubeClient.secrets()).thenReturn(secretsMixedOperation); when(secretsMixedOperation.inNamespace(eq(meta.getName()))).thenReturn(nonNamespaceOperation); Map data1 = diff --git a/infrastructures/kubernetes/src/main/java/org/eclipse/che/workspace/infrastructure/kubernetes/KubernetesInfrastructure.java b/infrastructures/kubernetes/src/main/java/org/eclipse/che/workspace/infrastructure/kubernetes/KubernetesInfrastructure.java index 794b4dc9be..e70555a374 100644 --- a/infrastructures/kubernetes/src/main/java/org/eclipse/che/workspace/infrastructure/kubernetes/KubernetesInfrastructure.java +++ b/infrastructures/kubernetes/src/main/java/org/eclipse/che/workspace/infrastructure/kubernetes/KubernetesInfrastructure.java @@ -41,7 +41,6 @@ public class KubernetesInfrastructure extends RuntimeInfrastructure { private final KubernetesRuntimeContextFactory runtimeContextFactory; private final KubernetesRuntimeStateCache runtimeStatusesCache; private final KubernetesNamespaceFactory namespaceFactory; - private final KubernetesClientFactory kubernetesClientFactory; @Inject public KubernetesInfrastructure( @@ -49,8 +48,7 @@ public class KubernetesInfrastructure extends RuntimeInfrastructure { KubernetesRuntimeContextFactory runtimeContextFactory, Set internalEnvProvisioners, KubernetesRuntimeStateCache runtimeStatusesCache, - KubernetesNamespaceFactory namespaceFactory, - KubernetesClientFactory kubernetesClientFactory) { + KubernetesNamespaceFactory namespaceFactory) { super( NAME, ImmutableSet.of(KubernetesEnvironment.TYPE, Constants.NO_ENVIRONMENT_RECIPE_TYPE), @@ -59,7 +57,6 @@ public class KubernetesInfrastructure extends RuntimeInfrastructure { this.runtimeContextFactory = runtimeContextFactory; this.runtimeStatusesCache = runtimeStatusesCache; this.namespaceFactory = namespaceFactory; - this.kubernetesClientFactory = kubernetesClientFactory; } @Override diff --git a/infrastructures/kubernetes/src/main/java/org/eclipse/che/workspace/infrastructure/kubernetes/namespace/KubernetesNamespace.java b/infrastructures/kubernetes/src/main/java/org/eclipse/che/workspace/infrastructure/kubernetes/namespace/KubernetesNamespace.java index 582081d1e6..e5ebe6e313 100644 --- a/infrastructures/kubernetes/src/main/java/org/eclipse/che/workspace/infrastructure/kubernetes/namespace/KubernetesNamespace.java +++ b/infrastructures/kubernetes/src/main/java/org/eclipse/che/workspace/infrastructure/kubernetes/namespace/KubernetesNamespace.java @@ -41,7 +41,7 @@ import java.util.concurrent.TimeoutException; import java.util.function.Predicate; import org.eclipse.che.api.workspace.server.spi.InfrastructureException; import org.eclipse.che.api.workspace.server.spi.InternalInfrastructureException; -import org.eclipse.che.workspace.infrastructure.kubernetes.KubernetesClientFactory; +import org.eclipse.che.workspace.infrastructure.kubernetes.CheServerKubernetesClientFactory; import org.eclipse.che.workspace.infrastructure.kubernetes.KubernetesInfrastructureException; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -73,18 +73,15 @@ public class KubernetesNamespace { private final KubernetesServices services; private final KubernetesPersistentVolumeClaims pvcs; private final KubernetesIngresses ingresses; - /** Factory for workspace related operations clients */ - private final KubernetesClientFactory clientFactory; /** Factory for cluster related operations clients (like labeling the namespaces) */ - private final KubernetesClientFactory cheSAClientFactory; + private final CheServerKubernetesClientFactory cheSAClientFactory; private final KubernetesSecrets secrets; private final KubernetesConfigsMaps configMaps; @VisibleForTesting protected KubernetesNamespace( - KubernetesClientFactory clientFactory, - KubernetesClientFactory cheSAClientFactory, + CheServerKubernetesClientFactory cheSAClientFactory, String workspaceId, String name, KubernetesDeployments deployments, @@ -93,7 +90,6 @@ public class KubernetesNamespace { KubernetesIngresses kubernetesIngresses, KubernetesSecrets secrets, KubernetesConfigsMaps configMaps) { - this.clientFactory = clientFactory; this.cheSAClientFactory = cheSAClientFactory; this.workspaceId = workspaceId; this.name = name; @@ -106,21 +102,19 @@ public class KubernetesNamespace { } public KubernetesNamespace( - KubernetesClientFactory clientFactory, - KubernetesClientFactory cheSAClientFactory, + CheServerKubernetesClientFactory cheSAClientFactory, Executor executor, String name, String workspaceId) { - this.clientFactory = clientFactory; this.cheSAClientFactory = cheSAClientFactory; this.workspaceId = workspaceId; this.name = name; - this.deployments = new KubernetesDeployments(name, workspaceId, clientFactory, executor); - this.services = new KubernetesServices(name, workspaceId, clientFactory); - this.pvcs = new KubernetesPersistentVolumeClaims(name, workspaceId, clientFactory); - this.ingresses = new KubernetesIngresses(name, workspaceId, clientFactory); - this.secrets = new KubernetesSecrets(name, workspaceId, clientFactory); - this.configMaps = new KubernetesConfigsMaps(name, workspaceId, clientFactory); + this.deployments = new KubernetesDeployments(name, workspaceId, cheSAClientFactory, executor); + this.services = new KubernetesServices(name, workspaceId, cheSAClientFactory); + this.pvcs = new KubernetesPersistentVolumeClaims(name, workspaceId, cheSAClientFactory); + this.ingresses = new KubernetesIngresses(name, workspaceId, cheSAClientFactory); + this.secrets = new KubernetesSecrets(name, workspaceId, cheSAClientFactory); + this.configMaps = new KubernetesConfigsMaps(name, workspaceId, cheSAClientFactory); } /** @@ -270,7 +264,7 @@ public class KubernetesNamespace { * @throws InfrastructureException if any unexpected exception occurs during namespace deletion */ void delete() throws InfrastructureException { - KubernetesClient client = clientFactory.create(workspaceId); + KubernetesClient client = cheSAClientFactory.create(workspaceId); try { delete(name, client); diff --git a/infrastructures/kubernetes/src/main/java/org/eclipse/che/workspace/infrastructure/kubernetes/namespace/KubernetesNamespaceFactory.java b/infrastructures/kubernetes/src/main/java/org/eclipse/che/workspace/infrastructure/kubernetes/namespace/KubernetesNamespaceFactory.java index 68637831a4..a76a7b4207 100644 --- a/infrastructures/kubernetes/src/main/java/org/eclipse/che/workspace/infrastructure/kubernetes/namespace/KubernetesNamespaceFactory.java +++ b/infrastructures/kubernetes/src/main/java/org/eclipse/che/workspace/infrastructure/kubernetes/namespace/KubernetesNamespaceFactory.java @@ -46,7 +46,6 @@ import org.eclipse.che.api.core.ValidationException; import org.eclipse.che.api.core.model.workspace.Workspace; import org.eclipse.che.api.core.model.workspace.runtime.RuntimeIdentity; import org.eclipse.che.api.user.server.PreferenceManager; -import org.eclipse.che.api.user.server.UserManager; import org.eclipse.che.api.workspace.server.spi.InfrastructureException; import org.eclipse.che.api.workspace.server.spi.NamespaceResolutionContext; import org.eclipse.che.commons.annotation.Nullable; @@ -56,7 +55,6 @@ import org.eclipse.che.commons.lang.Pair; import org.eclipse.che.commons.subject.Subject; import org.eclipse.che.inject.ConfigurationException; import org.eclipse.che.workspace.infrastructure.kubernetes.CheServerKubernetesClientFactory; -import org.eclipse.che.workspace.infrastructure.kubernetes.KubernetesClientFactory; import org.eclipse.che.workspace.infrastructure.kubernetes.api.server.impls.KubernetesNamespaceMetaImpl; import org.eclipse.che.workspace.infrastructure.kubernetes.api.shared.KubernetesNamespaceMeta; import org.eclipse.che.workspace.infrastructure.kubernetes.namespace.configurator.NamespaceConfigurator; @@ -95,10 +93,8 @@ public class KubernetesNamespaceFactory { protected final Map namespaceLabels; protected final Map namespaceAnnotations; - private final KubernetesClientFactory clientFactory; - private final KubernetesClientFactory cheClientFactory; + private final CheServerKubernetesClientFactory cheServerKubernetesClientFactory; private final boolean namespaceCreationAllowed; - private final UserManager userManager; private final PreferenceManager preferenceManager; protected final Set namespaceConfigurators; protected final KubernetesSharedPool sharedPool; @@ -112,16 +108,12 @@ public class KubernetesNamespaceFactory { @Named("che.infra.kubernetes.namespace.labels") String namespaceLabels, @Named("che.infra.kubernetes.namespace.annotations") String namespaceAnnotations, Set namespaceConfigurators, - KubernetesClientFactory clientFactory, - CheServerKubernetesClientFactory cheClientFactory, - UserManager userManager, + CheServerKubernetesClientFactory cheServerKubernetesClientFactory, PreferenceManager preferenceManager, KubernetesSharedPool sharedPool) throws ConfigurationException { this.namespaceCreationAllowed = namespaceCreationAllowed; - this.userManager = userManager; - this.clientFactory = clientFactory; - this.cheClientFactory = cheClientFactory; + this.cheServerKubernetesClientFactory = cheServerKubernetesClientFactory; this.defaultNamespaceName = defaultNamespaceName; this.preferenceManager = preferenceManager; this.sharedPool = sharedPool; @@ -168,7 +160,7 @@ public class KubernetesNamespaceFactory { @VisibleForTesting KubernetesNamespace doCreateNamespaceAccess(String workspaceId, String name) { return new KubernetesNamespace( - clientFactory, cheClientFactory, sharedPool.getExecutor(), name, workspaceId); + cheServerKubernetesClientFactory, sharedPool.getExecutor(), name, workspaceId); } /** @@ -241,7 +233,8 @@ public class KubernetesNamespaceFactory { public Optional fetchNamespace(String name) throws InfrastructureException { try { - Namespace namespace = cheClientFactory.create().namespaces().withName(name).get(); + Namespace namespace = + cheServerKubernetesClientFactory.create().namespaces().withName(name).get(); if (namespace == null) { return Optional.empty(); } else { @@ -501,7 +494,12 @@ public class KubernetesNamespaceFactory { NamespaceResolutionContext namespaceCtx) throws InfrastructureException { try { List workspaceNamespaces = - cheClientFactory.create().namespaces().withLabels(namespaceLabels).list().getItems(); + cheServerKubernetesClientFactory + .create() + .namespaces() + .withLabels(namespaceLabels) + .list() + .getItems(); if (!workspaceNamespaces.isEmpty()) { Map evaluatedAnnotations = evaluateAnnotationPlaceholders(namespaceCtx); return workspaceNamespaces.stream() diff --git a/infrastructures/kubernetes/src/main/java/org/eclipse/che/workspace/infrastructure/kubernetes/namespace/configurator/CredentialsSecretConfigurator.java b/infrastructures/kubernetes/src/main/java/org/eclipse/che/workspace/infrastructure/kubernetes/namespace/configurator/CredentialsSecretConfigurator.java index 8e32f49076..65a5774b59 100644 --- a/infrastructures/kubernetes/src/main/java/org/eclipse/che/workspace/infrastructure/kubernetes/namespace/configurator/CredentialsSecretConfigurator.java +++ b/infrastructures/kubernetes/src/main/java/org/eclipse/che/workspace/infrastructure/kubernetes/namespace/configurator/CredentialsSecretConfigurator.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012-2021 Red Hat, Inc. + * Copyright (c) 2012-2023 Red Hat, Inc. * This program and the accompanying materials are made * available under the terms of the Eclipse Public License 2.0 * which is available at https://www.eclipse.org/legal/epl-2.0/ @@ -19,7 +19,7 @@ import javax.inject.Inject; import javax.inject.Singleton; import org.eclipse.che.api.workspace.server.spi.InfrastructureException; import org.eclipse.che.api.workspace.server.spi.NamespaceResolutionContext; -import org.eclipse.che.workspace.infrastructure.kubernetes.KubernetesClientFactory; +import org.eclipse.che.workspace.infrastructure.kubernetes.CheServerKubernetesClientFactory; /** * This {@link NamespaceConfigurator} ensures that Secret {@link @@ -29,17 +29,18 @@ import org.eclipse.che.workspace.infrastructure.kubernetes.KubernetesClientFacto @Singleton public class CredentialsSecretConfigurator implements NamespaceConfigurator { - private final KubernetesClientFactory clientFactory; + private final CheServerKubernetesClientFactory cheServerKubernetesClientFactory; @Inject - public CredentialsSecretConfigurator(KubernetesClientFactory clientFactory) { - this.clientFactory = clientFactory; + public CredentialsSecretConfigurator( + CheServerKubernetesClientFactory cheServerKubernetesClientFactory) { + this.cheServerKubernetesClientFactory = cheServerKubernetesClientFactory; } @Override public void configure(NamespaceResolutionContext namespaceResolutionContext, String namespaceName) throws InfrastructureException { - var client = clientFactory.create(); + var client = cheServerKubernetesClientFactory.create(); if (client.secrets().inNamespace(namespaceName).withName(CREDENTIALS_SECRET_NAME).get() == null) { Secret secret = diff --git a/infrastructures/kubernetes/src/main/java/org/eclipse/che/workspace/infrastructure/kubernetes/namespace/configurator/GitconfigUserDataConfigurator.java b/infrastructures/kubernetes/src/main/java/org/eclipse/che/workspace/infrastructure/kubernetes/namespace/configurator/GitconfigUserDataConfigurator.java index 6691c424f3..7a99ba0f9c 100644 --- a/infrastructures/kubernetes/src/main/java/org/eclipse/che/workspace/infrastructure/kubernetes/namespace/configurator/GitconfigUserDataConfigurator.java +++ b/infrastructures/kubernetes/src/main/java/org/eclipse/che/workspace/infrastructure/kubernetes/namespace/configurator/GitconfigUserDataConfigurator.java @@ -23,34 +23,30 @@ import javax.inject.Inject; import org.eclipse.che.api.factory.server.scm.GitUserData; import org.eclipse.che.api.factory.server.scm.GitUserDataFetcher; import org.eclipse.che.api.factory.server.scm.exception.*; -import org.eclipse.che.api.user.server.UserManager; import org.eclipse.che.api.workspace.server.spi.InfrastructureException; import org.eclipse.che.api.workspace.server.spi.NamespaceResolutionContext; -import org.eclipse.che.workspace.infrastructure.kubernetes.KubernetesClientFactory; +import org.eclipse.che.workspace.infrastructure.kubernetes.CheServerKubernetesClientFactory; import org.slf4j.Logger; import org.slf4j.LoggerFactory; public class GitconfigUserDataConfigurator implements NamespaceConfigurator { private static final Logger LOG = LoggerFactory.getLogger(GitconfigUserDataConfigurator.class); - private final KubernetesClientFactory clientFactory; + private final CheServerKubernetesClientFactory cheServerKubernetesClientFactory; private final Set gitUserDataFetchers; private static final String CONFIGMAP_DATA_KEY = "gitconfig"; - private final UserManager userManager; @Inject public GitconfigUserDataConfigurator( - KubernetesClientFactory clientFactory, - Set gitUserDataFetchers, - UserManager userManager) { - this.clientFactory = clientFactory; + CheServerKubernetesClientFactory cheServerKubernetesClientFactory, + Set gitUserDataFetchers) { + this.cheServerKubernetesClientFactory = cheServerKubernetesClientFactory; this.gitUserDataFetchers = gitUserDataFetchers; - this.userManager = userManager; } @Override public void configure(NamespaceResolutionContext namespaceResolutionContext, String namespaceName) throws InfrastructureException { - var client = clientFactory.create(); + var client = cheServerKubernetesClientFactory.create(); GitUserData gitUserData = null; for (GitUserDataFetcher fetcher : gitUserDataFetchers) { try { diff --git a/infrastructures/kubernetes/src/main/java/org/eclipse/che/workspace/infrastructure/kubernetes/namespace/configurator/PreferencesConfigMapConfigurator.java b/infrastructures/kubernetes/src/main/java/org/eclipse/che/workspace/infrastructure/kubernetes/namespace/configurator/PreferencesConfigMapConfigurator.java index bc4b08eeb6..4d957b8dc4 100644 --- a/infrastructures/kubernetes/src/main/java/org/eclipse/che/workspace/infrastructure/kubernetes/namespace/configurator/PreferencesConfigMapConfigurator.java +++ b/infrastructures/kubernetes/src/main/java/org/eclipse/che/workspace/infrastructure/kubernetes/namespace/configurator/PreferencesConfigMapConfigurator.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012-2021 Red Hat, Inc. + * Copyright (c) 2012-2023 Red Hat, Inc. * This program and the accompanying materials are made * available under the terms of the Eclipse Public License 2.0 * which is available at https://www.eclipse.org/legal/epl-2.0/ @@ -18,7 +18,7 @@ import io.fabric8.kubernetes.api.model.ConfigMapBuilder; import javax.inject.Inject; import org.eclipse.che.api.workspace.server.spi.InfrastructureException; import org.eclipse.che.api.workspace.server.spi.NamespaceResolutionContext; -import org.eclipse.che.workspace.infrastructure.kubernetes.KubernetesClientFactory; +import org.eclipse.che.workspace.infrastructure.kubernetes.CheServerKubernetesClientFactory; /** * This {@link NamespaceConfigurator} ensures that ConfigMap {@link @@ -27,17 +27,18 @@ import org.eclipse.che.workspace.infrastructure.kubernetes.KubernetesClientFacto */ public class PreferencesConfigMapConfigurator implements NamespaceConfigurator { - private final KubernetesClientFactory clientFactory; + private final CheServerKubernetesClientFactory cheServerKubernetesClientFactory; @Inject - public PreferencesConfigMapConfigurator(KubernetesClientFactory clientFactory) { - this.clientFactory = clientFactory; + public PreferencesConfigMapConfigurator( + CheServerKubernetesClientFactory cheServerKubernetesClientFactory) { + this.cheServerKubernetesClientFactory = cheServerKubernetesClientFactory; } @Override public void configure(NamespaceResolutionContext namespaceResolutionContext, String namespaceName) throws InfrastructureException { - var client = clientFactory.create(); + var client = cheServerKubernetesClientFactory.create(); if (client.configMaps().inNamespace(namespaceName).withName(PREFERENCES_CONFIGMAP_NAME).get() == null) { ConfigMap configMap = diff --git a/infrastructures/kubernetes/src/main/java/org/eclipse/che/workspace/infrastructure/kubernetes/namespace/configurator/SshKeysConfigurator.java b/infrastructures/kubernetes/src/main/java/org/eclipse/che/workspace/infrastructure/kubernetes/namespace/configurator/SshKeysConfigurator.java index 2311445212..6160ac67b9 100644 --- a/infrastructures/kubernetes/src/main/java/org/eclipse/che/workspace/infrastructure/kubernetes/namespace/configurator/SshKeysConfigurator.java +++ b/infrastructures/kubernetes/src/main/java/org/eclipse/che/workspace/infrastructure/kubernetes/namespace/configurator/SshKeysConfigurator.java @@ -38,7 +38,7 @@ import org.eclipse.che.api.ssh.server.model.impl.SshPairImpl; import org.eclipse.che.api.ssh.shared.model.SshPair; import org.eclipse.che.api.workspace.server.spi.InfrastructureException; import org.eclipse.che.api.workspace.server.spi.NamespaceResolutionContext; -import org.eclipse.che.workspace.infrastructure.kubernetes.KubernetesClientFactory; +import org.eclipse.che.workspace.infrastructure.kubernetes.CheServerKubernetesClientFactory; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -55,7 +55,7 @@ public class SshKeysConfigurator implements NamespaceConfigurator { private final SshManager sshManager; - private final KubernetesClientFactory clientFactory; + private final CheServerKubernetesClientFactory cheServerKubernetesClientFactory; private static final Logger LOG = LoggerFactory.getLogger(SshKeysConfigurator.class); @@ -63,16 +63,17 @@ public class SshKeysConfigurator implements NamespaceConfigurator { Pattern.compile("^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$"); @Inject - public SshKeysConfigurator(SshManager sshManager, KubernetesClientFactory clientFactory) { + public SshKeysConfigurator( + SshManager sshManager, CheServerKubernetesClientFactory cheServerKubernetesClientFactory) { this.sshManager = sshManager; - this.clientFactory = clientFactory; + this.cheServerKubernetesClientFactory = cheServerKubernetesClientFactory; } @Override public void configure(NamespaceResolutionContext namespaceResolutionContext, String namespaceName) throws InfrastructureException { - var client = clientFactory.create(); + var client = cheServerKubernetesClientFactory.create(); List vcsSshPairs = getVcsSshPairs(namespaceResolutionContext); List invalidSshKeyNames = diff --git a/infrastructures/kubernetes/src/main/java/org/eclipse/che/workspace/infrastructure/kubernetes/namespace/configurator/UserPermissionConfigurator.java b/infrastructures/kubernetes/src/main/java/org/eclipse/che/workspace/infrastructure/kubernetes/namespace/configurator/UserPermissionConfigurator.java index 2889a3a696..bbb95baa55 100644 --- a/infrastructures/kubernetes/src/main/java/org/eclipse/che/workspace/infrastructure/kubernetes/namespace/configurator/UserPermissionConfigurator.java +++ b/infrastructures/kubernetes/src/main/java/org/eclipse/che/workspace/infrastructure/kubernetes/namespace/configurator/UserPermissionConfigurator.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012-2021 Red Hat, Inc. + * Copyright (c) 2012-2023 Red Hat, Inc. * This program and the accompanying materials are made * available under the terms of the Eclipse Public License 2.0 * which is available at https://www.eclipse.org/legal/epl-2.0/ @@ -26,7 +26,6 @@ import org.eclipse.che.api.workspace.server.spi.InfrastructureException; import org.eclipse.che.api.workspace.server.spi.NamespaceResolutionContext; import org.eclipse.che.commons.annotation.Nullable; import org.eclipse.che.workspace.infrastructure.kubernetes.CheServerKubernetesClientFactory; -import org.eclipse.che.workspace.infrastructure.kubernetes.KubernetesClientFactory; /** * This {@link NamespaceConfigurator} ensures that User has assigned configured ClusterRoles from @@ -37,13 +36,13 @@ import org.eclipse.che.workspace.infrastructure.kubernetes.KubernetesClientFacto public class UserPermissionConfigurator implements NamespaceConfigurator { private final Set userClusterRoles; - private final KubernetesClientFactory clientFactory; + private final CheServerKubernetesClientFactory cheServerKubernetesClientFactory; @Inject public UserPermissionConfigurator( @Nullable @Named("che.infra.kubernetes.user_cluster_roles") String userClusterRoles, - CheServerKubernetesClientFactory cheClientFactory) { - this.clientFactory = cheClientFactory; + CheServerKubernetesClientFactory cheServerKubernetesClientFactory) { + this.cheServerKubernetesClientFactory = cheServerKubernetesClientFactory; if (!isNullOrEmpty(userClusterRoles)) { this.userClusterRoles = Sets.newHashSet( @@ -58,7 +57,7 @@ public class UserPermissionConfigurator implements NamespaceConfigurator { throws InfrastructureException { if (!userClusterRoles.isEmpty()) { bindRoles( - clientFactory.create(), + cheServerKubernetesClientFactory.create(), namespaceName, namespaceResolutionContext.getUserName(), userClusterRoles); diff --git a/infrastructures/kubernetes/src/main/java/org/eclipse/che/workspace/infrastructure/kubernetes/namespace/configurator/UserPreferencesConfigurator.java b/infrastructures/kubernetes/src/main/java/org/eclipse/che/workspace/infrastructure/kubernetes/namespace/configurator/UserPreferencesConfigurator.java index 98e0c933e9..6df6c0032a 100644 --- a/infrastructures/kubernetes/src/main/java/org/eclipse/che/workspace/infrastructure/kubernetes/namespace/configurator/UserPreferencesConfigurator.java +++ b/infrastructures/kubernetes/src/main/java/org/eclipse/che/workspace/infrastructure/kubernetes/namespace/configurator/UserPreferencesConfigurator.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012-2022 Red Hat, Inc. + * Copyright (c) 2012-2023 Red Hat, Inc. * This program and the accompanying materials are made * available under the terms of the Eclipse Public License 2.0 * which is available at https://www.eclipse.org/legal/epl-2.0/ @@ -15,10 +15,7 @@ import com.google.common.annotations.VisibleForTesting; import io.fabric8.kubernetes.api.model.Secret; import javax.inject.Inject; import javax.inject.Singleton; -import org.eclipse.che.api.user.server.PreferenceManager; -import org.eclipse.che.api.user.server.UserManager; import org.eclipse.che.api.workspace.server.spi.NamespaceResolutionContext; -import org.eclipse.che.workspace.infrastructure.kubernetes.KubernetesClientFactory; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -36,19 +33,8 @@ public class UserPreferencesConfigurator implements NamespaceConfigurator { private static final String USER_PREFERENCES_SECRET_MOUNT_PATH = "/config/user/preferences"; private static final int PREFERENCE_NAME_MAX_LENGTH = 253; - private final KubernetesClientFactory clientFactory; - private final UserManager userManager; - private final PreferenceManager preferenceManager; - @Inject - public UserPreferencesConfigurator( - KubernetesClientFactory clientFactory, - UserManager userManager, - PreferenceManager preferenceManager) { - this.clientFactory = clientFactory; - this.userManager = userManager; - this.preferenceManager = preferenceManager; - } + public UserPreferencesConfigurator() {} @Override public void configure( diff --git a/infrastructures/kubernetes/src/main/java/org/eclipse/che/workspace/infrastructure/kubernetes/namespace/configurator/UserProfileConfigurator.java b/infrastructures/kubernetes/src/main/java/org/eclipse/che/workspace/infrastructure/kubernetes/namespace/configurator/UserProfileConfigurator.java index 7bfdb64a0f..800f20de4d 100644 --- a/infrastructures/kubernetes/src/main/java/org/eclipse/che/workspace/infrastructure/kubernetes/namespace/configurator/UserProfileConfigurator.java +++ b/infrastructures/kubernetes/src/main/java/org/eclipse/che/workspace/infrastructure/kubernetes/namespace/configurator/UserProfileConfigurator.java @@ -24,10 +24,9 @@ import java.util.HashMap; import java.util.Map; import javax.inject.Inject; import javax.inject.Singleton; -import org.eclipse.che.api.user.server.UserManager; import org.eclipse.che.api.workspace.server.spi.InfrastructureException; import org.eclipse.che.api.workspace.server.spi.NamespaceResolutionContext; -import org.eclipse.che.workspace.infrastructure.kubernetes.KubernetesClientFactory; +import org.eclipse.che.workspace.infrastructure.kubernetes.CheServerKubernetesClientFactory; /** * Creates {@link Secret} with user profile information such as his id, name and email. This serves @@ -40,13 +39,12 @@ public class UserProfileConfigurator implements NamespaceConfigurator { private static final String USER_PROFILE_SECRET_NAME = "user-profile"; private static final String USER_PROFILE_SECRET_MOUNT_PATH = "/config/user/profile"; - private final KubernetesClientFactory clientFactory; - private final UserManager userManager; + private final CheServerKubernetesClientFactory cheServerKubernetesClientFactory; @Inject - public UserProfileConfigurator(KubernetesClientFactory clientFactory, UserManager userManager) { - this.clientFactory = clientFactory; - this.userManager = userManager; + public UserProfileConfigurator( + CheServerKubernetesClientFactory cheServerKubernetesClientFactory) { + this.cheServerKubernetesClientFactory = cheServerKubernetesClientFactory; } @Override @@ -54,7 +52,7 @@ public class UserProfileConfigurator implements NamespaceConfigurator { throws InfrastructureException { Secret userProfileSecret = prepareProfileSecret(namespaceResolutionContext); try { - clientFactory + cheServerKubernetesClientFactory .create() .secrets() .inNamespace(namespaceName) diff --git a/infrastructures/kubernetes/src/main/java/org/eclipse/che/workspace/infrastructure/kubernetes/namespace/configurator/WorkspaceServiceAccountConfigurator.java b/infrastructures/kubernetes/src/main/java/org/eclipse/che/workspace/infrastructure/kubernetes/namespace/configurator/WorkspaceServiceAccountConfigurator.java index 1c9e7f2ccf..1941bcda58 100644 --- a/infrastructures/kubernetes/src/main/java/org/eclipse/che/workspace/infrastructure/kubernetes/namespace/configurator/WorkspaceServiceAccountConfigurator.java +++ b/infrastructures/kubernetes/src/main/java/org/eclipse/che/workspace/infrastructure/kubernetes/namespace/configurator/WorkspaceServiceAccountConfigurator.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012-2021 Red Hat, Inc. + * Copyright (c) 2012-2023 Red Hat, Inc. * This program and the accompanying materials are made * available under the terms of the Eclipse Public License 2.0 * which is available at https://www.eclipse.org/legal/epl-2.0/ @@ -24,7 +24,7 @@ import javax.inject.Singleton; import org.eclipse.che.api.workspace.server.spi.InfrastructureException; import org.eclipse.che.api.workspace.server.spi.NamespaceResolutionContext; import org.eclipse.che.commons.annotation.Nullable; -import org.eclipse.che.workspace.infrastructure.kubernetes.KubernetesClientFactory; +import org.eclipse.che.workspace.infrastructure.kubernetes.CheServerKubernetesClientFactory; import org.eclipse.che.workspace.infrastructure.kubernetes.namespace.KubernetesWorkspaceServiceAccount; /** @@ -34,7 +34,7 @@ import org.eclipse.che.workspace.infrastructure.kubernetes.namespace.KubernetesW @Singleton public class WorkspaceServiceAccountConfigurator implements NamespaceConfigurator { - private final KubernetesClientFactory clientFactory; + private final CheServerKubernetesClientFactory cheServerKubernetesClientFactory; private final String serviceAccountName; private final Set clusterRoleNames; @@ -43,8 +43,8 @@ public class WorkspaceServiceAccountConfigurator implements NamespaceConfigurato public WorkspaceServiceAccountConfigurator( @Nullable @Named("che.infra.kubernetes.service_account_name") String serviceAccountName, @Nullable @Named("che.infra.kubernetes.workspace_sa_cluster_roles") String clusterRoleNames, - KubernetesClientFactory clientFactory) { - this.clientFactory = clientFactory; + CheServerKubernetesClientFactory cheServerKubernetesClientFactory) { + this.cheServerKubernetesClientFactory = cheServerKubernetesClientFactory; this.serviceAccountName = serviceAccountName; if (!isNullOrEmpty(clusterRoleNames)) { this.clusterRoleNames = @@ -69,6 +69,10 @@ public class WorkspaceServiceAccountConfigurator implements NamespaceConfigurato public KubernetesWorkspaceServiceAccount doCreateServiceAccount( String workspaceId, String namespaceName) { return new KubernetesWorkspaceServiceAccount( - workspaceId, namespaceName, serviceAccountName, clusterRoleNames, clientFactory); + workspaceId, + namespaceName, + serviceAccountName, + clusterRoleNames, + cheServerKubernetesClientFactory); } } diff --git a/infrastructures/kubernetes/src/test/java/org/eclipse/che/workspace/infrastructure/kubernetes/KubernetesInfrastructureTest.java b/infrastructures/kubernetes/src/test/java/org/eclipse/che/workspace/infrastructure/kubernetes/KubernetesInfrastructureTest.java index 7d08b90459..9b028844c2 100644 --- a/infrastructures/kubernetes/src/test/java/org/eclipse/che/workspace/infrastructure/kubernetes/KubernetesInfrastructureTest.java +++ b/infrastructures/kubernetes/src/test/java/org/eclipse/che/workspace/infrastructure/kubernetes/KubernetesInfrastructureTest.java @@ -12,14 +12,11 @@ package org.eclipse.che.workspace.infrastructure.kubernetes; import static org.mockito.Mockito.mock; -import static org.mockito.Mockito.when; -import io.fabric8.kubernetes.client.Config; import java.util.Collections; import org.eclipse.che.api.core.notification.EventService; import org.eclipse.che.workspace.infrastructure.kubernetes.cache.KubernetesRuntimeStateCache; import org.eclipse.che.workspace.infrastructure.kubernetes.namespace.KubernetesNamespaceFactory; -import org.mockito.Mock; import org.mockito.testng.MockitoTestNGListener; import org.testng.annotations.BeforeMethod; import org.testng.annotations.Listeners; @@ -27,7 +24,6 @@ import org.testng.annotations.Listeners; @Listeners(MockitoTestNGListener.class) public class KubernetesInfrastructureTest { - @Mock private KubernetesClientFactory factory; private KubernetesInfrastructure infra; @BeforeMethod @@ -38,9 +34,6 @@ public class KubernetesInfrastructureTest { mock(KubernetesRuntimeContextFactory.class), Collections.emptySet(), mock(KubernetesRuntimeStateCache.class), - mock(KubernetesNamespaceFactory.class), - factory); - - when(factory.getDefaultConfig()).thenReturn(mock(Config.class)); + mock(KubernetesNamespaceFactory.class)); } } diff --git a/infrastructures/kubernetes/src/test/java/org/eclipse/che/workspace/infrastructure/kubernetes/namespace/KubernetesNamespaceFactoryTest.java b/infrastructures/kubernetes/src/test/java/org/eclipse/che/workspace/infrastructure/kubernetes/namespace/KubernetesNamespaceFactoryTest.java index d5b1dea3ad..b0e6bd1d60 100644 --- a/infrastructures/kubernetes/src/test/java/org/eclipse/che/workspace/infrastructure/kubernetes/namespace/KubernetesNamespaceFactoryTest.java +++ b/infrastructures/kubernetes/src/test/java/org/eclipse/che/workspace/infrastructure/kubernetes/namespace/KubernetesNamespaceFactoryTest.java @@ -75,8 +75,6 @@ import java.util.stream.Stream; import org.eclipse.che.api.core.ValidationException; import org.eclipse.che.api.core.model.workspace.runtime.RuntimeIdentity; import org.eclipse.che.api.user.server.PreferenceManager; -import org.eclipse.che.api.user.server.UserManager; -import org.eclipse.che.api.user.server.model.impl.UserImpl; import org.eclipse.che.api.workspace.server.model.impl.RuntimeIdentityImpl; import org.eclipse.che.api.workspace.server.model.impl.WorkspaceImpl; import org.eclipse.che.api.workspace.server.model.impl.WorkspaceImpl.WorkspaceImplBuilder; @@ -87,7 +85,6 @@ import org.eclipse.che.commons.env.EnvironmentContext; import org.eclipse.che.commons.subject.SubjectImpl; import org.eclipse.che.inject.ConfigurationException; import org.eclipse.che.workspace.infrastructure.kubernetes.CheServerKubernetesClientFactory; -import org.eclipse.che.workspace.infrastructure.kubernetes.KubernetesClientFactory; import org.eclipse.che.workspace.infrastructure.kubernetes.api.server.impls.KubernetesNamespaceMetaImpl; import org.eclipse.che.workspace.infrastructure.kubernetes.api.shared.KubernetesNamespaceMeta; import org.eclipse.che.workspace.infrastructure.kubernetes.namespace.configurator.CredentialsSecretConfigurator; @@ -126,10 +123,8 @@ public class KubernetesNamespaceFactoryTest { private static final String NAMESPACE_ANNOTATIONS = NAMESPACE_ANNOTATION_NAME + "="; @Mock private KubernetesSharedPool pool; - @Mock private KubernetesClientFactory clientFactory; - @Mock private CheServerKubernetesClientFactory cheClientFactory; + @Mock private CheServerKubernetesClientFactory cheServerKubernetesClientFactory; private KubernetesClient k8sClient; - @Mock private UserManager userManager; @Mock private PreferenceManager preferenceManager; @Mock Appender mockedAppender; @@ -150,8 +145,7 @@ public class KubernetesNamespaceFactoryTest { serverMock = new KubernetesServer(true, true); serverMock.before(); k8sClient = spy(serverMock.getClient()); - lenient().when(clientFactory.create()).thenReturn(k8sClient); - lenient().when(cheClientFactory.create()).thenReturn(k8sClient); + lenient().when(cheServerKubernetesClientFactory.create()).thenReturn(k8sClient); lenient().when(k8sClient.namespaces()).thenReturn(namespaceOperation); lenient().when(namespaceOperation.withName(any())).thenReturn(namespaceResource); @@ -161,9 +155,6 @@ public class KubernetesNamespaceFactoryTest { lenient().when(namespaceListResource.list()).thenReturn(namespaceList); lenient().when(namespaceList.getItems()).thenReturn(Collections.emptyList()); - lenient() - .when(userManager.getById(USER_ID)) - .thenReturn(new UserImpl(USER_ID, "test@mail.com", USER_NAME)); EnvironmentContext.getCurrent().setSubject(new SubjectImpl("jondoe", "i123", null, false)); } @@ -185,9 +176,7 @@ public class KubernetesNamespaceFactoryTest { NAMESPACE_LABELS, NAMESPACE_ANNOTATIONS, emptySet(), - clientFactory, - cheClientFactory, - userManager, + cheServerKubernetesClientFactory, preferenceManager, pool); @@ -212,9 +201,7 @@ public class KubernetesNamespaceFactoryTest { NAMESPACE_LABELS, NAMESPACE_ANNOTATIONS, emptySet(), - clientFactory, - cheClientFactory, - userManager, + cheServerKubernetesClientFactory, preferenceManager, pool); @@ -232,9 +219,7 @@ public class KubernetesNamespaceFactoryTest { NAMESPACE_LABELS, NAMESPACE_ANNOTATIONS, emptySet(), - clientFactory, - cheClientFactory, - userManager, + cheServerKubernetesClientFactory, preferenceManager, pool); @@ -257,9 +242,7 @@ public class KubernetesNamespaceFactoryTest { NAMESPACE_LABELS, NAMESPACE_ANNOTATIONS, emptySet(), - clientFactory, - cheClientFactory, - userManager, + cheServerKubernetesClientFactory, preferenceManager, pool); @@ -279,9 +262,7 @@ public class KubernetesNamespaceFactoryTest { NAMESPACE_LABELS, NAMESPACE_ANNOTATIONS, emptySet(), - clientFactory, - cheClientFactory, - userManager, + cheServerKubernetesClientFactory, preferenceManager, pool); } @@ -329,9 +310,7 @@ public class KubernetesNamespaceFactoryTest { NAMESPACE_LABELS, NAMESPACE_ANNOTATIONS, emptySet(), - clientFactory, - cheClientFactory, - userManager, + cheServerKubernetesClientFactory, preferenceManager, pool); EnvironmentContext.getCurrent().setSubject(new SubjectImpl("jondoe", "123", null, false)); @@ -372,9 +351,7 @@ public class KubernetesNamespaceFactoryTest { NAMESPACE_LABELS, NAMESPACE_ANNOTATIONS, emptySet(), - clientFactory, - cheClientFactory, - userManager, + cheServerKubernetesClientFactory, preferenceManager, pool); EnvironmentContext.getCurrent().setSubject(new SubjectImpl("jondoe", "123", null, false)); @@ -402,9 +379,7 @@ public class KubernetesNamespaceFactoryTest { NAMESPACE_LABELS, NAMESPACE_ANNOTATIONS, emptySet(), - clientFactory, - cheClientFactory, - userManager, + cheServerKubernetesClientFactory, preferenceManager, pool); @@ -435,9 +410,7 @@ public class KubernetesNamespaceFactoryTest { NAMESPACE_LABELS, NAMESPACE_ANNOTATIONS, emptySet(), - clientFactory, - cheClientFactory, - userManager, + cheServerKubernetesClientFactory, preferenceManager, pool); @@ -463,9 +436,7 @@ public class KubernetesNamespaceFactoryTest { NAMESPACE_LABELS, NAMESPACE_ANNOTATIONS, emptySet(), - clientFactory, - cheClientFactory, - userManager, + cheServerKubernetesClientFactory, preferenceManager, pool); @@ -492,10 +463,8 @@ public class KubernetesNamespaceFactoryTest { true, NAMESPACE_LABELS, NAMESPACE_ANNOTATIONS, - Set.of(new CredentialsSecretConfigurator(clientFactory)), - clientFactory, - cheClientFactory, - userManager, + Set.of(new CredentialsSecretConfigurator(cheServerKubernetesClientFactory)), + cheServerKubernetesClientFactory, preferenceManager, pool)); KubernetesNamespace toReturnNamespace = mock(KubernetesNamespace.class); @@ -531,10 +500,8 @@ public class KubernetesNamespaceFactoryTest { true, NAMESPACE_LABELS, NAMESPACE_ANNOTATIONS, - Set.of(new PreferencesConfigMapConfigurator(clientFactory)), - clientFactory, - cheClientFactory, - userManager, + Set.of(new PreferencesConfigMapConfigurator(cheServerKubernetesClientFactory)), + cheServerKubernetesClientFactory, preferenceManager, pool)); KubernetesNamespace toReturnNamespace = mock(KubernetesNamespace.class); @@ -575,9 +542,7 @@ public class KubernetesNamespaceFactoryTest { NAMESPACE_LABELS, NAMESPACE_ANNOTATIONS, namespaceConfigurators, - clientFactory, - cheClientFactory, - userManager, + cheServerKubernetesClientFactory, preferenceManager, pool)); EnvironmentContext.getCurrent().setSubject(new SubjectImpl("jondoe", "123", null, false)); @@ -612,9 +577,7 @@ public class KubernetesNamespaceFactoryTest { NAMESPACE_LABELS, NAMESPACE_ANNOTATIONS, emptySet(), - clientFactory, - cheClientFactory, - userManager, + cheServerKubernetesClientFactory, preferenceManager, pool)); KubernetesNamespace toReturnNamespace = mock(KubernetesNamespace.class); @@ -646,9 +609,7 @@ public class KubernetesNamespaceFactoryTest { NAMESPACE_LABELS, NAMESPACE_ANNOTATIONS, emptySet(), - clientFactory, - cheClientFactory, - userManager, + cheServerKubernetesClientFactory, preferenceManager, pool)); KubernetesNamespace toReturnNamespace = mock(KubernetesNamespace.class); @@ -681,9 +642,7 @@ public class KubernetesNamespaceFactoryTest { NAMESPACE_LABELS, NAMESPACE_ANNOTATIONS, emptySet(), - clientFactory, - cheClientFactory, - userManager, + cheServerKubernetesClientFactory, preferenceManager, pool); throwOnTryToGetNamespaceByName( @@ -706,9 +665,7 @@ public class KubernetesNamespaceFactoryTest { NAMESPACE_LABELS, NAMESPACE_ANNOTATIONS, emptySet(), - clientFactory, - cheClientFactory, - userManager, + cheServerKubernetesClientFactory, preferenceManager, pool); throwOnTryToGetNamespacesList(new KubernetesClientException("connection refused")); @@ -736,9 +693,7 @@ public class KubernetesNamespaceFactoryTest { NAMESPACE_LABELS, NAMESPACE_ANNOTATIONS, emptySet(), - clientFactory, - cheClientFactory, - userManager, + cheServerKubernetesClientFactory, preferenceManager, pool)); KubernetesNamespace toReturnNamespace = mock(KubernetesNamespace.class); @@ -767,9 +722,7 @@ public class KubernetesNamespaceFactoryTest { NAMESPACE_LABELS, NAMESPACE_ANNOTATIONS, emptySet(), - clientFactory, - cheClientFactory, - userManager, + cheServerKubernetesClientFactory, preferenceManager, pool)); KubernetesNamespace toReturnNamespace = mock(KubernetesNamespace.class); @@ -791,7 +744,9 @@ public class KubernetesNamespaceFactoryTest { throws Exception { // given var serviceAccountCfg = - spy(new WorkspaceServiceAccountConfigurator("serviceAccount", "", clientFactory)); + spy( + new WorkspaceServiceAccountConfigurator( + "serviceAccount", "", cheServerKubernetesClientFactory)); namespaceFactory = spy( new KubernetesNamespaceFactory( @@ -802,9 +757,7 @@ public class KubernetesNamespaceFactoryTest { NAMESPACE_LABELS, NAMESPACE_ANNOTATIONS, Set.of(serviceAccountCfg), - clientFactory, - cheClientFactory, - userManager, + cheServerKubernetesClientFactory, preferenceManager, pool)); KubernetesNamespace toReturnNamespace = mock(KubernetesNamespace.class); @@ -830,7 +783,8 @@ public class KubernetesNamespaceFactoryTest { public void shouldBindToAllConfiguredClusterRoles() throws Exception { // given var serviceAccountConfigurator = - new WorkspaceServiceAccountConfigurator("serviceAccount", "cr2, cr3", clientFactory); + new WorkspaceServiceAccountConfigurator( + "serviceAccount", "cr2, cr3", cheServerKubernetesClientFactory); namespaceFactory = spy( new KubernetesNamespaceFactory( @@ -841,9 +795,7 @@ public class KubernetesNamespaceFactoryTest { NAMESPACE_LABELS, NAMESPACE_ANNOTATIONS, Set.of(serviceAccountConfigurator), - clientFactory, - cheClientFactory, - userManager, + cheServerKubernetesClientFactory, preferenceManager, pool)); KubernetesNamespace toReturnNamespace = mock(KubernetesNamespace.class); @@ -851,7 +803,7 @@ public class KubernetesNamespaceFactoryTest { when(toReturnNamespace.getName()).thenReturn("workspace123"); doReturn(toReturnNamespace).when(namespaceFactory).doCreateNamespaceAccess(any(), any()); when(k8sClient.supportsApiPath(eq("/apis/metrics.k8s.io"))).thenReturn(true); - when(clientFactory.create(any())).thenReturn(k8sClient); + when(cheServerKubernetesClientFactory.create(any())).thenReturn(k8sClient); // pre-create the cluster roles Stream.of("cr1", "cr2", "cr3") @@ -906,7 +858,8 @@ public class KubernetesNamespaceFactoryTest { public void shouldCreateAndBindCredentialsSecretRole() throws Exception { // given var serviceAccountConfigurator = - new WorkspaceServiceAccountConfigurator("serviceAccount", "cr2, cr3", clientFactory); + new WorkspaceServiceAccountConfigurator( + "serviceAccount", "cr2, cr3", cheServerKubernetesClientFactory); namespaceFactory = spy( new KubernetesNamespaceFactory( @@ -917,16 +870,14 @@ public class KubernetesNamespaceFactoryTest { NAMESPACE_LABELS, NAMESPACE_ANNOTATIONS, Set.of(serviceAccountConfigurator), - clientFactory, - cheClientFactory, - userManager, + cheServerKubernetesClientFactory, preferenceManager, pool)); KubernetesNamespace toReturnNamespace = mock(KubernetesNamespace.class); prepareNamespace(toReturnNamespace); when(toReturnNamespace.getName()).thenReturn("workspace123"); doReturn(toReturnNamespace).when(namespaceFactory).doCreateNamespaceAccess(any(), any()); - when(clientFactory.create(any())).thenReturn(k8sClient); + when(cheServerKubernetesClientFactory.create(any())).thenReturn(k8sClient); // when RuntimeIdentity identity = @@ -962,10 +913,9 @@ public class KubernetesNamespaceFactoryTest { NAMESPACE_LABELS, NAMESPACE_ANNOTATIONS, Set.of( - new WorkspaceServiceAccountConfigurator("serviceAccount", "", clientFactory)), - clientFactory, - cheClientFactory, - userManager, + new WorkspaceServiceAccountConfigurator( + "serviceAccount", "", cheServerKubernetesClientFactory)), + cheServerKubernetesClientFactory, preferenceManager, pool)); KubernetesNamespace toReturnNamespace = mock(KubernetesNamespace.class); @@ -973,7 +923,7 @@ public class KubernetesNamespaceFactoryTest { when(toReturnNamespace.getName()).thenReturn("workspace123"); doReturn(toReturnNamespace).when(namespaceFactory).doCreateNamespaceAccess(any(), any()); when(k8sClient.supportsApiPath(eq("/apis/metrics.k8s.io"))).thenReturn(true); - when(clientFactory.create(any())).thenReturn(k8sClient); + when(cheServerKubernetesClientFactory.create(any())).thenReturn(k8sClient); // when RuntimeIdentity identity = @@ -1029,9 +979,7 @@ public class KubernetesNamespaceFactoryTest { NAMESPACE_LABELS, NAMESPACE_ANNOTATIONS, emptySet(), - clientFactory, - cheClientFactory, - userManager, + cheServerKubernetesClientFactory, preferenceManager, pool); @@ -1054,9 +1002,7 @@ public class KubernetesNamespaceFactoryTest { NAMESPACE_LABELS, NAMESPACE_ANNOTATIONS, emptySet(), - clientFactory, - cheClientFactory, - userManager, + cheServerKubernetesClientFactory, preferenceManager, pool); @@ -1084,9 +1030,7 @@ public class KubernetesNamespaceFactoryTest { NAMESPACE_LABELS, NAMESPACE_ANNOTATIONS, emptySet(), - clientFactory, - cheClientFactory, - userManager, + cheServerKubernetesClientFactory, preferenceManager, pool); @@ -1115,9 +1059,7 @@ public class KubernetesNamespaceFactoryTest { NAMESPACE_LABELS, NAMESPACE_ANNOTATIONS, emptySet(), - clientFactory, - cheClientFactory, - userManager, + cheServerKubernetesClientFactory, preferenceManager, pool); @@ -1146,9 +1088,7 @@ public class KubernetesNamespaceFactoryTest { NAMESPACE_LABELS, NAMESPACE_ANNOTATIONS, emptySet(), - clientFactory, - cheClientFactory, - userManager, + cheServerKubernetesClientFactory, preferenceManager, pool)); doReturn(empty()).when(namespaceFactory).fetchNamespace(anyString()); @@ -1173,9 +1113,7 @@ public class KubernetesNamespaceFactoryTest { NAMESPACE_LABELS, NAMESPACE_ANNOTATIONS, emptySet(), - clientFactory, - cheClientFactory, - userManager, + cheServerKubernetesClientFactory, preferenceManager, pool); @@ -1202,9 +1140,7 @@ public class KubernetesNamespaceFactoryTest { NAMESPACE_LABELS, NAMESPACE_ANNOTATIONS, emptySet(), - clientFactory, - cheClientFactory, - userManager, + cheServerKubernetesClientFactory, preferenceManager, pool); @@ -1252,9 +1188,7 @@ public class KubernetesNamespaceFactoryTest { NAMESPACE_LABELS, NAMESPACE_ANNOTATIONS, emptySet(), - clientFactory, - cheClientFactory, - userManager, + cheServerKubernetesClientFactory, preferenceManager, pool); @@ -1278,9 +1212,7 @@ public class KubernetesNamespaceFactoryTest { NAMESPACE_LABELS, NAMESPACE_ANNOTATIONS, emptySet(), - clientFactory, - cheClientFactory, - userManager, + cheServerKubernetesClientFactory, preferenceManager, pool)); KubernetesNamespace toReturnNamespace = mock(KubernetesNamespace.class); @@ -1317,9 +1249,7 @@ public class KubernetesNamespaceFactoryTest { NAMESPACE_LABELS, NAMESPACE_ANNOTATIONS, emptySet(), - clientFactory, - cheClientFactory, - userManager, + cheServerKubernetesClientFactory, preferenceManager, pool)); KubernetesNamespace toReturnNamespace = mock(KubernetesNamespace.class); @@ -1355,9 +1285,7 @@ public class KubernetesNamespaceFactoryTest { NAMESPACE_LABELS, NAMESPACE_ANNOTATIONS, emptySet(), - clientFactory, - cheClientFactory, - userManager, + cheServerKubernetesClientFactory, preferenceManager, pool)); KubernetesNamespace toReturnNamespace = mock(KubernetesNamespace.class); @@ -1405,9 +1333,7 @@ public class KubernetesNamespaceFactoryTest { "try_placeholder_here=", NAMESPACE_ANNOTATIONS, emptySet(), - clientFactory, - cheClientFactory, - userManager, + cheServerKubernetesClientFactory, preferenceManager, pool); EnvironmentContext.getCurrent().setSubject(new SubjectImpl("jondoe", "123", null, false)); @@ -1430,9 +1356,7 @@ public class KubernetesNamespaceFactoryTest { NAMESPACE_LABELS, "try_placeholder_here=", emptySet(), - clientFactory, - cheClientFactory, - userManager, + cheServerKubernetesClientFactory, preferenceManager, pool)); EnvironmentContext.getCurrent().setSubject(new SubjectImpl("jondoe", "123", null, false)); @@ -1461,9 +1385,7 @@ public class KubernetesNamespaceFactoryTest { NAMESPACE_LABELS, NAMESPACE_ANNOTATIONS, emptySet(), - clientFactory, - cheClientFactory, - userManager, + cheServerKubernetesClientFactory, preferenceManager, pool); assertEquals(expected, namespaceFactory.normalizeNamespaceName(raw)); @@ -1480,9 +1402,7 @@ public class KubernetesNamespaceFactoryTest { NAMESPACE_LABELS, NAMESPACE_ANNOTATIONS, emptySet(), - clientFactory, - cheClientFactory, - userManager, + cheServerKubernetesClientFactory, preferenceManager, pool); diff --git a/infrastructures/kubernetes/src/test/java/org/eclipse/che/workspace/infrastructure/kubernetes/namespace/KubernetesNamespaceTest.java b/infrastructures/kubernetes/src/test/java/org/eclipse/che/workspace/infrastructure/kubernetes/namespace/KubernetesNamespaceTest.java index 283ecb103b..dd4886ae25 100644 --- a/infrastructures/kubernetes/src/test/java/org/eclipse/che/workspace/infrastructure/kubernetes/namespace/KubernetesNamespaceTest.java +++ b/infrastructures/kubernetes/src/test/java/org/eclipse/che/workspace/infrastructure/kubernetes/namespace/KubernetesNamespaceTest.java @@ -45,7 +45,6 @@ import java.util.Map; import java.util.concurrent.Executor; import org.eclipse.che.api.workspace.server.spi.InfrastructureException; import org.eclipse.che.workspace.infrastructure.kubernetes.CheServerKubernetesClientFactory; -import org.eclipse.che.workspace.infrastructure.kubernetes.KubernetesClientFactory; import org.mockito.ArgumentCaptor; import org.mockito.Mock; import org.mockito.stubbing.Answer; @@ -72,7 +71,6 @@ public class KubernetesNamespaceTest { @Mock private KubernetesPersistentVolumeClaims pvcs; @Mock private KubernetesSecrets secrets; @Mock private KubernetesConfigsMaps configMaps; - @Mock private KubernetesClientFactory clientFactory; @Mock private CheServerKubernetesClientFactory cheClientFactory; @Mock private Executor executor; @Mock private KubernetesClient kubernetesClient; @@ -83,7 +81,6 @@ public class KubernetesNamespaceTest { @BeforeMethod public void setUp() throws Exception { - lenient().when(clientFactory.create(anyString())).thenReturn(kubernetesClient); lenient().when(cheClientFactory.create(anyString())).thenReturn(kubernetesClient); lenient().doReturn(namespaceOperation).when(kubernetesClient).namespaces(); @@ -97,7 +94,6 @@ public class KubernetesNamespaceTest { k8sNamespace = new KubernetesNamespace( - clientFactory, cheClientFactory, WORKSPACE_ID, NAMESPACE, @@ -114,7 +110,7 @@ public class KubernetesNamespaceTest { // given prepareNamespace(NAMESPACE); KubernetesNamespace namespace = - new KubernetesNamespace(clientFactory, cheClientFactory, executor, NAMESPACE, WORKSPACE_ID); + new KubernetesNamespace(cheClientFactory, executor, NAMESPACE, WORKSPACE_ID); // when namespace.prepare(true, Map.of(), Map.of()); @@ -135,7 +131,7 @@ public class KubernetesNamespaceTest { doReturn(namespaceResource).when(namespaceOperation).withName(anyString()); KubernetesNamespace namespace = - new KubernetesNamespace(clientFactory, cheClientFactory, executor, NAMESPACE, WORKSPACE_ID); + new KubernetesNamespace(cheClientFactory, executor, NAMESPACE, WORKSPACE_ID); // when namespace.prepare(true, Map.of(), Map.of()); @@ -152,7 +148,7 @@ public class KubernetesNamespaceTest { Resource resource = prepareNamespaceResource(NAMESPACE); doThrow(new KubernetesClientException("error", 403, null)).when(resource).get(); KubernetesNamespace namespace = - new KubernetesNamespace(clientFactory, cheClientFactory, executor, NAMESPACE, WORKSPACE_ID); + new KubernetesNamespace(cheClientFactory, executor, NAMESPACE, WORKSPACE_ID); // when namespace.prepare(false, Map.of(), Map.of()); @@ -201,7 +197,7 @@ public class KubernetesNamespaceTest { doThrow(new KubernetesClientException("error", 403, null)).when(resource).get(); doThrow(KubernetesClientException.class).when(kubernetesClient).serviceAccounts(); - new KubernetesNamespace(clientFactory, cheClientFactory, executor, NAMESPACE, WORKSPACE_ID) + new KubernetesNamespace(cheClientFactory, executor, NAMESPACE, WORKSPACE_ID) .prepare(false, Map.of(), Map.of()); } @@ -212,7 +208,7 @@ public class KubernetesNamespaceTest { doThrow(new KubernetesClientException("error", 403, null)).when(resource).get(); when(serviceAccountResource.get()).thenReturn(null); - new KubernetesNamespace(clientFactory, cheClientFactory, executor, NAMESPACE, WORKSPACE_ID) + new KubernetesNamespace(cheClientFactory, executor, NAMESPACE, WORKSPACE_ID) .prepare(false, Map.of(), Map.of()); } @@ -231,7 +227,7 @@ public class KubernetesNamespaceTest { .when(serviceAccountResource) .watch(any()); - new KubernetesNamespace(clientFactory, cheClientFactory, executor, NAMESPACE, WORKSPACE_ID) + new KubernetesNamespace(cheClientFactory, executor, NAMESPACE, WORKSPACE_ID) .prepare(false, Map.of(), Map.of()); } @@ -257,7 +253,7 @@ public class KubernetesNamespaceTest { .watch(any()); KubernetesNamespace namespace = - new KubernetesNamespace(clientFactory, cheClientFactory, executor, NAMESPACE, WORKSPACE_ID); + new KubernetesNamespace(cheClientFactory, executor, NAMESPACE, WORKSPACE_ID); // when namespace.prepare(true, Map.of(), Map.of()); @@ -270,7 +266,7 @@ public class KubernetesNamespaceTest { public void testDeletesExistingNamespace() throws Exception { // given KubernetesNamespace namespace = - new KubernetesNamespace(clientFactory, cheClientFactory, executor, NAMESPACE, WORKSPACE_ID); + new KubernetesNamespace(cheClientFactory, executor, NAMESPACE, WORKSPACE_ID); Resource resource = prepareNamespaceResource(NAMESPACE); // when @@ -284,7 +280,7 @@ public class KubernetesNamespaceTest { public void testDoesntFailIfDeletedNamespaceDoesntExist() throws Exception { // given KubernetesNamespace namespace = - new KubernetesNamespace(clientFactory, cheClientFactory, executor, NAMESPACE, WORKSPACE_ID); + new KubernetesNamespace(cheClientFactory, executor, NAMESPACE, WORKSPACE_ID); Resource resource = prepareNamespaceResource(NAMESPACE); when(resource.delete()).thenThrow(new KubernetesClientException("err", 404, null)); @@ -300,7 +296,7 @@ public class KubernetesNamespaceTest { public void testDoesntFailIfDeletedNamespaceIsBeingDeleted() throws Exception { // given KubernetesNamespace namespace = - new KubernetesNamespace(clientFactory, cheClientFactory, executor, NAMESPACE, WORKSPACE_ID); + new KubernetesNamespace(cheClientFactory, executor, NAMESPACE, WORKSPACE_ID); Resource resource = prepareNamespaceResource(NAMESPACE); when(resource.delete()).thenThrow(new KubernetesClientException("err", 409, null)); @@ -317,7 +313,7 @@ public class KubernetesNamespaceTest { // given prepareNamespace(NAMESPACE); KubernetesNamespace kubernetesNamespace = - new KubernetesNamespace(clientFactory, cheClientFactory, executor, NAMESPACE, WORKSPACE_ID); + new KubernetesNamespace(cheClientFactory, executor, NAMESPACE, WORKSPACE_ID); KubernetesClient cheKubeClient = mock(KubernetesClient.class); doReturn(cheKubeClient).when(cheClientFactory).create(); @@ -350,7 +346,7 @@ public class KubernetesNamespaceTest { Namespace namespace = prepareNamespace(NAMESPACE); namespace.getMetadata().setLabels(labels); KubernetesNamespace kubernetesNamespace = - new KubernetesNamespace(clientFactory, cheClientFactory, executor, NAMESPACE, WORKSPACE_ID); + new KubernetesNamespace(cheClientFactory, executor, NAMESPACE, WORKSPACE_ID); KubernetesClient cheKubeClient = mock(KubernetesClient.class); lenient().doReturn(cheKubeClient).when(cheClientFactory).create(); @@ -378,7 +374,7 @@ public class KubernetesNamespaceTest { Namespace namespace = prepareNamespace(NAMESPACE); namespace.getMetadata().setLabels(existingLabels); KubernetesNamespace kubernetesNamespace = - new KubernetesNamespace(clientFactory, cheClientFactory, executor, NAMESPACE, WORKSPACE_ID); + new KubernetesNamespace(cheClientFactory, executor, NAMESPACE, WORKSPACE_ID); KubernetesClient cheKubeClient = mock(KubernetesClient.class); lenient().doReturn(cheKubeClient).when(cheClientFactory).create(); @@ -404,7 +400,7 @@ public class KubernetesNamespaceTest { // given prepareNamespace(NAMESPACE); KubernetesNamespace kubernetesNamespace = - new KubernetesNamespace(clientFactory, cheClientFactory, executor, NAMESPACE, WORKSPACE_ID); + new KubernetesNamespace(cheClientFactory, executor, NAMESPACE, WORKSPACE_ID); KubernetesClient cheKubeClient = mock(KubernetesClient.class); doReturn(cheKubeClient).when(cheClientFactory).create(); @@ -442,7 +438,7 @@ public class KubernetesNamespaceTest { Namespace namespace = prepareNamespace(NAMESPACE); namespace.getMetadata().setAnnotations(annotations); KubernetesNamespace kubernetesNamespace = - new KubernetesNamespace(clientFactory, cheClientFactory, executor, NAMESPACE, WORKSPACE_ID); + new KubernetesNamespace(cheClientFactory, executor, NAMESPACE, WORKSPACE_ID); // when kubernetesNamespace.prepare(true, emptyMap(), annotations); @@ -460,7 +456,7 @@ public class KubernetesNamespaceTest { Namespace namespace = prepareNamespace(NAMESPACE); namespace.getMetadata().setAnnotations(existingAnnotations); KubernetesNamespace kubernetesNamespace = - new KubernetesNamespace(clientFactory, cheClientFactory, executor, NAMESPACE, WORKSPACE_ID); + new KubernetesNamespace(cheClientFactory, executor, NAMESPACE, WORKSPACE_ID); // when kubernetesNamespace.prepare(true, emptyMap(), emptyMap()); @@ -481,7 +477,7 @@ public class KubernetesNamespaceTest { prepareNamespace(NAMESPACE); KubernetesNamespace kubernetesNamespace = - new KubernetesNamespace(clientFactory, cheClientFactory, executor, NAMESPACE, WORKSPACE_ID); + new KubernetesNamespace(cheClientFactory, executor, NAMESPACE, WORKSPACE_ID); KubernetesClient cheKubeClient = mock(KubernetesClient.class); lenient().doReturn(cheKubeClient).when(cheClientFactory).create(); @@ -512,7 +508,7 @@ public class KubernetesNamespaceTest { Namespace namespace = prepareNamespace(NAMESPACE); KubernetesNamespace kubernetesNamespace = - new KubernetesNamespace(clientFactory, cheClientFactory, executor, NAMESPACE, WORKSPACE_ID); + new KubernetesNamespace(cheClientFactory, executor, NAMESPACE, WORKSPACE_ID); KubernetesClient cheKubeClient = mock(KubernetesClient.class); lenient().doReturn(cheKubeClient).when(cheClientFactory).create(); diff --git a/infrastructures/kubernetes/src/test/java/org/eclipse/che/workspace/infrastructure/kubernetes/namespace/configurator/CredentialsSecretConfiguratorTest.java b/infrastructures/kubernetes/src/test/java/org/eclipse/che/workspace/infrastructure/kubernetes/namespace/configurator/CredentialsSecretConfiguratorTest.java index bc286fd66e..c31c99789f 100644 --- a/infrastructures/kubernetes/src/test/java/org/eclipse/che/workspace/infrastructure/kubernetes/namespace/configurator/CredentialsSecretConfiguratorTest.java +++ b/infrastructures/kubernetes/src/test/java/org/eclipse/che/workspace/infrastructure/kubernetes/namespace/configurator/CredentialsSecretConfiguratorTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012-2021 Red Hat, Inc. + * Copyright (c) 2012-2023 Red Hat, Inc. * This program and the accompanying materials are made * available under the terms of the Eclipse Public License 2.0 * which is available at https://www.eclipse.org/legal/epl-2.0/ @@ -21,7 +21,7 @@ import io.fabric8.kubernetes.client.server.mock.KubernetesServer; import java.util.Map; import org.eclipse.che.api.workspace.server.spi.InfrastructureException; import org.eclipse.che.api.workspace.server.spi.NamespaceResolutionContext; -import org.eclipse.che.workspace.infrastructure.kubernetes.KubernetesClientFactory; +import org.eclipse.che.workspace.infrastructure.kubernetes.CheServerKubernetesClientFactory; import org.mockito.Mock; import org.mockito.testng.MockitoTestNGListener; import org.testng.Assert; @@ -34,7 +34,7 @@ public class CredentialsSecretConfiguratorTest { private NamespaceConfigurator configurator; - @Mock private KubernetesClientFactory clientFactory; + @Mock private CheServerKubernetesClientFactory cheServerKubernetesClientFactory; private KubernetesServer serverMock; private NamespaceResolutionContext namespaceResolutionContext; @@ -45,12 +45,12 @@ public class CredentialsSecretConfiguratorTest { @BeforeMethod public void setUp() throws InfrastructureException { - configurator = new CredentialsSecretConfigurator(clientFactory); + configurator = new CredentialsSecretConfigurator(cheServerKubernetesClientFactory); serverMock = new KubernetesServer(true, true); serverMock.before(); KubernetesClient client = spy(serverMock.getClient()); - when(clientFactory.create()).thenReturn(client); + when(cheServerKubernetesClientFactory.create()).thenReturn(client); namespaceResolutionContext = new NamespaceResolutionContext(TEST_WORKSPACE_ID, TEST_USER_ID, TEST_USERNAME); diff --git a/infrastructures/kubernetes/src/test/java/org/eclipse/che/workspace/infrastructure/kubernetes/namespace/configurator/GitconfigUserdataConfiguratorTest.java b/infrastructures/kubernetes/src/test/java/org/eclipse/che/workspace/infrastructure/kubernetes/namespace/configurator/GitconfigUserdataConfiguratorTest.java index 966e08c7eb..9f4fb77131 100644 --- a/infrastructures/kubernetes/src/test/java/org/eclipse/che/workspace/infrastructure/kubernetes/namespace/configurator/GitconfigUserdataConfiguratorTest.java +++ b/infrastructures/kubernetes/src/test/java/org/eclipse/che/workspace/infrastructure/kubernetes/namespace/configurator/GitconfigUserdataConfiguratorTest.java @@ -26,10 +26,9 @@ import java.util.Set; import org.eclipse.che.api.factory.server.scm.GitUserData; import org.eclipse.che.api.factory.server.scm.GitUserDataFetcher; import org.eclipse.che.api.factory.server.scm.exception.*; -import org.eclipse.che.api.user.server.UserManager; import org.eclipse.che.api.workspace.server.spi.InfrastructureException; import org.eclipse.che.api.workspace.server.spi.NamespaceResolutionContext; -import org.eclipse.che.workspace.infrastructure.kubernetes.KubernetesClientFactory; +import org.eclipse.che.workspace.infrastructure.kubernetes.CheServerKubernetesClientFactory; import org.mockito.Mock; import org.mockito.testng.MockitoTestNGListener; import org.testng.Assert; @@ -42,9 +41,8 @@ public class GitconfigUserdataConfiguratorTest { private NamespaceConfigurator configurator; - @Mock private KubernetesClientFactory clientFactory; + @Mock private CheServerKubernetesClientFactory cheServerKubernetesClientFactory; @Mock private GitUserDataFetcher gitUserDataFetcher; - @Mock private UserManager userManager; private KubernetesServer serverMock; private NamespaceResolutionContext namespaceResolutionContext; @@ -57,12 +55,13 @@ public class GitconfigUserdataConfiguratorTest { public void setUp() throws InfrastructureException, ScmCommunicationException, ScmUnauthorizedException { configurator = - new GitconfigUserDataConfigurator(clientFactory, Set.of(gitUserDataFetcher), userManager); + new GitconfigUserDataConfigurator( + cheServerKubernetesClientFactory, Set.of(gitUserDataFetcher)); serverMock = new KubernetesServer(true, true); serverMock.before(); KubernetesClient client = spy(serverMock.getClient()); - when(clientFactory.create()).thenReturn(client); + when(cheServerKubernetesClientFactory.create()).thenReturn(client); namespaceResolutionContext = new NamespaceResolutionContext(TEST_WORKSPACE_ID, TEST_USER_ID, TEST_USERNAME); diff --git a/infrastructures/kubernetes/src/test/java/org/eclipse/che/workspace/infrastructure/kubernetes/namespace/configurator/PreferencesConfigMapConfiguratorTest.java b/infrastructures/kubernetes/src/test/java/org/eclipse/che/workspace/infrastructure/kubernetes/namespace/configurator/PreferencesConfigMapConfiguratorTest.java index a1aa2cc40d..0e72cabb92 100644 --- a/infrastructures/kubernetes/src/test/java/org/eclipse/che/workspace/infrastructure/kubernetes/namespace/configurator/PreferencesConfigMapConfiguratorTest.java +++ b/infrastructures/kubernetes/src/test/java/org/eclipse/che/workspace/infrastructure/kubernetes/namespace/configurator/PreferencesConfigMapConfiguratorTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012-2021 Red Hat, Inc. + * Copyright (c) 2012-2023 Red Hat, Inc. * This program and the accompanying materials are made * available under the terms of the Eclipse Public License 2.0 * which is available at https://www.eclipse.org/legal/epl-2.0/ @@ -23,7 +23,7 @@ import io.fabric8.kubernetes.client.server.mock.KubernetesServer; import java.util.Map; import org.eclipse.che.api.workspace.server.spi.InfrastructureException; import org.eclipse.che.api.workspace.server.spi.NamespaceResolutionContext; -import org.eclipse.che.workspace.infrastructure.kubernetes.KubernetesClientFactory; +import org.eclipse.che.workspace.infrastructure.kubernetes.CheServerKubernetesClientFactory; import org.mockito.Mock; import org.mockito.testng.MockitoTestNGListener; import org.testng.Assert; @@ -35,7 +35,7 @@ import org.testng.annotations.Test; public class PreferencesConfigMapConfiguratorTest { private NamespaceConfigurator configurator; - @Mock private KubernetesClientFactory clientFactory; + @Mock private CheServerKubernetesClientFactory cheServerKubernetesClientFactory; private KubernetesServer serverMock; private NamespaceResolutionContext namespaceResolutionContext; @@ -46,12 +46,12 @@ public class PreferencesConfigMapConfiguratorTest { @BeforeMethod public void setUp() throws InfrastructureException { - configurator = new PreferencesConfigMapConfigurator(clientFactory); + configurator = new PreferencesConfigMapConfigurator(cheServerKubernetesClientFactory); serverMock = new KubernetesServer(true, true); serverMock.before(); KubernetesClient client = spy(serverMock.getClient()); - when(clientFactory.create()).thenReturn(client); + when(cheServerKubernetesClientFactory.create()).thenReturn(client); namespaceResolutionContext = new NamespaceResolutionContext(TEST_WORKSPACE_ID, TEST_USER_ID, TEST_USERNAME); @@ -74,7 +74,7 @@ public class PreferencesConfigMapConfiguratorTest { .inNamespace(TEST_NAMESPACE_NAME) .withName(PREFERENCES_CONFIGMAP_NAME) .get()); - verify(clientFactory, times(1)).create(); + verify(cheServerKubernetesClientFactory, times(1)).create(); } @Test diff --git a/infrastructures/kubernetes/src/test/java/org/eclipse/che/workspace/infrastructure/kubernetes/namespace/configurator/SshKeysConfiguratorTest.java b/infrastructures/kubernetes/src/test/java/org/eclipse/che/workspace/infrastructure/kubernetes/namespace/configurator/SshKeysConfiguratorTest.java index 29efc57d1a..6b9a7081ac 100644 --- a/infrastructures/kubernetes/src/test/java/org/eclipse/che/workspace/infrastructure/kubernetes/namespace/configurator/SshKeysConfiguratorTest.java +++ b/infrastructures/kubernetes/src/test/java/org/eclipse/che/workspace/infrastructure/kubernetes/namespace/configurator/SshKeysConfiguratorTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012-2021 Red Hat, Inc. + * Copyright (c) 2012-2023 Red Hat, Inc. * This program and the accompanying materials are made * available under the terms of the Eclipse Public License 2.0 * which is available at https://www.eclipse.org/legal/epl-2.0/ @@ -28,7 +28,7 @@ import org.eclipse.che.api.ssh.server.SshManager; import org.eclipse.che.api.ssh.server.model.impl.SshPairImpl; import org.eclipse.che.api.workspace.server.spi.InfrastructureException; import org.eclipse.che.api.workspace.server.spi.NamespaceResolutionContext; -import org.eclipse.che.workspace.infrastructure.kubernetes.KubernetesClientFactory; +import org.eclipse.che.workspace.infrastructure.kubernetes.CheServerKubernetesClientFactory; import org.mockito.InjectMocks; import org.mockito.Mock; import org.mockito.testng.MockitoTestNGListener; @@ -44,7 +44,7 @@ public class SshKeysConfiguratorTest { private static final String USER_NAME = "user-name"; private static final String USER_NAMESPACE = "user-namespace"; - @Mock private KubernetesClientFactory clientFactory; + @Mock private CheServerKubernetesClientFactory cheServerKubernetesClientFactory; @Mock private SshManager sshManager; @InjectMocks private SshKeysConfigurator sshKeysConfigurator; @@ -62,7 +62,7 @@ public class SshKeysConfiguratorTest { kubernetesServer.before(); when(sshManager.getPairs(USER_ID, "vcs")).thenReturn(Collections.singletonList(sshPair)); - when(clientFactory.create()).thenReturn(kubernetesServer.getClient()); + when(cheServerKubernetesClientFactory.create()).thenReturn(kubernetesServer.getClient()); } @AfterMethod diff --git a/infrastructures/kubernetes/src/test/java/org/eclipse/che/workspace/infrastructure/kubernetes/namespace/configurator/UserPreferencesConfiguratorTest.java b/infrastructures/kubernetes/src/test/java/org/eclipse/che/workspace/infrastructure/kubernetes/namespace/configurator/UserPreferencesConfiguratorTest.java index 029466c8c6..28132df14f 100644 --- a/infrastructures/kubernetes/src/test/java/org/eclipse/che/workspace/infrastructure/kubernetes/namespace/configurator/UserPreferencesConfiguratorTest.java +++ b/infrastructures/kubernetes/src/test/java/org/eclipse/che/workspace/infrastructure/kubernetes/namespace/configurator/UserPreferencesConfiguratorTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012-2022 Red Hat, Inc. + * Copyright (c) 2012-2023 Red Hat, Inc. * This program and the accompanying materials are made * available under the terms of the Eclipse Public License 2.0 * which is available at https://www.eclipse.org/legal/epl-2.0/ @@ -21,11 +21,8 @@ import java.util.Map; import org.eclipse.che.api.core.NotFoundException; import org.eclipse.che.api.core.ServerException; import org.eclipse.che.api.user.server.PreferenceManager; -import org.eclipse.che.api.user.server.UserManager; -import org.eclipse.che.api.user.server.model.impl.UserImpl; import org.eclipse.che.api.workspace.server.spi.InfrastructureException; import org.eclipse.che.api.workspace.server.spi.NamespaceResolutionContext; -import org.eclipse.che.workspace.infrastructure.kubernetes.KubernetesClientFactory; import org.eclipse.che.workspace.infrastructure.kubernetes.namespace.KubernetesNamespaceFactory; import org.mockito.InjectMocks; import org.mockito.Mock; @@ -49,8 +46,6 @@ public class UserPreferencesConfiguratorTest { private static final String USER_NAMESPACE = "user-namespace"; @Mock private KubernetesNamespaceFactory namespaceFactory; - @Mock private KubernetesClientFactory clientFactory; - @Mock private UserManager userManager; @Mock private PreferenceManager preferenceManager; @InjectMocks private UserPreferencesConfigurator userPreferencesConfigurator; @@ -67,11 +62,7 @@ public class UserPreferencesConfiguratorTest { Map preferences = new HashMap<>(); preferences.put("preference-name", "preference"); - lenient() - .when(userManager.getById(USER_ID)) - .thenReturn(new UserImpl(USER_ID, USER_EMAIL, USER_NAME)); lenient().when(namespaceFactory.evaluateNamespaceName(any())).thenReturn(USER_NAMESPACE); - lenient().when(clientFactory.create()).thenReturn(kubernetesServer.getClient()); lenient().when(preferenceManager.find(USER_ID)).thenReturn(preferences); } diff --git a/infrastructures/openshift/src/main/java/org/eclipse/che/workspace/infrastructure/openshift/OpenShiftInfrastructure.java b/infrastructures/openshift/src/main/java/org/eclipse/che/workspace/infrastructure/openshift/OpenShiftInfrastructure.java index 866cdef5c3..fc23e851bc 100644 --- a/infrastructures/openshift/src/main/java/org/eclipse/che/workspace/infrastructure/openshift/OpenShiftInfrastructure.java +++ b/infrastructures/openshift/src/main/java/org/eclipse/che/workspace/infrastructure/openshift/OpenShiftInfrastructure.java @@ -43,7 +43,6 @@ public class OpenShiftInfrastructure extends RuntimeInfrastructure { private final OpenShiftRuntimeContextFactory runtimeContextFactory; private final KubernetesRuntimeStateCache runtimeStatusesCache; private final OpenShiftProjectFactory projectFactory; - private final OpenShiftClientFactory openShiftClientFactory; @Inject public OpenShiftInfrastructure( @@ -51,8 +50,7 @@ public class OpenShiftInfrastructure extends RuntimeInfrastructure { OpenShiftRuntimeContextFactory runtimeContextFactory, Set internalEnvProvisioners, KubernetesRuntimeStateCache runtimeStatusesCache, - OpenShiftProjectFactory projectFactory, - OpenShiftClientFactory openShiftClientFactory) { + OpenShiftProjectFactory projectFactory) { super( NAME, ImmutableSet.of( @@ -64,7 +62,6 @@ public class OpenShiftInfrastructure extends RuntimeInfrastructure { this.runtimeContextFactory = runtimeContextFactory; this.runtimeStatusesCache = runtimeStatusesCache; this.projectFactory = projectFactory; - this.openShiftClientFactory = openShiftClientFactory; } @Override diff --git a/infrastructures/openshift/src/main/java/org/eclipse/che/workspace/infrastructure/openshift/project/OpenShiftProject.java b/infrastructures/openshift/src/main/java/org/eclipse/che/workspace/infrastructure/openshift/project/OpenShiftProject.java index 61afae3976..728959a789 100644 --- a/infrastructures/openshift/src/main/java/org/eclipse/che/workspace/infrastructure/openshift/project/OpenShiftProject.java +++ b/infrastructures/openshift/src/main/java/org/eclipse/che/workspace/infrastructure/openshift/project/OpenShiftProject.java @@ -23,7 +23,7 @@ import java.util.Map; import java.util.concurrent.Executor; import org.eclipse.che.api.workspace.server.spi.InfrastructureException; import org.eclipse.che.api.workspace.server.spi.InternalInfrastructureException; -import org.eclipse.che.workspace.infrastructure.kubernetes.KubernetesClientFactory; +import org.eclipse.che.workspace.infrastructure.kubernetes.CheServerKubernetesClientFactory; import org.eclipse.che.workspace.infrastructure.kubernetes.KubernetesInfrastructureException; import org.eclipse.che.workspace.infrastructure.kubernetes.namespace.KubernetesConfigsMaps; import org.eclipse.che.workspace.infrastructure.kubernetes.namespace.KubernetesDeployments; @@ -47,13 +47,13 @@ public class OpenShiftProject extends KubernetesNamespace { private static final Logger LOG = LoggerFactory.getLogger(OpenShiftProject.class); private final OpenShiftRoutes routes; - private final OpenShiftClientFactory clientFactory; + private final OpenShiftClientFactory openShiftClientFactory; private final CheServerOpenshiftClientFactory cheServerOpenshiftClientFactory; @VisibleForTesting OpenShiftProject( - OpenShiftClientFactory clientFactory, - KubernetesClientFactory cheClientFactory, + OpenShiftClientFactory openShiftClientFactory, + CheServerKubernetesClientFactory cheServerKubernetesClientFactory, CheServerOpenshiftClientFactory cheServerOpenshiftClientFactory, String workspaceId, String name, @@ -65,8 +65,7 @@ public class OpenShiftProject extends KubernetesNamespace { KubernetesSecrets secrets, KubernetesConfigsMaps configMaps) { super( - clientFactory, - cheClientFactory, + cheServerKubernetesClientFactory, workspaceId, name, deployments, @@ -75,21 +74,21 @@ public class OpenShiftProject extends KubernetesNamespace { ingresses, secrets, configMaps); - this.clientFactory = clientFactory; this.routes = routes; + this.openShiftClientFactory = openShiftClientFactory; this.cheServerOpenshiftClientFactory = cheServerOpenshiftClientFactory; } public OpenShiftProject( - OpenShiftClientFactory clientFactory, - KubernetesClientFactory cheClientFactory, + OpenShiftClientFactory openShiftClientFactory, + CheServerKubernetesClientFactory cheServerKubernetesClientFactory, CheServerOpenshiftClientFactory cheServerOpenshiftClientFactory, Executor executor, String name, String workspaceId) { - super(clientFactory, cheClientFactory, executor, name, workspaceId); - this.clientFactory = clientFactory; - this.routes = new OpenShiftRoutes(name, workspaceId, clientFactory); + super(cheServerKubernetesClientFactory, executor, name, workspaceId); + this.routes = new OpenShiftRoutes(name, workspaceId, cheServerOpenshiftClientFactory); + this.openShiftClientFactory = openShiftClientFactory; this.cheServerOpenshiftClientFactory = cheServerOpenshiftClientFactory; } @@ -129,8 +128,8 @@ public class OpenShiftProject extends KubernetesNamespace { create(projectName, osClient); waitDefaultServiceAccount(projectName, osClient); } else { - create(projectName, clientFactory.createOC(workspaceId)); - waitDefaultServiceAccount(projectName, clientFactory.create(workspaceId)); + create(projectName, openShiftClientFactory.createOC(workspaceId)); + waitDefaultServiceAccount(projectName, openShiftClientFactory.create(workspaceId)); } } label(osClient.namespaces().withName(projectName).get(), labels); diff --git a/infrastructures/openshift/src/main/java/org/eclipse/che/workspace/infrastructure/openshift/project/OpenShiftProjectFactory.java b/infrastructures/openshift/src/main/java/org/eclipse/che/workspace/infrastructure/openshift/project/OpenShiftProjectFactory.java index 935989c27d..7ae64d5574 100644 --- a/infrastructures/openshift/src/main/java/org/eclipse/che/workspace/infrastructure/openshift/project/OpenShiftProjectFactory.java +++ b/infrastructures/openshift/src/main/java/org/eclipse/che/workspace/infrastructure/openshift/project/OpenShiftProjectFactory.java @@ -33,7 +33,6 @@ import javax.inject.Named; import org.eclipse.che.api.core.model.workspace.Workspace; import org.eclipse.che.api.core.model.workspace.runtime.RuntimeIdentity; import org.eclipse.che.api.user.server.PreferenceManager; -import org.eclipse.che.api.user.server.UserManager; import org.eclipse.che.api.workspace.server.spi.InfrastructureException; import org.eclipse.che.api.workspace.server.spi.NamespaceResolutionContext; import org.eclipse.che.commons.annotation.Nullable; @@ -60,8 +59,10 @@ public class OpenShiftProjectFactory extends KubernetesNamespaceFactory { private static final Logger LOG = LoggerFactory.getLogger(OpenShiftProjectFactory.class); private final boolean initWithCheServerSa; - private final OpenShiftClientFactory clientFactory; - private final CheServerOpenshiftClientFactory cheOpenShiftClientFactory; + private final OpenShiftClientFactory openShiftClientFactory; + private final CheServerOpenshiftClientFactory cheServerOpenshiftClientFactory; + + private final CheServerKubernetesClientFactory cheServerKubernetesClientFactory; private final String oAuthIdentityProvider; @@ -75,10 +76,9 @@ public class OpenShiftProjectFactory extends KubernetesNamespaceFactory { @Named("che.infra.kubernetes.namespace.annotations") String projectAnnotations, @Named("che.infra.openshift.project.init_with_server_sa") boolean initWithCheServerSa, Set namespaceConfigurators, - OpenShiftClientFactory clientFactory, - CheServerKubernetesClientFactory cheClientFactory, - CheServerOpenshiftClientFactory cheOpenShiftClientFactory, - UserManager userManager, + OpenShiftClientFactory openShiftClientFactory, + CheServerKubernetesClientFactory cheServerKubernetesClientFactory, + CheServerOpenshiftClientFactory cheServerOpenshiftClientFactory, PreferenceManager preferenceManager, KubernetesSharedPool sharedPool, @Nullable @Named("che.infra.openshift.oauth_identity_provider") @@ -91,14 +91,13 @@ public class OpenShiftProjectFactory extends KubernetesNamespaceFactory { projectLabels, projectAnnotations, namespaceConfigurators, - clientFactory, - cheClientFactory, - userManager, + cheServerKubernetesClientFactory, preferenceManager, sharedPool); this.initWithCheServerSa = initWithCheServerSa; - this.clientFactory = clientFactory; - this.cheOpenShiftClientFactory = cheOpenShiftClientFactory; + this.cheServerKubernetesClientFactory = cheServerKubernetesClientFactory; + this.cheServerOpenshiftClientFactory = cheServerOpenshiftClientFactory; + this.openShiftClientFactory = openShiftClientFactory; this.oAuthIdentityProvider = oAuthIdentityProvider; } @@ -154,9 +153,9 @@ public class OpenShiftProjectFactory extends KubernetesNamespaceFactory { @VisibleForTesting OpenShiftProject doCreateProjectAccess(String workspaceId, String name) { return new OpenShiftProject( - clientFactory, - cheOpenShiftClientFactory, - cheOpenShiftClientFactory, + openShiftClientFactory, + cheServerKubernetesClientFactory, + cheServerOpenshiftClientFactory, sharedPool.getExecutor(), name, workspaceId); @@ -170,7 +169,7 @@ public class OpenShiftProjectFactory extends KubernetesNamespaceFactory { private Optional fetchNamespaceObject(String name) throws InfrastructureException { try { - Project project = clientFactory.createOC().projects().withName(name).get(); + Project project = cheServerOpenshiftClientFactory.createOC().projects().withName(name).get(); return Optional.ofNullable(project); } catch (KubernetesClientException e) { if (e.getCode() == 403) { @@ -189,7 +188,12 @@ public class OpenShiftProjectFactory extends KubernetesNamespaceFactory { NamespaceResolutionContext namespaceCtx) throws InfrastructureException { try { List workspaceProjects = - clientFactory.createOC().projects().withLabels(namespaceLabels).list().getItems(); + cheServerOpenshiftClientFactory + .createOC() + .projects() + .withLabels(namespaceLabels) + .list() + .getItems(); if (!workspaceProjects.isEmpty()) { Map evaluatedAnnotations = evaluateAnnotationPlaceholders(namespaceCtx); return workspaceProjects.stream() diff --git a/infrastructures/openshift/src/main/java/org/eclipse/che/workspace/infrastructure/openshift/project/configurator/OpenShiftWorkspaceServiceAccountConfigurator.java b/infrastructures/openshift/src/main/java/org/eclipse/che/workspace/infrastructure/openshift/project/configurator/OpenShiftWorkspaceServiceAccountConfigurator.java index 5c18666e20..01e6bf81b0 100644 --- a/infrastructures/openshift/src/main/java/org/eclipse/che/workspace/infrastructure/openshift/project/configurator/OpenShiftWorkspaceServiceAccountConfigurator.java +++ b/infrastructures/openshift/src/main/java/org/eclipse/che/workspace/infrastructure/openshift/project/configurator/OpenShiftWorkspaceServiceAccountConfigurator.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012-2021 Red Hat, Inc. + * Copyright (c) 2012-2023 Red Hat, Inc. * This program and the accompanying materials are made * available under the terms of the Eclipse Public License 2.0 * which is available at https://www.eclipse.org/legal/epl-2.0/ @@ -25,7 +25,7 @@ import org.eclipse.che.api.workspace.server.spi.InfrastructureException; import org.eclipse.che.api.workspace.server.spi.NamespaceResolutionContext; import org.eclipse.che.commons.annotation.Nullable; import org.eclipse.che.workspace.infrastructure.kubernetes.namespace.configurator.NamespaceConfigurator; -import org.eclipse.che.workspace.infrastructure.openshift.OpenShiftClientFactory; +import org.eclipse.che.workspace.infrastructure.openshift.CheServerOpenshiftClientFactory; import org.eclipse.che.workspace.infrastructure.openshift.project.OpenShiftWorkspaceServiceAccount; /** @@ -35,7 +35,7 @@ import org.eclipse.che.workspace.infrastructure.openshift.project.OpenShiftWorks @Singleton public class OpenShiftWorkspaceServiceAccountConfigurator implements NamespaceConfigurator { - private final OpenShiftClientFactory clientFactory; + private final CheServerOpenshiftClientFactory cheServerOpenshiftClientFactory; private final String serviceAccountName; private final Set clusterRoleNames; @@ -44,8 +44,8 @@ public class OpenShiftWorkspaceServiceAccountConfigurator implements NamespaceCo public OpenShiftWorkspaceServiceAccountConfigurator( @Nullable @Named("che.infra.kubernetes.service_account_name") String serviceAccountName, @Nullable @Named("che.infra.kubernetes.workspace_sa_cluster_roles") String clusterRoleNames, - OpenShiftClientFactory clientFactory) { - this.clientFactory = clientFactory; + CheServerOpenshiftClientFactory cheServerOpenshiftClientFactory) { + this.cheServerOpenshiftClientFactory = cheServerOpenshiftClientFactory; this.serviceAccountName = serviceAccountName; if (!isNullOrEmpty(clusterRoleNames)) { this.clusterRoleNames = @@ -69,6 +69,6 @@ public class OpenShiftWorkspaceServiceAccountConfigurator implements NamespaceCo @VisibleForTesting public OpenShiftWorkspaceServiceAccount createServiceAccount(String wsId, String namespaceName) { return new OpenShiftWorkspaceServiceAccount( - wsId, namespaceName, serviceAccountName, clusterRoleNames, clientFactory); + wsId, namespaceName, serviceAccountName, clusterRoleNames, cheServerOpenshiftClientFactory); } } diff --git a/infrastructures/openshift/src/test/java/org/eclipse/che/workspace/infrastructure/openshift/OpenShiftInfrastructureTest.java b/infrastructures/openshift/src/test/java/org/eclipse/che/workspace/infrastructure/openshift/OpenShiftInfrastructureTest.java index 766217b291..f505040e81 100644 --- a/infrastructures/openshift/src/test/java/org/eclipse/che/workspace/infrastructure/openshift/OpenShiftInfrastructureTest.java +++ b/infrastructures/openshift/src/test/java/org/eclipse/che/workspace/infrastructure/openshift/OpenShiftInfrastructureTest.java @@ -12,21 +12,17 @@ package org.eclipse.che.workspace.infrastructure.openshift; import static org.mockito.Mockito.mock; -import static org.mockito.Mockito.when; -import io.fabric8.kubernetes.client.Config; import java.util.Collections; import org.eclipse.che.api.core.notification.EventService; import org.eclipse.che.workspace.infrastructure.kubernetes.cache.KubernetesRuntimeStateCache; import org.eclipse.che.workspace.infrastructure.openshift.project.OpenShiftProjectFactory; -import org.mockito.Mock; import org.mockito.testng.MockitoTestNGListener; import org.testng.annotations.BeforeMethod; import org.testng.annotations.Listeners; @Listeners(MockitoTestNGListener.class) public class OpenShiftInfrastructureTest { - @Mock private OpenShiftClientFactory factory; private OpenShiftInfrastructure infra; @BeforeMethod @@ -37,9 +33,6 @@ public class OpenShiftInfrastructureTest { mock(OpenShiftRuntimeContextFactory.class), Collections.emptySet(), mock(KubernetesRuntimeStateCache.class), - mock(OpenShiftProjectFactory.class), - factory); - - when(factory.getDefaultConfig()).thenReturn(mock(Config.class)); + mock(OpenShiftProjectFactory.class)); } } diff --git a/infrastructures/openshift/src/test/java/org/eclipse/che/workspace/infrastructure/openshift/project/OpenShiftProjectFactoryTest.java b/infrastructures/openshift/src/test/java/org/eclipse/che/workspace/infrastructure/openshift/project/OpenShiftProjectFactoryTest.java index fe4c8e578a..288ad9fe1a 100644 --- a/infrastructures/openshift/src/test/java/org/eclipse/che/workspace/infrastructure/openshift/project/OpenShiftProjectFactoryTest.java +++ b/infrastructures/openshift/src/test/java/org/eclipse/che/workspace/infrastructure/openshift/project/OpenShiftProjectFactoryTest.java @@ -61,8 +61,6 @@ import java.util.Set; import org.eclipse.che.api.core.ValidationException; import org.eclipse.che.api.core.model.workspace.runtime.RuntimeIdentity; import org.eclipse.che.api.user.server.PreferenceManager; -import org.eclipse.che.api.user.server.UserManager; -import org.eclipse.che.api.user.server.model.impl.UserImpl; import org.eclipse.che.api.workspace.server.WorkspaceManager; import org.eclipse.che.api.workspace.server.model.impl.RuntimeIdentityImpl; import org.eclipse.che.api.workspace.server.model.impl.WorkspaceImpl; @@ -110,11 +108,10 @@ public class OpenShiftProjectFactoryTest { private static final String NAMESPACE_ANNOTATIONS = NAMESPACE_ANNOTATION_NAME + "="; // @Mock private OpenShiftClientConfigFactory configFactory; - @Mock private OpenShiftClientFactory clientFactory; - @Mock private CheServerKubernetesClientFactory cheClientFactory; + @Mock private OpenShiftClientFactory openShiftClientFactory; + @Mock private CheServerKubernetesClientFactory cheServerKubernetesClientFactory; @Mock private CheServerOpenshiftClientFactory cheServerOpenshiftClientFactory; @Mock private WorkspaceManager workspaceManager; - @Mock private UserManager userManager; @Mock private PreferenceManager preferenceManager; @Mock private KubernetesSharedPool pool; @@ -132,8 +129,10 @@ public class OpenShiftProjectFactoryTest { @BeforeMethod public void setUp() throws Exception { - lenient().when(clientFactory.createOC()).thenReturn(osClient); - lenient().when(clientFactory.create()).thenReturn(osClient); + lenient().when(openShiftClientFactory.createOC()).thenReturn(osClient); + lenient().when(cheServerOpenshiftClientFactory.create()).thenReturn(osClient); + lenient().when(cheServerOpenshiftClientFactory.createOC()).thenReturn(osClient); + lenient().when(cheServerKubernetesClientFactory.create()).thenReturn(osClient); lenient().when(osClient.projects()).thenReturn(projectOperation); lenient() @@ -147,9 +146,6 @@ public class OpenShiftProjectFactoryTest { lenient().when(projectListResource.list()).thenReturn(projectList); lenient().when(projectList.getItems()).thenReturn(emptyList()); - lenient() - .when(userManager.getById(USER_ID)) - .thenReturn(new UserImpl(USER_ID, "test@mail.com", USER_NAME)); EnvironmentContext.getCurrent() .setSubject(new SubjectImpl(USER_NAME, USER_ID, "t-354t53xff34234", false)); } @@ -173,10 +169,9 @@ public class OpenShiftProjectFactoryTest { NAMESPACE_ANNOTATIONS, true, emptySet(), - clientFactory, - cheClientFactory, + openShiftClientFactory, + cheServerKubernetesClientFactory, cheServerOpenshiftClientFactory, - userManager, preferenceManager, pool, NO_OAUTH_IDENTITY_PROVIDER); @@ -204,10 +199,9 @@ public class OpenShiftProjectFactoryTest { NAMESPACE_ANNOTATIONS, true, emptySet(), - clientFactory, - cheClientFactory, + openShiftClientFactory, + cheServerKubernetesClientFactory, cheServerOpenshiftClientFactory, - userManager, preferenceManager, pool, NO_OAUTH_IDENTITY_PROVIDER); @@ -235,10 +229,9 @@ public class OpenShiftProjectFactoryTest { NAMESPACE_ANNOTATIONS, true, emptySet(), - clientFactory, - cheClientFactory, + openShiftClientFactory, + cheServerKubernetesClientFactory, cheServerOpenshiftClientFactory, - userManager, preferenceManager, pool, NO_OAUTH_IDENTITY_PROVIDER); @@ -271,10 +264,9 @@ public class OpenShiftProjectFactoryTest { NAMESPACE_ANNOTATIONS, true, emptySet(), - clientFactory, - cheClientFactory, + openShiftClientFactory, + cheServerKubernetesClientFactory, cheServerOpenshiftClientFactory, - userManager, preferenceManager, pool, NO_OAUTH_IDENTITY_PROVIDER); @@ -308,10 +300,9 @@ public class OpenShiftProjectFactoryTest { NAMESPACE_ANNOTATIONS, true, emptySet(), - clientFactory, - cheClientFactory, + openShiftClientFactory, + cheServerKubernetesClientFactory, cheServerOpenshiftClientFactory, - userManager, preferenceManager, pool, NO_OAUTH_IDENTITY_PROVIDER); @@ -341,10 +332,9 @@ public class OpenShiftProjectFactoryTest { NAMESPACE_ANNOTATIONS, true, emptySet(), - clientFactory, - cheClientFactory, + openShiftClientFactory, + cheServerKubernetesClientFactory, cheServerOpenshiftClientFactory, - userManager, preferenceManager, pool, NO_OAUTH_IDENTITY_PROVIDER); @@ -384,10 +374,9 @@ public class OpenShiftProjectFactoryTest { NAMESPACE_ANNOTATIONS, true, emptySet(), - clientFactory, - cheClientFactory, + openShiftClientFactory, + cheServerKubernetesClientFactory, cheServerOpenshiftClientFactory, - userManager, preferenceManager, pool, NO_OAUTH_IDENTITY_PROVIDER); @@ -421,10 +410,9 @@ public class OpenShiftProjectFactoryTest { NAMESPACE_ANNOTATIONS, true, emptySet(), - clientFactory, - cheClientFactory, + openShiftClientFactory, + cheServerKubernetesClientFactory, cheServerOpenshiftClientFactory, - userManager, preferenceManager, pool, NO_OAUTH_IDENTITY_PROVIDER); @@ -458,10 +446,9 @@ public class OpenShiftProjectFactoryTest { NAMESPACE_ANNOTATIONS, true, emptySet(), - clientFactory, - cheClientFactory, + openShiftClientFactory, + cheServerKubernetesClientFactory, cheServerOpenshiftClientFactory, - userManager, preferenceManager, pool, NO_OAUTH_IDENTITY_PROVIDER); @@ -485,10 +472,9 @@ public class OpenShiftProjectFactoryTest { NAMESPACE_ANNOTATIONS, true, emptySet(), - clientFactory, - cheClientFactory, + openShiftClientFactory, + cheServerKubernetesClientFactory, cheServerOpenshiftClientFactory, - userManager, preferenceManager, pool, NO_OAUTH_IDENTITY_PROVIDER); @@ -517,10 +503,9 @@ public class OpenShiftProjectFactoryTest { NAMESPACE_ANNOTATIONS, true, emptySet(), - clientFactory, - cheClientFactory, + openShiftClientFactory, + cheServerKubernetesClientFactory, cheServerOpenshiftClientFactory, - userManager, preferenceManager, pool, NO_OAUTH_IDENTITY_PROVIDER)); @@ -551,11 +536,10 @@ public class OpenShiftProjectFactoryTest { NAMESPACE_LABELS, NAMESPACE_ANNOTATIONS, true, - Set.of(new CredentialsSecretConfigurator(clientFactory)), - clientFactory, - cheClientFactory, + Set.of(new CredentialsSecretConfigurator(cheServerKubernetesClientFactory)), + openShiftClientFactory, + cheServerKubernetesClientFactory, cheServerOpenshiftClientFactory, - userManager, preferenceManager, pool, NO_OAUTH_IDENTITY_PROVIDER)); @@ -596,11 +580,10 @@ public class OpenShiftProjectFactoryTest { NAMESPACE_LABELS, NAMESPACE_ANNOTATIONS, true, - Set.of(new PreferencesConfigMapConfigurator(clientFactory)), - clientFactory, - cheClientFactory, + Set.of(new PreferencesConfigMapConfigurator(cheServerKubernetesClientFactory)), + openShiftClientFactory, + cheServerKubernetesClientFactory, cheServerOpenshiftClientFactory, - userManager, preferenceManager, pool, NO_OAUTH_IDENTITY_PROVIDER)); @@ -639,11 +622,10 @@ public class OpenShiftProjectFactoryTest { NAMESPACE_LABELS, NAMESPACE_ANNOTATIONS, true, - Set.of(new CredentialsSecretConfigurator(clientFactory)), - clientFactory, - cheClientFactory, + Set.of(new CredentialsSecretConfigurator(cheServerKubernetesClientFactory)), + openShiftClientFactory, + cheServerKubernetesClientFactory, cheServerOpenshiftClientFactory, - userManager, preferenceManager, pool, NO_OAUTH_IDENTITY_PROVIDER)); @@ -681,11 +663,10 @@ public class OpenShiftProjectFactoryTest { NAMESPACE_LABELS, NAMESPACE_ANNOTATIONS, true, - Set.of(new PreferencesConfigMapConfigurator(clientFactory)), - clientFactory, - cheClientFactory, + Set.of(new PreferencesConfigMapConfigurator(cheServerKubernetesClientFactory)), + openShiftClientFactory, + cheServerKubernetesClientFactory, cheServerOpenshiftClientFactory, - userManager, preferenceManager, pool, NO_OAUTH_IDENTITY_PROVIDER)); @@ -713,7 +694,9 @@ public class OpenShiftProjectFactoryTest { @Test public void shouldCallStopWorkspaceRoleProvisionWhenIdentityProviderIsDefined() throws Exception { var saConf = - spy(new OpenShiftWorkspaceServiceAccountConfigurator("serviceAccount", "", clientFactory)); + spy( + new OpenShiftWorkspaceServiceAccountConfigurator( + "serviceAccount", "", cheServerOpenshiftClientFactory)); projectFactory = spy( new OpenShiftProjectFactory( @@ -725,10 +708,9 @@ public class OpenShiftProjectFactoryTest { NAMESPACE_ANNOTATIONS, true, Set.of(saConf), - clientFactory, - cheClientFactory, + openShiftClientFactory, + cheServerKubernetesClientFactory, cheServerOpenshiftClientFactory, - userManager, preferenceManager, pool, OAUTH_IDENTITY_PROVIDER)); @@ -775,10 +757,9 @@ public class OpenShiftProjectFactoryTest { NAMESPACE_ANNOTATIONS, true, emptySet(), - clientFactory, - cheClientFactory, + openShiftClientFactory, + cheServerKubernetesClientFactory, cheServerOpenshiftClientFactory, - userManager, preferenceManager, pool, NO_OAUTH_IDENTITY_PROVIDER); @@ -808,10 +789,9 @@ public class OpenShiftProjectFactoryTest { NAMESPACE_ANNOTATIONS, true, emptySet(), - clientFactory, - cheClientFactory, + openShiftClientFactory, + cheServerKubernetesClientFactory, cheServerOpenshiftClientFactory, - userManager, preferenceManager, pool, NO_OAUTH_IDENTITY_PROVIDER); @@ -835,10 +815,9 @@ public class OpenShiftProjectFactoryTest { "try_placeholder_here=", true, emptySet(), - clientFactory, - cheClientFactory, + openShiftClientFactory, + cheServerKubernetesClientFactory, cheServerOpenshiftClientFactory, - userManager, preferenceManager, pool, NO_OAUTH_IDENTITY_PROVIDER)); @@ -876,10 +855,9 @@ public class OpenShiftProjectFactoryTest { "try_placeholder_here=", true, namespaceConfigurators, - clientFactory, - cheClientFactory, + openShiftClientFactory, + cheServerKubernetesClientFactory, cheServerOpenshiftClientFactory, - userManager, preferenceManager, pool, NO_OAUTH_IDENTITY_PROVIDER)); diff --git a/infrastructures/openshift/src/test/java/org/eclipse/che/workspace/infrastructure/openshift/project/configurator/OpenShiftWorkspaceServiceAccountConfiguratorTest.java b/infrastructures/openshift/src/test/java/org/eclipse/che/workspace/infrastructure/openshift/project/configurator/OpenShiftWorkspaceServiceAccountConfiguratorTest.java index fef482236b..f8106e2108 100644 --- a/infrastructures/openshift/src/test/java/org/eclipse/che/workspace/infrastructure/openshift/project/configurator/OpenShiftWorkspaceServiceAccountConfiguratorTest.java +++ b/infrastructures/openshift/src/test/java/org/eclipse/che/workspace/infrastructure/openshift/project/configurator/OpenShiftWorkspaceServiceAccountConfiguratorTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012-2021 Red Hat, Inc. + * Copyright (c) 2012-2023 Red Hat, Inc. * This program and the accompanying materials are made * available under the terms of the Eclipse Public License 2.0 * which is available at https://www.eclipse.org/legal/epl-2.0/ @@ -17,11 +17,10 @@ import static org.mockito.Mockito.mock; import static org.mockito.Mockito.spy; import static org.mockito.Mockito.times; import static org.mockito.Mockito.verify; -import static org.testng.Assert.*; import org.eclipse.che.api.workspace.server.spi.InfrastructureException; import org.eclipse.che.api.workspace.server.spi.NamespaceResolutionContext; -import org.eclipse.che.workspace.infrastructure.openshift.OpenShiftClientFactory; +import org.eclipse.che.workspace.infrastructure.openshift.CheServerOpenshiftClientFactory; import org.eclipse.che.workspace.infrastructure.openshift.project.OpenShiftWorkspaceServiceAccount; import org.mockito.Mock; import org.mockito.testng.MockitoTestNGListener; @@ -42,7 +41,7 @@ public class OpenShiftWorkspaceServiceAccountConfiguratorTest { private NamespaceResolutionContext nsContext; - @Mock private OpenShiftClientFactory clientFactory; + @Mock private CheServerOpenshiftClientFactory cheServerOpenshiftClientFactory; private OpenShiftWorkspaceServiceAccountConfigurator saConfigurator; @@ -56,7 +55,7 @@ public class OpenShiftWorkspaceServiceAccountConfiguratorTest { saConfigurator = spy( new OpenShiftWorkspaceServiceAccountConfigurator( - SA_NAME, CLUSTER_ROLES, clientFactory)); + SA_NAME, CLUSTER_ROLES, cheServerOpenshiftClientFactory)); OpenShiftWorkspaceServiceAccount serviceAccount = mock(OpenShiftWorkspaceServiceAccount.class); doReturn(serviceAccount).when(saConfigurator).createServiceAccount(WS_ID, NS_NAME); @@ -68,7 +67,9 @@ public class OpenShiftWorkspaceServiceAccountConfiguratorTest { @Test public void testDoNothingWhenServiceAccountNotSet() throws InfrastructureException { saConfigurator = - spy(new OpenShiftWorkspaceServiceAccountConfigurator(null, CLUSTER_ROLES, clientFactory)); + spy( + new OpenShiftWorkspaceServiceAccountConfigurator( + null, CLUSTER_ROLES, cheServerOpenshiftClientFactory)); saConfigurator.configure(nsContext, NS_NAME); From b68fa97aa2adc31c68f1180cd3da5a46d79e1454 Mon Sep 17 00:00:00 2001 From: Mykhailo Kuznietsov Date: Wed, 31 May 2023 11:24:24 +0300 Subject: [PATCH 21/75] chore: update CODEOWNERS file (#513) --- .github/CODEOWNERS | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 795b864a36..89e77d1192 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -1,5 +1,5 @@ # Global Owners -* @l0rd @ibuziuk @vinokurig @nickboldt +* @l0rd @ibuziuk @vinokurig @nickboldt @tolusha # che.properties file is quasi-documentation, so in future we might grant access to this # assembly/assembly-wsmaster-war/src/main/webapp/WEB-INF/classes/che/** @osslate @@ -9,6 +9,3 @@ infrastructures/** @amisevsk # deploy deploy/** @tolusha @dkwon17 - -# e2e tests -tests/e2e/** @musienko-maxim From fdb2dbf163a02aff5e574ce29a8ba767dfce1f7b Mon Sep 17 00:00:00 2001 From: Mykhailo Kuznietsov Date: Wed, 31 May 2023 16:29:28 +0000 Subject: [PATCH 22/75] chore: Bump to 7.69.0-SNAPSHOT in main Signed-off-by: Mykhailo Kuznietsov --- assembly/assembly-che-tomcat/pom.xml | 2 +- assembly/assembly-main/pom.xml | 2 +- assembly/assembly-root-war/pom.xml | 2 +- assembly/assembly-swagger-war/pom.xml | 2 +- assembly/assembly-wsmaster-war/pom.xml | 2 +- assembly/pom.xml | 2 +- core/che-core-api-core/pom.xml | 2 +- core/che-core-api-dto-maven-plugin/pom.xml | 2 +- core/che-core-api-dto/pom.xml | 2 +- core/che-core-api-model/pom.xml | 2 +- core/che-core-db-vendor-h2/pom.xml | 2 +- core/che-core-db-vendor-mysql/pom.xml | 2 +- core/che-core-db-vendor-postgresql/pom.xml | 2 +- core/che-core-db/pom.xml | 2 +- core/che-core-logback/pom.xml | 2 +- core/che-core-metrics-core/pom.xml | 2 +- core/che-core-tracing-core/pom.xml | 2 +- core/che-core-tracing-metrics/pom.xml | 2 +- core/che-core-tracing-web/pom.xml | 2 +- core/che-core-typescript-dto-maven-plugin/pom.xml | 2 +- core/commons/che-core-commons-annotations/pom.xml | 2 +- core/commons/che-core-commons-inject/pom.xml | 2 +- core/commons/che-core-commons-j2ee/pom.xml | 2 +- core/commons/che-core-commons-json/pom.xml | 2 +- core/commons/che-core-commons-lang/pom.xml | 2 +- core/commons/che-core-commons-observability/pom.xml | 2 +- core/commons/che-core-commons-schedule/pom.xml | 2 +- core/commons/che-core-commons-test/pom.xml | 2 +- core/commons/che-core-commons-tracing/pom.xml | 2 +- core/commons/pom.xml | 2 +- core/pom.xml | 2 +- infrastructures/infrastructure-distributed/pom.xml | 2 +- infrastructures/infrastructure-factory/pom.xml | 2 +- infrastructures/infrastructure-metrics/pom.xml | 2 +- infrastructures/infrastructure-permission/pom.xml | 2 +- infrastructures/kubernetes/pom.xml | 2 +- infrastructures/openshift/pom.xml | 2 +- infrastructures/pom.xml | 2 +- .../api/che-multiuser-api-authentication-commons/pom.xml | 2 +- multiuser/api/che-multiuser-api-authorization-impl/pom.xml | 2 +- multiuser/api/che-multiuser-api-authorization/pom.xml | 2 +- multiuser/api/che-multiuser-api-organization-shared/pom.xml | 2 +- multiuser/api/che-multiuser-api-organization/pom.xml | 2 +- multiuser/api/che-multiuser-api-permission-shared/pom.xml | 2 +- multiuser/api/che-multiuser-api-permission/pom.xml | 2 +- multiuser/api/che-multiuser-api-resource-shared/pom.xml | 2 +- multiuser/api/che-multiuser-api-resource/pom.xml | 2 +- multiuser/api/che-multiuser-api-workspace-activity/pom.xml | 2 +- multiuser/api/pom.xml | 2 +- .../integration-tests/che-multiuser-cascade-removal/pom.xml | 2 +- multiuser/integration-tests/che-multiuser-mysql-tck/pom.xml | 2 +- .../integration-tests/che-multiuser-postgresql-tck/pom.xml | 2 +- multiuser/integration-tests/pom.xml | 2 +- multiuser/keycloak/che-multiuser-keycloak-server/pom.xml | 2 +- multiuser/keycloak/che-multiuser-keycloak-shared/pom.xml | 2 +- .../keycloak/che-multiuser-keycloak-token-provider/pom.xml | 2 +- .../keycloak/che-multiuser-keycloak-user-remover/pom.xml | 2 +- multiuser/keycloak/pom.xml | 2 +- .../che-multiuser-machine-authentication-shared/pom.xml | 2 +- .../machine-auth/che-multiuser-machine-authentication/pom.xml | 2 +- multiuser/machine-auth/pom.xml | 2 +- multiuser/oidc/pom.xml | 2 +- multiuser/permission/che-multiuser-permission-devfile/pom.xml | 2 +- multiuser/permission/che-multiuser-permission-logger/pom.xml | 2 +- .../permission/che-multiuser-permission-resource/pom.xml | 2 +- multiuser/permission/che-multiuser-permission-system/pom.xml | 2 +- multiuser/permission/che-multiuser-permission-user/pom.xml | 2 +- .../che-multiuser-permission-workspace-activity/pom.xml | 2 +- .../permission/che-multiuser-permission-workspace/pom.xml | 2 +- multiuser/permission/pom.xml | 2 +- multiuser/personal-account/pom.xml | 2 +- multiuser/pom.xml | 2 +- multiuser/sql-schema/pom.xml | 2 +- pom.xml | 4 ++-- typescript-dto/dto-pom.xml | 2 +- wsmaster/che-core-api-account/pom.xml | 2 +- wsmaster/che-core-api-auth-azure-devops/pom.xml | 2 +- wsmaster/che-core-api-auth-bitbucket/pom.xml | 2 +- wsmaster/che-core-api-auth-github/pom.xml | 2 +- wsmaster/che-core-api-auth-gitlab/pom.xml | 2 +- wsmaster/che-core-api-auth-openshift/pom.xml | 2 +- wsmaster/che-core-api-auth-shared/pom.xml | 2 +- wsmaster/che-core-api-auth/pom.xml | 2 +- wsmaster/che-core-api-devfile-shared/pom.xml | 2 +- wsmaster/che-core-api-devfile/pom.xml | 2 +- wsmaster/che-core-api-factory-azure-devops/pom.xml | 2 +- wsmaster/che-core-api-factory-bitbucket-server/pom.xml | 2 +- wsmaster/che-core-api-factory-bitbucket/pom.xml | 2 +- wsmaster/che-core-api-factory-git-ssh/pom.xml | 2 +- wsmaster/che-core-api-factory-github/pom.xml | 2 +- wsmaster/che-core-api-factory-gitlab/pom.xml | 2 +- wsmaster/che-core-api-factory-shared/pom.xml | 2 +- wsmaster/che-core-api-factory/pom.xml | 2 +- wsmaster/che-core-api-logger-shared/pom.xml | 2 +- wsmaster/che-core-api-logger/pom.xml | 2 +- wsmaster/che-core-api-metrics/pom.xml | 2 +- wsmaster/che-core-api-ssh-shared/pom.xml | 2 +- wsmaster/che-core-api-ssh/pom.xml | 2 +- wsmaster/che-core-api-system-shared/pom.xml | 2 +- wsmaster/che-core-api-system/pom.xml | 2 +- wsmaster/che-core-api-user-shared/pom.xml | 2 +- wsmaster/che-core-api-user/pom.xml | 2 +- wsmaster/che-core-api-workspace-activity/pom.xml | 2 +- wsmaster/che-core-api-workspace-shared/pom.xml | 2 +- wsmaster/che-core-api-workspace/pom.xml | 2 +- wsmaster/che-core-sql-schema/pom.xml | 2 +- wsmaster/integration-tests/cascade-removal/pom.xml | 2 +- wsmaster/integration-tests/mysql-tck/pom.xml | 2 +- wsmaster/integration-tests/pom.xml | 2 +- wsmaster/integration-tests/postgresql-tck/pom.xml | 2 +- wsmaster/pom.xml | 2 +- 111 files changed, 112 insertions(+), 112 deletions(-) diff --git a/assembly/assembly-che-tomcat/pom.xml b/assembly/assembly-che-tomcat/pom.xml index fb87d40eaa..862e86a9da 100644 --- a/assembly/assembly-che-tomcat/pom.xml +++ b/assembly/assembly-che-tomcat/pom.xml @@ -17,7 +17,7 @@ che-assembly-parent org.eclipse.che - 7.68.0-SNAPSHOT + 7.69.0-SNAPSHOT assembly-che-tomcat jar diff --git a/assembly/assembly-main/pom.xml b/assembly/assembly-main/pom.xml index d4c96bcd2e..f2cefa78a6 100644 --- a/assembly/assembly-main/pom.xml +++ b/assembly/assembly-main/pom.xml @@ -17,7 +17,7 @@ che-assembly-parent org.eclipse.che - 7.68.0-SNAPSHOT + 7.69.0-SNAPSHOT assembly-main pom diff --git a/assembly/assembly-root-war/pom.xml b/assembly/assembly-root-war/pom.xml index 45ebbc09a9..b77d7a665f 100644 --- a/assembly/assembly-root-war/pom.xml +++ b/assembly/assembly-root-war/pom.xml @@ -17,7 +17,7 @@ che-assembly-parent org.eclipse.che - 7.68.0-SNAPSHOT + 7.69.0-SNAPSHOT assembly-root-war war diff --git a/assembly/assembly-swagger-war/pom.xml b/assembly/assembly-swagger-war/pom.xml index de923d3f99..a4c83597cc 100644 --- a/assembly/assembly-swagger-war/pom.xml +++ b/assembly/assembly-swagger-war/pom.xml @@ -17,7 +17,7 @@ che-assembly-parent org.eclipse.che - 7.68.0-SNAPSHOT + 7.69.0-SNAPSHOT assembly-swagger-war war diff --git a/assembly/assembly-wsmaster-war/pom.xml b/assembly/assembly-wsmaster-war/pom.xml index 482a92573d..775de1d03a 100644 --- a/assembly/assembly-wsmaster-war/pom.xml +++ b/assembly/assembly-wsmaster-war/pom.xml @@ -17,7 +17,7 @@ che-assembly-parent org.eclipse.che - 7.68.0-SNAPSHOT + 7.69.0-SNAPSHOT assembly-wsmaster-war war diff --git a/assembly/pom.xml b/assembly/pom.xml index ea6f5172e5..0ab6be801d 100644 --- a/assembly/pom.xml +++ b/assembly/pom.xml @@ -17,7 +17,7 @@ che-server org.eclipse.che - 7.68.0-SNAPSHOT + 7.69.0-SNAPSHOT ../pom.xml che-assembly-parent diff --git a/core/che-core-api-core/pom.xml b/core/che-core-api-core/pom.xml index b164567122..affdee5088 100644 --- a/core/che-core-api-core/pom.xml +++ b/core/che-core-api-core/pom.xml @@ -17,7 +17,7 @@ che-core-parent org.eclipse.che.core - 7.68.0-SNAPSHOT + 7.69.0-SNAPSHOT che-core-api-core jar diff --git a/core/che-core-api-dto-maven-plugin/pom.xml b/core/che-core-api-dto-maven-plugin/pom.xml index 7c375c87fa..6b70e0bd6f 100644 --- a/core/che-core-api-dto-maven-plugin/pom.xml +++ b/core/che-core-api-dto-maven-plugin/pom.xml @@ -17,7 +17,7 @@ che-core-parent org.eclipse.che.core - 7.68.0-SNAPSHOT + 7.69.0-SNAPSHOT che-core-api-dto-maven-plugin maven-plugin diff --git a/core/che-core-api-dto/pom.xml b/core/che-core-api-dto/pom.xml index 042ef01ab0..ef8198f92e 100644 --- a/core/che-core-api-dto/pom.xml +++ b/core/che-core-api-dto/pom.xml @@ -17,7 +17,7 @@ che-core-parent org.eclipse.che.core - 7.68.0-SNAPSHOT + 7.69.0-SNAPSHOT che-core-api-dto jar diff --git a/core/che-core-api-model/pom.xml b/core/che-core-api-model/pom.xml index c1e0dcde9d..dc07bf86fa 100644 --- a/core/che-core-api-model/pom.xml +++ b/core/che-core-api-model/pom.xml @@ -17,7 +17,7 @@ che-core-parent org.eclipse.che.core - 7.68.0-SNAPSHOT + 7.69.0-SNAPSHOT che-core-api-model jar diff --git a/core/che-core-db-vendor-h2/pom.xml b/core/che-core-db-vendor-h2/pom.xml index 0e967e8a82..8f1c45669d 100644 --- a/core/che-core-db-vendor-h2/pom.xml +++ b/core/che-core-db-vendor-h2/pom.xml @@ -17,7 +17,7 @@ che-core-parent org.eclipse.che.core - 7.68.0-SNAPSHOT + 7.69.0-SNAPSHOT che-core-db-vendor-h2 Che Core :: Commons :: DB :: Vendor H2 diff --git a/core/che-core-db-vendor-mysql/pom.xml b/core/che-core-db-vendor-mysql/pom.xml index 7628d07df3..645581b6ae 100644 --- a/core/che-core-db-vendor-mysql/pom.xml +++ b/core/che-core-db-vendor-mysql/pom.xml @@ -17,7 +17,7 @@ che-core-parent org.eclipse.che.core - 7.68.0-SNAPSHOT + 7.69.0-SNAPSHOT che-core-db-vendor-mysql Che Core :: Commons :: DB :: Vendor MySQL diff --git a/core/che-core-db-vendor-postgresql/pom.xml b/core/che-core-db-vendor-postgresql/pom.xml index b489b6584d..cbe88905b6 100644 --- a/core/che-core-db-vendor-postgresql/pom.xml +++ b/core/che-core-db-vendor-postgresql/pom.xml @@ -17,7 +17,7 @@ che-core-parent org.eclipse.che.core - 7.68.0-SNAPSHOT + 7.69.0-SNAPSHOT che-core-db-vendor-postgresql Che Core :: Commons :: DB :: Vendor PostgreSQL diff --git a/core/che-core-db/pom.xml b/core/che-core-db/pom.xml index 854cbe25fe..145319637b 100644 --- a/core/che-core-db/pom.xml +++ b/core/che-core-db/pom.xml @@ -17,7 +17,7 @@ che-core-parent org.eclipse.che.core - 7.68.0-SNAPSHOT + 7.69.0-SNAPSHOT che-core-db Che Core :: Commons :: DB diff --git a/core/che-core-logback/pom.xml b/core/che-core-logback/pom.xml index 21838be36d..08d2e3470b 100644 --- a/core/che-core-logback/pom.xml +++ b/core/che-core-logback/pom.xml @@ -17,7 +17,7 @@ che-core-parent org.eclipse.che.core - 7.68.0-SNAPSHOT + 7.69.0-SNAPSHOT che-core-logback jar diff --git a/core/che-core-metrics-core/pom.xml b/core/che-core-metrics-core/pom.xml index f4a20bf6da..ac899b7ffd 100644 --- a/core/che-core-metrics-core/pom.xml +++ b/core/che-core-metrics-core/pom.xml @@ -17,7 +17,7 @@ che-core-parent org.eclipse.che.core - 7.68.0-SNAPSHOT + 7.69.0-SNAPSHOT che-core-metrics-core Che Core :: Commons :: Metrics :: Core diff --git a/core/che-core-tracing-core/pom.xml b/core/che-core-tracing-core/pom.xml index f731cb193a..777db17b0b 100644 --- a/core/che-core-tracing-core/pom.xml +++ b/core/che-core-tracing-core/pom.xml @@ -17,7 +17,7 @@ che-core-parent org.eclipse.che.core - 7.68.0-SNAPSHOT + 7.69.0-SNAPSHOT che-core-tracing-core Che Core :: Commons :: Tracing :: Core diff --git a/core/che-core-tracing-metrics/pom.xml b/core/che-core-tracing-metrics/pom.xml index 74b04f9583..ac2e5bbe5b 100644 --- a/core/che-core-tracing-metrics/pom.xml +++ b/core/che-core-tracing-metrics/pom.xml @@ -17,7 +17,7 @@ che-core-parent org.eclipse.che.core - 7.68.0-SNAPSHOT + 7.69.0-SNAPSHOT che-core-tracing-metrics Che Core :: Commons :: Tracing :: Metrics diff --git a/core/che-core-tracing-web/pom.xml b/core/che-core-tracing-web/pom.xml index 05a0746aa3..4b765dc805 100644 --- a/core/che-core-tracing-web/pom.xml +++ b/core/che-core-tracing-web/pom.xml @@ -17,7 +17,7 @@ che-core-parent org.eclipse.che.core - 7.68.0-SNAPSHOT + 7.69.0-SNAPSHOT che-core-tracing-web Che Core :: Commons :: Tracing :: Web diff --git a/core/che-core-typescript-dto-maven-plugin/pom.xml b/core/che-core-typescript-dto-maven-plugin/pom.xml index f811362a57..14721f6b35 100644 --- a/core/che-core-typescript-dto-maven-plugin/pom.xml +++ b/core/che-core-typescript-dto-maven-plugin/pom.xml @@ -17,7 +17,7 @@ che-core-parent org.eclipse.che.core - 7.68.0-SNAPSHOT + 7.69.0-SNAPSHOT che-core-typescript-dto-maven-plugin maven-plugin diff --git a/core/commons/che-core-commons-annotations/pom.xml b/core/commons/che-core-commons-annotations/pom.xml index 1b77160415..b5c49f300d 100644 --- a/core/commons/che-core-commons-annotations/pom.xml +++ b/core/commons/che-core-commons-annotations/pom.xml @@ -17,7 +17,7 @@ che-core-commons-parent org.eclipse.che.core - 7.68.0-SNAPSHOT + 7.69.0-SNAPSHOT che-core-commons-annotations jar diff --git a/core/commons/che-core-commons-inject/pom.xml b/core/commons/che-core-commons-inject/pom.xml index 93f465491e..c9d1d7c451 100644 --- a/core/commons/che-core-commons-inject/pom.xml +++ b/core/commons/che-core-commons-inject/pom.xml @@ -17,7 +17,7 @@ che-core-commons-parent org.eclipse.che.core - 7.68.0-SNAPSHOT + 7.69.0-SNAPSHOT che-core-commons-inject jar diff --git a/core/commons/che-core-commons-j2ee/pom.xml b/core/commons/che-core-commons-j2ee/pom.xml index 102ac81e3b..fb5236bb64 100644 --- a/core/commons/che-core-commons-j2ee/pom.xml +++ b/core/commons/che-core-commons-j2ee/pom.xml @@ -17,7 +17,7 @@ che-core-commons-parent org.eclipse.che.core - 7.68.0-SNAPSHOT + 7.69.0-SNAPSHOT che-core-commons-j2ee jar diff --git a/core/commons/che-core-commons-json/pom.xml b/core/commons/che-core-commons-json/pom.xml index dc3ad186fa..00df041b4c 100644 --- a/core/commons/che-core-commons-json/pom.xml +++ b/core/commons/che-core-commons-json/pom.xml @@ -17,7 +17,7 @@ che-core-commons-parent org.eclipse.che.core - 7.68.0-SNAPSHOT + 7.69.0-SNAPSHOT che-core-commons-json jar diff --git a/core/commons/che-core-commons-lang/pom.xml b/core/commons/che-core-commons-lang/pom.xml index 8d059b052a..d123ad01ca 100644 --- a/core/commons/che-core-commons-lang/pom.xml +++ b/core/commons/che-core-commons-lang/pom.xml @@ -17,7 +17,7 @@ che-core-commons-parent org.eclipse.che.core - 7.68.0-SNAPSHOT + 7.69.0-SNAPSHOT che-core-commons-lang jar diff --git a/core/commons/che-core-commons-observability/pom.xml b/core/commons/che-core-commons-observability/pom.xml index 5bdb9a7c31..064e8fc6c6 100644 --- a/core/commons/che-core-commons-observability/pom.xml +++ b/core/commons/che-core-commons-observability/pom.xml @@ -17,7 +17,7 @@ che-core-commons-parent org.eclipse.che.core - 7.68.0-SNAPSHOT + 7.69.0-SNAPSHOT che-core-commons-observability Che Core :: Commons :: Tracing and Monitoring wrapper diff --git a/core/commons/che-core-commons-schedule/pom.xml b/core/commons/che-core-commons-schedule/pom.xml index 1c00a9ec79..c38025bfda 100644 --- a/core/commons/che-core-commons-schedule/pom.xml +++ b/core/commons/che-core-commons-schedule/pom.xml @@ -17,7 +17,7 @@ che-core-commons-parent org.eclipse.che.core - 7.68.0-SNAPSHOT + 7.69.0-SNAPSHOT che-core-commons-schedule jar diff --git a/core/commons/che-core-commons-test/pom.xml b/core/commons/che-core-commons-test/pom.xml index a26297935b..8f4e75f88a 100644 --- a/core/commons/che-core-commons-test/pom.xml +++ b/core/commons/che-core-commons-test/pom.xml @@ -17,7 +17,7 @@ che-core-commons-parent org.eclipse.che.core - 7.68.0-SNAPSHOT + 7.69.0-SNAPSHOT che-core-commons-test jar diff --git a/core/commons/che-core-commons-tracing/pom.xml b/core/commons/che-core-commons-tracing/pom.xml index 3530b3fb5d..d3ce27e3ac 100644 --- a/core/commons/che-core-commons-tracing/pom.xml +++ b/core/commons/che-core-commons-tracing/pom.xml @@ -17,7 +17,7 @@ che-core-commons-parent org.eclipse.che.core - 7.68.0-SNAPSHOT + 7.69.0-SNAPSHOT che-core-commons-tracing Che Core :: Commons :: Tracing diff --git a/core/commons/pom.xml b/core/commons/pom.xml index 99b054d574..54562de5c7 100644 --- a/core/commons/pom.xml +++ b/core/commons/pom.xml @@ -17,7 +17,7 @@ che-core-parent org.eclipse.che.core - 7.68.0-SNAPSHOT + 7.69.0-SNAPSHOT ../pom.xml che-core-commons-parent diff --git a/core/pom.xml b/core/pom.xml index cd648a0a84..2bb918d39f 100644 --- a/core/pom.xml +++ b/core/pom.xml @@ -17,7 +17,7 @@ che-server org.eclipse.che - 7.68.0-SNAPSHOT + 7.69.0-SNAPSHOT ../pom.xml org.eclipse.che.core diff --git a/infrastructures/infrastructure-distributed/pom.xml b/infrastructures/infrastructure-distributed/pom.xml index d97fd380c5..1ad3997374 100644 --- a/infrastructures/infrastructure-distributed/pom.xml +++ b/infrastructures/infrastructure-distributed/pom.xml @@ -17,7 +17,7 @@ che-infrastructures-parent org.eclipse.che.infrastructure - 7.68.0-SNAPSHOT + 7.69.0-SNAPSHOT infrastructure-distributed jar diff --git a/infrastructures/infrastructure-factory/pom.xml b/infrastructures/infrastructure-factory/pom.xml index d22dd2c550..2a4d9e4d19 100644 --- a/infrastructures/infrastructure-factory/pom.xml +++ b/infrastructures/infrastructure-factory/pom.xml @@ -17,7 +17,7 @@ che-infrastructures-parent org.eclipse.che.infrastructure - 7.68.0-SNAPSHOT + 7.69.0-SNAPSHOT infrastructure-factory jar diff --git a/infrastructures/infrastructure-metrics/pom.xml b/infrastructures/infrastructure-metrics/pom.xml index 7eea92dc78..2effa671b1 100644 --- a/infrastructures/infrastructure-metrics/pom.xml +++ b/infrastructures/infrastructure-metrics/pom.xml @@ -17,7 +17,7 @@ che-infrastructures-parent org.eclipse.che.infrastructure - 7.68.0-SNAPSHOT + 7.69.0-SNAPSHOT ../pom.xml infrastructure-metrics diff --git a/infrastructures/infrastructure-permission/pom.xml b/infrastructures/infrastructure-permission/pom.xml index 8be95ca560..80d73ea206 100644 --- a/infrastructures/infrastructure-permission/pom.xml +++ b/infrastructures/infrastructure-permission/pom.xml @@ -17,7 +17,7 @@ che-infrastructures-parent org.eclipse.che.infrastructure - 7.68.0-SNAPSHOT + 7.69.0-SNAPSHOT infrastructure-permission Infrastructure :: Kubernetes Permissions diff --git a/infrastructures/kubernetes/pom.xml b/infrastructures/kubernetes/pom.xml index ec9011e8f7..f3942abaca 100644 --- a/infrastructures/kubernetes/pom.xml +++ b/infrastructures/kubernetes/pom.xml @@ -17,7 +17,7 @@ che-infrastructures-parent org.eclipse.che.infrastructure - 7.68.0-SNAPSHOT + 7.69.0-SNAPSHOT infrastructure-kubernetes Infrastructure :: Kubernetes diff --git a/infrastructures/openshift/pom.xml b/infrastructures/openshift/pom.xml index 521aa6f164..48bc53a122 100644 --- a/infrastructures/openshift/pom.xml +++ b/infrastructures/openshift/pom.xml @@ -17,7 +17,7 @@ che-infrastructures-parent org.eclipse.che.infrastructure - 7.68.0-SNAPSHOT + 7.69.0-SNAPSHOT infrastructure-openshift Infrastructure :: OpenShift diff --git a/infrastructures/pom.xml b/infrastructures/pom.xml index 0a71e7a50d..592086d4ea 100644 --- a/infrastructures/pom.xml +++ b/infrastructures/pom.xml @@ -17,7 +17,7 @@ che-server org.eclipse.che - 7.68.0-SNAPSHOT + 7.69.0-SNAPSHOT ../pom.xml org.eclipse.che.infrastructure diff --git a/multiuser/api/che-multiuser-api-authentication-commons/pom.xml b/multiuser/api/che-multiuser-api-authentication-commons/pom.xml index b09ed019c0..7439a79fd7 100644 --- a/multiuser/api/che-multiuser-api-authentication-commons/pom.xml +++ b/multiuser/api/che-multiuser-api-authentication-commons/pom.xml @@ -17,7 +17,7 @@ che-multiuser-api org.eclipse.che.multiuser - 7.68.0-SNAPSHOT + 7.69.0-SNAPSHOT che-multiuser-api-authentication-commons jar diff --git a/multiuser/api/che-multiuser-api-authorization-impl/pom.xml b/multiuser/api/che-multiuser-api-authorization-impl/pom.xml index 108b0a3a41..2fb9b3a405 100644 --- a/multiuser/api/che-multiuser-api-authorization-impl/pom.xml +++ b/multiuser/api/che-multiuser-api-authorization-impl/pom.xml @@ -17,7 +17,7 @@ che-multiuser-api org.eclipse.che.multiuser - 7.68.0-SNAPSHOT + 7.69.0-SNAPSHOT che-multiuser-api-authorization-impl jar diff --git a/multiuser/api/che-multiuser-api-authorization/pom.xml b/multiuser/api/che-multiuser-api-authorization/pom.xml index 037afc733a..48d769d176 100644 --- a/multiuser/api/che-multiuser-api-authorization/pom.xml +++ b/multiuser/api/che-multiuser-api-authorization/pom.xml @@ -17,7 +17,7 @@ che-multiuser-api org.eclipse.che.multiuser - 7.68.0-SNAPSHOT + 7.69.0-SNAPSHOT che-multiuser-api-authorization jar diff --git a/multiuser/api/che-multiuser-api-organization-shared/pom.xml b/multiuser/api/che-multiuser-api-organization-shared/pom.xml index 99d1680851..fb6cf413fa 100644 --- a/multiuser/api/che-multiuser-api-organization-shared/pom.xml +++ b/multiuser/api/che-multiuser-api-organization-shared/pom.xml @@ -17,7 +17,7 @@ che-multiuser-api org.eclipse.che.multiuser - 7.68.0-SNAPSHOT + 7.69.0-SNAPSHOT che-multiuser-api-organization-shared jar diff --git a/multiuser/api/che-multiuser-api-organization/pom.xml b/multiuser/api/che-multiuser-api-organization/pom.xml index 147aa39e90..a49e67bc07 100644 --- a/multiuser/api/che-multiuser-api-organization/pom.xml +++ b/multiuser/api/che-multiuser-api-organization/pom.xml @@ -17,7 +17,7 @@ che-multiuser-api org.eclipse.che.multiuser - 7.68.0-SNAPSHOT + 7.69.0-SNAPSHOT che-multiuser-api-organization jar diff --git a/multiuser/api/che-multiuser-api-permission-shared/pom.xml b/multiuser/api/che-multiuser-api-permission-shared/pom.xml index 3cc4a38aef..1fd59299e2 100644 --- a/multiuser/api/che-multiuser-api-permission-shared/pom.xml +++ b/multiuser/api/che-multiuser-api-permission-shared/pom.xml @@ -17,7 +17,7 @@ che-multiuser-api org.eclipse.che.multiuser - 7.68.0-SNAPSHOT + 7.69.0-SNAPSHOT che-multiuser-api-permission-shared jar diff --git a/multiuser/api/che-multiuser-api-permission/pom.xml b/multiuser/api/che-multiuser-api-permission/pom.xml index ab7b36bff4..151845736d 100644 --- a/multiuser/api/che-multiuser-api-permission/pom.xml +++ b/multiuser/api/che-multiuser-api-permission/pom.xml @@ -17,7 +17,7 @@ che-multiuser-api org.eclipse.che.multiuser - 7.68.0-SNAPSHOT + 7.69.0-SNAPSHOT che-multiuser-api-permission jar diff --git a/multiuser/api/che-multiuser-api-resource-shared/pom.xml b/multiuser/api/che-multiuser-api-resource-shared/pom.xml index e31aed0afa..c8fb5e3ef2 100644 --- a/multiuser/api/che-multiuser-api-resource-shared/pom.xml +++ b/multiuser/api/che-multiuser-api-resource-shared/pom.xml @@ -17,7 +17,7 @@ che-multiuser-api org.eclipse.che.multiuser - 7.68.0-SNAPSHOT + 7.69.0-SNAPSHOT che-multiuser-api-resource-shared jar diff --git a/multiuser/api/che-multiuser-api-resource/pom.xml b/multiuser/api/che-multiuser-api-resource/pom.xml index 60ce5c1a58..90e4772330 100644 --- a/multiuser/api/che-multiuser-api-resource/pom.xml +++ b/multiuser/api/che-multiuser-api-resource/pom.xml @@ -17,7 +17,7 @@ che-multiuser-api org.eclipse.che.multiuser - 7.68.0-SNAPSHOT + 7.69.0-SNAPSHOT che-multiuser-api-resource jar diff --git a/multiuser/api/che-multiuser-api-workspace-activity/pom.xml b/multiuser/api/che-multiuser-api-workspace-activity/pom.xml index e95f4b41b7..b34bb5edeb 100644 --- a/multiuser/api/che-multiuser-api-workspace-activity/pom.xml +++ b/multiuser/api/che-multiuser-api-workspace-activity/pom.xml @@ -17,7 +17,7 @@ che-multiuser-api org.eclipse.che.multiuser - 7.68.0-SNAPSHOT + 7.69.0-SNAPSHOT che-multiuser-api-workspace-activity jar diff --git a/multiuser/api/pom.xml b/multiuser/api/pom.xml index a650e99c56..58434a27cd 100644 --- a/multiuser/api/pom.xml +++ b/multiuser/api/pom.xml @@ -17,7 +17,7 @@ che-multiuser-parent org.eclipse.che.multiuser - 7.68.0-SNAPSHOT + 7.69.0-SNAPSHOT ../pom.xml che-multiuser-api diff --git a/multiuser/integration-tests/che-multiuser-cascade-removal/pom.xml b/multiuser/integration-tests/che-multiuser-cascade-removal/pom.xml index 7b6ede72da..0e7e619aab 100644 --- a/multiuser/integration-tests/che-multiuser-cascade-removal/pom.xml +++ b/multiuser/integration-tests/che-multiuser-cascade-removal/pom.xml @@ -17,7 +17,7 @@ che-multiuser-integration-tests org.eclipse.che.multiuser - 7.68.0-SNAPSHOT + 7.69.0-SNAPSHOT che-multiuser-cascade-removal jar diff --git a/multiuser/integration-tests/che-multiuser-mysql-tck/pom.xml b/multiuser/integration-tests/che-multiuser-mysql-tck/pom.xml index 77a84e6f99..c95b426ec7 100644 --- a/multiuser/integration-tests/che-multiuser-mysql-tck/pom.xml +++ b/multiuser/integration-tests/che-multiuser-mysql-tck/pom.xml @@ -17,7 +17,7 @@ che-multiuser-integration-tests org.eclipse.che.multiuser - 7.68.0-SNAPSHOT + 7.69.0-SNAPSHOT che-multiuser-mysql-tck jar diff --git a/multiuser/integration-tests/che-multiuser-postgresql-tck/pom.xml b/multiuser/integration-tests/che-multiuser-postgresql-tck/pom.xml index e2991b077a..c54306fee7 100644 --- a/multiuser/integration-tests/che-multiuser-postgresql-tck/pom.xml +++ b/multiuser/integration-tests/che-multiuser-postgresql-tck/pom.xml @@ -17,7 +17,7 @@ che-multiuser-integration-tests org.eclipse.che.multiuser - 7.68.0-SNAPSHOT + 7.69.0-SNAPSHOT che-multiuser-postgresql-tck jar diff --git a/multiuser/integration-tests/pom.xml b/multiuser/integration-tests/pom.xml index fbdbe0c39a..2a09cd0881 100644 --- a/multiuser/integration-tests/pom.xml +++ b/multiuser/integration-tests/pom.xml @@ -17,7 +17,7 @@ che-multiuser-parent org.eclipse.che.multiuser - 7.68.0-SNAPSHOT + 7.69.0-SNAPSHOT che-multiuser-integration-tests pom diff --git a/multiuser/keycloak/che-multiuser-keycloak-server/pom.xml b/multiuser/keycloak/che-multiuser-keycloak-server/pom.xml index 3d40f1b15f..7260c06896 100644 --- a/multiuser/keycloak/che-multiuser-keycloak-server/pom.xml +++ b/multiuser/keycloak/che-multiuser-keycloak-server/pom.xml @@ -17,7 +17,7 @@ che-multiuser-keycloak org.eclipse.che.multiuser - 7.68.0-SNAPSHOT + 7.69.0-SNAPSHOT che-multiuser-keycloak-server jar diff --git a/multiuser/keycloak/che-multiuser-keycloak-shared/pom.xml b/multiuser/keycloak/che-multiuser-keycloak-shared/pom.xml index 769ec747c9..6a14c54a99 100644 --- a/multiuser/keycloak/che-multiuser-keycloak-shared/pom.xml +++ b/multiuser/keycloak/che-multiuser-keycloak-shared/pom.xml @@ -17,7 +17,7 @@ che-multiuser-keycloak org.eclipse.che.multiuser - 7.68.0-SNAPSHOT + 7.69.0-SNAPSHOT che-multiuser-keycloak-shared jar diff --git a/multiuser/keycloak/che-multiuser-keycloak-token-provider/pom.xml b/multiuser/keycloak/che-multiuser-keycloak-token-provider/pom.xml index 2837af624b..fcc84ed088 100644 --- a/multiuser/keycloak/che-multiuser-keycloak-token-provider/pom.xml +++ b/multiuser/keycloak/che-multiuser-keycloak-token-provider/pom.xml @@ -17,7 +17,7 @@ che-multiuser-keycloak org.eclipse.che.multiuser - 7.68.0-SNAPSHOT + 7.69.0-SNAPSHOT che-multiuser-keycloak-token-provider Che Multiuser :: Keycloak Token Provider diff --git a/multiuser/keycloak/che-multiuser-keycloak-user-remover/pom.xml b/multiuser/keycloak/che-multiuser-keycloak-user-remover/pom.xml index 8de707c00b..f4886aab7c 100644 --- a/multiuser/keycloak/che-multiuser-keycloak-user-remover/pom.xml +++ b/multiuser/keycloak/che-multiuser-keycloak-user-remover/pom.xml @@ -17,7 +17,7 @@ che-multiuser-keycloak org.eclipse.che.multiuser - 7.68.0-SNAPSHOT + 7.69.0-SNAPSHOT che-multiuser-keycloak-user-remover jar diff --git a/multiuser/keycloak/pom.xml b/multiuser/keycloak/pom.xml index 533475c266..0b7c6184b3 100644 --- a/multiuser/keycloak/pom.xml +++ b/multiuser/keycloak/pom.xml @@ -17,7 +17,7 @@ che-multiuser-parent org.eclipse.che.multiuser - 7.68.0-SNAPSHOT + 7.69.0-SNAPSHOT ../pom.xml che-multiuser-keycloak diff --git a/multiuser/machine-auth/che-multiuser-machine-authentication-shared/pom.xml b/multiuser/machine-auth/che-multiuser-machine-authentication-shared/pom.xml index 8e7b74dd95..7839ea079b 100644 --- a/multiuser/machine-auth/che-multiuser-machine-authentication-shared/pom.xml +++ b/multiuser/machine-auth/che-multiuser-machine-authentication-shared/pom.xml @@ -17,7 +17,7 @@ che-multiuser-machine-auth org.eclipse.che.multiuser - 7.68.0-SNAPSHOT + 7.69.0-SNAPSHOT che-multiuser-machine-authentication-shared jar diff --git a/multiuser/machine-auth/che-multiuser-machine-authentication/pom.xml b/multiuser/machine-auth/che-multiuser-machine-authentication/pom.xml index 71f77f5003..97acccf5ff 100644 --- a/multiuser/machine-auth/che-multiuser-machine-authentication/pom.xml +++ b/multiuser/machine-auth/che-multiuser-machine-authentication/pom.xml @@ -17,7 +17,7 @@ che-multiuser-machine-auth org.eclipse.che.multiuser - 7.68.0-SNAPSHOT + 7.69.0-SNAPSHOT che-multiuser-machine-authentication jar diff --git a/multiuser/machine-auth/pom.xml b/multiuser/machine-auth/pom.xml index 17c203cd6f..01cff93305 100644 --- a/multiuser/machine-auth/pom.xml +++ b/multiuser/machine-auth/pom.xml @@ -17,7 +17,7 @@ che-multiuser-parent org.eclipse.che.multiuser - 7.68.0-SNAPSHOT + 7.69.0-SNAPSHOT ../pom.xml che-multiuser-machine-auth diff --git a/multiuser/oidc/pom.xml b/multiuser/oidc/pom.xml index a972d853f2..b606bb2dc3 100644 --- a/multiuser/oidc/pom.xml +++ b/multiuser/oidc/pom.xml @@ -17,7 +17,7 @@ che-multiuser-parent org.eclipse.che.multiuser - 7.68.0-SNAPSHOT + 7.69.0-SNAPSHOT che-multiuser-oidc jar diff --git a/multiuser/permission/che-multiuser-permission-devfile/pom.xml b/multiuser/permission/che-multiuser-permission-devfile/pom.xml index a1da00f2df..9e3ff29ba6 100644 --- a/multiuser/permission/che-multiuser-permission-devfile/pom.xml +++ b/multiuser/permission/che-multiuser-permission-devfile/pom.xml @@ -17,7 +17,7 @@ che-multiuser-permission org.eclipse.che.multiuser - 7.68.0-SNAPSHOT + 7.69.0-SNAPSHOT che-multiuser-permission-devfile Che Multiuser :: Devfile Permissions diff --git a/multiuser/permission/che-multiuser-permission-logger/pom.xml b/multiuser/permission/che-multiuser-permission-logger/pom.xml index a190dd2df6..5188c7d29d 100644 --- a/multiuser/permission/che-multiuser-permission-logger/pom.xml +++ b/multiuser/permission/che-multiuser-permission-logger/pom.xml @@ -17,7 +17,7 @@ che-multiuser-permission org.eclipse.che.multiuser - 7.68.0-SNAPSHOT + 7.69.0-SNAPSHOT che-multiuser-permission-logger Che Multiuser :: Logger Permissions diff --git a/multiuser/permission/che-multiuser-permission-resource/pom.xml b/multiuser/permission/che-multiuser-permission-resource/pom.xml index e9f159e24b..a6ef74c5f4 100644 --- a/multiuser/permission/che-multiuser-permission-resource/pom.xml +++ b/multiuser/permission/che-multiuser-permission-resource/pom.xml @@ -17,7 +17,7 @@ che-multiuser-permission org.eclipse.che.multiuser - 7.68.0-SNAPSHOT + 7.69.0-SNAPSHOT che-multiuser-permission-resource Che Multiuser :: Resource :: Permissions diff --git a/multiuser/permission/che-multiuser-permission-system/pom.xml b/multiuser/permission/che-multiuser-permission-system/pom.xml index 9eb770d2f4..60a05e1c28 100644 --- a/multiuser/permission/che-multiuser-permission-system/pom.xml +++ b/multiuser/permission/che-multiuser-permission-system/pom.xml @@ -17,7 +17,7 @@ che-multiuser-permission org.eclipse.che.multiuser - 7.68.0-SNAPSHOT + 7.69.0-SNAPSHOT che-multiuser-permission-system Che Multiuser :: System Permissions diff --git a/multiuser/permission/che-multiuser-permission-user/pom.xml b/multiuser/permission/che-multiuser-permission-user/pom.xml index adfe766f19..a408166054 100644 --- a/multiuser/permission/che-multiuser-permission-user/pom.xml +++ b/multiuser/permission/che-multiuser-permission-user/pom.xml @@ -17,7 +17,7 @@ che-multiuser-permission org.eclipse.che.multiuser - 7.68.0-SNAPSHOT + 7.69.0-SNAPSHOT che-multiuser-permission-user Che Multiuser :: User Permissions diff --git a/multiuser/permission/che-multiuser-permission-workspace-activity/pom.xml b/multiuser/permission/che-multiuser-permission-workspace-activity/pom.xml index b2f52e86e5..7b62000918 100644 --- a/multiuser/permission/che-multiuser-permission-workspace-activity/pom.xml +++ b/multiuser/permission/che-multiuser-permission-workspace-activity/pom.xml @@ -17,7 +17,7 @@ che-multiuser-permission org.eclipse.che.multiuser - 7.68.0-SNAPSHOT + 7.69.0-SNAPSHOT che-multiuser-permission-workspace-activity Che Multiuser :: Workspace Activity Permissions diff --git a/multiuser/permission/che-multiuser-permission-workspace/pom.xml b/multiuser/permission/che-multiuser-permission-workspace/pom.xml index 04d8a239be..883e9cc0fd 100644 --- a/multiuser/permission/che-multiuser-permission-workspace/pom.xml +++ b/multiuser/permission/che-multiuser-permission-workspace/pom.xml @@ -17,7 +17,7 @@ che-multiuser-permission org.eclipse.che.multiuser - 7.68.0-SNAPSHOT + 7.69.0-SNAPSHOT che-multiuser-permission-workspace Che Multiuser :: Workspace Permissions diff --git a/multiuser/permission/pom.xml b/multiuser/permission/pom.xml index 781cdf7257..718f24980e 100644 --- a/multiuser/permission/pom.xml +++ b/multiuser/permission/pom.xml @@ -17,7 +17,7 @@ che-multiuser-parent org.eclipse.che.multiuser - 7.68.0-SNAPSHOT + 7.69.0-SNAPSHOT ../pom.xml che-multiuser-permission diff --git a/multiuser/personal-account/pom.xml b/multiuser/personal-account/pom.xml index a3fdbd902d..5e8f146d38 100644 --- a/multiuser/personal-account/pom.xml +++ b/multiuser/personal-account/pom.xml @@ -17,7 +17,7 @@ che-multiuser-parent org.eclipse.che.multiuser - 7.68.0-SNAPSHOT + 7.69.0-SNAPSHOT che-multiuser-personal-account jar diff --git a/multiuser/pom.xml b/multiuser/pom.xml index 770fc71b1e..96675655eb 100644 --- a/multiuser/pom.xml +++ b/multiuser/pom.xml @@ -17,7 +17,7 @@ che-server org.eclipse.che - 7.68.0-SNAPSHOT + 7.69.0-SNAPSHOT ../pom.xml org.eclipse.che.multiuser diff --git a/multiuser/sql-schema/pom.xml b/multiuser/sql-schema/pom.xml index 3604836a35..6529f35256 100644 --- a/multiuser/sql-schema/pom.xml +++ b/multiuser/sql-schema/pom.xml @@ -17,7 +17,7 @@ che-multiuser-parent org.eclipse.che.multiuser - 7.68.0-SNAPSHOT + 7.69.0-SNAPSHOT ../pom.xml che-multiuser-sql-schema diff --git a/pom.xml b/pom.xml index 54d15e137f..c8e50a0f4b 100644 --- a/pom.xml +++ b/pom.xml @@ -16,7 +16,7 @@ 4.0.0 org.eclipse.che che-server - 7.68.0-SNAPSHOT + 7.69.0-SNAPSHOT pom Che Server Eclipse Che Server @@ -100,7 +100,7 @@ Red Hat, Inc. - initial API and implementation ${project.version} - 7.68.0-SNAPSHOT + 7.69.0-SNAPSHOT 1.0-beta2 Red Hat, Inc. diff --git a/typescript-dto/dto-pom.xml b/typescript-dto/dto-pom.xml index c521d1a2d0..84220212e5 100644 --- a/typescript-dto/dto-pom.xml +++ b/typescript-dto/dto-pom.xml @@ -23,7 +23,7 @@ pom Che TypeScript DTO - 7.68.0-SNAPSHOT + 7.69.0-SNAPSHOT diff --git a/wsmaster/che-core-api-account/pom.xml b/wsmaster/che-core-api-account/pom.xml index 8c68a8885d..8d63b8fef1 100644 --- a/wsmaster/che-core-api-account/pom.xml +++ b/wsmaster/che-core-api-account/pom.xml @@ -17,7 +17,7 @@ che-master-parent org.eclipse.che.core - 7.68.0-SNAPSHOT + 7.69.0-SNAPSHOT che-core-api-account Che Core :: API :: Account diff --git a/wsmaster/che-core-api-auth-azure-devops/pom.xml b/wsmaster/che-core-api-auth-azure-devops/pom.xml index 2ca4b08a7f..c247555aff 100644 --- a/wsmaster/che-core-api-auth-azure-devops/pom.xml +++ b/wsmaster/che-core-api-auth-azure-devops/pom.xml @@ -17,7 +17,7 @@ che-master-parent org.eclipse.che.core - 7.68.0-SNAPSHOT + 7.69.0-SNAPSHOT che-core-api-auth-azure-devops jar diff --git a/wsmaster/che-core-api-auth-bitbucket/pom.xml b/wsmaster/che-core-api-auth-bitbucket/pom.xml index 73ff5722bb..5bdf7561c8 100644 --- a/wsmaster/che-core-api-auth-bitbucket/pom.xml +++ b/wsmaster/che-core-api-auth-bitbucket/pom.xml @@ -17,7 +17,7 @@ che-master-parent org.eclipse.che.core - 7.68.0-SNAPSHOT + 7.69.0-SNAPSHOT che-core-api-auth-bitbucket jar diff --git a/wsmaster/che-core-api-auth-github/pom.xml b/wsmaster/che-core-api-auth-github/pom.xml index d2aacd8006..21f40c027a 100644 --- a/wsmaster/che-core-api-auth-github/pom.xml +++ b/wsmaster/che-core-api-auth-github/pom.xml @@ -17,7 +17,7 @@ che-master-parent org.eclipse.che.core - 7.68.0-SNAPSHOT + 7.69.0-SNAPSHOT che-core-api-auth-github jar diff --git a/wsmaster/che-core-api-auth-gitlab/pom.xml b/wsmaster/che-core-api-auth-gitlab/pom.xml index 44c910c22c..ffe5981efd 100644 --- a/wsmaster/che-core-api-auth-gitlab/pom.xml +++ b/wsmaster/che-core-api-auth-gitlab/pom.xml @@ -17,7 +17,7 @@ che-master-parent org.eclipse.che.core - 7.68.0-SNAPSHOT + 7.69.0-SNAPSHOT che-core-api-auth-gitlab jar diff --git a/wsmaster/che-core-api-auth-openshift/pom.xml b/wsmaster/che-core-api-auth-openshift/pom.xml index 06290de582..f10401590d 100644 --- a/wsmaster/che-core-api-auth-openshift/pom.xml +++ b/wsmaster/che-core-api-auth-openshift/pom.xml @@ -17,7 +17,7 @@ che-master-parent org.eclipse.che.core - 7.68.0-SNAPSHOT + 7.69.0-SNAPSHOT che-core-api-auth-openshift jar diff --git a/wsmaster/che-core-api-auth-shared/pom.xml b/wsmaster/che-core-api-auth-shared/pom.xml index 2a30b36bfc..ef37b49e3a 100644 --- a/wsmaster/che-core-api-auth-shared/pom.xml +++ b/wsmaster/che-core-api-auth-shared/pom.xml @@ -17,7 +17,7 @@ che-master-parent org.eclipse.che.core - 7.68.0-SNAPSHOT + 7.69.0-SNAPSHOT che-core-api-auth-shared jar diff --git a/wsmaster/che-core-api-auth/pom.xml b/wsmaster/che-core-api-auth/pom.xml index 1cb05d044f..b2d0cbfe5b 100644 --- a/wsmaster/che-core-api-auth/pom.xml +++ b/wsmaster/che-core-api-auth/pom.xml @@ -17,7 +17,7 @@ che-master-parent org.eclipse.che.core - 7.68.0-SNAPSHOT + 7.69.0-SNAPSHOT che-core-api-auth jar diff --git a/wsmaster/che-core-api-devfile-shared/pom.xml b/wsmaster/che-core-api-devfile-shared/pom.xml index 61e5dbbb73..bb5b79a322 100644 --- a/wsmaster/che-core-api-devfile-shared/pom.xml +++ b/wsmaster/che-core-api-devfile-shared/pom.xml @@ -17,7 +17,7 @@ che-master-parent org.eclipse.che.core - 7.68.0-SNAPSHOT + 7.69.0-SNAPSHOT che-core-api-devfile-shared jar diff --git a/wsmaster/che-core-api-devfile/pom.xml b/wsmaster/che-core-api-devfile/pom.xml index 3d3254d8ed..7714f4d80a 100644 --- a/wsmaster/che-core-api-devfile/pom.xml +++ b/wsmaster/che-core-api-devfile/pom.xml @@ -17,7 +17,7 @@ che-master-parent org.eclipse.che.core - 7.68.0-SNAPSHOT + 7.69.0-SNAPSHOT che-core-api-devfile jar diff --git a/wsmaster/che-core-api-factory-azure-devops/pom.xml b/wsmaster/che-core-api-factory-azure-devops/pom.xml index 54fcc75a6a..c9539c841c 100644 --- a/wsmaster/che-core-api-factory-azure-devops/pom.xml +++ b/wsmaster/che-core-api-factory-azure-devops/pom.xml @@ -17,7 +17,7 @@ che-master-parent org.eclipse.che.core - 7.68.0-SNAPSHOT + 7.69.0-SNAPSHOT che-core-api-factory-azure-devops jar diff --git a/wsmaster/che-core-api-factory-bitbucket-server/pom.xml b/wsmaster/che-core-api-factory-bitbucket-server/pom.xml index 0615942ab1..7171653073 100644 --- a/wsmaster/che-core-api-factory-bitbucket-server/pom.xml +++ b/wsmaster/che-core-api-factory-bitbucket-server/pom.xml @@ -17,7 +17,7 @@ che-master-parent org.eclipse.che.core - 7.68.0-SNAPSHOT + 7.69.0-SNAPSHOT che-core-api-factory-bitbucket-server jar diff --git a/wsmaster/che-core-api-factory-bitbucket/pom.xml b/wsmaster/che-core-api-factory-bitbucket/pom.xml index 9c45b872d8..c41f17a625 100644 --- a/wsmaster/che-core-api-factory-bitbucket/pom.xml +++ b/wsmaster/che-core-api-factory-bitbucket/pom.xml @@ -17,7 +17,7 @@ che-master-parent org.eclipse.che.core - 7.68.0-SNAPSHOT + 7.69.0-SNAPSHOT che-core-api-factory-bitbucket jar diff --git a/wsmaster/che-core-api-factory-git-ssh/pom.xml b/wsmaster/che-core-api-factory-git-ssh/pom.xml index 51575a2ff1..8efb50035f 100644 --- a/wsmaster/che-core-api-factory-git-ssh/pom.xml +++ b/wsmaster/che-core-api-factory-git-ssh/pom.xml @@ -17,7 +17,7 @@ che-master-parent org.eclipse.che.core - 7.68.0-SNAPSHOT + 7.69.0-SNAPSHOT che-core-api-factory-git-ssh jar diff --git a/wsmaster/che-core-api-factory-github/pom.xml b/wsmaster/che-core-api-factory-github/pom.xml index 39325422e5..2309a59a1a 100644 --- a/wsmaster/che-core-api-factory-github/pom.xml +++ b/wsmaster/che-core-api-factory-github/pom.xml @@ -17,7 +17,7 @@ che-master-parent org.eclipse.che.core - 7.68.0-SNAPSHOT + 7.69.0-SNAPSHOT che-core-api-factory-github jar diff --git a/wsmaster/che-core-api-factory-gitlab/pom.xml b/wsmaster/che-core-api-factory-gitlab/pom.xml index 8145340cfc..54770c30a4 100644 --- a/wsmaster/che-core-api-factory-gitlab/pom.xml +++ b/wsmaster/che-core-api-factory-gitlab/pom.xml @@ -17,7 +17,7 @@ che-master-parent org.eclipse.che.core - 7.68.0-SNAPSHOT + 7.69.0-SNAPSHOT che-core-api-factory-gitlab jar diff --git a/wsmaster/che-core-api-factory-shared/pom.xml b/wsmaster/che-core-api-factory-shared/pom.xml index 4a283d8232..1c0e516251 100644 --- a/wsmaster/che-core-api-factory-shared/pom.xml +++ b/wsmaster/che-core-api-factory-shared/pom.xml @@ -17,7 +17,7 @@ che-master-parent org.eclipse.che.core - 7.68.0-SNAPSHOT + 7.69.0-SNAPSHOT che-core-api-factory-shared jar diff --git a/wsmaster/che-core-api-factory/pom.xml b/wsmaster/che-core-api-factory/pom.xml index 368a97e004..d8230b6f96 100644 --- a/wsmaster/che-core-api-factory/pom.xml +++ b/wsmaster/che-core-api-factory/pom.xml @@ -17,7 +17,7 @@ che-master-parent org.eclipse.che.core - 7.68.0-SNAPSHOT + 7.69.0-SNAPSHOT che-core-api-factory jar diff --git a/wsmaster/che-core-api-logger-shared/pom.xml b/wsmaster/che-core-api-logger-shared/pom.xml index 43faa4ec27..d61a73af48 100644 --- a/wsmaster/che-core-api-logger-shared/pom.xml +++ b/wsmaster/che-core-api-logger-shared/pom.xml @@ -17,7 +17,7 @@ che-master-parent org.eclipse.che.core - 7.68.0-SNAPSHOT + 7.69.0-SNAPSHOT che-core-api-logger-shared jar diff --git a/wsmaster/che-core-api-logger/pom.xml b/wsmaster/che-core-api-logger/pom.xml index 5f83c98369..f5a57424cb 100644 --- a/wsmaster/che-core-api-logger/pom.xml +++ b/wsmaster/che-core-api-logger/pom.xml @@ -17,7 +17,7 @@ che-master-parent org.eclipse.che.core - 7.68.0-SNAPSHOT + 7.69.0-SNAPSHOT che-core-api-logger jar diff --git a/wsmaster/che-core-api-metrics/pom.xml b/wsmaster/che-core-api-metrics/pom.xml index 1b9209a270..40e07b6e96 100644 --- a/wsmaster/che-core-api-metrics/pom.xml +++ b/wsmaster/che-core-api-metrics/pom.xml @@ -17,7 +17,7 @@ che-master-parent org.eclipse.che.core - 7.68.0-SNAPSHOT + 7.69.0-SNAPSHOT che-core-api-metrics jar diff --git a/wsmaster/che-core-api-ssh-shared/pom.xml b/wsmaster/che-core-api-ssh-shared/pom.xml index 1ac2438082..357f06151b 100644 --- a/wsmaster/che-core-api-ssh-shared/pom.xml +++ b/wsmaster/che-core-api-ssh-shared/pom.xml @@ -17,7 +17,7 @@ che-master-parent org.eclipse.che.core - 7.68.0-SNAPSHOT + 7.69.0-SNAPSHOT che-core-api-ssh-shared jar diff --git a/wsmaster/che-core-api-ssh/pom.xml b/wsmaster/che-core-api-ssh/pom.xml index 5fb4641be2..2ec5d1c02c 100644 --- a/wsmaster/che-core-api-ssh/pom.xml +++ b/wsmaster/che-core-api-ssh/pom.xml @@ -17,7 +17,7 @@ che-master-parent org.eclipse.che.core - 7.68.0-SNAPSHOT + 7.69.0-SNAPSHOT che-core-api-ssh jar diff --git a/wsmaster/che-core-api-system-shared/pom.xml b/wsmaster/che-core-api-system-shared/pom.xml index faa6fe12ad..0d67bee478 100644 --- a/wsmaster/che-core-api-system-shared/pom.xml +++ b/wsmaster/che-core-api-system-shared/pom.xml @@ -17,7 +17,7 @@ che-master-parent org.eclipse.che.core - 7.68.0-SNAPSHOT + 7.69.0-SNAPSHOT che-core-api-system-shared jar diff --git a/wsmaster/che-core-api-system/pom.xml b/wsmaster/che-core-api-system/pom.xml index 1258305230..47b4e67d8f 100644 --- a/wsmaster/che-core-api-system/pom.xml +++ b/wsmaster/che-core-api-system/pom.xml @@ -17,7 +17,7 @@ che-master-parent org.eclipse.che.core - 7.68.0-SNAPSHOT + 7.69.0-SNAPSHOT che-core-api-system jar diff --git a/wsmaster/che-core-api-user-shared/pom.xml b/wsmaster/che-core-api-user-shared/pom.xml index f56c9b2c1c..a565dbfc25 100644 --- a/wsmaster/che-core-api-user-shared/pom.xml +++ b/wsmaster/che-core-api-user-shared/pom.xml @@ -17,7 +17,7 @@ che-master-parent org.eclipse.che.core - 7.68.0-SNAPSHOT + 7.69.0-SNAPSHOT che-core-api-user-shared Che Core :: API :: User :: Shared diff --git a/wsmaster/che-core-api-user/pom.xml b/wsmaster/che-core-api-user/pom.xml index fca9820f4d..f745bb7bb3 100644 --- a/wsmaster/che-core-api-user/pom.xml +++ b/wsmaster/che-core-api-user/pom.xml @@ -17,7 +17,7 @@ che-master-parent org.eclipse.che.core - 7.68.0-SNAPSHOT + 7.69.0-SNAPSHOT che-core-api-user Che Core :: API :: User diff --git a/wsmaster/che-core-api-workspace-activity/pom.xml b/wsmaster/che-core-api-workspace-activity/pom.xml index fb103e25d5..8664d938b2 100644 --- a/wsmaster/che-core-api-workspace-activity/pom.xml +++ b/wsmaster/che-core-api-workspace-activity/pom.xml @@ -17,7 +17,7 @@ che-master-parent org.eclipse.che.core - 7.68.0-SNAPSHOT + 7.69.0-SNAPSHOT che-core-api-workspace-activity jar diff --git a/wsmaster/che-core-api-workspace-shared/pom.xml b/wsmaster/che-core-api-workspace-shared/pom.xml index 19d3f73918..a1fcc6daa3 100644 --- a/wsmaster/che-core-api-workspace-shared/pom.xml +++ b/wsmaster/che-core-api-workspace-shared/pom.xml @@ -17,7 +17,7 @@ che-master-parent org.eclipse.che.core - 7.68.0-SNAPSHOT + 7.69.0-SNAPSHOT che-core-api-workspace-shared jar diff --git a/wsmaster/che-core-api-workspace/pom.xml b/wsmaster/che-core-api-workspace/pom.xml index 30fb2ea10b..5e121bab63 100644 --- a/wsmaster/che-core-api-workspace/pom.xml +++ b/wsmaster/che-core-api-workspace/pom.xml @@ -17,7 +17,7 @@ che-master-parent org.eclipse.che.core - 7.68.0-SNAPSHOT + 7.69.0-SNAPSHOT che-core-api-workspace jar diff --git a/wsmaster/che-core-sql-schema/pom.xml b/wsmaster/che-core-sql-schema/pom.xml index 0abc322206..c161b35b9c 100644 --- a/wsmaster/che-core-sql-schema/pom.xml +++ b/wsmaster/che-core-sql-schema/pom.xml @@ -17,7 +17,7 @@ che-master-parent org.eclipse.che.core - 7.68.0-SNAPSHOT + 7.69.0-SNAPSHOT che-core-sql-schema Che Core :: SQL :: Schema diff --git a/wsmaster/integration-tests/cascade-removal/pom.xml b/wsmaster/integration-tests/cascade-removal/pom.xml index 691dd00a30..05b9c4a932 100644 --- a/wsmaster/integration-tests/cascade-removal/pom.xml +++ b/wsmaster/integration-tests/cascade-removal/pom.xml @@ -17,7 +17,7 @@ integration-tests-parent org.eclipse.che.core - 7.68.0-SNAPSHOT + 7.69.0-SNAPSHOT cascade-removal Integration Tests :: Cascade Removal diff --git a/wsmaster/integration-tests/mysql-tck/pom.xml b/wsmaster/integration-tests/mysql-tck/pom.xml index d4646ddc94..578959d1ed 100644 --- a/wsmaster/integration-tests/mysql-tck/pom.xml +++ b/wsmaster/integration-tests/mysql-tck/pom.xml @@ -17,7 +17,7 @@ integration-tests-parent org.eclipse.che.core - 7.68.0-SNAPSHOT + 7.69.0-SNAPSHOT mysql-tck jar diff --git a/wsmaster/integration-tests/pom.xml b/wsmaster/integration-tests/pom.xml index 3a5a460674..1aeccd46af 100644 --- a/wsmaster/integration-tests/pom.xml +++ b/wsmaster/integration-tests/pom.xml @@ -17,7 +17,7 @@ che-master-parent org.eclipse.che.core - 7.68.0-SNAPSHOT + 7.69.0-SNAPSHOT ../pom.xml integration-tests-parent diff --git a/wsmaster/integration-tests/postgresql-tck/pom.xml b/wsmaster/integration-tests/postgresql-tck/pom.xml index 35d3b5c0dc..342a581850 100644 --- a/wsmaster/integration-tests/postgresql-tck/pom.xml +++ b/wsmaster/integration-tests/postgresql-tck/pom.xml @@ -17,7 +17,7 @@ integration-tests-parent org.eclipse.che.core - 7.68.0-SNAPSHOT + 7.69.0-SNAPSHOT postgresql-tck jar diff --git a/wsmaster/pom.xml b/wsmaster/pom.xml index e6d0ad9811..0b2b3d16c2 100644 --- a/wsmaster/pom.xml +++ b/wsmaster/pom.xml @@ -17,7 +17,7 @@ che-core-parent org.eclipse.che.core - 7.68.0-SNAPSHOT + 7.69.0-SNAPSHOT ../core/pom.xml che-master-parent From 32c67ed03297b3b1588933188b98b947793edb24 Mon Sep 17 00:00:00 2001 From: Igor Vinokur Date: Tue, 6 Jun 2023 10:38:03 +0300 Subject: [PATCH 23/75] Return the default resolver if the factory URL refers directly to a devfile (#519) Check if the factory URL is a raw devfile URL. If so, use the devfile URL resolver, which resolves factories from a direct URL to a devfile content. --- .../AzureDevOpsFactoryParametersResolver.java | 4 +- ...rAuthorizingFactoryParametersResolver.java | 4 +- .../BitbucketFactoryParametersResolver.java | 4 +- .../ssh/GitSshFactoryParametersResolver.java | 4 +- .../GithubFactoryParametersResolver.java | 4 +- .../GitlabFactoryParametersResolver.java | 4 +- .../api/factory/server/FactoryService.java | 14 +++--- ...awDevfileUrlFactoryParameterResolver.java} | 16 ++++--- .../factory/server/FactoryServiceTest.java | 29 +++++++++-- ...vfileUrlFactoryParameterResolverTest.java} | 48 ++++++++++++++++--- 10 files changed, 94 insertions(+), 37 deletions(-) rename wsmaster/che-core-api-factory/src/main/java/org/eclipse/che/api/factory/server/{DefaultFactoryParameterResolver.java => RawDevfileUrlFactoryParameterResolver.java} (88%) rename wsmaster/che-core-api-factory/src/test/java/org/eclipse/che/api/factory/server/{DefaultFactoryParameterResolverTest.java => RawDevfileUrlFactoryParameterResolverTest.java} (80%) diff --git a/wsmaster/che-core-api-factory-azure-devops/src/main/java/org/eclipse/che/api/factory/server/azure/devops/AzureDevOpsFactoryParametersResolver.java b/wsmaster/che-core-api-factory-azure-devops/src/main/java/org/eclipse/che/api/factory/server/azure/devops/AzureDevOpsFactoryParametersResolver.java index 2e42153b6f..065beb994c 100644 --- a/wsmaster/che-core-api-factory-azure-devops/src/main/java/org/eclipse/che/api/factory/server/azure/devops/AzureDevOpsFactoryParametersResolver.java +++ b/wsmaster/che-core-api-factory-azure-devops/src/main/java/org/eclipse/che/api/factory/server/azure/devops/AzureDevOpsFactoryParametersResolver.java @@ -23,7 +23,7 @@ import java.util.Map; import javax.inject.Inject; import javax.inject.Singleton; import org.eclipse.che.api.core.ApiException; -import org.eclipse.che.api.factory.server.DefaultFactoryParameterResolver; +import org.eclipse.che.api.factory.server.RawDevfileUrlFactoryParameterResolver; import org.eclipse.che.api.factory.server.scm.PersonalAccessTokenManager; import org.eclipse.che.api.factory.server.urlfactory.ProjectConfigDtoMerger; import org.eclipse.che.api.factory.server.urlfactory.RemoteFactoryUrl; @@ -45,7 +45,7 @@ import org.eclipse.che.api.workspace.shared.dto.devfile.SourceDto; * @author Anatolii Bazko */ @Singleton -public class AzureDevOpsFactoryParametersResolver extends DefaultFactoryParameterResolver { +public class AzureDevOpsFactoryParametersResolver extends RawDevfileUrlFactoryParameterResolver { /** Parser which will allow to check validity of URLs and create objects. */ private final AzureDevOpsURLParser azureDevOpsURLParser; diff --git a/wsmaster/che-core-api-factory-bitbucket-server/src/main/java/org/eclipse/che/api/factory/server/bitbucket/BitbucketServerAuthorizingFactoryParametersResolver.java b/wsmaster/che-core-api-factory-bitbucket-server/src/main/java/org/eclipse/che/api/factory/server/bitbucket/BitbucketServerAuthorizingFactoryParametersResolver.java index 1ac5e07e08..b055d51d70 100644 --- a/wsmaster/che-core-api-factory-bitbucket-server/src/main/java/org/eclipse/che/api/factory/server/bitbucket/BitbucketServerAuthorizingFactoryParametersResolver.java +++ b/wsmaster/che-core-api-factory-bitbucket-server/src/main/java/org/eclipse/che/api/factory/server/bitbucket/BitbucketServerAuthorizingFactoryParametersResolver.java @@ -22,7 +22,7 @@ import javax.inject.Inject; import javax.inject.Singleton; import org.eclipse.che.api.core.ApiException; import org.eclipse.che.api.core.BadRequestException; -import org.eclipse.che.api.factory.server.DefaultFactoryParameterResolver; +import org.eclipse.che.api.factory.server.RawDevfileUrlFactoryParameterResolver; import org.eclipse.che.api.factory.server.scm.PersonalAccessTokenManager; import org.eclipse.che.api.factory.server.urlfactory.RemoteFactoryUrl; import org.eclipse.che.api.factory.server.urlfactory.URLFactoryBuilder; @@ -43,7 +43,7 @@ import org.eclipse.che.api.workspace.shared.dto.devfile.SourceDto; */ @Singleton public class BitbucketServerAuthorizingFactoryParametersResolver - extends DefaultFactoryParameterResolver { + extends RawDevfileUrlFactoryParameterResolver { /** Parser which will allow to check validity of URLs and create objects. */ private final BitbucketServerURLParser bitbucketURLParser; diff --git a/wsmaster/che-core-api-factory-bitbucket/src/main/java/org/eclipse/che/api/factory/server/bitbucket/BitbucketFactoryParametersResolver.java b/wsmaster/che-core-api-factory-bitbucket/src/main/java/org/eclipse/che/api/factory/server/bitbucket/BitbucketFactoryParametersResolver.java index 0a257d3d94..75631a9624 100644 --- a/wsmaster/che-core-api-factory-bitbucket/src/main/java/org/eclipse/che/api/factory/server/bitbucket/BitbucketFactoryParametersResolver.java +++ b/wsmaster/che-core-api-factory-bitbucket/src/main/java/org/eclipse/che/api/factory/server/bitbucket/BitbucketFactoryParametersResolver.java @@ -22,7 +22,7 @@ import javax.inject.Inject; import javax.inject.Singleton; import org.eclipse.che.api.core.ApiException; import org.eclipse.che.api.core.BadRequestException; -import org.eclipse.che.api.factory.server.DefaultFactoryParameterResolver; +import org.eclipse.che.api.factory.server.RawDevfileUrlFactoryParameterResolver; import org.eclipse.che.api.factory.server.scm.PersonalAccessTokenManager; import org.eclipse.che.api.factory.server.urlfactory.ProjectConfigDtoMerger; import org.eclipse.che.api.factory.server.urlfactory.RemoteFactoryUrl; @@ -38,7 +38,7 @@ import org.eclipse.che.api.workspace.shared.dto.devfile.ProjectDto; /** Provides Factory Parameters resolver for bitbucket repositories. */ @Singleton -public class BitbucketFactoryParametersResolver extends DefaultFactoryParameterResolver { +public class BitbucketFactoryParametersResolver extends RawDevfileUrlFactoryParameterResolver { /** Parser which will allow to check validity of URLs and create objects. */ private final BitbucketURLParser bitbucketURLParser; diff --git a/wsmaster/che-core-api-factory-git-ssh/src/main/java/org/eclipse/che/api/factory/server/git/ssh/GitSshFactoryParametersResolver.java b/wsmaster/che-core-api-factory-git-ssh/src/main/java/org/eclipse/che/api/factory/server/git/ssh/GitSshFactoryParametersResolver.java index 6feafe86c2..0d5add093e 100644 --- a/wsmaster/che-core-api-factory-git-ssh/src/main/java/org/eclipse/che/api/factory/server/git/ssh/GitSshFactoryParametersResolver.java +++ b/wsmaster/che-core-api-factory-git-ssh/src/main/java/org/eclipse/che/api/factory/server/git/ssh/GitSshFactoryParametersResolver.java @@ -20,7 +20,7 @@ import java.util.Map; import javax.inject.Inject; import javax.inject.Singleton; import org.eclipse.che.api.core.ApiException; -import org.eclipse.che.api.factory.server.DefaultFactoryParameterResolver; +import org.eclipse.che.api.factory.server.RawDevfileUrlFactoryParameterResolver; import org.eclipse.che.api.factory.server.scm.PersonalAccessTokenManager; import org.eclipse.che.api.factory.server.urlfactory.RemoteFactoryUrl; import org.eclipse.che.api.factory.server.urlfactory.URLFactoryBuilder; @@ -39,7 +39,7 @@ import org.eclipse.che.api.workspace.shared.dto.devfile.SourceDto; * @author Anatolii Bazko */ @Singleton -public class GitSshFactoryParametersResolver extends DefaultFactoryParameterResolver { +public class GitSshFactoryParametersResolver extends RawDevfileUrlFactoryParameterResolver { private final GitSshURLParser gitSshURLParser; diff --git a/wsmaster/che-core-api-factory-github/src/main/java/org/eclipse/che/api/factory/server/github/GithubFactoryParametersResolver.java b/wsmaster/che-core-api-factory-github/src/main/java/org/eclipse/che/api/factory/server/github/GithubFactoryParametersResolver.java index 6ce477d4a2..477e8ce542 100644 --- a/wsmaster/che-core-api-factory-github/src/main/java/org/eclipse/che/api/factory/server/github/GithubFactoryParametersResolver.java +++ b/wsmaster/che-core-api-factory-github/src/main/java/org/eclipse/che/api/factory/server/github/GithubFactoryParametersResolver.java @@ -23,7 +23,7 @@ import javax.inject.Named; import javax.inject.Singleton; import org.eclipse.che.api.core.ApiException; import org.eclipse.che.api.core.BadRequestException; -import org.eclipse.che.api.factory.server.DefaultFactoryParameterResolver; +import org.eclipse.che.api.factory.server.RawDevfileUrlFactoryParameterResolver; import org.eclipse.che.api.factory.server.scm.PersonalAccessTokenManager; import org.eclipse.che.api.factory.server.urlfactory.ProjectConfigDtoMerger; import org.eclipse.che.api.factory.server.urlfactory.RemoteFactoryUrl; @@ -44,7 +44,7 @@ import org.eclipse.che.commons.annotation.Nullable; * @author Florent Benoit */ @Singleton -public class GithubFactoryParametersResolver extends DefaultFactoryParameterResolver { +public class GithubFactoryParametersResolver extends RawDevfileUrlFactoryParameterResolver { /** Parser which will allow to check validity of URLs and create objects. */ private final GithubURLParser githubUrlParser; diff --git a/wsmaster/che-core-api-factory-gitlab/src/main/java/org/eclipse/che/api/factory/server/gitlab/GitlabFactoryParametersResolver.java b/wsmaster/che-core-api-factory-gitlab/src/main/java/org/eclipse/che/api/factory/server/gitlab/GitlabFactoryParametersResolver.java index bc0123e230..c420da0ea9 100644 --- a/wsmaster/che-core-api-factory-gitlab/src/main/java/org/eclipse/che/api/factory/server/gitlab/GitlabFactoryParametersResolver.java +++ b/wsmaster/che-core-api-factory-gitlab/src/main/java/org/eclipse/che/api/factory/server/gitlab/GitlabFactoryParametersResolver.java @@ -22,7 +22,7 @@ import javax.inject.Inject; import javax.inject.Singleton; import org.eclipse.che.api.core.ApiException; import org.eclipse.che.api.core.BadRequestException; -import org.eclipse.che.api.factory.server.DefaultFactoryParameterResolver; +import org.eclipse.che.api.factory.server.RawDevfileUrlFactoryParameterResolver; import org.eclipse.che.api.factory.server.scm.PersonalAccessTokenManager; import org.eclipse.che.api.factory.server.urlfactory.RemoteFactoryUrl; import org.eclipse.che.api.factory.server.urlfactory.URLFactoryBuilder; @@ -41,7 +41,7 @@ import org.eclipse.che.api.workspace.shared.dto.devfile.SourceDto; * @author Max Shaposhnyk */ @Singleton -public class GitlabFactoryParametersResolver extends DefaultFactoryParameterResolver { +public class GitlabFactoryParametersResolver extends RawDevfileUrlFactoryParameterResolver { private final GitlabUrlParser gitlabURLParser; private final PersonalAccessTokenManager personalAccessTokenManager; diff --git a/wsmaster/che-core-api-factory/src/main/java/org/eclipse/che/api/factory/server/FactoryService.java b/wsmaster/che-core-api-factory/src/main/java/org/eclipse/che/api/factory/server/FactoryService.java index e721a51c36..580e42f4af 100644 --- a/wsmaster/che-core-api-factory/src/main/java/org/eclipse/che/api/factory/server/FactoryService.java +++ b/wsmaster/che-core-api-factory/src/main/java/org/eclipse/che/api/factory/server/FactoryService.java @@ -175,7 +175,7 @@ public class FactoryService extends Service { @SuppressWarnings("unused") private Set specificFactoryParametersResolvers; - @Inject private DefaultFactoryParameterResolver defaultFactoryResolver; + @Inject private RawDevfileUrlFactoryParameterResolver defaultFactoryResolver; /** * Provides a suitable resolver for the given parameters. If there is no at least one resolver @@ -185,6 +185,11 @@ public class FactoryService extends Service { */ public FactoryParametersResolver getFactoryParametersResolver(Map parameters) throws BadRequestException { + // Check if the URL is a raw devfile URL. If so, use the default resolver, + // which resolves factories from a direct URL to a devfile content. + if (defaultFactoryResolver.accept(parameters)) { + return defaultFactoryResolver; + } for (FactoryParametersResolver factoryParametersResolver : specificFactoryParametersResolvers) { try { @@ -195,12 +200,7 @@ public class FactoryService extends Service { // ignore and try next resolver } } - - if (defaultFactoryResolver.accept(parameters)) { - return defaultFactoryResolver; - } else { - throw new BadRequestException(FACTORY_NOT_RESOLVABLE); - } + throw new BadRequestException(FACTORY_NOT_RESOLVABLE); } } diff --git a/wsmaster/che-core-api-factory/src/main/java/org/eclipse/che/api/factory/server/DefaultFactoryParameterResolver.java b/wsmaster/che-core-api-factory/src/main/java/org/eclipse/che/api/factory/server/RawDevfileUrlFactoryParameterResolver.java similarity index 88% rename from wsmaster/che-core-api-factory/src/main/java/org/eclipse/che/api/factory/server/DefaultFactoryParameterResolver.java rename to wsmaster/che-core-api-factory/src/main/java/org/eclipse/che/api/factory/server/RawDevfileUrlFactoryParameterResolver.java index 58ab9a85c8..9f65640a21 100644 --- a/wsmaster/che-core-api-factory/src/main/java/org/eclipse/che/api/factory/server/DefaultFactoryParameterResolver.java +++ b/wsmaster/che-core-api-factory/src/main/java/org/eclipse/che/api/factory/server/RawDevfileUrlFactoryParameterResolver.java @@ -11,6 +11,7 @@ */ package org.eclipse.che.api.factory.server; +import static com.google.common.base.Strings.isNullOrEmpty; import static java.lang.String.format; import static java.util.stream.Collectors.toMap; import static org.eclipse.che.api.factory.shared.Constants.URL_PARAMETER_NAME; @@ -31,6 +32,7 @@ import javax.inject.Singleton; import org.eclipse.che.api.core.ApiException; import org.eclipse.che.api.core.BadRequestException; import org.eclipse.che.api.factory.server.urlfactory.DefaultFactoryUrl; +import org.eclipse.che.api.factory.server.urlfactory.DevfileFilenamesProvider; import org.eclipse.che.api.factory.server.urlfactory.RemoteFactoryUrl; import org.eclipse.che.api.factory.server.urlfactory.URLFactoryBuilder; import org.eclipse.che.api.factory.shared.dto.FactoryMetaDto; @@ -40,20 +42,20 @@ import org.eclipse.che.api.workspace.shared.dto.devfile.DevfileDto; import org.eclipse.che.api.workspace.shared.dto.devfile.ProjectDto; /** - * Default {@link FactoryParametersResolver} implementation. Tries to resolve factory based on - * provided parameters. Presumes url parameter as direct URL to a devfile content. Extracts and - * applies devfile values override parameters. + * {@link FactoryParametersResolver} implementation to resolve factory based on url parameter as a + * direct URL to a devfile content. Extracts and applies devfile values override parameters. */ @Singleton -public class DefaultFactoryParameterResolver implements FactoryParametersResolver { +public class RawDevfileUrlFactoryParameterResolver implements FactoryParametersResolver { private static final String OVERRIDE_PREFIX = "override."; protected final URLFactoryBuilder urlFactoryBuilder; protected final URLFetcher urlFetcher; + @Inject private DevfileFilenamesProvider devfileFilenamesProvider; @Inject - public DefaultFactoryParameterResolver( + public RawDevfileUrlFactoryParameterResolver( URLFactoryBuilder urlFactoryBuilder, URLFetcher urlFetcher) { this.urlFactoryBuilder = urlFactoryBuilder; this.urlFetcher = urlFetcher; @@ -69,7 +71,9 @@ public class DefaultFactoryParameterResolver implements FactoryParametersResolve @Override public boolean accept(Map factoryParameters) { String url = factoryParameters.get(URL_PARAMETER_NAME); - return url != null && !url.isEmpty(); + return !isNullOrEmpty(url) + && devfileFilenamesProvider.getConfiguredDevfileFilenames().stream() + .anyMatch(url::endsWith); } /** diff --git a/wsmaster/che-core-api-factory/src/test/java/org/eclipse/che/api/factory/server/FactoryServiceTest.java b/wsmaster/che-core-api-factory/src/test/java/org/eclipse/che/api/factory/server/FactoryServiceTest.java index f1b1644ab3..77157764af 100644 --- a/wsmaster/che-core-api-factory/src/test/java/org/eclipse/che/api/factory/server/FactoryServiceTest.java +++ b/wsmaster/che-core-api-factory/src/test/java/org/eclipse/che/api/factory/server/FactoryServiceTest.java @@ -17,6 +17,7 @@ import static java.lang.String.valueOf; import static java.util.Collections.singletonMap; import static org.eclipse.che.api.factory.server.FactoryService.VALIDATE_QUERY_PARAMETER; import static org.eclipse.che.api.factory.shared.Constants.CURRENT_VERSION; +import static org.eclipse.che.api.factory.shared.Constants.URL_PARAMETER_NAME; import static org.eclipse.che.dto.server.DtoFactory.newDto; import static org.everrest.assured.JettyHttpServer.ADMIN_USER_NAME; import static org.everrest.assured.JettyHttpServer.ADMIN_USER_PASSWORD; @@ -106,7 +107,7 @@ public class FactoryServiceTest { @Mock private PreferenceManager preferenceManager; @Mock private UserManager userManager; @Mock private AdditionalFilenamesProvider additionalFilenamesProvider; - @Mock private DefaultFactoryParameterResolver defaultFactoryParameterResolver; + @Mock private RawDevfileUrlFactoryParameterResolver rawDevfileUrlFactoryParameterResolver; @Mock private PersonalAccessTokenManager personalAccessTokenManager; @InjectMocks private FactoryParametersResolverHolder factoryParametersResolverHolder; @@ -152,7 +153,7 @@ public class FactoryServiceTest { @Test public void shouldThrowBadRequestWhenNoURLParameterGiven() throws Exception { final FactoryParametersResolverHolder dummyHolder = spy(factoryParametersResolverHolder); - doReturn(defaultFactoryParameterResolver) + doReturn(rawDevfileUrlFactoryParameterResolver) .when(dummyHolder) .getFactoryParametersResolver(anyMap()); // service instance with dummy holder @@ -179,7 +180,7 @@ public class FactoryServiceTest { @Test public void checkValidateResolver() throws Exception { final FactoryParametersResolverHolder dummyHolder = spy(factoryParametersResolverHolder); - doReturn(defaultFactoryParameterResolver) + doReturn(rawDevfileUrlFactoryParameterResolver) .when(dummyHolder) .getFactoryParametersResolver(anyMap()); // service instance with dummy holder @@ -198,7 +199,7 @@ public class FactoryServiceTest { newDto(FactoryDto.class).withV(CURRENT_VERSION).withName("matchingResolverFactory"); // accept resolver - when(defaultFactoryParameterResolver.createFactory(anyMap())).thenReturn(expectFactory); + when(rawDevfileUrlFactoryParameterResolver.createFactory(anyMap())).thenReturn(expectFactory); // when final Map map = new HashMap<>(); @@ -216,7 +217,7 @@ public class FactoryServiceTest { // check we call resolvers dummyHolder.getFactoryParametersResolver(anyMap()); - verify(defaultFactoryParameterResolver).createFactory(anyMap()); + verify(rawDevfileUrlFactoryParameterResolver).createFactory(anyMap()); // check we call validator verify(acceptValidator).validateOnAccept(any()); @@ -265,6 +266,24 @@ public class FactoryServiceTest { "Factory url required"); } + @Test + public void shouldReturnDefaultFactoryParameterResolver() throws Exception { + // given + Map params = singletonMap(URL_PARAMETER_NAME, "https://host/path/devfile.yaml"); + when(rawDevfileUrlFactoryParameterResolver.accept(eq(params))).thenReturn(true); + + // when + FactoryParametersResolver factoryParametersResolver = + factoryParametersResolverHolder.getFactoryParametersResolver(params); + + // then + assertTrue( + factoryParametersResolver + .getClass() + .getName() + .startsWith(RawDevfileUrlFactoryParameterResolver.class.getName())); + } + private FactoryImpl createFactory() { return createNamedFactory(FACTORY_NAME); } diff --git a/wsmaster/che-core-api-factory/src/test/java/org/eclipse/che/api/factory/server/DefaultFactoryParameterResolverTest.java b/wsmaster/che-core-api-factory/src/test/java/org/eclipse/che/api/factory/server/RawDevfileUrlFactoryParameterResolverTest.java similarity index 80% rename from wsmaster/che-core-api-factory/src/test/java/org/eclipse/che/api/factory/server/DefaultFactoryParameterResolverTest.java rename to wsmaster/che-core-api-factory/src/test/java/org/eclipse/che/api/factory/server/RawDevfileUrlFactoryParameterResolverTest.java index 942f1a8ce9..800353220b 100644 --- a/wsmaster/che-core-api-factory/src/test/java/org/eclipse/che/api/factory/server/DefaultFactoryParameterResolverTest.java +++ b/wsmaster/che-core-api-factory/src/test/java/org/eclipse/che/api/factory/server/RawDevfileUrlFactoryParameterResolverTest.java @@ -26,10 +26,14 @@ import static org.mockito.Mockito.verify; import static org.testng.Assert.assertFalse; import static org.testng.Assert.fail; import static org.testng.AssertJUnit.assertEquals; +import static org.testng.AssertJUnit.assertTrue; +import java.lang.reflect.Field; +import java.util.Collections; import java.util.HashMap; import java.util.Map; import org.eclipse.che.api.core.BadRequestException; +import org.eclipse.che.api.factory.server.urlfactory.DevfileFilenamesProvider; import org.eclipse.che.api.factory.server.urlfactory.RemoteFactoryUrl; import org.eclipse.che.api.factory.server.urlfactory.URLFactoryBuilder; import org.eclipse.che.api.workspace.server.devfile.DevfileParser; @@ -42,6 +46,7 @@ import org.eclipse.che.api.workspace.server.devfile.validator.ComponentIntegrity import org.eclipse.che.api.workspace.server.devfile.validator.DevfileIntegrityValidator; import org.eclipse.che.api.workspace.server.devfile.validator.DevfileSchemaValidator; import org.mockito.ArgumentCaptor; +import org.mockito.InjectMocks; import org.mockito.Mock; import org.mockito.testng.MockitoTestNGListener; import org.testng.annotations.DataProvider; @@ -49,7 +54,7 @@ import org.testng.annotations.Listeners; import org.testng.annotations.Test; @Listeners(value = {MockitoTestNGListener.class}) -public class DefaultFactoryParameterResolverTest { +public class RawDevfileUrlFactoryParameterResolverTest { private static final String DEVFILE = "" @@ -62,6 +67,10 @@ public class DefaultFactoryParameterResolverTest { + " reference: ../localfile\n"; @Mock private URLFetcher urlFetcher; + private final DevfileFilenamesProvider devfileFilenamesProvider = + new DevfileFilenamesProvider("devfile.yaml, .devfile.yaml"); + + @InjectMocks private RawDevfileUrlFactoryParameterResolver rawDevfileUrlFactoryParameterResolver; @Test public void shouldResolveRelativeFiles() throws Exception { @@ -85,8 +94,8 @@ public class DefaultFactoryParameterResolverTest { new URLFactoryBuilder( "editor", "plugin", false, devfileParser, new DevfileVersionDetector()); - DefaultFactoryParameterResolver res = - new DefaultFactoryParameterResolver(factoryBuilder, urlFetcher); + RawDevfileUrlFactoryParameterResolver res = + new RawDevfileUrlFactoryParameterResolver(factoryBuilder, urlFetcher); // set up our factory with the location of our devfile that is referencing our localfile Map factoryParameters = new HashMap<>(); @@ -107,8 +116,8 @@ public class DefaultFactoryParameterResolverTest { URLFactoryBuilder urlFactoryBuilder = mock(URLFactoryBuilder.class); URLFetcher urlFetcher = mock(URLFetcher.class); - DefaultFactoryParameterResolver res = - new DefaultFactoryParameterResolver(urlFactoryBuilder, urlFetcher); + RawDevfileUrlFactoryParameterResolver res = + new RawDevfileUrlFactoryParameterResolver(urlFactoryBuilder, urlFetcher); Map factoryParameters = new HashMap<>(); factoryParameters.put(URL_PARAMETER_NAME, "http://myloc/devfile"); @@ -138,8 +147,8 @@ public class DefaultFactoryParameterResolverTest { URLFactoryBuilder urlFactoryBuilder = mock(URLFactoryBuilder.class); URLFetcher urlFetcher = mock(URLFetcher.class); - DefaultFactoryParameterResolver res = - new DefaultFactoryParameterResolver(urlFactoryBuilder, urlFetcher); + RawDevfileUrlFactoryParameterResolver res = + new RawDevfileUrlFactoryParameterResolver(urlFactoryBuilder, urlFetcher); Map factoryParameters = new HashMap<>(); factoryParameters.put(URL_PARAMETER_NAME, url); @@ -157,6 +166,26 @@ public class DefaultFactoryParameterResolverTest { } } + @Test(dataProvider = "devfileNames") + public void shouldAcceptRawDevfileUrl(String devfileName) + throws NoSuchFieldException, IllegalAccessException { + // given + Field field = + rawDevfileUrlFactoryParameterResolver + .getClass() + .getDeclaredField("devfileFilenamesProvider"); + field.setAccessible(true); + field.set(rawDevfileUrlFactoryParameterResolver, devfileFilenamesProvider); + + // when + boolean result = + rawDevfileUrlFactoryParameterResolver.accept( + Collections.singletonMap(URL_PARAMETER_NAME, "https://host/path/" + devfileName)); + + // then + assertTrue(result); + } + @DataProvider(name = "invalidURLsProvider") private Object[][] invalidUrlsProvider() { return new Object[][] { @@ -168,4 +197,9 @@ public class DefaultFactoryParameterResolverTest { {"unknown:///abc.dce", "unknown protocol: unknown"} }; } + + @DataProvider(name = "devfileNames") + private Object[] devfileNames() { + return new String[] {"devfile.yaml", ".devfile.yaml"}; + } } From 98c2cc79eb99ec4d2f679fc09d2d2649b50d1895 Mon Sep 17 00:00:00 2001 From: Igor Vinokur Date: Wed, 7 Jun 2023 13:11:46 +0300 Subject: [PATCH 24/75] Update devfile to version 2, add extensions.json (#520) --- .vscode/extensions.json | 9 +++++++++ devfile.yaml | 36 +++++++++++++++++++----------------- 2 files changed, 28 insertions(+), 17 deletions(-) create mode 100644 .vscode/extensions.json diff --git a/.vscode/extensions.json b/.vscode/extensions.json new file mode 100644 index 0000000000..0870d8abfc --- /dev/null +++ b/.vscode/extensions.json @@ -0,0 +1,9 @@ +{ + "recommendations": [ + "redhat.java", + "redhat.fabric8-analytics", + "vscjava.vscode-maven", + "vscjava.vscode-java-debug", + "vscjava.vscode-java-test" + ] +} diff --git a/devfile.yaml b/devfile.yaml index a03f6884f2..c4b5b938ee 100644 --- a/devfile.yaml +++ b/devfile.yaml @@ -1,21 +1,23 @@ -apiVersion: 1.0.0 +schemaVersion: 2.1.0 metadata: name: che-server-in-che components: - - type: dockerimage - image: quay.io/eclipse/che-java11-maven:nightly - alias: maven - mountSources: true - memoryLimit: 2Gi - volumes: - - name: m2 - containerPath: /home/user/.m2 - - type: chePlugin - id: redhat/java11/latest + - container: + image: quay.io/devfile/universal-developer-image:ubi8-latest + memoryLimit: 8Gi + mountSources: true + volumeMounts: + - name: m2 + path: /home/user/.m2 + name: tools + - name: m2 + volume: {} commands: - - name: build without tests - actions: - - type: exec - component: maven - command: mvn clean install -DskipTests - workdir: ${CHE_PROJECTS_ROOT}/che + - exec: + commandLine: mvn clean install -DskipTests + component: maven + group: + isDefault: true + kind: build + workingDir: ${PROJECT_SOURCE} + id: mvn-build From 7c598014a2f4c1cd34ff5f95d62dfd5c8eeb1e3a Mon Sep 17 00:00:00 2001 From: Anatolii Bazko Date: Thu, 8 Jun 2023 12:44:06 +0300 Subject: [PATCH 25/75] fix: Cloning projects from Azure DevOps (#522) Signed-off-by: Anatolii Bazko --- .../server/azure/devops/AzureDevOpsURLParser.java | 14 ++++++++------ .../server/azure/devops/AzureDevOpsUrl.java | 6 +----- .../azure/devops/AzureDevOpsURLParserTest.java | 2 +- 3 files changed, 10 insertions(+), 12 deletions(-) diff --git a/wsmaster/che-core-api-factory-azure-devops/src/main/java/org/eclipse/che/api/factory/server/azure/devops/AzureDevOpsURLParser.java b/wsmaster/che-core-api-factory-azure-devops/src/main/java/org/eclipse/che/api/factory/server/azure/devops/AzureDevOpsURLParser.java index 5cad6fda72..6bfd60016c 100644 --- a/wsmaster/che-core-api-factory-azure-devops/src/main/java/org/eclipse/che/api/factory/server/azure/devops/AzureDevOpsURLParser.java +++ b/wsmaster/che-core-api-factory-azure-devops/src/main/java/org/eclipse/che/api/factory/server/azure/devops/AzureDevOpsURLParser.java @@ -70,17 +70,19 @@ public class AzureDevOpsURLParser { throw new IllegalArgumentException(format("The given url %s is not a valid.", url)); } - String project = null; - try { - project = matcher.group("project"); - } catch (IllegalArgumentException e) { - } - String repoName = matcher.group("repoName"); if (repoName.endsWith(".git")) { repoName = repoName.substring(0, repoName.length() - 4); } + String project = matcher.group("project"); + if (project == null) { + // if project is not specified, repo name must be equal to project name + // https://dev.azure.com///_git/ == + // https://dev.azure.com//_git/ + project = repoName; + } + String organization = matcher.group("organization"); String branch = matcher.group("branch"); String tag = matcher.group("tag"); diff --git a/wsmaster/che-core-api-factory-azure-devops/src/main/java/org/eclipse/che/api/factory/server/azure/devops/AzureDevOpsUrl.java b/wsmaster/che-core-api-factory-azure-devops/src/main/java/org/eclipse/che/api/factory/server/azure/devops/AzureDevOpsUrl.java index e69d102bf8..ac25cf9655 100644 --- a/wsmaster/che-core-api-factory-azure-devops/src/main/java/org/eclipse/che/api/factory/server/azure/devops/AzureDevOpsUrl.java +++ b/wsmaster/che-core-api-factory-azure-devops/src/main/java/org/eclipse/che/api/factory/server/azure/devops/AzureDevOpsUrl.java @@ -149,11 +149,7 @@ public class AzureDevOpsUrl extends DefaultFactoryUrl { } private StringJoiner getRepoPathJoiner() { - StringJoiner repoPath = new StringJoiner("/").add(hostName).add(organization); - if (project != null) { - repoPath.add("_git"); - } - return repoPath; + return new StringJoiner("/").add(hostName).add(organization).add(project); } @Override diff --git a/wsmaster/che-core-api-factory-azure-devops/src/test/java/org/eclipse/che/api/factory/server/azure/devops/AzureDevOpsURLParserTest.java b/wsmaster/che-core-api-factory-azure-devops/src/test/java/org/eclipse/che/api/factory/server/azure/devops/AzureDevOpsURLParserTest.java index cbe43a6206..3ef9faade6 100644 --- a/wsmaster/che-core-api-factory-azure-devops/src/test/java/org/eclipse/che/api/factory/server/azure/devops/AzureDevOpsURLParserTest.java +++ b/wsmaster/che-core-api-factory-azure-devops/src/test/java/org/eclipse/che/api/factory/server/azure/devops/AzureDevOpsURLParserTest.java @@ -133,7 +133,7 @@ public class AzureDevOpsURLParserTest { null, "MyTag" }, - {"https://MyOrg@dev.azure.com/MyOrg/_git/MyRepo", "MyOrg", null, "MyRepo", null, null}, + {"https://MyOrg@dev.azure.com/MyOrg/_git/MyRepo", "MyOrg", "MyRepo", "MyRepo", null, null}, }; } From afedaeed90367b71097200fa98187025104bd99d Mon Sep 17 00:00:00 2001 From: Igor Vinokur Date: Wed, 14 Jun 2023 10:14:24 +0300 Subject: [PATCH 26/75] Add .vscode/settings.json with java settings (#524) --- .vscode/settings.json | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 .vscode/settings.json diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000000..966807fcff --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,3 @@ +{ + "java.jdt.ls.vmargs": "-XX:+UseParallelGC -XX:GCTimeRatio=4 -XX:AdaptiveSizePolicyWeight=90 -Dsun.zip.disableMemoryMapping=true -Xmx6G -Xms100m -Xlog:disable" +} From c23792c7b1fe99c20862064f6511012107e71199 Mon Sep 17 00:00:00 2001 From: Mykhailo Kuznietsov Date: Wed, 14 Jun 2023 15:40:44 +0000 Subject: [PATCH 27/75] chore: Bump to 7.70.0-SNAPSHOT in main Signed-off-by: Mykhailo Kuznietsov --- assembly/assembly-che-tomcat/pom.xml | 2 +- assembly/assembly-main/pom.xml | 2 +- assembly/assembly-root-war/pom.xml | 2 +- assembly/assembly-swagger-war/pom.xml | 2 +- assembly/assembly-wsmaster-war/pom.xml | 2 +- assembly/pom.xml | 2 +- core/che-core-api-core/pom.xml | 2 +- core/che-core-api-dto-maven-plugin/pom.xml | 2 +- core/che-core-api-dto/pom.xml | 2 +- core/che-core-api-model/pom.xml | 2 +- core/che-core-db-vendor-h2/pom.xml | 2 +- core/che-core-db-vendor-mysql/pom.xml | 2 +- core/che-core-db-vendor-postgresql/pom.xml | 2 +- core/che-core-db/pom.xml | 2 +- core/che-core-logback/pom.xml | 2 +- core/che-core-metrics-core/pom.xml | 2 +- core/che-core-tracing-core/pom.xml | 2 +- core/che-core-tracing-metrics/pom.xml | 2 +- core/che-core-tracing-web/pom.xml | 2 +- core/che-core-typescript-dto-maven-plugin/pom.xml | 2 +- core/commons/che-core-commons-annotations/pom.xml | 2 +- core/commons/che-core-commons-inject/pom.xml | 2 +- core/commons/che-core-commons-j2ee/pom.xml | 2 +- core/commons/che-core-commons-json/pom.xml | 2 +- core/commons/che-core-commons-lang/pom.xml | 2 +- core/commons/che-core-commons-observability/pom.xml | 2 +- core/commons/che-core-commons-schedule/pom.xml | 2 +- core/commons/che-core-commons-test/pom.xml | 2 +- core/commons/che-core-commons-tracing/pom.xml | 2 +- core/commons/pom.xml | 2 +- core/pom.xml | 2 +- infrastructures/infrastructure-distributed/pom.xml | 2 +- infrastructures/infrastructure-factory/pom.xml | 2 +- infrastructures/infrastructure-metrics/pom.xml | 2 +- infrastructures/infrastructure-permission/pom.xml | 2 +- infrastructures/kubernetes/pom.xml | 2 +- infrastructures/openshift/pom.xml | 2 +- infrastructures/pom.xml | 2 +- .../api/che-multiuser-api-authentication-commons/pom.xml | 2 +- multiuser/api/che-multiuser-api-authorization-impl/pom.xml | 2 +- multiuser/api/che-multiuser-api-authorization/pom.xml | 2 +- multiuser/api/che-multiuser-api-organization-shared/pom.xml | 2 +- multiuser/api/che-multiuser-api-organization/pom.xml | 2 +- multiuser/api/che-multiuser-api-permission-shared/pom.xml | 2 +- multiuser/api/che-multiuser-api-permission/pom.xml | 2 +- multiuser/api/che-multiuser-api-resource-shared/pom.xml | 2 +- multiuser/api/che-multiuser-api-resource/pom.xml | 2 +- multiuser/api/che-multiuser-api-workspace-activity/pom.xml | 2 +- multiuser/api/pom.xml | 2 +- .../integration-tests/che-multiuser-cascade-removal/pom.xml | 2 +- multiuser/integration-tests/che-multiuser-mysql-tck/pom.xml | 2 +- .../integration-tests/che-multiuser-postgresql-tck/pom.xml | 2 +- multiuser/integration-tests/pom.xml | 2 +- multiuser/keycloak/che-multiuser-keycloak-server/pom.xml | 2 +- multiuser/keycloak/che-multiuser-keycloak-shared/pom.xml | 2 +- .../keycloak/che-multiuser-keycloak-token-provider/pom.xml | 2 +- .../keycloak/che-multiuser-keycloak-user-remover/pom.xml | 2 +- multiuser/keycloak/pom.xml | 2 +- .../che-multiuser-machine-authentication-shared/pom.xml | 2 +- .../machine-auth/che-multiuser-machine-authentication/pom.xml | 2 +- multiuser/machine-auth/pom.xml | 2 +- multiuser/oidc/pom.xml | 2 +- multiuser/permission/che-multiuser-permission-devfile/pom.xml | 2 +- multiuser/permission/che-multiuser-permission-logger/pom.xml | 2 +- .../permission/che-multiuser-permission-resource/pom.xml | 2 +- multiuser/permission/che-multiuser-permission-system/pom.xml | 2 +- multiuser/permission/che-multiuser-permission-user/pom.xml | 2 +- .../che-multiuser-permission-workspace-activity/pom.xml | 2 +- .../permission/che-multiuser-permission-workspace/pom.xml | 2 +- multiuser/permission/pom.xml | 2 +- multiuser/personal-account/pom.xml | 2 +- multiuser/pom.xml | 2 +- multiuser/sql-schema/pom.xml | 2 +- pom.xml | 4 ++-- typescript-dto/dto-pom.xml | 2 +- wsmaster/che-core-api-account/pom.xml | 2 +- wsmaster/che-core-api-auth-azure-devops/pom.xml | 2 +- wsmaster/che-core-api-auth-bitbucket/pom.xml | 2 +- wsmaster/che-core-api-auth-github/pom.xml | 2 +- wsmaster/che-core-api-auth-gitlab/pom.xml | 2 +- wsmaster/che-core-api-auth-openshift/pom.xml | 2 +- wsmaster/che-core-api-auth-shared/pom.xml | 2 +- wsmaster/che-core-api-auth/pom.xml | 2 +- wsmaster/che-core-api-devfile-shared/pom.xml | 2 +- wsmaster/che-core-api-devfile/pom.xml | 2 +- wsmaster/che-core-api-factory-azure-devops/pom.xml | 2 +- wsmaster/che-core-api-factory-bitbucket-server/pom.xml | 2 +- wsmaster/che-core-api-factory-bitbucket/pom.xml | 2 +- wsmaster/che-core-api-factory-git-ssh/pom.xml | 2 +- wsmaster/che-core-api-factory-github/pom.xml | 2 +- wsmaster/che-core-api-factory-gitlab/pom.xml | 2 +- wsmaster/che-core-api-factory-shared/pom.xml | 2 +- wsmaster/che-core-api-factory/pom.xml | 2 +- wsmaster/che-core-api-logger-shared/pom.xml | 2 +- wsmaster/che-core-api-logger/pom.xml | 2 +- wsmaster/che-core-api-metrics/pom.xml | 2 +- wsmaster/che-core-api-ssh-shared/pom.xml | 2 +- wsmaster/che-core-api-ssh/pom.xml | 2 +- wsmaster/che-core-api-system-shared/pom.xml | 2 +- wsmaster/che-core-api-system/pom.xml | 2 +- wsmaster/che-core-api-user-shared/pom.xml | 2 +- wsmaster/che-core-api-user/pom.xml | 2 +- wsmaster/che-core-api-workspace-activity/pom.xml | 2 +- wsmaster/che-core-api-workspace-shared/pom.xml | 2 +- wsmaster/che-core-api-workspace/pom.xml | 2 +- wsmaster/che-core-sql-schema/pom.xml | 2 +- wsmaster/integration-tests/cascade-removal/pom.xml | 2 +- wsmaster/integration-tests/mysql-tck/pom.xml | 2 +- wsmaster/integration-tests/pom.xml | 2 +- wsmaster/integration-tests/postgresql-tck/pom.xml | 2 +- wsmaster/pom.xml | 2 +- 111 files changed, 112 insertions(+), 112 deletions(-) diff --git a/assembly/assembly-che-tomcat/pom.xml b/assembly/assembly-che-tomcat/pom.xml index 862e86a9da..2dd552bd59 100644 --- a/assembly/assembly-che-tomcat/pom.xml +++ b/assembly/assembly-che-tomcat/pom.xml @@ -17,7 +17,7 @@ che-assembly-parent org.eclipse.che - 7.69.0-SNAPSHOT + 7.70.0-SNAPSHOT assembly-che-tomcat jar diff --git a/assembly/assembly-main/pom.xml b/assembly/assembly-main/pom.xml index f2cefa78a6..c25d384804 100644 --- a/assembly/assembly-main/pom.xml +++ b/assembly/assembly-main/pom.xml @@ -17,7 +17,7 @@ che-assembly-parent org.eclipse.che - 7.69.0-SNAPSHOT + 7.70.0-SNAPSHOT assembly-main pom diff --git a/assembly/assembly-root-war/pom.xml b/assembly/assembly-root-war/pom.xml index b77d7a665f..d0e886b145 100644 --- a/assembly/assembly-root-war/pom.xml +++ b/assembly/assembly-root-war/pom.xml @@ -17,7 +17,7 @@ che-assembly-parent org.eclipse.che - 7.69.0-SNAPSHOT + 7.70.0-SNAPSHOT assembly-root-war war diff --git a/assembly/assembly-swagger-war/pom.xml b/assembly/assembly-swagger-war/pom.xml index a4c83597cc..beb54efe72 100644 --- a/assembly/assembly-swagger-war/pom.xml +++ b/assembly/assembly-swagger-war/pom.xml @@ -17,7 +17,7 @@ che-assembly-parent org.eclipse.che - 7.69.0-SNAPSHOT + 7.70.0-SNAPSHOT assembly-swagger-war war diff --git a/assembly/assembly-wsmaster-war/pom.xml b/assembly/assembly-wsmaster-war/pom.xml index 775de1d03a..a91bd41629 100644 --- a/assembly/assembly-wsmaster-war/pom.xml +++ b/assembly/assembly-wsmaster-war/pom.xml @@ -17,7 +17,7 @@ che-assembly-parent org.eclipse.che - 7.69.0-SNAPSHOT + 7.70.0-SNAPSHOT assembly-wsmaster-war war diff --git a/assembly/pom.xml b/assembly/pom.xml index 0ab6be801d..cd53eea81a 100644 --- a/assembly/pom.xml +++ b/assembly/pom.xml @@ -17,7 +17,7 @@ che-server org.eclipse.che - 7.69.0-SNAPSHOT + 7.70.0-SNAPSHOT ../pom.xml che-assembly-parent diff --git a/core/che-core-api-core/pom.xml b/core/che-core-api-core/pom.xml index affdee5088..ae409dcc49 100644 --- a/core/che-core-api-core/pom.xml +++ b/core/che-core-api-core/pom.xml @@ -17,7 +17,7 @@ che-core-parent org.eclipse.che.core - 7.69.0-SNAPSHOT + 7.70.0-SNAPSHOT che-core-api-core jar diff --git a/core/che-core-api-dto-maven-plugin/pom.xml b/core/che-core-api-dto-maven-plugin/pom.xml index 6b70e0bd6f..6fec384665 100644 --- a/core/che-core-api-dto-maven-plugin/pom.xml +++ b/core/che-core-api-dto-maven-plugin/pom.xml @@ -17,7 +17,7 @@ che-core-parent org.eclipse.che.core - 7.69.0-SNAPSHOT + 7.70.0-SNAPSHOT che-core-api-dto-maven-plugin maven-plugin diff --git a/core/che-core-api-dto/pom.xml b/core/che-core-api-dto/pom.xml index ef8198f92e..ce31948d4e 100644 --- a/core/che-core-api-dto/pom.xml +++ b/core/che-core-api-dto/pom.xml @@ -17,7 +17,7 @@ che-core-parent org.eclipse.che.core - 7.69.0-SNAPSHOT + 7.70.0-SNAPSHOT che-core-api-dto jar diff --git a/core/che-core-api-model/pom.xml b/core/che-core-api-model/pom.xml index dc07bf86fa..e16013bfd6 100644 --- a/core/che-core-api-model/pom.xml +++ b/core/che-core-api-model/pom.xml @@ -17,7 +17,7 @@ che-core-parent org.eclipse.che.core - 7.69.0-SNAPSHOT + 7.70.0-SNAPSHOT che-core-api-model jar diff --git a/core/che-core-db-vendor-h2/pom.xml b/core/che-core-db-vendor-h2/pom.xml index 8f1c45669d..cee3d559dd 100644 --- a/core/che-core-db-vendor-h2/pom.xml +++ b/core/che-core-db-vendor-h2/pom.xml @@ -17,7 +17,7 @@ che-core-parent org.eclipse.che.core - 7.69.0-SNAPSHOT + 7.70.0-SNAPSHOT che-core-db-vendor-h2 Che Core :: Commons :: DB :: Vendor H2 diff --git a/core/che-core-db-vendor-mysql/pom.xml b/core/che-core-db-vendor-mysql/pom.xml index 645581b6ae..4783207730 100644 --- a/core/che-core-db-vendor-mysql/pom.xml +++ b/core/che-core-db-vendor-mysql/pom.xml @@ -17,7 +17,7 @@ che-core-parent org.eclipse.che.core - 7.69.0-SNAPSHOT + 7.70.0-SNAPSHOT che-core-db-vendor-mysql Che Core :: Commons :: DB :: Vendor MySQL diff --git a/core/che-core-db-vendor-postgresql/pom.xml b/core/che-core-db-vendor-postgresql/pom.xml index cbe88905b6..2313e7c160 100644 --- a/core/che-core-db-vendor-postgresql/pom.xml +++ b/core/che-core-db-vendor-postgresql/pom.xml @@ -17,7 +17,7 @@ che-core-parent org.eclipse.che.core - 7.69.0-SNAPSHOT + 7.70.0-SNAPSHOT che-core-db-vendor-postgresql Che Core :: Commons :: DB :: Vendor PostgreSQL diff --git a/core/che-core-db/pom.xml b/core/che-core-db/pom.xml index 145319637b..c2a5625389 100644 --- a/core/che-core-db/pom.xml +++ b/core/che-core-db/pom.xml @@ -17,7 +17,7 @@ che-core-parent org.eclipse.che.core - 7.69.0-SNAPSHOT + 7.70.0-SNAPSHOT che-core-db Che Core :: Commons :: DB diff --git a/core/che-core-logback/pom.xml b/core/che-core-logback/pom.xml index 08d2e3470b..433c526182 100644 --- a/core/che-core-logback/pom.xml +++ b/core/che-core-logback/pom.xml @@ -17,7 +17,7 @@ che-core-parent org.eclipse.che.core - 7.69.0-SNAPSHOT + 7.70.0-SNAPSHOT che-core-logback jar diff --git a/core/che-core-metrics-core/pom.xml b/core/che-core-metrics-core/pom.xml index ac899b7ffd..e864a0d1f6 100644 --- a/core/che-core-metrics-core/pom.xml +++ b/core/che-core-metrics-core/pom.xml @@ -17,7 +17,7 @@ che-core-parent org.eclipse.che.core - 7.69.0-SNAPSHOT + 7.70.0-SNAPSHOT che-core-metrics-core Che Core :: Commons :: Metrics :: Core diff --git a/core/che-core-tracing-core/pom.xml b/core/che-core-tracing-core/pom.xml index 777db17b0b..ef9dfc2a22 100644 --- a/core/che-core-tracing-core/pom.xml +++ b/core/che-core-tracing-core/pom.xml @@ -17,7 +17,7 @@ che-core-parent org.eclipse.che.core - 7.69.0-SNAPSHOT + 7.70.0-SNAPSHOT che-core-tracing-core Che Core :: Commons :: Tracing :: Core diff --git a/core/che-core-tracing-metrics/pom.xml b/core/che-core-tracing-metrics/pom.xml index ac2e5bbe5b..81d0d3e8a2 100644 --- a/core/che-core-tracing-metrics/pom.xml +++ b/core/che-core-tracing-metrics/pom.xml @@ -17,7 +17,7 @@ che-core-parent org.eclipse.che.core - 7.69.0-SNAPSHOT + 7.70.0-SNAPSHOT che-core-tracing-metrics Che Core :: Commons :: Tracing :: Metrics diff --git a/core/che-core-tracing-web/pom.xml b/core/che-core-tracing-web/pom.xml index 4b765dc805..6fc8bb0f33 100644 --- a/core/che-core-tracing-web/pom.xml +++ b/core/che-core-tracing-web/pom.xml @@ -17,7 +17,7 @@ che-core-parent org.eclipse.che.core - 7.69.0-SNAPSHOT + 7.70.0-SNAPSHOT che-core-tracing-web Che Core :: Commons :: Tracing :: Web diff --git a/core/che-core-typescript-dto-maven-plugin/pom.xml b/core/che-core-typescript-dto-maven-plugin/pom.xml index 14721f6b35..4242cf3e2f 100644 --- a/core/che-core-typescript-dto-maven-plugin/pom.xml +++ b/core/che-core-typescript-dto-maven-plugin/pom.xml @@ -17,7 +17,7 @@ che-core-parent org.eclipse.che.core - 7.69.0-SNAPSHOT + 7.70.0-SNAPSHOT che-core-typescript-dto-maven-plugin maven-plugin diff --git a/core/commons/che-core-commons-annotations/pom.xml b/core/commons/che-core-commons-annotations/pom.xml index b5c49f300d..89dffc55be 100644 --- a/core/commons/che-core-commons-annotations/pom.xml +++ b/core/commons/che-core-commons-annotations/pom.xml @@ -17,7 +17,7 @@ che-core-commons-parent org.eclipse.che.core - 7.69.0-SNAPSHOT + 7.70.0-SNAPSHOT che-core-commons-annotations jar diff --git a/core/commons/che-core-commons-inject/pom.xml b/core/commons/che-core-commons-inject/pom.xml index c9d1d7c451..26f55d83c9 100644 --- a/core/commons/che-core-commons-inject/pom.xml +++ b/core/commons/che-core-commons-inject/pom.xml @@ -17,7 +17,7 @@ che-core-commons-parent org.eclipse.che.core - 7.69.0-SNAPSHOT + 7.70.0-SNAPSHOT che-core-commons-inject jar diff --git a/core/commons/che-core-commons-j2ee/pom.xml b/core/commons/che-core-commons-j2ee/pom.xml index fb5236bb64..83a4f7aa72 100644 --- a/core/commons/che-core-commons-j2ee/pom.xml +++ b/core/commons/che-core-commons-j2ee/pom.xml @@ -17,7 +17,7 @@ che-core-commons-parent org.eclipse.che.core - 7.69.0-SNAPSHOT + 7.70.0-SNAPSHOT che-core-commons-j2ee jar diff --git a/core/commons/che-core-commons-json/pom.xml b/core/commons/che-core-commons-json/pom.xml index 00df041b4c..0f0f444ccf 100644 --- a/core/commons/che-core-commons-json/pom.xml +++ b/core/commons/che-core-commons-json/pom.xml @@ -17,7 +17,7 @@ che-core-commons-parent org.eclipse.che.core - 7.69.0-SNAPSHOT + 7.70.0-SNAPSHOT che-core-commons-json jar diff --git a/core/commons/che-core-commons-lang/pom.xml b/core/commons/che-core-commons-lang/pom.xml index d123ad01ca..714130b7fc 100644 --- a/core/commons/che-core-commons-lang/pom.xml +++ b/core/commons/che-core-commons-lang/pom.xml @@ -17,7 +17,7 @@ che-core-commons-parent org.eclipse.che.core - 7.69.0-SNAPSHOT + 7.70.0-SNAPSHOT che-core-commons-lang jar diff --git a/core/commons/che-core-commons-observability/pom.xml b/core/commons/che-core-commons-observability/pom.xml index 064e8fc6c6..9dabf23506 100644 --- a/core/commons/che-core-commons-observability/pom.xml +++ b/core/commons/che-core-commons-observability/pom.xml @@ -17,7 +17,7 @@ che-core-commons-parent org.eclipse.che.core - 7.69.0-SNAPSHOT + 7.70.0-SNAPSHOT che-core-commons-observability Che Core :: Commons :: Tracing and Monitoring wrapper diff --git a/core/commons/che-core-commons-schedule/pom.xml b/core/commons/che-core-commons-schedule/pom.xml index c38025bfda..129543cd61 100644 --- a/core/commons/che-core-commons-schedule/pom.xml +++ b/core/commons/che-core-commons-schedule/pom.xml @@ -17,7 +17,7 @@ che-core-commons-parent org.eclipse.che.core - 7.69.0-SNAPSHOT + 7.70.0-SNAPSHOT che-core-commons-schedule jar diff --git a/core/commons/che-core-commons-test/pom.xml b/core/commons/che-core-commons-test/pom.xml index 8f4e75f88a..8f2726a327 100644 --- a/core/commons/che-core-commons-test/pom.xml +++ b/core/commons/che-core-commons-test/pom.xml @@ -17,7 +17,7 @@ che-core-commons-parent org.eclipse.che.core - 7.69.0-SNAPSHOT + 7.70.0-SNAPSHOT che-core-commons-test jar diff --git a/core/commons/che-core-commons-tracing/pom.xml b/core/commons/che-core-commons-tracing/pom.xml index d3ce27e3ac..bb8678099d 100644 --- a/core/commons/che-core-commons-tracing/pom.xml +++ b/core/commons/che-core-commons-tracing/pom.xml @@ -17,7 +17,7 @@ che-core-commons-parent org.eclipse.che.core - 7.69.0-SNAPSHOT + 7.70.0-SNAPSHOT che-core-commons-tracing Che Core :: Commons :: Tracing diff --git a/core/commons/pom.xml b/core/commons/pom.xml index 54562de5c7..ac2b1def22 100644 --- a/core/commons/pom.xml +++ b/core/commons/pom.xml @@ -17,7 +17,7 @@ che-core-parent org.eclipse.che.core - 7.69.0-SNAPSHOT + 7.70.0-SNAPSHOT ../pom.xml che-core-commons-parent diff --git a/core/pom.xml b/core/pom.xml index 2bb918d39f..bb9ad120a0 100644 --- a/core/pom.xml +++ b/core/pom.xml @@ -17,7 +17,7 @@ che-server org.eclipse.che - 7.69.0-SNAPSHOT + 7.70.0-SNAPSHOT ../pom.xml org.eclipse.che.core diff --git a/infrastructures/infrastructure-distributed/pom.xml b/infrastructures/infrastructure-distributed/pom.xml index 1ad3997374..94bfa15edb 100644 --- a/infrastructures/infrastructure-distributed/pom.xml +++ b/infrastructures/infrastructure-distributed/pom.xml @@ -17,7 +17,7 @@ che-infrastructures-parent org.eclipse.che.infrastructure - 7.69.0-SNAPSHOT + 7.70.0-SNAPSHOT infrastructure-distributed jar diff --git a/infrastructures/infrastructure-factory/pom.xml b/infrastructures/infrastructure-factory/pom.xml index 2a4d9e4d19..0c093d37fd 100644 --- a/infrastructures/infrastructure-factory/pom.xml +++ b/infrastructures/infrastructure-factory/pom.xml @@ -17,7 +17,7 @@ che-infrastructures-parent org.eclipse.che.infrastructure - 7.69.0-SNAPSHOT + 7.70.0-SNAPSHOT infrastructure-factory jar diff --git a/infrastructures/infrastructure-metrics/pom.xml b/infrastructures/infrastructure-metrics/pom.xml index 2effa671b1..7de54b3e21 100644 --- a/infrastructures/infrastructure-metrics/pom.xml +++ b/infrastructures/infrastructure-metrics/pom.xml @@ -17,7 +17,7 @@ che-infrastructures-parent org.eclipse.che.infrastructure - 7.69.0-SNAPSHOT + 7.70.0-SNAPSHOT ../pom.xml infrastructure-metrics diff --git a/infrastructures/infrastructure-permission/pom.xml b/infrastructures/infrastructure-permission/pom.xml index 80d73ea206..2aee6e0858 100644 --- a/infrastructures/infrastructure-permission/pom.xml +++ b/infrastructures/infrastructure-permission/pom.xml @@ -17,7 +17,7 @@ che-infrastructures-parent org.eclipse.che.infrastructure - 7.69.0-SNAPSHOT + 7.70.0-SNAPSHOT infrastructure-permission Infrastructure :: Kubernetes Permissions diff --git a/infrastructures/kubernetes/pom.xml b/infrastructures/kubernetes/pom.xml index f3942abaca..1eeeb9a8d5 100644 --- a/infrastructures/kubernetes/pom.xml +++ b/infrastructures/kubernetes/pom.xml @@ -17,7 +17,7 @@ che-infrastructures-parent org.eclipse.che.infrastructure - 7.69.0-SNAPSHOT + 7.70.0-SNAPSHOT infrastructure-kubernetes Infrastructure :: Kubernetes diff --git a/infrastructures/openshift/pom.xml b/infrastructures/openshift/pom.xml index 48bc53a122..7df63e74d6 100644 --- a/infrastructures/openshift/pom.xml +++ b/infrastructures/openshift/pom.xml @@ -17,7 +17,7 @@ che-infrastructures-parent org.eclipse.che.infrastructure - 7.69.0-SNAPSHOT + 7.70.0-SNAPSHOT infrastructure-openshift Infrastructure :: OpenShift diff --git a/infrastructures/pom.xml b/infrastructures/pom.xml index 592086d4ea..3a21db29c0 100644 --- a/infrastructures/pom.xml +++ b/infrastructures/pom.xml @@ -17,7 +17,7 @@ che-server org.eclipse.che - 7.69.0-SNAPSHOT + 7.70.0-SNAPSHOT ../pom.xml org.eclipse.che.infrastructure diff --git a/multiuser/api/che-multiuser-api-authentication-commons/pom.xml b/multiuser/api/che-multiuser-api-authentication-commons/pom.xml index 7439a79fd7..d151975490 100644 --- a/multiuser/api/che-multiuser-api-authentication-commons/pom.xml +++ b/multiuser/api/che-multiuser-api-authentication-commons/pom.xml @@ -17,7 +17,7 @@ che-multiuser-api org.eclipse.che.multiuser - 7.69.0-SNAPSHOT + 7.70.0-SNAPSHOT che-multiuser-api-authentication-commons jar diff --git a/multiuser/api/che-multiuser-api-authorization-impl/pom.xml b/multiuser/api/che-multiuser-api-authorization-impl/pom.xml index 2fb9b3a405..9d894e3775 100644 --- a/multiuser/api/che-multiuser-api-authorization-impl/pom.xml +++ b/multiuser/api/che-multiuser-api-authorization-impl/pom.xml @@ -17,7 +17,7 @@ che-multiuser-api org.eclipse.che.multiuser - 7.69.0-SNAPSHOT + 7.70.0-SNAPSHOT che-multiuser-api-authorization-impl jar diff --git a/multiuser/api/che-multiuser-api-authorization/pom.xml b/multiuser/api/che-multiuser-api-authorization/pom.xml index 48d769d176..fd7c2db2d9 100644 --- a/multiuser/api/che-multiuser-api-authorization/pom.xml +++ b/multiuser/api/che-multiuser-api-authorization/pom.xml @@ -17,7 +17,7 @@ che-multiuser-api org.eclipse.che.multiuser - 7.69.0-SNAPSHOT + 7.70.0-SNAPSHOT che-multiuser-api-authorization jar diff --git a/multiuser/api/che-multiuser-api-organization-shared/pom.xml b/multiuser/api/che-multiuser-api-organization-shared/pom.xml index fb6cf413fa..9e96eab676 100644 --- a/multiuser/api/che-multiuser-api-organization-shared/pom.xml +++ b/multiuser/api/che-multiuser-api-organization-shared/pom.xml @@ -17,7 +17,7 @@ che-multiuser-api org.eclipse.che.multiuser - 7.69.0-SNAPSHOT + 7.70.0-SNAPSHOT che-multiuser-api-organization-shared jar diff --git a/multiuser/api/che-multiuser-api-organization/pom.xml b/multiuser/api/che-multiuser-api-organization/pom.xml index a49e67bc07..e4bf89a2ae 100644 --- a/multiuser/api/che-multiuser-api-organization/pom.xml +++ b/multiuser/api/che-multiuser-api-organization/pom.xml @@ -17,7 +17,7 @@ che-multiuser-api org.eclipse.che.multiuser - 7.69.0-SNAPSHOT + 7.70.0-SNAPSHOT che-multiuser-api-organization jar diff --git a/multiuser/api/che-multiuser-api-permission-shared/pom.xml b/multiuser/api/che-multiuser-api-permission-shared/pom.xml index 1fd59299e2..489a1f6448 100644 --- a/multiuser/api/che-multiuser-api-permission-shared/pom.xml +++ b/multiuser/api/che-multiuser-api-permission-shared/pom.xml @@ -17,7 +17,7 @@ che-multiuser-api org.eclipse.che.multiuser - 7.69.0-SNAPSHOT + 7.70.0-SNAPSHOT che-multiuser-api-permission-shared jar diff --git a/multiuser/api/che-multiuser-api-permission/pom.xml b/multiuser/api/che-multiuser-api-permission/pom.xml index 151845736d..842698c407 100644 --- a/multiuser/api/che-multiuser-api-permission/pom.xml +++ b/multiuser/api/che-multiuser-api-permission/pom.xml @@ -17,7 +17,7 @@ che-multiuser-api org.eclipse.che.multiuser - 7.69.0-SNAPSHOT + 7.70.0-SNAPSHOT che-multiuser-api-permission jar diff --git a/multiuser/api/che-multiuser-api-resource-shared/pom.xml b/multiuser/api/che-multiuser-api-resource-shared/pom.xml index c8fb5e3ef2..77b7c91e79 100644 --- a/multiuser/api/che-multiuser-api-resource-shared/pom.xml +++ b/multiuser/api/che-multiuser-api-resource-shared/pom.xml @@ -17,7 +17,7 @@ che-multiuser-api org.eclipse.che.multiuser - 7.69.0-SNAPSHOT + 7.70.0-SNAPSHOT che-multiuser-api-resource-shared jar diff --git a/multiuser/api/che-multiuser-api-resource/pom.xml b/multiuser/api/che-multiuser-api-resource/pom.xml index 90e4772330..4aa08d2e55 100644 --- a/multiuser/api/che-multiuser-api-resource/pom.xml +++ b/multiuser/api/che-multiuser-api-resource/pom.xml @@ -17,7 +17,7 @@ che-multiuser-api org.eclipse.che.multiuser - 7.69.0-SNAPSHOT + 7.70.0-SNAPSHOT che-multiuser-api-resource jar diff --git a/multiuser/api/che-multiuser-api-workspace-activity/pom.xml b/multiuser/api/che-multiuser-api-workspace-activity/pom.xml index b34bb5edeb..1b27274dd2 100644 --- a/multiuser/api/che-multiuser-api-workspace-activity/pom.xml +++ b/multiuser/api/che-multiuser-api-workspace-activity/pom.xml @@ -17,7 +17,7 @@ che-multiuser-api org.eclipse.che.multiuser - 7.69.0-SNAPSHOT + 7.70.0-SNAPSHOT che-multiuser-api-workspace-activity jar diff --git a/multiuser/api/pom.xml b/multiuser/api/pom.xml index 58434a27cd..74c4286cda 100644 --- a/multiuser/api/pom.xml +++ b/multiuser/api/pom.xml @@ -17,7 +17,7 @@ che-multiuser-parent org.eclipse.che.multiuser - 7.69.0-SNAPSHOT + 7.70.0-SNAPSHOT ../pom.xml che-multiuser-api diff --git a/multiuser/integration-tests/che-multiuser-cascade-removal/pom.xml b/multiuser/integration-tests/che-multiuser-cascade-removal/pom.xml index 0e7e619aab..9b60645c90 100644 --- a/multiuser/integration-tests/che-multiuser-cascade-removal/pom.xml +++ b/multiuser/integration-tests/che-multiuser-cascade-removal/pom.xml @@ -17,7 +17,7 @@ che-multiuser-integration-tests org.eclipse.che.multiuser - 7.69.0-SNAPSHOT + 7.70.0-SNAPSHOT che-multiuser-cascade-removal jar diff --git a/multiuser/integration-tests/che-multiuser-mysql-tck/pom.xml b/multiuser/integration-tests/che-multiuser-mysql-tck/pom.xml index c95b426ec7..34ba3adfec 100644 --- a/multiuser/integration-tests/che-multiuser-mysql-tck/pom.xml +++ b/multiuser/integration-tests/che-multiuser-mysql-tck/pom.xml @@ -17,7 +17,7 @@ che-multiuser-integration-tests org.eclipse.che.multiuser - 7.69.0-SNAPSHOT + 7.70.0-SNAPSHOT che-multiuser-mysql-tck jar diff --git a/multiuser/integration-tests/che-multiuser-postgresql-tck/pom.xml b/multiuser/integration-tests/che-multiuser-postgresql-tck/pom.xml index c54306fee7..4f26dcb3f3 100644 --- a/multiuser/integration-tests/che-multiuser-postgresql-tck/pom.xml +++ b/multiuser/integration-tests/che-multiuser-postgresql-tck/pom.xml @@ -17,7 +17,7 @@ che-multiuser-integration-tests org.eclipse.che.multiuser - 7.69.0-SNAPSHOT + 7.70.0-SNAPSHOT che-multiuser-postgresql-tck jar diff --git a/multiuser/integration-tests/pom.xml b/multiuser/integration-tests/pom.xml index 2a09cd0881..0750a007fe 100644 --- a/multiuser/integration-tests/pom.xml +++ b/multiuser/integration-tests/pom.xml @@ -17,7 +17,7 @@ che-multiuser-parent org.eclipse.che.multiuser - 7.69.0-SNAPSHOT + 7.70.0-SNAPSHOT che-multiuser-integration-tests pom diff --git a/multiuser/keycloak/che-multiuser-keycloak-server/pom.xml b/multiuser/keycloak/che-multiuser-keycloak-server/pom.xml index 7260c06896..4e1c09f399 100644 --- a/multiuser/keycloak/che-multiuser-keycloak-server/pom.xml +++ b/multiuser/keycloak/che-multiuser-keycloak-server/pom.xml @@ -17,7 +17,7 @@ che-multiuser-keycloak org.eclipse.che.multiuser - 7.69.0-SNAPSHOT + 7.70.0-SNAPSHOT che-multiuser-keycloak-server jar diff --git a/multiuser/keycloak/che-multiuser-keycloak-shared/pom.xml b/multiuser/keycloak/che-multiuser-keycloak-shared/pom.xml index 6a14c54a99..1341a8b489 100644 --- a/multiuser/keycloak/che-multiuser-keycloak-shared/pom.xml +++ b/multiuser/keycloak/che-multiuser-keycloak-shared/pom.xml @@ -17,7 +17,7 @@ che-multiuser-keycloak org.eclipse.che.multiuser - 7.69.0-SNAPSHOT + 7.70.0-SNAPSHOT che-multiuser-keycloak-shared jar diff --git a/multiuser/keycloak/che-multiuser-keycloak-token-provider/pom.xml b/multiuser/keycloak/che-multiuser-keycloak-token-provider/pom.xml index fcc84ed088..77966964e5 100644 --- a/multiuser/keycloak/che-multiuser-keycloak-token-provider/pom.xml +++ b/multiuser/keycloak/che-multiuser-keycloak-token-provider/pom.xml @@ -17,7 +17,7 @@ che-multiuser-keycloak org.eclipse.che.multiuser - 7.69.0-SNAPSHOT + 7.70.0-SNAPSHOT che-multiuser-keycloak-token-provider Che Multiuser :: Keycloak Token Provider diff --git a/multiuser/keycloak/che-multiuser-keycloak-user-remover/pom.xml b/multiuser/keycloak/che-multiuser-keycloak-user-remover/pom.xml index f4886aab7c..494d4b1250 100644 --- a/multiuser/keycloak/che-multiuser-keycloak-user-remover/pom.xml +++ b/multiuser/keycloak/che-multiuser-keycloak-user-remover/pom.xml @@ -17,7 +17,7 @@ che-multiuser-keycloak org.eclipse.che.multiuser - 7.69.0-SNAPSHOT + 7.70.0-SNAPSHOT che-multiuser-keycloak-user-remover jar diff --git a/multiuser/keycloak/pom.xml b/multiuser/keycloak/pom.xml index 0b7c6184b3..43e9882c9e 100644 --- a/multiuser/keycloak/pom.xml +++ b/multiuser/keycloak/pom.xml @@ -17,7 +17,7 @@ che-multiuser-parent org.eclipse.che.multiuser - 7.69.0-SNAPSHOT + 7.70.0-SNAPSHOT ../pom.xml che-multiuser-keycloak diff --git a/multiuser/machine-auth/che-multiuser-machine-authentication-shared/pom.xml b/multiuser/machine-auth/che-multiuser-machine-authentication-shared/pom.xml index 7839ea079b..fd2eeebeca 100644 --- a/multiuser/machine-auth/che-multiuser-machine-authentication-shared/pom.xml +++ b/multiuser/machine-auth/che-multiuser-machine-authentication-shared/pom.xml @@ -17,7 +17,7 @@ che-multiuser-machine-auth org.eclipse.che.multiuser - 7.69.0-SNAPSHOT + 7.70.0-SNAPSHOT che-multiuser-machine-authentication-shared jar diff --git a/multiuser/machine-auth/che-multiuser-machine-authentication/pom.xml b/multiuser/machine-auth/che-multiuser-machine-authentication/pom.xml index 97acccf5ff..aa0a83edac 100644 --- a/multiuser/machine-auth/che-multiuser-machine-authentication/pom.xml +++ b/multiuser/machine-auth/che-multiuser-machine-authentication/pom.xml @@ -17,7 +17,7 @@ che-multiuser-machine-auth org.eclipse.che.multiuser - 7.69.0-SNAPSHOT + 7.70.0-SNAPSHOT che-multiuser-machine-authentication jar diff --git a/multiuser/machine-auth/pom.xml b/multiuser/machine-auth/pom.xml index 01cff93305..001ca6ff07 100644 --- a/multiuser/machine-auth/pom.xml +++ b/multiuser/machine-auth/pom.xml @@ -17,7 +17,7 @@ che-multiuser-parent org.eclipse.che.multiuser - 7.69.0-SNAPSHOT + 7.70.0-SNAPSHOT ../pom.xml che-multiuser-machine-auth diff --git a/multiuser/oidc/pom.xml b/multiuser/oidc/pom.xml index b606bb2dc3..d241f4e84e 100644 --- a/multiuser/oidc/pom.xml +++ b/multiuser/oidc/pom.xml @@ -17,7 +17,7 @@ che-multiuser-parent org.eclipse.che.multiuser - 7.69.0-SNAPSHOT + 7.70.0-SNAPSHOT che-multiuser-oidc jar diff --git a/multiuser/permission/che-multiuser-permission-devfile/pom.xml b/multiuser/permission/che-multiuser-permission-devfile/pom.xml index 9e3ff29ba6..678eb5dd27 100644 --- a/multiuser/permission/che-multiuser-permission-devfile/pom.xml +++ b/multiuser/permission/che-multiuser-permission-devfile/pom.xml @@ -17,7 +17,7 @@ che-multiuser-permission org.eclipse.che.multiuser - 7.69.0-SNAPSHOT + 7.70.0-SNAPSHOT che-multiuser-permission-devfile Che Multiuser :: Devfile Permissions diff --git a/multiuser/permission/che-multiuser-permission-logger/pom.xml b/multiuser/permission/che-multiuser-permission-logger/pom.xml index 5188c7d29d..81ba18206a 100644 --- a/multiuser/permission/che-multiuser-permission-logger/pom.xml +++ b/multiuser/permission/che-multiuser-permission-logger/pom.xml @@ -17,7 +17,7 @@ che-multiuser-permission org.eclipse.che.multiuser - 7.69.0-SNAPSHOT + 7.70.0-SNAPSHOT che-multiuser-permission-logger Che Multiuser :: Logger Permissions diff --git a/multiuser/permission/che-multiuser-permission-resource/pom.xml b/multiuser/permission/che-multiuser-permission-resource/pom.xml index a6ef74c5f4..0dd6a99cba 100644 --- a/multiuser/permission/che-multiuser-permission-resource/pom.xml +++ b/multiuser/permission/che-multiuser-permission-resource/pom.xml @@ -17,7 +17,7 @@ che-multiuser-permission org.eclipse.che.multiuser - 7.69.0-SNAPSHOT + 7.70.0-SNAPSHOT che-multiuser-permission-resource Che Multiuser :: Resource :: Permissions diff --git a/multiuser/permission/che-multiuser-permission-system/pom.xml b/multiuser/permission/che-multiuser-permission-system/pom.xml index 60a05e1c28..125d43a835 100644 --- a/multiuser/permission/che-multiuser-permission-system/pom.xml +++ b/multiuser/permission/che-multiuser-permission-system/pom.xml @@ -17,7 +17,7 @@ che-multiuser-permission org.eclipse.che.multiuser - 7.69.0-SNAPSHOT + 7.70.0-SNAPSHOT che-multiuser-permission-system Che Multiuser :: System Permissions diff --git a/multiuser/permission/che-multiuser-permission-user/pom.xml b/multiuser/permission/che-multiuser-permission-user/pom.xml index a408166054..0dc4316632 100644 --- a/multiuser/permission/che-multiuser-permission-user/pom.xml +++ b/multiuser/permission/che-multiuser-permission-user/pom.xml @@ -17,7 +17,7 @@ che-multiuser-permission org.eclipse.che.multiuser - 7.69.0-SNAPSHOT + 7.70.0-SNAPSHOT che-multiuser-permission-user Che Multiuser :: User Permissions diff --git a/multiuser/permission/che-multiuser-permission-workspace-activity/pom.xml b/multiuser/permission/che-multiuser-permission-workspace-activity/pom.xml index 7b62000918..94a76d509a 100644 --- a/multiuser/permission/che-multiuser-permission-workspace-activity/pom.xml +++ b/multiuser/permission/che-multiuser-permission-workspace-activity/pom.xml @@ -17,7 +17,7 @@ che-multiuser-permission org.eclipse.che.multiuser - 7.69.0-SNAPSHOT + 7.70.0-SNAPSHOT che-multiuser-permission-workspace-activity Che Multiuser :: Workspace Activity Permissions diff --git a/multiuser/permission/che-multiuser-permission-workspace/pom.xml b/multiuser/permission/che-multiuser-permission-workspace/pom.xml index 883e9cc0fd..dc593d0562 100644 --- a/multiuser/permission/che-multiuser-permission-workspace/pom.xml +++ b/multiuser/permission/che-multiuser-permission-workspace/pom.xml @@ -17,7 +17,7 @@ che-multiuser-permission org.eclipse.che.multiuser - 7.69.0-SNAPSHOT + 7.70.0-SNAPSHOT che-multiuser-permission-workspace Che Multiuser :: Workspace Permissions diff --git a/multiuser/permission/pom.xml b/multiuser/permission/pom.xml index 718f24980e..4a4ce6c0fc 100644 --- a/multiuser/permission/pom.xml +++ b/multiuser/permission/pom.xml @@ -17,7 +17,7 @@ che-multiuser-parent org.eclipse.che.multiuser - 7.69.0-SNAPSHOT + 7.70.0-SNAPSHOT ../pom.xml che-multiuser-permission diff --git a/multiuser/personal-account/pom.xml b/multiuser/personal-account/pom.xml index 5e8f146d38..718bb22faa 100644 --- a/multiuser/personal-account/pom.xml +++ b/multiuser/personal-account/pom.xml @@ -17,7 +17,7 @@ che-multiuser-parent org.eclipse.che.multiuser - 7.69.0-SNAPSHOT + 7.70.0-SNAPSHOT che-multiuser-personal-account jar diff --git a/multiuser/pom.xml b/multiuser/pom.xml index 96675655eb..e366ebe5a5 100644 --- a/multiuser/pom.xml +++ b/multiuser/pom.xml @@ -17,7 +17,7 @@ che-server org.eclipse.che - 7.69.0-SNAPSHOT + 7.70.0-SNAPSHOT ../pom.xml org.eclipse.che.multiuser diff --git a/multiuser/sql-schema/pom.xml b/multiuser/sql-schema/pom.xml index 6529f35256..ebf9934b85 100644 --- a/multiuser/sql-schema/pom.xml +++ b/multiuser/sql-schema/pom.xml @@ -17,7 +17,7 @@ che-multiuser-parent org.eclipse.che.multiuser - 7.69.0-SNAPSHOT + 7.70.0-SNAPSHOT ../pom.xml che-multiuser-sql-schema diff --git a/pom.xml b/pom.xml index c8e50a0f4b..63253ad573 100644 --- a/pom.xml +++ b/pom.xml @@ -16,7 +16,7 @@ 4.0.0 org.eclipse.che che-server - 7.69.0-SNAPSHOT + 7.70.0-SNAPSHOT pom Che Server Eclipse Che Server @@ -100,7 +100,7 @@ Red Hat, Inc. - initial API and implementation ${project.version} - 7.69.0-SNAPSHOT + 7.70.0-SNAPSHOT 1.0-beta2 Red Hat, Inc. diff --git a/typescript-dto/dto-pom.xml b/typescript-dto/dto-pom.xml index 84220212e5..18d4b905ea 100644 --- a/typescript-dto/dto-pom.xml +++ b/typescript-dto/dto-pom.xml @@ -23,7 +23,7 @@ pom Che TypeScript DTO - 7.69.0-SNAPSHOT + 7.70.0-SNAPSHOT diff --git a/wsmaster/che-core-api-account/pom.xml b/wsmaster/che-core-api-account/pom.xml index 8d63b8fef1..26669f1bc5 100644 --- a/wsmaster/che-core-api-account/pom.xml +++ b/wsmaster/che-core-api-account/pom.xml @@ -17,7 +17,7 @@ che-master-parent org.eclipse.che.core - 7.69.0-SNAPSHOT + 7.70.0-SNAPSHOT che-core-api-account Che Core :: API :: Account diff --git a/wsmaster/che-core-api-auth-azure-devops/pom.xml b/wsmaster/che-core-api-auth-azure-devops/pom.xml index c247555aff..a78e340465 100644 --- a/wsmaster/che-core-api-auth-azure-devops/pom.xml +++ b/wsmaster/che-core-api-auth-azure-devops/pom.xml @@ -17,7 +17,7 @@ che-master-parent org.eclipse.che.core - 7.69.0-SNAPSHOT + 7.70.0-SNAPSHOT che-core-api-auth-azure-devops jar diff --git a/wsmaster/che-core-api-auth-bitbucket/pom.xml b/wsmaster/che-core-api-auth-bitbucket/pom.xml index 5bdf7561c8..f40b4fbe73 100644 --- a/wsmaster/che-core-api-auth-bitbucket/pom.xml +++ b/wsmaster/che-core-api-auth-bitbucket/pom.xml @@ -17,7 +17,7 @@ che-master-parent org.eclipse.che.core - 7.69.0-SNAPSHOT + 7.70.0-SNAPSHOT che-core-api-auth-bitbucket jar diff --git a/wsmaster/che-core-api-auth-github/pom.xml b/wsmaster/che-core-api-auth-github/pom.xml index 21f40c027a..ed11cd6018 100644 --- a/wsmaster/che-core-api-auth-github/pom.xml +++ b/wsmaster/che-core-api-auth-github/pom.xml @@ -17,7 +17,7 @@ che-master-parent org.eclipse.che.core - 7.69.0-SNAPSHOT + 7.70.0-SNAPSHOT che-core-api-auth-github jar diff --git a/wsmaster/che-core-api-auth-gitlab/pom.xml b/wsmaster/che-core-api-auth-gitlab/pom.xml index ffe5981efd..a6d6f49166 100644 --- a/wsmaster/che-core-api-auth-gitlab/pom.xml +++ b/wsmaster/che-core-api-auth-gitlab/pom.xml @@ -17,7 +17,7 @@ che-master-parent org.eclipse.che.core - 7.69.0-SNAPSHOT + 7.70.0-SNAPSHOT che-core-api-auth-gitlab jar diff --git a/wsmaster/che-core-api-auth-openshift/pom.xml b/wsmaster/che-core-api-auth-openshift/pom.xml index f10401590d..bae35c49e3 100644 --- a/wsmaster/che-core-api-auth-openshift/pom.xml +++ b/wsmaster/che-core-api-auth-openshift/pom.xml @@ -17,7 +17,7 @@ che-master-parent org.eclipse.che.core - 7.69.0-SNAPSHOT + 7.70.0-SNAPSHOT che-core-api-auth-openshift jar diff --git a/wsmaster/che-core-api-auth-shared/pom.xml b/wsmaster/che-core-api-auth-shared/pom.xml index ef37b49e3a..f6a624a6b5 100644 --- a/wsmaster/che-core-api-auth-shared/pom.xml +++ b/wsmaster/che-core-api-auth-shared/pom.xml @@ -17,7 +17,7 @@ che-master-parent org.eclipse.che.core - 7.69.0-SNAPSHOT + 7.70.0-SNAPSHOT che-core-api-auth-shared jar diff --git a/wsmaster/che-core-api-auth/pom.xml b/wsmaster/che-core-api-auth/pom.xml index b2d0cbfe5b..f2926a4b26 100644 --- a/wsmaster/che-core-api-auth/pom.xml +++ b/wsmaster/che-core-api-auth/pom.xml @@ -17,7 +17,7 @@ che-master-parent org.eclipse.che.core - 7.69.0-SNAPSHOT + 7.70.0-SNAPSHOT che-core-api-auth jar diff --git a/wsmaster/che-core-api-devfile-shared/pom.xml b/wsmaster/che-core-api-devfile-shared/pom.xml index bb5b79a322..afe6c76b1d 100644 --- a/wsmaster/che-core-api-devfile-shared/pom.xml +++ b/wsmaster/che-core-api-devfile-shared/pom.xml @@ -17,7 +17,7 @@ che-master-parent org.eclipse.che.core - 7.69.0-SNAPSHOT + 7.70.0-SNAPSHOT che-core-api-devfile-shared jar diff --git a/wsmaster/che-core-api-devfile/pom.xml b/wsmaster/che-core-api-devfile/pom.xml index 7714f4d80a..dcd7114188 100644 --- a/wsmaster/che-core-api-devfile/pom.xml +++ b/wsmaster/che-core-api-devfile/pom.xml @@ -17,7 +17,7 @@ che-master-parent org.eclipse.che.core - 7.69.0-SNAPSHOT + 7.70.0-SNAPSHOT che-core-api-devfile jar diff --git a/wsmaster/che-core-api-factory-azure-devops/pom.xml b/wsmaster/che-core-api-factory-azure-devops/pom.xml index c9539c841c..0fe7eae3fa 100644 --- a/wsmaster/che-core-api-factory-azure-devops/pom.xml +++ b/wsmaster/che-core-api-factory-azure-devops/pom.xml @@ -17,7 +17,7 @@ che-master-parent org.eclipse.che.core - 7.69.0-SNAPSHOT + 7.70.0-SNAPSHOT che-core-api-factory-azure-devops jar diff --git a/wsmaster/che-core-api-factory-bitbucket-server/pom.xml b/wsmaster/che-core-api-factory-bitbucket-server/pom.xml index 7171653073..71dc697a03 100644 --- a/wsmaster/che-core-api-factory-bitbucket-server/pom.xml +++ b/wsmaster/che-core-api-factory-bitbucket-server/pom.xml @@ -17,7 +17,7 @@ che-master-parent org.eclipse.che.core - 7.69.0-SNAPSHOT + 7.70.0-SNAPSHOT che-core-api-factory-bitbucket-server jar diff --git a/wsmaster/che-core-api-factory-bitbucket/pom.xml b/wsmaster/che-core-api-factory-bitbucket/pom.xml index c41f17a625..d26b12dfba 100644 --- a/wsmaster/che-core-api-factory-bitbucket/pom.xml +++ b/wsmaster/che-core-api-factory-bitbucket/pom.xml @@ -17,7 +17,7 @@ che-master-parent org.eclipse.che.core - 7.69.0-SNAPSHOT + 7.70.0-SNAPSHOT che-core-api-factory-bitbucket jar diff --git a/wsmaster/che-core-api-factory-git-ssh/pom.xml b/wsmaster/che-core-api-factory-git-ssh/pom.xml index 8efb50035f..1837ff1394 100644 --- a/wsmaster/che-core-api-factory-git-ssh/pom.xml +++ b/wsmaster/che-core-api-factory-git-ssh/pom.xml @@ -17,7 +17,7 @@ che-master-parent org.eclipse.che.core - 7.69.0-SNAPSHOT + 7.70.0-SNAPSHOT che-core-api-factory-git-ssh jar diff --git a/wsmaster/che-core-api-factory-github/pom.xml b/wsmaster/che-core-api-factory-github/pom.xml index 2309a59a1a..939e8bba1c 100644 --- a/wsmaster/che-core-api-factory-github/pom.xml +++ b/wsmaster/che-core-api-factory-github/pom.xml @@ -17,7 +17,7 @@ che-master-parent org.eclipse.che.core - 7.69.0-SNAPSHOT + 7.70.0-SNAPSHOT che-core-api-factory-github jar diff --git a/wsmaster/che-core-api-factory-gitlab/pom.xml b/wsmaster/che-core-api-factory-gitlab/pom.xml index 54770c30a4..c38b67a4f9 100644 --- a/wsmaster/che-core-api-factory-gitlab/pom.xml +++ b/wsmaster/che-core-api-factory-gitlab/pom.xml @@ -17,7 +17,7 @@ che-master-parent org.eclipse.che.core - 7.69.0-SNAPSHOT + 7.70.0-SNAPSHOT che-core-api-factory-gitlab jar diff --git a/wsmaster/che-core-api-factory-shared/pom.xml b/wsmaster/che-core-api-factory-shared/pom.xml index 1c0e516251..1bd6b4e614 100644 --- a/wsmaster/che-core-api-factory-shared/pom.xml +++ b/wsmaster/che-core-api-factory-shared/pom.xml @@ -17,7 +17,7 @@ che-master-parent org.eclipse.che.core - 7.69.0-SNAPSHOT + 7.70.0-SNAPSHOT che-core-api-factory-shared jar diff --git a/wsmaster/che-core-api-factory/pom.xml b/wsmaster/che-core-api-factory/pom.xml index d8230b6f96..a21f8fffe3 100644 --- a/wsmaster/che-core-api-factory/pom.xml +++ b/wsmaster/che-core-api-factory/pom.xml @@ -17,7 +17,7 @@ che-master-parent org.eclipse.che.core - 7.69.0-SNAPSHOT + 7.70.0-SNAPSHOT che-core-api-factory jar diff --git a/wsmaster/che-core-api-logger-shared/pom.xml b/wsmaster/che-core-api-logger-shared/pom.xml index d61a73af48..9c57140cc3 100644 --- a/wsmaster/che-core-api-logger-shared/pom.xml +++ b/wsmaster/che-core-api-logger-shared/pom.xml @@ -17,7 +17,7 @@ che-master-parent org.eclipse.che.core - 7.69.0-SNAPSHOT + 7.70.0-SNAPSHOT che-core-api-logger-shared jar diff --git a/wsmaster/che-core-api-logger/pom.xml b/wsmaster/che-core-api-logger/pom.xml index f5a57424cb..bb2560e1a4 100644 --- a/wsmaster/che-core-api-logger/pom.xml +++ b/wsmaster/che-core-api-logger/pom.xml @@ -17,7 +17,7 @@ che-master-parent org.eclipse.che.core - 7.69.0-SNAPSHOT + 7.70.0-SNAPSHOT che-core-api-logger jar diff --git a/wsmaster/che-core-api-metrics/pom.xml b/wsmaster/che-core-api-metrics/pom.xml index 40e07b6e96..356028c353 100644 --- a/wsmaster/che-core-api-metrics/pom.xml +++ b/wsmaster/che-core-api-metrics/pom.xml @@ -17,7 +17,7 @@ che-master-parent org.eclipse.che.core - 7.69.0-SNAPSHOT + 7.70.0-SNAPSHOT che-core-api-metrics jar diff --git a/wsmaster/che-core-api-ssh-shared/pom.xml b/wsmaster/che-core-api-ssh-shared/pom.xml index 357f06151b..ea11c8847b 100644 --- a/wsmaster/che-core-api-ssh-shared/pom.xml +++ b/wsmaster/che-core-api-ssh-shared/pom.xml @@ -17,7 +17,7 @@ che-master-parent org.eclipse.che.core - 7.69.0-SNAPSHOT + 7.70.0-SNAPSHOT che-core-api-ssh-shared jar diff --git a/wsmaster/che-core-api-ssh/pom.xml b/wsmaster/che-core-api-ssh/pom.xml index 2ec5d1c02c..4fadfd8053 100644 --- a/wsmaster/che-core-api-ssh/pom.xml +++ b/wsmaster/che-core-api-ssh/pom.xml @@ -17,7 +17,7 @@ che-master-parent org.eclipse.che.core - 7.69.0-SNAPSHOT + 7.70.0-SNAPSHOT che-core-api-ssh jar diff --git a/wsmaster/che-core-api-system-shared/pom.xml b/wsmaster/che-core-api-system-shared/pom.xml index 0d67bee478..9021ff570f 100644 --- a/wsmaster/che-core-api-system-shared/pom.xml +++ b/wsmaster/che-core-api-system-shared/pom.xml @@ -17,7 +17,7 @@ che-master-parent org.eclipse.che.core - 7.69.0-SNAPSHOT + 7.70.0-SNAPSHOT che-core-api-system-shared jar diff --git a/wsmaster/che-core-api-system/pom.xml b/wsmaster/che-core-api-system/pom.xml index 47b4e67d8f..1b86a57eb5 100644 --- a/wsmaster/che-core-api-system/pom.xml +++ b/wsmaster/che-core-api-system/pom.xml @@ -17,7 +17,7 @@ che-master-parent org.eclipse.che.core - 7.69.0-SNAPSHOT + 7.70.0-SNAPSHOT che-core-api-system jar diff --git a/wsmaster/che-core-api-user-shared/pom.xml b/wsmaster/che-core-api-user-shared/pom.xml index a565dbfc25..d333f37608 100644 --- a/wsmaster/che-core-api-user-shared/pom.xml +++ b/wsmaster/che-core-api-user-shared/pom.xml @@ -17,7 +17,7 @@ che-master-parent org.eclipse.che.core - 7.69.0-SNAPSHOT + 7.70.0-SNAPSHOT che-core-api-user-shared Che Core :: API :: User :: Shared diff --git a/wsmaster/che-core-api-user/pom.xml b/wsmaster/che-core-api-user/pom.xml index f745bb7bb3..792e4f3c40 100644 --- a/wsmaster/che-core-api-user/pom.xml +++ b/wsmaster/che-core-api-user/pom.xml @@ -17,7 +17,7 @@ che-master-parent org.eclipse.che.core - 7.69.0-SNAPSHOT + 7.70.0-SNAPSHOT che-core-api-user Che Core :: API :: User diff --git a/wsmaster/che-core-api-workspace-activity/pom.xml b/wsmaster/che-core-api-workspace-activity/pom.xml index 8664d938b2..ce840cf2d6 100644 --- a/wsmaster/che-core-api-workspace-activity/pom.xml +++ b/wsmaster/che-core-api-workspace-activity/pom.xml @@ -17,7 +17,7 @@ che-master-parent org.eclipse.che.core - 7.69.0-SNAPSHOT + 7.70.0-SNAPSHOT che-core-api-workspace-activity jar diff --git a/wsmaster/che-core-api-workspace-shared/pom.xml b/wsmaster/che-core-api-workspace-shared/pom.xml index a1fcc6daa3..6445cc94e5 100644 --- a/wsmaster/che-core-api-workspace-shared/pom.xml +++ b/wsmaster/che-core-api-workspace-shared/pom.xml @@ -17,7 +17,7 @@ che-master-parent org.eclipse.che.core - 7.69.0-SNAPSHOT + 7.70.0-SNAPSHOT che-core-api-workspace-shared jar diff --git a/wsmaster/che-core-api-workspace/pom.xml b/wsmaster/che-core-api-workspace/pom.xml index 5e121bab63..1eec47b572 100644 --- a/wsmaster/che-core-api-workspace/pom.xml +++ b/wsmaster/che-core-api-workspace/pom.xml @@ -17,7 +17,7 @@ che-master-parent org.eclipse.che.core - 7.69.0-SNAPSHOT + 7.70.0-SNAPSHOT che-core-api-workspace jar diff --git a/wsmaster/che-core-sql-schema/pom.xml b/wsmaster/che-core-sql-schema/pom.xml index c161b35b9c..3552f11f70 100644 --- a/wsmaster/che-core-sql-schema/pom.xml +++ b/wsmaster/che-core-sql-schema/pom.xml @@ -17,7 +17,7 @@ che-master-parent org.eclipse.che.core - 7.69.0-SNAPSHOT + 7.70.0-SNAPSHOT che-core-sql-schema Che Core :: SQL :: Schema diff --git a/wsmaster/integration-tests/cascade-removal/pom.xml b/wsmaster/integration-tests/cascade-removal/pom.xml index 05b9c4a932..03929107e8 100644 --- a/wsmaster/integration-tests/cascade-removal/pom.xml +++ b/wsmaster/integration-tests/cascade-removal/pom.xml @@ -17,7 +17,7 @@ integration-tests-parent org.eclipse.che.core - 7.69.0-SNAPSHOT + 7.70.0-SNAPSHOT cascade-removal Integration Tests :: Cascade Removal diff --git a/wsmaster/integration-tests/mysql-tck/pom.xml b/wsmaster/integration-tests/mysql-tck/pom.xml index 578959d1ed..3c6efcc998 100644 --- a/wsmaster/integration-tests/mysql-tck/pom.xml +++ b/wsmaster/integration-tests/mysql-tck/pom.xml @@ -17,7 +17,7 @@ integration-tests-parent org.eclipse.che.core - 7.69.0-SNAPSHOT + 7.70.0-SNAPSHOT mysql-tck jar diff --git a/wsmaster/integration-tests/pom.xml b/wsmaster/integration-tests/pom.xml index 1aeccd46af..6d487b4842 100644 --- a/wsmaster/integration-tests/pom.xml +++ b/wsmaster/integration-tests/pom.xml @@ -17,7 +17,7 @@ che-master-parent org.eclipse.che.core - 7.69.0-SNAPSHOT + 7.70.0-SNAPSHOT ../pom.xml integration-tests-parent diff --git a/wsmaster/integration-tests/postgresql-tck/pom.xml b/wsmaster/integration-tests/postgresql-tck/pom.xml index 342a581850..fb88c993e3 100644 --- a/wsmaster/integration-tests/postgresql-tck/pom.xml +++ b/wsmaster/integration-tests/postgresql-tck/pom.xml @@ -17,7 +17,7 @@ integration-tests-parent org.eclipse.che.core - 7.69.0-SNAPSHOT + 7.70.0-SNAPSHOT postgresql-tck jar diff --git a/wsmaster/pom.xml b/wsmaster/pom.xml index 0b2b3d16c2..8371a1bd67 100644 --- a/wsmaster/pom.xml +++ b/wsmaster/pom.xml @@ -17,7 +17,7 @@ che-core-parent org.eclipse.che.core - 7.69.0-SNAPSHOT + 7.70.0-SNAPSHOT ../core/pom.xml che-master-parent From fbea05f0cc93b158f60cedf38646b88da9755584 Mon Sep 17 00:00:00 2001 From: Ilya Buziuk Date: Wed, 7 Jun 2023 15:30:01 +0200 Subject: [PATCH 28/75] chore: devfile update --- devfile.yaml | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/devfile.yaml b/devfile.yaml index c4b5b938ee..79a7b2509a 100644 --- a/devfile.yaml +++ b/devfile.yaml @@ -1,10 +1,10 @@ -schemaVersion: 2.1.0 +schemaVersion: 2.2.0 metadata: - name: che-server-in-che + generateName: che-server components: - container: image: quay.io/devfile/universal-developer-image:ubi8-latest - memoryLimit: 8Gi + memoryLimit: 12Gi mountSources: true volumeMounts: - name: m2 @@ -13,11 +13,13 @@ components: - name: m2 volume: {} commands: - - exec: - commandLine: mvn clean install -DskipTests - component: maven - group: - isDefault: true - kind: build + - id: build + exec: + label: "1. Build" + component: tools workingDir: ${PROJECT_SOURCE} - id: mvn-build + commandLine: | + mvn clean install -DskipTests + group: + kind: build + isDefault: true From ab83bee40050da12630bc5ab380229cb9e23dee8 Mon Sep 17 00:00:00 2001 From: Igor Vinokur Date: Thu, 15 Jun 2023 13:41:43 +0300 Subject: [PATCH 29/75] Omit extracting subfolder from a workspace URL (#523) sparce-checkoutis no longer available from devfile 2.1, so omit the subfolder mechanism in order to support branch names with a / sign. --- .../github/GithubSourceStorageBuilder.java | 9 +--- .../server/github/GithubURLParser.java | 9 ++-- .../api/factory/server/github/GithubUrl.java | 23 ----------- .../server/github/GithubURLParserTest.java | 41 ++++++++----------- .../GitlabFactoryParametersResolver.java | 3 +- .../api/factory/server/gitlab/GitlabUrl.java | 23 ----------- .../server/gitlab/GitlabUrlParser.java | 20 ++++----- .../server/gitlab/GitlabUrlParserTest.java | 28 +++++-------- .../factory/server/gitlab/GitlabUrlTest.java | 4 -- 9 files changed, 41 insertions(+), 119 deletions(-) diff --git a/wsmaster/che-core-api-factory-github/src/main/java/org/eclipse/che/api/factory/server/github/GithubSourceStorageBuilder.java b/wsmaster/che-core-api-factory-github/src/main/java/org/eclipse/che/api/factory/server/github/GithubSourceStorageBuilder.java index 18719bfd52..ff99c34f87 100644 --- a/wsmaster/che-core-api-factory-github/src/main/java/org/eclipse/che/api/factory/server/github/GithubSourceStorageBuilder.java +++ b/wsmaster/che-core-api-factory-github/src/main/java/org/eclipse/che/api/factory/server/github/GithubSourceStorageBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012-2021 Red Hat, Inc. + * Copyright (c) 2012-2023 Red Hat, Inc. * This program and the accompanying materials are made * available under the terms of the Eclipse Public License 2.0 * which is available at https://www.eclipse.org/legal/epl-2.0/ @@ -13,7 +13,6 @@ package org.eclipse.che.api.factory.server.github; import static org.eclipse.che.dto.server.DtoFactory.newDto; -import com.google.common.base.Strings; import java.util.HashMap; import java.util.Map; import javax.inject.Singleton; @@ -40,9 +39,6 @@ public class GithubSourceStorageBuilder { Map parameters = new HashMap<>(2); parameters.put("branch", githubUrl.getBranch()); - if (!Strings.isNullOrEmpty(githubUrl.getSubfolder())) { - parameters.put("keepDir", githubUrl.getSubfolder()); - } return newDto(SourceStorageDto.class) .withLocation(githubUrl.repositoryLocation()) .withType("github") @@ -59,7 +55,6 @@ public class GithubSourceStorageBuilder { return newDto(SourceDto.class) .withLocation(githubUrl.repositoryLocation()) .withType("github") - .withBranch(githubUrl.getBranch()) - .withSparseCheckoutDir(githubUrl.getSubfolder()); + .withBranch(githubUrl.getBranch()); } } diff --git a/wsmaster/che-core-api-factory-github/src/main/java/org/eclipse/che/api/factory/server/github/GithubURLParser.java b/wsmaster/che-core-api-factory-github/src/main/java/org/eclipse/che/api/factory/server/github/GithubURLParser.java index bd71791a6a..811853e51d 100644 --- a/wsmaster/che-core-api-factory-github/src/main/java/org/eclipse/che/api/factory/server/github/GithubURLParser.java +++ b/wsmaster/che-core-api-factory-github/src/main/java/org/eclipse/che/api/factory/server/github/GithubURLParser.java @@ -99,20 +99,20 @@ public class GithubURLParser { this.githubPattern = compile( format( - "^%s/(?[^/]++)/(?[^/]++)((/)|(?:/tree/(?[^/]++)(?:/(?.*))?)|(/pull/(?[^/]++)))?$", + "^%s/(?[^/]+)/(?[^/]++)((/)|(?:/tree/(?.++))|(/pull/(?\\d++)))?$", endpoint)); } public boolean isValid(@NotNull String url) { - return githubPattern.matcher(url).matches(); + return githubPattern.matcher(trimEnd(url, '/')).matches(); } public GithubUrl parseWithoutAuthentication(String url) throws ApiException { - return parse(url, false); + return parse(trimEnd(url, '/'), false); } public GithubUrl parse(String url) throws ApiException { - return parse(url, true); + return parse(trimEnd(url, '/'), true); } private GithubUrl parse(String url, boolean authenticationRequired) throws ApiException { @@ -173,7 +173,6 @@ public class GithubURLParser { .withDisableSubdomainIsolation(disableSubdomainIsolation) .withBranch(branchName) .withLatestCommit(latestCommit) - .withSubfolder(matcher.group("subFolder")) .withDevfileFilenames(devfileFilenamesProvider.getConfiguredDevfileFilenames()) .withUrl(url); } diff --git a/wsmaster/che-core-api-factory-github/src/main/java/org/eclipse/che/api/factory/server/github/GithubUrl.java b/wsmaster/che-core-api-factory-github/src/main/java/org/eclipse/che/api/factory/server/github/GithubUrl.java index d00cd7c7f5..46ea5be275 100644 --- a/wsmaster/che-core-api-factory-github/src/main/java/org/eclipse/che/api/factory/server/github/GithubUrl.java +++ b/wsmaster/che-core-api-factory-github/src/main/java/org/eclipse/che/api/factory/server/github/GithubUrl.java @@ -46,9 +46,6 @@ public class GithubUrl extends DefaultFactoryUrl { /** SHA of the latest commit in the current branch */ private String latestCommit; - /** Subfolder if any */ - private String subfolder; - private String serverUrl; private boolean disableSubdomainIsolation; @@ -143,26 +140,6 @@ public class GithubUrl extends DefaultFactoryUrl { return this; } - /** - * Gets subfolder of this github url - * - * @return the subfolder part - */ - public String getSubfolder() { - return this.subfolder; - } - - /** - * Sets the subfolder represented by the URL. - * - * @param subfolder path inside the repository - * @return current github instance - */ - protected GithubUrl withSubfolder(String subfolder) { - this.subfolder = subfolder; - return this; - } - public GithubUrl withServerUrl(String serverUrl) { this.serverUrl = serverUrl; return this; diff --git a/wsmaster/che-core-api-factory-github/src/test/java/org/eclipse/che/api/factory/server/github/GithubURLParserTest.java b/wsmaster/che-core-api-factory-github/src/test/java/org/eclipse/che/api/factory/server/github/GithubURLParserTest.java index 5a16e81e7b..42a97931a4 100644 --- a/wsmaster/che-core-api-factory-github/src/test/java/org/eclipse/che/api/factory/server/github/GithubURLParserTest.java +++ b/wsmaster/che-core-api-factory-github/src/test/java/org/eclipse/che/api/factory/server/github/GithubURLParserTest.java @@ -76,15 +76,13 @@ public class GithubURLParserTest { /** Compare parsing */ @Test(dataProvider = "parsing") - public void checkParsing( - String url, String username, String repository, String branch, String subfolder) + public void checkParsing(String url, String username, String repository, String branch) throws ApiException { GithubUrl githubUrl = githubUrlParser.parse(url); assertEquals(githubUrl.getUsername(), username); assertEquals(githubUrl.getRepository(), repository); assertEquals(githubUrl.getBranch(), branch); - assertEquals(githubUrl.getSubfolder(), subfolder); } /** Compare parsing */ @@ -117,31 +115,24 @@ public class GithubURLParserTest { @DataProvider(name = "parsing") public Object[][] expectedParsing() { return new Object[][] { - {"https://github.com/eclipse/che", "eclipse", "che", null, null}, - {"https://github.com/eclipse/che123", "eclipse", "che123", null, null}, - {"https://github.com/eclipse/che.git", "eclipse", "che", null, null}, - {"https://github.com/eclipse/che.with.dot.git", "eclipse", "che.with.dot", null, null}, - {"https://github.com/eclipse/-.git", "eclipse", "-", null, null}, - {"https://github.com/eclipse/-j.git", "eclipse", "-j", null, null}, - {"https://github.com/eclipse/-", "eclipse", "-", null, null}, - {"https://github.com/eclipse/che-with-hyphen", "eclipse", "che-with-hyphen", null, null}, - {"https://github.com/eclipse/che-with-hyphen.git", "eclipse", "che-with-hyphen", null, null}, - {"https://github.com/eclipse/che/", "eclipse", "che", null, null}, - {"https://github.com/eclipse/repositorygit", "eclipse", "repositorygit", null, null}, - {"https://github.com/eclipse/che/tree/4.2.x", "eclipse", "che", "4.2.x", null}, + {"https://github.com/eclipse/che", "eclipse", "che", null}, + {"https://github.com/eclipse/che123", "eclipse", "che123", null}, + {"https://github.com/eclipse/che.git", "eclipse", "che", null}, + {"https://github.com/eclipse/che.with.dot.git", "eclipse", "che.with.dot", null}, + {"https://github.com/eclipse/-.git", "eclipse", "-", null}, + {"https://github.com/eclipse/-j.git", "eclipse", "-j", null}, + {"https://github.com/eclipse/-", "eclipse", "-", null}, + {"https://github.com/eclipse/che-with-hyphen", "eclipse", "che-with-hyphen", null}, + {"https://github.com/eclipse/che-with-hyphen.git", "eclipse", "che-with-hyphen", null}, + {"https://github.com/eclipse/che/", "eclipse", "che", null}, + {"https://github.com/eclipse/repositorygit", "eclipse", "repositorygit", null}, + {"https://github.com/eclipse/che/tree/4.2.x", "eclipse", "che", "4.2.x"}, + {"https://github.com/eclipse/che/tree/master", "eclipse", "che", "master"}, { - "https://github.com/eclipse/che/tree/master/dashboard/", + "https://github.com/eclipse/che/tree/branch/with/slash", "eclipse", "che", - "master", - "dashboard/" - }, - { - "https://github.com/eclipse/che/tree/master/plugins/plugin-git/che-plugin-git-ext-git", - "eclipse", - "che", - "master", - "plugins/plugin-git/che-plugin-git-ext-git" + "branch/with/slash" } }; } diff --git a/wsmaster/che-core-api-factory-gitlab/src/main/java/org/eclipse/che/api/factory/server/gitlab/GitlabFactoryParametersResolver.java b/wsmaster/che-core-api-factory-gitlab/src/main/java/org/eclipse/che/api/factory/server/gitlab/GitlabFactoryParametersResolver.java index c420da0ea9..cdbf4a0204 100644 --- a/wsmaster/che-core-api-factory-gitlab/src/main/java/org/eclipse/che/api/factory/server/gitlab/GitlabFactoryParametersResolver.java +++ b/wsmaster/che-core-api-factory-gitlab/src/main/java/org/eclipse/che/api/factory/server/gitlab/GitlabFactoryParametersResolver.java @@ -136,8 +136,7 @@ public class GitlabFactoryParametersResolver extends RawDevfileUrlFactoryParamet newDto(SourceDto.class) .withLocation(gitlabUrl.repositoryLocation()) .withType("git") - .withBranch(gitlabUrl.getBranch()) - .withSparseCheckoutDir(gitlabUrl.getSubfolder())) + .withBranch(gitlabUrl.getBranch())) .withName(gitlabUrl.getProject()), project -> { final String location = project.getSource().getLocation(); diff --git a/wsmaster/che-core-api-factory-gitlab/src/main/java/org/eclipse/che/api/factory/server/gitlab/GitlabUrl.java b/wsmaster/che-core-api-factory-gitlab/src/main/java/org/eclipse/che/api/factory/server/gitlab/GitlabUrl.java index 1e581bc255..057630821a 100644 --- a/wsmaster/che-core-api-factory-gitlab/src/main/java/org/eclipse/che/api/factory/server/gitlab/GitlabUrl.java +++ b/wsmaster/che-core-api-factory-gitlab/src/main/java/org/eclipse/che/api/factory/server/gitlab/GitlabUrl.java @@ -49,9 +49,6 @@ public class GitlabUrl extends DefaultFactoryUrl { /** Branch name */ private String branch; - /** Subfolder if any */ - private String subfolder; - /** Devfile filenames list */ private final List devfileFilenames = new ArrayList<>(); @@ -129,26 +126,6 @@ public class GitlabUrl extends DefaultFactoryUrl { return this; } - /** - * Gets subfolder of this gitlab url - * - * @return the subfolder part - */ - public String getSubfolder() { - return this.subfolder; - } - - /** - * Sets the subfolder represented by the URL. - * - * @param subfolder path inside the repository - * @return current gitlab URL instance - */ - protected GitlabUrl withSubfolder(String subfolder) { - this.subfolder = subfolder; - return this; - } - /** * Provides list of configured devfile filenames with locations * diff --git a/wsmaster/che-core-api-factory-gitlab/src/main/java/org/eclipse/che/api/factory/server/gitlab/GitlabUrlParser.java b/wsmaster/che-core-api-factory-gitlab/src/main/java/org/eclipse/che/api/factory/server/gitlab/GitlabUrlParser.java index f25cbd7f8e..a561866262 100644 --- a/wsmaster/che-core-api-factory-gitlab/src/main/java/org/eclipse/che/api/factory/server/gitlab/GitlabUrlParser.java +++ b/wsmaster/che-core-api-factory-gitlab/src/main/java/org/eclipse/che/api/factory/server/gitlab/GitlabUrlParser.java @@ -46,7 +46,7 @@ public class GitlabUrlParser { private final PersonalAccessTokenManager personalAccessTokenManager; private static final List gitlabUrlPatternTemplates = List.of( - "^(?%s)/(?([^/]++/?)+)/-/tree/(?[^/]++)(/)?(?[^/]++)?", + "^(?%s)/(?([^/]++/?)+)/-/tree/(?.++)(/)?", "^(?%s)/(?.*)"); // a wider one, should be the last in the // list private final List gitlabUrlPatterns = new ArrayList<>(); @@ -93,7 +93,8 @@ public class GitlabUrlParser { } public boolean isValid(@NotNull String url) { - return gitlabUrlPatterns.stream().anyMatch(pattern -> pattern.matcher(url).matches()) + return gitlabUrlPatterns.stream() + .anyMatch(pattern -> pattern.matcher(trimEnd(url, '/')).matches()) // If the Gitlab URL is not configured, try to find it in a manually added user namespace // token. || isUserTokenPresent(url) @@ -144,15 +145,15 @@ public class GitlabUrlParser { * {@link GitlabUrl} objects. */ public GitlabUrl parse(String url) { - + String trimmedUrl = trimEnd(url, '/'); Optional matcherOptional = gitlabUrlPatterns.stream() - .map(pattern -> pattern.matcher(url)) + .map(pattern -> pattern.matcher(trimmedUrl)) .filter(Matcher::matches) .findFirst() - .or(() -> getPatternMatcherByUrl(url)); + .or(() -> getPatternMatcherByUrl(trimmedUrl)); if (matcherOptional.isPresent()) { - return parse(matcherOptional.get()).withUrl(url); + return parse(matcherOptional.get()).withUrl(trimmedUrl); } else { throw new UnsupportedOperationException( "The gitlab integration is not configured properly and cannot be used at this moment." @@ -168,23 +169,16 @@ public class GitlabUrlParser { } String branch = null; - String subfolder = null; try { branch = matcher.group("branch"); } catch (IllegalArgumentException e) { // ok no such group } - try { - subfolder = matcher.group("subfolder"); - } catch (IllegalArgumentException e) { - // ok no such group - } return new GitlabUrl() .withHostName(host) .withSubGroups(subGroups) .withBranch(branch) - .withSubfolder(subfolder) .withDevfileFilenames(devfileFilenamesProvider.getConfiguredDevfileFilenames()); } } diff --git a/wsmaster/che-core-api-factory-gitlab/src/test/java/org/eclipse/che/api/factory/server/gitlab/GitlabUrlParserTest.java b/wsmaster/che-core-api-factory-gitlab/src/test/java/org/eclipse/che/api/factory/server/gitlab/GitlabUrlParserTest.java index c9e13812d2..27aadf7c2a 100644 --- a/wsmaster/che-core-api-factory-gitlab/src/test/java/org/eclipse/che/api/factory/server/gitlab/GitlabUrlParserTest.java +++ b/wsmaster/che-core-api-factory-gitlab/src/test/java/org/eclipse/che/api/factory/server/gitlab/GitlabUrlParserTest.java @@ -71,14 +71,12 @@ public class GitlabUrlParserTest { /** Compare parsing */ @Test(dataProvider = "parsing") - public void checkParsing( - String url, String project, String subGroups, String branch, String subfolder) { + public void checkParsing(String url, String project, String subGroups, String branch) { GitlabUrl gitlabUrl = gitlabUrlParser.parse(url); assertEquals(gitlabUrl.getProject(), project); assertEquals(gitlabUrl.getSubGroups(), subGroups); assertEquals(gitlabUrl.getBranch(), branch); - assertEquals(gitlabUrl.getSubfolder(), subfolder); } @Test @@ -123,33 +121,29 @@ public class GitlabUrlParserTest { @DataProvider(name = "parsing") public Object[][] expectedParsing() { return new Object[][] { - {"https://gitlab1.com/user/project1.git", "project1", "user/project1", null, null}, - {"https://gitlab1.com/user/project/test1.git", "test1", "user/project/test1", null, null}, + {"https://gitlab1.com/user/project1.git", "project1", "user/project1", null}, + {"https://gitlab1.com/user/project/test1.git", "test1", "user/project/test1", null}, { "https://gitlab1.com/user/project/group1/group2/test1.git", "test1", "user/project/group1/group2/test1", - null, null }, - {"https://gitlab1.com/user/project/", "project", "user/project", null, null}, - {"https://gitlab1.com/user/project/repo/", "repo", "user/project/repo", null, null}, + {"https://gitlab1.com/user/project/", "project", "user/project", null}, + {"https://gitlab1.com/user/project/repo/", "repo", "user/project/repo", null}, + {"https://gitlab1.com/user/project/-/tree/master/", "project", "user/project", "master"}, + {"https://gitlab1.com/user/project/repo/-/tree/foo", "repo", "user/project/repo", "foo"}, { - "https://gitlab1.com/user/project/-/tree/master/", "project", "user/project", "master", null - }, - { - "https://gitlab1.com/user/project/repo/-/tree/foo/subfolder", + "https://gitlab1.com/user/project/repo/-/tree/branch/with/slash", "repo", "user/project/repo", - "foo", - "subfolder" + "branch/with/slash" }, { - "https://gitlab1.com/user/project/group1/group2/repo/-/tree/foo/subfolder", + "https://gitlab1.com/user/project/group1/group2/repo/-/tree/foo/", "repo", "user/project/group1/group2/repo", - "foo", - "subfolder" + "foo" } }; } diff --git a/wsmaster/che-core-api-factory-gitlab/src/test/java/org/eclipse/che/api/factory/server/gitlab/GitlabUrlTest.java b/wsmaster/che-core-api-factory-gitlab/src/test/java/org/eclipse/che/api/factory/server/gitlab/GitlabUrlTest.java index afcc2d9321..e03e5b49f1 100644 --- a/wsmaster/che-core-api-factory-gitlab/src/test/java/org/eclipse/che/api/factory/server/gitlab/GitlabUrlTest.java +++ b/wsmaster/che-core-api-factory-gitlab/src/test/java/org/eclipse/che/api/factory/server/gitlab/GitlabUrlTest.java @@ -85,10 +85,6 @@ public class GitlabUrlTest { "https://gitlab.net/eclipse/fooproj/che/-/tree/foobranch/", "https://gitlab.net/api/v4/projects/eclipse%%2Ffooproj%%2Fche/repository/files/%s/raw?ref=foobranch" }, - { - "https://gitlab.net/eclipse/fooproj/che/-/tree/foobranch/subfolder", - "https://gitlab.net/api/v4/projects/eclipse%%2Ffooproj%%2Fche/repository/files/%s/raw?ref=foobranch" - }, }; } From 287b9030105565a7dadbb84eed14c24f30cab524 Mon Sep 17 00:00:00 2001 From: Igor Vinokur Date: Mon, 26 Jun 2023 17:18:32 +0300 Subject: [PATCH 30/75] Provision git credentials secrets on workspace start (#527) On workspace start iterate user PAT secrets. If a PAT secret is not included to the devworkspace-merged-git-credentials secret, create a git credentials secret based on the PAT secret. Remove the redundant logic of creation an empty workspace-credentials-secret secret. --- .../test-github-with-pat-setup-flow.sh | 1 + .../test-gitlab-with-pat-setup-flow.sh | 1 + .../KubernetesPersonalAccessTokenManager.java | 27 +++++ .../CredentialsSecretConfigurator.java | 64 +++++++++--- .../KubernetesNamespaceFactoryTest.java | 38 ------- .../CredentialsSecretConfiguratorTest.java | 98 ++++++++++++------- .../project/OpenShiftProjectFactoryTest.java | 86 ---------------- ...verAuthorizingFileContentProviderTest.java | 8 +- .../BitbucketServerScmFileResolverTest.java | 4 +- ...hubAuthorizingFileContentProviderTest.java | 12 +-- .../github/GithubScmFileResolverTest.java | 7 +- ...labAuthorizingFileContentProviderTest.java | 4 +- .../gitlab/GitlabScmFileResolverTest.java | 4 +- .../scm/AuthorizingFileContentProvider.java | 2 +- .../scm/PersonalAccessTokenManager.java | 30 ++++++ ...thorizingFactoryParameterResolverTest.java | 4 +- 16 files changed, 195 insertions(+), 195 deletions(-) diff --git a/.ci/openshift-ci/test-github-with-pat-setup-flow.sh b/.ci/openshift-ci/test-github-with-pat-setup-flow.sh index 53a01cf8e3..53ab05a2a8 100644 --- a/.ci/openshift-ci/test-github-with-pat-setup-flow.sh +++ b/.ci/openshift-ci/test-github-with-pat-setup-flow.sh @@ -29,6 +29,7 @@ trap "catchFinish" EXIT SIGINT setupTestEnvironment ${OCP_NON_ADMIN_USER_NAME} setupPersonalAccessToken ${GIT_PROVIDER_TYPE} ${GIT_PROVIDER_URL} ${GITHUB_USER_ID} ${GITHUB_PAT} +requestProvisionNamespace testFactoryResolverWithPatOAuth ${PUBLIC_REPO_URL} ${PRIVATE_REPO_URL} echo "[INFO] Check clone public repository with PAT setup" testCloneGitRepoWithSetupPat ${PUBLIC_REPO_WORKSPACE_NAME} ${PUBLIC_PROJECT_NAME} ${PUBLIC_REPO_URL} ${USER_CHE_NAMESPACE} ${GITHUB_PAT} diff --git a/.ci/openshift-ci/test-gitlab-with-pat-setup-flow.sh b/.ci/openshift-ci/test-gitlab-with-pat-setup-flow.sh index 2c2b44f429..c0ddfb6b09 100644 --- a/.ci/openshift-ci/test-gitlab-with-pat-setup-flow.sh +++ b/.ci/openshift-ci/test-gitlab-with-pat-setup-flow.sh @@ -29,6 +29,7 @@ trap "catchFinish" EXIT SIGINT setupTestEnvironment ${OCP_NON_ADMIN_USER_NAME} setupPersonalAccessToken ${GIT_PROVIDER_TYPE} ${GIT_PROVIDER_URL} ${GITLAB_USER_ID} ${GITLAB_PAT} +requestProvisionNamespace testFactoryResolverWithPatOAuth ${PUBLIC_REPO_URL} ${PRIVATE_REPO_URL} echo "[INFO] Check clone public repository with PAT setup" testCloneGitRepoWithSetupPat ${PUBLIC_REPO_WORKSPACE_NAME} ${PUBLIC_PROJECT_NAME} ${PUBLIC_REPO_URL} ${USER_CHE_NAMESPACE} ${GITLAB_PAT} diff --git a/infrastructures/infrastructure-factory/src/main/java/org/eclipse/che/api/factory/server/scm/kubernetes/KubernetesPersonalAccessTokenManager.java b/infrastructures/infrastructure-factory/src/main/java/org/eclipse/che/api/factory/server/scm/kubernetes/KubernetesPersonalAccessTokenManager.java index d7278cba4b..497123d3c5 100644 --- a/infrastructures/infrastructure-factory/src/main/java/org/eclipse/che/api/factory/server/scm/kubernetes/KubernetesPersonalAccessTokenManager.java +++ b/infrastructures/infrastructure-factory/src/main/java/org/eclipse/che/api/factory/server/scm/kubernetes/KubernetesPersonalAccessTokenManager.java @@ -146,6 +146,21 @@ public class KubernetesPersonalAccessTokenManager implements PersonalAccessToken return doGetPersonalAccessToken(cheUser, null, scmServerUrl); } + @Override + public PersonalAccessToken get(String scmServerUrl) + throws ScmConfigurationPersistenceException, ScmUnauthorizedException, + ScmCommunicationException, UnknownScmProviderException, + UnsatisfiedScmPreconditionException { + Subject subject = EnvironmentContext.getCurrent().getSubject(); + Optional tokenOptional = get(subject, scmServerUrl); + if (tokenOptional.isPresent()) { + return tokenOptional.get(); + } else { + // try to authenticate for the given URL + return fetchAndSave(subject, scmServerUrl); + } + } + @Override public Optional get( Subject cheUser, String oAuthProviderName, @Nullable String scmServerUrl) @@ -225,6 +240,18 @@ public class KubernetesPersonalAccessTokenManager implements PersonalAccessToken return personalAccessToken; } + @Override + public void store(String scmServerUrl) + throws UnsatisfiedScmPreconditionException, ScmConfigurationPersistenceException, + ScmCommunicationException, ScmUnauthorizedException { + Subject subject = EnvironmentContext.getCurrent().getSubject(); + Optional tokenOptional = get(subject, scmServerUrl); + if (tokenOptional.isPresent()) { + PersonalAccessToken personalAccessToken = tokenOptional.get(); + gitCredentialManager.createOrReplace(personalAccessToken); + } + } + private String getFirstNamespace() throws UnsatisfiedScmPreconditionException, ScmConfigurationPersistenceException { try { diff --git a/infrastructures/kubernetes/src/main/java/org/eclipse/che/workspace/infrastructure/kubernetes/namespace/configurator/CredentialsSecretConfigurator.java b/infrastructures/kubernetes/src/main/java/org/eclipse/che/workspace/infrastructure/kubernetes/namespace/configurator/CredentialsSecretConfigurator.java index 65a5774b59..016df5eeef 100644 --- a/infrastructures/kubernetes/src/main/java/org/eclipse/che/workspace/infrastructure/kubernetes/namespace/configurator/CredentialsSecretConfigurator.java +++ b/infrastructures/kubernetes/src/main/java/org/eclipse/che/workspace/infrastructure/kubernetes/namespace/configurator/CredentialsSecretConfigurator.java @@ -11,12 +11,17 @@ */ package org.eclipse.che.workspace.infrastructure.kubernetes.namespace.configurator; -import static org.eclipse.che.workspace.infrastructure.kubernetes.namespace.AbstractWorkspaceServiceAccount.CREDENTIALS_SECRET_NAME; - +import com.google.common.collect.ImmutableMap; import io.fabric8.kubernetes.api.model.Secret; -import io.fabric8.kubernetes.api.model.SecretBuilder; +import java.util.Base64; +import java.util.Map; import javax.inject.Inject; import javax.inject.Singleton; +import org.eclipse.che.api.factory.server.scm.PersonalAccessTokenManager; +import org.eclipse.che.api.factory.server.scm.exception.ScmCommunicationException; +import org.eclipse.che.api.factory.server.scm.exception.ScmConfigurationPersistenceException; +import org.eclipse.che.api.factory.server.scm.exception.ScmUnauthorizedException; +import org.eclipse.che.api.factory.server.scm.exception.UnsatisfiedScmPreconditionException; import org.eclipse.che.api.workspace.server.spi.InfrastructureException; import org.eclipse.che.api.workspace.server.spi.NamespaceResolutionContext; import org.eclipse.che.workspace.infrastructure.kubernetes.CheServerKubernetesClientFactory; @@ -30,27 +35,56 @@ import org.eclipse.che.workspace.infrastructure.kubernetes.CheServerKubernetesCl public class CredentialsSecretConfigurator implements NamespaceConfigurator { private final CheServerKubernetesClientFactory cheServerKubernetesClientFactory; + private final PersonalAccessTokenManager personalAccessTokenManager; + + private static final Map SEARCH_LABELS = + ImmutableMap.of( + "app.kubernetes.io/part-of", "che.eclipse.org", + "app.kubernetes.io/component", "scm-personal-access-token"); + private static final String ANNOTATION_SCM_URL = "che.eclipse.org/scm-url"; + private static final String MERGED_GIT_CREDENTIALS_SECRET_NAME = + "devworkspace-merged-git-credentials"; @Inject public CredentialsSecretConfigurator( - CheServerKubernetesClientFactory cheServerKubernetesClientFactory) { + CheServerKubernetesClientFactory cheServerKubernetesClientFactory, + PersonalAccessTokenManager personalAccessTokenManager) { this.cheServerKubernetesClientFactory = cheServerKubernetesClientFactory; + this.personalAccessTokenManager = personalAccessTokenManager; } @Override public void configure(NamespaceResolutionContext namespaceResolutionContext, String namespaceName) throws InfrastructureException { var client = cheServerKubernetesClientFactory.create(); - if (client.secrets().inNamespace(namespaceName).withName(CREDENTIALS_SECRET_NAME).get() - == null) { - Secret secret = - new SecretBuilder() - .withType("opaque") - .withNewMetadata() - .withName(CREDENTIALS_SECRET_NAME) - .endMetadata() - .build(); - client.secrets().inNamespace(namespaceName).create(secret); - } + Secret mergedCredentialsSecret = + client + .secrets() + .inNamespace(namespaceName) + .withName(MERGED_GIT_CREDENTIALS_SECRET_NAME) + .get(); + + client.secrets().inNamespace(namespaceName).withLabels(SEARCH_LABELS).list().getItems().stream() + .filter( + s -> + mergedCredentialsSecret == null + || !getSecretData(mergedCredentialsSecret, "credentials") + .contains(getSecretData(s, "token"))) + .forEach( + s -> { + try { + personalAccessTokenManager.store( + s.getMetadata().getAnnotations().get(ANNOTATION_SCM_URL)); + } catch (ScmCommunicationException + | ScmConfigurationPersistenceException + | UnsatisfiedScmPreconditionException + | ScmUnauthorizedException e) { + throw new RuntimeException(e); + } + }); + } + + private String getSecretData(Secret secret, String key) { + return new String(Base64.getDecoder().decode(secret.getData().get(key).getBytes())); } } diff --git a/infrastructures/kubernetes/src/test/java/org/eclipse/che/workspace/infrastructure/kubernetes/namespace/KubernetesNamespaceFactoryTest.java b/infrastructures/kubernetes/src/test/java/org/eclipse/che/workspace/infrastructure/kubernetes/namespace/KubernetesNamespaceFactoryTest.java index b0e6bd1d60..b24e010725 100644 --- a/infrastructures/kubernetes/src/test/java/org/eclipse/che/workspace/infrastructure/kubernetes/namespace/KubernetesNamespaceFactoryTest.java +++ b/infrastructures/kubernetes/src/test/java/org/eclipse/che/workspace/infrastructure/kubernetes/namespace/KubernetesNamespaceFactoryTest.java @@ -87,7 +87,6 @@ import org.eclipse.che.inject.ConfigurationException; import org.eclipse.che.workspace.infrastructure.kubernetes.CheServerKubernetesClientFactory; import org.eclipse.che.workspace.infrastructure.kubernetes.api.server.impls.KubernetesNamespaceMetaImpl; import org.eclipse.che.workspace.infrastructure.kubernetes.api.shared.KubernetesNamespaceMeta; -import org.eclipse.che.workspace.infrastructure.kubernetes.namespace.configurator.CredentialsSecretConfigurator; import org.eclipse.che.workspace.infrastructure.kubernetes.namespace.configurator.NamespaceConfigurator; import org.eclipse.che.workspace.infrastructure.kubernetes.namespace.configurator.PreferencesConfigMapConfigurator; import org.eclipse.che.workspace.infrastructure.kubernetes.namespace.configurator.WorkspaceServiceAccountConfigurator; @@ -451,43 +450,6 @@ public class KubernetesNamespaceFactoryTest { .get(PHASE_ATTRIBUTE)); // no phase - means such namespace does not exist } - @Test - public void shouldCreateCredentialsSecretIfNotExists() throws Exception { - // given - namespaceFactory = - spy( - new KubernetesNamespaceFactory( - "-che", - true, - true, - true, - NAMESPACE_LABELS, - NAMESPACE_ANNOTATIONS, - Set.of(new CredentialsSecretConfigurator(cheServerKubernetesClientFactory)), - cheServerKubernetesClientFactory, - preferenceManager, - pool)); - KubernetesNamespace toReturnNamespace = mock(KubernetesNamespace.class); - when(toReturnNamespace.getName()).thenReturn("namespaceName"); - doReturn(toReturnNamespace).when(namespaceFactory).doCreateNamespaceAccess(any(), any()); - MixedOperation mixedOperation = mock(MixedOperation.class); - when(k8sClient.secrets()).thenReturn(mixedOperation); - when(mixedOperation.inNamespace(anyString())).thenReturn(namespaceOperation); - when(namespaceResource.get()).thenReturn(null); - - // when - RuntimeIdentity identity = - new RuntimeIdentityImpl("workspace123", null, USER_ID, "workspace123"); - namespaceFactory.getOrCreate(identity); - - // then - ArgumentCaptor secretsCaptor = ArgumentCaptor.forClass(Secret.class); - verify(namespaceOperation).create(secretsCaptor.capture()); - Secret secret = secretsCaptor.getValue(); - Assert.assertEquals(secret.getMetadata().getName(), CREDENTIALS_SECRET_NAME); - Assert.assertEquals(secret.getType(), "opaque"); - } - @Test public void shouldCreatePreferencesConfigmapIfNotExists() throws Exception { // given diff --git a/infrastructures/kubernetes/src/test/java/org/eclipse/che/workspace/infrastructure/kubernetes/namespace/configurator/CredentialsSecretConfiguratorTest.java b/infrastructures/kubernetes/src/test/java/org/eclipse/che/workspace/infrastructure/kubernetes/namespace/configurator/CredentialsSecretConfiguratorTest.java index c31c99789f..bb12fa96e1 100644 --- a/infrastructures/kubernetes/src/test/java/org/eclipse/che/workspace/infrastructure/kubernetes/namespace/configurator/CredentialsSecretConfiguratorTest.java +++ b/infrastructures/kubernetes/src/test/java/org/eclipse/che/workspace/infrastructure/kubernetes/namespace/configurator/CredentialsSecretConfiguratorTest.java @@ -11,20 +11,25 @@ */ package org.eclipse.che.workspace.infrastructure.kubernetes.namespace.configurator; -import static org.eclipse.che.workspace.infrastructure.kubernetes.namespace.AbstractWorkspaceServiceAccount.CREDENTIALS_SECRET_NAME; +import static org.mockito.ArgumentMatchers.anyString; +import static org.mockito.ArgumentMatchers.eq; +import static org.mockito.Mockito.never; import static org.mockito.Mockito.spy; +import static org.mockito.Mockito.verify; import static org.mockito.Mockito.when; +import com.google.common.collect.ImmutableMap; import io.fabric8.kubernetes.api.model.SecretBuilder; import io.fabric8.kubernetes.client.KubernetesClient; import io.fabric8.kubernetes.client.server.mock.KubernetesServer; +import java.util.Base64; import java.util.Map; +import org.eclipse.che.api.factory.server.scm.PersonalAccessTokenManager; import org.eclipse.che.api.workspace.server.spi.InfrastructureException; import org.eclipse.che.api.workspace.server.spi.NamespaceResolutionContext; import org.eclipse.che.workspace.infrastructure.kubernetes.CheServerKubernetesClientFactory; import org.mockito.Mock; import org.mockito.testng.MockitoTestNGListener; -import org.testng.Assert; import org.testng.annotations.BeforeMethod; import org.testng.annotations.Listeners; import org.testng.annotations.Test; @@ -35,6 +40,7 @@ public class CredentialsSecretConfiguratorTest { private NamespaceConfigurator configurator; @Mock private CheServerKubernetesClientFactory cheServerKubernetesClientFactory; + @Mock private PersonalAccessTokenManager personalAccessTokenManager; private KubernetesServer serverMock; private NamespaceResolutionContext namespaceResolutionContext; @@ -42,10 +48,20 @@ public class CredentialsSecretConfiguratorTest { private final String TEST_WORKSPACE_ID = "workspace123"; private final String TEST_USER_ID = "user123"; private final String TEST_USERNAME = "jondoe"; + private final String PAT_SECRET_NAME = "personal-access-token-1"; + private static final String MERGED_GIT_CREDENTIALS_SECRET_NAME = + "devworkspace-merged-git-credentials"; + + private static final Map SEARCH_LABELS = + ImmutableMap.of( + "app.kubernetes.io/part-of", "che.eclipse.org", + "app.kubernetes.io/component", "scm-personal-access-token"); @BeforeMethod public void setUp() throws InfrastructureException { - configurator = new CredentialsSecretConfigurator(cheServerKubernetesClientFactory); + configurator = + new CredentialsSecretConfigurator( + cheServerKubernetesClientFactory, personalAccessTokenManager); serverMock = new KubernetesServer(true, true); serverMock.before(); @@ -57,28 +73,8 @@ public class CredentialsSecretConfiguratorTest { } @Test - public void createCredentialsSecretWhenDoesNotExist() - throws InfrastructureException, InterruptedException { - // given - clean env - - // when - configurator.configure(namespaceResolutionContext, TEST_NAMESPACE_NAME); - - // then create a secret - Assert.assertEquals(serverMock.getLastRequest().getMethod(), "POST"); - Assert.assertNotNull( - serverMock - .getClient() - .secrets() - .inNamespace(TEST_NAMESPACE_NAME) - .withName(CREDENTIALS_SECRET_NAME) - .get()); - } - - @Test - public void doNothingWhenSecretAlreadyExists() - throws InfrastructureException, InterruptedException { - // given - secret already exists + public void shouldStorePersonalAccessToken() throws Exception { + // given serverMock .getClient() .secrets() @@ -86,19 +82,53 @@ public class CredentialsSecretConfiguratorTest { .create( new SecretBuilder() .withNewMetadata() - .withName(CREDENTIALS_SECRET_NAME) - .withAnnotations(Map.of("already", "created")) + .withName(PAT_SECRET_NAME) + .withLabels(SEARCH_LABELS) + .withAnnotations(Map.of("che.eclipse.org/scm-url", "test-url")) .endMetadata() .build()); - // when configurator.configure(namespaceResolutionContext, TEST_NAMESPACE_NAME); - // then - don't create the secret - Assert.assertEquals(serverMock.getLastRequest().getMethod(), "GET"); - var secrets = - serverMock.getClient().secrets().inNamespace(TEST_NAMESPACE_NAME).list().getItems(); - Assert.assertEquals(secrets.size(), 1); - Assert.assertEquals(secrets.get(0).getMetadata().getAnnotations().get("already"), "created"); + // then + verify(personalAccessTokenManager).store(eq("test-url")); + } + + @Test + public void doNothingWhenSecretAlreadyStored() throws Exception { + // given + serverMock + .getClient() + .secrets() + .inNamespace(TEST_NAMESPACE_NAME) + .create( + new SecretBuilder() + .withNewMetadata() + .withName(MERGED_GIT_CREDENTIALS_SECRET_NAME) + .endMetadata() + .withData( + Map.of( + "credentials", Base64.getEncoder().encodeToString("test-token".getBytes()))) + .build()); + + serverMock + .getClient() + .secrets() + .inNamespace(TEST_NAMESPACE_NAME) + .create( + new SecretBuilder() + .withNewMetadata() + .withName(PAT_SECRET_NAME) + .withLabels(SEARCH_LABELS) + .withAnnotations(Map.of("che.eclipse.org/scm-url", "test-url")) + .endMetadata() + .withData( + Map.of("token", Base64.getEncoder().encodeToString("test-token".getBytes()))) + .build()); + // when + configurator.configure(namespaceResolutionContext, TEST_NAMESPACE_NAME); + + // then + verify(personalAccessTokenManager, never()).store(anyString()); } } diff --git a/infrastructures/openshift/src/test/java/org/eclipse/che/workspace/infrastructure/openshift/project/OpenShiftProjectFactoryTest.java b/infrastructures/openshift/src/test/java/org/eclipse/che/workspace/infrastructure/openshift/project/OpenShiftProjectFactoryTest.java index 288ad9fe1a..f04aebd85d 100644 --- a/infrastructures/openshift/src/test/java/org/eclipse/che/workspace/infrastructure/openshift/project/OpenShiftProjectFactoryTest.java +++ b/infrastructures/openshift/src/test/java/org/eclipse/che/workspace/infrastructure/openshift/project/OpenShiftProjectFactoryTest.java @@ -73,7 +73,6 @@ import org.eclipse.che.workspace.infrastructure.kubernetes.CheServerKubernetesCl import org.eclipse.che.workspace.infrastructure.kubernetes.api.shared.KubernetesNamespaceMeta; import org.eclipse.che.workspace.infrastructure.kubernetes.namespace.KubernetesConfigsMaps; import org.eclipse.che.workspace.infrastructure.kubernetes.namespace.KubernetesSecrets; -import org.eclipse.che.workspace.infrastructure.kubernetes.namespace.configurator.CredentialsSecretConfigurator; import org.eclipse.che.workspace.infrastructure.kubernetes.namespace.configurator.NamespaceConfigurator; import org.eclipse.che.workspace.infrastructure.kubernetes.namespace.configurator.PreferencesConfigMapConfigurator; import org.eclipse.che.workspace.infrastructure.kubernetes.util.KubernetesSharedPool; @@ -523,50 +522,6 @@ public class OpenShiftProjectFactoryTest { verify(toReturnProject).prepare(eq(true), eq(false), any(), any()); } - @Test - public void shouldCreateCredentialsSecretIfNotExists() throws Exception { - // given - projectFactory = - spy( - new OpenShiftProjectFactory( - "-che", - true, - true, - true, - NAMESPACE_LABELS, - NAMESPACE_ANNOTATIONS, - true, - Set.of(new CredentialsSecretConfigurator(cheServerKubernetesClientFactory)), - openShiftClientFactory, - cheServerKubernetesClientFactory, - cheServerOpenshiftClientFactory, - preferenceManager, - pool, - NO_OAUTH_IDENTITY_PROVIDER)); - OpenShiftProject toReturnProject = mock(OpenShiftProject.class); - doReturn(toReturnProject).when(projectFactory).doCreateProjectAccess(any(), any()); - when(toReturnProject.getName()).thenReturn("namespace123"); - NonNamespaceOperation namespaceOperation = mock(NonNamespaceOperation.class); - MixedOperation mixedOperation = mock(MixedOperation.class); - when(osClient.secrets()).thenReturn(mixedOperation); - when(mixedOperation.inNamespace(anyString())).thenReturn(namespaceOperation); - Resource nullSecret = mock(Resource.class); - when(namespaceOperation.withName(CREDENTIALS_SECRET_NAME)).thenReturn(nullSecret); - when(nullSecret.get()).thenReturn(null); - - // when - RuntimeIdentity identity = - new RuntimeIdentityImpl("workspace123", null, USER_ID, "namespace123"); - projectFactory.getOrCreate(identity); - - // then - ArgumentCaptor secretsCaptor = ArgumentCaptor.forClass(Secret.class); - verify(namespaceOperation).create(secretsCaptor.capture()); - Secret secret = secretsCaptor.getValue(); - Assert.assertEquals(secret.getMetadata().getName(), CREDENTIALS_SECRET_NAME); - Assert.assertEquals(secret.getType(), "opaque"); - } - @Test public void shouldCreatePreferencesConfigmapIfNotExists() throws Exception { // given @@ -609,47 +564,6 @@ public class OpenShiftProjectFactoryTest { Assert.assertEquals(configmap.getMetadata().getName(), PREFERENCES_CONFIGMAP_NAME); } - @Test - public void shouldNotCreateCredentialsSecretIfExist() throws Exception { - // given - projectFactory = - spy( - new OpenShiftProjectFactory( - "-che", - true, - true, - true, - NAMESPACE_LABELS, - NAMESPACE_ANNOTATIONS, - true, - Set.of(new CredentialsSecretConfigurator(cheServerKubernetesClientFactory)), - openShiftClientFactory, - cheServerKubernetesClientFactory, - cheServerOpenshiftClientFactory, - preferenceManager, - pool, - NO_OAUTH_IDENTITY_PROVIDER)); - OpenShiftProject toReturnProject = mock(OpenShiftProject.class); - prepareProject(toReturnProject); - doReturn(toReturnProject).when(projectFactory).doCreateProjectAccess(any(), any()); - when(toReturnProject.getName()).thenReturn("namespace123"); - NonNamespaceOperation namespaceOperation = mock(NonNamespaceOperation.class); - MixedOperation mixedOperation = mock(MixedOperation.class); - when(osClient.secrets()).thenReturn(mixedOperation); - when(mixedOperation.inNamespace(anyString())).thenReturn(namespaceOperation); - Resource secretResource = mock(Resource.class); - when(namespaceOperation.withName(CREDENTIALS_SECRET_NAME)).thenReturn(secretResource); - when(secretResource.get()).thenReturn(mock(Secret.class)); - - // when - RuntimeIdentity identity = - new RuntimeIdentityImpl("workspace123", null, USER_ID, "workspace123"); - projectFactory.getOrCreate(identity); - - // then - verify(namespaceOperation, never()).create(any()); - } - @Test public void shouldNotCreatePreferencesConfigmapIfExist() throws Exception { // given diff --git a/wsmaster/che-core-api-factory-bitbucket-server/src/test/java/org/eclipse/che/api/factory/server/bitbucket/BitbucketServerAuthorizingFileContentProviderTest.java b/wsmaster/che-core-api-factory-bitbucket-server/src/test/java/org/eclipse/che/api/factory/server/bitbucket/BitbucketServerAuthorizingFileContentProviderTest.java index cccbe3f5bb..62819f3ea0 100644 --- a/wsmaster/che-core-api-factory-bitbucket-server/src/test/java/org/eclipse/che/api/factory/server/bitbucket/BitbucketServerAuthorizingFileContentProviderTest.java +++ b/wsmaster/che-core-api-factory-bitbucket-server/src/test/java/org/eclipse/che/api/factory/server/bitbucket/BitbucketServerAuthorizingFileContentProviderTest.java @@ -41,7 +41,7 @@ public class BitbucketServerAuthorizingFileContentProviderTest { url, urlFetcher, personalAccessTokenManager); PersonalAccessToken token = new PersonalAccessToken(TEST_HOSTNAME, "user1", "token"); - when(personalAccessTokenManager.getAndStore(anyString())).thenReturn(token); + when(personalAccessTokenManager.get(anyString())).thenReturn(token); String fileURL = "https://foo.bar/scm/repo/.devfile"; @@ -60,7 +60,7 @@ public class BitbucketServerAuthorizingFileContentProviderTest { url, urlFetcher, personalAccessTokenManager); PersonalAccessToken token = new PersonalAccessToken(TEST_HOSTNAME, "user1", "token"); - when(personalAccessTokenManager.getAndStore(eq(TEST_HOSTNAME))).thenReturn(token); + when(personalAccessTokenManager.get(eq(TEST_HOSTNAME))).thenReturn(token); String fileURL = "https://foo.bar/scm/repo/.devfile"; @@ -68,7 +68,7 @@ public class BitbucketServerAuthorizingFileContentProviderTest { fileContentProvider.fetchContent(fileURL); // then - verify(personalAccessTokenManager).getAndStore(eq(TEST_HOSTNAME)); + verify(personalAccessTokenManager).get(eq(TEST_HOSTNAME)); verify(urlFetcher).fetch(eq(fileURL), eq("Bearer token")); } @@ -88,7 +88,7 @@ public class BitbucketServerAuthorizingFileContentProviderTest { new BitbucketServerAuthorizingFileContentProvider( url, urlFetcher, personalAccessTokenManager); PersonalAccessToken token = new PersonalAccessToken(TEST_HOSTNAME, "user1", "token"); - when(personalAccessTokenManager.getAndStore(anyString())).thenReturn(token); + when(personalAccessTokenManager.get(anyString())).thenReturn(token); // when fileContentProvider.fetchContent(relative); diff --git a/wsmaster/che-core-api-factory-bitbucket-server/src/test/java/org/eclipse/che/api/factory/server/bitbucket/BitbucketServerScmFileResolverTest.java b/wsmaster/che-core-api-factory-bitbucket-server/src/test/java/org/eclipse/che/api/factory/server/bitbucket/BitbucketServerScmFileResolverTest.java index 593c89f79e..6a4cf5ed0b 100644 --- a/wsmaster/che-core-api-factory-bitbucket-server/src/test/java/org/eclipse/che/api/factory/server/bitbucket/BitbucketServerScmFileResolverTest.java +++ b/wsmaster/che-core-api-factory-bitbucket-server/src/test/java/org/eclipse/che/api/factory/server/bitbucket/BitbucketServerScmFileResolverTest.java @@ -73,7 +73,7 @@ public class BitbucketServerScmFileResolverTest { public void shouldReturnContentFromUrlFetcher() throws Exception { final String rawContent = "raw_content"; final String filename = "devfile.yaml"; - when(personalAccessTokenManager.getAndStore(anyString())) + when(personalAccessTokenManager.get(anyString())) .thenReturn(new PersonalAccessToken(SCM_URL, "root", "token123")); when(urlFetcher.fetch(anyString(), eq("Bearer token123"))).thenReturn(rawContent); @@ -87,7 +87,7 @@ public class BitbucketServerScmFileResolverTest { @Test public void shouldFetchContentWithoutAuthentication() throws Exception { // given - when(personalAccessTokenManager.getAndStore(anyString())) + when(personalAccessTokenManager.get(anyString())) .thenThrow(new ScmUnauthorizedException("message", "bitbucket-server", "v1", "url")); // when diff --git a/wsmaster/che-core-api-factory-github/src/test/java/org/eclipse/che/api/factory/server/github/GithubAuthorizingFileContentProviderTest.java b/wsmaster/che-core-api-factory-github/src/test/java/org/eclipse/che/api/factory/server/github/GithubAuthorizingFileContentProviderTest.java index 1cd4564839..8adc803223 100644 --- a/wsmaster/che-core-api-factory-github/src/test/java/org/eclipse/che/api/factory/server/github/GithubAuthorizingFileContentProviderTest.java +++ b/wsmaster/che-core-api-factory-github/src/test/java/org/eclipse/che/api/factory/server/github/GithubAuthorizingFileContentProviderTest.java @@ -54,7 +54,7 @@ public class GithubAuthorizingFileContentProviderTest { FileContentProvider fileContentProvider = new GithubAuthorizingFileContentProvider(githubUrl, urlFetcher, personalAccessTokenManager); - when(personalAccessTokenManager.getAndStore(anyString())) + when(personalAccessTokenManager.get(anyString())) .thenReturn(new PersonalAccessToken("foo", "che", "my-token")); fileContentProvider.fetchContent("devfile.yaml"); @@ -81,7 +81,7 @@ public class GithubAuthorizingFileContentProviderTest { FileContentProvider fileContentProvider = new GithubAuthorizingFileContentProvider(githubUrl, urlFetcher, personalAccessTokenManager); - when(personalAccessTokenManager.getAndStore(anyString())) + when(personalAccessTokenManager.get(anyString())) .thenReturn(new PersonalAccessToken(raw_url, "che", "my-token")); fileContentProvider.fetchContent(raw_url); @@ -98,8 +98,7 @@ public class GithubAuthorizingFileContentProviderTest { FileContentProvider fileContentProvider = new GithubAuthorizingFileContentProvider(githubUrl, urlFetcher, personalAccessTokenManager); - when(personalAccessTokenManager.getAndStore(anyString())) - .thenThrow(UnknownScmProviderException.class); + when(personalAccessTokenManager.get(anyString())).thenThrow(UnknownScmProviderException.class); when(urlFetcher.fetch(eq(url))).thenThrow(FileNotFoundException.class); @@ -115,8 +114,7 @@ public class GithubAuthorizingFileContentProviderTest { FileContentProvider fileContentProvider = new GithubAuthorizingFileContentProvider(githubUrl, urlFetcher, personalAccessTokenManager); - when(personalAccessTokenManager.getAndStore(anyString())) - .thenThrow(UnknownScmProviderException.class); + when(personalAccessTokenManager.get(anyString())).thenThrow(UnknownScmProviderException.class); when(urlFetcher.fetch(eq(url))).thenThrow(FileNotFoundException.class); when(urlFetcher.fetch(eq("https://github.com/eclipse/che"))).thenThrow(IOException.class); @@ -132,7 +130,7 @@ public class GithubAuthorizingFileContentProviderTest { FileContentProvider fileContentProvider = new GithubAuthorizingFileContentProvider(githubUrl, urlFetcher, personalAccessTokenManager); var personalAccessToken = new PersonalAccessToken(raw_url, "che", "my-token"); - when(personalAccessTokenManager.getAndStore(anyString())).thenReturn(personalAccessToken); + when(personalAccessTokenManager.get(anyString())).thenReturn(personalAccessToken); fileContentProvider.fetchContent(raw_url); diff --git a/wsmaster/che-core-api-factory-github/src/test/java/org/eclipse/che/api/factory/server/github/GithubScmFileResolverTest.java b/wsmaster/che-core-api-factory-github/src/test/java/org/eclipse/che/api/factory/server/github/GithubScmFileResolverTest.java index cca6241cea..9783ccd75b 100644 --- a/wsmaster/che-core-api-factory-github/src/test/java/org/eclipse/che/api/factory/server/github/GithubScmFileResolverTest.java +++ b/wsmaster/che-core-api-factory-github/src/test/java/org/eclipse/che/api/factory/server/github/GithubScmFileResolverTest.java @@ -14,6 +14,7 @@ package org.eclipse.che.api.factory.server.github; import static org.mockito.ArgumentMatchers.any; import static org.mockito.ArgumentMatchers.anyString; import static org.mockito.ArgumentMatchers.eq; +import static org.mockito.Mockito.lenient; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.verify; import static org.mockito.Mockito.when; @@ -85,7 +86,8 @@ public class GithubScmFileResolverTest { anyString())) .thenReturn(rawContent); - when(personalAccessTokenManager.getAndStore(anyString())) + lenient() + .when(personalAccessTokenManager.get(anyString())) .thenReturn(new PersonalAccessToken("foo", "che", "my-token")); when(githubApiClient.getLatestCommit(anyString(), anyString(), anyString(), any())) @@ -103,7 +105,8 @@ public class GithubScmFileResolverTest { @Test public void shouldReturnContentWithoutAuthentication() throws Exception { // given - when(personalAccessTokenManager.getAndStore(anyString())) + lenient() + .when(personalAccessTokenManager.get(anyString())) .thenThrow(new ScmUnauthorizedException("message", "github", "v1", "url")); // when diff --git a/wsmaster/che-core-api-factory-gitlab/src/test/java/org/eclipse/che/api/factory/server/gitlab/GitlabAuthorizingFileContentProviderTest.java b/wsmaster/che-core-api-factory-gitlab/src/test/java/org/eclipse/che/api/factory/server/gitlab/GitlabAuthorizingFileContentProviderTest.java index 165621e62e..0c784206ac 100644 --- a/wsmaster/che-core-api-factory-gitlab/src/test/java/org/eclipse/che/api/factory/server/gitlab/GitlabAuthorizingFileContentProviderTest.java +++ b/wsmaster/che-core-api-factory-gitlab/src/test/java/org/eclipse/che/api/factory/server/gitlab/GitlabAuthorizingFileContentProviderTest.java @@ -37,7 +37,7 @@ public class GitlabAuthorizingFileContentProviderTest { FileContentProvider fileContentProvider = new GitlabAuthorizingFileContentProvider(gitlabUrl, urlFetcher, personalAccessTokenManager); var personalAccessToken = new PersonalAccessToken("foo", "che", "my-token"); - when(personalAccessTokenManager.getAndStore(anyString())).thenReturn(personalAccessToken); + when(personalAccessTokenManager.get(anyString())).thenReturn(personalAccessToken); fileContentProvider.fetchContent("devfile.yaml"); verify(urlFetcher) .fetch( @@ -55,7 +55,7 @@ public class GitlabAuthorizingFileContentProviderTest { String url = "https://gitlab.net/api/v4/projects/eclipse%2Fche/repository/files/devfile.yaml/raw"; var personalAccessToken = new PersonalAccessToken(url, "che", "my-token"); - when(personalAccessTokenManager.getAndStore(anyString())).thenReturn(personalAccessToken); + when(personalAccessTokenManager.get(anyString())).thenReturn(personalAccessToken); fileContentProvider.fetchContent(url); verify(urlFetcher).fetch(eq(url), eq("Bearer my-token")); diff --git a/wsmaster/che-core-api-factory-gitlab/src/test/java/org/eclipse/che/api/factory/server/gitlab/GitlabScmFileResolverTest.java b/wsmaster/che-core-api-factory-gitlab/src/test/java/org/eclipse/che/api/factory/server/gitlab/GitlabScmFileResolverTest.java index f2dccda7ca..a51ed0aa78 100644 --- a/wsmaster/che-core-api-factory-gitlab/src/test/java/org/eclipse/che/api/factory/server/gitlab/GitlabScmFileResolverTest.java +++ b/wsmaster/che-core-api-factory-gitlab/src/test/java/org/eclipse/che/api/factory/server/gitlab/GitlabScmFileResolverTest.java @@ -72,7 +72,7 @@ public class GitlabScmFileResolverTest { public void shouldReturnContentFromUrlFetcher() throws Exception { final String rawContent = "raw_content"; final String filename = "devfile.yaml"; - when(personalAccessTokenManager.getAndStore(any(String.class))) + when(personalAccessTokenManager.get(any(String.class))) .thenReturn(new PersonalAccessToken(SCM_URL, "root", "token123")); when(urlFetcher.fetch(anyString(), eq("Bearer token123"))).thenReturn(rawContent); @@ -86,7 +86,7 @@ public class GitlabScmFileResolverTest { @Test public void shouldFetchContentWithoutAuthentication() throws Exception { // given - when(personalAccessTokenManager.getAndStore(anyString())) + when(personalAccessTokenManager.get(anyString())) .thenThrow(new ScmUnauthorizedException("message", "gitlab", "v1", "url")); // when diff --git a/wsmaster/che-core-api-factory/src/main/java/org/eclipse/che/api/factory/server/scm/AuthorizingFileContentProvider.java b/wsmaster/che-core-api-factory/src/main/java/org/eclipse/che/api/factory/server/scm/AuthorizingFileContentProvider.java index 3a50ea8a70..aa5de7bf30 100644 --- a/wsmaster/che-core-api-factory/src/main/java/org/eclipse/che/api/factory/server/scm/AuthorizingFileContentProvider.java +++ b/wsmaster/che-core-api-factory/src/main/java/org/eclipse/che/api/factory/server/scm/AuthorizingFileContentProvider.java @@ -80,7 +80,7 @@ public class AuthorizingFileContentProvider String authorization; if (isNullOrEmpty(credentials)) { PersonalAccessToken token = - personalAccessTokenManager.getAndStore(remoteFactoryUrl.getHostName()); + personalAccessTokenManager.get(remoteFactoryUrl.getHostName()); authorization = formatAuthorization( token.getToken(), diff --git a/wsmaster/che-core-api-factory/src/main/java/org/eclipse/che/api/factory/server/scm/PersonalAccessTokenManager.java b/wsmaster/che-core-api-factory/src/main/java/org/eclipse/che/api/factory/server/scm/PersonalAccessTokenManager.java index 8fb8df6f33..82ae0e5f50 100644 --- a/wsmaster/che-core-api-factory/src/main/java/org/eclipse/che/api/factory/server/scm/PersonalAccessTokenManager.java +++ b/wsmaster/che-core-api-factory/src/main/java/org/eclipse/che/api/factory/server/scm/PersonalAccessTokenManager.java @@ -53,6 +53,22 @@ public interface PersonalAccessTokenManager { throws ScmConfigurationPersistenceException, ScmUnauthorizedException, ScmCommunicationException; + /** + * Gets {@link PersonalAccessToken} from permanent storage. + * + * @param scmServerUrl Git provider endpoint + * @throws ScmConfigurationPersistenceException - problem occurred during communication with + * permanent storage. + * @throws ScmUnauthorizedException - scm authorization required. + * @throws ScmCommunicationException - problem occurred during communication with scm provider. + * @throws UnknownScmProviderException - scm provider is unknown. + * @throws UnsatisfiedScmPreconditionException - storage preconditions aren't met. + */ + PersonalAccessToken get(String scmServerUrl) + throws ScmConfigurationPersistenceException, ScmUnauthorizedException, + ScmCommunicationException, UnknownScmProviderException, + UnsatisfiedScmPreconditionException; + /** * Gets {@link PersonalAccessToken} from permanent storage for the given OAuth provider name. It * is useful when OAuth provider is not configured and Git provider endpoint is unknown. {@code @@ -82,4 +98,18 @@ public interface PersonalAccessTokenManager { throws ScmCommunicationException, ScmConfigurationPersistenceException, UnknownScmProviderException, UnsatisfiedScmPreconditionException, ScmUnauthorizedException; + + /** + * Set or update git-credentials with {@link PersonalAccessToken} from permanent storage. + * + * @param scmServerUrl Git provider endpoint + * @throws UnsatisfiedScmPreconditionException - storage preconditions aren't met. + * @throws ScmConfigurationPersistenceException - problem occurred during communication with + * permanent storage. + * @throws ScmCommunicationException - problem occurred during communication with scm provider. + * @throws ScmUnauthorizedException - scm authorization required. + */ + void store(String scmServerUrl) + throws UnsatisfiedScmPreconditionException, ScmConfigurationPersistenceException, + ScmCommunicationException, ScmUnauthorizedException; } diff --git a/wsmaster/che-core-api-factory/src/test/java/org/eclipse/che/api/factory/server/scm/AuthorizingFactoryParameterResolverTest.java b/wsmaster/che-core-api-factory/src/test/java/org/eclipse/che/api/factory/server/scm/AuthorizingFactoryParameterResolverTest.java index 5306170c81..6853e1a735 100644 --- a/wsmaster/che-core-api-factory/src/test/java/org/eclipse/che/api/factory/server/scm/AuthorizingFactoryParameterResolverTest.java +++ b/wsmaster/che-core-api-factory/src/test/java/org/eclipse/che/api/factory/server/scm/AuthorizingFactoryParameterResolverTest.java @@ -48,13 +48,13 @@ public class AuthorizingFactoryParameterResolverTest { // given when(remoteFactoryUrl.getHostName()).thenReturn("hostName"); when(urlFetcher.fetch(anyString(), anyString())).thenReturn("content"); - when(personalAccessTokenManager.getAndStore(anyString())).thenReturn(personalAccessToken); + when(personalAccessTokenManager.get(anyString())).thenReturn(personalAccessToken); // when provider.fetchContent("url"); // then - verify(personalAccessTokenManager).getAndStore(anyString()); + verify(personalAccessTokenManager).get(anyString()); } @Test From 454bc7304f3f34d8a7a04fb13da5a10adf1e7f8d Mon Sep 17 00:00:00 2001 From: Mykhailo Kuznietsov Date: Wed, 28 Jun 2023 16:43:32 +0000 Subject: [PATCH 31/75] chore: Bump to 7.71.0-SNAPSHOT in main Signed-off-by: Mykhailo Kuznietsov --- assembly/assembly-che-tomcat/pom.xml | 2 +- assembly/assembly-main/pom.xml | 2 +- assembly/assembly-root-war/pom.xml | 2 +- assembly/assembly-swagger-war/pom.xml | 2 +- assembly/assembly-wsmaster-war/pom.xml | 2 +- assembly/pom.xml | 2 +- core/che-core-api-core/pom.xml | 2 +- core/che-core-api-dto-maven-plugin/pom.xml | 2 +- core/che-core-api-dto/pom.xml | 2 +- core/che-core-api-model/pom.xml | 2 +- core/che-core-db-vendor-h2/pom.xml | 2 +- core/che-core-db-vendor-mysql/pom.xml | 2 +- core/che-core-db-vendor-postgresql/pom.xml | 2 +- core/che-core-db/pom.xml | 2 +- core/che-core-logback/pom.xml | 2 +- core/che-core-metrics-core/pom.xml | 2 +- core/che-core-tracing-core/pom.xml | 2 +- core/che-core-tracing-metrics/pom.xml | 2 +- core/che-core-tracing-web/pom.xml | 2 +- core/che-core-typescript-dto-maven-plugin/pom.xml | 2 +- core/commons/che-core-commons-annotations/pom.xml | 2 +- core/commons/che-core-commons-inject/pom.xml | 2 +- core/commons/che-core-commons-j2ee/pom.xml | 2 +- core/commons/che-core-commons-json/pom.xml | 2 +- core/commons/che-core-commons-lang/pom.xml | 2 +- core/commons/che-core-commons-observability/pom.xml | 2 +- core/commons/che-core-commons-schedule/pom.xml | 2 +- core/commons/che-core-commons-test/pom.xml | 2 +- core/commons/che-core-commons-tracing/pom.xml | 2 +- core/commons/pom.xml | 2 +- core/pom.xml | 2 +- infrastructures/infrastructure-distributed/pom.xml | 2 +- infrastructures/infrastructure-factory/pom.xml | 2 +- infrastructures/infrastructure-metrics/pom.xml | 2 +- infrastructures/infrastructure-permission/pom.xml | 2 +- infrastructures/kubernetes/pom.xml | 2 +- infrastructures/openshift/pom.xml | 2 +- infrastructures/pom.xml | 2 +- .../api/che-multiuser-api-authentication-commons/pom.xml | 2 +- multiuser/api/che-multiuser-api-authorization-impl/pom.xml | 2 +- multiuser/api/che-multiuser-api-authorization/pom.xml | 2 +- multiuser/api/che-multiuser-api-organization-shared/pom.xml | 2 +- multiuser/api/che-multiuser-api-organization/pom.xml | 2 +- multiuser/api/che-multiuser-api-permission-shared/pom.xml | 2 +- multiuser/api/che-multiuser-api-permission/pom.xml | 2 +- multiuser/api/che-multiuser-api-resource-shared/pom.xml | 2 +- multiuser/api/che-multiuser-api-resource/pom.xml | 2 +- multiuser/api/che-multiuser-api-workspace-activity/pom.xml | 2 +- multiuser/api/pom.xml | 2 +- .../integration-tests/che-multiuser-cascade-removal/pom.xml | 2 +- multiuser/integration-tests/che-multiuser-mysql-tck/pom.xml | 2 +- .../integration-tests/che-multiuser-postgresql-tck/pom.xml | 2 +- multiuser/integration-tests/pom.xml | 2 +- multiuser/keycloak/che-multiuser-keycloak-server/pom.xml | 2 +- multiuser/keycloak/che-multiuser-keycloak-shared/pom.xml | 2 +- .../keycloak/che-multiuser-keycloak-token-provider/pom.xml | 2 +- .../keycloak/che-multiuser-keycloak-user-remover/pom.xml | 2 +- multiuser/keycloak/pom.xml | 2 +- .../che-multiuser-machine-authentication-shared/pom.xml | 2 +- .../machine-auth/che-multiuser-machine-authentication/pom.xml | 2 +- multiuser/machine-auth/pom.xml | 2 +- multiuser/oidc/pom.xml | 2 +- multiuser/permission/che-multiuser-permission-devfile/pom.xml | 2 +- multiuser/permission/che-multiuser-permission-logger/pom.xml | 2 +- .../permission/che-multiuser-permission-resource/pom.xml | 2 +- multiuser/permission/che-multiuser-permission-system/pom.xml | 2 +- multiuser/permission/che-multiuser-permission-user/pom.xml | 2 +- .../che-multiuser-permission-workspace-activity/pom.xml | 2 +- .../permission/che-multiuser-permission-workspace/pom.xml | 2 +- multiuser/permission/pom.xml | 2 +- multiuser/personal-account/pom.xml | 2 +- multiuser/pom.xml | 2 +- multiuser/sql-schema/pom.xml | 2 +- pom.xml | 4 ++-- typescript-dto/dto-pom.xml | 2 +- wsmaster/che-core-api-account/pom.xml | 2 +- wsmaster/che-core-api-auth-azure-devops/pom.xml | 2 +- wsmaster/che-core-api-auth-bitbucket/pom.xml | 2 +- wsmaster/che-core-api-auth-github/pom.xml | 2 +- wsmaster/che-core-api-auth-gitlab/pom.xml | 2 +- wsmaster/che-core-api-auth-openshift/pom.xml | 2 +- wsmaster/che-core-api-auth-shared/pom.xml | 2 +- wsmaster/che-core-api-auth/pom.xml | 2 +- wsmaster/che-core-api-devfile-shared/pom.xml | 2 +- wsmaster/che-core-api-devfile/pom.xml | 2 +- wsmaster/che-core-api-factory-azure-devops/pom.xml | 2 +- wsmaster/che-core-api-factory-bitbucket-server/pom.xml | 2 +- wsmaster/che-core-api-factory-bitbucket/pom.xml | 2 +- wsmaster/che-core-api-factory-git-ssh/pom.xml | 2 +- wsmaster/che-core-api-factory-github/pom.xml | 2 +- wsmaster/che-core-api-factory-gitlab/pom.xml | 2 +- wsmaster/che-core-api-factory-shared/pom.xml | 2 +- wsmaster/che-core-api-factory/pom.xml | 2 +- wsmaster/che-core-api-logger-shared/pom.xml | 2 +- wsmaster/che-core-api-logger/pom.xml | 2 +- wsmaster/che-core-api-metrics/pom.xml | 2 +- wsmaster/che-core-api-ssh-shared/pom.xml | 2 +- wsmaster/che-core-api-ssh/pom.xml | 2 +- wsmaster/che-core-api-system-shared/pom.xml | 2 +- wsmaster/che-core-api-system/pom.xml | 2 +- wsmaster/che-core-api-user-shared/pom.xml | 2 +- wsmaster/che-core-api-user/pom.xml | 2 +- wsmaster/che-core-api-workspace-activity/pom.xml | 2 +- wsmaster/che-core-api-workspace-shared/pom.xml | 2 +- wsmaster/che-core-api-workspace/pom.xml | 2 +- wsmaster/che-core-sql-schema/pom.xml | 2 +- wsmaster/integration-tests/cascade-removal/pom.xml | 2 +- wsmaster/integration-tests/mysql-tck/pom.xml | 2 +- wsmaster/integration-tests/pom.xml | 2 +- wsmaster/integration-tests/postgresql-tck/pom.xml | 2 +- wsmaster/pom.xml | 2 +- 111 files changed, 112 insertions(+), 112 deletions(-) diff --git a/assembly/assembly-che-tomcat/pom.xml b/assembly/assembly-che-tomcat/pom.xml index 2dd552bd59..b51f7dd130 100644 --- a/assembly/assembly-che-tomcat/pom.xml +++ b/assembly/assembly-che-tomcat/pom.xml @@ -17,7 +17,7 @@ che-assembly-parent org.eclipse.che - 7.70.0-SNAPSHOT + 7.71.0-SNAPSHOT assembly-che-tomcat jar diff --git a/assembly/assembly-main/pom.xml b/assembly/assembly-main/pom.xml index c25d384804..1b1001e615 100644 --- a/assembly/assembly-main/pom.xml +++ b/assembly/assembly-main/pom.xml @@ -17,7 +17,7 @@ che-assembly-parent org.eclipse.che - 7.70.0-SNAPSHOT + 7.71.0-SNAPSHOT assembly-main pom diff --git a/assembly/assembly-root-war/pom.xml b/assembly/assembly-root-war/pom.xml index d0e886b145..7f78fc095e 100644 --- a/assembly/assembly-root-war/pom.xml +++ b/assembly/assembly-root-war/pom.xml @@ -17,7 +17,7 @@ che-assembly-parent org.eclipse.che - 7.70.0-SNAPSHOT + 7.71.0-SNAPSHOT assembly-root-war war diff --git a/assembly/assembly-swagger-war/pom.xml b/assembly/assembly-swagger-war/pom.xml index beb54efe72..ead300526e 100644 --- a/assembly/assembly-swagger-war/pom.xml +++ b/assembly/assembly-swagger-war/pom.xml @@ -17,7 +17,7 @@ che-assembly-parent org.eclipse.che - 7.70.0-SNAPSHOT + 7.71.0-SNAPSHOT assembly-swagger-war war diff --git a/assembly/assembly-wsmaster-war/pom.xml b/assembly/assembly-wsmaster-war/pom.xml index a91bd41629..edf4a12f4d 100644 --- a/assembly/assembly-wsmaster-war/pom.xml +++ b/assembly/assembly-wsmaster-war/pom.xml @@ -17,7 +17,7 @@ che-assembly-parent org.eclipse.che - 7.70.0-SNAPSHOT + 7.71.0-SNAPSHOT assembly-wsmaster-war war diff --git a/assembly/pom.xml b/assembly/pom.xml index cd53eea81a..4dcc01f96b 100644 --- a/assembly/pom.xml +++ b/assembly/pom.xml @@ -17,7 +17,7 @@ che-server org.eclipse.che - 7.70.0-SNAPSHOT + 7.71.0-SNAPSHOT ../pom.xml che-assembly-parent diff --git a/core/che-core-api-core/pom.xml b/core/che-core-api-core/pom.xml index ae409dcc49..6cbd8d44ae 100644 --- a/core/che-core-api-core/pom.xml +++ b/core/che-core-api-core/pom.xml @@ -17,7 +17,7 @@ che-core-parent org.eclipse.che.core - 7.70.0-SNAPSHOT + 7.71.0-SNAPSHOT che-core-api-core jar diff --git a/core/che-core-api-dto-maven-plugin/pom.xml b/core/che-core-api-dto-maven-plugin/pom.xml index 6fec384665..9cf6218bc1 100644 --- a/core/che-core-api-dto-maven-plugin/pom.xml +++ b/core/che-core-api-dto-maven-plugin/pom.xml @@ -17,7 +17,7 @@ che-core-parent org.eclipse.che.core - 7.70.0-SNAPSHOT + 7.71.0-SNAPSHOT che-core-api-dto-maven-plugin maven-plugin diff --git a/core/che-core-api-dto/pom.xml b/core/che-core-api-dto/pom.xml index ce31948d4e..eb147d36f0 100644 --- a/core/che-core-api-dto/pom.xml +++ b/core/che-core-api-dto/pom.xml @@ -17,7 +17,7 @@ che-core-parent org.eclipse.che.core - 7.70.0-SNAPSHOT + 7.71.0-SNAPSHOT che-core-api-dto jar diff --git a/core/che-core-api-model/pom.xml b/core/che-core-api-model/pom.xml index e16013bfd6..d25c3460d6 100644 --- a/core/che-core-api-model/pom.xml +++ b/core/che-core-api-model/pom.xml @@ -17,7 +17,7 @@ che-core-parent org.eclipse.che.core - 7.70.0-SNAPSHOT + 7.71.0-SNAPSHOT che-core-api-model jar diff --git a/core/che-core-db-vendor-h2/pom.xml b/core/che-core-db-vendor-h2/pom.xml index cee3d559dd..b9baa55e57 100644 --- a/core/che-core-db-vendor-h2/pom.xml +++ b/core/che-core-db-vendor-h2/pom.xml @@ -17,7 +17,7 @@ che-core-parent org.eclipse.che.core - 7.70.0-SNAPSHOT + 7.71.0-SNAPSHOT che-core-db-vendor-h2 Che Core :: Commons :: DB :: Vendor H2 diff --git a/core/che-core-db-vendor-mysql/pom.xml b/core/che-core-db-vendor-mysql/pom.xml index 4783207730..a62d7be174 100644 --- a/core/che-core-db-vendor-mysql/pom.xml +++ b/core/che-core-db-vendor-mysql/pom.xml @@ -17,7 +17,7 @@ che-core-parent org.eclipse.che.core - 7.70.0-SNAPSHOT + 7.71.0-SNAPSHOT che-core-db-vendor-mysql Che Core :: Commons :: DB :: Vendor MySQL diff --git a/core/che-core-db-vendor-postgresql/pom.xml b/core/che-core-db-vendor-postgresql/pom.xml index 2313e7c160..a90da44fb7 100644 --- a/core/che-core-db-vendor-postgresql/pom.xml +++ b/core/che-core-db-vendor-postgresql/pom.xml @@ -17,7 +17,7 @@ che-core-parent org.eclipse.che.core - 7.70.0-SNAPSHOT + 7.71.0-SNAPSHOT che-core-db-vendor-postgresql Che Core :: Commons :: DB :: Vendor PostgreSQL diff --git a/core/che-core-db/pom.xml b/core/che-core-db/pom.xml index c2a5625389..6b278af453 100644 --- a/core/che-core-db/pom.xml +++ b/core/che-core-db/pom.xml @@ -17,7 +17,7 @@ che-core-parent org.eclipse.che.core - 7.70.0-SNAPSHOT + 7.71.0-SNAPSHOT che-core-db Che Core :: Commons :: DB diff --git a/core/che-core-logback/pom.xml b/core/che-core-logback/pom.xml index 433c526182..485cef9599 100644 --- a/core/che-core-logback/pom.xml +++ b/core/che-core-logback/pom.xml @@ -17,7 +17,7 @@ che-core-parent org.eclipse.che.core - 7.70.0-SNAPSHOT + 7.71.0-SNAPSHOT che-core-logback jar diff --git a/core/che-core-metrics-core/pom.xml b/core/che-core-metrics-core/pom.xml index e864a0d1f6..3c0ca1a8df 100644 --- a/core/che-core-metrics-core/pom.xml +++ b/core/che-core-metrics-core/pom.xml @@ -17,7 +17,7 @@ che-core-parent org.eclipse.che.core - 7.70.0-SNAPSHOT + 7.71.0-SNAPSHOT che-core-metrics-core Che Core :: Commons :: Metrics :: Core diff --git a/core/che-core-tracing-core/pom.xml b/core/che-core-tracing-core/pom.xml index ef9dfc2a22..ef65b39361 100644 --- a/core/che-core-tracing-core/pom.xml +++ b/core/che-core-tracing-core/pom.xml @@ -17,7 +17,7 @@ che-core-parent org.eclipse.che.core - 7.70.0-SNAPSHOT + 7.71.0-SNAPSHOT che-core-tracing-core Che Core :: Commons :: Tracing :: Core diff --git a/core/che-core-tracing-metrics/pom.xml b/core/che-core-tracing-metrics/pom.xml index 81d0d3e8a2..bab368d5d9 100644 --- a/core/che-core-tracing-metrics/pom.xml +++ b/core/che-core-tracing-metrics/pom.xml @@ -17,7 +17,7 @@ che-core-parent org.eclipse.che.core - 7.70.0-SNAPSHOT + 7.71.0-SNAPSHOT che-core-tracing-metrics Che Core :: Commons :: Tracing :: Metrics diff --git a/core/che-core-tracing-web/pom.xml b/core/che-core-tracing-web/pom.xml index 6fc8bb0f33..8c039d592d 100644 --- a/core/che-core-tracing-web/pom.xml +++ b/core/che-core-tracing-web/pom.xml @@ -17,7 +17,7 @@ che-core-parent org.eclipse.che.core - 7.70.0-SNAPSHOT + 7.71.0-SNAPSHOT che-core-tracing-web Che Core :: Commons :: Tracing :: Web diff --git a/core/che-core-typescript-dto-maven-plugin/pom.xml b/core/che-core-typescript-dto-maven-plugin/pom.xml index 4242cf3e2f..9a1f2d2a93 100644 --- a/core/che-core-typescript-dto-maven-plugin/pom.xml +++ b/core/che-core-typescript-dto-maven-plugin/pom.xml @@ -17,7 +17,7 @@ che-core-parent org.eclipse.che.core - 7.70.0-SNAPSHOT + 7.71.0-SNAPSHOT che-core-typescript-dto-maven-plugin maven-plugin diff --git a/core/commons/che-core-commons-annotations/pom.xml b/core/commons/che-core-commons-annotations/pom.xml index 89dffc55be..3ed8f44b61 100644 --- a/core/commons/che-core-commons-annotations/pom.xml +++ b/core/commons/che-core-commons-annotations/pom.xml @@ -17,7 +17,7 @@ che-core-commons-parent org.eclipse.che.core - 7.70.0-SNAPSHOT + 7.71.0-SNAPSHOT che-core-commons-annotations jar diff --git a/core/commons/che-core-commons-inject/pom.xml b/core/commons/che-core-commons-inject/pom.xml index 26f55d83c9..a44b88708b 100644 --- a/core/commons/che-core-commons-inject/pom.xml +++ b/core/commons/che-core-commons-inject/pom.xml @@ -17,7 +17,7 @@ che-core-commons-parent org.eclipse.che.core - 7.70.0-SNAPSHOT + 7.71.0-SNAPSHOT che-core-commons-inject jar diff --git a/core/commons/che-core-commons-j2ee/pom.xml b/core/commons/che-core-commons-j2ee/pom.xml index 83a4f7aa72..e2f3154435 100644 --- a/core/commons/che-core-commons-j2ee/pom.xml +++ b/core/commons/che-core-commons-j2ee/pom.xml @@ -17,7 +17,7 @@ che-core-commons-parent org.eclipse.che.core - 7.70.0-SNAPSHOT + 7.71.0-SNAPSHOT che-core-commons-j2ee jar diff --git a/core/commons/che-core-commons-json/pom.xml b/core/commons/che-core-commons-json/pom.xml index 0f0f444ccf..ed234c3567 100644 --- a/core/commons/che-core-commons-json/pom.xml +++ b/core/commons/che-core-commons-json/pom.xml @@ -17,7 +17,7 @@ che-core-commons-parent org.eclipse.che.core - 7.70.0-SNAPSHOT + 7.71.0-SNAPSHOT che-core-commons-json jar diff --git a/core/commons/che-core-commons-lang/pom.xml b/core/commons/che-core-commons-lang/pom.xml index 714130b7fc..fb991dd4a6 100644 --- a/core/commons/che-core-commons-lang/pom.xml +++ b/core/commons/che-core-commons-lang/pom.xml @@ -17,7 +17,7 @@ che-core-commons-parent org.eclipse.che.core - 7.70.0-SNAPSHOT + 7.71.0-SNAPSHOT che-core-commons-lang jar diff --git a/core/commons/che-core-commons-observability/pom.xml b/core/commons/che-core-commons-observability/pom.xml index 9dabf23506..7bc71c6fea 100644 --- a/core/commons/che-core-commons-observability/pom.xml +++ b/core/commons/che-core-commons-observability/pom.xml @@ -17,7 +17,7 @@ che-core-commons-parent org.eclipse.che.core - 7.70.0-SNAPSHOT + 7.71.0-SNAPSHOT che-core-commons-observability Che Core :: Commons :: Tracing and Monitoring wrapper diff --git a/core/commons/che-core-commons-schedule/pom.xml b/core/commons/che-core-commons-schedule/pom.xml index 129543cd61..9b1f00bd49 100644 --- a/core/commons/che-core-commons-schedule/pom.xml +++ b/core/commons/che-core-commons-schedule/pom.xml @@ -17,7 +17,7 @@ che-core-commons-parent org.eclipse.che.core - 7.70.0-SNAPSHOT + 7.71.0-SNAPSHOT che-core-commons-schedule jar diff --git a/core/commons/che-core-commons-test/pom.xml b/core/commons/che-core-commons-test/pom.xml index 8f2726a327..b79f0f919a 100644 --- a/core/commons/che-core-commons-test/pom.xml +++ b/core/commons/che-core-commons-test/pom.xml @@ -17,7 +17,7 @@ che-core-commons-parent org.eclipse.che.core - 7.70.0-SNAPSHOT + 7.71.0-SNAPSHOT che-core-commons-test jar diff --git a/core/commons/che-core-commons-tracing/pom.xml b/core/commons/che-core-commons-tracing/pom.xml index bb8678099d..a37913ba18 100644 --- a/core/commons/che-core-commons-tracing/pom.xml +++ b/core/commons/che-core-commons-tracing/pom.xml @@ -17,7 +17,7 @@ che-core-commons-parent org.eclipse.che.core - 7.70.0-SNAPSHOT + 7.71.0-SNAPSHOT che-core-commons-tracing Che Core :: Commons :: Tracing diff --git a/core/commons/pom.xml b/core/commons/pom.xml index ac2b1def22..f7ff475442 100644 --- a/core/commons/pom.xml +++ b/core/commons/pom.xml @@ -17,7 +17,7 @@ che-core-parent org.eclipse.che.core - 7.70.0-SNAPSHOT + 7.71.0-SNAPSHOT ../pom.xml che-core-commons-parent diff --git a/core/pom.xml b/core/pom.xml index bb9ad120a0..bc714f00c2 100644 --- a/core/pom.xml +++ b/core/pom.xml @@ -17,7 +17,7 @@ che-server org.eclipse.che - 7.70.0-SNAPSHOT + 7.71.0-SNAPSHOT ../pom.xml org.eclipse.che.core diff --git a/infrastructures/infrastructure-distributed/pom.xml b/infrastructures/infrastructure-distributed/pom.xml index 94bfa15edb..869b75765a 100644 --- a/infrastructures/infrastructure-distributed/pom.xml +++ b/infrastructures/infrastructure-distributed/pom.xml @@ -17,7 +17,7 @@ che-infrastructures-parent org.eclipse.che.infrastructure - 7.70.0-SNAPSHOT + 7.71.0-SNAPSHOT infrastructure-distributed jar diff --git a/infrastructures/infrastructure-factory/pom.xml b/infrastructures/infrastructure-factory/pom.xml index 0c093d37fd..c87b5c1051 100644 --- a/infrastructures/infrastructure-factory/pom.xml +++ b/infrastructures/infrastructure-factory/pom.xml @@ -17,7 +17,7 @@ che-infrastructures-parent org.eclipse.che.infrastructure - 7.70.0-SNAPSHOT + 7.71.0-SNAPSHOT infrastructure-factory jar diff --git a/infrastructures/infrastructure-metrics/pom.xml b/infrastructures/infrastructure-metrics/pom.xml index 7de54b3e21..4a3d6e9987 100644 --- a/infrastructures/infrastructure-metrics/pom.xml +++ b/infrastructures/infrastructure-metrics/pom.xml @@ -17,7 +17,7 @@ che-infrastructures-parent org.eclipse.che.infrastructure - 7.70.0-SNAPSHOT + 7.71.0-SNAPSHOT ../pom.xml infrastructure-metrics diff --git a/infrastructures/infrastructure-permission/pom.xml b/infrastructures/infrastructure-permission/pom.xml index 2aee6e0858..4e6f72ea52 100644 --- a/infrastructures/infrastructure-permission/pom.xml +++ b/infrastructures/infrastructure-permission/pom.xml @@ -17,7 +17,7 @@ che-infrastructures-parent org.eclipse.che.infrastructure - 7.70.0-SNAPSHOT + 7.71.0-SNAPSHOT infrastructure-permission Infrastructure :: Kubernetes Permissions diff --git a/infrastructures/kubernetes/pom.xml b/infrastructures/kubernetes/pom.xml index 1eeeb9a8d5..c28f0b1434 100644 --- a/infrastructures/kubernetes/pom.xml +++ b/infrastructures/kubernetes/pom.xml @@ -17,7 +17,7 @@ che-infrastructures-parent org.eclipse.che.infrastructure - 7.70.0-SNAPSHOT + 7.71.0-SNAPSHOT infrastructure-kubernetes Infrastructure :: Kubernetes diff --git a/infrastructures/openshift/pom.xml b/infrastructures/openshift/pom.xml index 7df63e74d6..4a76bfac02 100644 --- a/infrastructures/openshift/pom.xml +++ b/infrastructures/openshift/pom.xml @@ -17,7 +17,7 @@ che-infrastructures-parent org.eclipse.che.infrastructure - 7.70.0-SNAPSHOT + 7.71.0-SNAPSHOT infrastructure-openshift Infrastructure :: OpenShift diff --git a/infrastructures/pom.xml b/infrastructures/pom.xml index 3a21db29c0..260e776025 100644 --- a/infrastructures/pom.xml +++ b/infrastructures/pom.xml @@ -17,7 +17,7 @@ che-server org.eclipse.che - 7.70.0-SNAPSHOT + 7.71.0-SNAPSHOT ../pom.xml org.eclipse.che.infrastructure diff --git a/multiuser/api/che-multiuser-api-authentication-commons/pom.xml b/multiuser/api/che-multiuser-api-authentication-commons/pom.xml index d151975490..dcc732ef86 100644 --- a/multiuser/api/che-multiuser-api-authentication-commons/pom.xml +++ b/multiuser/api/che-multiuser-api-authentication-commons/pom.xml @@ -17,7 +17,7 @@ che-multiuser-api org.eclipse.che.multiuser - 7.70.0-SNAPSHOT + 7.71.0-SNAPSHOT che-multiuser-api-authentication-commons jar diff --git a/multiuser/api/che-multiuser-api-authorization-impl/pom.xml b/multiuser/api/che-multiuser-api-authorization-impl/pom.xml index 9d894e3775..771b86cce1 100644 --- a/multiuser/api/che-multiuser-api-authorization-impl/pom.xml +++ b/multiuser/api/che-multiuser-api-authorization-impl/pom.xml @@ -17,7 +17,7 @@ che-multiuser-api org.eclipse.che.multiuser - 7.70.0-SNAPSHOT + 7.71.0-SNAPSHOT che-multiuser-api-authorization-impl jar diff --git a/multiuser/api/che-multiuser-api-authorization/pom.xml b/multiuser/api/che-multiuser-api-authorization/pom.xml index fd7c2db2d9..f5dbf82c6a 100644 --- a/multiuser/api/che-multiuser-api-authorization/pom.xml +++ b/multiuser/api/che-multiuser-api-authorization/pom.xml @@ -17,7 +17,7 @@ che-multiuser-api org.eclipse.che.multiuser - 7.70.0-SNAPSHOT + 7.71.0-SNAPSHOT che-multiuser-api-authorization jar diff --git a/multiuser/api/che-multiuser-api-organization-shared/pom.xml b/multiuser/api/che-multiuser-api-organization-shared/pom.xml index 9e96eab676..5cd8d20a9c 100644 --- a/multiuser/api/che-multiuser-api-organization-shared/pom.xml +++ b/multiuser/api/che-multiuser-api-organization-shared/pom.xml @@ -17,7 +17,7 @@ che-multiuser-api org.eclipse.che.multiuser - 7.70.0-SNAPSHOT + 7.71.0-SNAPSHOT che-multiuser-api-organization-shared jar diff --git a/multiuser/api/che-multiuser-api-organization/pom.xml b/multiuser/api/che-multiuser-api-organization/pom.xml index e4bf89a2ae..d1057812e2 100644 --- a/multiuser/api/che-multiuser-api-organization/pom.xml +++ b/multiuser/api/che-multiuser-api-organization/pom.xml @@ -17,7 +17,7 @@ che-multiuser-api org.eclipse.che.multiuser - 7.70.0-SNAPSHOT + 7.71.0-SNAPSHOT che-multiuser-api-organization jar diff --git a/multiuser/api/che-multiuser-api-permission-shared/pom.xml b/multiuser/api/che-multiuser-api-permission-shared/pom.xml index 489a1f6448..13bfc073ef 100644 --- a/multiuser/api/che-multiuser-api-permission-shared/pom.xml +++ b/multiuser/api/che-multiuser-api-permission-shared/pom.xml @@ -17,7 +17,7 @@ che-multiuser-api org.eclipse.che.multiuser - 7.70.0-SNAPSHOT + 7.71.0-SNAPSHOT che-multiuser-api-permission-shared jar diff --git a/multiuser/api/che-multiuser-api-permission/pom.xml b/multiuser/api/che-multiuser-api-permission/pom.xml index 842698c407..0a8c1b766f 100644 --- a/multiuser/api/che-multiuser-api-permission/pom.xml +++ b/multiuser/api/che-multiuser-api-permission/pom.xml @@ -17,7 +17,7 @@ che-multiuser-api org.eclipse.che.multiuser - 7.70.0-SNAPSHOT + 7.71.0-SNAPSHOT che-multiuser-api-permission jar diff --git a/multiuser/api/che-multiuser-api-resource-shared/pom.xml b/multiuser/api/che-multiuser-api-resource-shared/pom.xml index 77b7c91e79..0d87b2dd14 100644 --- a/multiuser/api/che-multiuser-api-resource-shared/pom.xml +++ b/multiuser/api/che-multiuser-api-resource-shared/pom.xml @@ -17,7 +17,7 @@ che-multiuser-api org.eclipse.che.multiuser - 7.70.0-SNAPSHOT + 7.71.0-SNAPSHOT che-multiuser-api-resource-shared jar diff --git a/multiuser/api/che-multiuser-api-resource/pom.xml b/multiuser/api/che-multiuser-api-resource/pom.xml index 4aa08d2e55..6607949797 100644 --- a/multiuser/api/che-multiuser-api-resource/pom.xml +++ b/multiuser/api/che-multiuser-api-resource/pom.xml @@ -17,7 +17,7 @@ che-multiuser-api org.eclipse.che.multiuser - 7.70.0-SNAPSHOT + 7.71.0-SNAPSHOT che-multiuser-api-resource jar diff --git a/multiuser/api/che-multiuser-api-workspace-activity/pom.xml b/multiuser/api/che-multiuser-api-workspace-activity/pom.xml index 1b27274dd2..b03bc6f082 100644 --- a/multiuser/api/che-multiuser-api-workspace-activity/pom.xml +++ b/multiuser/api/che-multiuser-api-workspace-activity/pom.xml @@ -17,7 +17,7 @@ che-multiuser-api org.eclipse.che.multiuser - 7.70.0-SNAPSHOT + 7.71.0-SNAPSHOT che-multiuser-api-workspace-activity jar diff --git a/multiuser/api/pom.xml b/multiuser/api/pom.xml index 74c4286cda..356e44c440 100644 --- a/multiuser/api/pom.xml +++ b/multiuser/api/pom.xml @@ -17,7 +17,7 @@ che-multiuser-parent org.eclipse.che.multiuser - 7.70.0-SNAPSHOT + 7.71.0-SNAPSHOT ../pom.xml che-multiuser-api diff --git a/multiuser/integration-tests/che-multiuser-cascade-removal/pom.xml b/multiuser/integration-tests/che-multiuser-cascade-removal/pom.xml index 9b60645c90..66db740840 100644 --- a/multiuser/integration-tests/che-multiuser-cascade-removal/pom.xml +++ b/multiuser/integration-tests/che-multiuser-cascade-removal/pom.xml @@ -17,7 +17,7 @@ che-multiuser-integration-tests org.eclipse.che.multiuser - 7.70.0-SNAPSHOT + 7.71.0-SNAPSHOT che-multiuser-cascade-removal jar diff --git a/multiuser/integration-tests/che-multiuser-mysql-tck/pom.xml b/multiuser/integration-tests/che-multiuser-mysql-tck/pom.xml index 34ba3adfec..3c519cd28b 100644 --- a/multiuser/integration-tests/che-multiuser-mysql-tck/pom.xml +++ b/multiuser/integration-tests/che-multiuser-mysql-tck/pom.xml @@ -17,7 +17,7 @@ che-multiuser-integration-tests org.eclipse.che.multiuser - 7.70.0-SNAPSHOT + 7.71.0-SNAPSHOT che-multiuser-mysql-tck jar diff --git a/multiuser/integration-tests/che-multiuser-postgresql-tck/pom.xml b/multiuser/integration-tests/che-multiuser-postgresql-tck/pom.xml index 4f26dcb3f3..7544ffa130 100644 --- a/multiuser/integration-tests/che-multiuser-postgresql-tck/pom.xml +++ b/multiuser/integration-tests/che-multiuser-postgresql-tck/pom.xml @@ -17,7 +17,7 @@ che-multiuser-integration-tests org.eclipse.che.multiuser - 7.70.0-SNAPSHOT + 7.71.0-SNAPSHOT che-multiuser-postgresql-tck jar diff --git a/multiuser/integration-tests/pom.xml b/multiuser/integration-tests/pom.xml index 0750a007fe..519aefcdcd 100644 --- a/multiuser/integration-tests/pom.xml +++ b/multiuser/integration-tests/pom.xml @@ -17,7 +17,7 @@ che-multiuser-parent org.eclipse.che.multiuser - 7.70.0-SNAPSHOT + 7.71.0-SNAPSHOT che-multiuser-integration-tests pom diff --git a/multiuser/keycloak/che-multiuser-keycloak-server/pom.xml b/multiuser/keycloak/che-multiuser-keycloak-server/pom.xml index 4e1c09f399..2bad89ee73 100644 --- a/multiuser/keycloak/che-multiuser-keycloak-server/pom.xml +++ b/multiuser/keycloak/che-multiuser-keycloak-server/pom.xml @@ -17,7 +17,7 @@ che-multiuser-keycloak org.eclipse.che.multiuser - 7.70.0-SNAPSHOT + 7.71.0-SNAPSHOT che-multiuser-keycloak-server jar diff --git a/multiuser/keycloak/che-multiuser-keycloak-shared/pom.xml b/multiuser/keycloak/che-multiuser-keycloak-shared/pom.xml index 1341a8b489..821cee1b92 100644 --- a/multiuser/keycloak/che-multiuser-keycloak-shared/pom.xml +++ b/multiuser/keycloak/che-multiuser-keycloak-shared/pom.xml @@ -17,7 +17,7 @@ che-multiuser-keycloak org.eclipse.che.multiuser - 7.70.0-SNAPSHOT + 7.71.0-SNAPSHOT che-multiuser-keycloak-shared jar diff --git a/multiuser/keycloak/che-multiuser-keycloak-token-provider/pom.xml b/multiuser/keycloak/che-multiuser-keycloak-token-provider/pom.xml index 77966964e5..2696e312f7 100644 --- a/multiuser/keycloak/che-multiuser-keycloak-token-provider/pom.xml +++ b/multiuser/keycloak/che-multiuser-keycloak-token-provider/pom.xml @@ -17,7 +17,7 @@ che-multiuser-keycloak org.eclipse.che.multiuser - 7.70.0-SNAPSHOT + 7.71.0-SNAPSHOT che-multiuser-keycloak-token-provider Che Multiuser :: Keycloak Token Provider diff --git a/multiuser/keycloak/che-multiuser-keycloak-user-remover/pom.xml b/multiuser/keycloak/che-multiuser-keycloak-user-remover/pom.xml index 494d4b1250..b3a893c2ff 100644 --- a/multiuser/keycloak/che-multiuser-keycloak-user-remover/pom.xml +++ b/multiuser/keycloak/che-multiuser-keycloak-user-remover/pom.xml @@ -17,7 +17,7 @@ che-multiuser-keycloak org.eclipse.che.multiuser - 7.70.0-SNAPSHOT + 7.71.0-SNAPSHOT che-multiuser-keycloak-user-remover jar diff --git a/multiuser/keycloak/pom.xml b/multiuser/keycloak/pom.xml index 43e9882c9e..65a3fc1dcb 100644 --- a/multiuser/keycloak/pom.xml +++ b/multiuser/keycloak/pom.xml @@ -17,7 +17,7 @@ che-multiuser-parent org.eclipse.che.multiuser - 7.70.0-SNAPSHOT + 7.71.0-SNAPSHOT ../pom.xml che-multiuser-keycloak diff --git a/multiuser/machine-auth/che-multiuser-machine-authentication-shared/pom.xml b/multiuser/machine-auth/che-multiuser-machine-authentication-shared/pom.xml index fd2eeebeca..02bc1d63a6 100644 --- a/multiuser/machine-auth/che-multiuser-machine-authentication-shared/pom.xml +++ b/multiuser/machine-auth/che-multiuser-machine-authentication-shared/pom.xml @@ -17,7 +17,7 @@ che-multiuser-machine-auth org.eclipse.che.multiuser - 7.70.0-SNAPSHOT + 7.71.0-SNAPSHOT che-multiuser-machine-authentication-shared jar diff --git a/multiuser/machine-auth/che-multiuser-machine-authentication/pom.xml b/multiuser/machine-auth/che-multiuser-machine-authentication/pom.xml index aa0a83edac..c1d207c947 100644 --- a/multiuser/machine-auth/che-multiuser-machine-authentication/pom.xml +++ b/multiuser/machine-auth/che-multiuser-machine-authentication/pom.xml @@ -17,7 +17,7 @@ che-multiuser-machine-auth org.eclipse.che.multiuser - 7.70.0-SNAPSHOT + 7.71.0-SNAPSHOT che-multiuser-machine-authentication jar diff --git a/multiuser/machine-auth/pom.xml b/multiuser/machine-auth/pom.xml index 001ca6ff07..e4a1fb2a67 100644 --- a/multiuser/machine-auth/pom.xml +++ b/multiuser/machine-auth/pom.xml @@ -17,7 +17,7 @@ che-multiuser-parent org.eclipse.che.multiuser - 7.70.0-SNAPSHOT + 7.71.0-SNAPSHOT ../pom.xml che-multiuser-machine-auth diff --git a/multiuser/oidc/pom.xml b/multiuser/oidc/pom.xml index d241f4e84e..6124bae68d 100644 --- a/multiuser/oidc/pom.xml +++ b/multiuser/oidc/pom.xml @@ -17,7 +17,7 @@ che-multiuser-parent org.eclipse.che.multiuser - 7.70.0-SNAPSHOT + 7.71.0-SNAPSHOT che-multiuser-oidc jar diff --git a/multiuser/permission/che-multiuser-permission-devfile/pom.xml b/multiuser/permission/che-multiuser-permission-devfile/pom.xml index 678eb5dd27..165be36c35 100644 --- a/multiuser/permission/che-multiuser-permission-devfile/pom.xml +++ b/multiuser/permission/che-multiuser-permission-devfile/pom.xml @@ -17,7 +17,7 @@ che-multiuser-permission org.eclipse.che.multiuser - 7.70.0-SNAPSHOT + 7.71.0-SNAPSHOT che-multiuser-permission-devfile Che Multiuser :: Devfile Permissions diff --git a/multiuser/permission/che-multiuser-permission-logger/pom.xml b/multiuser/permission/che-multiuser-permission-logger/pom.xml index 81ba18206a..65cccb0553 100644 --- a/multiuser/permission/che-multiuser-permission-logger/pom.xml +++ b/multiuser/permission/che-multiuser-permission-logger/pom.xml @@ -17,7 +17,7 @@ che-multiuser-permission org.eclipse.che.multiuser - 7.70.0-SNAPSHOT + 7.71.0-SNAPSHOT che-multiuser-permission-logger Che Multiuser :: Logger Permissions diff --git a/multiuser/permission/che-multiuser-permission-resource/pom.xml b/multiuser/permission/che-multiuser-permission-resource/pom.xml index 0dd6a99cba..d64dc644a8 100644 --- a/multiuser/permission/che-multiuser-permission-resource/pom.xml +++ b/multiuser/permission/che-multiuser-permission-resource/pom.xml @@ -17,7 +17,7 @@ che-multiuser-permission org.eclipse.che.multiuser - 7.70.0-SNAPSHOT + 7.71.0-SNAPSHOT che-multiuser-permission-resource Che Multiuser :: Resource :: Permissions diff --git a/multiuser/permission/che-multiuser-permission-system/pom.xml b/multiuser/permission/che-multiuser-permission-system/pom.xml index 125d43a835..e399ed4062 100644 --- a/multiuser/permission/che-multiuser-permission-system/pom.xml +++ b/multiuser/permission/che-multiuser-permission-system/pom.xml @@ -17,7 +17,7 @@ che-multiuser-permission org.eclipse.che.multiuser - 7.70.0-SNAPSHOT + 7.71.0-SNAPSHOT che-multiuser-permission-system Che Multiuser :: System Permissions diff --git a/multiuser/permission/che-multiuser-permission-user/pom.xml b/multiuser/permission/che-multiuser-permission-user/pom.xml index 0dc4316632..c7c85409ec 100644 --- a/multiuser/permission/che-multiuser-permission-user/pom.xml +++ b/multiuser/permission/che-multiuser-permission-user/pom.xml @@ -17,7 +17,7 @@ che-multiuser-permission org.eclipse.che.multiuser - 7.70.0-SNAPSHOT + 7.71.0-SNAPSHOT che-multiuser-permission-user Che Multiuser :: User Permissions diff --git a/multiuser/permission/che-multiuser-permission-workspace-activity/pom.xml b/multiuser/permission/che-multiuser-permission-workspace-activity/pom.xml index 94a76d509a..7dd81d472f 100644 --- a/multiuser/permission/che-multiuser-permission-workspace-activity/pom.xml +++ b/multiuser/permission/che-multiuser-permission-workspace-activity/pom.xml @@ -17,7 +17,7 @@ che-multiuser-permission org.eclipse.che.multiuser - 7.70.0-SNAPSHOT + 7.71.0-SNAPSHOT che-multiuser-permission-workspace-activity Che Multiuser :: Workspace Activity Permissions diff --git a/multiuser/permission/che-multiuser-permission-workspace/pom.xml b/multiuser/permission/che-multiuser-permission-workspace/pom.xml index dc593d0562..187663ef6d 100644 --- a/multiuser/permission/che-multiuser-permission-workspace/pom.xml +++ b/multiuser/permission/che-multiuser-permission-workspace/pom.xml @@ -17,7 +17,7 @@ che-multiuser-permission org.eclipse.che.multiuser - 7.70.0-SNAPSHOT + 7.71.0-SNAPSHOT che-multiuser-permission-workspace Che Multiuser :: Workspace Permissions diff --git a/multiuser/permission/pom.xml b/multiuser/permission/pom.xml index 4a4ce6c0fc..2536751c47 100644 --- a/multiuser/permission/pom.xml +++ b/multiuser/permission/pom.xml @@ -17,7 +17,7 @@ che-multiuser-parent org.eclipse.che.multiuser - 7.70.0-SNAPSHOT + 7.71.0-SNAPSHOT ../pom.xml che-multiuser-permission diff --git a/multiuser/personal-account/pom.xml b/multiuser/personal-account/pom.xml index 718bb22faa..bac4f2e871 100644 --- a/multiuser/personal-account/pom.xml +++ b/multiuser/personal-account/pom.xml @@ -17,7 +17,7 @@ che-multiuser-parent org.eclipse.che.multiuser - 7.70.0-SNAPSHOT + 7.71.0-SNAPSHOT che-multiuser-personal-account jar diff --git a/multiuser/pom.xml b/multiuser/pom.xml index e366ebe5a5..35569d9b69 100644 --- a/multiuser/pom.xml +++ b/multiuser/pom.xml @@ -17,7 +17,7 @@ che-server org.eclipse.che - 7.70.0-SNAPSHOT + 7.71.0-SNAPSHOT ../pom.xml org.eclipse.che.multiuser diff --git a/multiuser/sql-schema/pom.xml b/multiuser/sql-schema/pom.xml index ebf9934b85..8ac5d31641 100644 --- a/multiuser/sql-schema/pom.xml +++ b/multiuser/sql-schema/pom.xml @@ -17,7 +17,7 @@ che-multiuser-parent org.eclipse.che.multiuser - 7.70.0-SNAPSHOT + 7.71.0-SNAPSHOT ../pom.xml che-multiuser-sql-schema diff --git a/pom.xml b/pom.xml index 63253ad573..e8aa6ce9b3 100644 --- a/pom.xml +++ b/pom.xml @@ -16,7 +16,7 @@ 4.0.0 org.eclipse.che che-server - 7.70.0-SNAPSHOT + 7.71.0-SNAPSHOT pom Che Server Eclipse Che Server @@ -100,7 +100,7 @@ Red Hat, Inc. - initial API and implementation ${project.version} - 7.70.0-SNAPSHOT + 7.71.0-SNAPSHOT 1.0-beta2 Red Hat, Inc. diff --git a/typescript-dto/dto-pom.xml b/typescript-dto/dto-pom.xml index 18d4b905ea..3491552aac 100644 --- a/typescript-dto/dto-pom.xml +++ b/typescript-dto/dto-pom.xml @@ -23,7 +23,7 @@ pom Che TypeScript DTO - 7.70.0-SNAPSHOT + 7.71.0-SNAPSHOT diff --git a/wsmaster/che-core-api-account/pom.xml b/wsmaster/che-core-api-account/pom.xml index 26669f1bc5..2fed7786da 100644 --- a/wsmaster/che-core-api-account/pom.xml +++ b/wsmaster/che-core-api-account/pom.xml @@ -17,7 +17,7 @@ che-master-parent org.eclipse.che.core - 7.70.0-SNAPSHOT + 7.71.0-SNAPSHOT che-core-api-account Che Core :: API :: Account diff --git a/wsmaster/che-core-api-auth-azure-devops/pom.xml b/wsmaster/che-core-api-auth-azure-devops/pom.xml index a78e340465..d9c931c1e0 100644 --- a/wsmaster/che-core-api-auth-azure-devops/pom.xml +++ b/wsmaster/che-core-api-auth-azure-devops/pom.xml @@ -17,7 +17,7 @@ che-master-parent org.eclipse.che.core - 7.70.0-SNAPSHOT + 7.71.0-SNAPSHOT che-core-api-auth-azure-devops jar diff --git a/wsmaster/che-core-api-auth-bitbucket/pom.xml b/wsmaster/che-core-api-auth-bitbucket/pom.xml index f40b4fbe73..148945f15b 100644 --- a/wsmaster/che-core-api-auth-bitbucket/pom.xml +++ b/wsmaster/che-core-api-auth-bitbucket/pom.xml @@ -17,7 +17,7 @@ che-master-parent org.eclipse.che.core - 7.70.0-SNAPSHOT + 7.71.0-SNAPSHOT che-core-api-auth-bitbucket jar diff --git a/wsmaster/che-core-api-auth-github/pom.xml b/wsmaster/che-core-api-auth-github/pom.xml index ed11cd6018..12e16d86c8 100644 --- a/wsmaster/che-core-api-auth-github/pom.xml +++ b/wsmaster/che-core-api-auth-github/pom.xml @@ -17,7 +17,7 @@ che-master-parent org.eclipse.che.core - 7.70.0-SNAPSHOT + 7.71.0-SNAPSHOT che-core-api-auth-github jar diff --git a/wsmaster/che-core-api-auth-gitlab/pom.xml b/wsmaster/che-core-api-auth-gitlab/pom.xml index a6d6f49166..62b483984c 100644 --- a/wsmaster/che-core-api-auth-gitlab/pom.xml +++ b/wsmaster/che-core-api-auth-gitlab/pom.xml @@ -17,7 +17,7 @@ che-master-parent org.eclipse.che.core - 7.70.0-SNAPSHOT + 7.71.0-SNAPSHOT che-core-api-auth-gitlab jar diff --git a/wsmaster/che-core-api-auth-openshift/pom.xml b/wsmaster/che-core-api-auth-openshift/pom.xml index bae35c49e3..6e31a2becb 100644 --- a/wsmaster/che-core-api-auth-openshift/pom.xml +++ b/wsmaster/che-core-api-auth-openshift/pom.xml @@ -17,7 +17,7 @@ che-master-parent org.eclipse.che.core - 7.70.0-SNAPSHOT + 7.71.0-SNAPSHOT che-core-api-auth-openshift jar diff --git a/wsmaster/che-core-api-auth-shared/pom.xml b/wsmaster/che-core-api-auth-shared/pom.xml index f6a624a6b5..6b6e0eb082 100644 --- a/wsmaster/che-core-api-auth-shared/pom.xml +++ b/wsmaster/che-core-api-auth-shared/pom.xml @@ -17,7 +17,7 @@ che-master-parent org.eclipse.che.core - 7.70.0-SNAPSHOT + 7.71.0-SNAPSHOT che-core-api-auth-shared jar diff --git a/wsmaster/che-core-api-auth/pom.xml b/wsmaster/che-core-api-auth/pom.xml index f2926a4b26..9dc277975d 100644 --- a/wsmaster/che-core-api-auth/pom.xml +++ b/wsmaster/che-core-api-auth/pom.xml @@ -17,7 +17,7 @@ che-master-parent org.eclipse.che.core - 7.70.0-SNAPSHOT + 7.71.0-SNAPSHOT che-core-api-auth jar diff --git a/wsmaster/che-core-api-devfile-shared/pom.xml b/wsmaster/che-core-api-devfile-shared/pom.xml index afe6c76b1d..7670d5e63c 100644 --- a/wsmaster/che-core-api-devfile-shared/pom.xml +++ b/wsmaster/che-core-api-devfile-shared/pom.xml @@ -17,7 +17,7 @@ che-master-parent org.eclipse.che.core - 7.70.0-SNAPSHOT + 7.71.0-SNAPSHOT che-core-api-devfile-shared jar diff --git a/wsmaster/che-core-api-devfile/pom.xml b/wsmaster/che-core-api-devfile/pom.xml index dcd7114188..14704d2bb1 100644 --- a/wsmaster/che-core-api-devfile/pom.xml +++ b/wsmaster/che-core-api-devfile/pom.xml @@ -17,7 +17,7 @@ che-master-parent org.eclipse.che.core - 7.70.0-SNAPSHOT + 7.71.0-SNAPSHOT che-core-api-devfile jar diff --git a/wsmaster/che-core-api-factory-azure-devops/pom.xml b/wsmaster/che-core-api-factory-azure-devops/pom.xml index 0fe7eae3fa..2e0b70f948 100644 --- a/wsmaster/che-core-api-factory-azure-devops/pom.xml +++ b/wsmaster/che-core-api-factory-azure-devops/pom.xml @@ -17,7 +17,7 @@ che-master-parent org.eclipse.che.core - 7.70.0-SNAPSHOT + 7.71.0-SNAPSHOT che-core-api-factory-azure-devops jar diff --git a/wsmaster/che-core-api-factory-bitbucket-server/pom.xml b/wsmaster/che-core-api-factory-bitbucket-server/pom.xml index 71dc697a03..f0686dfef1 100644 --- a/wsmaster/che-core-api-factory-bitbucket-server/pom.xml +++ b/wsmaster/che-core-api-factory-bitbucket-server/pom.xml @@ -17,7 +17,7 @@ che-master-parent org.eclipse.che.core - 7.70.0-SNAPSHOT + 7.71.0-SNAPSHOT che-core-api-factory-bitbucket-server jar diff --git a/wsmaster/che-core-api-factory-bitbucket/pom.xml b/wsmaster/che-core-api-factory-bitbucket/pom.xml index d26b12dfba..39a12cf2d0 100644 --- a/wsmaster/che-core-api-factory-bitbucket/pom.xml +++ b/wsmaster/che-core-api-factory-bitbucket/pom.xml @@ -17,7 +17,7 @@ che-master-parent org.eclipse.che.core - 7.70.0-SNAPSHOT + 7.71.0-SNAPSHOT che-core-api-factory-bitbucket jar diff --git a/wsmaster/che-core-api-factory-git-ssh/pom.xml b/wsmaster/che-core-api-factory-git-ssh/pom.xml index 1837ff1394..94bfb4d8f7 100644 --- a/wsmaster/che-core-api-factory-git-ssh/pom.xml +++ b/wsmaster/che-core-api-factory-git-ssh/pom.xml @@ -17,7 +17,7 @@ che-master-parent org.eclipse.che.core - 7.70.0-SNAPSHOT + 7.71.0-SNAPSHOT che-core-api-factory-git-ssh jar diff --git a/wsmaster/che-core-api-factory-github/pom.xml b/wsmaster/che-core-api-factory-github/pom.xml index 939e8bba1c..334bc163dc 100644 --- a/wsmaster/che-core-api-factory-github/pom.xml +++ b/wsmaster/che-core-api-factory-github/pom.xml @@ -17,7 +17,7 @@ che-master-parent org.eclipse.che.core - 7.70.0-SNAPSHOT + 7.71.0-SNAPSHOT che-core-api-factory-github jar diff --git a/wsmaster/che-core-api-factory-gitlab/pom.xml b/wsmaster/che-core-api-factory-gitlab/pom.xml index c38b67a4f9..e0cc9cd3d9 100644 --- a/wsmaster/che-core-api-factory-gitlab/pom.xml +++ b/wsmaster/che-core-api-factory-gitlab/pom.xml @@ -17,7 +17,7 @@ che-master-parent org.eclipse.che.core - 7.70.0-SNAPSHOT + 7.71.0-SNAPSHOT che-core-api-factory-gitlab jar diff --git a/wsmaster/che-core-api-factory-shared/pom.xml b/wsmaster/che-core-api-factory-shared/pom.xml index 1bd6b4e614..e3485d30a3 100644 --- a/wsmaster/che-core-api-factory-shared/pom.xml +++ b/wsmaster/che-core-api-factory-shared/pom.xml @@ -17,7 +17,7 @@ che-master-parent org.eclipse.che.core - 7.70.0-SNAPSHOT + 7.71.0-SNAPSHOT che-core-api-factory-shared jar diff --git a/wsmaster/che-core-api-factory/pom.xml b/wsmaster/che-core-api-factory/pom.xml index a21f8fffe3..789bb6b643 100644 --- a/wsmaster/che-core-api-factory/pom.xml +++ b/wsmaster/che-core-api-factory/pom.xml @@ -17,7 +17,7 @@ che-master-parent org.eclipse.che.core - 7.70.0-SNAPSHOT + 7.71.0-SNAPSHOT che-core-api-factory jar diff --git a/wsmaster/che-core-api-logger-shared/pom.xml b/wsmaster/che-core-api-logger-shared/pom.xml index 9c57140cc3..716c43318c 100644 --- a/wsmaster/che-core-api-logger-shared/pom.xml +++ b/wsmaster/che-core-api-logger-shared/pom.xml @@ -17,7 +17,7 @@ che-master-parent org.eclipse.che.core - 7.70.0-SNAPSHOT + 7.71.0-SNAPSHOT che-core-api-logger-shared jar diff --git a/wsmaster/che-core-api-logger/pom.xml b/wsmaster/che-core-api-logger/pom.xml index bb2560e1a4..d6473d2f26 100644 --- a/wsmaster/che-core-api-logger/pom.xml +++ b/wsmaster/che-core-api-logger/pom.xml @@ -17,7 +17,7 @@ che-master-parent org.eclipse.che.core - 7.70.0-SNAPSHOT + 7.71.0-SNAPSHOT che-core-api-logger jar diff --git a/wsmaster/che-core-api-metrics/pom.xml b/wsmaster/che-core-api-metrics/pom.xml index 356028c353..0b7febb608 100644 --- a/wsmaster/che-core-api-metrics/pom.xml +++ b/wsmaster/che-core-api-metrics/pom.xml @@ -17,7 +17,7 @@ che-master-parent org.eclipse.che.core - 7.70.0-SNAPSHOT + 7.71.0-SNAPSHOT che-core-api-metrics jar diff --git a/wsmaster/che-core-api-ssh-shared/pom.xml b/wsmaster/che-core-api-ssh-shared/pom.xml index ea11c8847b..2418404350 100644 --- a/wsmaster/che-core-api-ssh-shared/pom.xml +++ b/wsmaster/che-core-api-ssh-shared/pom.xml @@ -17,7 +17,7 @@ che-master-parent org.eclipse.che.core - 7.70.0-SNAPSHOT + 7.71.0-SNAPSHOT che-core-api-ssh-shared jar diff --git a/wsmaster/che-core-api-ssh/pom.xml b/wsmaster/che-core-api-ssh/pom.xml index 4fadfd8053..38ea5d8fa5 100644 --- a/wsmaster/che-core-api-ssh/pom.xml +++ b/wsmaster/che-core-api-ssh/pom.xml @@ -17,7 +17,7 @@ che-master-parent org.eclipse.che.core - 7.70.0-SNAPSHOT + 7.71.0-SNAPSHOT che-core-api-ssh jar diff --git a/wsmaster/che-core-api-system-shared/pom.xml b/wsmaster/che-core-api-system-shared/pom.xml index 9021ff570f..e58f383af5 100644 --- a/wsmaster/che-core-api-system-shared/pom.xml +++ b/wsmaster/che-core-api-system-shared/pom.xml @@ -17,7 +17,7 @@ che-master-parent org.eclipse.che.core - 7.70.0-SNAPSHOT + 7.71.0-SNAPSHOT che-core-api-system-shared jar diff --git a/wsmaster/che-core-api-system/pom.xml b/wsmaster/che-core-api-system/pom.xml index 1b86a57eb5..25245eb177 100644 --- a/wsmaster/che-core-api-system/pom.xml +++ b/wsmaster/che-core-api-system/pom.xml @@ -17,7 +17,7 @@ che-master-parent org.eclipse.che.core - 7.70.0-SNAPSHOT + 7.71.0-SNAPSHOT che-core-api-system jar diff --git a/wsmaster/che-core-api-user-shared/pom.xml b/wsmaster/che-core-api-user-shared/pom.xml index d333f37608..42a59c4f5a 100644 --- a/wsmaster/che-core-api-user-shared/pom.xml +++ b/wsmaster/che-core-api-user-shared/pom.xml @@ -17,7 +17,7 @@ che-master-parent org.eclipse.che.core - 7.70.0-SNAPSHOT + 7.71.0-SNAPSHOT che-core-api-user-shared Che Core :: API :: User :: Shared diff --git a/wsmaster/che-core-api-user/pom.xml b/wsmaster/che-core-api-user/pom.xml index 792e4f3c40..e2bdaf4328 100644 --- a/wsmaster/che-core-api-user/pom.xml +++ b/wsmaster/che-core-api-user/pom.xml @@ -17,7 +17,7 @@ che-master-parent org.eclipse.che.core - 7.70.0-SNAPSHOT + 7.71.0-SNAPSHOT che-core-api-user Che Core :: API :: User diff --git a/wsmaster/che-core-api-workspace-activity/pom.xml b/wsmaster/che-core-api-workspace-activity/pom.xml index ce840cf2d6..1217a2a33d 100644 --- a/wsmaster/che-core-api-workspace-activity/pom.xml +++ b/wsmaster/che-core-api-workspace-activity/pom.xml @@ -17,7 +17,7 @@ che-master-parent org.eclipse.che.core - 7.70.0-SNAPSHOT + 7.71.0-SNAPSHOT che-core-api-workspace-activity jar diff --git a/wsmaster/che-core-api-workspace-shared/pom.xml b/wsmaster/che-core-api-workspace-shared/pom.xml index 6445cc94e5..d286fb883f 100644 --- a/wsmaster/che-core-api-workspace-shared/pom.xml +++ b/wsmaster/che-core-api-workspace-shared/pom.xml @@ -17,7 +17,7 @@ che-master-parent org.eclipse.che.core - 7.70.0-SNAPSHOT + 7.71.0-SNAPSHOT che-core-api-workspace-shared jar diff --git a/wsmaster/che-core-api-workspace/pom.xml b/wsmaster/che-core-api-workspace/pom.xml index 1eec47b572..4169cfcca2 100644 --- a/wsmaster/che-core-api-workspace/pom.xml +++ b/wsmaster/che-core-api-workspace/pom.xml @@ -17,7 +17,7 @@ che-master-parent org.eclipse.che.core - 7.70.0-SNAPSHOT + 7.71.0-SNAPSHOT che-core-api-workspace jar diff --git a/wsmaster/che-core-sql-schema/pom.xml b/wsmaster/che-core-sql-schema/pom.xml index 3552f11f70..bf3e717983 100644 --- a/wsmaster/che-core-sql-schema/pom.xml +++ b/wsmaster/che-core-sql-schema/pom.xml @@ -17,7 +17,7 @@ che-master-parent org.eclipse.che.core - 7.70.0-SNAPSHOT + 7.71.0-SNAPSHOT che-core-sql-schema Che Core :: SQL :: Schema diff --git a/wsmaster/integration-tests/cascade-removal/pom.xml b/wsmaster/integration-tests/cascade-removal/pom.xml index 03929107e8..ac4c29add2 100644 --- a/wsmaster/integration-tests/cascade-removal/pom.xml +++ b/wsmaster/integration-tests/cascade-removal/pom.xml @@ -17,7 +17,7 @@ integration-tests-parent org.eclipse.che.core - 7.70.0-SNAPSHOT + 7.71.0-SNAPSHOT cascade-removal Integration Tests :: Cascade Removal diff --git a/wsmaster/integration-tests/mysql-tck/pom.xml b/wsmaster/integration-tests/mysql-tck/pom.xml index 3c6efcc998..a33436136a 100644 --- a/wsmaster/integration-tests/mysql-tck/pom.xml +++ b/wsmaster/integration-tests/mysql-tck/pom.xml @@ -17,7 +17,7 @@ integration-tests-parent org.eclipse.che.core - 7.70.0-SNAPSHOT + 7.71.0-SNAPSHOT mysql-tck jar diff --git a/wsmaster/integration-tests/pom.xml b/wsmaster/integration-tests/pom.xml index 6d487b4842..80e9bb0e5c 100644 --- a/wsmaster/integration-tests/pom.xml +++ b/wsmaster/integration-tests/pom.xml @@ -17,7 +17,7 @@ che-master-parent org.eclipse.che.core - 7.70.0-SNAPSHOT + 7.71.0-SNAPSHOT ../pom.xml integration-tests-parent diff --git a/wsmaster/integration-tests/postgresql-tck/pom.xml b/wsmaster/integration-tests/postgresql-tck/pom.xml index fb88c993e3..824373c351 100644 --- a/wsmaster/integration-tests/postgresql-tck/pom.xml +++ b/wsmaster/integration-tests/postgresql-tck/pom.xml @@ -17,7 +17,7 @@ integration-tests-parent org.eclipse.che.core - 7.70.0-SNAPSHOT + 7.71.0-SNAPSHOT postgresql-tck jar diff --git a/wsmaster/pom.xml b/wsmaster/pom.xml index 8371a1bd67..0240deb71f 100644 --- a/wsmaster/pom.xml +++ b/wsmaster/pom.xml @@ -17,7 +17,7 @@ che-core-parent org.eclipse.che.core - 7.70.0-SNAPSHOT + 7.71.0-SNAPSHOT ../core/pom.xml che-master-parent From 21323d1b12e381f4434d78eefe9f55da50a82bcb Mon Sep 17 00:00:00 2001 From: che-bot <39771996+che-bot@users.noreply.github.com> Date: Tue, 4 Jul 2023 16:27:14 +0200 Subject: [PATCH 32/75] chore: Update from ubi8-minimal:8.8-860 to ubi8-minimal:8.8-1014 (#530) Signed-off-by: Nick Boldt Co-authored-by: Nick Boldt --- dockerfiles/che/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dockerfiles/che/Dockerfile b/dockerfiles/che/Dockerfile index d48b7f754a..3343125d40 100644 --- a/dockerfiles/che/Dockerfile +++ b/dockerfiles/che/Dockerfile @@ -10,7 +10,7 @@ # # https://access.redhat.com/containers/?tab=tags#/registry.access.redhat.com/ubi8-minimal -FROM registry.access.redhat.com/ubi8-minimal:8.8-860 +FROM registry.access.redhat.com/ubi8-minimal:8.8-1014 USER root ENV CHE_HOME=/home/user/eclipse-che ENV JAVA_HOME=/usr/lib/jvm/jre From aee207932219a054b4b3459eb0eec2bfa28e038e Mon Sep 17 00:00:00 2001 From: Igor Vinokur Date: Thu, 6 Jul 2023 09:37:33 +0300 Subject: [PATCH 33/75] Use hardcoded string as username for Azure git credentials (#529) Since Azure git provider do not support username for its user object, use username string as username in the git credentials file if the PAT is related to Azure Devops: https://username:@dev.azure.com --- .../KubernetesGitCredentialManager.java | 20 +++++-- .../KubernetesGitCredentialManagerTest.java | 52 +++++++++++++++++++ 2 files changed, 69 insertions(+), 3 deletions(-) diff --git a/infrastructures/infrastructure-factory/src/main/java/org/eclipse/che/api/factory/server/scm/kubernetes/KubernetesGitCredentialManager.java b/infrastructures/infrastructure-factory/src/main/java/org/eclipse/che/api/factory/server/scm/kubernetes/KubernetesGitCredentialManager.java index 908ee290e8..b5c3a2fd83 100644 --- a/infrastructures/infrastructure-factory/src/main/java/org/eclipse/che/api/factory/server/scm/kubernetes/KubernetesGitCredentialManager.java +++ b/infrastructures/infrastructure-factory/src/main/java/org/eclipse/che/api/factory/server/scm/kubernetes/KubernetesGitCredentialManager.java @@ -11,6 +11,7 @@ */ package org.eclipse.che.api.factory.server.scm.kubernetes; +import static com.google.common.base.Strings.isNullOrEmpty; import static java.lang.String.format; import static java.nio.charset.StandardCharsets.UTF_8; import static org.eclipse.che.api.factory.server.scm.PersonalAccessTokenFetcher.OAUTH_2_PREFIX; @@ -156,9 +157,7 @@ public class KubernetesGitCredentialManager implements GitCredentialManager { format( "%s://%s:%s@%s%s", scmUrl.getProtocol(), - personalAccessToken.getScmTokenName().startsWith(OAUTH_2_PREFIX) - ? "oauth2" - : personalAccessToken.getScmUserName(), + getUsernameSegment(personalAccessToken), URLEncoder.encode(personalAccessToken.getToken(), UTF_8), scmUrl.getHost(), scmUrl.getPort() != 80 && scmUrl.getPort() != -1 @@ -171,6 +170,21 @@ public class KubernetesGitCredentialManager implements GitCredentialManager { } } + /** + * Returns username URL segment for git credentials. For OAuth2 tokens it is "oauth2", for others + * - {@param personalAccessToken#getScmUserName()} or just "username" string if the token has a + * non-null {@param personalAccessToken#getScmOrganization()}. This is needed to support providers + * that do not have username in their user object. Such providers have an additional organization + * field. + */ + private String getUsernameSegment(PersonalAccessToken personalAccessToken) { + return personalAccessToken.getScmTokenName().startsWith(OAUTH_2_PREFIX) + ? "oauth2" + : isNullOrEmpty(personalAccessToken.getScmOrganization()) + ? personalAccessToken.getScmUserName() + : "username"; + } + /** * It is not guaranteed that this code will always return same namespace, but since credentials * are now added into manually pre-created user namespace, we can expect always the same result diff --git a/infrastructures/infrastructure-factory/src/test/java/org/eclipse/che/api/factory/server/scm/kubernetes/KubernetesGitCredentialManagerTest.java b/infrastructures/infrastructure-factory/src/test/java/org/eclipse/che/api/factory/server/scm/kubernetes/KubernetesGitCredentialManagerTest.java index 9f9bf8c8b7..5ac8e79bde 100644 --- a/infrastructures/infrastructure-factory/src/test/java/org/eclipse/che/api/factory/server/scm/kubernetes/KubernetesGitCredentialManagerTest.java +++ b/infrastructures/infrastructure-factory/src/test/java/org/eclipse/che/api/factory/server/scm/kubernetes/KubernetesGitCredentialManagerTest.java @@ -108,6 +108,58 @@ public class KubernetesGitCredentialManagerTest { assertFalse(createdSecret.getMetadata().getName().contains(token.getScmUserName())); } + @Test + public void shouldUseHardcodedUsernameIfScmOrganizationIsDefined() throws Exception { + // given + KubernetesNamespaceMeta namespaceMeta = new KubernetesNamespaceMetaImpl("test"); + PersonalAccessToken token = + new PersonalAccessToken( + "https://bitbucket-server.com:5648", + "cheUser", + "cheOrganization", + "username", + "token-name", + "tid-23434", + "token123"); + + Map annotations = new HashMap<>(DEFAULT_SECRET_ANNOTATIONS); + + annotations.put(ANNOTATION_SCM_URL, token.getScmProviderUrl() + "/"); + annotations.put(ANNOTATION_SCM_USERNAME, token.getScmUserName()); + annotations.put(ANNOTATION_CHE_USERID, token.getCheUserId()); + ObjectMeta objectMeta = + new ObjectMetaBuilder() + .withName(NameGenerator.generate(NAME_PATTERN, 5)) + .withAnnotations(annotations) + .build(); + Secret existing = + new SecretBuilder() + .withMetadata(objectMeta) + .withData(Map.of("credentials", "foo 123")) + .build(); + + when(namespaceFactory.list()).thenReturn(Collections.singletonList(namespaceMeta)); + + when(cheServerKubernetesClientFactory.create()).thenReturn(kubeClient); + when(kubeClient.secrets()).thenReturn(secretsMixedOperation); + when(secretsMixedOperation.inNamespace(eq(namespaceMeta.getName()))) + .thenReturn(nonNamespaceOperation); + when(nonNamespaceOperation.withLabels(anyMap())).thenReturn(filterWatchDeletable); + when(filterWatchDeletable.list()).thenReturn(secretList); + when(secretList.getItems()).thenReturn(singletonList(existing)); + + // when + kubernetesGitCredentialManager.createOrReplace(token); + // then + ArgumentCaptor captor = ArgumentCaptor.forClass(Secret.class); + verify(nonNamespaceOperation).createOrReplace(captor.capture()); + Secret createdSecret = captor.getValue(); + assertNotNull(createdSecret); + assertEquals( + new String(Base64.getDecoder().decode(createdSecret.getData().get("credentials"))), + "https://username:token123@bitbucket-server.com:5648"); + } + @Test public void testCreateAndSaveNewOAuthGitCredential() throws Exception { KubernetesNamespaceMeta meta = new KubernetesNamespaceMetaImpl("test"); From c5963e0de77b98298af79c642e44e372f85739c6 Mon Sep 17 00:00:00 2001 From: Igor Vinokur Date: Wed, 12 Jul 2023 10:33:56 +0300 Subject: [PATCH 34/75] Pass string to ObjectMapper instead of InputStream (#531) Pass string to ObjectMapper instead of InputStream in order to avoid No content to map due to end-of-input error caused by jdk.internal.net.http.ResponseSubscribers$HttpResponseInputStream. An error was discovered in our customers environment --- .../azure/devops/AzureDevOpsApiClient.java | 4 +++- .../HttpBitbucketServerApiClient.java | 20 ++++++++++++++----- .../server/bitbucket/BitbucketApiClient.java | 8 ++++++-- .../server/github/GithubApiClient.java | 12 ++++++++--- .../server/gitlab/GitlabApiClient.java | 8 ++++++-- 5 files changed, 39 insertions(+), 13 deletions(-) diff --git a/wsmaster/che-core-api-factory-azure-devops/src/main/java/org/eclipse/che/api/factory/server/azure/devops/AzureDevOpsApiClient.java b/wsmaster/che-core-api-factory-azure-devops/src/main/java/org/eclipse/che/api/factory/server/azure/devops/AzureDevOpsApiClient.java index 9178354e30..a18ae884d2 100644 --- a/wsmaster/che-core-api-factory-azure-devops/src/main/java/org/eclipse/che/api/factory/server/azure/devops/AzureDevOpsApiClient.java +++ b/wsmaster/che-core-api-factory-azure-devops/src/main/java/org/eclipse/che/api/factory/server/azure/devops/AzureDevOpsApiClient.java @@ -116,7 +116,9 @@ public class AzureDevOpsApiClient { userDataRequest, response -> { try { - return OBJECT_MAPPER.readValue(response.body(), AzureDevOpsUser.class); + String result = + CharStreams.toString(new InputStreamReader(response.body(), Charsets.UTF_8)); + return OBJECT_MAPPER.readValue(result, AzureDevOpsUser.class); } catch (IOException e) { throw new UncheckedIOException(e); } diff --git a/wsmaster/che-core-api-factory-bitbucket-server/src/main/java/org/eclipse/che/api/factory/server/bitbucket/HttpBitbucketServerApiClient.java b/wsmaster/che-core-api-factory-bitbucket-server/src/main/java/org/eclipse/che/api/factory/server/bitbucket/HttpBitbucketServerApiClient.java index 6e1f3521fe..9ee5da4f73 100644 --- a/wsmaster/che-core-api-factory-bitbucket-server/src/main/java/org/eclipse/che/api/factory/server/bitbucket/HttpBitbucketServerApiClient.java +++ b/wsmaster/che-core-api-factory-bitbucket-server/src/main/java/org/eclipse/che/api/factory/server/bitbucket/HttpBitbucketServerApiClient.java @@ -176,7 +176,9 @@ public class HttpBitbucketServerApiClient implements BitbucketServerApiClient { request, inputStream -> { try { - return OM.readValue(inputStream, BitbucketUser.class); + String result = + CharStreams.toString(new InputStreamReader(inputStream, Charsets.UTF_8)); + return OM.readValue(result, BitbucketUser.class); } catch (IOException e) { throw new UncheckedIOException(e); } @@ -230,7 +232,9 @@ public class HttpBitbucketServerApiClient implements BitbucketServerApiClient { request, inputStream -> { try { - return OM.readValue(inputStream, String.class); + String result = + CharStreams.toString(new InputStreamReader(inputStream, Charsets.UTF_8)); + return OM.readValue(result, String.class); } catch (IOException e) { throw new UncheckedIOException(e); } @@ -271,7 +275,9 @@ public class HttpBitbucketServerApiClient implements BitbucketServerApiClient { request, inputStream -> { try { - return OM.readValue(inputStream, BitbucketPersonalAccessToken.class); + String result = + CharStreams.toString(new InputStreamReader(inputStream, Charsets.UTF_8)); + return OM.readValue(result, BitbucketPersonalAccessToken.class); } catch (IOException e) { throw new UncheckedIOException(e); } @@ -313,7 +319,9 @@ public class HttpBitbucketServerApiClient implements BitbucketServerApiClient { request, inputStream -> { try { - return OM.readValue(inputStream, BitbucketPersonalAccessToken.class); + String result = + CharStreams.toString(new InputStreamReader(inputStream, Charsets.UTF_8)); + return OM.readValue(result, BitbucketPersonalAccessToken.class); } catch (IOException e) { throw new UncheckedIOException(e); } @@ -388,7 +396,9 @@ public class HttpBitbucketServerApiClient implements BitbucketServerApiClient { request, inputStream -> { try { - return OM.readValue(inputStream, typeReference); + String result = + CharStreams.toString(new InputStreamReader(inputStream, Charsets.UTF_8)); + return OM.readValue(result, typeReference); } catch (IOException e) { throw new UncheckedIOException(e); } diff --git a/wsmaster/che-core-api-factory-bitbucket/src/main/java/org/eclipse/che/api/factory/server/bitbucket/BitbucketApiClient.java b/wsmaster/che-core-api-factory-bitbucket/src/main/java/org/eclipse/che/api/factory/server/bitbucket/BitbucketApiClient.java index 42778ddc97..b0d025d7c5 100644 --- a/wsmaster/che-core-api-factory-bitbucket/src/main/java/org/eclipse/che/api/factory/server/bitbucket/BitbucketApiClient.java +++ b/wsmaster/che-core-api-factory-bitbucket/src/main/java/org/eclipse/che/api/factory/server/bitbucket/BitbucketApiClient.java @@ -108,7 +108,9 @@ public class BitbucketApiClient { request, response -> { try { - return OBJECT_MAPPER.readValue(response.body(), BitbucketUser.class); + String result = + CharStreams.toString(new InputStreamReader(response.body(), Charsets.UTF_8)); + return OBJECT_MAPPER.readValue(result, BitbucketUser.class); } catch (IOException e) { throw new UncheckedIOException(e); } @@ -154,7 +156,9 @@ public class BitbucketApiClient { request, response -> { try { - return OBJECT_MAPPER.readValue(response.body(), BitbucketUserEmail.class); + String result = + CharStreams.toString(new InputStreamReader(response.body(), Charsets.UTF_8)); + return OBJECT_MAPPER.readValue(result, BitbucketUserEmail.class); } catch (IOException e) { throw new UncheckedIOException(e); } diff --git a/wsmaster/che-core-api-factory-github/src/main/java/org/eclipse/che/api/factory/server/github/GithubApiClient.java b/wsmaster/che-core-api-factory-github/src/main/java/org/eclipse/che/api/factory/server/github/GithubApiClient.java index 88b89d7399..67d14525e8 100644 --- a/wsmaster/che-core-api-factory-github/src/main/java/org/eclipse/che/api/factory/server/github/GithubApiClient.java +++ b/wsmaster/che-core-api-factory-github/src/main/java/org/eclipse/che/api/factory/server/github/GithubApiClient.java @@ -111,7 +111,9 @@ public class GithubApiClient { request, response -> { try { - return OBJECT_MAPPER.readValue(response.body(), GithubUser.class); + String result = + CharStreams.toString(new InputStreamReader(response.body(), Charsets.UTF_8)); + return OBJECT_MAPPER.readValue(result, GithubUser.class); } catch (IOException e) { throw new UncheckedIOException(e); } @@ -140,7 +142,9 @@ public class GithubApiClient { request, response -> { try { - return OBJECT_MAPPER.readValue(response.body(), GithubPullRequest.class); + String result = + CharStreams.toString(new InputStreamReader(response.body(), Charsets.UTF_8)); + return OBJECT_MAPPER.readValue(result, GithubPullRequest.class); } catch (IOException e) { throw new UncheckedIOException(e); } @@ -181,7 +185,9 @@ public class GithubApiClient { request, response -> { try { - return OBJECT_MAPPER.readValue(response.body(), GithubCommit[].class)[0]; + String result = + CharStreams.toString(new InputStreamReader(response.body(), Charsets.UTF_8)); + return OBJECT_MAPPER.readValue(result, GithubCommit[].class)[0]; } catch (IOException e) { throw new UncheckedIOException(e); } diff --git a/wsmaster/che-core-api-factory-gitlab/src/main/java/org/eclipse/che/api/factory/server/gitlab/GitlabApiClient.java b/wsmaster/che-core-api-factory-gitlab/src/main/java/org/eclipse/che/api/factory/server/gitlab/GitlabApiClient.java index 6e3faed9a7..a687198e79 100644 --- a/wsmaster/che-core-api-factory-gitlab/src/main/java/org/eclipse/che/api/factory/server/gitlab/GitlabApiClient.java +++ b/wsmaster/che-core-api-factory-gitlab/src/main/java/org/eclipse/che/api/factory/server/gitlab/GitlabApiClient.java @@ -78,7 +78,9 @@ public class GitlabApiClient { request, inputStream -> { try { - return OBJECT_MAPPER.readValue(inputStream, GitlabUser.class); + String result = + CharStreams.toString(new InputStreamReader(inputStream, Charsets.UTF_8)); + return OBJECT_MAPPER.readValue(result, GitlabUser.class); } catch (IOException e) { throw new UncheckedIOException(e); } @@ -100,7 +102,9 @@ public class GitlabApiClient { request, inputStream -> { try { - return OBJECT_MAPPER.readValue(inputStream, GitlabOauthTokenInfo.class); + String result = + CharStreams.toString(new InputStreamReader(inputStream, Charsets.UTF_8)); + return OBJECT_MAPPER.readValue(result, GitlabOauthTokenInfo.class); } catch (IOException e) { throw new UncheckedIOException(e); } From 2cd1bb2b4611af336ec995b01983fc8d94ef943e Mon Sep 17 00:00:00 2001 From: Mykhailo Kuznietsov Date: Wed, 12 Jul 2023 16:14:32 +0000 Subject: [PATCH 35/75] chore: Bump to 7.72.0-SNAPSHOT in main Signed-off-by: Mykhailo Kuznietsov --- assembly/assembly-che-tomcat/pom.xml | 2 +- assembly/assembly-main/pom.xml | 2 +- assembly/assembly-root-war/pom.xml | 2 +- assembly/assembly-swagger-war/pom.xml | 2 +- assembly/assembly-wsmaster-war/pom.xml | 2 +- assembly/pom.xml | 2 +- core/che-core-api-core/pom.xml | 2 +- core/che-core-api-dto-maven-plugin/pom.xml | 2 +- core/che-core-api-dto/pom.xml | 2 +- core/che-core-api-model/pom.xml | 2 +- core/che-core-db-vendor-h2/pom.xml | 2 +- core/che-core-db-vendor-mysql/pom.xml | 2 +- core/che-core-db-vendor-postgresql/pom.xml | 2 +- core/che-core-db/pom.xml | 2 +- core/che-core-logback/pom.xml | 2 +- core/che-core-metrics-core/pom.xml | 2 +- core/che-core-tracing-core/pom.xml | 2 +- core/che-core-tracing-metrics/pom.xml | 2 +- core/che-core-tracing-web/pom.xml | 2 +- core/che-core-typescript-dto-maven-plugin/pom.xml | 2 +- core/commons/che-core-commons-annotations/pom.xml | 2 +- core/commons/che-core-commons-inject/pom.xml | 2 +- core/commons/che-core-commons-j2ee/pom.xml | 2 +- core/commons/che-core-commons-json/pom.xml | 2 +- core/commons/che-core-commons-lang/pom.xml | 2 +- core/commons/che-core-commons-observability/pom.xml | 2 +- core/commons/che-core-commons-schedule/pom.xml | 2 +- core/commons/che-core-commons-test/pom.xml | 2 +- core/commons/che-core-commons-tracing/pom.xml | 2 +- core/commons/pom.xml | 2 +- core/pom.xml | 2 +- infrastructures/infrastructure-distributed/pom.xml | 2 +- infrastructures/infrastructure-factory/pom.xml | 2 +- infrastructures/infrastructure-metrics/pom.xml | 2 +- infrastructures/infrastructure-permission/pom.xml | 2 +- infrastructures/kubernetes/pom.xml | 2 +- infrastructures/openshift/pom.xml | 2 +- infrastructures/pom.xml | 2 +- .../api/che-multiuser-api-authentication-commons/pom.xml | 2 +- multiuser/api/che-multiuser-api-authorization-impl/pom.xml | 2 +- multiuser/api/che-multiuser-api-authorization/pom.xml | 2 +- multiuser/api/che-multiuser-api-organization-shared/pom.xml | 2 +- multiuser/api/che-multiuser-api-organization/pom.xml | 2 +- multiuser/api/che-multiuser-api-permission-shared/pom.xml | 2 +- multiuser/api/che-multiuser-api-permission/pom.xml | 2 +- multiuser/api/che-multiuser-api-resource-shared/pom.xml | 2 +- multiuser/api/che-multiuser-api-resource/pom.xml | 2 +- multiuser/api/che-multiuser-api-workspace-activity/pom.xml | 2 +- multiuser/api/pom.xml | 2 +- .../integration-tests/che-multiuser-cascade-removal/pom.xml | 2 +- multiuser/integration-tests/che-multiuser-mysql-tck/pom.xml | 2 +- .../integration-tests/che-multiuser-postgresql-tck/pom.xml | 2 +- multiuser/integration-tests/pom.xml | 2 +- multiuser/keycloak/che-multiuser-keycloak-server/pom.xml | 2 +- multiuser/keycloak/che-multiuser-keycloak-shared/pom.xml | 2 +- .../keycloak/che-multiuser-keycloak-token-provider/pom.xml | 2 +- .../keycloak/che-multiuser-keycloak-user-remover/pom.xml | 2 +- multiuser/keycloak/pom.xml | 2 +- .../che-multiuser-machine-authentication-shared/pom.xml | 2 +- .../machine-auth/che-multiuser-machine-authentication/pom.xml | 2 +- multiuser/machine-auth/pom.xml | 2 +- multiuser/oidc/pom.xml | 2 +- multiuser/permission/che-multiuser-permission-devfile/pom.xml | 2 +- multiuser/permission/che-multiuser-permission-logger/pom.xml | 2 +- .../permission/che-multiuser-permission-resource/pom.xml | 2 +- multiuser/permission/che-multiuser-permission-system/pom.xml | 2 +- multiuser/permission/che-multiuser-permission-user/pom.xml | 2 +- .../che-multiuser-permission-workspace-activity/pom.xml | 2 +- .../permission/che-multiuser-permission-workspace/pom.xml | 2 +- multiuser/permission/pom.xml | 2 +- multiuser/personal-account/pom.xml | 2 +- multiuser/pom.xml | 2 +- multiuser/sql-schema/pom.xml | 2 +- pom.xml | 4 ++-- typescript-dto/dto-pom.xml | 2 +- wsmaster/che-core-api-account/pom.xml | 2 +- wsmaster/che-core-api-auth-azure-devops/pom.xml | 2 +- wsmaster/che-core-api-auth-bitbucket/pom.xml | 2 +- wsmaster/che-core-api-auth-github/pom.xml | 2 +- wsmaster/che-core-api-auth-gitlab/pom.xml | 2 +- wsmaster/che-core-api-auth-openshift/pom.xml | 2 +- wsmaster/che-core-api-auth-shared/pom.xml | 2 +- wsmaster/che-core-api-auth/pom.xml | 2 +- wsmaster/che-core-api-devfile-shared/pom.xml | 2 +- wsmaster/che-core-api-devfile/pom.xml | 2 +- wsmaster/che-core-api-factory-azure-devops/pom.xml | 2 +- wsmaster/che-core-api-factory-bitbucket-server/pom.xml | 2 +- wsmaster/che-core-api-factory-bitbucket/pom.xml | 2 +- wsmaster/che-core-api-factory-git-ssh/pom.xml | 2 +- wsmaster/che-core-api-factory-github/pom.xml | 2 +- wsmaster/che-core-api-factory-gitlab/pom.xml | 2 +- wsmaster/che-core-api-factory-shared/pom.xml | 2 +- wsmaster/che-core-api-factory/pom.xml | 2 +- wsmaster/che-core-api-logger-shared/pom.xml | 2 +- wsmaster/che-core-api-logger/pom.xml | 2 +- wsmaster/che-core-api-metrics/pom.xml | 2 +- wsmaster/che-core-api-ssh-shared/pom.xml | 2 +- wsmaster/che-core-api-ssh/pom.xml | 2 +- wsmaster/che-core-api-system-shared/pom.xml | 2 +- wsmaster/che-core-api-system/pom.xml | 2 +- wsmaster/che-core-api-user-shared/pom.xml | 2 +- wsmaster/che-core-api-user/pom.xml | 2 +- wsmaster/che-core-api-workspace-activity/pom.xml | 2 +- wsmaster/che-core-api-workspace-shared/pom.xml | 2 +- wsmaster/che-core-api-workspace/pom.xml | 2 +- wsmaster/che-core-sql-schema/pom.xml | 2 +- wsmaster/integration-tests/cascade-removal/pom.xml | 2 +- wsmaster/integration-tests/mysql-tck/pom.xml | 2 +- wsmaster/integration-tests/pom.xml | 2 +- wsmaster/integration-tests/postgresql-tck/pom.xml | 2 +- wsmaster/pom.xml | 2 +- 111 files changed, 112 insertions(+), 112 deletions(-) diff --git a/assembly/assembly-che-tomcat/pom.xml b/assembly/assembly-che-tomcat/pom.xml index b51f7dd130..8eab9fa87a 100644 --- a/assembly/assembly-che-tomcat/pom.xml +++ b/assembly/assembly-che-tomcat/pom.xml @@ -17,7 +17,7 @@ che-assembly-parent org.eclipse.che - 7.71.0-SNAPSHOT + 7.72.0-SNAPSHOT assembly-che-tomcat jar diff --git a/assembly/assembly-main/pom.xml b/assembly/assembly-main/pom.xml index 1b1001e615..0075959bd1 100644 --- a/assembly/assembly-main/pom.xml +++ b/assembly/assembly-main/pom.xml @@ -17,7 +17,7 @@ che-assembly-parent org.eclipse.che - 7.71.0-SNAPSHOT + 7.72.0-SNAPSHOT assembly-main pom diff --git a/assembly/assembly-root-war/pom.xml b/assembly/assembly-root-war/pom.xml index 7f78fc095e..e1ba9c35d8 100644 --- a/assembly/assembly-root-war/pom.xml +++ b/assembly/assembly-root-war/pom.xml @@ -17,7 +17,7 @@ che-assembly-parent org.eclipse.che - 7.71.0-SNAPSHOT + 7.72.0-SNAPSHOT assembly-root-war war diff --git a/assembly/assembly-swagger-war/pom.xml b/assembly/assembly-swagger-war/pom.xml index ead300526e..51d2086502 100644 --- a/assembly/assembly-swagger-war/pom.xml +++ b/assembly/assembly-swagger-war/pom.xml @@ -17,7 +17,7 @@ che-assembly-parent org.eclipse.che - 7.71.0-SNAPSHOT + 7.72.0-SNAPSHOT assembly-swagger-war war diff --git a/assembly/assembly-wsmaster-war/pom.xml b/assembly/assembly-wsmaster-war/pom.xml index edf4a12f4d..c8021dfc0f 100644 --- a/assembly/assembly-wsmaster-war/pom.xml +++ b/assembly/assembly-wsmaster-war/pom.xml @@ -17,7 +17,7 @@ che-assembly-parent org.eclipse.che - 7.71.0-SNAPSHOT + 7.72.0-SNAPSHOT assembly-wsmaster-war war diff --git a/assembly/pom.xml b/assembly/pom.xml index 4dcc01f96b..3a9c30c3c1 100644 --- a/assembly/pom.xml +++ b/assembly/pom.xml @@ -17,7 +17,7 @@ che-server org.eclipse.che - 7.71.0-SNAPSHOT + 7.72.0-SNAPSHOT ../pom.xml che-assembly-parent diff --git a/core/che-core-api-core/pom.xml b/core/che-core-api-core/pom.xml index 6cbd8d44ae..2e66ef4b46 100644 --- a/core/che-core-api-core/pom.xml +++ b/core/che-core-api-core/pom.xml @@ -17,7 +17,7 @@ che-core-parent org.eclipse.che.core - 7.71.0-SNAPSHOT + 7.72.0-SNAPSHOT che-core-api-core jar diff --git a/core/che-core-api-dto-maven-plugin/pom.xml b/core/che-core-api-dto-maven-plugin/pom.xml index 9cf6218bc1..bb2f625b0d 100644 --- a/core/che-core-api-dto-maven-plugin/pom.xml +++ b/core/che-core-api-dto-maven-plugin/pom.xml @@ -17,7 +17,7 @@ che-core-parent org.eclipse.che.core - 7.71.0-SNAPSHOT + 7.72.0-SNAPSHOT che-core-api-dto-maven-plugin maven-plugin diff --git a/core/che-core-api-dto/pom.xml b/core/che-core-api-dto/pom.xml index eb147d36f0..5bdd9d2ba3 100644 --- a/core/che-core-api-dto/pom.xml +++ b/core/che-core-api-dto/pom.xml @@ -17,7 +17,7 @@ che-core-parent org.eclipse.che.core - 7.71.0-SNAPSHOT + 7.72.0-SNAPSHOT che-core-api-dto jar diff --git a/core/che-core-api-model/pom.xml b/core/che-core-api-model/pom.xml index d25c3460d6..7a95350e60 100644 --- a/core/che-core-api-model/pom.xml +++ b/core/che-core-api-model/pom.xml @@ -17,7 +17,7 @@ che-core-parent org.eclipse.che.core - 7.71.0-SNAPSHOT + 7.72.0-SNAPSHOT che-core-api-model jar diff --git a/core/che-core-db-vendor-h2/pom.xml b/core/che-core-db-vendor-h2/pom.xml index b9baa55e57..e6de04e8e9 100644 --- a/core/che-core-db-vendor-h2/pom.xml +++ b/core/che-core-db-vendor-h2/pom.xml @@ -17,7 +17,7 @@ che-core-parent org.eclipse.che.core - 7.71.0-SNAPSHOT + 7.72.0-SNAPSHOT che-core-db-vendor-h2 Che Core :: Commons :: DB :: Vendor H2 diff --git a/core/che-core-db-vendor-mysql/pom.xml b/core/che-core-db-vendor-mysql/pom.xml index a62d7be174..1ca54abaa3 100644 --- a/core/che-core-db-vendor-mysql/pom.xml +++ b/core/che-core-db-vendor-mysql/pom.xml @@ -17,7 +17,7 @@ che-core-parent org.eclipse.che.core - 7.71.0-SNAPSHOT + 7.72.0-SNAPSHOT che-core-db-vendor-mysql Che Core :: Commons :: DB :: Vendor MySQL diff --git a/core/che-core-db-vendor-postgresql/pom.xml b/core/che-core-db-vendor-postgresql/pom.xml index a90da44fb7..f72e732cb0 100644 --- a/core/che-core-db-vendor-postgresql/pom.xml +++ b/core/che-core-db-vendor-postgresql/pom.xml @@ -17,7 +17,7 @@ che-core-parent org.eclipse.che.core - 7.71.0-SNAPSHOT + 7.72.0-SNAPSHOT che-core-db-vendor-postgresql Che Core :: Commons :: DB :: Vendor PostgreSQL diff --git a/core/che-core-db/pom.xml b/core/che-core-db/pom.xml index 6b278af453..66b39d810a 100644 --- a/core/che-core-db/pom.xml +++ b/core/che-core-db/pom.xml @@ -17,7 +17,7 @@ che-core-parent org.eclipse.che.core - 7.71.0-SNAPSHOT + 7.72.0-SNAPSHOT che-core-db Che Core :: Commons :: DB diff --git a/core/che-core-logback/pom.xml b/core/che-core-logback/pom.xml index 485cef9599..2e5a699c58 100644 --- a/core/che-core-logback/pom.xml +++ b/core/che-core-logback/pom.xml @@ -17,7 +17,7 @@ che-core-parent org.eclipse.che.core - 7.71.0-SNAPSHOT + 7.72.0-SNAPSHOT che-core-logback jar diff --git a/core/che-core-metrics-core/pom.xml b/core/che-core-metrics-core/pom.xml index 3c0ca1a8df..d22b6236e6 100644 --- a/core/che-core-metrics-core/pom.xml +++ b/core/che-core-metrics-core/pom.xml @@ -17,7 +17,7 @@ che-core-parent org.eclipse.che.core - 7.71.0-SNAPSHOT + 7.72.0-SNAPSHOT che-core-metrics-core Che Core :: Commons :: Metrics :: Core diff --git a/core/che-core-tracing-core/pom.xml b/core/che-core-tracing-core/pom.xml index ef65b39361..e4e2ac0a31 100644 --- a/core/che-core-tracing-core/pom.xml +++ b/core/che-core-tracing-core/pom.xml @@ -17,7 +17,7 @@ che-core-parent org.eclipse.che.core - 7.71.0-SNAPSHOT + 7.72.0-SNAPSHOT che-core-tracing-core Che Core :: Commons :: Tracing :: Core diff --git a/core/che-core-tracing-metrics/pom.xml b/core/che-core-tracing-metrics/pom.xml index bab368d5d9..cb2ec30366 100644 --- a/core/che-core-tracing-metrics/pom.xml +++ b/core/che-core-tracing-metrics/pom.xml @@ -17,7 +17,7 @@ che-core-parent org.eclipse.che.core - 7.71.0-SNAPSHOT + 7.72.0-SNAPSHOT che-core-tracing-metrics Che Core :: Commons :: Tracing :: Metrics diff --git a/core/che-core-tracing-web/pom.xml b/core/che-core-tracing-web/pom.xml index 8c039d592d..3c3b40cfd2 100644 --- a/core/che-core-tracing-web/pom.xml +++ b/core/che-core-tracing-web/pom.xml @@ -17,7 +17,7 @@ che-core-parent org.eclipse.che.core - 7.71.0-SNAPSHOT + 7.72.0-SNAPSHOT che-core-tracing-web Che Core :: Commons :: Tracing :: Web diff --git a/core/che-core-typescript-dto-maven-plugin/pom.xml b/core/che-core-typescript-dto-maven-plugin/pom.xml index 9a1f2d2a93..42a0110232 100644 --- a/core/che-core-typescript-dto-maven-plugin/pom.xml +++ b/core/che-core-typescript-dto-maven-plugin/pom.xml @@ -17,7 +17,7 @@ che-core-parent org.eclipse.che.core - 7.71.0-SNAPSHOT + 7.72.0-SNAPSHOT che-core-typescript-dto-maven-plugin maven-plugin diff --git a/core/commons/che-core-commons-annotations/pom.xml b/core/commons/che-core-commons-annotations/pom.xml index 3ed8f44b61..fa1adb355e 100644 --- a/core/commons/che-core-commons-annotations/pom.xml +++ b/core/commons/che-core-commons-annotations/pom.xml @@ -17,7 +17,7 @@ che-core-commons-parent org.eclipse.che.core - 7.71.0-SNAPSHOT + 7.72.0-SNAPSHOT che-core-commons-annotations jar diff --git a/core/commons/che-core-commons-inject/pom.xml b/core/commons/che-core-commons-inject/pom.xml index a44b88708b..6a91be07e3 100644 --- a/core/commons/che-core-commons-inject/pom.xml +++ b/core/commons/che-core-commons-inject/pom.xml @@ -17,7 +17,7 @@ che-core-commons-parent org.eclipse.che.core - 7.71.0-SNAPSHOT + 7.72.0-SNAPSHOT che-core-commons-inject jar diff --git a/core/commons/che-core-commons-j2ee/pom.xml b/core/commons/che-core-commons-j2ee/pom.xml index e2f3154435..5b2540fd93 100644 --- a/core/commons/che-core-commons-j2ee/pom.xml +++ b/core/commons/che-core-commons-j2ee/pom.xml @@ -17,7 +17,7 @@ che-core-commons-parent org.eclipse.che.core - 7.71.0-SNAPSHOT + 7.72.0-SNAPSHOT che-core-commons-j2ee jar diff --git a/core/commons/che-core-commons-json/pom.xml b/core/commons/che-core-commons-json/pom.xml index ed234c3567..3a66f7bebc 100644 --- a/core/commons/che-core-commons-json/pom.xml +++ b/core/commons/che-core-commons-json/pom.xml @@ -17,7 +17,7 @@ che-core-commons-parent org.eclipse.che.core - 7.71.0-SNAPSHOT + 7.72.0-SNAPSHOT che-core-commons-json jar diff --git a/core/commons/che-core-commons-lang/pom.xml b/core/commons/che-core-commons-lang/pom.xml index fb991dd4a6..23f0ac93e9 100644 --- a/core/commons/che-core-commons-lang/pom.xml +++ b/core/commons/che-core-commons-lang/pom.xml @@ -17,7 +17,7 @@ che-core-commons-parent org.eclipse.che.core - 7.71.0-SNAPSHOT + 7.72.0-SNAPSHOT che-core-commons-lang jar diff --git a/core/commons/che-core-commons-observability/pom.xml b/core/commons/che-core-commons-observability/pom.xml index 7bc71c6fea..d7bd470e44 100644 --- a/core/commons/che-core-commons-observability/pom.xml +++ b/core/commons/che-core-commons-observability/pom.xml @@ -17,7 +17,7 @@ che-core-commons-parent org.eclipse.che.core - 7.71.0-SNAPSHOT + 7.72.0-SNAPSHOT che-core-commons-observability Che Core :: Commons :: Tracing and Monitoring wrapper diff --git a/core/commons/che-core-commons-schedule/pom.xml b/core/commons/che-core-commons-schedule/pom.xml index 9b1f00bd49..f4473b7082 100644 --- a/core/commons/che-core-commons-schedule/pom.xml +++ b/core/commons/che-core-commons-schedule/pom.xml @@ -17,7 +17,7 @@ che-core-commons-parent org.eclipse.che.core - 7.71.0-SNAPSHOT + 7.72.0-SNAPSHOT che-core-commons-schedule jar diff --git a/core/commons/che-core-commons-test/pom.xml b/core/commons/che-core-commons-test/pom.xml index b79f0f919a..94b725d077 100644 --- a/core/commons/che-core-commons-test/pom.xml +++ b/core/commons/che-core-commons-test/pom.xml @@ -17,7 +17,7 @@ che-core-commons-parent org.eclipse.che.core - 7.71.0-SNAPSHOT + 7.72.0-SNAPSHOT che-core-commons-test jar diff --git a/core/commons/che-core-commons-tracing/pom.xml b/core/commons/che-core-commons-tracing/pom.xml index a37913ba18..b609843049 100644 --- a/core/commons/che-core-commons-tracing/pom.xml +++ b/core/commons/che-core-commons-tracing/pom.xml @@ -17,7 +17,7 @@ che-core-commons-parent org.eclipse.che.core - 7.71.0-SNAPSHOT + 7.72.0-SNAPSHOT che-core-commons-tracing Che Core :: Commons :: Tracing diff --git a/core/commons/pom.xml b/core/commons/pom.xml index f7ff475442..91f74f441c 100644 --- a/core/commons/pom.xml +++ b/core/commons/pom.xml @@ -17,7 +17,7 @@ che-core-parent org.eclipse.che.core - 7.71.0-SNAPSHOT + 7.72.0-SNAPSHOT ../pom.xml che-core-commons-parent diff --git a/core/pom.xml b/core/pom.xml index bc714f00c2..189c41af61 100644 --- a/core/pom.xml +++ b/core/pom.xml @@ -17,7 +17,7 @@ che-server org.eclipse.che - 7.71.0-SNAPSHOT + 7.72.0-SNAPSHOT ../pom.xml org.eclipse.che.core diff --git a/infrastructures/infrastructure-distributed/pom.xml b/infrastructures/infrastructure-distributed/pom.xml index 869b75765a..18f8e90c3e 100644 --- a/infrastructures/infrastructure-distributed/pom.xml +++ b/infrastructures/infrastructure-distributed/pom.xml @@ -17,7 +17,7 @@ che-infrastructures-parent org.eclipse.che.infrastructure - 7.71.0-SNAPSHOT + 7.72.0-SNAPSHOT infrastructure-distributed jar diff --git a/infrastructures/infrastructure-factory/pom.xml b/infrastructures/infrastructure-factory/pom.xml index c87b5c1051..1739dd5ee3 100644 --- a/infrastructures/infrastructure-factory/pom.xml +++ b/infrastructures/infrastructure-factory/pom.xml @@ -17,7 +17,7 @@ che-infrastructures-parent org.eclipse.che.infrastructure - 7.71.0-SNAPSHOT + 7.72.0-SNAPSHOT infrastructure-factory jar diff --git a/infrastructures/infrastructure-metrics/pom.xml b/infrastructures/infrastructure-metrics/pom.xml index 4a3d6e9987..62eb590e67 100644 --- a/infrastructures/infrastructure-metrics/pom.xml +++ b/infrastructures/infrastructure-metrics/pom.xml @@ -17,7 +17,7 @@ che-infrastructures-parent org.eclipse.che.infrastructure - 7.71.0-SNAPSHOT + 7.72.0-SNAPSHOT ../pom.xml infrastructure-metrics diff --git a/infrastructures/infrastructure-permission/pom.xml b/infrastructures/infrastructure-permission/pom.xml index 4e6f72ea52..f108b6d966 100644 --- a/infrastructures/infrastructure-permission/pom.xml +++ b/infrastructures/infrastructure-permission/pom.xml @@ -17,7 +17,7 @@ che-infrastructures-parent org.eclipse.che.infrastructure - 7.71.0-SNAPSHOT + 7.72.0-SNAPSHOT infrastructure-permission Infrastructure :: Kubernetes Permissions diff --git a/infrastructures/kubernetes/pom.xml b/infrastructures/kubernetes/pom.xml index c28f0b1434..16617afeca 100644 --- a/infrastructures/kubernetes/pom.xml +++ b/infrastructures/kubernetes/pom.xml @@ -17,7 +17,7 @@ che-infrastructures-parent org.eclipse.che.infrastructure - 7.71.0-SNAPSHOT + 7.72.0-SNAPSHOT infrastructure-kubernetes Infrastructure :: Kubernetes diff --git a/infrastructures/openshift/pom.xml b/infrastructures/openshift/pom.xml index 4a76bfac02..200ec8a7ca 100644 --- a/infrastructures/openshift/pom.xml +++ b/infrastructures/openshift/pom.xml @@ -17,7 +17,7 @@ che-infrastructures-parent org.eclipse.che.infrastructure - 7.71.0-SNAPSHOT + 7.72.0-SNAPSHOT infrastructure-openshift Infrastructure :: OpenShift diff --git a/infrastructures/pom.xml b/infrastructures/pom.xml index 260e776025..8e98b1a1c1 100644 --- a/infrastructures/pom.xml +++ b/infrastructures/pom.xml @@ -17,7 +17,7 @@ che-server org.eclipse.che - 7.71.0-SNAPSHOT + 7.72.0-SNAPSHOT ../pom.xml org.eclipse.che.infrastructure diff --git a/multiuser/api/che-multiuser-api-authentication-commons/pom.xml b/multiuser/api/che-multiuser-api-authentication-commons/pom.xml index dcc732ef86..cad3ee5042 100644 --- a/multiuser/api/che-multiuser-api-authentication-commons/pom.xml +++ b/multiuser/api/che-multiuser-api-authentication-commons/pom.xml @@ -17,7 +17,7 @@ che-multiuser-api org.eclipse.che.multiuser - 7.71.0-SNAPSHOT + 7.72.0-SNAPSHOT che-multiuser-api-authentication-commons jar diff --git a/multiuser/api/che-multiuser-api-authorization-impl/pom.xml b/multiuser/api/che-multiuser-api-authorization-impl/pom.xml index 771b86cce1..e04b8c95d5 100644 --- a/multiuser/api/che-multiuser-api-authorization-impl/pom.xml +++ b/multiuser/api/che-multiuser-api-authorization-impl/pom.xml @@ -17,7 +17,7 @@ che-multiuser-api org.eclipse.che.multiuser - 7.71.0-SNAPSHOT + 7.72.0-SNAPSHOT che-multiuser-api-authorization-impl jar diff --git a/multiuser/api/che-multiuser-api-authorization/pom.xml b/multiuser/api/che-multiuser-api-authorization/pom.xml index f5dbf82c6a..2cbd4c8075 100644 --- a/multiuser/api/che-multiuser-api-authorization/pom.xml +++ b/multiuser/api/che-multiuser-api-authorization/pom.xml @@ -17,7 +17,7 @@ che-multiuser-api org.eclipse.che.multiuser - 7.71.0-SNAPSHOT + 7.72.0-SNAPSHOT che-multiuser-api-authorization jar diff --git a/multiuser/api/che-multiuser-api-organization-shared/pom.xml b/multiuser/api/che-multiuser-api-organization-shared/pom.xml index 5cd8d20a9c..eaa6dbbbd3 100644 --- a/multiuser/api/che-multiuser-api-organization-shared/pom.xml +++ b/multiuser/api/che-multiuser-api-organization-shared/pom.xml @@ -17,7 +17,7 @@ che-multiuser-api org.eclipse.che.multiuser - 7.71.0-SNAPSHOT + 7.72.0-SNAPSHOT che-multiuser-api-organization-shared jar diff --git a/multiuser/api/che-multiuser-api-organization/pom.xml b/multiuser/api/che-multiuser-api-organization/pom.xml index d1057812e2..cdd563865c 100644 --- a/multiuser/api/che-multiuser-api-organization/pom.xml +++ b/multiuser/api/che-multiuser-api-organization/pom.xml @@ -17,7 +17,7 @@ che-multiuser-api org.eclipse.che.multiuser - 7.71.0-SNAPSHOT + 7.72.0-SNAPSHOT che-multiuser-api-organization jar diff --git a/multiuser/api/che-multiuser-api-permission-shared/pom.xml b/multiuser/api/che-multiuser-api-permission-shared/pom.xml index 13bfc073ef..a205ca81ce 100644 --- a/multiuser/api/che-multiuser-api-permission-shared/pom.xml +++ b/multiuser/api/che-multiuser-api-permission-shared/pom.xml @@ -17,7 +17,7 @@ che-multiuser-api org.eclipse.che.multiuser - 7.71.0-SNAPSHOT + 7.72.0-SNAPSHOT che-multiuser-api-permission-shared jar diff --git a/multiuser/api/che-multiuser-api-permission/pom.xml b/multiuser/api/che-multiuser-api-permission/pom.xml index 0a8c1b766f..2fc5e728bf 100644 --- a/multiuser/api/che-multiuser-api-permission/pom.xml +++ b/multiuser/api/che-multiuser-api-permission/pom.xml @@ -17,7 +17,7 @@ che-multiuser-api org.eclipse.che.multiuser - 7.71.0-SNAPSHOT + 7.72.0-SNAPSHOT che-multiuser-api-permission jar diff --git a/multiuser/api/che-multiuser-api-resource-shared/pom.xml b/multiuser/api/che-multiuser-api-resource-shared/pom.xml index 0d87b2dd14..45b117e786 100644 --- a/multiuser/api/che-multiuser-api-resource-shared/pom.xml +++ b/multiuser/api/che-multiuser-api-resource-shared/pom.xml @@ -17,7 +17,7 @@ che-multiuser-api org.eclipse.che.multiuser - 7.71.0-SNAPSHOT + 7.72.0-SNAPSHOT che-multiuser-api-resource-shared jar diff --git a/multiuser/api/che-multiuser-api-resource/pom.xml b/multiuser/api/che-multiuser-api-resource/pom.xml index 6607949797..ff492ebba2 100644 --- a/multiuser/api/che-multiuser-api-resource/pom.xml +++ b/multiuser/api/che-multiuser-api-resource/pom.xml @@ -17,7 +17,7 @@ che-multiuser-api org.eclipse.che.multiuser - 7.71.0-SNAPSHOT + 7.72.0-SNAPSHOT che-multiuser-api-resource jar diff --git a/multiuser/api/che-multiuser-api-workspace-activity/pom.xml b/multiuser/api/che-multiuser-api-workspace-activity/pom.xml index b03bc6f082..90483354fa 100644 --- a/multiuser/api/che-multiuser-api-workspace-activity/pom.xml +++ b/multiuser/api/che-multiuser-api-workspace-activity/pom.xml @@ -17,7 +17,7 @@ che-multiuser-api org.eclipse.che.multiuser - 7.71.0-SNAPSHOT + 7.72.0-SNAPSHOT che-multiuser-api-workspace-activity jar diff --git a/multiuser/api/pom.xml b/multiuser/api/pom.xml index 356e44c440..13e917fffe 100644 --- a/multiuser/api/pom.xml +++ b/multiuser/api/pom.xml @@ -17,7 +17,7 @@ che-multiuser-parent org.eclipse.che.multiuser - 7.71.0-SNAPSHOT + 7.72.0-SNAPSHOT ../pom.xml che-multiuser-api diff --git a/multiuser/integration-tests/che-multiuser-cascade-removal/pom.xml b/multiuser/integration-tests/che-multiuser-cascade-removal/pom.xml index 66db740840..551dbfc35e 100644 --- a/multiuser/integration-tests/che-multiuser-cascade-removal/pom.xml +++ b/multiuser/integration-tests/che-multiuser-cascade-removal/pom.xml @@ -17,7 +17,7 @@ che-multiuser-integration-tests org.eclipse.che.multiuser - 7.71.0-SNAPSHOT + 7.72.0-SNAPSHOT che-multiuser-cascade-removal jar diff --git a/multiuser/integration-tests/che-multiuser-mysql-tck/pom.xml b/multiuser/integration-tests/che-multiuser-mysql-tck/pom.xml index 3c519cd28b..ddd397dd4c 100644 --- a/multiuser/integration-tests/che-multiuser-mysql-tck/pom.xml +++ b/multiuser/integration-tests/che-multiuser-mysql-tck/pom.xml @@ -17,7 +17,7 @@ che-multiuser-integration-tests org.eclipse.che.multiuser - 7.71.0-SNAPSHOT + 7.72.0-SNAPSHOT che-multiuser-mysql-tck jar diff --git a/multiuser/integration-tests/che-multiuser-postgresql-tck/pom.xml b/multiuser/integration-tests/che-multiuser-postgresql-tck/pom.xml index 7544ffa130..c3e51efe5a 100644 --- a/multiuser/integration-tests/che-multiuser-postgresql-tck/pom.xml +++ b/multiuser/integration-tests/che-multiuser-postgresql-tck/pom.xml @@ -17,7 +17,7 @@ che-multiuser-integration-tests org.eclipse.che.multiuser - 7.71.0-SNAPSHOT + 7.72.0-SNAPSHOT che-multiuser-postgresql-tck jar diff --git a/multiuser/integration-tests/pom.xml b/multiuser/integration-tests/pom.xml index 519aefcdcd..a575bf458e 100644 --- a/multiuser/integration-tests/pom.xml +++ b/multiuser/integration-tests/pom.xml @@ -17,7 +17,7 @@ che-multiuser-parent org.eclipse.che.multiuser - 7.71.0-SNAPSHOT + 7.72.0-SNAPSHOT che-multiuser-integration-tests pom diff --git a/multiuser/keycloak/che-multiuser-keycloak-server/pom.xml b/multiuser/keycloak/che-multiuser-keycloak-server/pom.xml index 2bad89ee73..0eb6d01b7c 100644 --- a/multiuser/keycloak/che-multiuser-keycloak-server/pom.xml +++ b/multiuser/keycloak/che-multiuser-keycloak-server/pom.xml @@ -17,7 +17,7 @@ che-multiuser-keycloak org.eclipse.che.multiuser - 7.71.0-SNAPSHOT + 7.72.0-SNAPSHOT che-multiuser-keycloak-server jar diff --git a/multiuser/keycloak/che-multiuser-keycloak-shared/pom.xml b/multiuser/keycloak/che-multiuser-keycloak-shared/pom.xml index 821cee1b92..b1811c2540 100644 --- a/multiuser/keycloak/che-multiuser-keycloak-shared/pom.xml +++ b/multiuser/keycloak/che-multiuser-keycloak-shared/pom.xml @@ -17,7 +17,7 @@ che-multiuser-keycloak org.eclipse.che.multiuser - 7.71.0-SNAPSHOT + 7.72.0-SNAPSHOT che-multiuser-keycloak-shared jar diff --git a/multiuser/keycloak/che-multiuser-keycloak-token-provider/pom.xml b/multiuser/keycloak/che-multiuser-keycloak-token-provider/pom.xml index 2696e312f7..7ab80f58d4 100644 --- a/multiuser/keycloak/che-multiuser-keycloak-token-provider/pom.xml +++ b/multiuser/keycloak/che-multiuser-keycloak-token-provider/pom.xml @@ -17,7 +17,7 @@ che-multiuser-keycloak org.eclipse.che.multiuser - 7.71.0-SNAPSHOT + 7.72.0-SNAPSHOT che-multiuser-keycloak-token-provider Che Multiuser :: Keycloak Token Provider diff --git a/multiuser/keycloak/che-multiuser-keycloak-user-remover/pom.xml b/multiuser/keycloak/che-multiuser-keycloak-user-remover/pom.xml index b3a893c2ff..488dcb0417 100644 --- a/multiuser/keycloak/che-multiuser-keycloak-user-remover/pom.xml +++ b/multiuser/keycloak/che-multiuser-keycloak-user-remover/pom.xml @@ -17,7 +17,7 @@ che-multiuser-keycloak org.eclipse.che.multiuser - 7.71.0-SNAPSHOT + 7.72.0-SNAPSHOT che-multiuser-keycloak-user-remover jar diff --git a/multiuser/keycloak/pom.xml b/multiuser/keycloak/pom.xml index 65a3fc1dcb..bffcc68e3c 100644 --- a/multiuser/keycloak/pom.xml +++ b/multiuser/keycloak/pom.xml @@ -17,7 +17,7 @@ che-multiuser-parent org.eclipse.che.multiuser - 7.71.0-SNAPSHOT + 7.72.0-SNAPSHOT ../pom.xml che-multiuser-keycloak diff --git a/multiuser/machine-auth/che-multiuser-machine-authentication-shared/pom.xml b/multiuser/machine-auth/che-multiuser-machine-authentication-shared/pom.xml index 02bc1d63a6..cffd9be5ea 100644 --- a/multiuser/machine-auth/che-multiuser-machine-authentication-shared/pom.xml +++ b/multiuser/machine-auth/che-multiuser-machine-authentication-shared/pom.xml @@ -17,7 +17,7 @@ che-multiuser-machine-auth org.eclipse.che.multiuser - 7.71.0-SNAPSHOT + 7.72.0-SNAPSHOT che-multiuser-machine-authentication-shared jar diff --git a/multiuser/machine-auth/che-multiuser-machine-authentication/pom.xml b/multiuser/machine-auth/che-multiuser-machine-authentication/pom.xml index c1d207c947..535821c495 100644 --- a/multiuser/machine-auth/che-multiuser-machine-authentication/pom.xml +++ b/multiuser/machine-auth/che-multiuser-machine-authentication/pom.xml @@ -17,7 +17,7 @@ che-multiuser-machine-auth org.eclipse.che.multiuser - 7.71.0-SNAPSHOT + 7.72.0-SNAPSHOT che-multiuser-machine-authentication jar diff --git a/multiuser/machine-auth/pom.xml b/multiuser/machine-auth/pom.xml index e4a1fb2a67..636655fd39 100644 --- a/multiuser/machine-auth/pom.xml +++ b/multiuser/machine-auth/pom.xml @@ -17,7 +17,7 @@ che-multiuser-parent org.eclipse.che.multiuser - 7.71.0-SNAPSHOT + 7.72.0-SNAPSHOT ../pom.xml che-multiuser-machine-auth diff --git a/multiuser/oidc/pom.xml b/multiuser/oidc/pom.xml index 6124bae68d..33d9d2e0cb 100644 --- a/multiuser/oidc/pom.xml +++ b/multiuser/oidc/pom.xml @@ -17,7 +17,7 @@ che-multiuser-parent org.eclipse.che.multiuser - 7.71.0-SNAPSHOT + 7.72.0-SNAPSHOT che-multiuser-oidc jar diff --git a/multiuser/permission/che-multiuser-permission-devfile/pom.xml b/multiuser/permission/che-multiuser-permission-devfile/pom.xml index 165be36c35..e41af236da 100644 --- a/multiuser/permission/che-multiuser-permission-devfile/pom.xml +++ b/multiuser/permission/che-multiuser-permission-devfile/pom.xml @@ -17,7 +17,7 @@ che-multiuser-permission org.eclipse.che.multiuser - 7.71.0-SNAPSHOT + 7.72.0-SNAPSHOT che-multiuser-permission-devfile Che Multiuser :: Devfile Permissions diff --git a/multiuser/permission/che-multiuser-permission-logger/pom.xml b/multiuser/permission/che-multiuser-permission-logger/pom.xml index 65cccb0553..a0f1cfa1f1 100644 --- a/multiuser/permission/che-multiuser-permission-logger/pom.xml +++ b/multiuser/permission/che-multiuser-permission-logger/pom.xml @@ -17,7 +17,7 @@ che-multiuser-permission org.eclipse.che.multiuser - 7.71.0-SNAPSHOT + 7.72.0-SNAPSHOT che-multiuser-permission-logger Che Multiuser :: Logger Permissions diff --git a/multiuser/permission/che-multiuser-permission-resource/pom.xml b/multiuser/permission/che-multiuser-permission-resource/pom.xml index d64dc644a8..39e30a1d11 100644 --- a/multiuser/permission/che-multiuser-permission-resource/pom.xml +++ b/multiuser/permission/che-multiuser-permission-resource/pom.xml @@ -17,7 +17,7 @@ che-multiuser-permission org.eclipse.che.multiuser - 7.71.0-SNAPSHOT + 7.72.0-SNAPSHOT che-multiuser-permission-resource Che Multiuser :: Resource :: Permissions diff --git a/multiuser/permission/che-multiuser-permission-system/pom.xml b/multiuser/permission/che-multiuser-permission-system/pom.xml index e399ed4062..35b6315390 100644 --- a/multiuser/permission/che-multiuser-permission-system/pom.xml +++ b/multiuser/permission/che-multiuser-permission-system/pom.xml @@ -17,7 +17,7 @@ che-multiuser-permission org.eclipse.che.multiuser - 7.71.0-SNAPSHOT + 7.72.0-SNAPSHOT che-multiuser-permission-system Che Multiuser :: System Permissions diff --git a/multiuser/permission/che-multiuser-permission-user/pom.xml b/multiuser/permission/che-multiuser-permission-user/pom.xml index c7c85409ec..00e87ebf31 100644 --- a/multiuser/permission/che-multiuser-permission-user/pom.xml +++ b/multiuser/permission/che-multiuser-permission-user/pom.xml @@ -17,7 +17,7 @@ che-multiuser-permission org.eclipse.che.multiuser - 7.71.0-SNAPSHOT + 7.72.0-SNAPSHOT che-multiuser-permission-user Che Multiuser :: User Permissions diff --git a/multiuser/permission/che-multiuser-permission-workspace-activity/pom.xml b/multiuser/permission/che-multiuser-permission-workspace-activity/pom.xml index 7dd81d472f..2ee3873f5d 100644 --- a/multiuser/permission/che-multiuser-permission-workspace-activity/pom.xml +++ b/multiuser/permission/che-multiuser-permission-workspace-activity/pom.xml @@ -17,7 +17,7 @@ che-multiuser-permission org.eclipse.che.multiuser - 7.71.0-SNAPSHOT + 7.72.0-SNAPSHOT che-multiuser-permission-workspace-activity Che Multiuser :: Workspace Activity Permissions diff --git a/multiuser/permission/che-multiuser-permission-workspace/pom.xml b/multiuser/permission/che-multiuser-permission-workspace/pom.xml index 187663ef6d..24a0d9e510 100644 --- a/multiuser/permission/che-multiuser-permission-workspace/pom.xml +++ b/multiuser/permission/che-multiuser-permission-workspace/pom.xml @@ -17,7 +17,7 @@ che-multiuser-permission org.eclipse.che.multiuser - 7.71.0-SNAPSHOT + 7.72.0-SNAPSHOT che-multiuser-permission-workspace Che Multiuser :: Workspace Permissions diff --git a/multiuser/permission/pom.xml b/multiuser/permission/pom.xml index 2536751c47..7bbb52dc4b 100644 --- a/multiuser/permission/pom.xml +++ b/multiuser/permission/pom.xml @@ -17,7 +17,7 @@ che-multiuser-parent org.eclipse.che.multiuser - 7.71.0-SNAPSHOT + 7.72.0-SNAPSHOT ../pom.xml che-multiuser-permission diff --git a/multiuser/personal-account/pom.xml b/multiuser/personal-account/pom.xml index bac4f2e871..2396b8a551 100644 --- a/multiuser/personal-account/pom.xml +++ b/multiuser/personal-account/pom.xml @@ -17,7 +17,7 @@ che-multiuser-parent org.eclipse.che.multiuser - 7.71.0-SNAPSHOT + 7.72.0-SNAPSHOT che-multiuser-personal-account jar diff --git a/multiuser/pom.xml b/multiuser/pom.xml index 35569d9b69..9b31560977 100644 --- a/multiuser/pom.xml +++ b/multiuser/pom.xml @@ -17,7 +17,7 @@ che-server org.eclipse.che - 7.71.0-SNAPSHOT + 7.72.0-SNAPSHOT ../pom.xml org.eclipse.che.multiuser diff --git a/multiuser/sql-schema/pom.xml b/multiuser/sql-schema/pom.xml index 8ac5d31641..fdbc29f6ee 100644 --- a/multiuser/sql-schema/pom.xml +++ b/multiuser/sql-schema/pom.xml @@ -17,7 +17,7 @@ che-multiuser-parent org.eclipse.che.multiuser - 7.71.0-SNAPSHOT + 7.72.0-SNAPSHOT ../pom.xml che-multiuser-sql-schema diff --git a/pom.xml b/pom.xml index e8aa6ce9b3..5de11e82c0 100644 --- a/pom.xml +++ b/pom.xml @@ -16,7 +16,7 @@ 4.0.0 org.eclipse.che che-server - 7.71.0-SNAPSHOT + 7.72.0-SNAPSHOT pom Che Server Eclipse Che Server @@ -100,7 +100,7 @@ Red Hat, Inc. - initial API and implementation ${project.version} - 7.71.0-SNAPSHOT + 7.72.0-SNAPSHOT 1.0-beta2 Red Hat, Inc. diff --git a/typescript-dto/dto-pom.xml b/typescript-dto/dto-pom.xml index 3491552aac..2c9c3bfad7 100644 --- a/typescript-dto/dto-pom.xml +++ b/typescript-dto/dto-pom.xml @@ -23,7 +23,7 @@ pom Che TypeScript DTO - 7.71.0-SNAPSHOT + 7.72.0-SNAPSHOT diff --git a/wsmaster/che-core-api-account/pom.xml b/wsmaster/che-core-api-account/pom.xml index 2fed7786da..991d8d2a04 100644 --- a/wsmaster/che-core-api-account/pom.xml +++ b/wsmaster/che-core-api-account/pom.xml @@ -17,7 +17,7 @@ che-master-parent org.eclipse.che.core - 7.71.0-SNAPSHOT + 7.72.0-SNAPSHOT che-core-api-account Che Core :: API :: Account diff --git a/wsmaster/che-core-api-auth-azure-devops/pom.xml b/wsmaster/che-core-api-auth-azure-devops/pom.xml index d9c931c1e0..7bc8b24f5a 100644 --- a/wsmaster/che-core-api-auth-azure-devops/pom.xml +++ b/wsmaster/che-core-api-auth-azure-devops/pom.xml @@ -17,7 +17,7 @@ che-master-parent org.eclipse.che.core - 7.71.0-SNAPSHOT + 7.72.0-SNAPSHOT che-core-api-auth-azure-devops jar diff --git a/wsmaster/che-core-api-auth-bitbucket/pom.xml b/wsmaster/che-core-api-auth-bitbucket/pom.xml index 148945f15b..828f49f96f 100644 --- a/wsmaster/che-core-api-auth-bitbucket/pom.xml +++ b/wsmaster/che-core-api-auth-bitbucket/pom.xml @@ -17,7 +17,7 @@ che-master-parent org.eclipse.che.core - 7.71.0-SNAPSHOT + 7.72.0-SNAPSHOT che-core-api-auth-bitbucket jar diff --git a/wsmaster/che-core-api-auth-github/pom.xml b/wsmaster/che-core-api-auth-github/pom.xml index 12e16d86c8..8f077a8163 100644 --- a/wsmaster/che-core-api-auth-github/pom.xml +++ b/wsmaster/che-core-api-auth-github/pom.xml @@ -17,7 +17,7 @@ che-master-parent org.eclipse.che.core - 7.71.0-SNAPSHOT + 7.72.0-SNAPSHOT che-core-api-auth-github jar diff --git a/wsmaster/che-core-api-auth-gitlab/pom.xml b/wsmaster/che-core-api-auth-gitlab/pom.xml index 62b483984c..42950617c7 100644 --- a/wsmaster/che-core-api-auth-gitlab/pom.xml +++ b/wsmaster/che-core-api-auth-gitlab/pom.xml @@ -17,7 +17,7 @@ che-master-parent org.eclipse.che.core - 7.71.0-SNAPSHOT + 7.72.0-SNAPSHOT che-core-api-auth-gitlab jar diff --git a/wsmaster/che-core-api-auth-openshift/pom.xml b/wsmaster/che-core-api-auth-openshift/pom.xml index 6e31a2becb..67af6a1731 100644 --- a/wsmaster/che-core-api-auth-openshift/pom.xml +++ b/wsmaster/che-core-api-auth-openshift/pom.xml @@ -17,7 +17,7 @@ che-master-parent org.eclipse.che.core - 7.71.0-SNAPSHOT + 7.72.0-SNAPSHOT che-core-api-auth-openshift jar diff --git a/wsmaster/che-core-api-auth-shared/pom.xml b/wsmaster/che-core-api-auth-shared/pom.xml index 6b6e0eb082..686f5670c7 100644 --- a/wsmaster/che-core-api-auth-shared/pom.xml +++ b/wsmaster/che-core-api-auth-shared/pom.xml @@ -17,7 +17,7 @@ che-master-parent org.eclipse.che.core - 7.71.0-SNAPSHOT + 7.72.0-SNAPSHOT che-core-api-auth-shared jar diff --git a/wsmaster/che-core-api-auth/pom.xml b/wsmaster/che-core-api-auth/pom.xml index 9dc277975d..eecc334339 100644 --- a/wsmaster/che-core-api-auth/pom.xml +++ b/wsmaster/che-core-api-auth/pom.xml @@ -17,7 +17,7 @@ che-master-parent org.eclipse.che.core - 7.71.0-SNAPSHOT + 7.72.0-SNAPSHOT che-core-api-auth jar diff --git a/wsmaster/che-core-api-devfile-shared/pom.xml b/wsmaster/che-core-api-devfile-shared/pom.xml index 7670d5e63c..f12fb195a0 100644 --- a/wsmaster/che-core-api-devfile-shared/pom.xml +++ b/wsmaster/che-core-api-devfile-shared/pom.xml @@ -17,7 +17,7 @@ che-master-parent org.eclipse.che.core - 7.71.0-SNAPSHOT + 7.72.0-SNAPSHOT che-core-api-devfile-shared jar diff --git a/wsmaster/che-core-api-devfile/pom.xml b/wsmaster/che-core-api-devfile/pom.xml index 14704d2bb1..ca8c4b29bd 100644 --- a/wsmaster/che-core-api-devfile/pom.xml +++ b/wsmaster/che-core-api-devfile/pom.xml @@ -17,7 +17,7 @@ che-master-parent org.eclipse.che.core - 7.71.0-SNAPSHOT + 7.72.0-SNAPSHOT che-core-api-devfile jar diff --git a/wsmaster/che-core-api-factory-azure-devops/pom.xml b/wsmaster/che-core-api-factory-azure-devops/pom.xml index 2e0b70f948..fb91eac934 100644 --- a/wsmaster/che-core-api-factory-azure-devops/pom.xml +++ b/wsmaster/che-core-api-factory-azure-devops/pom.xml @@ -17,7 +17,7 @@ che-master-parent org.eclipse.che.core - 7.71.0-SNAPSHOT + 7.72.0-SNAPSHOT che-core-api-factory-azure-devops jar diff --git a/wsmaster/che-core-api-factory-bitbucket-server/pom.xml b/wsmaster/che-core-api-factory-bitbucket-server/pom.xml index f0686dfef1..a22128b4da 100644 --- a/wsmaster/che-core-api-factory-bitbucket-server/pom.xml +++ b/wsmaster/che-core-api-factory-bitbucket-server/pom.xml @@ -17,7 +17,7 @@ che-master-parent org.eclipse.che.core - 7.71.0-SNAPSHOT + 7.72.0-SNAPSHOT che-core-api-factory-bitbucket-server jar diff --git a/wsmaster/che-core-api-factory-bitbucket/pom.xml b/wsmaster/che-core-api-factory-bitbucket/pom.xml index 39a12cf2d0..838a17d168 100644 --- a/wsmaster/che-core-api-factory-bitbucket/pom.xml +++ b/wsmaster/che-core-api-factory-bitbucket/pom.xml @@ -17,7 +17,7 @@ che-master-parent org.eclipse.che.core - 7.71.0-SNAPSHOT + 7.72.0-SNAPSHOT che-core-api-factory-bitbucket jar diff --git a/wsmaster/che-core-api-factory-git-ssh/pom.xml b/wsmaster/che-core-api-factory-git-ssh/pom.xml index 94bfb4d8f7..8b550b057c 100644 --- a/wsmaster/che-core-api-factory-git-ssh/pom.xml +++ b/wsmaster/che-core-api-factory-git-ssh/pom.xml @@ -17,7 +17,7 @@ che-master-parent org.eclipse.che.core - 7.71.0-SNAPSHOT + 7.72.0-SNAPSHOT che-core-api-factory-git-ssh jar diff --git a/wsmaster/che-core-api-factory-github/pom.xml b/wsmaster/che-core-api-factory-github/pom.xml index 334bc163dc..76584549c2 100644 --- a/wsmaster/che-core-api-factory-github/pom.xml +++ b/wsmaster/che-core-api-factory-github/pom.xml @@ -17,7 +17,7 @@ che-master-parent org.eclipse.che.core - 7.71.0-SNAPSHOT + 7.72.0-SNAPSHOT che-core-api-factory-github jar diff --git a/wsmaster/che-core-api-factory-gitlab/pom.xml b/wsmaster/che-core-api-factory-gitlab/pom.xml index e0cc9cd3d9..56d0a0fe4e 100644 --- a/wsmaster/che-core-api-factory-gitlab/pom.xml +++ b/wsmaster/che-core-api-factory-gitlab/pom.xml @@ -17,7 +17,7 @@ che-master-parent org.eclipse.che.core - 7.71.0-SNAPSHOT + 7.72.0-SNAPSHOT che-core-api-factory-gitlab jar diff --git a/wsmaster/che-core-api-factory-shared/pom.xml b/wsmaster/che-core-api-factory-shared/pom.xml index e3485d30a3..2478539fe8 100644 --- a/wsmaster/che-core-api-factory-shared/pom.xml +++ b/wsmaster/che-core-api-factory-shared/pom.xml @@ -17,7 +17,7 @@ che-master-parent org.eclipse.che.core - 7.71.0-SNAPSHOT + 7.72.0-SNAPSHOT che-core-api-factory-shared jar diff --git a/wsmaster/che-core-api-factory/pom.xml b/wsmaster/che-core-api-factory/pom.xml index 789bb6b643..93d33c3650 100644 --- a/wsmaster/che-core-api-factory/pom.xml +++ b/wsmaster/che-core-api-factory/pom.xml @@ -17,7 +17,7 @@ che-master-parent org.eclipse.che.core - 7.71.0-SNAPSHOT + 7.72.0-SNAPSHOT che-core-api-factory jar diff --git a/wsmaster/che-core-api-logger-shared/pom.xml b/wsmaster/che-core-api-logger-shared/pom.xml index 716c43318c..859cfed6f0 100644 --- a/wsmaster/che-core-api-logger-shared/pom.xml +++ b/wsmaster/che-core-api-logger-shared/pom.xml @@ -17,7 +17,7 @@ che-master-parent org.eclipse.che.core - 7.71.0-SNAPSHOT + 7.72.0-SNAPSHOT che-core-api-logger-shared jar diff --git a/wsmaster/che-core-api-logger/pom.xml b/wsmaster/che-core-api-logger/pom.xml index d6473d2f26..25a91657bd 100644 --- a/wsmaster/che-core-api-logger/pom.xml +++ b/wsmaster/che-core-api-logger/pom.xml @@ -17,7 +17,7 @@ che-master-parent org.eclipse.che.core - 7.71.0-SNAPSHOT + 7.72.0-SNAPSHOT che-core-api-logger jar diff --git a/wsmaster/che-core-api-metrics/pom.xml b/wsmaster/che-core-api-metrics/pom.xml index 0b7febb608..5bf759c88e 100644 --- a/wsmaster/che-core-api-metrics/pom.xml +++ b/wsmaster/che-core-api-metrics/pom.xml @@ -17,7 +17,7 @@ che-master-parent org.eclipse.che.core - 7.71.0-SNAPSHOT + 7.72.0-SNAPSHOT che-core-api-metrics jar diff --git a/wsmaster/che-core-api-ssh-shared/pom.xml b/wsmaster/che-core-api-ssh-shared/pom.xml index 2418404350..5d190b3db1 100644 --- a/wsmaster/che-core-api-ssh-shared/pom.xml +++ b/wsmaster/che-core-api-ssh-shared/pom.xml @@ -17,7 +17,7 @@ che-master-parent org.eclipse.che.core - 7.71.0-SNAPSHOT + 7.72.0-SNAPSHOT che-core-api-ssh-shared jar diff --git a/wsmaster/che-core-api-ssh/pom.xml b/wsmaster/che-core-api-ssh/pom.xml index 38ea5d8fa5..fb9a45f2e2 100644 --- a/wsmaster/che-core-api-ssh/pom.xml +++ b/wsmaster/che-core-api-ssh/pom.xml @@ -17,7 +17,7 @@ che-master-parent org.eclipse.che.core - 7.71.0-SNAPSHOT + 7.72.0-SNAPSHOT che-core-api-ssh jar diff --git a/wsmaster/che-core-api-system-shared/pom.xml b/wsmaster/che-core-api-system-shared/pom.xml index e58f383af5..c26eec8e24 100644 --- a/wsmaster/che-core-api-system-shared/pom.xml +++ b/wsmaster/che-core-api-system-shared/pom.xml @@ -17,7 +17,7 @@ che-master-parent org.eclipse.che.core - 7.71.0-SNAPSHOT + 7.72.0-SNAPSHOT che-core-api-system-shared jar diff --git a/wsmaster/che-core-api-system/pom.xml b/wsmaster/che-core-api-system/pom.xml index 25245eb177..e9eb6490a4 100644 --- a/wsmaster/che-core-api-system/pom.xml +++ b/wsmaster/che-core-api-system/pom.xml @@ -17,7 +17,7 @@ che-master-parent org.eclipse.che.core - 7.71.0-SNAPSHOT + 7.72.0-SNAPSHOT che-core-api-system jar diff --git a/wsmaster/che-core-api-user-shared/pom.xml b/wsmaster/che-core-api-user-shared/pom.xml index 42a59c4f5a..a7249030ac 100644 --- a/wsmaster/che-core-api-user-shared/pom.xml +++ b/wsmaster/che-core-api-user-shared/pom.xml @@ -17,7 +17,7 @@ che-master-parent org.eclipse.che.core - 7.71.0-SNAPSHOT + 7.72.0-SNAPSHOT che-core-api-user-shared Che Core :: API :: User :: Shared diff --git a/wsmaster/che-core-api-user/pom.xml b/wsmaster/che-core-api-user/pom.xml index e2bdaf4328..737292b03d 100644 --- a/wsmaster/che-core-api-user/pom.xml +++ b/wsmaster/che-core-api-user/pom.xml @@ -17,7 +17,7 @@ che-master-parent org.eclipse.che.core - 7.71.0-SNAPSHOT + 7.72.0-SNAPSHOT che-core-api-user Che Core :: API :: User diff --git a/wsmaster/che-core-api-workspace-activity/pom.xml b/wsmaster/che-core-api-workspace-activity/pom.xml index 1217a2a33d..eda3fa58ac 100644 --- a/wsmaster/che-core-api-workspace-activity/pom.xml +++ b/wsmaster/che-core-api-workspace-activity/pom.xml @@ -17,7 +17,7 @@ che-master-parent org.eclipse.che.core - 7.71.0-SNAPSHOT + 7.72.0-SNAPSHOT che-core-api-workspace-activity jar diff --git a/wsmaster/che-core-api-workspace-shared/pom.xml b/wsmaster/che-core-api-workspace-shared/pom.xml index d286fb883f..bb825850c4 100644 --- a/wsmaster/che-core-api-workspace-shared/pom.xml +++ b/wsmaster/che-core-api-workspace-shared/pom.xml @@ -17,7 +17,7 @@ che-master-parent org.eclipse.che.core - 7.71.0-SNAPSHOT + 7.72.0-SNAPSHOT che-core-api-workspace-shared jar diff --git a/wsmaster/che-core-api-workspace/pom.xml b/wsmaster/che-core-api-workspace/pom.xml index 4169cfcca2..f60ad3c8d4 100644 --- a/wsmaster/che-core-api-workspace/pom.xml +++ b/wsmaster/che-core-api-workspace/pom.xml @@ -17,7 +17,7 @@ che-master-parent org.eclipse.che.core - 7.71.0-SNAPSHOT + 7.72.0-SNAPSHOT che-core-api-workspace jar diff --git a/wsmaster/che-core-sql-schema/pom.xml b/wsmaster/che-core-sql-schema/pom.xml index bf3e717983..9f51d5e3bb 100644 --- a/wsmaster/che-core-sql-schema/pom.xml +++ b/wsmaster/che-core-sql-schema/pom.xml @@ -17,7 +17,7 @@ che-master-parent org.eclipse.che.core - 7.71.0-SNAPSHOT + 7.72.0-SNAPSHOT che-core-sql-schema Che Core :: SQL :: Schema diff --git a/wsmaster/integration-tests/cascade-removal/pom.xml b/wsmaster/integration-tests/cascade-removal/pom.xml index ac4c29add2..9c9afe6e44 100644 --- a/wsmaster/integration-tests/cascade-removal/pom.xml +++ b/wsmaster/integration-tests/cascade-removal/pom.xml @@ -17,7 +17,7 @@ integration-tests-parent org.eclipse.che.core - 7.71.0-SNAPSHOT + 7.72.0-SNAPSHOT cascade-removal Integration Tests :: Cascade Removal diff --git a/wsmaster/integration-tests/mysql-tck/pom.xml b/wsmaster/integration-tests/mysql-tck/pom.xml index a33436136a..2f778bd1cb 100644 --- a/wsmaster/integration-tests/mysql-tck/pom.xml +++ b/wsmaster/integration-tests/mysql-tck/pom.xml @@ -17,7 +17,7 @@ integration-tests-parent org.eclipse.che.core - 7.71.0-SNAPSHOT + 7.72.0-SNAPSHOT mysql-tck jar diff --git a/wsmaster/integration-tests/pom.xml b/wsmaster/integration-tests/pom.xml index 80e9bb0e5c..01759b0338 100644 --- a/wsmaster/integration-tests/pom.xml +++ b/wsmaster/integration-tests/pom.xml @@ -17,7 +17,7 @@ che-master-parent org.eclipse.che.core - 7.71.0-SNAPSHOT + 7.72.0-SNAPSHOT ../pom.xml integration-tests-parent diff --git a/wsmaster/integration-tests/postgresql-tck/pom.xml b/wsmaster/integration-tests/postgresql-tck/pom.xml index 824373c351..8cda76208a 100644 --- a/wsmaster/integration-tests/postgresql-tck/pom.xml +++ b/wsmaster/integration-tests/postgresql-tck/pom.xml @@ -17,7 +17,7 @@ integration-tests-parent org.eclipse.che.core - 7.71.0-SNAPSHOT + 7.72.0-SNAPSHOT postgresql-tck jar diff --git a/wsmaster/pom.xml b/wsmaster/pom.xml index 0240deb71f..f5c3f2fb9b 100644 --- a/wsmaster/pom.xml +++ b/wsmaster/pom.xml @@ -17,7 +17,7 @@ che-core-parent org.eclipse.che.core - 7.71.0-SNAPSHOT + 7.72.0-SNAPSHOT ../core/pom.xml che-master-parent From 00675893ffb56d977ad5ee9f418a002990f6c0b3 Mon Sep 17 00:00:00 2001 From: Igor Vinokur Date: Tue, 25 Jul 2023 11:04:22 +0300 Subject: [PATCH 36/75] Update openjdk version from 11 to 17 (#535) Update openjdk version from 11 to 17 in order to fix the che-server sturtup error --- dockerfiles/che/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dockerfiles/che/Dockerfile b/dockerfiles/che/Dockerfile index 3343125d40..73c7262246 100644 --- a/dockerfiles/che/Dockerfile +++ b/dockerfiles/che/Dockerfile @@ -14,7 +14,7 @@ FROM registry.access.redhat.com/ubi8-minimal:8.8-1014 USER root ENV CHE_HOME=/home/user/eclipse-che ENV JAVA_HOME=/usr/lib/jvm/jre -RUN microdnf install java-11-openjdk-headless tar gzip shadow-utils findutils && \ +RUN microdnf install java-17-openjdk-headless tar gzip shadow-utils findutils && \ microdnf update -y && \ microdnf -y clean all && rm -rf /var/cache/yum && echo "Installed Packages" && rpm -qa | sort -V && echo "End Of Installed Packages" && \ adduser -G root user && mkdir -p /home/user/eclipse-che From df3fc9965aab47fb958513d0545ee1531fd6e0ae Mon Sep 17 00:00:00 2001 From: Igor Vinokur Date: Tue, 25 Jul 2023 18:52:54 +0300 Subject: [PATCH 37/75] Omit scm-username annotation from the PAT secret (#533) Ignore the che.eclipse.org/scm-username annotation when fetching token from a PAT secret. Instead fetch the username from the isValid() request. --- .../KubernetesGitCredentialManager.java | 7 +- .../KubernetesPersonalAccessTokenManager.java | 49 +++--- .../KubernetesGitCredentialManagerTest.java | 3 - ...ernetesPersonalAccessTokenManagerTest.java | 119 +++++++++++++-- ...AzureDevOpsPersonalAccessTokenFetcher.java | 58 +++++--- ...ucketServerPersonalAccessTokenFetcher.java | 49 +++++- .../bitbucket/BitbucketServerURLParser.java | 4 +- .../BitbucketServerUserDataFetcher.java | 5 +- .../HttpBitbucketServerApiClient.java | 140 +++++++++--------- .../server/BitbucketServerApiClient.java | 43 ++---- .../server/NoopBitbucketServerApiClient.java | 16 +- ...tServerPersonalAccessTokenFetcherTest.java | 52 +++---- .../BitbucketServerURLParserTest.java | 6 +- .../BitbucketServerUserDataFetcherTest.java | 2 +- .../HttpBitbucketServerApiClientTest.java | 44 ++++-- .../server/bitbucket/BitbucketApiClient.java | 33 +++-- .../BitbucketPersonalAccessTokenFetcher.java | 60 +++++--- .../bitbucket/BitbucketApiClientTest.java | 6 +- ...tbucketPersonalAccessTokenFetcherTest.java | 57 ++++--- .../server/github/GithubApiClient.java | 25 +++- .../GithubPersonalAccessTokenFetcher.java | 65 +++++--- .../server/github/GithubApiClientTest.java | 6 +- .../GithubPersonalAccessTokenFetcherTest.java | 57 ++++--- .../server/gitlab/GitlabApiClient.java | 29 +++- .../gitlab/GitlabOAuthTokenFetcher.java | 73 ++++++--- .../gitlab/GitlabPersonalAccessTokenInfo.java | 93 ++++++++++++ .../server/gitlab/GitlabUrlParser.java | 2 +- .../server/gitlab/GitlabApiClientTest.java | 26 +++- .../gitlab/GitlabOAuthTokenFetcherTest.java | 30 ++-- .../gitlab/rest/api/v4/user/PAT_info.json | 7 + .../scm/PersonalAccessTokenFetcher.java | 15 ++ .../server/scm/PersonalAccessTokenParams.java | 54 +++++++ .../scm/ScmPersonalAccessTokenFetcher.java | 21 ++- 33 files changed, 855 insertions(+), 401 deletions(-) create mode 100644 wsmaster/che-core-api-factory-gitlab/src/main/java/org/eclipse/che/api/factory/server/gitlab/GitlabPersonalAccessTokenInfo.java create mode 100644 wsmaster/che-core-api-factory-gitlab/src/test/resources/__files/gitlab/rest/api/v4/user/PAT_info.json create mode 100644 wsmaster/che-core-api-factory/src/main/java/org/eclipse/che/api/factory/server/scm/PersonalAccessTokenParams.java diff --git a/infrastructures/infrastructure-factory/src/main/java/org/eclipse/che/api/factory/server/scm/kubernetes/KubernetesGitCredentialManager.java b/infrastructures/infrastructure-factory/src/main/java/org/eclipse/che/api/factory/server/scm/kubernetes/KubernetesGitCredentialManager.java index b5c3a2fd83..3f31c451c6 100644 --- a/infrastructures/infrastructure-factory/src/main/java/org/eclipse/che/api/factory/server/scm/kubernetes/KubernetesGitCredentialManager.java +++ b/infrastructures/infrastructure-factory/src/main/java/org/eclipse/che/api/factory/server/scm/kubernetes/KubernetesGitCredentialManager.java @@ -126,11 +126,7 @@ public class KubernetesGitCredentialManager implements GitCredentialManager { '/')) && personalAccessToken .getCheUserId() - .equals(s.getMetadata().getAnnotations().get(ANNOTATION_CHE_USERID)) - && personalAccessToken - .getScmUserName() - .equals( - s.getMetadata().getAnnotations().get(ANNOTATION_SCM_USERNAME))) + .equals(s.getMetadata().getAnnotations().get(ANNOTATION_CHE_USERID))) .findFirst(); Secret secret = @@ -138,7 +134,6 @@ public class KubernetesGitCredentialManager implements GitCredentialManager { () -> { Map annotations = new HashMap<>(DEFAULT_SECRET_ANNOTATIONS); annotations.put(ANNOTATION_SCM_URL, personalAccessToken.getScmProviderUrl()); - annotations.put(ANNOTATION_SCM_USERNAME, personalAccessToken.getScmUserName()); annotations.put(ANNOTATION_CHE_USERID, personalAccessToken.getCheUserId()); ObjectMeta meta = new ObjectMetaBuilder() diff --git a/infrastructures/infrastructure-factory/src/main/java/org/eclipse/che/api/factory/server/scm/kubernetes/KubernetesPersonalAccessTokenManager.java b/infrastructures/infrastructure-factory/src/main/java/org/eclipse/che/api/factory/server/scm/kubernetes/KubernetesPersonalAccessTokenManager.java index 497123d3c5..621609e64d 100644 --- a/infrastructures/infrastructure-factory/src/main/java/org/eclipse/che/api/factory/server/scm/kubernetes/KubernetesPersonalAccessTokenManager.java +++ b/infrastructures/infrastructure-factory/src/main/java/org/eclipse/che/api/factory/server/scm/kubernetes/KubernetesPersonalAccessTokenManager.java @@ -30,6 +30,7 @@ import javax.inject.Singleton; import org.eclipse.che.api.factory.server.scm.GitCredentialManager; import org.eclipse.che.api.factory.server.scm.PersonalAccessToken; import org.eclipse.che.api.factory.server.scm.PersonalAccessTokenManager; +import org.eclipse.che.api.factory.server.scm.PersonalAccessTokenParams; import org.eclipse.che.api.factory.server.scm.ScmPersonalAccessTokenFetcher; import org.eclipse.che.api.factory.server.scm.exception.ScmCommunicationException; import org.eclipse.che.api.factory.server.scm.exception.ScmConfigurationPersistenceException; @@ -59,7 +60,6 @@ public class KubernetesPersonalAccessTokenManager implements PersonalAccessToken public static final String NAME_PATTERN = "personal-access-token-"; public static final String ANNOTATION_CHE_USERID = "che.eclipse.org/che-userid"; - public static final String ANNOTATION_SCM_USERNAME = "che.eclipse.org/scm-username"; public static final String ANNOTATION_SCM_ORGANIZATION = "che.eclipse.org/scm-organization"; public static final String ANNOTATION_SCM_PERSONAL_ACCESS_TOKEN_ID = "che.eclipse.org/scm-personal-access-token-id"; @@ -96,7 +96,6 @@ public class KubernetesPersonalAccessTokenManager implements PersonalAccessToken .withAnnotations( new ImmutableMap.Builder() .put(ANNOTATION_CHE_USERID, personalAccessToken.getCheUserId()) - .put(ANNOTATION_SCM_USERNAME, personalAccessToken.getScmUserName()) .put(ANNOTATION_SCM_URL, personalAccessToken.getScmProviderUrl()) .put( ANNOTATION_SCM_PERSONAL_ACCESS_TOKEN_ID, @@ -191,28 +190,34 @@ public class KubernetesPersonalAccessTokenManager implements PersonalAccessToken || trimmedUrl.equals(StringUtils.trimEnd(scmServerUrl, '/')))) { String token = new String(Base64.getDecoder().decode(secret.getData().get("token"))).trim(); - PersonalAccessToken personalAccessToken = - new PersonalAccessToken( - trimmedUrl, - annotations.get(ANNOTATION_CHE_USERID), - annotations.get(ANNOTATION_SCM_ORGANIZATION), - annotations.get(ANNOTATION_SCM_USERNAME), - annotations.get(ANNOTATION_SCM_PERSONAL_ACCESS_TOKEN_NAME), - annotations.get(ANNOTATION_SCM_PERSONAL_ACCESS_TOKEN_ID), - token); - if (scmPersonalAccessTokenFetcher.isValid(personalAccessToken)) { + String providerName = annotations.get(ANNOTATION_SCM_PERSONAL_ACCESS_TOKEN_NAME); + String tokenId = annotations.get(ANNOTATION_SCM_PERSONAL_ACCESS_TOKEN_ID); + String organization = annotations.get(ANNOTATION_SCM_ORGANIZATION); + Optional scmUsername = + scmPersonalAccessTokenFetcher.getScmUsername( + new PersonalAccessTokenParams( + trimmedUrl, providerName, tokenId, token, organization)); + if (scmUsername.isPresent()) { + PersonalAccessToken personalAccessToken = + new PersonalAccessToken( + trimmedUrl, + annotations.get(ANNOTATION_CHE_USERID), + organization, + scmUsername.get(), + providerName, + tokenId, + token); return Optional.of(personalAccessToken); - } else { - // Removing token that is no longer valid. If several tokens exist the next one could - // be valid. If no valid token can be found, the caller should react in the same way - // as it reacts if no token exists. Usually, that means that process of new token - // retrieval would be initiated. - cheServerKubernetesClientFactory - .create() - .secrets() - .inNamespace(namespaceMeta.getName()) - .delete(secret); } + // Removing token that is no longer valid. If several tokens exist the next one could + // be valid. If no valid token can be found, the caller should react in the same way + // as it reacts if no token exists. Usually, that means that process of new token + // retrieval would be initiated. + cheServerKubernetesClientFactory + .create() + .secrets() + .inNamespace(namespaceMeta.getName()) + .delete(secret); } } } diff --git a/infrastructures/infrastructure-factory/src/test/java/org/eclipse/che/api/factory/server/scm/kubernetes/KubernetesGitCredentialManagerTest.java b/infrastructures/infrastructure-factory/src/test/java/org/eclipse/che/api/factory/server/scm/kubernetes/KubernetesGitCredentialManagerTest.java index 5ac8e79bde..07e93a2040 100644 --- a/infrastructures/infrastructure-factory/src/test/java/org/eclipse/che/api/factory/server/scm/kubernetes/KubernetesGitCredentialManagerTest.java +++ b/infrastructures/infrastructure-factory/src/test/java/org/eclipse/che/api/factory/server/scm/kubernetes/KubernetesGitCredentialManagerTest.java @@ -15,7 +15,6 @@ import static java.util.Collections.emptyList; import static java.util.Collections.singletonList; import static org.eclipse.che.api.factory.server.scm.kubernetes.KubernetesGitCredentialManager.ANNOTATION_CHE_USERID; import static org.eclipse.che.api.factory.server.scm.kubernetes.KubernetesGitCredentialManager.ANNOTATION_SCM_URL; -import static org.eclipse.che.api.factory.server.scm.kubernetes.KubernetesGitCredentialManager.ANNOTATION_SCM_USERNAME; import static org.eclipse.che.api.factory.server.scm.kubernetes.KubernetesGitCredentialManager.DEFAULT_SECRET_ANNOTATIONS; import static org.eclipse.che.api.factory.server.scm.kubernetes.KubernetesGitCredentialManager.NAME_PATTERN; import static org.mockito.ArgumentMatchers.anyMap; @@ -125,7 +124,6 @@ public class KubernetesGitCredentialManagerTest { Map annotations = new HashMap<>(DEFAULT_SECRET_ANNOTATIONS); annotations.put(ANNOTATION_SCM_URL, token.getScmProviderUrl() + "/"); - annotations.put(ANNOTATION_SCM_USERNAME, token.getScmUserName()); annotations.put(ANNOTATION_CHE_USERID, token.getCheUserId()); ObjectMeta objectMeta = new ObjectMetaBuilder() @@ -210,7 +208,6 @@ public class KubernetesGitCredentialManagerTest { Map annotations = new HashMap<>(DEFAULT_SECRET_ANNOTATIONS); annotations.put(ANNOTATION_SCM_URL, token.getScmProviderUrl() + "/"); - annotations.put(ANNOTATION_SCM_USERNAME, token.getScmUserName()); annotations.put(ANNOTATION_CHE_USERID, token.getCheUserId()); ObjectMeta objectMeta = new ObjectMetaBuilder() diff --git a/infrastructures/infrastructure-factory/src/test/java/org/eclipse/che/api/factory/server/scm/kubernetes/KubernetesPersonalAccessTokenManagerTest.java b/infrastructures/infrastructure-factory/src/test/java/org/eclipse/che/api/factory/server/scm/kubernetes/KubernetesPersonalAccessTokenManagerTest.java index f8207607db..5920601db6 100644 --- a/infrastructures/infrastructure-factory/src/test/java/org/eclipse/che/api/factory/server/scm/kubernetes/KubernetesPersonalAccessTokenManagerTest.java +++ b/infrastructures/infrastructure-factory/src/test/java/org/eclipse/che/api/factory/server/scm/kubernetes/KubernetesPersonalAccessTokenManagerTest.java @@ -12,6 +12,7 @@ package org.eclipse.che.api.factory.server.scm.kubernetes; import static java.nio.charset.StandardCharsets.UTF_8; +import static java.util.Collections.singletonList; import static org.eclipse.che.api.factory.server.scm.kubernetes.KubernetesPersonalAccessTokenManager.ANNOTATION_CHE_USERID; import static org.eclipse.che.api.factory.server.scm.kubernetes.KubernetesPersonalAccessTokenManager.ANNOTATION_SCM_PERSONAL_ACCESS_TOKEN_ID; import static org.eclipse.che.api.factory.server.scm.kubernetes.KubernetesPersonalAccessTokenManager.ANNOTATION_SCM_URL; @@ -37,12 +38,12 @@ import io.fabric8.kubernetes.client.dsl.NonNamespaceOperation; import io.fabric8.kubernetes.client.dsl.Resource; import java.util.Arrays; import java.util.Base64; -import java.util.Collections; import java.util.List; import java.util.Map; import java.util.Optional; import org.eclipse.che.api.factory.server.scm.GitCredentialManager; import org.eclipse.che.api.factory.server.scm.PersonalAccessToken; +import org.eclipse.che.api.factory.server.scm.PersonalAccessTokenParams; import org.eclipse.che.api.factory.server.scm.ScmPersonalAccessTokenFetcher; import org.eclipse.che.commons.subject.SubjectImpl; import org.eclipse.che.workspace.infrastructure.kubernetes.CheServerKubernetesClientFactory; @@ -90,12 +91,13 @@ public class KubernetesPersonalAccessTokenManagerTest { @Test public void shouldTrimBlankCharsInToken() throws Exception { KubernetesNamespaceMeta meta = new KubernetesNamespaceMetaImpl("test"); - when(namespaceFactory.list()).thenReturn(Collections.singletonList(meta)); + when(namespaceFactory.list()).thenReturn(singletonList(meta)); KubernetesNamespace kubernetesnamespace = Mockito.mock(KubernetesNamespace.class); KubernetesSecrets secrets = Mockito.mock(KubernetesSecrets.class); when(namespaceFactory.access(eq(null), eq(meta.getName()))).thenReturn(kubernetesnamespace); when(kubernetesnamespace.secrets()).thenReturn(secrets); - when(scmPersonalAccessTokenFetcher.isValid(any(PersonalAccessToken.class))).thenReturn(true); + when(scmPersonalAccessTokenFetcher.getScmUsername(any(PersonalAccessTokenParams.class))) + .thenReturn(Optional.of("user")); Map data = Map.of("token", Base64.getEncoder().encodeToString(" token_value \n".getBytes(UTF_8))); @@ -124,7 +126,7 @@ public class KubernetesPersonalAccessTokenManagerTest { public void testSavingOfPersonalAccessToken() throws Exception { KubernetesNamespaceMeta meta = new KubernetesNamespaceMetaImpl("test"); - when(namespaceFactory.list()).thenReturn(Collections.singletonList(meta)); + when(namespaceFactory.list()).thenReturn(singletonList(meta)); when(cheServerKubernetesClientFactory.create()).thenReturn(kubeClient); when(kubeClient.secrets()).thenReturn(secretsMixedOperation); @@ -156,12 +158,13 @@ public class KubernetesPersonalAccessTokenManagerTest { public void testGetTokenFromNamespace() throws Exception { KubernetesNamespaceMeta meta = new KubernetesNamespaceMetaImpl("test"); - when(namespaceFactory.list()).thenReturn(Collections.singletonList(meta)); + when(namespaceFactory.list()).thenReturn(singletonList(meta)); KubernetesNamespace kubernetesnamespace = Mockito.mock(KubernetesNamespace.class); KubernetesSecrets secrets = Mockito.mock(KubernetesSecrets.class); when(namespaceFactory.access(eq(null), eq(meta.getName()))).thenReturn(kubernetesnamespace); when(kubernetesnamespace.secrets()).thenReturn(secrets); - when(scmPersonalAccessTokenFetcher.isValid(any(PersonalAccessToken.class))).thenReturn(true); + when(scmPersonalAccessTokenFetcher.getScmUsername(any(PersonalAccessTokenParams.class))) + .thenReturn(Optional.of("user")); Map data1 = Map.of("token", Base64.getEncoder().encodeToString("token1".getBytes(UTF_8))); @@ -206,15 +209,96 @@ public class KubernetesPersonalAccessTokenManagerTest { } @Test - public void testGetTokenFromNamespaceWithTrailingSlashMismatch() throws Exception { + public void shouldGetTokenFromASecretWithSCMUsername() throws Exception { KubernetesNamespaceMeta meta = new KubernetesNamespaceMetaImpl("test"); - when(namespaceFactory.list()).thenReturn(Collections.singletonList(meta)); + when(namespaceFactory.list()).thenReturn(singletonList(meta)); KubernetesNamespace kubernetesnamespace = Mockito.mock(KubernetesNamespace.class); KubernetesSecrets secrets = Mockito.mock(KubernetesSecrets.class); when(namespaceFactory.access(eq(null), eq(meta.getName()))).thenReturn(kubernetesnamespace); when(kubernetesnamespace.secrets()).thenReturn(secrets); - when(scmPersonalAccessTokenFetcher.isValid(any(PersonalAccessToken.class))).thenReturn(true); + when(scmPersonalAccessTokenFetcher.getScmUsername(any(PersonalAccessTokenParams.class))) + .thenReturn(Optional.of("user")); + + Map data = + Map.of("token", Base64.getEncoder().encodeToString("token1".getBytes(UTF_8))); + + ObjectMeta metaData = + new ObjectMetaBuilder() + .withAnnotations( + Map.of( + ANNOTATION_CHE_USERID, + "user1", + ANNOTATION_SCM_URL, + "http://host1", + "che.eclipse.org/scm-username", + "scm-username")) + .build(); + + Secret secret = new SecretBuilder().withMetadata(metaData).withData(data).build(); + + when(secrets.get(any(LabelSelector.class))).thenReturn(singletonList(secret)); + + // when + Optional tokenOptional = + personalAccessTokenManager.get( + new SubjectImpl("user", "user1", "t1", false), "http://host1"); + + // then + assertTrue(tokenOptional.isPresent()); + assertEquals(tokenOptional.get().getCheUserId(), "user1"); + assertEquals(tokenOptional.get().getScmProviderUrl(), "http://host1"); + assertEquals(tokenOptional.get().getToken(), "token1"); + } + + @Test + public void shouldGetTokenFromASecretWithoutSCMUsername() throws Exception { + + KubernetesNamespaceMeta meta = new KubernetesNamespaceMetaImpl("test"); + when(namespaceFactory.list()).thenReturn(singletonList(meta)); + KubernetesNamespace kubernetesnamespace = Mockito.mock(KubernetesNamespace.class); + KubernetesSecrets secrets = Mockito.mock(KubernetesSecrets.class); + when(namespaceFactory.access(eq(null), eq(meta.getName()))).thenReturn(kubernetesnamespace); + when(kubernetesnamespace.secrets()).thenReturn(secrets); + when(scmPersonalAccessTokenFetcher.getScmUsername(any(PersonalAccessTokenParams.class))) + .thenReturn(Optional.of("user")); + + Map data = + Map.of("token", Base64.getEncoder().encodeToString("token1".getBytes(UTF_8))); + + ObjectMeta metaData = + new ObjectMetaBuilder() + .withAnnotations( + Map.of(ANNOTATION_CHE_USERID, "user1", ANNOTATION_SCM_URL, "http://host1")) + .build(); + + Secret secret = new SecretBuilder().withMetadata(metaData).withData(data).build(); + + when(secrets.get(any(LabelSelector.class))).thenReturn(singletonList(secret)); + + // when + Optional tokenOptional = + personalAccessTokenManager.get( + new SubjectImpl("user", "user1", "t1", false), "http://host1"); + + // then + assertTrue(tokenOptional.isPresent()); + assertEquals(tokenOptional.get().getCheUserId(), "user1"); + assertEquals(tokenOptional.get().getScmProviderUrl(), "http://host1"); + assertEquals(tokenOptional.get().getToken(), "token1"); + } + + @Test + public void testGetTokenFromNamespaceWithTrailingSlashMismatch() throws Exception { + + KubernetesNamespaceMeta meta = new KubernetesNamespaceMetaImpl("test"); + when(namespaceFactory.list()).thenReturn(singletonList(meta)); + KubernetesNamespace kubernetesnamespace = Mockito.mock(KubernetesNamespace.class); + KubernetesSecrets secrets = Mockito.mock(KubernetesSecrets.class); + when(namespaceFactory.access(eq(null), eq(meta.getName()))).thenReturn(kubernetesnamespace); + when(kubernetesnamespace.secrets()).thenReturn(secrets); + when(scmPersonalAccessTokenFetcher.getScmUsername(any(PersonalAccessTokenParams.class))) + .thenReturn(Optional.of("user")); Map data1 = Map.of("token", Base64.getEncoder().encodeToString("token1".getBytes(UTF_8))); @@ -256,12 +340,13 @@ public class KubernetesPersonalAccessTokenManagerTest { public void shouldDeleteInvalidTokensOnGet() throws Exception { // given KubernetesNamespaceMeta meta = new KubernetesNamespaceMetaImpl("test"); - when(namespaceFactory.list()).thenReturn(Collections.singletonList(meta)); + when(namespaceFactory.list()).thenReturn(singletonList(meta)); KubernetesNamespace kubernetesnamespace = Mockito.mock(KubernetesNamespace.class); KubernetesSecrets secrets = Mockito.mock(KubernetesSecrets.class); when(namespaceFactory.access(eq(null), eq(meta.getName()))).thenReturn(kubernetesnamespace); when(kubernetesnamespace.secrets()).thenReturn(secrets); - when(scmPersonalAccessTokenFetcher.isValid(any(PersonalAccessToken.class))).thenReturn(false); + when(scmPersonalAccessTokenFetcher.getScmUsername(any(PersonalAccessTokenParams.class))) + .thenReturn(Optional.empty()); when(cheServerKubernetesClientFactory.create()).thenReturn(kubeClient); when(kubeClient.secrets()).thenReturn(secretsMixedOperation); when(secretsMixedOperation.inNamespace(eq(meta.getName()))).thenReturn(nonNamespaceOperation); @@ -287,17 +372,19 @@ public class KubernetesPersonalAccessTokenManagerTest { public void shouldReturnFirstValidToken() throws Exception { // given KubernetesNamespaceMeta meta = new KubernetesNamespaceMetaImpl("test"); - when(namespaceFactory.list()).thenReturn(Collections.singletonList(meta)); + when(namespaceFactory.list()).thenReturn(singletonList(meta)); KubernetesNamespace kubernetesnamespace = Mockito.mock(KubernetesNamespace.class); KubernetesSecrets secrets = Mockito.mock(KubernetesSecrets.class); when(namespaceFactory.access(eq(null), eq(meta.getName()))).thenReturn(kubernetesnamespace); when(kubernetesnamespace.secrets()).thenReturn(secrets); - when(scmPersonalAccessTokenFetcher.isValid(any(PersonalAccessToken.class))) + when(scmPersonalAccessTokenFetcher.getScmUsername(any(PersonalAccessTokenParams.class))) .thenAnswer( - (Answer) + (Answer>) invocation -> { - PersonalAccessToken token = invocation.getArgument(0); - return "id2".equals(token.getScmTokenId()); + PersonalAccessTokenParams params = invocation.getArgument(0); + return "id2".equals(params.getScmTokenId()) + ? Optional.of("user") + : Optional.empty(); }); when(cheServerKubernetesClientFactory.create()).thenReturn(kubeClient); when(kubeClient.secrets()).thenReturn(secretsMixedOperation); diff --git a/wsmaster/che-core-api-factory-azure-devops/src/main/java/org/eclipse/che/api/factory/server/azure/devops/AzureDevOpsPersonalAccessTokenFetcher.java b/wsmaster/che-core-api-factory-azure-devops/src/main/java/org/eclipse/che/api/factory/server/azure/devops/AzureDevOpsPersonalAccessTokenFetcher.java index b028ff77e0..14aa9f62dc 100644 --- a/wsmaster/che-core-api-factory-azure-devops/src/main/java/org/eclipse/che/api/factory/server/azure/devops/AzureDevOpsPersonalAccessTokenFetcher.java +++ b/wsmaster/che-core-api-factory-azure-devops/src/main/java/org/eclipse/che/api/factory/server/azure/devops/AzureDevOpsPersonalAccessTokenFetcher.java @@ -27,12 +27,14 @@ import org.eclipse.che.api.core.ServerException; import org.eclipse.che.api.core.UnauthorizedException; import org.eclipse.che.api.factory.server.scm.PersonalAccessToken; import org.eclipse.che.api.factory.server.scm.PersonalAccessTokenFetcher; +import org.eclipse.che.api.factory.server.scm.PersonalAccessTokenParams; import org.eclipse.che.api.factory.server.scm.exception.ScmBadRequestException; import org.eclipse.che.api.factory.server.scm.exception.ScmCommunicationException; import org.eclipse.che.api.factory.server.scm.exception.ScmItemNotFoundException; import org.eclipse.che.api.factory.server.scm.exception.ScmUnauthorizedException; import org.eclipse.che.api.factory.server.scm.exception.UnknownScmProviderException; import org.eclipse.che.commons.lang.NameGenerator; +import org.eclipse.che.commons.lang.Pair; import org.eclipse.che.commons.subject.Subject; import org.eclipse.che.security.oauth.OAuthAPI; import org.slf4j.Logger; @@ -80,30 +82,31 @@ public class AzureDevOpsPersonalAccessTokenFetcher implements PersonalAccessToke try { oAuthToken = oAuthAPI.getToken(AzureDevOps.PROVIDER_NAME); - // Find the user associated to the OAuth token by querying the Azure DevOps API. - AzureDevOpsUser user = azureDevOpsApiClient.getUserWithOAuthToken(oAuthToken.getToken()); - PersonalAccessToken token = - new PersonalAccessToken( - scmServerUrl, - cheSubject.getUserId(), - user.getEmailAddress(), - NameGenerator.generate(OAUTH_2_PREFIX, 5), - NameGenerator.generate("id-", 5), - oAuthToken.getToken()); - Optional valid = isValid(token); + String tokenName = NameGenerator.generate(OAUTH_2_PREFIX, 5); + String tokenId = NameGenerator.generate("id-", 5); + Optional> valid = + isValid( + new PersonalAccessTokenParams( + scmServerUrl, tokenName, tokenId, oAuthToken.getToken(), null)); if (valid.isEmpty()) { throw new ScmCommunicationException( "Unable to verify if current token is a valid Azure DevOps token. Token's scm-url needs to be '" + azureDevOpsScmApiEndpoint + "' and was '" - + token.getScmProviderUrl() + + scmServerUrl + "'"); - } else if (!valid.get()) { + } else if (!valid.get().first) { throw new ScmCommunicationException( "Current token doesn't have the necessary privileges. Please make sure Che app scopes are correct and containing at least: " + Arrays.toString(scopes)); } - return token; + return new PersonalAccessToken( + scmServerUrl, + cheSubject.getUserId(), + valid.get().second, + tokenName, + tokenId, + oAuthToken.getToken()); } catch (UnauthorizedException e) { throw new ScmUnauthorizedException( cheSubject.getUserName() @@ -115,12 +118,7 @@ public class AzureDevOpsPersonalAccessTokenFetcher implements PersonalAccessToke getLocalAuthenticateUrl()); } catch (NotFoundException nfe) { throw new UnknownScmProviderException(nfe.getMessage(), scmServerUrl); - } catch (ServerException - | ForbiddenException - | BadRequestException - | ScmItemNotFoundException - | ScmBadRequestException - | ConflictException e) { + } catch (ServerException | ForbiddenException | BadRequestException | ConflictException e) { LOG.error(e.getMessage()); throw new ScmCommunicationException(e.getMessage(), e); } @@ -149,6 +147,26 @@ public class AzureDevOpsPersonalAccessTokenFetcher implements PersonalAccessToke } } + @Override + public Optional> isValid(PersonalAccessTokenParams params) { + if (!isValidScmServerUrl(params.getScmProviderUrl())) { + LOG.debug("not a valid url {} for current fetcher ", params.getScmProviderUrl()); + return Optional.empty(); + } + + try { + AzureDevOpsUser user; + if (params.getScmTokenName() != null && params.getScmTokenName().startsWith(OAUTH_2_PREFIX)) { + user = azureDevOpsApiClient.getUserWithOAuthToken(params.getToken()); + } else { + user = azureDevOpsApiClient.getUserWithPAT(params.getToken(), params.getOrganization()); + } + return Optional.of(Pair.of(Boolean.TRUE, user.getEmailAddress())); + } catch (ScmItemNotFoundException | ScmCommunicationException | ScmBadRequestException e) { + return Optional.empty(); + } + } + private String getLocalAuthenticateUrl() { return cheApiEndpoint + getAuthenticateUrlPath(scopes); } diff --git a/wsmaster/che-core-api-factory-bitbucket-server/src/main/java/org/eclipse/che/api/factory/server/bitbucket/BitbucketServerPersonalAccessTokenFetcher.java b/wsmaster/che-core-api-factory-bitbucket-server/src/main/java/org/eclipse/che/api/factory/server/bitbucket/BitbucketServerPersonalAccessTokenFetcher.java index 50ae813f7b..5d22669cca 100644 --- a/wsmaster/che-core-api-factory-bitbucket-server/src/main/java/org/eclipse/che/api/factory/server/bitbucket/BitbucketServerPersonalAccessTokenFetcher.java +++ b/wsmaster/che-core-api-factory-bitbucket-server/src/main/java/org/eclipse/che/api/factory/server/bitbucket/BitbucketServerPersonalAccessTokenFetcher.java @@ -27,11 +27,13 @@ import org.eclipse.che.api.factory.server.bitbucket.server.BitbucketServerApiCli import org.eclipse.che.api.factory.server.bitbucket.server.BitbucketUser; import org.eclipse.che.api.factory.server.scm.PersonalAccessToken; import org.eclipse.che.api.factory.server.scm.PersonalAccessTokenFetcher; +import org.eclipse.che.api.factory.server.scm.PersonalAccessTokenParams; import org.eclipse.che.api.factory.server.scm.exception.ScmBadRequestException; import org.eclipse.che.api.factory.server.scm.exception.ScmCommunicationException; import org.eclipse.che.api.factory.server.scm.exception.ScmItemNotFoundException; import org.eclipse.che.api.factory.server.scm.exception.ScmUnauthorizedException; import org.eclipse.che.commons.env.EnvironmentContext; +import org.eclipse.che.commons.lang.Pair; import org.eclipse.che.commons.subject.Subject; import org.eclipse.che.security.oauth.OAuthAPI; import org.eclipse.che.security.oauth1.NoopOAuthAuthenticator; @@ -76,22 +78,20 @@ public class BitbucketServerPersonalAccessTokenFetcher implements PersonalAccess final String tokenName = format(TOKEN_NAME_TEMPLATE, cheUser.getUserId(), apiEndpoint.getHost()); try { - BitbucketUser user = - bitbucketServerApiClient.getUser(EnvironmentContext.getCurrent().getSubject()); + BitbucketUser user = bitbucketServerApiClient.getUser(); LOG.debug("Current bitbucket user {} ", user); // cleanup existed List existingTokens = - bitbucketServerApiClient.getPersonalAccessTokens(user.getSlug()).stream() + bitbucketServerApiClient.getPersonalAccessTokens().stream() .filter(p -> p.getName().equals(tokenName)) .collect(Collectors.toList()); for (BitbucketPersonalAccessToken existedToken : existingTokens) { LOG.debug("Deleting existed che token {} {}", existedToken.getId(), existedToken.getName()); - bitbucketServerApiClient.deletePersonalAccessTokens(user.getSlug(), existedToken.getId()); + bitbucketServerApiClient.deletePersonalAccessTokens(existedToken.getId()); } BitbucketPersonalAccessToken token = - bitbucketServerApiClient.createPersonalAccessTokens( - user.getSlug(), tokenName, DEFAULT_TOKEN_SCOPE); + bitbucketServerApiClient.createPersonalAccessTokens(tokenName, DEFAULT_TOKEN_SCOPE); LOG.debug("Token created = {} for {}", token.getId(), token.getUser()); return new PersonalAccessToken( scmServerUrl, @@ -118,7 +118,7 @@ public class BitbucketServerPersonalAccessTokenFetcher implements PersonalAccess oAuthAPI, apiEndpoint.toString()); try { - apiClient.getUser(personalAccessToken.getScmUserName(), personalAccessToken.getToken()); + apiClient.getUser(personalAccessToken.getToken()); return Optional.of(Boolean.TRUE); } catch (ScmItemNotFoundException | ScmUnauthorizedException @@ -131,11 +131,44 @@ public class BitbucketServerPersonalAccessTokenFetcher implements PersonalAccess try { BitbucketPersonalAccessToken bitbucketPersonalAccessToken = bitbucketServerApiClient.getPersonalAccessToken( - personalAccessToken.getScmUserName(), Long.valueOf(personalAccessToken.getScmTokenId())); return Optional.of(DEFAULT_TOKEN_SCOPE.equals(bitbucketPersonalAccessToken.getPermissions())); } catch (ScmItemNotFoundException e) { return Optional.of(Boolean.FALSE); } } + + @Override + public Optional> isValid(PersonalAccessTokenParams params) { + if (!bitbucketServerApiClient.isConnected(params.getScmProviderUrl())) { + // If BitBucket oAuth is not configured check the manually added user namespace token. + HttpBitbucketServerApiClient apiClient = + new HttpBitbucketServerApiClient( + params.getScmProviderUrl(), + new NoopOAuthAuthenticator(), + oAuthAPI, + apiEndpoint.toString()); + try { + BitbucketUser user = apiClient.getUser(params.getToken()); + return Optional.of(Pair.of(Boolean.TRUE, user.getName())); + } catch (ScmItemNotFoundException + | ScmUnauthorizedException + | ScmCommunicationException exception) { + LOG.debug("not a valid url {} for current fetcher ", params.getScmProviderUrl()); + return Optional.empty(); + } + } + try { + BitbucketPersonalAccessToken bitbucketPersonalAccessToken = + bitbucketServerApiClient.getPersonalAccessToken(Long.valueOf(params.getScmTokenId())); + return Optional.of( + Pair.of( + DEFAULT_TOKEN_SCOPE.equals(bitbucketPersonalAccessToken.getPermissions()) + ? Boolean.TRUE + : Boolean.FALSE, + bitbucketPersonalAccessToken.getUser().getName())); + } catch (ScmItemNotFoundException | ScmUnauthorizedException | ScmCommunicationException e) { + return Optional.empty(); + } + } } diff --git a/wsmaster/che-core-api-factory-bitbucket-server/src/main/java/org/eclipse/che/api/factory/server/bitbucket/BitbucketServerURLParser.java b/wsmaster/che-core-api-factory-bitbucket-server/src/main/java/org/eclipse/che/api/factory/server/bitbucket/BitbucketServerURLParser.java index 2115245272..b76d4d517a 100644 --- a/wsmaster/che-core-api-factory-bitbucket-server/src/main/java/org/eclipse/che/api/factory/server/bitbucket/BitbucketServerURLParser.java +++ b/wsmaster/che-core-api-factory-bitbucket-server/src/main/java/org/eclipse/che/api/factory/server/bitbucket/BitbucketServerURLParser.java @@ -114,9 +114,9 @@ public class BitbucketServerURLParser { new BitbucketServerOAuthAuthenticator("", "", "", ""), oAuthAPI, ""); - // If the token request catches the unauthorised error, it means that the provided url + // If the user request catches the unauthorised error, it means that the provided url // belongs to Bitbucket. - bitbucketServerApiClient.getPersonalAccessToken("", 0L); + bitbucketServerApiClient.getUser(); } catch (ScmItemNotFoundException | ScmCommunicationException e) { return false; } catch (ScmUnauthorizedException e) { diff --git a/wsmaster/che-core-api-factory-bitbucket-server/src/main/java/org/eclipse/che/api/factory/server/bitbucket/BitbucketServerUserDataFetcher.java b/wsmaster/che-core-api-factory-bitbucket-server/src/main/java/org/eclipse/che/api/factory/server/bitbucket/BitbucketServerUserDataFetcher.java index 1af8941794..5fcf024a25 100644 --- a/wsmaster/che-core-api-factory-bitbucket-server/src/main/java/org/eclipse/che/api/factory/server/bitbucket/BitbucketServerUserDataFetcher.java +++ b/wsmaster/che-core-api-factory-bitbucket-server/src/main/java/org/eclipse/che/api/factory/server/bitbucket/BitbucketServerUserDataFetcher.java @@ -80,7 +80,7 @@ public class BitbucketServerUserDataFetcher implements GitUserDataFetcher { for (String bitbucketServerEndpoint : this.registeredBitbucketEndpoints) { if (bitbucketServerApiClient.isConnected(bitbucketServerEndpoint)) { try { - BitbucketUser user = bitbucketServerApiClient.getUser(cheSubject); + BitbucketUser user = bitbucketServerApiClient.getUser(); return new GitUserData(user.getDisplayName(), user.getEmailAddress()); } catch (ScmItemNotFoundException e) { throw new ScmCommunicationException(e.getMessage(), e); @@ -100,8 +100,7 @@ public class BitbucketServerUserDataFetcher implements GitUserDataFetcher { oAuthAPI, this.apiEndpoint); - BitbucketUser user = - httpBitbucketServerApiClient.getUser(token.getScmUserName(), token.getToken()); + BitbucketUser user = httpBitbucketServerApiClient.getUser(token.getToken()); return new GitUserData(user.getDisplayName(), user.getEmailAddress()); } diff --git a/wsmaster/che-core-api-factory-bitbucket-server/src/main/java/org/eclipse/che/api/factory/server/bitbucket/HttpBitbucketServerApiClient.java b/wsmaster/che-core-api-factory-bitbucket-server/src/main/java/org/eclipse/che/api/factory/server/bitbucket/HttpBitbucketServerApiClient.java index 9ee5da4f73..41571fbef3 100644 --- a/wsmaster/che-core-api-factory-bitbucket-server/src/main/java/org/eclipse/che/api/factory/server/bitbucket/HttpBitbucketServerApiClient.java +++ b/wsmaster/che-core-api-factory-bitbucket-server/src/main/java/org/eclipse/che/api/factory/server/bitbucket/HttpBitbucketServerApiClient.java @@ -41,7 +41,6 @@ import java.util.Optional; import java.util.Set; import java.util.concurrent.Executors; import java.util.function.Function; -import java.util.stream.Collectors; import org.eclipse.che.api.auth.shared.dto.OAuthToken; import org.eclipse.che.api.core.BadRequestException; import org.eclipse.che.api.core.ConflictException; @@ -112,44 +111,18 @@ public class HttpBitbucketServerApiClient implements BitbucketServerApiClient { } @Override - public BitbucketUser getUser(Subject cheUser) - throws ScmUnauthorizedException, ScmCommunicationException, ScmItemNotFoundException { - try { - // Since Bitbucket server API doesn't provide a way to get an account profile currently - // authenticated user we will try to find it and by iterating over the list available to the - // current user Bitbucket users and attempting to get their personal access tokens. To speed - // up this process first of all we will search among users that contain(somewhere in Bitbucket - // user - // entity) Che's user username. At the second step, we will search against all visible(to the - // current Che's user) bitbucket users that are not included in the first list. - Set usersByName = - getUsers(cheUser.getUserName()).stream() - .map(BitbucketUser::getSlug) - .collect(Collectors.toSet()); - - Optional currentUser = findCurrentUser(usersByName); - if (currentUser.isPresent()) { - return currentUser.get(); - } - Set usersAllExceptByName = - getUsers().stream() - .map(BitbucketUser::getSlug) - .filter(s -> !usersByName.contains(s)) - .collect(Collectors.toSet()); - currentUser = findCurrentUser(usersAllExceptByName); - if (currentUser.isPresent()) { - return currentUser.get(); - } - } catch (ScmBadRequestException | ScmItemNotFoundException scmException) { - throw new ScmCommunicationException(scmException.getMessage(), scmException); - } - throw new ScmItemNotFoundException( - "Current user not found. That is possible only if user are not authorized against " - + serverUri); + public BitbucketUser getUser(String token) + throws ScmItemNotFoundException, ScmUnauthorizedException, ScmCommunicationException { + return getUser(getUserSlug(token), Optional.of(token)); } @Override - public BitbucketUser getUser(String slug, @Nullable String token) + public BitbucketUser getUser() + throws ScmItemNotFoundException, ScmUnauthorizedException, ScmCommunicationException { + return getUser(getUserSlug(), Optional.empty()); + } + + private BitbucketUser getUser(String slug, Optional token) throws ScmItemNotFoundException, ScmUnauthorizedException, ScmCommunicationException { URI uri; try { @@ -163,8 +136,8 @@ public class HttpBitbucketServerApiClient implements BitbucketServerApiClient { HttpRequest.newBuilder(uri) .headers( "Authorization", - token != null - ? "Bearer " + token + token.isPresent() + ? "Bearer " + token.get() : computeAuthorizationHeader("GET", uri.toString())) .timeout(DEFAULT_HTTP_TIMEOUT) .build(); @@ -209,9 +182,9 @@ public class HttpBitbucketServerApiClient implements BitbucketServerApiClient { } @Override - public void deletePersonalAccessTokens(String userSlug, Long tokenId) + public void deletePersonalAccessTokens(Long tokenId) throws ScmItemNotFoundException, ScmUnauthorizedException, ScmCommunicationException { - URI uri = serverUri.resolve("./rest/access-tokens/1.0/users/" + userSlug + "/" + tokenId); + URI uri = serverUri.resolve("./rest/access-tokens/1.0/users/" + getUserSlug() + "/" + tokenId); HttpRequest request = HttpRequest.newBuilder(uri) .DELETE() @@ -246,11 +219,12 @@ public class HttpBitbucketServerApiClient implements BitbucketServerApiClient { @Override public BitbucketPersonalAccessToken createPersonalAccessTokens( - String userSlug, String tokenName, Set permissions) - throws ScmBadRequestException, ScmUnauthorizedException, ScmCommunicationException { + String tokenName, Set permissions) + throws ScmBadRequestException, ScmUnauthorizedException, ScmCommunicationException, + ScmItemNotFoundException { BitbucketPersonalAccessToken token = new BitbucketPersonalAccessToken(tokenName, permissions, 90); - URI uri = serverUri.resolve("./rest/access-tokens/1.0/users/" + userSlug); + URI uri = serverUri.resolve("./rest/access-tokens/1.0/users/" + getUserSlug()); try { HttpRequest request = @@ -288,20 +262,22 @@ public class HttpBitbucketServerApiClient implements BitbucketServerApiClient { } @Override - public List getPersonalAccessTokens(String userSlug) + public List getPersonalAccessTokens() throws ScmItemNotFoundException, ScmUnauthorizedException, ScmCommunicationException { try { return doGetItems( - BitbucketPersonalAccessToken.class, "./rest/access-tokens/1.0/users/" + userSlug, null); + BitbucketPersonalAccessToken.class, + "./rest/access-tokens/1.0/users/" + getUserSlug(), + null); } catch (ScmBadRequestException e) { throw new ScmCommunicationException(e.getMessage(), e); } } @Override - public BitbucketPersonalAccessToken getPersonalAccessToken(String userSlug, Long tokenId) + public BitbucketPersonalAccessToken getPersonalAccessToken(Long tokenId) throws ScmItemNotFoundException, ScmUnauthorizedException, ScmCommunicationException { - URI uri = serverUri.resolve("./rest/access-tokens/1.0/users/" + userSlug + "/" + tokenId); + URI uri = serverUri.resolve("./rest/access-tokens/1.0/users/" + getUserSlug() + "/" + tokenId); HttpRequest request = HttpRequest.newBuilder(uri) .headers( @@ -331,35 +307,51 @@ public class HttpBitbucketServerApiClient implements BitbucketServerApiClient { } } - /** - * This method is testing provided collection of user's `slug`s if contains the `slug` of the - * currently authenticated user and return it. The major method to test that condition is to get - * the list of personal access tokens. Current Che user that is associated with Bitbucket user - * should not be able to get someone else list of personal access tokens except his own. - * - * @param userSlugs set of user's `slug`s to test if it contains currently authenticated user. - * @return Bitbucket user from the given set that is associated with the current user. Or - * Optional.empty if the given set doesn't contain that user. - * @throws ScmCommunicationException can happen if communication between che server and bitbucket - * server is failed. - * @throws ScmUnauthorizedException can happen if currently authenticated che user is not - * associated with bitbucket server. - * @throws ScmItemNotFoundException can happen if provided `slug` to test is not associated with - * any user on Bitbucket server - */ - private Optional findCurrentUser(Set userSlugs) - throws ScmCommunicationException, ScmUnauthorizedException, ScmItemNotFoundException { + private String getUserSlug(String token) + throws ScmItemNotFoundException, ScmCommunicationException, ScmUnauthorizedException { + return getUserSlug(Optional.of(token)); + } - for (String userSlug : userSlugs) { - BitbucketUser user = getUser(userSlug, null); - try { - getPersonalAccessTokens(userSlug); - return Optional.of(user); - } catch (ScmItemNotFoundException | ScmUnauthorizedException e) { - // ok - } + private String getUserSlug() + throws ScmItemNotFoundException, ScmCommunicationException, ScmUnauthorizedException { + return getUserSlug(Optional.empty()); + } + + private String getUserSlug(Optional token) + throws ScmCommunicationException, ScmUnauthorizedException, ScmItemNotFoundException { + URI uri; + try { + uri = serverUri.resolve("./plugins/servlet/applinks/whoami"); + } catch (IllegalArgumentException e) { + // if the slug contains invalid characters (space for example) then the URI will be invalid + throw new ScmCommunicationException(e.getMessage(), e); + } + + HttpRequest request = + HttpRequest.newBuilder(uri) + .headers( + "Authorization", + token.isPresent() + ? "Bearer " + token.get() + : computeAuthorizationHeader("GET", uri.toString())) + .timeout(DEFAULT_HTTP_TIMEOUT) + .build(); + + try { + LOG.trace("executeRequest={}", request); + return executeRequest( + httpClient, + request, + inputStream -> { + try { + return CharStreams.toString(new InputStreamReader(inputStream, Charsets.UTF_8)); + } catch (IOException e) { + throw new UncheckedIOException(e); + } + }); + } catch (ScmBadRequestException e) { + throw new ScmCommunicationException(e.getMessage(), e); } - return Optional.empty(); } private List doGetItems(Class tClass, String api, String filter) diff --git a/wsmaster/che-core-api-factory-bitbucket-server/src/main/java/org/eclipse/che/api/factory/server/bitbucket/server/BitbucketServerApiClient.java b/wsmaster/che-core-api-factory-bitbucket-server/src/main/java/org/eclipse/che/api/factory/server/bitbucket/server/BitbucketServerApiClient.java index cba69d318d..399e112aa6 100644 --- a/wsmaster/che-core-api-factory-bitbucket-server/src/main/java/org/eclipse/che/api/factory/server/bitbucket/server/BitbucketServerApiClient.java +++ b/wsmaster/che-core-api-factory-bitbucket-server/src/main/java/org/eclipse/che/api/factory/server/bitbucket/server/BitbucketServerApiClient.java @@ -17,8 +17,6 @@ import org.eclipse.che.api.factory.server.scm.exception.ScmBadRequestException; import org.eclipse.che.api.factory.server.scm.exception.ScmCommunicationException; import org.eclipse.che.api.factory.server.scm.exception.ScmItemNotFoundException; import org.eclipse.che.api.factory.server.scm.exception.ScmUnauthorizedException; -import org.eclipse.che.commons.annotation.Nullable; -import org.eclipse.che.commons.subject.Subject; /** Bitbucket Server API client. */ public interface BitbucketServerApiClient { @@ -27,24 +25,19 @@ public interface BitbucketServerApiClient { * @return - true if client is connected to the given bitbucket server. */ boolean isConnected(String bitbucketServerUrl); - /** - * @param cheUser - Che user. - * @return - {@link BitbucketUser} that is linked with given {@link Subject} - * @throws ScmUnauthorizedException - in case if {@link Subject} is not linked to any {@link - * BitbucketUser} - */ - BitbucketUser getUser(Subject cheUser) - throws ScmUnauthorizedException, ScmCommunicationException, ScmItemNotFoundException; /** - * @param slug scm username. - * @param token token to override. Pass {@code null} to use token from the authentication flow. - * @return - Retrieve the {@link BitbucketUser} matching the supplied userSlug. - * @throws ScmItemNotFoundException - * @throws ScmUnauthorizedException - * @throws ScmCommunicationException + * @param token token to authorise the user request. + * @return - authenticated {@link BitbucketUser}. */ - BitbucketUser getUser(String slug, @Nullable String token) + BitbucketUser getUser(String token) + throws ScmItemNotFoundException, ScmUnauthorizedException, ScmCommunicationException; + + /** + * @return Retrieve the authenticated {@link BitbucketUser} using an OAuth token. + * @return - authenticated {@link BitbucketUser}. + */ + BitbucketUser getUser() throws ScmItemNotFoundException, ScmUnauthorizedException, ScmCommunicationException; /** @@ -71,19 +64,17 @@ public interface BitbucketServerApiClient { * Modify an access token for the user according to the given request. Any fields not specified * will not be altered * - * @param userSlug * @param tokenId - the token id * @throws ScmItemNotFoundException * @throws ScmUnauthorizedException * @throws ScmCommunicationException */ - void deletePersonalAccessTokens(String userSlug, Long tokenId) + void deletePersonalAccessTokens(Long tokenId) throws ScmItemNotFoundException, ScmUnauthorizedException, ScmCommunicationException; /** * Create an access token for the user according to the given request. * - * @param userSlug * @param tokenName * @param permissions * @return @@ -91,29 +82,27 @@ public interface BitbucketServerApiClient { * @throws ScmUnauthorizedException * @throws ScmCommunicationException */ - BitbucketPersonalAccessToken createPersonalAccessTokens( - String userSlug, String tokenName, Set permissions) - throws ScmBadRequestException, ScmUnauthorizedException, ScmCommunicationException; + BitbucketPersonalAccessToken createPersonalAccessTokens(String tokenName, Set permissions) + throws ScmBadRequestException, ScmUnauthorizedException, ScmCommunicationException, + ScmItemNotFoundException; /** * Get all personal access tokens associated with the given user * - * @param userSlug * @return * @throws ScmItemNotFoundException * @throws ScmUnauthorizedException * @throws ScmBadRequestException * @throws ScmCommunicationException */ - List getPersonalAccessTokens(String userSlug) + List getPersonalAccessTokens() throws ScmItemNotFoundException, ScmUnauthorizedException, ScmCommunicationException; /** - * @param userSlug - user's slug. * @param tokenId - bitbucket personal access token id. * @return - Bitbucket personal access token. * @throws ScmCommunicationException */ - BitbucketPersonalAccessToken getPersonalAccessToken(String userSlug, Long tokenId) + BitbucketPersonalAccessToken getPersonalAccessToken(Long tokenId) throws ScmItemNotFoundException, ScmUnauthorizedException, ScmCommunicationException; } diff --git a/wsmaster/che-core-api-factory-bitbucket-server/src/main/java/org/eclipse/che/api/factory/server/bitbucket/server/NoopBitbucketServerApiClient.java b/wsmaster/che-core-api-factory-bitbucket-server/src/main/java/org/eclipse/che/api/factory/server/bitbucket/server/NoopBitbucketServerApiClient.java index d058308a2d..600ecc3f1c 100644 --- a/wsmaster/che-core-api-factory-bitbucket-server/src/main/java/org/eclipse/che/api/factory/server/bitbucket/server/NoopBitbucketServerApiClient.java +++ b/wsmaster/che-core-api-factory-bitbucket-server/src/main/java/org/eclipse/che/api/factory/server/bitbucket/server/NoopBitbucketServerApiClient.java @@ -17,8 +17,6 @@ import org.eclipse.che.api.factory.server.scm.exception.ScmBadRequestException; import org.eclipse.che.api.factory.server.scm.exception.ScmCommunicationException; import org.eclipse.che.api.factory.server.scm.exception.ScmItemNotFoundException; import org.eclipse.che.api.factory.server.scm.exception.ScmUnauthorizedException; -import org.eclipse.che.commons.annotation.Nullable; -import org.eclipse.che.commons.subject.Subject; /** * Implementation of @{@link BitbucketServerApiClient} that is going to be deployed in container in @@ -31,14 +29,14 @@ public class NoopBitbucketServerApiClient implements BitbucketServerApiClient { } @Override - public BitbucketUser getUser(Subject cheUser) - throws ScmUnauthorizedException, ScmCommunicationException { + public BitbucketUser getUser(String token) + throws ScmItemNotFoundException, ScmUnauthorizedException, ScmCommunicationException { throw new RuntimeException( "The fallback noop api client cannot be used for real operation. Make sure Bitbucket OAuth1 is properly configured."); } @Override - public BitbucketUser getUser(String slug, @Nullable String token) + public BitbucketUser getUser() throws ScmItemNotFoundException, ScmUnauthorizedException, ScmCommunicationException { throw new RuntimeException( "The fallback noop api client cannot be used for real operation. Make sure Bitbucket OAuth1 is properly configured."); @@ -59,7 +57,7 @@ public class NoopBitbucketServerApiClient implements BitbucketServerApiClient { } @Override - public void deletePersonalAccessTokens(String userSlug, Long tokenId) + public void deletePersonalAccessTokens(Long tokenId) throws ScmItemNotFoundException, ScmUnauthorizedException, ScmCommunicationException { throw new RuntimeException( "The fallback noop api client cannot be used for real operation. Make sure Bitbucket OAuth1 is properly configured."); @@ -67,19 +65,19 @@ public class NoopBitbucketServerApiClient implements BitbucketServerApiClient { @Override public BitbucketPersonalAccessToken createPersonalAccessTokens( - String userSlug, String tokenName, Set permissions) + String tokenName, Set permissions) throws ScmBadRequestException, ScmUnauthorizedException, ScmCommunicationException { throw new RuntimeException("Invalid usage of BitbucketServerApi"); } @Override - public List getPersonalAccessTokens(String userSlug) + public List getPersonalAccessTokens() throws ScmItemNotFoundException, ScmUnauthorizedException, ScmCommunicationException { throw new RuntimeException("Invalid usage of BitbucketServerApi"); } @Override - public BitbucketPersonalAccessToken getPersonalAccessToken(String userSlug, Long tokenId) + public BitbucketPersonalAccessToken getPersonalAccessToken(Long tokenId) throws ScmItemNotFoundException, ScmUnauthorizedException, ScmCommunicationException { throw new RuntimeException("Invalid usage of BitbucketServerApi"); } diff --git a/wsmaster/che-core-api-factory-bitbucket-server/src/test/java/org/eclipse/che/api/factory/server/bitbucket/BitbucketServerPersonalAccessTokenFetcherTest.java b/wsmaster/che-core-api-factory-bitbucket-server/src/test/java/org/eclipse/che/api/factory/server/bitbucket/BitbucketServerPersonalAccessTokenFetcherTest.java index ad2843634d..bff6ca6f30 100644 --- a/wsmaster/che-core-api-factory-bitbucket-server/src/test/java/org/eclipse/che/api/factory/server/bitbucket/BitbucketServerPersonalAccessTokenFetcherTest.java +++ b/wsmaster/che-core-api-factory-bitbucket-server/src/test/java/org/eclipse/che/api/factory/server/bitbucket/BitbucketServerPersonalAccessTokenFetcherTest.java @@ -14,7 +14,6 @@ package org.eclipse.che.api.factory.server.bitbucket; import static java.lang.String.valueOf; import static org.mockito.ArgumentMatchers.eq; import static org.mockito.Mockito.doThrow; -import static org.mockito.Mockito.mock; import static org.mockito.Mockito.verify; import static org.mockito.Mockito.when; import static org.testng.Assert.assertEquals; @@ -29,7 +28,6 @@ import java.net.MalformedURLException; import java.net.URL; import java.util.Collections; import java.util.Optional; -import org.eclipse.che.api.auth.shared.dto.OAuthToken; import org.eclipse.che.api.core.BadRequestException; import org.eclipse.che.api.core.ConflictException; import org.eclipse.che.api.core.ForbiddenException; @@ -40,11 +38,13 @@ import org.eclipse.che.api.factory.server.bitbucket.server.BitbucketPersonalAcce import org.eclipse.che.api.factory.server.bitbucket.server.BitbucketServerApiClient; import org.eclipse.che.api.factory.server.bitbucket.server.BitbucketUser; import org.eclipse.che.api.factory.server.scm.PersonalAccessToken; +import org.eclipse.che.api.factory.server.scm.PersonalAccessTokenParams; import org.eclipse.che.api.factory.server.scm.exception.ScmBadRequestException; import org.eclipse.che.api.factory.server.scm.exception.ScmCommunicationException; import org.eclipse.che.api.factory.server.scm.exception.ScmItemNotFoundException; import org.eclipse.che.api.factory.server.scm.exception.ScmUnauthorizedException; import org.eclipse.che.commons.env.EnvironmentContext; +import org.eclipse.che.commons.lang.Pair; import org.eclipse.che.commons.subject.Subject; import org.eclipse.che.commons.subject.SubjectImpl; import org.eclipse.che.security.oauth.OAuthAPI; @@ -61,7 +61,7 @@ public class BitbucketServerPersonalAccessTokenFetcherTest { String someBitbucketURL = "https://some.bitbucketserver.com"; Subject subject; @Mock BitbucketServerApiClient bitbucketServerApiClient; - @Mock PersonalAccessToken personalAccessToken; + @Mock PersonalAccessTokenParams personalAccessTokenParams; @Mock OAuthAPI oAuthAPI; BitbucketUser bitbucketUser; BitbucketServerPersonalAccessTokenFetcher fetcher; @@ -132,7 +132,7 @@ public class BitbucketServerPersonalAccessTokenFetcherTest { throws ScmUnauthorizedException, ScmCommunicationException, ScmItemNotFoundException { // given when(bitbucketServerApiClient.isConnected(eq(someNotBitbucketURL))).thenReturn(true); - doThrow(exception).when(bitbucketServerApiClient).getUser(eq(subject)); + doThrow(exception).when(bitbucketServerApiClient).getUser(); // when fetcher.fetchPersonalAccessToken(subject, someNotBitbucketURL); } @@ -143,12 +143,10 @@ public class BitbucketServerPersonalAccessTokenFetcherTest { ScmBadRequestException { // given when(bitbucketServerApiClient.isConnected(eq(someBitbucketURL))).thenReturn(true); - when(bitbucketServerApiClient.getUser(eq(subject))).thenReturn(bitbucketUser); - when(bitbucketServerApiClient.getPersonalAccessTokens(eq(bitbucketUser.getSlug()))) - .thenReturn(Collections.emptyList()); + when(bitbucketServerApiClient.getUser()).thenReturn(bitbucketUser); + when(bitbucketServerApiClient.getPersonalAccessTokens()).thenReturn(Collections.emptyList()); when(bitbucketServerApiClient.createPersonalAccessTokens( - eq(bitbucketUser.getSlug()), eq("che-token--"), eq(ImmutableSet.of("PROJECT_WRITE", "REPO_WRITE")))) .thenReturn(bitbucketPersonalAccessToken); @@ -159,7 +157,6 @@ public class BitbucketServerPersonalAccessTokenFetcherTest { assertEquals(result.getScmProviderUrl(), someBitbucketURL); assertEquals(result.getCheUserId(), subject.getUserId()); assertEquals(result.getScmOrganization(), bitbucketUser.getName()); - assertEquals(result.getScmUserName(), bitbucketUser.getSlug()); assertEquals(result.getScmTokenId(), valueOf(bitbucketPersonalAccessToken.getId())); assertEquals(result.getToken(), bitbucketPersonalAccessToken.getToken()); } @@ -169,11 +166,10 @@ public class BitbucketServerPersonalAccessTokenFetcherTest { throws ScmUnauthorizedException, ScmCommunicationException, ScmItemNotFoundException, ScmBadRequestException { when(bitbucketServerApiClient.isConnected(eq(someBitbucketURL))).thenReturn(true); - when(bitbucketServerApiClient.getUser(eq(subject))).thenReturn(bitbucketUser); - when(bitbucketServerApiClient.getPersonalAccessTokens(eq(bitbucketUser.getSlug()))) + when(bitbucketServerApiClient.getUser()).thenReturn(bitbucketUser); + when(bitbucketServerApiClient.getPersonalAccessTokens()) .thenReturn(ImmutableList.of(bitbucketPersonalAccessToken, bitbucketPersonalAccessToken2)); when(bitbucketServerApiClient.createPersonalAccessTokens( - eq(bitbucketUser.getSlug()), eq("che-token--"), eq(ImmutableSet.of("PROJECT_WRITE", "REPO_WRITE")))) .thenReturn(bitbucketPersonalAccessToken3); @@ -182,11 +178,9 @@ public class BitbucketServerPersonalAccessTokenFetcherTest { // then assertNotNull(result); verify(bitbucketServerApiClient) - .deletePersonalAccessTokens( - eq(bitbucketUser.getSlug()), eq(bitbucketPersonalAccessToken.getId())); + .deletePersonalAccessTokens(eq(bitbucketPersonalAccessToken.getId())); verify(bitbucketServerApiClient) - .deletePersonalAccessTokens( - eq(bitbucketUser.getSlug()), eq(bitbucketPersonalAccessToken2.getId())); + .deletePersonalAccessTokens(eq(bitbucketPersonalAccessToken2.getId())); } @Test(expectedExceptions = {ScmCommunicationException.class}) @@ -195,13 +189,11 @@ public class BitbucketServerPersonalAccessTokenFetcherTest { ScmBadRequestException { // given when(bitbucketServerApiClient.isConnected(eq(someBitbucketURL))).thenReturn(true); - when(bitbucketServerApiClient.getUser(eq(subject))).thenReturn(bitbucketUser); - when(bitbucketServerApiClient.getPersonalAccessTokens(eq(bitbucketUser.getSlug()))) - .thenReturn(Collections.emptyList()); + when(bitbucketServerApiClient.getUser()).thenReturn(bitbucketUser); + when(bitbucketServerApiClient.getPersonalAccessTokens()).thenReturn(Collections.emptyList()); doThrow(ScmBadRequestException.class) .when(bitbucketServerApiClient) .createPersonalAccessTokens( - eq(bitbucketUser.getSlug()), eq("che-token--"), eq(ImmutableSet.of("PROJECT_WRITE", "REPO_WRITE"))); // when @@ -215,11 +207,11 @@ public class BitbucketServerPersonalAccessTokenFetcherTest { ServerException, ConflictException, UnauthorizedException, NotFoundException, BadRequestException { // given - when(oAuthAPI.getToken(eq("bitbucket"))).thenReturn(mock(OAuthToken.class)); - when(personalAccessToken.getScmProviderUrl()).thenReturn(someNotBitbucketURL); + when(personalAccessTokenParams.getToken()).thenReturn("token"); + when(personalAccessTokenParams.getScmProviderUrl()).thenReturn(someNotBitbucketURL); when(bitbucketServerApiClient.isConnected(eq(someNotBitbucketURL))).thenReturn(false); // when - Optional result = fetcher.isValid(personalAccessToken); + Optional> result = fetcher.isValid(personalAccessTokenParams); // then assertTrue(result.isEmpty()); } @@ -228,21 +220,17 @@ public class BitbucketServerPersonalAccessTokenFetcherTest { public void shouldBeAbleToValidateToken() throws ScmUnauthorizedException, ScmCommunicationException, ScmItemNotFoundException { // given - when(personalAccessToken.getScmProviderUrl()).thenReturn(someBitbucketURL); - when(personalAccessToken.getScmTokenId()) + when(personalAccessTokenParams.getScmProviderUrl()).thenReturn(someBitbucketURL); + when(personalAccessTokenParams.getScmTokenId()) .thenReturn(Long.toString(bitbucketPersonalAccessToken.getId())); - when(personalAccessToken.getScmUserName()) - .thenReturn((bitbucketPersonalAccessToken.getUser().getSlug())); when(bitbucketServerApiClient.isConnected(eq(someBitbucketURL))).thenReturn(true); - when(bitbucketServerApiClient.getPersonalAccessToken( - eq(bitbucketPersonalAccessToken.getUser().getSlug()), - eq(bitbucketPersonalAccessToken.getId()))) + when(bitbucketServerApiClient.getPersonalAccessToken(eq(bitbucketPersonalAccessToken.getId()))) .thenReturn(bitbucketPersonalAccessToken); // when - Optional result = fetcher.isValid(personalAccessToken); + Optional> result = fetcher.isValid(personalAccessTokenParams); // then assertFalse(result.isEmpty()); - assertTrue(result.get()); + assertTrue(result.get().first); } @DataProvider diff --git a/wsmaster/che-core-api-factory-bitbucket-server/src/test/java/org/eclipse/che/api/factory/server/bitbucket/BitbucketServerURLParserTest.java b/wsmaster/che-core-api-factory-bitbucket-server/src/test/java/org/eclipse/che/api/factory/server/bitbucket/BitbucketServerURLParserTest.java index 31c67aa0b6..4af35e693f 100644 --- a/wsmaster/che-core-api-factory-bitbucket-server/src/test/java/org/eclipse/che/api/factory/server/bitbucket/BitbucketServerURLParserTest.java +++ b/wsmaster/che-core-api-factory-bitbucket-server/src/test/java/org/eclipse/che/api/factory/server/bitbucket/BitbucketServerURLParserTest.java @@ -99,7 +99,8 @@ public class BitbucketServerURLParserTest { null, devfileFilenamesProvider, oAuthAPI, mock(PersonalAccessTokenManager.class)); String url = wireMockServer.url("/users/user/repos/repo"); stubFor( - get(urlEqualTo("/rest/access-tokens/1.0/users/0")).willReturn(aResponse().withStatus(401))); + get(urlEqualTo("/plugins/servlet/applinks/whoami")) + .willReturn(aResponse().withStatus(401))); // when boolean result = bitbucketURLParser.isValid(url); @@ -113,7 +114,8 @@ public class BitbucketServerURLParserTest { // given String url = wireMockServer.url("/users/user/repos/repo"); stubFor( - get(urlEqualTo("/rest/access-tokens/1.0/users/0")).willReturn(aResponse().withStatus(500))); + get(urlEqualTo("/plugins/servlet/applinks/whoami")) + .willReturn(aResponse().withStatus(500))); // when boolean result = bitbucketURLParser.isValid(url); diff --git a/wsmaster/che-core-api-factory-bitbucket-server/src/test/java/org/eclipse/che/api/factory/server/bitbucket/BitbucketServerUserDataFetcherTest.java b/wsmaster/che-core-api-factory-bitbucket-server/src/test/java/org/eclipse/che/api/factory/server/bitbucket/BitbucketServerUserDataFetcherTest.java index c4654c3be8..afca9935ab 100644 --- a/wsmaster/che-core-api-factory-bitbucket-server/src/test/java/org/eclipse/che/api/factory/server/bitbucket/BitbucketServerUserDataFetcherTest.java +++ b/wsmaster/che-core-api-factory-bitbucket-server/src/test/java/org/eclipse/che/api/factory/server/bitbucket/BitbucketServerUserDataFetcherTest.java @@ -64,7 +64,7 @@ public class BitbucketServerUserDataFetcherTest { ScmBadRequestException, ScmConfigurationPersistenceException { // given when(bitbucketServerApiClient.isConnected(eq(someBitbucketURL))).thenReturn(true); - when(bitbucketServerApiClient.getUser(eq(subject))).thenReturn(bitbucketUser); + when(bitbucketServerApiClient.getUser()).thenReturn(bitbucketUser); // when GitUserData gitUserData = fetcher.fetchGitUserData(); // then diff --git a/wsmaster/che-core-api-factory-bitbucket-server/src/test/java/org/eclipse/che/api/factory/server/bitbucket/HttpBitbucketServerApiClientTest.java b/wsmaster/che-core-api-factory-bitbucket-server/src/test/java/org/eclipse/che/api/factory/server/bitbucket/HttpBitbucketServerApiClientTest.java index cc19888e62..e0ff3f415d 100644 --- a/wsmaster/che-core-api-factory-bitbucket-server/src/test/java/org/eclipse/che/api/factory/server/bitbucket/HttpBitbucketServerApiClientTest.java +++ b/wsmaster/che-core-api-factory-bitbucket-server/src/test/java/org/eclipse/che/api/factory/server/bitbucket/HttpBitbucketServerApiClientTest.java @@ -12,6 +12,7 @@ package org.eclipse.che.api.factory.server.bitbucket; import static com.github.tomakehurst.wiremock.client.WireMock.aResponse; +import static com.github.tomakehurst.wiremock.client.WireMock.delete; import static com.github.tomakehurst.wiremock.client.WireMock.equalTo; import static com.github.tomakehurst.wiremock.client.WireMock.get; import static com.github.tomakehurst.wiremock.client.WireMock.notFound; @@ -24,6 +25,7 @@ import static com.github.tomakehurst.wiremock.client.WireMock.urlPathEqualTo; import static com.github.tomakehurst.wiremock.core.WireMockConfiguration.wireMockConfig; import static org.mockito.ArgumentMatchers.eq; import static org.mockito.Mockito.mock; +import static org.mockito.Mockito.times; import static org.mockito.Mockito.verify; import static org.mockito.Mockito.when; import static org.testng.Assert.assertEquals; @@ -99,6 +101,9 @@ public class HttpBitbucketServerApiClientTest { }, oAuthAPI, apiEndpoint); + stubFor( + get(urlEqualTo("/plugins/servlet/applinks/whoami")) + .willReturn(aResponse().withBody("ksmster"))); } @AfterMethod @@ -117,7 +122,7 @@ public class HttpBitbucketServerApiClientTest { .withHeader("Content-Type", "application/json; charset=utf-8") .withBodyFile("bitbucket/rest/api/1.0/users/ksmster/response.json"))); - BitbucketUser user = bitbucketServer.getUser("ksmster", null); + BitbucketUser user = bitbucketServer.getUser(); assertNotNull(user); } @@ -215,7 +220,7 @@ public class HttpBitbucketServerApiClientTest { .withBodyFile("bitbucket/rest/access-tokens/1.0/users/ksmster/response.json"))); List page = - bitbucketServer.getPersonalAccessTokens("ksmster").stream() + bitbucketServer.getPersonalAccessTokens().stream() .map(BitbucketPersonalAccessToken::getName) .collect(Collectors.toList()); assertEquals(page, ImmutableList.of("che", "t2")); @@ -223,7 +228,8 @@ public class HttpBitbucketServerApiClientTest { @Test public void shouldBeAbleToCreatePAT() - throws ScmCommunicationException, ScmBadRequestException, ScmUnauthorizedException { + throws ScmCommunicationException, ScmBadRequestException, ScmUnauthorizedException, + ScmItemNotFoundException { // given stubFor( @@ -238,12 +244,28 @@ public class HttpBitbucketServerApiClientTest { // when BitbucketPersonalAccessToken result = bitbucketServer.createPersonalAccessTokens( - "ksmster", "myToKen", ImmutableSet.of("PROJECT_WRITE", "REPO_WRITE")); + "myToKen", ImmutableSet.of("PROJECT_WRITE", "REPO_WRITE")); // then assertNotNull(result); assertEquals(result.getToken(), "MTU4OTEwNTMyOTA5Ohc88HcY8k7gWOzl2mP5TtdtY5Qs"); } + @Test + public void shouldBeAbleToDeletePAT() + throws ScmCommunicationException, ScmUnauthorizedException, ScmItemNotFoundException { + + // given + stubFor( + delete(urlPathEqualTo("/rest/access-tokens/1.0/users/ksmster/5")) + .withHeader(HttpHeaders.AUTHORIZATION, equalTo(AUTHORIZATION_TOKEN)) + .withHeader(HttpHeaders.ACCEPT, equalTo(MediaType.APPLICATION_JSON)) + .withHeader(HttpHeaders.CONTENT_TYPE, equalTo(MediaType.APPLICATION_JSON)) + .willReturn(aResponse().withStatus(204))); + + // when + bitbucketServer.deletePersonalAccessTokens(5L); + } + @Test public void shouldBeAbleToGetExistedPAT() throws ScmCommunicationException, ScmUnauthorizedException, ScmItemNotFoundException { @@ -257,7 +279,7 @@ public class HttpBitbucketServerApiClientTest { ok().withBodyFile("bitbucket/rest/access-tokens/1.0/users/ksmster/newtoken.json"))); // when - BitbucketPersonalAccessToken result = bitbucketServer.getPersonalAccessToken("ksmster", 5L); + BitbucketPersonalAccessToken result = bitbucketServer.getPersonalAccessToken(5L); // then assertNotNull(result); assertEquals(result.getToken(), "MTU4OTEwNTMyOTA5Ohc88HcY8k7gWOzl2mP5TtdtY5Qs"); @@ -275,7 +297,7 @@ public class HttpBitbucketServerApiClientTest { .willReturn(notFound())); // when - bitbucketServer.getPersonalAccessToken("ksmster", 5L); + bitbucketServer.getPersonalAccessToken(5L); } @Test(expectedExceptions = ScmUnauthorizedException.class) @@ -290,7 +312,7 @@ public class HttpBitbucketServerApiClientTest { .willReturn(unauthorized())); // when - bitbucketServer.getPersonalAccessToken("ksmster", 5L); + bitbucketServer.getPersonalAccessToken(5L); } @Test( @@ -309,7 +331,7 @@ public class HttpBitbucketServerApiClientTest { wireMockServer.url("/"), new NoopOAuthAuthenticator(), oAuthAPI, apiEndpoint); // when - localServer.getPersonalAccessToken("ksmster", 5L); + localServer.getPersonalAccessToken(5L); } @Test @@ -325,7 +347,7 @@ public class HttpBitbucketServerApiClientTest { new HttpBitbucketServerApiClient( wireMockServer.url("/"), new NoopOAuthAuthenticator(), oAuthAPI, apiEndpoint); stubFor( - get(urlEqualTo("/rest/api/1.0/users/user")) + get(urlEqualTo("/rest/api/1.0/users/ksmster")) .withHeader(HttpHeaders.AUTHORIZATION, equalTo("Bearer token")) .willReturn( aResponse() @@ -333,9 +355,9 @@ public class HttpBitbucketServerApiClientTest { .withBodyFile("bitbucket/rest/api/1.0/users/ksmster/response.json"))); // when - bitbucketServer.getUser("user", null); + bitbucketServer.getUser(); // then - verify(oAuthAPI).getToken(eq("bitbucket")); + verify(oAuthAPI, times(2)).getToken(eq("bitbucket")); } } diff --git a/wsmaster/che-core-api-factory-bitbucket/src/main/java/org/eclipse/che/api/factory/server/bitbucket/BitbucketApiClient.java b/wsmaster/che-core-api-factory-bitbucket/src/main/java/org/eclipse/che/api/factory/server/bitbucket/BitbucketApiClient.java index b0d025d7c5..1b0d72c2a0 100644 --- a/wsmaster/che-core-api-factory-bitbucket/src/main/java/org/eclipse/che/api/factory/server/bitbucket/BitbucketApiClient.java +++ b/wsmaster/che-core-api-factory-bitbucket/src/main/java/org/eclipse/che/api/factory/server/bitbucket/BitbucketApiClient.java @@ -37,6 +37,7 @@ import java.util.function.Function; import org.eclipse.che.api.factory.server.scm.exception.ScmBadRequestException; import org.eclipse.che.api.factory.server.scm.exception.ScmCommunicationException; import org.eclipse.che.api.factory.server.scm.exception.ScmItemNotFoundException; +import org.eclipse.che.commons.lang.Pair; import org.eclipse.che.commons.lang.concurrent.LoggingUncaughtExceptionHandler; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -166,15 +167,13 @@ public class BitbucketApiClient { } /** - * Returns the scopes of the OAuth token. + * Returns a pair of the username and array of scopes of the OAuth token. * * @param authenticationToken The OAuth token to inspect. - * @return Array of scopes from the supplied token, empty array if no scope. - * @throws ScmItemNotFoundException - * @throws ScmCommunicationException - * @throws ScmBadRequestException + * @return A pair of the username and array of scopes from the supplied token, empty array if no + * scopes. */ - public String[] getTokenScopes(String authenticationToken) + public Pair getTokenScopes(String authenticationToken) throws ScmItemNotFoundException, ScmCommunicationException, ScmBadRequestException { final URI uri = apiServerUrl.resolve("user"); HttpRequest request = buildBitbucketApiRequest(uri, authenticationToken); @@ -183,12 +182,22 @@ public class BitbucketApiClient { httpClient, request, response -> { - Optional scopes = response.headers().firstValue(BITBUCKET_OAUTH_SCOPES_HEADER); - return Splitter.on(',') - .trimResults() - .omitEmptyStrings() - .splitToList(scopes.orElse("")) - .toArray(String[]::new); + try { + String result = + CharStreams.toString(new InputStreamReader(response.body(), Charsets.UTF_8)); + BitbucketUser user = OBJECT_MAPPER.readValue(result, BitbucketUser.class); + Optional responseScopes = + response.headers().firstValue(BITBUCKET_OAUTH_SCOPES_HEADER); + String[] scopes = + Splitter.on(',') + .trimResults() + .omitEmptyStrings() + .splitToList(responseScopes.orElse("")) + .toArray(String[]::new); + return Pair.of(user.getName(), scopes); + } catch (IOException e) { + throw new UncheckedIOException(e); + } }); } diff --git a/wsmaster/che-core-api-factory-bitbucket/src/main/java/org/eclipse/che/api/factory/server/bitbucket/BitbucketPersonalAccessTokenFetcher.java b/wsmaster/che-core-api-factory-bitbucket/src/main/java/org/eclipse/che/api/factory/server/bitbucket/BitbucketPersonalAccessTokenFetcher.java index 046bce6a7d..e9e6835fc7 100644 --- a/wsmaster/che-core-api-factory-bitbucket/src/main/java/org/eclipse/che/api/factory/server/bitbucket/BitbucketPersonalAccessTokenFetcher.java +++ b/wsmaster/che-core-api-factory-bitbucket/src/main/java/org/eclipse/che/api/factory/server/bitbucket/BitbucketPersonalAccessTokenFetcher.java @@ -24,12 +24,14 @@ import org.eclipse.che.api.core.ServerException; import org.eclipse.che.api.core.UnauthorizedException; import org.eclipse.che.api.factory.server.scm.PersonalAccessToken; import org.eclipse.che.api.factory.server.scm.PersonalAccessTokenFetcher; +import org.eclipse.che.api.factory.server.scm.PersonalAccessTokenParams; import org.eclipse.che.api.factory.server.scm.exception.ScmBadRequestException; import org.eclipse.che.api.factory.server.scm.exception.ScmCommunicationException; import org.eclipse.che.api.factory.server.scm.exception.ScmItemNotFoundException; import org.eclipse.che.api.factory.server.scm.exception.ScmUnauthorizedException; import org.eclipse.che.api.factory.server.scm.exception.UnknownScmProviderException; import org.eclipse.che.commons.lang.NameGenerator; +import org.eclipse.che.commons.lang.Pair; import org.eclipse.che.commons.subject.Subject; import org.eclipse.che.security.oauth.OAuthAPI; import org.slf4j.Logger; @@ -83,30 +85,31 @@ public class BitbucketPersonalAccessTokenFetcher implements PersonalAccessTokenF } try { oAuthToken = oAuthAPI.getToken(OAUTH_PROVIDER_NAME); - // Find the user associated to the OAuth token by querying the Bitbucket API. - BitbucketUser user = bitbucketApiClient.getUser(oAuthToken.getToken()); - PersonalAccessToken token = - new PersonalAccessToken( - scmServerUrl, - cheSubject.getUserId(), - user.getName(), - NameGenerator.generate(OAUTH_PROVIDER_NAME, 5), - NameGenerator.generate("id-", 5), - oAuthToken.getToken()); - Optional valid = isValid(token); + String tokenName = NameGenerator.generate(OAUTH_PROVIDER_NAME, 5); + String tokenId = NameGenerator.generate("id-", 5); + Optional> valid = + isValid( + new PersonalAccessTokenParams( + scmServerUrl, tokenName, tokenId, oAuthToken.getToken(), null)); if (valid.isEmpty()) { throw new ScmCommunicationException( "Unable to verify if current token is a valid Bitbucket token. Token's scm-url needs to be '" + BitbucketApiClient.BITBUCKET_SERVER + "' and was '" - + token.getScmProviderUrl() + + scmServerUrl + "'"); - } else if (!valid.get()) { + } else if (!valid.get().first) { throw new ScmCommunicationException( "Current token doesn't have the necessary privileges. Please make sure Che app scopes are correct and containing at least: " + DEFAULT_TOKEN_SCOPE); } - return token; + return new PersonalAccessToken( + scmServerUrl, + cheSubject.getUserId(), + valid.get().second, + tokenName, + tokenId, + oAuthToken.getToken()); } catch (UnauthorizedException e) { throw new ScmUnauthorizedException( cheSubject.getUserName() @@ -118,12 +121,7 @@ public class BitbucketPersonalAccessTokenFetcher implements PersonalAccessTokenF getLocalAuthenticateUrl()); } catch (NotFoundException nfe) { throw new UnknownScmProviderException(nfe.getMessage(), scmServerUrl); - } catch (ServerException - | ForbiddenException - | BadRequestException - | ScmItemNotFoundException - | ScmBadRequestException - | ConflictException e) { + } catch (ServerException | ForbiddenException | BadRequestException | ConflictException e) { LOG.error(e.getMessage()); throw new ScmCommunicationException(e.getMessage(), e); } @@ -137,13 +135,33 @@ public class BitbucketPersonalAccessTokenFetcher implements PersonalAccessTokenF } try { - String[] scopes = bitbucketApiClient.getTokenScopes(personalAccessToken.getToken()); + String[] scopes = bitbucketApiClient.getTokenScopes(personalAccessToken.getToken()).second; return Optional.of(Sets.newHashSet(scopes).contains(DEFAULT_TOKEN_SCOPE)); } catch (ScmItemNotFoundException | ScmCommunicationException | ScmBadRequestException e) { return Optional.of(Boolean.FALSE); } } + @Override + public Optional> isValid(PersonalAccessTokenParams params) { + if (!bitbucketApiClient.isConnected(params.getScmProviderUrl())) { + LOG.debug("not a valid url {} for current fetcher ", params.getScmProviderUrl()); + return Optional.empty(); + } + + try { + Pair pair = bitbucketApiClient.getTokenScopes(params.getToken()); + return Optional.of( + Pair.of( + Sets.newHashSet(pair.second).contains(DEFAULT_TOKEN_SCOPE) + ? Boolean.TRUE + : Boolean.FALSE, + pair.first)); + } catch (ScmItemNotFoundException | ScmCommunicationException | ScmBadRequestException e) { + return Optional.empty(); + } + } + private String getLocalAuthenticateUrl() { return apiEndpoint + "/oauth/authenticate?oauth_provider=" diff --git a/wsmaster/che-core-api-factory-bitbucket/src/test/java/org/eclipse/che/api/factory/server/bitbucket/BitbucketApiClientTest.java b/wsmaster/che-core-api-factory-bitbucket/src/test/java/org/eclipse/che/api/factory/server/bitbucket/BitbucketApiClientTest.java index f2ddfca57b..41ec29586c 100644 --- a/wsmaster/che-core-api-factory-bitbucket/src/test/java/org/eclipse/che/api/factory/server/bitbucket/BitbucketApiClientTest.java +++ b/wsmaster/che-core-api-factory-bitbucket/src/test/java/org/eclipse/che/api/factory/server/bitbucket/BitbucketApiClientTest.java @@ -90,7 +90,7 @@ public class BitbucketApiClientTest { BitbucketApiClient.BITBUCKET_OAUTH_SCOPES_HEADER, "repository:write") .withBodyFile("bitbucket/rest/user/response.json"))); - String[] scopes = client.getTokenScopes("token1"); + String[] scopes = client.getTokenScopes("token1").second; String[] expectedScopes = {"repository:write"}; assertNotNull(scopes, "Bitbucket API should have returned a non-null scope array"); assertEqualsNoOrder( @@ -107,7 +107,7 @@ public class BitbucketApiClientTest { .withHeader("Content-Type", "application/json; charset=utf-8") .withBodyFile("bitbucket/rest/user/response.json"))); - String[] scopes = client.getTokenScopes("token1"); + String[] scopes = client.getTokenScopes("token1").second; assertNotNull(scopes, "Bitbucket API should have returned a non-null scope array"); assertEquals( scopes.length, @@ -128,7 +128,7 @@ public class BitbucketApiClientTest { .withHeader(BitbucketApiClient.BITBUCKET_OAUTH_SCOPES_HEADER, "") .withBodyFile("bitbucket/rest/user/response.json"))); - String[] scopes = client.getTokenScopes("token1"); + String[] scopes = client.getTokenScopes("token1").second; assertNotNull(scopes, "Bitbucket API should have returned a non-null scope array"); assertEquals( scopes.length, diff --git a/wsmaster/che-core-api-factory-bitbucket/src/test/java/org/eclipse/che/api/factory/server/bitbucket/BitbucketPersonalAccessTokenFetcherTest.java b/wsmaster/che-core-api-factory-bitbucket/src/test/java/org/eclipse/che/api/factory/server/bitbucket/BitbucketPersonalAccessTokenFetcherTest.java index 8cd3a1b382..49d06e00fa 100644 --- a/wsmaster/che-core-api-factory-bitbucket/src/test/java/org/eclipse/che/api/factory/server/bitbucket/BitbucketPersonalAccessTokenFetcherTest.java +++ b/wsmaster/che-core-api-factory-bitbucket/src/test/java/org/eclipse/che/api/factory/server/bitbucket/BitbucketPersonalAccessTokenFetcherTest.java @@ -28,11 +28,14 @@ import com.github.tomakehurst.wiremock.WireMockServer; import com.github.tomakehurst.wiremock.client.WireMock; import com.github.tomakehurst.wiremock.common.Slf4jNotifier; import com.google.common.net.HttpHeaders; +import java.util.Optional; import org.eclipse.che.api.auth.shared.dto.OAuthToken; import org.eclipse.che.api.core.UnauthorizedException; import org.eclipse.che.api.factory.server.scm.PersonalAccessToken; +import org.eclipse.che.api.factory.server.scm.PersonalAccessTokenParams; import org.eclipse.che.api.factory.server.scm.exception.ScmCommunicationException; import org.eclipse.che.api.factory.server.scm.exception.ScmUnauthorizedException; +import org.eclipse.che.commons.lang.Pair; import org.eclipse.che.commons.subject.Subject; import org.eclipse.che.commons.subject.SubjectImpl; import org.eclipse.che.security.oauth.OAuthAPI; @@ -82,16 +85,11 @@ public class BitbucketPersonalAccessTokenFetcherTest { aResponse() .withHeader("Content-Type", "application/json; charset=utf-8") .withBodyFile("bitbucket/rest/user/response.json"))); - PersonalAccessToken personalAccessToken = - new PersonalAccessToken( - "https://bitbucket.org/", - "cheUserId", - "scmUserName", - "scmTokenName", - "scmTokenId", - bitbucketOauthToken); + PersonalAccessTokenParams personalAccessTokenParams = + new PersonalAccessTokenParams( + "https://bitbucket.org/", "scmTokenName", "scmTokenId", bitbucketOauthToken, null); assertTrue( - bitbucketPersonalAccessTokenFetcher.isValid(personalAccessToken).isEmpty(), + bitbucketPersonalAccessTokenFetcher.isValid(personalAccessTokenParams).isEmpty(), "Should not validate SCM server with trailing /"); } @@ -163,16 +161,13 @@ public class BitbucketPersonalAccessTokenFetcherTest { BitbucketApiClient.BITBUCKET_OAUTH_SCOPES_HEADER, "repository:write") .withBodyFile("bitbucket/rest/user/response.json"))); - PersonalAccessToken token = - new PersonalAccessToken( - "https://bitbucket.org", - "cheUser", - "username", - "token-name", - "tid-23434", - bitbucketOauthToken); + PersonalAccessTokenParams params = + new PersonalAccessTokenParams( + "https://bitbucket.org", "params-name", "tid-23434", bitbucketOauthToken, null); - assertTrue(bitbucketPersonalAccessTokenFetcher.isValid(token).get()); + Optional> valid = bitbucketPersonalAccessTokenFetcher.isValid(params); + assertTrue(valid.isPresent()); + assertTrue(valid.get().first); } @Test @@ -187,31 +182,31 @@ public class BitbucketPersonalAccessTokenFetcherTest { BitbucketApiClient.BITBUCKET_OAUTH_SCOPES_HEADER, "repository:write") .withBodyFile("bitbucket/rest/user/response.json"))); - PersonalAccessToken token = - new PersonalAccessToken( + PersonalAccessTokenParams params = + new PersonalAccessTokenParams( "https://bitbucket.org", - "cheUser", - "username", - OAUTH_2_PREFIX + "-token-name", + OAUTH_2_PREFIX + "-params-name", "tid-23434", - bitbucketOauthToken); + bitbucketOauthToken, + null); - assertTrue(bitbucketPersonalAccessTokenFetcher.isValid(token).get()); + Optional> valid = bitbucketPersonalAccessTokenFetcher.isValid(params); + assertTrue(valid.isPresent()); + assertTrue(valid.get().first); } @Test public void shouldNotValidateExpiredOauthToken() throws Exception { stubFor(get(urlEqualTo("/user")).willReturn(aResponse().withStatus(HTTP_FORBIDDEN))); - PersonalAccessToken token = - new PersonalAccessToken( + PersonalAccessTokenParams params = + new PersonalAccessTokenParams( "https://bitbucket.org", - "cheUser", - "username", OAUTH_2_PREFIX + "-token-name", "tid-23434", - bitbucketOauthToken); + bitbucketOauthToken, + null); - assertFalse(bitbucketPersonalAccessTokenFetcher.isValid(token).get()); + assertFalse(bitbucketPersonalAccessTokenFetcher.isValid(params).isPresent()); } } diff --git a/wsmaster/che-core-api-factory-github/src/main/java/org/eclipse/che/api/factory/server/github/GithubApiClient.java b/wsmaster/che-core-api-factory-github/src/main/java/org/eclipse/che/api/factory/server/github/GithubApiClient.java index 67d14525e8..b503da409d 100644 --- a/wsmaster/che-core-api-factory-github/src/main/java/org/eclipse/che/api/factory/server/github/GithubApiClient.java +++ b/wsmaster/che-core-api-factory-github/src/main/java/org/eclipse/che/api/factory/server/github/GithubApiClient.java @@ -41,6 +41,7 @@ import org.eclipse.che.api.factory.server.scm.exception.ScmBadRequestException; import org.eclipse.che.api.factory.server.scm.exception.ScmCommunicationException; import org.eclipse.che.api.factory.server.scm.exception.ScmItemNotFoundException; import org.eclipse.che.commons.annotation.Nullable; +import org.eclipse.che.commons.lang.Pair; import org.eclipse.che.commons.lang.concurrent.LoggingUncaughtExceptionHandler; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -206,7 +207,7 @@ public class GithubApiClient { * @throws ScmCommunicationException * @throws ScmBadRequestException */ - public String[] getTokenScopes(String authenticationToken) + public Pair getTokenScopes(String authenticationToken) throws ScmItemNotFoundException, ScmCommunicationException, ScmBadRequestException { final URI uri = apiServerUrl.resolve("./user"); HttpRequest request = buildGithubApiRequest(uri, authenticationToken); @@ -215,12 +216,22 @@ public class GithubApiClient { httpClient, request, response -> { - Optional scopes = response.headers().firstValue(GITHUB_OAUTH_SCOPES_HEADER); - return Splitter.on(',') - .trimResults() - .omitEmptyStrings() - .splitToList(scopes.orElse("")) - .toArray(String[]::new); + Optional responseScopes = + response.headers().firstValue(GITHUB_OAUTH_SCOPES_HEADER); + String[] scopes = + Splitter.on(',') + .trimResults() + .omitEmptyStrings() + .splitToList(responseScopes.orElse("")) + .toArray(String[]::new); + try { + String result = + CharStreams.toString(new InputStreamReader(response.body(), Charsets.UTF_8)); + GithubUser user = OBJECT_MAPPER.readValue(result, GithubUser.class); + return Pair.of(user.getName(), scopes); + } catch (IOException e) { + throw new UncheckedIOException(e); + } }); } diff --git a/wsmaster/che-core-api-factory-github/src/main/java/org/eclipse/che/api/factory/server/github/GithubPersonalAccessTokenFetcher.java b/wsmaster/che-core-api-factory-github/src/main/java/org/eclipse/che/api/factory/server/github/GithubPersonalAccessTokenFetcher.java index a5dd1ba535..a3921b7691 100644 --- a/wsmaster/che-core-api-factory-github/src/main/java/org/eclipse/che/api/factory/server/github/GithubPersonalAccessTokenFetcher.java +++ b/wsmaster/che-core-api-factory-github/src/main/java/org/eclipse/che/api/factory/server/github/GithubPersonalAccessTokenFetcher.java @@ -29,6 +29,7 @@ import org.eclipse.che.api.core.ServerException; import org.eclipse.che.api.core.UnauthorizedException; import org.eclipse.che.api.factory.server.scm.PersonalAccessToken; import org.eclipse.che.api.factory.server.scm.PersonalAccessTokenFetcher; +import org.eclipse.che.api.factory.server.scm.PersonalAccessTokenParams; import org.eclipse.che.api.factory.server.scm.exception.ScmBadRequestException; import org.eclipse.che.api.factory.server.scm.exception.ScmCommunicationException; import org.eclipse.che.api.factory.server.scm.exception.ScmItemNotFoundException; @@ -36,6 +37,7 @@ import org.eclipse.che.api.factory.server.scm.exception.ScmUnauthorizedException import org.eclipse.che.api.factory.server.scm.exception.UnknownScmProviderException; import org.eclipse.che.commons.annotation.Nullable; import org.eclipse.che.commons.lang.NameGenerator; +import org.eclipse.che.commons.lang.Pair; import org.eclipse.che.commons.subject.Subject; import org.eclipse.che.security.oauth.OAuthAPI; import org.slf4j.Logger; @@ -150,30 +152,31 @@ public class GithubPersonalAccessTokenFetcher implements PersonalAccessTokenFetc } try { oAuthToken = oAuthAPI.getToken(OAUTH_PROVIDER_NAME); - // Find the user associated to the OAuth token by querying the GitHub API. - GithubUser user = githubApiClient.getUser(oAuthToken.getToken()); - PersonalAccessToken token = - new PersonalAccessToken( - scmServerUrl, - cheSubject.getUserId(), - user.getLogin(), - NameGenerator.generate(OAUTH_2_PREFIX, 5), - NameGenerator.generate("id-", 5), - oAuthToken.getToken()); - Optional valid = isValid(token); + String tokenName = NameGenerator.generate(OAUTH_2_PREFIX, 5); + String tokenId = NameGenerator.generate("id-", 5); + Optional> valid = + isValid( + new PersonalAccessTokenParams( + scmServerUrl, tokenName, tokenId, oAuthToken.getToken(), null)); if (valid.isEmpty()) { throw new ScmCommunicationException( "Unable to verify if current token is a valid GitHub token. Token's scm-url needs to be '" + GithubApiClient.GITHUB_SAAS_ENDPOINT + "' and was '" - + token.getScmProviderUrl() + + scmServerUrl + "'"); - } else if (!valid.get()) { + } else if (!valid.get().first) { throw new ScmCommunicationException( "Current token doesn't have the necessary privileges. Please make sure Che app scopes are correct and containing at least: " + DEFAULT_TOKEN_SCOPES.toString()); } - return token; + return new PersonalAccessToken( + scmServerUrl, + cheSubject.getUserId(), + valid.get().second, + tokenName, + tokenId, + oAuthToken.getToken()); } catch (UnauthorizedException e) { throw new ScmUnauthorizedException( cheSubject.getUserName() @@ -185,18 +188,14 @@ public class GithubPersonalAccessTokenFetcher implements PersonalAccessTokenFetc getLocalAuthenticateUrl()); } catch (NotFoundException nfe) { throw new UnknownScmProviderException(nfe.getMessage(), scmServerUrl); - } catch (ServerException - | ForbiddenException - | BadRequestException - | ScmItemNotFoundException - | ScmBadRequestException - | ConflictException e) { + } catch (ServerException | ForbiddenException | BadRequestException | ConflictException e) { LOG.error(e.getMessage()); throw new ScmCommunicationException(e.getMessage(), e); } } @Override + @Deprecated public Optional isValid(PersonalAccessToken personalAccessToken) { if (!githubApiClient.isConnected(personalAccessToken.getScmProviderUrl())) { LOG.debug("not a valid url {} for current fetcher ", personalAccessToken.getScmProviderUrl()); @@ -206,7 +205,7 @@ public class GithubPersonalAccessTokenFetcher implements PersonalAccessTokenFetc try { if (personalAccessToken.getScmTokenName() != null && personalAccessToken.getScmTokenName().startsWith(OAUTH_2_PREFIX)) { - String[] scopes = githubApiClient.getTokenScopes(personalAccessToken.getToken()); + String[] scopes = githubApiClient.getTokenScopes(personalAccessToken.getToken()).second; return Optional.of(containsScopes(scopes, DEFAULT_TOKEN_SCOPES)); } else { // No REST API for PAT-s in Github found yet. Just try to do some action. @@ -222,6 +221,30 @@ public class GithubPersonalAccessTokenFetcher implements PersonalAccessTokenFetc } } + @Override + public Optional> isValid(PersonalAccessTokenParams params) { + if (!githubApiClient.isConnected(params.getScmProviderUrl())) { + LOG.debug("not a valid url {} for current fetcher ", params.getScmProviderUrl()); + return Optional.empty(); + } + try { + if (params.getScmTokenName() != null && params.getScmTokenName().startsWith(OAUTH_2_PREFIX)) { + Pair pair = githubApiClient.getTokenScopes(params.getToken()); + return Optional.of( + Pair.of( + containsScopes(pair.second, DEFAULT_TOKEN_SCOPES) ? Boolean.TRUE : Boolean.FALSE, + pair.first)); + } else { + // TODO: add PAT scope validation + // No REST API for PAT-s in Github found yet. Just try to do some action. + GithubUser user = githubApiClient.getUser(params.getToken()); + return Optional.of(Pair.of(Boolean.TRUE, user.getLogin())); + } + } catch (ScmItemNotFoundException | ScmCommunicationException | ScmBadRequestException e) { + return Optional.empty(); + } + } + /** * Checks if the tokenScopes array contains the requiredScopes. * diff --git a/wsmaster/che-core-api-factory-github/src/test/java/org/eclipse/che/api/factory/server/github/GithubApiClientTest.java b/wsmaster/che-core-api-factory-github/src/test/java/org/eclipse/che/api/factory/server/github/GithubApiClientTest.java index ed792acd03..ebeaca3ff5 100644 --- a/wsmaster/che-core-api-factory-github/src/test/java/org/eclipse/che/api/factory/server/github/GithubApiClientTest.java +++ b/wsmaster/che-core-api-factory-github/src/test/java/org/eclipse/che/api/factory/server/github/GithubApiClientTest.java @@ -165,7 +165,7 @@ public class GithubApiClientTest { .withHeader(GithubApiClient.GITHUB_OAUTH_SCOPES_HEADER, "repo, user:email") .withBodyFile("github/rest/user/response.json"))); - String[] scopes = client.getTokenScopes("token1"); + String[] scopes = client.getTokenScopes("token1").second; String[] expectedScopes = {"repo", "user:email"}; assertNotNull(scopes, "GitHub API should have returned a non-null scope array"); assertEqualsNoOrder( @@ -182,7 +182,7 @@ public class GithubApiClientTest { .withHeader("Content-Type", "application/json; charset=utf-8") .withBodyFile("github/rest/user/response.json"))); - String[] scopes = client.getTokenScopes("token1"); + String[] scopes = client.getTokenScopes("token1").second; assertNotNull(scopes, "GitHub API should have returned a non-null scope array"); assertEquals( scopes.length, @@ -203,7 +203,7 @@ public class GithubApiClientTest { .withHeader(GithubApiClient.GITHUB_OAUTH_SCOPES_HEADER, "") .withBodyFile("github/rest/user/response.json"))); - String[] scopes = client.getTokenScopes("token1"); + String[] scopes = client.getTokenScopes("token1").second; assertNotNull(scopes, "GitHub API should have returned a non-null scope array"); assertEquals( scopes.length, diff --git a/wsmaster/che-core-api-factory-github/src/test/java/org/eclipse/che/api/factory/server/github/GithubPersonalAccessTokenFetcherTest.java b/wsmaster/che-core-api-factory-github/src/test/java/org/eclipse/che/api/factory/server/github/GithubPersonalAccessTokenFetcherTest.java index 9084bc40d2..48149f62ec 100644 --- a/wsmaster/che-core-api-factory-github/src/test/java/org/eclipse/che/api/factory/server/github/GithubPersonalAccessTokenFetcherTest.java +++ b/wsmaster/che-core-api-factory-github/src/test/java/org/eclipse/che/api/factory/server/github/GithubPersonalAccessTokenFetcherTest.java @@ -31,11 +31,14 @@ import com.github.tomakehurst.wiremock.common.Slf4jNotifier; import com.google.common.collect.ImmutableSet; import com.google.common.net.HttpHeaders; import java.util.Collections; +import java.util.Optional; import org.eclipse.che.api.auth.shared.dto.OAuthToken; import org.eclipse.che.api.core.UnauthorizedException; import org.eclipse.che.api.factory.server.scm.PersonalAccessToken; +import org.eclipse.che.api.factory.server.scm.PersonalAccessTokenParams; import org.eclipse.che.api.factory.server.scm.exception.ScmCommunicationException; import org.eclipse.che.api.factory.server.scm.exception.ScmUnauthorizedException; +import org.eclipse.che.commons.lang.Pair; import org.eclipse.che.commons.subject.Subject; import org.eclipse.che.commons.subject.SubjectImpl; import org.eclipse.che.security.oauth.OAuthAPI; @@ -86,16 +89,11 @@ public class GithubPersonalAccessTokenFetcherTest { .withHeader("Content-Type", "application/json; charset=utf-8") .withHeader(GithubApiClient.GITHUB_OAUTH_SCOPES_HEADER, "repo") .withBodyFile("github/rest/user/response.json"))); - PersonalAccessToken personalAccessToken = - new PersonalAccessToken( - "https://github.com/", - "cheUserId", - "scmUserName", - "scmTokenName", - "scmTokenId", - githubOauthToken); + PersonalAccessTokenParams personalAccessTokenParams = + new PersonalAccessTokenParams( + "https://github.com/", "scmTokenName", "scmTokenId", githubOauthToken, null); assertTrue( - githubPATFetcher.isValid(personalAccessToken).isEmpty(), + githubPATFetcher.isValid(personalAccessTokenParams).isEmpty(), "Should not validate SCM server with trailing /"); } @@ -198,16 +196,13 @@ public class GithubPersonalAccessTokenFetcherTest { DEFAULT_TOKEN_SCOPES.toString().replace("[", "").replace("]", "")) .withBodyFile("github/rest/user/response.json"))); - PersonalAccessToken token = - new PersonalAccessToken( - wireMockServer.url("/"), - "cheUser", - "github-user", - "token-name", - "tid-23434", - githubOauthToken); + PersonalAccessTokenParams params = + new PersonalAccessTokenParams( + wireMockServer.url("/"), "token-name", "tid-23434", githubOauthToken, null); - assertTrue(githubPATFetcher.isValid(token).get()); + Optional> valid = githubPATFetcher.isValid(params); + assertTrue(valid.isPresent()); + assertTrue(valid.get().first); } @Test @@ -223,31 +218,31 @@ public class GithubPersonalAccessTokenFetcherTest { DEFAULT_TOKEN_SCOPES.toString().replace("[", "").replace("]", "")) .withBodyFile("github/rest/user/response.json"))); - PersonalAccessToken token = - new PersonalAccessToken( + PersonalAccessTokenParams params = + new PersonalAccessTokenParams( wireMockServer.url("/"), - "cheUser", - "username", - OAUTH_2_PREFIX + "-token-name", + OAUTH_2_PREFIX + "-params-name", "tid-23434", - githubOauthToken); + githubOauthToken, + null); - assertTrue(githubPATFetcher.isValid(token).get()); + Optional> valid = githubPATFetcher.isValid(params); + assertTrue(valid.isPresent()); + assertTrue(valid.get().first); } @Test public void shouldNotValidateExpiredOauthToken() throws Exception { stubFor(get(urlEqualTo("/api/v3/user")).willReturn(aResponse().withStatus(HTTP_FORBIDDEN))); - PersonalAccessToken token = - new PersonalAccessToken( + PersonalAccessTokenParams params = + new PersonalAccessTokenParams( wireMockServer.url("/"), - "cheUser", - "username", OAUTH_2_PREFIX + "-token-name", "tid-23434", - githubOauthToken); + githubOauthToken, + null); - assertFalse(githubPATFetcher.isValid(token).get()); + assertFalse(githubPATFetcher.isValid(params).isPresent()); } } diff --git a/wsmaster/che-core-api-factory-gitlab/src/main/java/org/eclipse/che/api/factory/server/gitlab/GitlabApiClient.java b/wsmaster/che-core-api-factory-gitlab/src/main/java/org/eclipse/che/api/factory/server/gitlab/GitlabApiClient.java index a687198e79..6f2a902e9b 100644 --- a/wsmaster/che-core-api-factory-gitlab/src/main/java/org/eclipse/che/api/factory/server/gitlab/GitlabApiClient.java +++ b/wsmaster/che-core-api-factory-gitlab/src/main/java/org/eclipse/che/api/factory/server/gitlab/GitlabApiClient.java @@ -87,7 +87,34 @@ public class GitlabApiClient { }); } - public GitlabOauthTokenInfo getTokenInfo(String authenticationToken) + public GitlabPersonalAccessTokenInfo getPersonalAccessTokenInfo(String authenticationToken) + throws ScmItemNotFoundException, ScmCommunicationException { + final URI uri = serverUrl.resolve("/api/v4/personal_access_tokens/self"); + HttpRequest request = + HttpRequest.newBuilder(uri) + .headers("Authorization", "Bearer " + authenticationToken) + .timeout(DEFAULT_HTTP_TIMEOUT) + .build(); + LOG.trace("executeRequest={}", request); + try { + return executeRequest( + httpClient, + request, + inputStream -> { + try { + String result = + CharStreams.toString(new InputStreamReader(inputStream, Charsets.UTF_8)); + return OBJECT_MAPPER.readValue(result, GitlabPersonalAccessTokenInfo.class); + } catch (IOException e) { + throw new UncheckedIOException(e); + } + }); + } catch (ScmBadRequestException e) { + throw new ScmCommunicationException(e.getMessage(), e); + } + } + + public GitlabOauthTokenInfo getOAuthTokenInfo(String authenticationToken) throws ScmItemNotFoundException, ScmCommunicationException { final URI uri = serverUrl.resolve("/oauth/token/info"); HttpRequest request = diff --git a/wsmaster/che-core-api-factory-gitlab/src/main/java/org/eclipse/che/api/factory/server/gitlab/GitlabOAuthTokenFetcher.java b/wsmaster/che-core-api-factory-gitlab/src/main/java/org/eclipse/che/api/factory/server/gitlab/GitlabOAuthTokenFetcher.java index 091146a7bd..b7802d9156 100644 --- a/wsmaster/che-core-api-factory-gitlab/src/main/java/org/eclipse/che/api/factory/server/gitlab/GitlabOAuthTokenFetcher.java +++ b/wsmaster/che-core-api-factory-gitlab/src/main/java/org/eclipse/che/api/factory/server/gitlab/GitlabOAuthTokenFetcher.java @@ -33,6 +33,7 @@ import org.eclipse.che.api.core.ServerException; import org.eclipse.che.api.core.UnauthorizedException; import org.eclipse.che.api.factory.server.scm.PersonalAccessToken; import org.eclipse.che.api.factory.server.scm.PersonalAccessTokenFetcher; +import org.eclipse.che.api.factory.server.scm.PersonalAccessTokenParams; import org.eclipse.che.api.factory.server.scm.exception.ScmBadRequestException; import org.eclipse.che.api.factory.server.scm.exception.ScmCommunicationException; import org.eclipse.che.api.factory.server.scm.exception.ScmItemNotFoundException; @@ -40,6 +41,7 @@ import org.eclipse.che.api.factory.server.scm.exception.ScmUnauthorizedException import org.eclipse.che.api.factory.server.scm.exception.UnknownScmProviderException; import org.eclipse.che.commons.annotation.Nullable; import org.eclipse.che.commons.lang.NameGenerator; +import org.eclipse.che.commons.lang.Pair; import org.eclipse.che.commons.lang.StringUtils; import org.eclipse.che.commons.subject.Subject; import org.eclipse.che.inject.ConfigurationException; @@ -52,8 +54,7 @@ public class GitlabOAuthTokenFetcher implements PersonalAccessTokenFetcher { private static final Logger LOG = LoggerFactory.getLogger(GitlabOAuthTokenFetcher.class); private static final String OAUTH_PROVIDER_NAME = "gitlab"; - public static final Set DEFAULT_TOKEN_SCOPES = - ImmutableSet.of("api", "write_repository", "openid"); + public static final Set DEFAULT_TOKEN_SCOPES = ImmutableSet.of("api", "write_repository"); private final List registeredGitlabEndpoints; private final OAuthAPI oAuthAPI; @@ -105,22 +106,24 @@ public class GitlabOAuthTokenFetcher implements PersonalAccessTokenFetcher { OAuthToken oAuthToken; try { oAuthToken = oAuthAPI.getToken(OAUTH_PROVIDER_NAME); - GitlabUser user = gitlabApiClient.getUser(oAuthToken.getToken()); - PersonalAccessToken token = - new PersonalAccessToken( - scmServerUrl, - cheSubject.getUserId(), - user.getUsername(), - NameGenerator.generate(OAUTH_2_PREFIX, 5), - NameGenerator.generate("id-", 5), - oAuthToken.getToken()); - Optional valid = isValid(token); - if (valid.isEmpty() || !valid.get()) { + String tokenName = NameGenerator.generate(OAUTH_2_PREFIX, 5); + String tokenId = NameGenerator.generate("id-", 5); + Optional> valid = + isValid( + new PersonalAccessTokenParams( + scmServerUrl, tokenName, tokenId, oAuthToken.getToken(), null)); + if (valid.isEmpty() || !valid.get().first) { throw new ScmCommunicationException( "Current token doesn't have the necessary privileges. Please make sure Che app scopes are correct and containing at least: " + DEFAULT_TOKEN_SCOPES.toString()); } - return token; + return new PersonalAccessToken( + scmServerUrl, + cheSubject.getUserId(), + valid.get().second, + tokenName, + tokenId, + oAuthToken.getToken()); } catch (UnauthorizedException e) { throw new ScmUnauthorizedException( cheSubject.getUserName() @@ -132,12 +135,7 @@ public class GitlabOAuthTokenFetcher implements PersonalAccessTokenFetcher { getLocalAuthenticateUrl()); } catch (NotFoundException nfe) { throw new UnknownScmProviderException(nfe.getMessage(), scmServerUrl); - } catch (ServerException - | ForbiddenException - | BadRequestException - | ScmItemNotFoundException - | ScmBadRequestException - | ConflictException e) { + } catch (ServerException | ForbiddenException | BadRequestException | ConflictException e) { LOG.warn(e.getMessage()); throw new ScmCommunicationException(e.getMessage(), e); } @@ -160,7 +158,8 @@ public class GitlabOAuthTokenFetcher implements PersonalAccessTokenFetcher { && personalAccessToken.getScmTokenName().startsWith(OAUTH_2_PREFIX)) { // validation OAuth token by special API call try { - GitlabOauthTokenInfo info = gitlabApiClient.getTokenInfo(personalAccessToken.getToken()); + GitlabOauthTokenInfo info = + gitlabApiClient.getOAuthTokenInfo(personalAccessToken.getToken()); return Optional.of(Sets.newHashSet(info.getScope()).containsAll(DEFAULT_TOKEN_SCOPES)); } catch (ScmItemNotFoundException | ScmCommunicationException e) { return Optional.of(Boolean.FALSE); @@ -181,6 +180,38 @@ public class GitlabOAuthTokenFetcher implements PersonalAccessTokenFetcher { } } + @Override + public Optional> isValid(PersonalAccessTokenParams params) { + GitlabApiClient gitlabApiClient = getApiClient(params.getScmProviderUrl()); + if (gitlabApiClient == null || !gitlabApiClient.isConnected(params.getScmProviderUrl())) { + if (OAUTH_PROVIDER_NAME.equals(params.getScmTokenName())) { + gitlabApiClient = new GitlabApiClient(params.getScmProviderUrl()); + } else { + LOG.debug("not a valid url {} for current fetcher ", params.getScmProviderUrl()); + return Optional.empty(); + } + } + try { + GitlabUser user = gitlabApiClient.getUser(params.getToken()); + if (params.getScmTokenName() != null && params.getScmTokenName().startsWith(OAUTH_2_PREFIX)) { + // validation OAuth token by special API call + GitlabOauthTokenInfo info = gitlabApiClient.getOAuthTokenInfo(params.getToken()); + return Optional.of( + Pair.of( + Sets.newHashSet(info.getScope()).containsAll(DEFAULT_TOKEN_SCOPES) + ? Boolean.TRUE + : Boolean.FALSE, + user.getUsername())); + } + // validating personal access token from secret. Since PAT API is accessible only in + // latest GitLab version, we just perform check by accessing something from API. + // TODO: add PAT scope validation + return Optional.of(Pair.of(Boolean.TRUE, user.getUsername())); + } catch (ScmItemNotFoundException | ScmCommunicationException | ScmBadRequestException e) { + return Optional.empty(); + } + } + private String getLocalAuthenticateUrl() { return apiEndpoint + "/oauth/authenticate?oauth_provider=" diff --git a/wsmaster/che-core-api-factory-gitlab/src/main/java/org/eclipse/che/api/factory/server/gitlab/GitlabPersonalAccessTokenInfo.java b/wsmaster/che-core-api-factory-gitlab/src/main/java/org/eclipse/che/api/factory/server/gitlab/GitlabPersonalAccessTokenInfo.java new file mode 100644 index 0000000000..ebfcf700f5 --- /dev/null +++ b/wsmaster/che-core-api-factory-gitlab/src/main/java/org/eclipse/che/api/factory/server/gitlab/GitlabPersonalAccessTokenInfo.java @@ -0,0 +1,93 @@ +/* + * Copyright (c) 2012-2023 Red Hat, Inc. + * This program and the accompanying materials are made + * available under the terms of the Eclipse Public License 2.0 + * which is available at https://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 + * + * Contributors: + * Red Hat, Inc. - initial API and implementation + */ +package org.eclipse.che.api.factory.server.gitlab; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import java.util.Arrays; +import java.util.Objects; + +@JsonIgnoreProperties(ignoreUnknown = true) +public class GitlabPersonalAccessTokenInfo { + + private int id; + private String[] scopes; + private String expires_at; + private String created_at; + + public int getId() { + return id; + } + + public void setId(int id) { + this.id = id; + } + + public String[] getScopes() { + return scopes; + } + + public void setScopes(String[] scopes) { + this.scopes = scopes; + } + + public String getExpires_at() { + return expires_at; + } + + public void setExpires_at(String expires_at) { + this.expires_at = expires_at; + } + + public String getCreated_at() { + return created_at; + } + + public void setCreated_at(String created_at) { + this.created_at = created_at; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GitlabPersonalAccessTokenInfo info = (GitlabPersonalAccessTokenInfo) o; + return id == info.id + && Objects.equals(expires_at, info.expires_at) + && created_at == info.created_at + && Arrays.equals(scopes, info.scopes); + } + + @Override + public int hashCode() { + int result = Objects.hash(id, expires_at, created_at); + result = 31 * result + Arrays.hashCode(scopes); + return result; + } + + @Override + public String toString() { + return "GitlabOauthTokenInfo{" + + "resource_owner_id=" + + id + + ", scope=" + + Arrays.toString(scopes) + + ", expires_at=" + + expires_at + + ", created_at=" + + created_at + + '}'; + } +} diff --git a/wsmaster/che-core-api-factory-gitlab/src/main/java/org/eclipse/che/api/factory/server/gitlab/GitlabUrlParser.java b/wsmaster/che-core-api-factory-gitlab/src/main/java/org/eclipse/che/api/factory/server/gitlab/GitlabUrlParser.java index a561866262..7545ab38ee 100644 --- a/wsmaster/che-core-api-factory-gitlab/src/main/java/org/eclipse/che/api/factory/server/gitlab/GitlabUrlParser.java +++ b/wsmaster/che-core-api-factory-gitlab/src/main/java/org/eclipse/che/api/factory/server/gitlab/GitlabUrlParser.java @@ -109,7 +109,7 @@ public class GitlabUrlParser { try { // If the token request catches the unauthorised error, it means that the provided url // belongs to Gitlab. - gitlabApiClient.getTokenInfo(""); + gitlabApiClient.getOAuthTokenInfo(""); } catch (ScmCommunicationException e) { return e.getStatusCode() == HTTP_UNAUTHORIZED; } catch (ScmItemNotFoundException e) { diff --git a/wsmaster/che-core-api-factory-gitlab/src/test/java/org/eclipse/che/api/factory/server/gitlab/GitlabApiClientTest.java b/wsmaster/che-core-api-factory-gitlab/src/test/java/org/eclipse/che/api/factory/server/gitlab/GitlabApiClientTest.java index e48c0a8535..11cd301264 100644 --- a/wsmaster/che-core-api-factory-gitlab/src/test/java/org/eclipse/che/api/factory/server/gitlab/GitlabApiClientTest.java +++ b/wsmaster/che-core-api-factory-gitlab/src/test/java/org/eclipse/che/api/factory/server/gitlab/GitlabApiClientTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012-2021 Red Hat, Inc. + * Copyright (c) 2012-2023 Red Hat, Inc. * This program and the accompanying materials are made * available under the terms of the Eclipse Public License 2.0 * which is available at https://www.eclipse.org/legal/epl-2.0/ @@ -17,12 +17,16 @@ import static com.github.tomakehurst.wiremock.client.WireMock.get; import static com.github.tomakehurst.wiremock.client.WireMock.stubFor; import static com.github.tomakehurst.wiremock.client.WireMock.urlEqualTo; import static com.github.tomakehurst.wiremock.core.WireMockConfiguration.wireMockConfig; +import static org.eclipse.che.api.factory.server.gitlab.GitlabOAuthTokenFetcher.DEFAULT_TOKEN_SCOPES; +import static org.testng.Assert.assertEquals; import static org.testng.Assert.assertFalse; import static org.testng.Assert.assertNotNull; +import static org.testng.Assert.assertTrue; import com.github.tomakehurst.wiremock.WireMockServer; import com.github.tomakehurst.wiremock.client.WireMock; import com.github.tomakehurst.wiremock.common.Slf4jNotifier; +import com.google.common.collect.Sets; import com.google.common.net.HttpHeaders; import org.mockito.testng.MockitoTestNGListener; import org.testng.annotations.AfterMethod; @@ -66,6 +70,26 @@ public class GitlabApiClientTest { assertNotNull(user); } + @Test + public void shouldGetPersonalAccessTokenInfo() throws Exception { + // given + stubFor( + get(urlEqualTo("/api/v4/personal_access_tokens/self")) + .withHeader(HttpHeaders.AUTHORIZATION, equalTo("Bearer token1")) + .willReturn( + aResponse() + .withHeader("Content-Type", "application/json; charset=utf-8") + .withBodyFile("gitlab/rest/api/v4/user/PAT_info.json"))); + + // when + GitlabPersonalAccessTokenInfo tokenInfo = client.getPersonalAccessTokenInfo("token1"); + + // then + assertNotNull(tokenInfo); + assertEquals(tokenInfo.getId(), 1); + assertTrue(Sets.newHashSet(tokenInfo.getScopes()).containsAll(DEFAULT_TOKEN_SCOPES)); + } + @Test public void shouldReturnFalseOnConnectedToOtherHost() { assertFalse(client.isConnected("https://other.com")); diff --git a/wsmaster/che-core-api-factory-gitlab/src/test/java/org/eclipse/che/api/factory/server/gitlab/GitlabOAuthTokenFetcherTest.java b/wsmaster/che-core-api-factory-gitlab/src/test/java/org/eclipse/che/api/factory/server/gitlab/GitlabOAuthTokenFetcherTest.java index b61650c490..3d46072f6f 100644 --- a/wsmaster/che-core-api-factory-gitlab/src/test/java/org/eclipse/che/api/factory/server/gitlab/GitlabOAuthTokenFetcherTest.java +++ b/wsmaster/che-core-api-factory-gitlab/src/test/java/org/eclipse/che/api/factory/server/gitlab/GitlabOAuthTokenFetcherTest.java @@ -27,11 +27,14 @@ import com.github.tomakehurst.wiremock.WireMockServer; import com.github.tomakehurst.wiremock.client.WireMock; import com.github.tomakehurst.wiremock.common.Slf4jNotifier; import com.google.common.net.HttpHeaders; +import java.util.Optional; import org.eclipse.che.api.auth.shared.dto.OAuthToken; import org.eclipse.che.api.core.UnauthorizedException; import org.eclipse.che.api.factory.server.scm.PersonalAccessToken; +import org.eclipse.che.api.factory.server.scm.PersonalAccessTokenParams; import org.eclipse.che.api.factory.server.scm.exception.ScmCommunicationException; import org.eclipse.che.api.factory.server.scm.exception.ScmUnauthorizedException; +import org.eclipse.che.commons.lang.Pair; import org.eclipse.che.commons.subject.Subject; import org.eclipse.che.commons.subject.SubjectImpl; import org.eclipse.che.inject.ConfigurationException; @@ -72,7 +75,7 @@ public class GitlabOAuthTokenFetcherTest { @Test( expectedExceptions = ScmCommunicationException.class, expectedExceptionsMessageRegExp = - "Current token doesn't have the necessary privileges. Please make sure Che app scopes are correct and containing at least: \\[api, write_repository, openid\\]") + "Current token doesn't have the necessary privileges. Please make sure Che app scopes are correct and containing at least: \\[api, write_repository\\]") public void shouldThrowExceptionOnInsufficientTokenScopes() throws Exception { Subject subject = new SubjectImpl("Username", "id1", "token", false); OAuthToken oAuthToken = newDto(OAuthToken.class).withToken("oauthtoken").withScope("api repo"); @@ -157,7 +160,7 @@ public class GitlabOAuthTokenFetcherTest { } @Test - public void shouldValidatePersonalToken() throws Exception { + public void shouldValidateOAuthToken() throws Exception { stubFor( get(urlEqualTo("/api/v4/user")) .withHeader(HttpHeaders.AUTHORIZATION, equalTo("Bearer token123")) @@ -165,16 +168,21 @@ public class GitlabOAuthTokenFetcherTest { aResponse() .withHeader("Content-Type", "application/json; charset=utf-8") .withBodyFile("gitlab/rest/api/v4/user/response.json"))); + stubFor( + get(urlEqualTo("/oauth/token/info")) + .withHeader(HttpHeaders.AUTHORIZATION, equalTo("Bearer token123")) + .willReturn( + aResponse() + .withHeader("Content-Type", "application/json; charset=utf-8") + .withBodyFile("gitlab/rest/api/v4/user/token_info.json"))); - PersonalAccessToken token = - new PersonalAccessToken( - wireMockServer.baseUrl(), - "cheUser", - "john_smith", - "token-name", - "tid-23434", - "token123"); + PersonalAccessTokenParams params = + new PersonalAccessTokenParams( + wireMockServer.baseUrl(), "oauth2-token-name", "tid-23434", "token123", null); - assertTrue(oAuthTokenFetcher.isValid(token).get()); + Optional> valid = oAuthTokenFetcher.isValid(params); + + assertTrue(valid.isPresent()); + assertTrue(valid.get().first); } } diff --git a/wsmaster/che-core-api-factory-gitlab/src/test/resources/__files/gitlab/rest/api/v4/user/PAT_info.json b/wsmaster/che-core-api-factory-gitlab/src/test/resources/__files/gitlab/rest/api/v4/user/PAT_info.json new file mode 100644 index 0000000000..97ca5a2732 --- /dev/null +++ b/wsmaster/che-core-api-factory-gitlab/src/test/resources/__files/gitlab/rest/api/v4/user/PAT_info.json @@ -0,0 +1,7 @@ +{ + "id": 1, + "name": "gitlab", + "scopes": ["api", "write_repository"], + "expires_at": "2024-07-18", + "created_at": "2023-07-19T07:41:19.492Z" +} diff --git a/wsmaster/che-core-api-factory/src/main/java/org/eclipse/che/api/factory/server/scm/PersonalAccessTokenFetcher.java b/wsmaster/che-core-api-factory/src/main/java/org/eclipse/che/api/factory/server/scm/PersonalAccessTokenFetcher.java index 0c46e781ca..70f8bd0a70 100644 --- a/wsmaster/che-core-api-factory/src/main/java/org/eclipse/che/api/factory/server/scm/PersonalAccessTokenFetcher.java +++ b/wsmaster/che-core-api-factory/src/main/java/org/eclipse/che/api/factory/server/scm/PersonalAccessTokenFetcher.java @@ -15,6 +15,7 @@ import java.util.Optional; import org.eclipse.che.api.factory.server.scm.exception.ScmCommunicationException; import org.eclipse.che.api.factory.server.scm.exception.ScmUnauthorizedException; import org.eclipse.che.api.factory.server.scm.exception.UnknownScmProviderException; +import org.eclipse.che.commons.lang.Pair; import org.eclipse.che.commons.subject.Subject; public interface PersonalAccessTokenFetcher { @@ -41,6 +42,7 @@ public interface PersonalAccessTokenFetcher { * Checks whether the provided personal access token is valid and has expected scope of * permissions. * + * @deprecated use {@link #isValid(PersonalAccessTokenParams)} instead. * @param personalAccessToken - personal access token to check. * @return - empty optional if {@link PersonalAccessTokenFetcher} is not able to confirm or deny * that token is valid or {@link Boolean} value if it can. @@ -49,6 +51,19 @@ public interface PersonalAccessTokenFetcher { * @throws ScmCommunicationException - Some unexpected problem occurred during communication with * scm provider. */ + @Deprecated Optional isValid(PersonalAccessToken personalAccessToken) throws ScmCommunicationException, ScmUnauthorizedException; + + /** + * Checks whether the provided personal access token is valid by fetching user info from the scm + * provider. Also checks whether the token has expected scope of permissions if the provider API + * supports such request. + * + * @return - Optional with a pair of boolean value and scm username. The boolean value is true if + * the token has expected scope of permissions, false if the token scopes does not match the + * expected ones. Empty optional if {@link PersonalAccessTokenFetcher} is not able to confirm + * or deny that token is valid. + */ + Optional> isValid(PersonalAccessTokenParams params); } diff --git a/wsmaster/che-core-api-factory/src/main/java/org/eclipse/che/api/factory/server/scm/PersonalAccessTokenParams.java b/wsmaster/che-core-api-factory/src/main/java/org/eclipse/che/api/factory/server/scm/PersonalAccessTokenParams.java new file mode 100644 index 0000000000..3b803b59e6 --- /dev/null +++ b/wsmaster/che-core-api-factory/src/main/java/org/eclipse/che/api/factory/server/scm/PersonalAccessTokenParams.java @@ -0,0 +1,54 @@ +/* + * Copyright (c) 2012-2023 Red Hat, Inc. + * This program and the accompanying materials are made + * available under the terms of the Eclipse Public License 2.0 + * which is available at https://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 + * + * Contributors: + * Red Hat, Inc. - initial API and implementation + */ +package org.eclipse.che.api.factory.server.scm; + +/** An object to hold parameters for creating a personal access token. */ +public class PersonalAccessTokenParams { + private final String scmProviderUrl; + private final String scmTokenName; + private final String scmTokenId; + private final String token; + private final String organization; + + public PersonalAccessTokenParams( + String scmProviderUrl, + String scmTokenName, + String scmTokenId, + String token, + String organization) { + this.scmProviderUrl = scmProviderUrl; + this.scmTokenName = scmTokenName; + this.scmTokenId = scmTokenId; + this.token = token; + this.organization = organization; + } + + public String getScmProviderUrl() { + return scmProviderUrl; + } + + public String getScmTokenName() { + return scmTokenName; + } + + public String getScmTokenId() { + return scmTokenId; + } + + public String getToken() { + return token; + } + + public String getOrganization() { + return organization; + } +} diff --git a/wsmaster/che-core-api-factory/src/main/java/org/eclipse/che/api/factory/server/scm/ScmPersonalAccessTokenFetcher.java b/wsmaster/che-core-api-factory/src/main/java/org/eclipse/che/api/factory/server/scm/ScmPersonalAccessTokenFetcher.java index 224cf30e27..b600b29bd4 100644 --- a/wsmaster/che-core-api-factory/src/main/java/org/eclipse/che/api/factory/server/scm/ScmPersonalAccessTokenFetcher.java +++ b/wsmaster/che-core-api-factory/src/main/java/org/eclipse/che/api/factory/server/scm/ScmPersonalAccessTokenFetcher.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012-2021 Red Hat, Inc. + * Copyright (c) 2012-2023 Red Hat, Inc. * This program and the accompanying materials are made * available under the terms of the Eclipse Public License 2.0 * which is available at https://www.eclipse.org/legal/epl-2.0/ @@ -17,6 +17,7 @@ import javax.inject.Inject; import org.eclipse.che.api.factory.server.scm.exception.ScmCommunicationException; import org.eclipse.che.api.factory.server.scm.exception.ScmUnauthorizedException; import org.eclipse.che.api.factory.server.scm.exception.UnknownScmProviderException; +import org.eclipse.che.commons.lang.Pair; import org.eclipse.che.commons.subject.Subject; /** @@ -55,9 +56,11 @@ public class ScmPersonalAccessTokenFetcher { * Iterate over the Set declared in container and sequentially invoke * {@link PersonalAccessTokenFetcher#isValid(PersonalAccessToken)} method. * + * @deprecated use {@link #getScmUsername(PersonalAccessTokenParams)} instead. * @throws UnknownScmProviderException - if none of PersonalAccessTokenFetchers return a * meaningful result. */ + @Deprecated public boolean isValid(PersonalAccessToken personalAccessToken) throws UnknownScmProviderException, ScmUnauthorizedException, ScmCommunicationException { for (PersonalAccessTokenFetcher fetcher : personalAccessTokenFetchers) { @@ -71,4 +74,20 @@ public class ScmPersonalAccessTokenFetcher { "No PersonalAccessTokenFetcher configured for " + personalAccessToken.getScmProviderUrl(), personalAccessToken.getScmProviderUrl()); } + + /** + * Iterate over the Set declared in container and sequentially invoke + * {@link PersonalAccessTokenFetcher#isValid(PersonalAccessTokenParams)} method. If any of the + * fetchers return an scm username, return it. Otherwise, return null. + */ + public Optional getScmUsername(PersonalAccessTokenParams params) + throws UnknownScmProviderException, ScmUnauthorizedException, ScmCommunicationException { + for (PersonalAccessTokenFetcher fetcher : personalAccessTokenFetchers) { + Optional> isValid = fetcher.isValid(params); + if (isValid.isPresent() && isValid.get().first) { + return Optional.of(isValid.get().second); + } + } + return Optional.empty(); + } } From 29ff3f3e75ca3b20098d065f8356c8b3d543b445 Mon Sep 17 00:00:00 2001 From: Mykhailo Kuznietsov Date: Thu, 27 Jul 2023 14:48:09 +0000 Subject: [PATCH 38/75] chore: Bump to 7.73.0-SNAPSHOT in main Signed-off-by: Mykhailo Kuznietsov --- assembly/assembly-che-tomcat/pom.xml | 2 +- assembly/assembly-main/pom.xml | 2 +- assembly/assembly-root-war/pom.xml | 2 +- assembly/assembly-swagger-war/pom.xml | 2 +- assembly/assembly-wsmaster-war/pom.xml | 2 +- assembly/pom.xml | 2 +- core/che-core-api-core/pom.xml | 2 +- core/che-core-api-dto-maven-plugin/pom.xml | 2 +- core/che-core-api-dto/pom.xml | 2 +- core/che-core-api-model/pom.xml | 2 +- core/che-core-db-vendor-h2/pom.xml | 2 +- core/che-core-db-vendor-mysql/pom.xml | 2 +- core/che-core-db-vendor-postgresql/pom.xml | 2 +- core/che-core-db/pom.xml | 2 +- core/che-core-logback/pom.xml | 2 +- core/che-core-metrics-core/pom.xml | 2 +- core/che-core-tracing-core/pom.xml | 2 +- core/che-core-tracing-metrics/pom.xml | 2 +- core/che-core-tracing-web/pom.xml | 2 +- core/che-core-typescript-dto-maven-plugin/pom.xml | 2 +- core/commons/che-core-commons-annotations/pom.xml | 2 +- core/commons/che-core-commons-inject/pom.xml | 2 +- core/commons/che-core-commons-j2ee/pom.xml | 2 +- core/commons/che-core-commons-json/pom.xml | 2 +- core/commons/che-core-commons-lang/pom.xml | 2 +- core/commons/che-core-commons-observability/pom.xml | 2 +- core/commons/che-core-commons-schedule/pom.xml | 2 +- core/commons/che-core-commons-test/pom.xml | 2 +- core/commons/che-core-commons-tracing/pom.xml | 2 +- core/commons/pom.xml | 2 +- core/pom.xml | 2 +- infrastructures/infrastructure-distributed/pom.xml | 2 +- infrastructures/infrastructure-factory/pom.xml | 2 +- infrastructures/infrastructure-metrics/pom.xml | 2 +- infrastructures/infrastructure-permission/pom.xml | 2 +- infrastructures/kubernetes/pom.xml | 2 +- infrastructures/openshift/pom.xml | 2 +- infrastructures/pom.xml | 2 +- .../api/che-multiuser-api-authentication-commons/pom.xml | 2 +- multiuser/api/che-multiuser-api-authorization-impl/pom.xml | 2 +- multiuser/api/che-multiuser-api-authorization/pom.xml | 2 +- multiuser/api/che-multiuser-api-organization-shared/pom.xml | 2 +- multiuser/api/che-multiuser-api-organization/pom.xml | 2 +- multiuser/api/che-multiuser-api-permission-shared/pom.xml | 2 +- multiuser/api/che-multiuser-api-permission/pom.xml | 2 +- multiuser/api/che-multiuser-api-resource-shared/pom.xml | 2 +- multiuser/api/che-multiuser-api-resource/pom.xml | 2 +- multiuser/api/che-multiuser-api-workspace-activity/pom.xml | 2 +- multiuser/api/pom.xml | 2 +- .../integration-tests/che-multiuser-cascade-removal/pom.xml | 2 +- multiuser/integration-tests/che-multiuser-mysql-tck/pom.xml | 2 +- .../integration-tests/che-multiuser-postgresql-tck/pom.xml | 2 +- multiuser/integration-tests/pom.xml | 2 +- multiuser/keycloak/che-multiuser-keycloak-server/pom.xml | 2 +- multiuser/keycloak/che-multiuser-keycloak-shared/pom.xml | 2 +- .../keycloak/che-multiuser-keycloak-token-provider/pom.xml | 2 +- .../keycloak/che-multiuser-keycloak-user-remover/pom.xml | 2 +- multiuser/keycloak/pom.xml | 2 +- .../che-multiuser-machine-authentication-shared/pom.xml | 2 +- .../machine-auth/che-multiuser-machine-authentication/pom.xml | 2 +- multiuser/machine-auth/pom.xml | 2 +- multiuser/oidc/pom.xml | 2 +- multiuser/permission/che-multiuser-permission-devfile/pom.xml | 2 +- multiuser/permission/che-multiuser-permission-logger/pom.xml | 2 +- .../permission/che-multiuser-permission-resource/pom.xml | 2 +- multiuser/permission/che-multiuser-permission-system/pom.xml | 2 +- multiuser/permission/che-multiuser-permission-user/pom.xml | 2 +- .../che-multiuser-permission-workspace-activity/pom.xml | 2 +- .../permission/che-multiuser-permission-workspace/pom.xml | 2 +- multiuser/permission/pom.xml | 2 +- multiuser/personal-account/pom.xml | 2 +- multiuser/pom.xml | 2 +- multiuser/sql-schema/pom.xml | 2 +- pom.xml | 4 ++-- typescript-dto/dto-pom.xml | 2 +- wsmaster/che-core-api-account/pom.xml | 2 +- wsmaster/che-core-api-auth-azure-devops/pom.xml | 2 +- wsmaster/che-core-api-auth-bitbucket/pom.xml | 2 +- wsmaster/che-core-api-auth-github/pom.xml | 2 +- wsmaster/che-core-api-auth-gitlab/pom.xml | 2 +- wsmaster/che-core-api-auth-openshift/pom.xml | 2 +- wsmaster/che-core-api-auth-shared/pom.xml | 2 +- wsmaster/che-core-api-auth/pom.xml | 2 +- wsmaster/che-core-api-devfile-shared/pom.xml | 2 +- wsmaster/che-core-api-devfile/pom.xml | 2 +- wsmaster/che-core-api-factory-azure-devops/pom.xml | 2 +- wsmaster/che-core-api-factory-bitbucket-server/pom.xml | 2 +- wsmaster/che-core-api-factory-bitbucket/pom.xml | 2 +- wsmaster/che-core-api-factory-git-ssh/pom.xml | 2 +- wsmaster/che-core-api-factory-github/pom.xml | 2 +- wsmaster/che-core-api-factory-gitlab/pom.xml | 2 +- wsmaster/che-core-api-factory-shared/pom.xml | 2 +- wsmaster/che-core-api-factory/pom.xml | 2 +- wsmaster/che-core-api-logger-shared/pom.xml | 2 +- wsmaster/che-core-api-logger/pom.xml | 2 +- wsmaster/che-core-api-metrics/pom.xml | 2 +- wsmaster/che-core-api-ssh-shared/pom.xml | 2 +- wsmaster/che-core-api-ssh/pom.xml | 2 +- wsmaster/che-core-api-system-shared/pom.xml | 2 +- wsmaster/che-core-api-system/pom.xml | 2 +- wsmaster/che-core-api-user-shared/pom.xml | 2 +- wsmaster/che-core-api-user/pom.xml | 2 +- wsmaster/che-core-api-workspace-activity/pom.xml | 2 +- wsmaster/che-core-api-workspace-shared/pom.xml | 2 +- wsmaster/che-core-api-workspace/pom.xml | 2 +- wsmaster/che-core-sql-schema/pom.xml | 2 +- wsmaster/integration-tests/cascade-removal/pom.xml | 2 +- wsmaster/integration-tests/mysql-tck/pom.xml | 2 +- wsmaster/integration-tests/pom.xml | 2 +- wsmaster/integration-tests/postgresql-tck/pom.xml | 2 +- wsmaster/pom.xml | 2 +- 111 files changed, 112 insertions(+), 112 deletions(-) diff --git a/assembly/assembly-che-tomcat/pom.xml b/assembly/assembly-che-tomcat/pom.xml index 8eab9fa87a..094b6be060 100644 --- a/assembly/assembly-che-tomcat/pom.xml +++ b/assembly/assembly-che-tomcat/pom.xml @@ -17,7 +17,7 @@ che-assembly-parent org.eclipse.che - 7.72.0-SNAPSHOT + 7.73.0-SNAPSHOT assembly-che-tomcat jar diff --git a/assembly/assembly-main/pom.xml b/assembly/assembly-main/pom.xml index 0075959bd1..8c5f524ece 100644 --- a/assembly/assembly-main/pom.xml +++ b/assembly/assembly-main/pom.xml @@ -17,7 +17,7 @@ che-assembly-parent org.eclipse.che - 7.72.0-SNAPSHOT + 7.73.0-SNAPSHOT assembly-main pom diff --git a/assembly/assembly-root-war/pom.xml b/assembly/assembly-root-war/pom.xml index e1ba9c35d8..c76de79321 100644 --- a/assembly/assembly-root-war/pom.xml +++ b/assembly/assembly-root-war/pom.xml @@ -17,7 +17,7 @@ che-assembly-parent org.eclipse.che - 7.72.0-SNAPSHOT + 7.73.0-SNAPSHOT assembly-root-war war diff --git a/assembly/assembly-swagger-war/pom.xml b/assembly/assembly-swagger-war/pom.xml index 51d2086502..0b7ee94124 100644 --- a/assembly/assembly-swagger-war/pom.xml +++ b/assembly/assembly-swagger-war/pom.xml @@ -17,7 +17,7 @@ che-assembly-parent org.eclipse.che - 7.72.0-SNAPSHOT + 7.73.0-SNAPSHOT assembly-swagger-war war diff --git a/assembly/assembly-wsmaster-war/pom.xml b/assembly/assembly-wsmaster-war/pom.xml index c8021dfc0f..ad1befadac 100644 --- a/assembly/assembly-wsmaster-war/pom.xml +++ b/assembly/assembly-wsmaster-war/pom.xml @@ -17,7 +17,7 @@ che-assembly-parent org.eclipse.che - 7.72.0-SNAPSHOT + 7.73.0-SNAPSHOT assembly-wsmaster-war war diff --git a/assembly/pom.xml b/assembly/pom.xml index 3a9c30c3c1..cb151feffe 100644 --- a/assembly/pom.xml +++ b/assembly/pom.xml @@ -17,7 +17,7 @@ che-server org.eclipse.che - 7.72.0-SNAPSHOT + 7.73.0-SNAPSHOT ../pom.xml che-assembly-parent diff --git a/core/che-core-api-core/pom.xml b/core/che-core-api-core/pom.xml index 2e66ef4b46..bb30598867 100644 --- a/core/che-core-api-core/pom.xml +++ b/core/che-core-api-core/pom.xml @@ -17,7 +17,7 @@ che-core-parent org.eclipse.che.core - 7.72.0-SNAPSHOT + 7.73.0-SNAPSHOT che-core-api-core jar diff --git a/core/che-core-api-dto-maven-plugin/pom.xml b/core/che-core-api-dto-maven-plugin/pom.xml index bb2f625b0d..3cfc56ca14 100644 --- a/core/che-core-api-dto-maven-plugin/pom.xml +++ b/core/che-core-api-dto-maven-plugin/pom.xml @@ -17,7 +17,7 @@ che-core-parent org.eclipse.che.core - 7.72.0-SNAPSHOT + 7.73.0-SNAPSHOT che-core-api-dto-maven-plugin maven-plugin diff --git a/core/che-core-api-dto/pom.xml b/core/che-core-api-dto/pom.xml index 5bdd9d2ba3..718a68d2c6 100644 --- a/core/che-core-api-dto/pom.xml +++ b/core/che-core-api-dto/pom.xml @@ -17,7 +17,7 @@ che-core-parent org.eclipse.che.core - 7.72.0-SNAPSHOT + 7.73.0-SNAPSHOT che-core-api-dto jar diff --git a/core/che-core-api-model/pom.xml b/core/che-core-api-model/pom.xml index 7a95350e60..d94b734f73 100644 --- a/core/che-core-api-model/pom.xml +++ b/core/che-core-api-model/pom.xml @@ -17,7 +17,7 @@ che-core-parent org.eclipse.che.core - 7.72.0-SNAPSHOT + 7.73.0-SNAPSHOT che-core-api-model jar diff --git a/core/che-core-db-vendor-h2/pom.xml b/core/che-core-db-vendor-h2/pom.xml index e6de04e8e9..e82e7a3f77 100644 --- a/core/che-core-db-vendor-h2/pom.xml +++ b/core/che-core-db-vendor-h2/pom.xml @@ -17,7 +17,7 @@ che-core-parent org.eclipse.che.core - 7.72.0-SNAPSHOT + 7.73.0-SNAPSHOT che-core-db-vendor-h2 Che Core :: Commons :: DB :: Vendor H2 diff --git a/core/che-core-db-vendor-mysql/pom.xml b/core/che-core-db-vendor-mysql/pom.xml index 1ca54abaa3..fc8b213916 100644 --- a/core/che-core-db-vendor-mysql/pom.xml +++ b/core/che-core-db-vendor-mysql/pom.xml @@ -17,7 +17,7 @@ che-core-parent org.eclipse.che.core - 7.72.0-SNAPSHOT + 7.73.0-SNAPSHOT che-core-db-vendor-mysql Che Core :: Commons :: DB :: Vendor MySQL diff --git a/core/che-core-db-vendor-postgresql/pom.xml b/core/che-core-db-vendor-postgresql/pom.xml index f72e732cb0..6b63b5a394 100644 --- a/core/che-core-db-vendor-postgresql/pom.xml +++ b/core/che-core-db-vendor-postgresql/pom.xml @@ -17,7 +17,7 @@ che-core-parent org.eclipse.che.core - 7.72.0-SNAPSHOT + 7.73.0-SNAPSHOT che-core-db-vendor-postgresql Che Core :: Commons :: DB :: Vendor PostgreSQL diff --git a/core/che-core-db/pom.xml b/core/che-core-db/pom.xml index 66b39d810a..9fc7ad03ec 100644 --- a/core/che-core-db/pom.xml +++ b/core/che-core-db/pom.xml @@ -17,7 +17,7 @@ che-core-parent org.eclipse.che.core - 7.72.0-SNAPSHOT + 7.73.0-SNAPSHOT che-core-db Che Core :: Commons :: DB diff --git a/core/che-core-logback/pom.xml b/core/che-core-logback/pom.xml index 2e5a699c58..d92a72b950 100644 --- a/core/che-core-logback/pom.xml +++ b/core/che-core-logback/pom.xml @@ -17,7 +17,7 @@ che-core-parent org.eclipse.che.core - 7.72.0-SNAPSHOT + 7.73.0-SNAPSHOT che-core-logback jar diff --git a/core/che-core-metrics-core/pom.xml b/core/che-core-metrics-core/pom.xml index d22b6236e6..af0d5f8346 100644 --- a/core/che-core-metrics-core/pom.xml +++ b/core/che-core-metrics-core/pom.xml @@ -17,7 +17,7 @@ che-core-parent org.eclipse.che.core - 7.72.0-SNAPSHOT + 7.73.0-SNAPSHOT che-core-metrics-core Che Core :: Commons :: Metrics :: Core diff --git a/core/che-core-tracing-core/pom.xml b/core/che-core-tracing-core/pom.xml index e4e2ac0a31..ab4e3900ae 100644 --- a/core/che-core-tracing-core/pom.xml +++ b/core/che-core-tracing-core/pom.xml @@ -17,7 +17,7 @@ che-core-parent org.eclipse.che.core - 7.72.0-SNAPSHOT + 7.73.0-SNAPSHOT che-core-tracing-core Che Core :: Commons :: Tracing :: Core diff --git a/core/che-core-tracing-metrics/pom.xml b/core/che-core-tracing-metrics/pom.xml index cb2ec30366..47cd7fe74f 100644 --- a/core/che-core-tracing-metrics/pom.xml +++ b/core/che-core-tracing-metrics/pom.xml @@ -17,7 +17,7 @@ che-core-parent org.eclipse.che.core - 7.72.0-SNAPSHOT + 7.73.0-SNAPSHOT che-core-tracing-metrics Che Core :: Commons :: Tracing :: Metrics diff --git a/core/che-core-tracing-web/pom.xml b/core/che-core-tracing-web/pom.xml index 3c3b40cfd2..a862156471 100644 --- a/core/che-core-tracing-web/pom.xml +++ b/core/che-core-tracing-web/pom.xml @@ -17,7 +17,7 @@ che-core-parent org.eclipse.che.core - 7.72.0-SNAPSHOT + 7.73.0-SNAPSHOT che-core-tracing-web Che Core :: Commons :: Tracing :: Web diff --git a/core/che-core-typescript-dto-maven-plugin/pom.xml b/core/che-core-typescript-dto-maven-plugin/pom.xml index 42a0110232..59cef8ef02 100644 --- a/core/che-core-typescript-dto-maven-plugin/pom.xml +++ b/core/che-core-typescript-dto-maven-plugin/pom.xml @@ -17,7 +17,7 @@ che-core-parent org.eclipse.che.core - 7.72.0-SNAPSHOT + 7.73.0-SNAPSHOT che-core-typescript-dto-maven-plugin maven-plugin diff --git a/core/commons/che-core-commons-annotations/pom.xml b/core/commons/che-core-commons-annotations/pom.xml index fa1adb355e..f79f096147 100644 --- a/core/commons/che-core-commons-annotations/pom.xml +++ b/core/commons/che-core-commons-annotations/pom.xml @@ -17,7 +17,7 @@ che-core-commons-parent org.eclipse.che.core - 7.72.0-SNAPSHOT + 7.73.0-SNAPSHOT che-core-commons-annotations jar diff --git a/core/commons/che-core-commons-inject/pom.xml b/core/commons/che-core-commons-inject/pom.xml index 6a91be07e3..a4ec8e7a19 100644 --- a/core/commons/che-core-commons-inject/pom.xml +++ b/core/commons/che-core-commons-inject/pom.xml @@ -17,7 +17,7 @@ che-core-commons-parent org.eclipse.che.core - 7.72.0-SNAPSHOT + 7.73.0-SNAPSHOT che-core-commons-inject jar diff --git a/core/commons/che-core-commons-j2ee/pom.xml b/core/commons/che-core-commons-j2ee/pom.xml index 5b2540fd93..b52ae033cc 100644 --- a/core/commons/che-core-commons-j2ee/pom.xml +++ b/core/commons/che-core-commons-j2ee/pom.xml @@ -17,7 +17,7 @@ che-core-commons-parent org.eclipse.che.core - 7.72.0-SNAPSHOT + 7.73.0-SNAPSHOT che-core-commons-j2ee jar diff --git a/core/commons/che-core-commons-json/pom.xml b/core/commons/che-core-commons-json/pom.xml index 3a66f7bebc..131fa323a5 100644 --- a/core/commons/che-core-commons-json/pom.xml +++ b/core/commons/che-core-commons-json/pom.xml @@ -17,7 +17,7 @@ che-core-commons-parent org.eclipse.che.core - 7.72.0-SNAPSHOT + 7.73.0-SNAPSHOT che-core-commons-json jar diff --git a/core/commons/che-core-commons-lang/pom.xml b/core/commons/che-core-commons-lang/pom.xml index 23f0ac93e9..56b9f61417 100644 --- a/core/commons/che-core-commons-lang/pom.xml +++ b/core/commons/che-core-commons-lang/pom.xml @@ -17,7 +17,7 @@ che-core-commons-parent org.eclipse.che.core - 7.72.0-SNAPSHOT + 7.73.0-SNAPSHOT che-core-commons-lang jar diff --git a/core/commons/che-core-commons-observability/pom.xml b/core/commons/che-core-commons-observability/pom.xml index d7bd470e44..27b3f9cceb 100644 --- a/core/commons/che-core-commons-observability/pom.xml +++ b/core/commons/che-core-commons-observability/pom.xml @@ -17,7 +17,7 @@ che-core-commons-parent org.eclipse.che.core - 7.72.0-SNAPSHOT + 7.73.0-SNAPSHOT che-core-commons-observability Che Core :: Commons :: Tracing and Monitoring wrapper diff --git a/core/commons/che-core-commons-schedule/pom.xml b/core/commons/che-core-commons-schedule/pom.xml index f4473b7082..8d1526e2c0 100644 --- a/core/commons/che-core-commons-schedule/pom.xml +++ b/core/commons/che-core-commons-schedule/pom.xml @@ -17,7 +17,7 @@ che-core-commons-parent org.eclipse.che.core - 7.72.0-SNAPSHOT + 7.73.0-SNAPSHOT che-core-commons-schedule jar diff --git a/core/commons/che-core-commons-test/pom.xml b/core/commons/che-core-commons-test/pom.xml index 94b725d077..7de1eb1e77 100644 --- a/core/commons/che-core-commons-test/pom.xml +++ b/core/commons/che-core-commons-test/pom.xml @@ -17,7 +17,7 @@ che-core-commons-parent org.eclipse.che.core - 7.72.0-SNAPSHOT + 7.73.0-SNAPSHOT che-core-commons-test jar diff --git a/core/commons/che-core-commons-tracing/pom.xml b/core/commons/che-core-commons-tracing/pom.xml index b609843049..c766f4fc45 100644 --- a/core/commons/che-core-commons-tracing/pom.xml +++ b/core/commons/che-core-commons-tracing/pom.xml @@ -17,7 +17,7 @@ che-core-commons-parent org.eclipse.che.core - 7.72.0-SNAPSHOT + 7.73.0-SNAPSHOT che-core-commons-tracing Che Core :: Commons :: Tracing diff --git a/core/commons/pom.xml b/core/commons/pom.xml index 91f74f441c..f7a126b7c4 100644 --- a/core/commons/pom.xml +++ b/core/commons/pom.xml @@ -17,7 +17,7 @@ che-core-parent org.eclipse.che.core - 7.72.0-SNAPSHOT + 7.73.0-SNAPSHOT ../pom.xml che-core-commons-parent diff --git a/core/pom.xml b/core/pom.xml index 189c41af61..0112b04192 100644 --- a/core/pom.xml +++ b/core/pom.xml @@ -17,7 +17,7 @@ che-server org.eclipse.che - 7.72.0-SNAPSHOT + 7.73.0-SNAPSHOT ../pom.xml org.eclipse.che.core diff --git a/infrastructures/infrastructure-distributed/pom.xml b/infrastructures/infrastructure-distributed/pom.xml index 18f8e90c3e..6e24cf7e1f 100644 --- a/infrastructures/infrastructure-distributed/pom.xml +++ b/infrastructures/infrastructure-distributed/pom.xml @@ -17,7 +17,7 @@ che-infrastructures-parent org.eclipse.che.infrastructure - 7.72.0-SNAPSHOT + 7.73.0-SNAPSHOT infrastructure-distributed jar diff --git a/infrastructures/infrastructure-factory/pom.xml b/infrastructures/infrastructure-factory/pom.xml index 1739dd5ee3..143a6ccf4d 100644 --- a/infrastructures/infrastructure-factory/pom.xml +++ b/infrastructures/infrastructure-factory/pom.xml @@ -17,7 +17,7 @@ che-infrastructures-parent org.eclipse.che.infrastructure - 7.72.0-SNAPSHOT + 7.73.0-SNAPSHOT infrastructure-factory jar diff --git a/infrastructures/infrastructure-metrics/pom.xml b/infrastructures/infrastructure-metrics/pom.xml index 62eb590e67..dc6ad89539 100644 --- a/infrastructures/infrastructure-metrics/pom.xml +++ b/infrastructures/infrastructure-metrics/pom.xml @@ -17,7 +17,7 @@ che-infrastructures-parent org.eclipse.che.infrastructure - 7.72.0-SNAPSHOT + 7.73.0-SNAPSHOT ../pom.xml infrastructure-metrics diff --git a/infrastructures/infrastructure-permission/pom.xml b/infrastructures/infrastructure-permission/pom.xml index f108b6d966..42347db8a0 100644 --- a/infrastructures/infrastructure-permission/pom.xml +++ b/infrastructures/infrastructure-permission/pom.xml @@ -17,7 +17,7 @@ che-infrastructures-parent org.eclipse.che.infrastructure - 7.72.0-SNAPSHOT + 7.73.0-SNAPSHOT infrastructure-permission Infrastructure :: Kubernetes Permissions diff --git a/infrastructures/kubernetes/pom.xml b/infrastructures/kubernetes/pom.xml index 16617afeca..12e1b97366 100644 --- a/infrastructures/kubernetes/pom.xml +++ b/infrastructures/kubernetes/pom.xml @@ -17,7 +17,7 @@ che-infrastructures-parent org.eclipse.che.infrastructure - 7.72.0-SNAPSHOT + 7.73.0-SNAPSHOT infrastructure-kubernetes Infrastructure :: Kubernetes diff --git a/infrastructures/openshift/pom.xml b/infrastructures/openshift/pom.xml index 200ec8a7ca..6f2fa5d10f 100644 --- a/infrastructures/openshift/pom.xml +++ b/infrastructures/openshift/pom.xml @@ -17,7 +17,7 @@ che-infrastructures-parent org.eclipse.che.infrastructure - 7.72.0-SNAPSHOT + 7.73.0-SNAPSHOT infrastructure-openshift Infrastructure :: OpenShift diff --git a/infrastructures/pom.xml b/infrastructures/pom.xml index 8e98b1a1c1..7c8a411597 100644 --- a/infrastructures/pom.xml +++ b/infrastructures/pom.xml @@ -17,7 +17,7 @@ che-server org.eclipse.che - 7.72.0-SNAPSHOT + 7.73.0-SNAPSHOT ../pom.xml org.eclipse.che.infrastructure diff --git a/multiuser/api/che-multiuser-api-authentication-commons/pom.xml b/multiuser/api/che-multiuser-api-authentication-commons/pom.xml index cad3ee5042..2a6e23c7df 100644 --- a/multiuser/api/che-multiuser-api-authentication-commons/pom.xml +++ b/multiuser/api/che-multiuser-api-authentication-commons/pom.xml @@ -17,7 +17,7 @@ che-multiuser-api org.eclipse.che.multiuser - 7.72.0-SNAPSHOT + 7.73.0-SNAPSHOT che-multiuser-api-authentication-commons jar diff --git a/multiuser/api/che-multiuser-api-authorization-impl/pom.xml b/multiuser/api/che-multiuser-api-authorization-impl/pom.xml index e04b8c95d5..497f90be3c 100644 --- a/multiuser/api/che-multiuser-api-authorization-impl/pom.xml +++ b/multiuser/api/che-multiuser-api-authorization-impl/pom.xml @@ -17,7 +17,7 @@ che-multiuser-api org.eclipse.che.multiuser - 7.72.0-SNAPSHOT + 7.73.0-SNAPSHOT che-multiuser-api-authorization-impl jar diff --git a/multiuser/api/che-multiuser-api-authorization/pom.xml b/multiuser/api/che-multiuser-api-authorization/pom.xml index 2cbd4c8075..79dcdd2888 100644 --- a/multiuser/api/che-multiuser-api-authorization/pom.xml +++ b/multiuser/api/che-multiuser-api-authorization/pom.xml @@ -17,7 +17,7 @@ che-multiuser-api org.eclipse.che.multiuser - 7.72.0-SNAPSHOT + 7.73.0-SNAPSHOT che-multiuser-api-authorization jar diff --git a/multiuser/api/che-multiuser-api-organization-shared/pom.xml b/multiuser/api/che-multiuser-api-organization-shared/pom.xml index eaa6dbbbd3..2da06a8685 100644 --- a/multiuser/api/che-multiuser-api-organization-shared/pom.xml +++ b/multiuser/api/che-multiuser-api-organization-shared/pom.xml @@ -17,7 +17,7 @@ che-multiuser-api org.eclipse.che.multiuser - 7.72.0-SNAPSHOT + 7.73.0-SNAPSHOT che-multiuser-api-organization-shared jar diff --git a/multiuser/api/che-multiuser-api-organization/pom.xml b/multiuser/api/che-multiuser-api-organization/pom.xml index cdd563865c..fab10b7eb1 100644 --- a/multiuser/api/che-multiuser-api-organization/pom.xml +++ b/multiuser/api/che-multiuser-api-organization/pom.xml @@ -17,7 +17,7 @@ che-multiuser-api org.eclipse.che.multiuser - 7.72.0-SNAPSHOT + 7.73.0-SNAPSHOT che-multiuser-api-organization jar diff --git a/multiuser/api/che-multiuser-api-permission-shared/pom.xml b/multiuser/api/che-multiuser-api-permission-shared/pom.xml index a205ca81ce..dfef2af1a9 100644 --- a/multiuser/api/che-multiuser-api-permission-shared/pom.xml +++ b/multiuser/api/che-multiuser-api-permission-shared/pom.xml @@ -17,7 +17,7 @@ che-multiuser-api org.eclipse.che.multiuser - 7.72.0-SNAPSHOT + 7.73.0-SNAPSHOT che-multiuser-api-permission-shared jar diff --git a/multiuser/api/che-multiuser-api-permission/pom.xml b/multiuser/api/che-multiuser-api-permission/pom.xml index 2fc5e728bf..9e0ac6b758 100644 --- a/multiuser/api/che-multiuser-api-permission/pom.xml +++ b/multiuser/api/che-multiuser-api-permission/pom.xml @@ -17,7 +17,7 @@ che-multiuser-api org.eclipse.che.multiuser - 7.72.0-SNAPSHOT + 7.73.0-SNAPSHOT che-multiuser-api-permission jar diff --git a/multiuser/api/che-multiuser-api-resource-shared/pom.xml b/multiuser/api/che-multiuser-api-resource-shared/pom.xml index 45b117e786..fa1db4fa1b 100644 --- a/multiuser/api/che-multiuser-api-resource-shared/pom.xml +++ b/multiuser/api/che-multiuser-api-resource-shared/pom.xml @@ -17,7 +17,7 @@ che-multiuser-api org.eclipse.che.multiuser - 7.72.0-SNAPSHOT + 7.73.0-SNAPSHOT che-multiuser-api-resource-shared jar diff --git a/multiuser/api/che-multiuser-api-resource/pom.xml b/multiuser/api/che-multiuser-api-resource/pom.xml index ff492ebba2..4519c5759b 100644 --- a/multiuser/api/che-multiuser-api-resource/pom.xml +++ b/multiuser/api/che-multiuser-api-resource/pom.xml @@ -17,7 +17,7 @@ che-multiuser-api org.eclipse.che.multiuser - 7.72.0-SNAPSHOT + 7.73.0-SNAPSHOT che-multiuser-api-resource jar diff --git a/multiuser/api/che-multiuser-api-workspace-activity/pom.xml b/multiuser/api/che-multiuser-api-workspace-activity/pom.xml index 90483354fa..c93c7b3be2 100644 --- a/multiuser/api/che-multiuser-api-workspace-activity/pom.xml +++ b/multiuser/api/che-multiuser-api-workspace-activity/pom.xml @@ -17,7 +17,7 @@ che-multiuser-api org.eclipse.che.multiuser - 7.72.0-SNAPSHOT + 7.73.0-SNAPSHOT che-multiuser-api-workspace-activity jar diff --git a/multiuser/api/pom.xml b/multiuser/api/pom.xml index 13e917fffe..8ab3ab656c 100644 --- a/multiuser/api/pom.xml +++ b/multiuser/api/pom.xml @@ -17,7 +17,7 @@ che-multiuser-parent org.eclipse.che.multiuser - 7.72.0-SNAPSHOT + 7.73.0-SNAPSHOT ../pom.xml che-multiuser-api diff --git a/multiuser/integration-tests/che-multiuser-cascade-removal/pom.xml b/multiuser/integration-tests/che-multiuser-cascade-removal/pom.xml index 551dbfc35e..2ec0523475 100644 --- a/multiuser/integration-tests/che-multiuser-cascade-removal/pom.xml +++ b/multiuser/integration-tests/che-multiuser-cascade-removal/pom.xml @@ -17,7 +17,7 @@ che-multiuser-integration-tests org.eclipse.che.multiuser - 7.72.0-SNAPSHOT + 7.73.0-SNAPSHOT che-multiuser-cascade-removal jar diff --git a/multiuser/integration-tests/che-multiuser-mysql-tck/pom.xml b/multiuser/integration-tests/che-multiuser-mysql-tck/pom.xml index ddd397dd4c..fa6c42c9a9 100644 --- a/multiuser/integration-tests/che-multiuser-mysql-tck/pom.xml +++ b/multiuser/integration-tests/che-multiuser-mysql-tck/pom.xml @@ -17,7 +17,7 @@ che-multiuser-integration-tests org.eclipse.che.multiuser - 7.72.0-SNAPSHOT + 7.73.0-SNAPSHOT che-multiuser-mysql-tck jar diff --git a/multiuser/integration-tests/che-multiuser-postgresql-tck/pom.xml b/multiuser/integration-tests/che-multiuser-postgresql-tck/pom.xml index c3e51efe5a..8b27226771 100644 --- a/multiuser/integration-tests/che-multiuser-postgresql-tck/pom.xml +++ b/multiuser/integration-tests/che-multiuser-postgresql-tck/pom.xml @@ -17,7 +17,7 @@ che-multiuser-integration-tests org.eclipse.che.multiuser - 7.72.0-SNAPSHOT + 7.73.0-SNAPSHOT che-multiuser-postgresql-tck jar diff --git a/multiuser/integration-tests/pom.xml b/multiuser/integration-tests/pom.xml index a575bf458e..7aeab72bec 100644 --- a/multiuser/integration-tests/pom.xml +++ b/multiuser/integration-tests/pom.xml @@ -17,7 +17,7 @@ che-multiuser-parent org.eclipse.che.multiuser - 7.72.0-SNAPSHOT + 7.73.0-SNAPSHOT che-multiuser-integration-tests pom diff --git a/multiuser/keycloak/che-multiuser-keycloak-server/pom.xml b/multiuser/keycloak/che-multiuser-keycloak-server/pom.xml index 0eb6d01b7c..b7af3554ea 100644 --- a/multiuser/keycloak/che-multiuser-keycloak-server/pom.xml +++ b/multiuser/keycloak/che-multiuser-keycloak-server/pom.xml @@ -17,7 +17,7 @@ che-multiuser-keycloak org.eclipse.che.multiuser - 7.72.0-SNAPSHOT + 7.73.0-SNAPSHOT che-multiuser-keycloak-server jar diff --git a/multiuser/keycloak/che-multiuser-keycloak-shared/pom.xml b/multiuser/keycloak/che-multiuser-keycloak-shared/pom.xml index b1811c2540..f79bc49861 100644 --- a/multiuser/keycloak/che-multiuser-keycloak-shared/pom.xml +++ b/multiuser/keycloak/che-multiuser-keycloak-shared/pom.xml @@ -17,7 +17,7 @@ che-multiuser-keycloak org.eclipse.che.multiuser - 7.72.0-SNAPSHOT + 7.73.0-SNAPSHOT che-multiuser-keycloak-shared jar diff --git a/multiuser/keycloak/che-multiuser-keycloak-token-provider/pom.xml b/multiuser/keycloak/che-multiuser-keycloak-token-provider/pom.xml index 7ab80f58d4..219b9b41b5 100644 --- a/multiuser/keycloak/che-multiuser-keycloak-token-provider/pom.xml +++ b/multiuser/keycloak/che-multiuser-keycloak-token-provider/pom.xml @@ -17,7 +17,7 @@ che-multiuser-keycloak org.eclipse.che.multiuser - 7.72.0-SNAPSHOT + 7.73.0-SNAPSHOT che-multiuser-keycloak-token-provider Che Multiuser :: Keycloak Token Provider diff --git a/multiuser/keycloak/che-multiuser-keycloak-user-remover/pom.xml b/multiuser/keycloak/che-multiuser-keycloak-user-remover/pom.xml index 488dcb0417..f2cb08bd69 100644 --- a/multiuser/keycloak/che-multiuser-keycloak-user-remover/pom.xml +++ b/multiuser/keycloak/che-multiuser-keycloak-user-remover/pom.xml @@ -17,7 +17,7 @@ che-multiuser-keycloak org.eclipse.che.multiuser - 7.72.0-SNAPSHOT + 7.73.0-SNAPSHOT che-multiuser-keycloak-user-remover jar diff --git a/multiuser/keycloak/pom.xml b/multiuser/keycloak/pom.xml index bffcc68e3c..e4c69e29b0 100644 --- a/multiuser/keycloak/pom.xml +++ b/multiuser/keycloak/pom.xml @@ -17,7 +17,7 @@ che-multiuser-parent org.eclipse.che.multiuser - 7.72.0-SNAPSHOT + 7.73.0-SNAPSHOT ../pom.xml che-multiuser-keycloak diff --git a/multiuser/machine-auth/che-multiuser-machine-authentication-shared/pom.xml b/multiuser/machine-auth/che-multiuser-machine-authentication-shared/pom.xml index cffd9be5ea..aa40b09846 100644 --- a/multiuser/machine-auth/che-multiuser-machine-authentication-shared/pom.xml +++ b/multiuser/machine-auth/che-multiuser-machine-authentication-shared/pom.xml @@ -17,7 +17,7 @@ che-multiuser-machine-auth org.eclipse.che.multiuser - 7.72.0-SNAPSHOT + 7.73.0-SNAPSHOT che-multiuser-machine-authentication-shared jar diff --git a/multiuser/machine-auth/che-multiuser-machine-authentication/pom.xml b/multiuser/machine-auth/che-multiuser-machine-authentication/pom.xml index 535821c495..1282022396 100644 --- a/multiuser/machine-auth/che-multiuser-machine-authentication/pom.xml +++ b/multiuser/machine-auth/che-multiuser-machine-authentication/pom.xml @@ -17,7 +17,7 @@ che-multiuser-machine-auth org.eclipse.che.multiuser - 7.72.0-SNAPSHOT + 7.73.0-SNAPSHOT che-multiuser-machine-authentication jar diff --git a/multiuser/machine-auth/pom.xml b/multiuser/machine-auth/pom.xml index 636655fd39..66077ae0af 100644 --- a/multiuser/machine-auth/pom.xml +++ b/multiuser/machine-auth/pom.xml @@ -17,7 +17,7 @@ che-multiuser-parent org.eclipse.che.multiuser - 7.72.0-SNAPSHOT + 7.73.0-SNAPSHOT ../pom.xml che-multiuser-machine-auth diff --git a/multiuser/oidc/pom.xml b/multiuser/oidc/pom.xml index 33d9d2e0cb..c00804f16e 100644 --- a/multiuser/oidc/pom.xml +++ b/multiuser/oidc/pom.xml @@ -17,7 +17,7 @@ che-multiuser-parent org.eclipse.che.multiuser - 7.72.0-SNAPSHOT + 7.73.0-SNAPSHOT che-multiuser-oidc jar diff --git a/multiuser/permission/che-multiuser-permission-devfile/pom.xml b/multiuser/permission/che-multiuser-permission-devfile/pom.xml index e41af236da..35bbdd8550 100644 --- a/multiuser/permission/che-multiuser-permission-devfile/pom.xml +++ b/multiuser/permission/che-multiuser-permission-devfile/pom.xml @@ -17,7 +17,7 @@ che-multiuser-permission org.eclipse.che.multiuser - 7.72.0-SNAPSHOT + 7.73.0-SNAPSHOT che-multiuser-permission-devfile Che Multiuser :: Devfile Permissions diff --git a/multiuser/permission/che-multiuser-permission-logger/pom.xml b/multiuser/permission/che-multiuser-permission-logger/pom.xml index a0f1cfa1f1..e0bd8d3cfc 100644 --- a/multiuser/permission/che-multiuser-permission-logger/pom.xml +++ b/multiuser/permission/che-multiuser-permission-logger/pom.xml @@ -17,7 +17,7 @@ che-multiuser-permission org.eclipse.che.multiuser - 7.72.0-SNAPSHOT + 7.73.0-SNAPSHOT che-multiuser-permission-logger Che Multiuser :: Logger Permissions diff --git a/multiuser/permission/che-multiuser-permission-resource/pom.xml b/multiuser/permission/che-multiuser-permission-resource/pom.xml index 39e30a1d11..5816ca51e4 100644 --- a/multiuser/permission/che-multiuser-permission-resource/pom.xml +++ b/multiuser/permission/che-multiuser-permission-resource/pom.xml @@ -17,7 +17,7 @@ che-multiuser-permission org.eclipse.che.multiuser - 7.72.0-SNAPSHOT + 7.73.0-SNAPSHOT che-multiuser-permission-resource Che Multiuser :: Resource :: Permissions diff --git a/multiuser/permission/che-multiuser-permission-system/pom.xml b/multiuser/permission/che-multiuser-permission-system/pom.xml index 35b6315390..2c02a66aad 100644 --- a/multiuser/permission/che-multiuser-permission-system/pom.xml +++ b/multiuser/permission/che-multiuser-permission-system/pom.xml @@ -17,7 +17,7 @@ che-multiuser-permission org.eclipse.che.multiuser - 7.72.0-SNAPSHOT + 7.73.0-SNAPSHOT che-multiuser-permission-system Che Multiuser :: System Permissions diff --git a/multiuser/permission/che-multiuser-permission-user/pom.xml b/multiuser/permission/che-multiuser-permission-user/pom.xml index 00e87ebf31..d4b3dcb1b9 100644 --- a/multiuser/permission/che-multiuser-permission-user/pom.xml +++ b/multiuser/permission/che-multiuser-permission-user/pom.xml @@ -17,7 +17,7 @@ che-multiuser-permission org.eclipse.che.multiuser - 7.72.0-SNAPSHOT + 7.73.0-SNAPSHOT che-multiuser-permission-user Che Multiuser :: User Permissions diff --git a/multiuser/permission/che-multiuser-permission-workspace-activity/pom.xml b/multiuser/permission/che-multiuser-permission-workspace-activity/pom.xml index 2ee3873f5d..bf70752d9a 100644 --- a/multiuser/permission/che-multiuser-permission-workspace-activity/pom.xml +++ b/multiuser/permission/che-multiuser-permission-workspace-activity/pom.xml @@ -17,7 +17,7 @@ che-multiuser-permission org.eclipse.che.multiuser - 7.72.0-SNAPSHOT + 7.73.0-SNAPSHOT che-multiuser-permission-workspace-activity Che Multiuser :: Workspace Activity Permissions diff --git a/multiuser/permission/che-multiuser-permission-workspace/pom.xml b/multiuser/permission/che-multiuser-permission-workspace/pom.xml index 24a0d9e510..6f5a7ea553 100644 --- a/multiuser/permission/che-multiuser-permission-workspace/pom.xml +++ b/multiuser/permission/che-multiuser-permission-workspace/pom.xml @@ -17,7 +17,7 @@ che-multiuser-permission org.eclipse.che.multiuser - 7.72.0-SNAPSHOT + 7.73.0-SNAPSHOT che-multiuser-permission-workspace Che Multiuser :: Workspace Permissions diff --git a/multiuser/permission/pom.xml b/multiuser/permission/pom.xml index 7bbb52dc4b..3feedfaefb 100644 --- a/multiuser/permission/pom.xml +++ b/multiuser/permission/pom.xml @@ -17,7 +17,7 @@ che-multiuser-parent org.eclipse.che.multiuser - 7.72.0-SNAPSHOT + 7.73.0-SNAPSHOT ../pom.xml che-multiuser-permission diff --git a/multiuser/personal-account/pom.xml b/multiuser/personal-account/pom.xml index 2396b8a551..3e790130fe 100644 --- a/multiuser/personal-account/pom.xml +++ b/multiuser/personal-account/pom.xml @@ -17,7 +17,7 @@ che-multiuser-parent org.eclipse.che.multiuser - 7.72.0-SNAPSHOT + 7.73.0-SNAPSHOT che-multiuser-personal-account jar diff --git a/multiuser/pom.xml b/multiuser/pom.xml index 9b31560977..6bae24c14f 100644 --- a/multiuser/pom.xml +++ b/multiuser/pom.xml @@ -17,7 +17,7 @@ che-server org.eclipse.che - 7.72.0-SNAPSHOT + 7.73.0-SNAPSHOT ../pom.xml org.eclipse.che.multiuser diff --git a/multiuser/sql-schema/pom.xml b/multiuser/sql-schema/pom.xml index fdbc29f6ee..52d2d062b0 100644 --- a/multiuser/sql-schema/pom.xml +++ b/multiuser/sql-schema/pom.xml @@ -17,7 +17,7 @@ che-multiuser-parent org.eclipse.che.multiuser - 7.72.0-SNAPSHOT + 7.73.0-SNAPSHOT ../pom.xml che-multiuser-sql-schema diff --git a/pom.xml b/pom.xml index 5de11e82c0..2b8ffd1433 100644 --- a/pom.xml +++ b/pom.xml @@ -16,7 +16,7 @@ 4.0.0 org.eclipse.che che-server - 7.72.0-SNAPSHOT + 7.73.0-SNAPSHOT pom Che Server Eclipse Che Server @@ -100,7 +100,7 @@ Red Hat, Inc. - initial API and implementation ${project.version} - 7.72.0-SNAPSHOT + 7.73.0-SNAPSHOT 1.0-beta2 Red Hat, Inc. diff --git a/typescript-dto/dto-pom.xml b/typescript-dto/dto-pom.xml index 2c9c3bfad7..69facc90b5 100644 --- a/typescript-dto/dto-pom.xml +++ b/typescript-dto/dto-pom.xml @@ -23,7 +23,7 @@ pom Che TypeScript DTO - 7.72.0-SNAPSHOT + 7.73.0-SNAPSHOT diff --git a/wsmaster/che-core-api-account/pom.xml b/wsmaster/che-core-api-account/pom.xml index 991d8d2a04..bc9493b0c8 100644 --- a/wsmaster/che-core-api-account/pom.xml +++ b/wsmaster/che-core-api-account/pom.xml @@ -17,7 +17,7 @@ che-master-parent org.eclipse.che.core - 7.72.0-SNAPSHOT + 7.73.0-SNAPSHOT che-core-api-account Che Core :: API :: Account diff --git a/wsmaster/che-core-api-auth-azure-devops/pom.xml b/wsmaster/che-core-api-auth-azure-devops/pom.xml index 7bc8b24f5a..d525238c49 100644 --- a/wsmaster/che-core-api-auth-azure-devops/pom.xml +++ b/wsmaster/che-core-api-auth-azure-devops/pom.xml @@ -17,7 +17,7 @@ che-master-parent org.eclipse.che.core - 7.72.0-SNAPSHOT + 7.73.0-SNAPSHOT che-core-api-auth-azure-devops jar diff --git a/wsmaster/che-core-api-auth-bitbucket/pom.xml b/wsmaster/che-core-api-auth-bitbucket/pom.xml index 828f49f96f..ae6c39d18c 100644 --- a/wsmaster/che-core-api-auth-bitbucket/pom.xml +++ b/wsmaster/che-core-api-auth-bitbucket/pom.xml @@ -17,7 +17,7 @@ che-master-parent org.eclipse.che.core - 7.72.0-SNAPSHOT + 7.73.0-SNAPSHOT che-core-api-auth-bitbucket jar diff --git a/wsmaster/che-core-api-auth-github/pom.xml b/wsmaster/che-core-api-auth-github/pom.xml index 8f077a8163..8352670ffd 100644 --- a/wsmaster/che-core-api-auth-github/pom.xml +++ b/wsmaster/che-core-api-auth-github/pom.xml @@ -17,7 +17,7 @@ che-master-parent org.eclipse.che.core - 7.72.0-SNAPSHOT + 7.73.0-SNAPSHOT che-core-api-auth-github jar diff --git a/wsmaster/che-core-api-auth-gitlab/pom.xml b/wsmaster/che-core-api-auth-gitlab/pom.xml index 42950617c7..4c7a8f69d5 100644 --- a/wsmaster/che-core-api-auth-gitlab/pom.xml +++ b/wsmaster/che-core-api-auth-gitlab/pom.xml @@ -17,7 +17,7 @@ che-master-parent org.eclipse.che.core - 7.72.0-SNAPSHOT + 7.73.0-SNAPSHOT che-core-api-auth-gitlab jar diff --git a/wsmaster/che-core-api-auth-openshift/pom.xml b/wsmaster/che-core-api-auth-openshift/pom.xml index 67af6a1731..f6eb011e77 100644 --- a/wsmaster/che-core-api-auth-openshift/pom.xml +++ b/wsmaster/che-core-api-auth-openshift/pom.xml @@ -17,7 +17,7 @@ che-master-parent org.eclipse.che.core - 7.72.0-SNAPSHOT + 7.73.0-SNAPSHOT che-core-api-auth-openshift jar diff --git a/wsmaster/che-core-api-auth-shared/pom.xml b/wsmaster/che-core-api-auth-shared/pom.xml index 686f5670c7..2d99d35823 100644 --- a/wsmaster/che-core-api-auth-shared/pom.xml +++ b/wsmaster/che-core-api-auth-shared/pom.xml @@ -17,7 +17,7 @@ che-master-parent org.eclipse.che.core - 7.72.0-SNAPSHOT + 7.73.0-SNAPSHOT che-core-api-auth-shared jar diff --git a/wsmaster/che-core-api-auth/pom.xml b/wsmaster/che-core-api-auth/pom.xml index eecc334339..875d931776 100644 --- a/wsmaster/che-core-api-auth/pom.xml +++ b/wsmaster/che-core-api-auth/pom.xml @@ -17,7 +17,7 @@ che-master-parent org.eclipse.che.core - 7.72.0-SNAPSHOT + 7.73.0-SNAPSHOT che-core-api-auth jar diff --git a/wsmaster/che-core-api-devfile-shared/pom.xml b/wsmaster/che-core-api-devfile-shared/pom.xml index f12fb195a0..ab6f7924a1 100644 --- a/wsmaster/che-core-api-devfile-shared/pom.xml +++ b/wsmaster/che-core-api-devfile-shared/pom.xml @@ -17,7 +17,7 @@ che-master-parent org.eclipse.che.core - 7.72.0-SNAPSHOT + 7.73.0-SNAPSHOT che-core-api-devfile-shared jar diff --git a/wsmaster/che-core-api-devfile/pom.xml b/wsmaster/che-core-api-devfile/pom.xml index ca8c4b29bd..70a54b2599 100644 --- a/wsmaster/che-core-api-devfile/pom.xml +++ b/wsmaster/che-core-api-devfile/pom.xml @@ -17,7 +17,7 @@ che-master-parent org.eclipse.che.core - 7.72.0-SNAPSHOT + 7.73.0-SNAPSHOT che-core-api-devfile jar diff --git a/wsmaster/che-core-api-factory-azure-devops/pom.xml b/wsmaster/che-core-api-factory-azure-devops/pom.xml index fb91eac934..e6fb299ca2 100644 --- a/wsmaster/che-core-api-factory-azure-devops/pom.xml +++ b/wsmaster/che-core-api-factory-azure-devops/pom.xml @@ -17,7 +17,7 @@ che-master-parent org.eclipse.che.core - 7.72.0-SNAPSHOT + 7.73.0-SNAPSHOT che-core-api-factory-azure-devops jar diff --git a/wsmaster/che-core-api-factory-bitbucket-server/pom.xml b/wsmaster/che-core-api-factory-bitbucket-server/pom.xml index a22128b4da..d61b1c2a5c 100644 --- a/wsmaster/che-core-api-factory-bitbucket-server/pom.xml +++ b/wsmaster/che-core-api-factory-bitbucket-server/pom.xml @@ -17,7 +17,7 @@ che-master-parent org.eclipse.che.core - 7.72.0-SNAPSHOT + 7.73.0-SNAPSHOT che-core-api-factory-bitbucket-server jar diff --git a/wsmaster/che-core-api-factory-bitbucket/pom.xml b/wsmaster/che-core-api-factory-bitbucket/pom.xml index 838a17d168..9786fefc96 100644 --- a/wsmaster/che-core-api-factory-bitbucket/pom.xml +++ b/wsmaster/che-core-api-factory-bitbucket/pom.xml @@ -17,7 +17,7 @@ che-master-parent org.eclipse.che.core - 7.72.0-SNAPSHOT + 7.73.0-SNAPSHOT che-core-api-factory-bitbucket jar diff --git a/wsmaster/che-core-api-factory-git-ssh/pom.xml b/wsmaster/che-core-api-factory-git-ssh/pom.xml index 8b550b057c..7069c8ba1a 100644 --- a/wsmaster/che-core-api-factory-git-ssh/pom.xml +++ b/wsmaster/che-core-api-factory-git-ssh/pom.xml @@ -17,7 +17,7 @@ che-master-parent org.eclipse.che.core - 7.72.0-SNAPSHOT + 7.73.0-SNAPSHOT che-core-api-factory-git-ssh jar diff --git a/wsmaster/che-core-api-factory-github/pom.xml b/wsmaster/che-core-api-factory-github/pom.xml index 76584549c2..7f67f5d040 100644 --- a/wsmaster/che-core-api-factory-github/pom.xml +++ b/wsmaster/che-core-api-factory-github/pom.xml @@ -17,7 +17,7 @@ che-master-parent org.eclipse.che.core - 7.72.0-SNAPSHOT + 7.73.0-SNAPSHOT che-core-api-factory-github jar diff --git a/wsmaster/che-core-api-factory-gitlab/pom.xml b/wsmaster/che-core-api-factory-gitlab/pom.xml index 56d0a0fe4e..83260e991c 100644 --- a/wsmaster/che-core-api-factory-gitlab/pom.xml +++ b/wsmaster/che-core-api-factory-gitlab/pom.xml @@ -17,7 +17,7 @@ che-master-parent org.eclipse.che.core - 7.72.0-SNAPSHOT + 7.73.0-SNAPSHOT che-core-api-factory-gitlab jar diff --git a/wsmaster/che-core-api-factory-shared/pom.xml b/wsmaster/che-core-api-factory-shared/pom.xml index 2478539fe8..ee17f6694f 100644 --- a/wsmaster/che-core-api-factory-shared/pom.xml +++ b/wsmaster/che-core-api-factory-shared/pom.xml @@ -17,7 +17,7 @@ che-master-parent org.eclipse.che.core - 7.72.0-SNAPSHOT + 7.73.0-SNAPSHOT che-core-api-factory-shared jar diff --git a/wsmaster/che-core-api-factory/pom.xml b/wsmaster/che-core-api-factory/pom.xml index 93d33c3650..e2252ec26c 100644 --- a/wsmaster/che-core-api-factory/pom.xml +++ b/wsmaster/che-core-api-factory/pom.xml @@ -17,7 +17,7 @@ che-master-parent org.eclipse.che.core - 7.72.0-SNAPSHOT + 7.73.0-SNAPSHOT che-core-api-factory jar diff --git a/wsmaster/che-core-api-logger-shared/pom.xml b/wsmaster/che-core-api-logger-shared/pom.xml index 859cfed6f0..d515c15e73 100644 --- a/wsmaster/che-core-api-logger-shared/pom.xml +++ b/wsmaster/che-core-api-logger-shared/pom.xml @@ -17,7 +17,7 @@ che-master-parent org.eclipse.che.core - 7.72.0-SNAPSHOT + 7.73.0-SNAPSHOT che-core-api-logger-shared jar diff --git a/wsmaster/che-core-api-logger/pom.xml b/wsmaster/che-core-api-logger/pom.xml index 25a91657bd..a76ce28e58 100644 --- a/wsmaster/che-core-api-logger/pom.xml +++ b/wsmaster/che-core-api-logger/pom.xml @@ -17,7 +17,7 @@ che-master-parent org.eclipse.che.core - 7.72.0-SNAPSHOT + 7.73.0-SNAPSHOT che-core-api-logger jar diff --git a/wsmaster/che-core-api-metrics/pom.xml b/wsmaster/che-core-api-metrics/pom.xml index 5bf759c88e..4029b3f459 100644 --- a/wsmaster/che-core-api-metrics/pom.xml +++ b/wsmaster/che-core-api-metrics/pom.xml @@ -17,7 +17,7 @@ che-master-parent org.eclipse.che.core - 7.72.0-SNAPSHOT + 7.73.0-SNAPSHOT che-core-api-metrics jar diff --git a/wsmaster/che-core-api-ssh-shared/pom.xml b/wsmaster/che-core-api-ssh-shared/pom.xml index 5d190b3db1..7f50c8c543 100644 --- a/wsmaster/che-core-api-ssh-shared/pom.xml +++ b/wsmaster/che-core-api-ssh-shared/pom.xml @@ -17,7 +17,7 @@ che-master-parent org.eclipse.che.core - 7.72.0-SNAPSHOT + 7.73.0-SNAPSHOT che-core-api-ssh-shared jar diff --git a/wsmaster/che-core-api-ssh/pom.xml b/wsmaster/che-core-api-ssh/pom.xml index fb9a45f2e2..3cb7e3af54 100644 --- a/wsmaster/che-core-api-ssh/pom.xml +++ b/wsmaster/che-core-api-ssh/pom.xml @@ -17,7 +17,7 @@ che-master-parent org.eclipse.che.core - 7.72.0-SNAPSHOT + 7.73.0-SNAPSHOT che-core-api-ssh jar diff --git a/wsmaster/che-core-api-system-shared/pom.xml b/wsmaster/che-core-api-system-shared/pom.xml index c26eec8e24..fe30c5bb11 100644 --- a/wsmaster/che-core-api-system-shared/pom.xml +++ b/wsmaster/che-core-api-system-shared/pom.xml @@ -17,7 +17,7 @@ che-master-parent org.eclipse.che.core - 7.72.0-SNAPSHOT + 7.73.0-SNAPSHOT che-core-api-system-shared jar diff --git a/wsmaster/che-core-api-system/pom.xml b/wsmaster/che-core-api-system/pom.xml index e9eb6490a4..973ece02f6 100644 --- a/wsmaster/che-core-api-system/pom.xml +++ b/wsmaster/che-core-api-system/pom.xml @@ -17,7 +17,7 @@ che-master-parent org.eclipse.che.core - 7.72.0-SNAPSHOT + 7.73.0-SNAPSHOT che-core-api-system jar diff --git a/wsmaster/che-core-api-user-shared/pom.xml b/wsmaster/che-core-api-user-shared/pom.xml index a7249030ac..556832cb44 100644 --- a/wsmaster/che-core-api-user-shared/pom.xml +++ b/wsmaster/che-core-api-user-shared/pom.xml @@ -17,7 +17,7 @@ che-master-parent org.eclipse.che.core - 7.72.0-SNAPSHOT + 7.73.0-SNAPSHOT che-core-api-user-shared Che Core :: API :: User :: Shared diff --git a/wsmaster/che-core-api-user/pom.xml b/wsmaster/che-core-api-user/pom.xml index 737292b03d..d9327480f8 100644 --- a/wsmaster/che-core-api-user/pom.xml +++ b/wsmaster/che-core-api-user/pom.xml @@ -17,7 +17,7 @@ che-master-parent org.eclipse.che.core - 7.72.0-SNAPSHOT + 7.73.0-SNAPSHOT che-core-api-user Che Core :: API :: User diff --git a/wsmaster/che-core-api-workspace-activity/pom.xml b/wsmaster/che-core-api-workspace-activity/pom.xml index eda3fa58ac..38499fc800 100644 --- a/wsmaster/che-core-api-workspace-activity/pom.xml +++ b/wsmaster/che-core-api-workspace-activity/pom.xml @@ -17,7 +17,7 @@ che-master-parent org.eclipse.che.core - 7.72.0-SNAPSHOT + 7.73.0-SNAPSHOT che-core-api-workspace-activity jar diff --git a/wsmaster/che-core-api-workspace-shared/pom.xml b/wsmaster/che-core-api-workspace-shared/pom.xml index bb825850c4..1d38cd7d7c 100644 --- a/wsmaster/che-core-api-workspace-shared/pom.xml +++ b/wsmaster/che-core-api-workspace-shared/pom.xml @@ -17,7 +17,7 @@ che-master-parent org.eclipse.che.core - 7.72.0-SNAPSHOT + 7.73.0-SNAPSHOT che-core-api-workspace-shared jar diff --git a/wsmaster/che-core-api-workspace/pom.xml b/wsmaster/che-core-api-workspace/pom.xml index f60ad3c8d4..02fc8d87c6 100644 --- a/wsmaster/che-core-api-workspace/pom.xml +++ b/wsmaster/che-core-api-workspace/pom.xml @@ -17,7 +17,7 @@ che-master-parent org.eclipse.che.core - 7.72.0-SNAPSHOT + 7.73.0-SNAPSHOT che-core-api-workspace jar diff --git a/wsmaster/che-core-sql-schema/pom.xml b/wsmaster/che-core-sql-schema/pom.xml index 9f51d5e3bb..6f44c7ec34 100644 --- a/wsmaster/che-core-sql-schema/pom.xml +++ b/wsmaster/che-core-sql-schema/pom.xml @@ -17,7 +17,7 @@ che-master-parent org.eclipse.che.core - 7.72.0-SNAPSHOT + 7.73.0-SNAPSHOT che-core-sql-schema Che Core :: SQL :: Schema diff --git a/wsmaster/integration-tests/cascade-removal/pom.xml b/wsmaster/integration-tests/cascade-removal/pom.xml index 9c9afe6e44..76a95e20a1 100644 --- a/wsmaster/integration-tests/cascade-removal/pom.xml +++ b/wsmaster/integration-tests/cascade-removal/pom.xml @@ -17,7 +17,7 @@ integration-tests-parent org.eclipse.che.core - 7.72.0-SNAPSHOT + 7.73.0-SNAPSHOT cascade-removal Integration Tests :: Cascade Removal diff --git a/wsmaster/integration-tests/mysql-tck/pom.xml b/wsmaster/integration-tests/mysql-tck/pom.xml index 2f778bd1cb..df6348ca4c 100644 --- a/wsmaster/integration-tests/mysql-tck/pom.xml +++ b/wsmaster/integration-tests/mysql-tck/pom.xml @@ -17,7 +17,7 @@ integration-tests-parent org.eclipse.che.core - 7.72.0-SNAPSHOT + 7.73.0-SNAPSHOT mysql-tck jar diff --git a/wsmaster/integration-tests/pom.xml b/wsmaster/integration-tests/pom.xml index 01759b0338..6d83b92e29 100644 --- a/wsmaster/integration-tests/pom.xml +++ b/wsmaster/integration-tests/pom.xml @@ -17,7 +17,7 @@ che-master-parent org.eclipse.che.core - 7.72.0-SNAPSHOT + 7.73.0-SNAPSHOT ../pom.xml integration-tests-parent diff --git a/wsmaster/integration-tests/postgresql-tck/pom.xml b/wsmaster/integration-tests/postgresql-tck/pom.xml index 8cda76208a..57f09aae44 100644 --- a/wsmaster/integration-tests/postgresql-tck/pom.xml +++ b/wsmaster/integration-tests/postgresql-tck/pom.xml @@ -17,7 +17,7 @@ integration-tests-parent org.eclipse.che.core - 7.72.0-SNAPSHOT + 7.73.0-SNAPSHOT postgresql-tck jar diff --git a/wsmaster/pom.xml b/wsmaster/pom.xml index f5c3f2fb9b..0b3699f0d3 100644 --- a/wsmaster/pom.xml +++ b/wsmaster/pom.xml @@ -17,7 +17,7 @@ che-core-parent org.eclipse.che.core - 7.72.0-SNAPSHOT + 7.73.0-SNAPSHOT ../core/pom.xml che-master-parent From 0ea20e687b79190ed244f414c9753b546f8609d5 Mon Sep 17 00:00:00 2001 From: Igor Vinokur Date: Tue, 1 Aug 2023 21:36:14 +0300 Subject: [PATCH 39/75] Use `login` instead of `name` in the GitHub scopes/username request (#537) Change user.getName() to user.getLogin() in the GitHub getTokenScopes() API request, in order to fix a bug where NullPointer exception is appeared when a GitHub user request returns a user with null in the name field. --- .../che/api/factory/server/github/GithubApiClient.java | 2 +- .../che/api/factory/server/github/GithubApiClientTest.java | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/wsmaster/che-core-api-factory-github/src/main/java/org/eclipse/che/api/factory/server/github/GithubApiClient.java b/wsmaster/che-core-api-factory-github/src/main/java/org/eclipse/che/api/factory/server/github/GithubApiClient.java index b503da409d..8e9a4f5a50 100644 --- a/wsmaster/che-core-api-factory-github/src/main/java/org/eclipse/che/api/factory/server/github/GithubApiClient.java +++ b/wsmaster/che-core-api-factory-github/src/main/java/org/eclipse/che/api/factory/server/github/GithubApiClient.java @@ -228,7 +228,7 @@ public class GithubApiClient { String result = CharStreams.toString(new InputStreamReader(response.body(), Charsets.UTF_8)); GithubUser user = OBJECT_MAPPER.readValue(result, GithubUser.class); - return Pair.of(user.getName(), scopes); + return Pair.of(user.getLogin(), scopes); } catch (IOException e) { throw new UncheckedIOException(e); } diff --git a/wsmaster/che-core-api-factory-github/src/test/java/org/eclipse/che/api/factory/server/github/GithubApiClientTest.java b/wsmaster/che-core-api-factory-github/src/test/java/org/eclipse/che/api/factory/server/github/GithubApiClientTest.java index ebeaca3ff5..6e9e775d5f 100644 --- a/wsmaster/che-core-api-factory-github/src/test/java/org/eclipse/che/api/factory/server/github/GithubApiClientTest.java +++ b/wsmaster/che-core-api-factory-github/src/test/java/org/eclipse/che/api/factory/server/github/GithubApiClientTest.java @@ -36,6 +36,7 @@ import java.lang.reflect.Field; import org.eclipse.che.api.factory.server.scm.exception.ScmBadRequestException; import org.eclipse.che.api.factory.server.scm.exception.ScmCommunicationException; import org.eclipse.che.api.factory.server.scm.exception.ScmItemNotFoundException; +import org.eclipse.che.commons.lang.Pair; import org.mockito.testng.MockitoTestNGListener; import org.testng.annotations.AfterMethod; import org.testng.annotations.BeforeMethod; @@ -165,11 +166,13 @@ public class GithubApiClientTest { .withHeader(GithubApiClient.GITHUB_OAUTH_SCOPES_HEADER, "repo, user:email") .withBodyFile("github/rest/user/response.json"))); - String[] scopes = client.getTokenScopes("token1").second; + Pair pair = client.getTokenScopes("token1"); + String[] scopes = pair.second; String[] expectedScopes = {"repo", "user:email"}; assertNotNull(scopes, "GitHub API should have returned a non-null scope array"); assertEqualsNoOrder( scopes, expectedScopes, "Returned scope array does not match expected values"); + assertEquals(pair.first, "github-user"); } @Test From cb5c8aa4d2f542e4c86bb2af65dd0aa32b22674a Mon Sep 17 00:00:00 2001 From: che-bot <39771996+che-bot@users.noreply.github.com> Date: Mon, 14 Aug 2023 23:47:03 +0200 Subject: [PATCH 40/75] chore: Update from ubi8-minimal:8.8-1014 to ubi8-minimal:8.8-1037 (#542) Signed-off-by: Nick Boldt Co-authored-by: Nick Boldt --- dockerfiles/che/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dockerfiles/che/Dockerfile b/dockerfiles/che/Dockerfile index 73c7262246..91e4822ca6 100644 --- a/dockerfiles/che/Dockerfile +++ b/dockerfiles/che/Dockerfile @@ -10,7 +10,7 @@ # # https://access.redhat.com/containers/?tab=tags#/registry.access.redhat.com/ubi8-minimal -FROM registry.access.redhat.com/ubi8-minimal:8.8-1014 +FROM registry.access.redhat.com/ubi8-minimal:8.8-1037 USER root ENV CHE_HOME=/home/user/eclipse-che ENV JAVA_HOME=/usr/lib/jvm/jre From 73dbac0c446195166512998b9d63bdbe4ecb15f6 Mon Sep 17 00:00:00 2001 From: Igor Vinokur Date: Tue, 15 Aug 2023 14:37:13 +0300 Subject: [PATCH 41/75] Do not substring `.git` while parsing Azure DevOps Urls (#541) Do not substring .git while parsing Azure DevOps Urls. Azure doesn't add the .git suffix neither to the generated clone URLs nor to the browser repository URLs. --- .../server/azure/devops/AzureDevOpsURLParser.java | 4 ---- .../azure/devops/AzureDevOpsURLParserTest.java | 13 ++++++++++--- 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/wsmaster/che-core-api-factory-azure-devops/src/main/java/org/eclipse/che/api/factory/server/azure/devops/AzureDevOpsURLParser.java b/wsmaster/che-core-api-factory-azure-devops/src/main/java/org/eclipse/che/api/factory/server/azure/devops/AzureDevOpsURLParser.java index 6bfd60016c..a2aa19e19d 100644 --- a/wsmaster/che-core-api-factory-azure-devops/src/main/java/org/eclipse/che/api/factory/server/azure/devops/AzureDevOpsURLParser.java +++ b/wsmaster/che-core-api-factory-azure-devops/src/main/java/org/eclipse/che/api/factory/server/azure/devops/AzureDevOpsURLParser.java @@ -71,10 +71,6 @@ public class AzureDevOpsURLParser { } String repoName = matcher.group("repoName"); - if (repoName.endsWith(".git")) { - repoName = repoName.substring(0, repoName.length() - 4); - } - String project = matcher.group("project"); if (project == null) { // if project is not specified, repo name must be equal to project name diff --git a/wsmaster/che-core-api-factory-azure-devops/src/test/java/org/eclipse/che/api/factory/server/azure/devops/AzureDevOpsURLParserTest.java b/wsmaster/che-core-api-factory-azure-devops/src/test/java/org/eclipse/che/api/factory/server/azure/devops/AzureDevOpsURLParserTest.java index 3ef9faade6..0b6242612c 100644 --- a/wsmaster/che-core-api-factory-azure-devops/src/test/java/org/eclipse/che/api/factory/server/azure/devops/AzureDevOpsURLParserTest.java +++ b/wsmaster/che-core-api-factory-azure-devops/src/test/java/org/eclipse/che/api/factory/server/azure/devops/AzureDevOpsURLParserTest.java @@ -71,7 +71,7 @@ public class AzureDevOpsURLParserTest { "https://MyOrg@dev.azure.com/MyOrg/MyProject/_git/MyRepo.git", "MyOrg", "MyProject", - "MyRepo", + "MyRepo.git", null, null }, @@ -79,7 +79,7 @@ public class AzureDevOpsURLParserTest { "https://MyOrg@dev.azure.com/MyOrg/MyProject/_git/MyRepo.dot.git", "MyOrg", "MyProject", - "MyRepo.dot", + "MyRepo.dot.git", null, null }, @@ -100,7 +100,14 @@ public class AzureDevOpsURLParserTest { null }, {"https://dev.azure.com/MyOrg/MyProject/_git/-", "MyOrg", "MyProject", "-", null, null}, - {"https://dev.azure.com/MyOrg/MyProject/_git/-j.git", "MyOrg", "MyProject", "-j", null, null}, + { + "https://dev.azure.com/MyOrg/MyProject/_git/-j.git", + "MyOrg", + "MyProject", + "-j.git", + null, + null + }, { "https://MyOrg@dev.azure.com/MyOrg/MyProject/_git/MyRepo?path=MyFile&version=GBmain&_a=contents", "MyOrg", From b2dfdb0c848ca32f4eca35d202c41bc4bce19749 Mon Sep 17 00:00:00 2001 From: Igor Vinokur Date: Wed, 16 Aug 2023 12:45:32 +0300 Subject: [PATCH 42/75] Update guava, http-client, squareup.okio to the latest versions (#543) Update guava, http-client, squareup.okio to the latest versions in order to fix security issues according to the trivy report --- pom.xml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pom.xml b/pom.xml index 2b8ffd1433..0a55134347 100644 --- a/pom.xml +++ b/pom.xml @@ -55,14 +55,14 @@ 2.32.0 5.0.1 2.3.4 - 31.1-jre - 1.40.1 + 32.1.2-jre + 1.43.3 1.34.1 2.8.9 2.1.210 0.1.55 3.14.9 - 1.17.2 + 3.5.0 1.5 2.11.0 2.6 From d96e67252a2806cbf97fb4b99557790bae70b922 Mon Sep 17 00:00:00 2001 From: Samantha Dawley Date: Thu, 17 Aug 2023 00:28:20 -0700 Subject: [PATCH 43/75] 22407 - Remove Mattermost notification (#544) https://github.com/eclipse/che/issues/22407 Comment out the mattermost notification so it doesn't fail the release workflow, but leaving it in the file so I remember to replace it. --- .github/workflows/release.yml | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index bd81b812b0..2cdd3945ed 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -145,17 +145,17 @@ jobs: prerelease: false tag: ${{ github.event.inputs.version }} token: ${{ secrets.CHE_BOT_GITHUB_TOKEN }} - - name: Create failure MM message - if: ${{ failure() }} - run: | - echo "{\"text\":\":no_entry_sign: Che Server ${{ github.event.inputs.version }} release has failed: https://github.com/eclipse-che/che-server/actions/workflows/release.yml\"}" > mattermost.json - - name: Create success MM message - run: | - echo "{\"text\":\":white_check_mark: Che Server ${{ github.event.inputs.version }} has been released: https://quay.io/eclipse/che-server:${{ github.event.inputs.version }}\"}" > mattermost.json - - name: Send MM message - if: ${{ success() }} || ${{ failure() }} - uses: mattermost/action-mattermost-notify@1.1.0 - env: - MATTERMOST_WEBHOOK_URL: ${{ secrets.MATTERMOST_WEBHOOK_URL }} - MATTERMOST_CHANNEL: eclipse-che-releases - MATTERMOST_USERNAME: che-bot + #- name: Create failure MM message + #if: ${{ failure() }} + #run: | + #echo "{\"text\":\":no_entry_sign: Che Server ${{ github.event.inputs.version }} release has failed: https://github.com/eclipse-che/che-server/actions/workflows/release.yml\"}" > mattermost.json + #- name: Create success MM message + #run: | + #echo "{\"text\":\":white_check_mark: Che Server ${{ github.event.inputs.version }} has been released: https://quay.io/eclipse/che-server:${{ github.event.inputs.version }}\"}" > mattermost.json + #- name: Send MM message + #if: ${{ success() }} || ${{ failure() }} + #uses: mattermost/action-mattermost-notify@1.1.0 + #env: + #MATTERMOST_WEBHOOK_URL: ${{ secrets.MATTERMOST_WEBHOOK_URL }} + #MATTERMOST_CHANNEL: eclipse-che-releases + #MATTERMOST_USERNAME: che-bot From f5a70d0f9a2b0238bbc496daeeff3227b2334e97 Mon Sep 17 00:00:00 2001 From: Igor Vinokur Date: Thu, 17 Aug 2023 16:29:24 +0300 Subject: [PATCH 44/75] Do not return secret token in the Oauth API (#538) Remove the personalAccessTokenManager.get() call from the OAuth API getToken() method. The OAuth API must not know anything about PAT secrets. It should get tokens only by requesting an SCM provider OAuth API. Fix validating the Bitbucket-Server PAT method by requesting user instead of requesting. This prevents the code execution going to a recursive loop: bitbucketServerApiClient.getPersonalAccessToken() calls oauthApi.getToken() which referred to personalAccessTokenManager.getToken() which validated the token by calling scmPersonalAccessTokenFetcher.getScmUsername() -> bitbucketServerApiClient.getPersonalAccessToken(). --- .../che/security/oauth/EmbeddedOAuthAPI.java | 22 +------------------ ...ucketServerPersonalAccessTokenFetcher.java | 7 ++++++ ...tServerPersonalAccessTokenFetcherTest.java | 17 ++++++++++++++ 3 files changed, 25 insertions(+), 21 deletions(-) diff --git a/wsmaster/che-core-api-auth/src/main/java/org/eclipse/che/security/oauth/EmbeddedOAuthAPI.java b/wsmaster/che-core-api-auth/src/main/java/org/eclipse/che/security/oauth/EmbeddedOAuthAPI.java index 352d7bbc20..35e0b4a874 100644 --- a/wsmaster/che-core-api-auth/src/main/java/org/eclipse/che/security/oauth/EmbeddedOAuthAPI.java +++ b/wsmaster/che-core-api-auth/src/main/java/org/eclipse/che/security/oauth/EmbeddedOAuthAPI.java @@ -38,11 +38,6 @@ import org.eclipse.che.api.core.rest.shared.dto.Link; import org.eclipse.che.api.core.rest.shared.dto.LinkParameter; import org.eclipse.che.api.core.util.LinksHelper; import org.eclipse.che.api.factory.server.scm.OAuthTokenFetcher; -import org.eclipse.che.api.factory.server.scm.PersonalAccessToken; -import org.eclipse.che.api.factory.server.scm.PersonalAccessTokenManager; -import org.eclipse.che.api.factory.server.scm.exception.ScmCommunicationException; -import org.eclipse.che.api.factory.server.scm.exception.ScmConfigurationPersistenceException; -import org.eclipse.che.api.factory.server.scm.exception.ScmUnauthorizedException; import org.eclipse.che.commons.env.EnvironmentContext; import org.eclipse.che.commons.subject.Subject; import org.eclipse.che.security.oauth.shared.dto.OAuthAuthenticatorDescriptor; @@ -64,7 +59,6 @@ public class EmbeddedOAuthAPI implements OAuthAPI, OAuthTokenFetcher { protected String errorPage; @Inject protected OAuthAuthenticatorProvider providers; - @Inject protected PersonalAccessTokenManager personalAccessTokenManager; private String redirectAfterLogin; @Override @@ -159,25 +153,11 @@ public class EmbeddedOAuthAPI implements OAuthAPI, OAuthTokenFetcher { if (token != null) { return token; } - Optional tokenOptional = - personalAccessTokenManager.get(subject, provider.getEndpointUrl()); - if (tokenOptional.isPresent()) { - PersonalAccessToken accessToken = tokenOptional.get(); - return newDto(OAuthToken.class).withToken(accessToken.getToken()); - } throw new UnauthorizedException( "OAuth token for user " + subject.getUserId() + " was not found"); - } catch (IOException | ScmConfigurationPersistenceException | ScmCommunicationException e) { + } catch (IOException e) { throw new ServerException(e.getLocalizedMessage(), e); - } catch (ScmUnauthorizedException e) { - throwUnauthorizedException(subject); } - return null; - } - - private void throwUnauthorizedException(Subject subject) throws UnauthorizedException { - throw new UnauthorizedException( - "OAuth token for user " + subject.getUserId() + " was not found"); } @Override diff --git a/wsmaster/che-core-api-factory-bitbucket-server/src/main/java/org/eclipse/che/api/factory/server/bitbucket/BitbucketServerPersonalAccessTokenFetcher.java b/wsmaster/che-core-api-factory-bitbucket-server/src/main/java/org/eclipse/che/api/factory/server/bitbucket/BitbucketServerPersonalAccessTokenFetcher.java index 5d22669cca..b22878ee63 100644 --- a/wsmaster/che-core-api-factory-bitbucket-server/src/main/java/org/eclipse/che/api/factory/server/bitbucket/BitbucketServerPersonalAccessTokenFetcher.java +++ b/wsmaster/che-core-api-factory-bitbucket-server/src/main/java/org/eclipse/che/api/factory/server/bitbucket/BitbucketServerPersonalAccessTokenFetcher.java @@ -11,6 +11,7 @@ */ package org.eclipse.che.api.factory.server.bitbucket; +import static com.google.common.base.Strings.isNullOrEmpty; import static java.lang.String.format; import static java.lang.String.valueOf; @@ -159,6 +160,12 @@ public class BitbucketServerPersonalAccessTokenFetcher implements PersonalAccess } } try { + // Token is added manually by a user without token id. Validate only by requesting user info. + if (isNullOrEmpty(params.getScmTokenId())) { + BitbucketUser user = bitbucketServerApiClient.getUser(params.getToken()); + return Optional.of(Pair.of(Boolean.TRUE, user.getName())); + } + // Token is added by OAuth. Token id is available. BitbucketPersonalAccessToken bitbucketPersonalAccessToken = bitbucketServerApiClient.getPersonalAccessToken(Long.valueOf(params.getScmTokenId())); return Optional.of( diff --git a/wsmaster/che-core-api-factory-bitbucket-server/src/test/java/org/eclipse/che/api/factory/server/bitbucket/BitbucketServerPersonalAccessTokenFetcherTest.java b/wsmaster/che-core-api-factory-bitbucket-server/src/test/java/org/eclipse/che/api/factory/server/bitbucket/BitbucketServerPersonalAccessTokenFetcherTest.java index bff6ca6f30..acdfa4d90c 100644 --- a/wsmaster/che-core-api-factory-bitbucket-server/src/test/java/org/eclipse/che/api/factory/server/bitbucket/BitbucketServerPersonalAccessTokenFetcherTest.java +++ b/wsmaster/che-core-api-factory-bitbucket-server/src/test/java/org/eclipse/che/api/factory/server/bitbucket/BitbucketServerPersonalAccessTokenFetcherTest.java @@ -231,6 +231,23 @@ public class BitbucketServerPersonalAccessTokenFetcherTest { // then assertFalse(result.isEmpty()); assertTrue(result.get().first); + assertEquals(result.get().second, bitbucketUser.getName()); + } + + @Test + public void shouldValidateTokenWithoutId() + throws ScmUnauthorizedException, ScmCommunicationException, ScmItemNotFoundException { + // given + when(personalAccessTokenParams.getScmProviderUrl()).thenReturn(someBitbucketURL); + when(personalAccessTokenParams.getToken()).thenReturn("token"); + when(bitbucketServerApiClient.isConnected(eq(someBitbucketURL))).thenReturn(true); + when(bitbucketServerApiClient.getUser(eq("token"))).thenReturn(bitbucketUser); + // when + Optional> result = fetcher.isValid(personalAccessTokenParams); + // then + assertFalse(result.isEmpty()); + assertTrue(result.get().first); + assertEquals(result.get().second, bitbucketUser.getName()); } @DataProvider From ff90b44018ae5776185db54f0a87e0e8ef9ee207 Mon Sep 17 00:00:00 2001 From: Anatolii Bazko Date: Tue, 22 Aug 2023 09:17:54 +0200 Subject: [PATCH 45/75] fix: Improve BitBucket token scope validation (#547) Signed-off-by: Anatolii Bazko --- .../BitbucketPersonalAccessTokenFetcher.java | 30 +++++++++++++++---- .../bitbucket/BitbucketApiClientTest.java | 5 ++-- ...tbucketPersonalAccessTokenFetcherTest.java | 11 ++++--- 3 files changed, 34 insertions(+), 12 deletions(-) diff --git a/wsmaster/che-core-api-factory-bitbucket/src/main/java/org/eclipse/che/api/factory/server/bitbucket/BitbucketPersonalAccessTokenFetcher.java b/wsmaster/che-core-api-factory-bitbucket/src/main/java/org/eclipse/che/api/factory/server/bitbucket/BitbucketPersonalAccessTokenFetcher.java index e9e6835fc7..6e8bf10e7e 100644 --- a/wsmaster/che-core-api-factory-bitbucket/src/main/java/org/eclipse/che/api/factory/server/bitbucket/BitbucketPersonalAccessTokenFetcher.java +++ b/wsmaster/che-core-api-factory-bitbucket/src/main/java/org/eclipse/che/api/factory/server/bitbucket/BitbucketPersonalAccessTokenFetcher.java @@ -13,6 +13,7 @@ package org.eclipse.che.api.factory.server.bitbucket; import com.google.common.collect.Sets; import java.util.Optional; +import java.util.Set; import javax.inject.Inject; import javax.inject.Named; import org.eclipse.che.api.auth.shared.dto.OAuthToken; @@ -52,7 +53,13 @@ public class BitbucketPersonalAccessTokenFetcher implements PersonalAccessTokenF private static final String OAUTH_PROVIDER_NAME = "bitbucket"; /** OAuth scope required to make integration with Bitbucket work. */ - public static final String DEFAULT_TOKEN_SCOPE = "repository:write"; + public static final String DEFAULT_REPOSITORY_WRITE_TOKEN_SCOPE = "repository:write"; + + public static final String DEFAULT_PULLREQUEST_WRITE_TOKEN_SCOPE = "pullrequest:write"; + + public static final String DEFAULT_ACCOUNT_READ_TOKEN_SCOPE = "account"; + + public static final String DEFAULT_ACCOUNT_WRITE_TOKEN_SCOPE = "account:write"; @Inject public BitbucketPersonalAccessTokenFetcher( @@ -101,7 +108,9 @@ public class BitbucketPersonalAccessTokenFetcher implements PersonalAccessTokenF } else if (!valid.get().first) { throw new ScmCommunicationException( "Current token doesn't have the necessary privileges. Please make sure Che app scopes are correct and containing at least: " - + DEFAULT_TOKEN_SCOPE); + + DEFAULT_REPOSITORY_WRITE_TOKEN_SCOPE + + " and " + + DEFAULT_ACCOUNT_READ_TOKEN_SCOPE); } return new PersonalAccessToken( scmServerUrl, @@ -136,7 +145,7 @@ public class BitbucketPersonalAccessTokenFetcher implements PersonalAccessTokenF try { String[] scopes = bitbucketApiClient.getTokenScopes(personalAccessToken.getToken()).second; - return Optional.of(Sets.newHashSet(scopes).contains(DEFAULT_TOKEN_SCOPE)); + return Optional.of(isValidScope(Sets.newHashSet(scopes))); } catch (ScmItemNotFoundException | ScmCommunicationException | ScmBadRequestException e) { return Optional.of(Boolean.FALSE); } @@ -153,9 +162,7 @@ public class BitbucketPersonalAccessTokenFetcher implements PersonalAccessTokenF Pair pair = bitbucketApiClient.getTokenScopes(params.getToken()); return Optional.of( Pair.of( - Sets.newHashSet(pair.second).contains(DEFAULT_TOKEN_SCOPE) - ? Boolean.TRUE - : Boolean.FALSE, + isValidScope(Sets.newHashSet(pair.second)) ? Boolean.TRUE : Boolean.FALSE, pair.first)); } catch (ScmItemNotFoundException | ScmCommunicationException | ScmBadRequestException e) { return Optional.empty(); @@ -168,4 +175,15 @@ public class BitbucketPersonalAccessTokenFetcher implements PersonalAccessTokenF + OAUTH_PROVIDER_NAME + "&scope=repository&request_method=POST&signature_method=rsa"; } + + /** + * Checks if the given scopes are valid for Bitbucket. Note: that pullrequest:write is a wider + * scope than repository:write, and account:write is a wider scope than account. + */ + private boolean isValidScope(Set scopes) { + return (scopes.contains(DEFAULT_REPOSITORY_WRITE_TOKEN_SCOPE) + || scopes.contains(DEFAULT_PULLREQUEST_WRITE_TOKEN_SCOPE)) + && (scopes.contains(DEFAULT_ACCOUNT_READ_TOKEN_SCOPE) + || scopes.contains(DEFAULT_ACCOUNT_WRITE_TOKEN_SCOPE)); + } } diff --git a/wsmaster/che-core-api-factory-bitbucket/src/test/java/org/eclipse/che/api/factory/server/bitbucket/BitbucketApiClientTest.java b/wsmaster/che-core-api-factory-bitbucket/src/test/java/org/eclipse/che/api/factory/server/bitbucket/BitbucketApiClientTest.java index 41ec29586c..ed1b205735 100644 --- a/wsmaster/che-core-api-factory-bitbucket/src/test/java/org/eclipse/che/api/factory/server/bitbucket/BitbucketApiClientTest.java +++ b/wsmaster/che-core-api-factory-bitbucket/src/test/java/org/eclipse/che/api/factory/server/bitbucket/BitbucketApiClientTest.java @@ -87,11 +87,12 @@ public class BitbucketApiClientTest { aResponse() .withHeader("Content-Type", "application/json; charset=utf-8") .withHeader( - BitbucketApiClient.BITBUCKET_OAUTH_SCOPES_HEADER, "repository:write") + BitbucketApiClient.BITBUCKET_OAUTH_SCOPES_HEADER, + "repository:write,account") .withBodyFile("bitbucket/rest/user/response.json"))); String[] scopes = client.getTokenScopes("token1").second; - String[] expectedScopes = {"repository:write"}; + String[] expectedScopes = {"repository:write", "account"}; assertNotNull(scopes, "Bitbucket API should have returned a non-null scope array"); assertEqualsNoOrder( scopes, expectedScopes, "Returned scope array does not match expected values"); diff --git a/wsmaster/che-core-api-factory-bitbucket/src/test/java/org/eclipse/che/api/factory/server/bitbucket/BitbucketPersonalAccessTokenFetcherTest.java b/wsmaster/che-core-api-factory-bitbucket/src/test/java/org/eclipse/che/api/factory/server/bitbucket/BitbucketPersonalAccessTokenFetcherTest.java index 49d06e00fa..d5ffdd471c 100644 --- a/wsmaster/che-core-api-factory-bitbucket/src/test/java/org/eclipse/che/api/factory/server/bitbucket/BitbucketPersonalAccessTokenFetcherTest.java +++ b/wsmaster/che-core-api-factory-bitbucket/src/test/java/org/eclipse/che/api/factory/server/bitbucket/BitbucketPersonalAccessTokenFetcherTest.java @@ -96,7 +96,7 @@ public class BitbucketPersonalAccessTokenFetcherTest { @Test( expectedExceptions = ScmCommunicationException.class, expectedExceptionsMessageRegExp = - "Current token doesn't have the necessary privileges. Please make sure Che app scopes are correct and containing at least: repository:write") + "Current token doesn't have the necessary privileges. Please make sure Che app scopes are correct and containing at least: repository:write and account") public void shouldThrowExceptionOnInsufficientTokenScopes() throws Exception { Subject subject = new SubjectImpl("Username", "id1", "token", false); OAuthToken oAuthToken = newDto(OAuthToken.class).withToken(bitbucketOauthToken).withScope(""); @@ -140,7 +140,8 @@ public class BitbucketPersonalAccessTokenFetcherTest { aResponse() .withHeader("Content-Type", "application/json; charset=utf-8") .withHeader( - BitbucketApiClient.BITBUCKET_OAUTH_SCOPES_HEADER, "repository:write") + BitbucketApiClient.BITBUCKET_OAUTH_SCOPES_HEADER, + "repository:write,account") .withBodyFile("bitbucket/rest/user/response.json"))); PersonalAccessToken token = @@ -158,7 +159,8 @@ public class BitbucketPersonalAccessTokenFetcherTest { aResponse() .withHeader("Content-Type", "application/json; charset=utf-8") .withHeader( - BitbucketApiClient.BITBUCKET_OAUTH_SCOPES_HEADER, "repository:write") + BitbucketApiClient.BITBUCKET_OAUTH_SCOPES_HEADER, + "repository:write,account") .withBodyFile("bitbucket/rest/user/response.json"))); PersonalAccessTokenParams params = @@ -179,7 +181,8 @@ public class BitbucketPersonalAccessTokenFetcherTest { aResponse() .withHeader("Content-Type", "application/json; charset=utf-8") .withHeader( - BitbucketApiClient.BITBUCKET_OAUTH_SCOPES_HEADER, "repository:write") + BitbucketApiClient.BITBUCKET_OAUTH_SCOPES_HEADER, + "repository:write,account") .withBodyFile("bitbucket/rest/user/response.json"))); PersonalAccessTokenParams params = From 8d19ea8046c78a00675b87b8d2702d0e9d00c03c Mon Sep 17 00:00:00 2001 From: Mykhailo Kuznietsov Date: Thu, 17 Aug 2023 14:38:19 +0000 Subject: [PATCH 46/75] chore: Bump to 7.74.0-SNAPSHOT in main Signed-off-by: Mykhailo Kuznietsov --- assembly/assembly-che-tomcat/pom.xml | 2 +- assembly/assembly-main/pom.xml | 2 +- assembly/assembly-root-war/pom.xml | 2 +- assembly/assembly-swagger-war/pom.xml | 2 +- assembly/assembly-wsmaster-war/pom.xml | 2 +- assembly/pom.xml | 2 +- core/che-core-api-core/pom.xml | 2 +- core/che-core-api-dto-maven-plugin/pom.xml | 2 +- core/che-core-api-dto/pom.xml | 2 +- core/che-core-api-model/pom.xml | 2 +- core/che-core-db-vendor-h2/pom.xml | 2 +- core/che-core-db-vendor-mysql/pom.xml | 2 +- core/che-core-db-vendor-postgresql/pom.xml | 2 +- core/che-core-db/pom.xml | 2 +- core/che-core-logback/pom.xml | 2 +- core/che-core-metrics-core/pom.xml | 2 +- core/che-core-tracing-core/pom.xml | 2 +- core/che-core-tracing-metrics/pom.xml | 2 +- core/che-core-tracing-web/pom.xml | 2 +- core/che-core-typescript-dto-maven-plugin/pom.xml | 2 +- core/commons/che-core-commons-annotations/pom.xml | 2 +- core/commons/che-core-commons-inject/pom.xml | 2 +- core/commons/che-core-commons-j2ee/pom.xml | 2 +- core/commons/che-core-commons-json/pom.xml | 2 +- core/commons/che-core-commons-lang/pom.xml | 2 +- core/commons/che-core-commons-observability/pom.xml | 2 +- core/commons/che-core-commons-schedule/pom.xml | 2 +- core/commons/che-core-commons-test/pom.xml | 2 +- core/commons/che-core-commons-tracing/pom.xml | 2 +- core/commons/pom.xml | 2 +- core/pom.xml | 2 +- infrastructures/infrastructure-distributed/pom.xml | 2 +- infrastructures/infrastructure-factory/pom.xml | 2 +- infrastructures/infrastructure-metrics/pom.xml | 2 +- infrastructures/infrastructure-permission/pom.xml | 2 +- infrastructures/kubernetes/pom.xml | 2 +- infrastructures/openshift/pom.xml | 2 +- infrastructures/pom.xml | 2 +- .../api/che-multiuser-api-authentication-commons/pom.xml | 2 +- multiuser/api/che-multiuser-api-authorization-impl/pom.xml | 2 +- multiuser/api/che-multiuser-api-authorization/pom.xml | 2 +- multiuser/api/che-multiuser-api-organization-shared/pom.xml | 2 +- multiuser/api/che-multiuser-api-organization/pom.xml | 2 +- multiuser/api/che-multiuser-api-permission-shared/pom.xml | 2 +- multiuser/api/che-multiuser-api-permission/pom.xml | 2 +- multiuser/api/che-multiuser-api-resource-shared/pom.xml | 2 +- multiuser/api/che-multiuser-api-resource/pom.xml | 2 +- multiuser/api/che-multiuser-api-workspace-activity/pom.xml | 2 +- multiuser/api/pom.xml | 2 +- .../integration-tests/che-multiuser-cascade-removal/pom.xml | 2 +- multiuser/integration-tests/che-multiuser-mysql-tck/pom.xml | 2 +- .../integration-tests/che-multiuser-postgresql-tck/pom.xml | 2 +- multiuser/integration-tests/pom.xml | 2 +- multiuser/keycloak/che-multiuser-keycloak-server/pom.xml | 2 +- multiuser/keycloak/che-multiuser-keycloak-shared/pom.xml | 2 +- .../keycloak/che-multiuser-keycloak-token-provider/pom.xml | 2 +- .../keycloak/che-multiuser-keycloak-user-remover/pom.xml | 2 +- multiuser/keycloak/pom.xml | 2 +- .../che-multiuser-machine-authentication-shared/pom.xml | 2 +- .../machine-auth/che-multiuser-machine-authentication/pom.xml | 2 +- multiuser/machine-auth/pom.xml | 2 +- multiuser/oidc/pom.xml | 2 +- multiuser/permission/che-multiuser-permission-devfile/pom.xml | 2 +- multiuser/permission/che-multiuser-permission-logger/pom.xml | 2 +- .../permission/che-multiuser-permission-resource/pom.xml | 2 +- multiuser/permission/che-multiuser-permission-system/pom.xml | 2 +- multiuser/permission/che-multiuser-permission-user/pom.xml | 2 +- .../che-multiuser-permission-workspace-activity/pom.xml | 2 +- .../permission/che-multiuser-permission-workspace/pom.xml | 2 +- multiuser/permission/pom.xml | 2 +- multiuser/personal-account/pom.xml | 2 +- multiuser/pom.xml | 2 +- multiuser/sql-schema/pom.xml | 2 +- pom.xml | 4 ++-- typescript-dto/dto-pom.xml | 2 +- wsmaster/che-core-api-account/pom.xml | 2 +- wsmaster/che-core-api-auth-azure-devops/pom.xml | 2 +- wsmaster/che-core-api-auth-bitbucket/pom.xml | 2 +- wsmaster/che-core-api-auth-github/pom.xml | 2 +- wsmaster/che-core-api-auth-gitlab/pom.xml | 2 +- wsmaster/che-core-api-auth-openshift/pom.xml | 2 +- wsmaster/che-core-api-auth-shared/pom.xml | 2 +- wsmaster/che-core-api-auth/pom.xml | 2 +- wsmaster/che-core-api-devfile-shared/pom.xml | 2 +- wsmaster/che-core-api-devfile/pom.xml | 2 +- wsmaster/che-core-api-factory-azure-devops/pom.xml | 2 +- wsmaster/che-core-api-factory-bitbucket-server/pom.xml | 2 +- wsmaster/che-core-api-factory-bitbucket/pom.xml | 2 +- wsmaster/che-core-api-factory-git-ssh/pom.xml | 2 +- wsmaster/che-core-api-factory-github/pom.xml | 2 +- wsmaster/che-core-api-factory-gitlab/pom.xml | 2 +- wsmaster/che-core-api-factory-shared/pom.xml | 2 +- wsmaster/che-core-api-factory/pom.xml | 2 +- wsmaster/che-core-api-logger-shared/pom.xml | 2 +- wsmaster/che-core-api-logger/pom.xml | 2 +- wsmaster/che-core-api-metrics/pom.xml | 2 +- wsmaster/che-core-api-ssh-shared/pom.xml | 2 +- wsmaster/che-core-api-ssh/pom.xml | 2 +- wsmaster/che-core-api-system-shared/pom.xml | 2 +- wsmaster/che-core-api-system/pom.xml | 2 +- wsmaster/che-core-api-user-shared/pom.xml | 2 +- wsmaster/che-core-api-user/pom.xml | 2 +- wsmaster/che-core-api-workspace-activity/pom.xml | 2 +- wsmaster/che-core-api-workspace-shared/pom.xml | 2 +- wsmaster/che-core-api-workspace/pom.xml | 2 +- wsmaster/che-core-sql-schema/pom.xml | 2 +- wsmaster/integration-tests/cascade-removal/pom.xml | 2 +- wsmaster/integration-tests/mysql-tck/pom.xml | 2 +- wsmaster/integration-tests/pom.xml | 2 +- wsmaster/integration-tests/postgresql-tck/pom.xml | 2 +- wsmaster/pom.xml | 2 +- 111 files changed, 112 insertions(+), 112 deletions(-) diff --git a/assembly/assembly-che-tomcat/pom.xml b/assembly/assembly-che-tomcat/pom.xml index 094b6be060..f5c81234cb 100644 --- a/assembly/assembly-che-tomcat/pom.xml +++ b/assembly/assembly-che-tomcat/pom.xml @@ -17,7 +17,7 @@ che-assembly-parent org.eclipse.che - 7.73.0-SNAPSHOT + 7.74.0-SNAPSHOT assembly-che-tomcat jar diff --git a/assembly/assembly-main/pom.xml b/assembly/assembly-main/pom.xml index 8c5f524ece..0b96a305e9 100644 --- a/assembly/assembly-main/pom.xml +++ b/assembly/assembly-main/pom.xml @@ -17,7 +17,7 @@ che-assembly-parent org.eclipse.che - 7.73.0-SNAPSHOT + 7.74.0-SNAPSHOT assembly-main pom diff --git a/assembly/assembly-root-war/pom.xml b/assembly/assembly-root-war/pom.xml index c76de79321..36f0315df1 100644 --- a/assembly/assembly-root-war/pom.xml +++ b/assembly/assembly-root-war/pom.xml @@ -17,7 +17,7 @@ che-assembly-parent org.eclipse.che - 7.73.0-SNAPSHOT + 7.74.0-SNAPSHOT assembly-root-war war diff --git a/assembly/assembly-swagger-war/pom.xml b/assembly/assembly-swagger-war/pom.xml index 0b7ee94124..a61a032af9 100644 --- a/assembly/assembly-swagger-war/pom.xml +++ b/assembly/assembly-swagger-war/pom.xml @@ -17,7 +17,7 @@ che-assembly-parent org.eclipse.che - 7.73.0-SNAPSHOT + 7.74.0-SNAPSHOT assembly-swagger-war war diff --git a/assembly/assembly-wsmaster-war/pom.xml b/assembly/assembly-wsmaster-war/pom.xml index ad1befadac..b18fa33434 100644 --- a/assembly/assembly-wsmaster-war/pom.xml +++ b/assembly/assembly-wsmaster-war/pom.xml @@ -17,7 +17,7 @@ che-assembly-parent org.eclipse.che - 7.73.0-SNAPSHOT + 7.74.0-SNAPSHOT assembly-wsmaster-war war diff --git a/assembly/pom.xml b/assembly/pom.xml index cb151feffe..efe41d5a55 100644 --- a/assembly/pom.xml +++ b/assembly/pom.xml @@ -17,7 +17,7 @@ che-server org.eclipse.che - 7.73.0-SNAPSHOT + 7.74.0-SNAPSHOT ../pom.xml che-assembly-parent diff --git a/core/che-core-api-core/pom.xml b/core/che-core-api-core/pom.xml index bb30598867..7c0ffa9636 100644 --- a/core/che-core-api-core/pom.xml +++ b/core/che-core-api-core/pom.xml @@ -17,7 +17,7 @@ che-core-parent org.eclipse.che.core - 7.73.0-SNAPSHOT + 7.74.0-SNAPSHOT che-core-api-core jar diff --git a/core/che-core-api-dto-maven-plugin/pom.xml b/core/che-core-api-dto-maven-plugin/pom.xml index 3cfc56ca14..ba1dcf4d6e 100644 --- a/core/che-core-api-dto-maven-plugin/pom.xml +++ b/core/che-core-api-dto-maven-plugin/pom.xml @@ -17,7 +17,7 @@ che-core-parent org.eclipse.che.core - 7.73.0-SNAPSHOT + 7.74.0-SNAPSHOT che-core-api-dto-maven-plugin maven-plugin diff --git a/core/che-core-api-dto/pom.xml b/core/che-core-api-dto/pom.xml index 718a68d2c6..320a249d6f 100644 --- a/core/che-core-api-dto/pom.xml +++ b/core/che-core-api-dto/pom.xml @@ -17,7 +17,7 @@ che-core-parent org.eclipse.che.core - 7.73.0-SNAPSHOT + 7.74.0-SNAPSHOT che-core-api-dto jar diff --git a/core/che-core-api-model/pom.xml b/core/che-core-api-model/pom.xml index d94b734f73..bc75eb2bfb 100644 --- a/core/che-core-api-model/pom.xml +++ b/core/che-core-api-model/pom.xml @@ -17,7 +17,7 @@ che-core-parent org.eclipse.che.core - 7.73.0-SNAPSHOT + 7.74.0-SNAPSHOT che-core-api-model jar diff --git a/core/che-core-db-vendor-h2/pom.xml b/core/che-core-db-vendor-h2/pom.xml index e82e7a3f77..80032b44e1 100644 --- a/core/che-core-db-vendor-h2/pom.xml +++ b/core/che-core-db-vendor-h2/pom.xml @@ -17,7 +17,7 @@ che-core-parent org.eclipse.che.core - 7.73.0-SNAPSHOT + 7.74.0-SNAPSHOT che-core-db-vendor-h2 Che Core :: Commons :: DB :: Vendor H2 diff --git a/core/che-core-db-vendor-mysql/pom.xml b/core/che-core-db-vendor-mysql/pom.xml index fc8b213916..b92bb670a7 100644 --- a/core/che-core-db-vendor-mysql/pom.xml +++ b/core/che-core-db-vendor-mysql/pom.xml @@ -17,7 +17,7 @@ che-core-parent org.eclipse.che.core - 7.73.0-SNAPSHOT + 7.74.0-SNAPSHOT che-core-db-vendor-mysql Che Core :: Commons :: DB :: Vendor MySQL diff --git a/core/che-core-db-vendor-postgresql/pom.xml b/core/che-core-db-vendor-postgresql/pom.xml index 6b63b5a394..de89925014 100644 --- a/core/che-core-db-vendor-postgresql/pom.xml +++ b/core/che-core-db-vendor-postgresql/pom.xml @@ -17,7 +17,7 @@ che-core-parent org.eclipse.che.core - 7.73.0-SNAPSHOT + 7.74.0-SNAPSHOT che-core-db-vendor-postgresql Che Core :: Commons :: DB :: Vendor PostgreSQL diff --git a/core/che-core-db/pom.xml b/core/che-core-db/pom.xml index 9fc7ad03ec..b84498ca4f 100644 --- a/core/che-core-db/pom.xml +++ b/core/che-core-db/pom.xml @@ -17,7 +17,7 @@ che-core-parent org.eclipse.che.core - 7.73.0-SNAPSHOT + 7.74.0-SNAPSHOT che-core-db Che Core :: Commons :: DB diff --git a/core/che-core-logback/pom.xml b/core/che-core-logback/pom.xml index d92a72b950..737d4247cb 100644 --- a/core/che-core-logback/pom.xml +++ b/core/che-core-logback/pom.xml @@ -17,7 +17,7 @@ che-core-parent org.eclipse.che.core - 7.73.0-SNAPSHOT + 7.74.0-SNAPSHOT che-core-logback jar diff --git a/core/che-core-metrics-core/pom.xml b/core/che-core-metrics-core/pom.xml index af0d5f8346..20009594cb 100644 --- a/core/che-core-metrics-core/pom.xml +++ b/core/che-core-metrics-core/pom.xml @@ -17,7 +17,7 @@ che-core-parent org.eclipse.che.core - 7.73.0-SNAPSHOT + 7.74.0-SNAPSHOT che-core-metrics-core Che Core :: Commons :: Metrics :: Core diff --git a/core/che-core-tracing-core/pom.xml b/core/che-core-tracing-core/pom.xml index ab4e3900ae..75b703e5b5 100644 --- a/core/che-core-tracing-core/pom.xml +++ b/core/che-core-tracing-core/pom.xml @@ -17,7 +17,7 @@ che-core-parent org.eclipse.che.core - 7.73.0-SNAPSHOT + 7.74.0-SNAPSHOT che-core-tracing-core Che Core :: Commons :: Tracing :: Core diff --git a/core/che-core-tracing-metrics/pom.xml b/core/che-core-tracing-metrics/pom.xml index 47cd7fe74f..088185b477 100644 --- a/core/che-core-tracing-metrics/pom.xml +++ b/core/che-core-tracing-metrics/pom.xml @@ -17,7 +17,7 @@ che-core-parent org.eclipse.che.core - 7.73.0-SNAPSHOT + 7.74.0-SNAPSHOT che-core-tracing-metrics Che Core :: Commons :: Tracing :: Metrics diff --git a/core/che-core-tracing-web/pom.xml b/core/che-core-tracing-web/pom.xml index a862156471..974c8f6389 100644 --- a/core/che-core-tracing-web/pom.xml +++ b/core/che-core-tracing-web/pom.xml @@ -17,7 +17,7 @@ che-core-parent org.eclipse.che.core - 7.73.0-SNAPSHOT + 7.74.0-SNAPSHOT che-core-tracing-web Che Core :: Commons :: Tracing :: Web diff --git a/core/che-core-typescript-dto-maven-plugin/pom.xml b/core/che-core-typescript-dto-maven-plugin/pom.xml index 59cef8ef02..774d06e331 100644 --- a/core/che-core-typescript-dto-maven-plugin/pom.xml +++ b/core/che-core-typescript-dto-maven-plugin/pom.xml @@ -17,7 +17,7 @@ che-core-parent org.eclipse.che.core - 7.73.0-SNAPSHOT + 7.74.0-SNAPSHOT che-core-typescript-dto-maven-plugin maven-plugin diff --git a/core/commons/che-core-commons-annotations/pom.xml b/core/commons/che-core-commons-annotations/pom.xml index f79f096147..035bd8afe7 100644 --- a/core/commons/che-core-commons-annotations/pom.xml +++ b/core/commons/che-core-commons-annotations/pom.xml @@ -17,7 +17,7 @@ che-core-commons-parent org.eclipse.che.core - 7.73.0-SNAPSHOT + 7.74.0-SNAPSHOT che-core-commons-annotations jar diff --git a/core/commons/che-core-commons-inject/pom.xml b/core/commons/che-core-commons-inject/pom.xml index a4ec8e7a19..de225d55c8 100644 --- a/core/commons/che-core-commons-inject/pom.xml +++ b/core/commons/che-core-commons-inject/pom.xml @@ -17,7 +17,7 @@ che-core-commons-parent org.eclipse.che.core - 7.73.0-SNAPSHOT + 7.74.0-SNAPSHOT che-core-commons-inject jar diff --git a/core/commons/che-core-commons-j2ee/pom.xml b/core/commons/che-core-commons-j2ee/pom.xml index b52ae033cc..abb99c95b4 100644 --- a/core/commons/che-core-commons-j2ee/pom.xml +++ b/core/commons/che-core-commons-j2ee/pom.xml @@ -17,7 +17,7 @@ che-core-commons-parent org.eclipse.che.core - 7.73.0-SNAPSHOT + 7.74.0-SNAPSHOT che-core-commons-j2ee jar diff --git a/core/commons/che-core-commons-json/pom.xml b/core/commons/che-core-commons-json/pom.xml index 131fa323a5..1660496595 100644 --- a/core/commons/che-core-commons-json/pom.xml +++ b/core/commons/che-core-commons-json/pom.xml @@ -17,7 +17,7 @@ che-core-commons-parent org.eclipse.che.core - 7.73.0-SNAPSHOT + 7.74.0-SNAPSHOT che-core-commons-json jar diff --git a/core/commons/che-core-commons-lang/pom.xml b/core/commons/che-core-commons-lang/pom.xml index 56b9f61417..08a9a4a68e 100644 --- a/core/commons/che-core-commons-lang/pom.xml +++ b/core/commons/che-core-commons-lang/pom.xml @@ -17,7 +17,7 @@ che-core-commons-parent org.eclipse.che.core - 7.73.0-SNAPSHOT + 7.74.0-SNAPSHOT che-core-commons-lang jar diff --git a/core/commons/che-core-commons-observability/pom.xml b/core/commons/che-core-commons-observability/pom.xml index 27b3f9cceb..4ce9237280 100644 --- a/core/commons/che-core-commons-observability/pom.xml +++ b/core/commons/che-core-commons-observability/pom.xml @@ -17,7 +17,7 @@ che-core-commons-parent org.eclipse.che.core - 7.73.0-SNAPSHOT + 7.74.0-SNAPSHOT che-core-commons-observability Che Core :: Commons :: Tracing and Monitoring wrapper diff --git a/core/commons/che-core-commons-schedule/pom.xml b/core/commons/che-core-commons-schedule/pom.xml index 8d1526e2c0..28234240a1 100644 --- a/core/commons/che-core-commons-schedule/pom.xml +++ b/core/commons/che-core-commons-schedule/pom.xml @@ -17,7 +17,7 @@ che-core-commons-parent org.eclipse.che.core - 7.73.0-SNAPSHOT + 7.74.0-SNAPSHOT che-core-commons-schedule jar diff --git a/core/commons/che-core-commons-test/pom.xml b/core/commons/che-core-commons-test/pom.xml index 7de1eb1e77..1c3390e902 100644 --- a/core/commons/che-core-commons-test/pom.xml +++ b/core/commons/che-core-commons-test/pom.xml @@ -17,7 +17,7 @@ che-core-commons-parent org.eclipse.che.core - 7.73.0-SNAPSHOT + 7.74.0-SNAPSHOT che-core-commons-test jar diff --git a/core/commons/che-core-commons-tracing/pom.xml b/core/commons/che-core-commons-tracing/pom.xml index c766f4fc45..8f65721327 100644 --- a/core/commons/che-core-commons-tracing/pom.xml +++ b/core/commons/che-core-commons-tracing/pom.xml @@ -17,7 +17,7 @@ che-core-commons-parent org.eclipse.che.core - 7.73.0-SNAPSHOT + 7.74.0-SNAPSHOT che-core-commons-tracing Che Core :: Commons :: Tracing diff --git a/core/commons/pom.xml b/core/commons/pom.xml index f7a126b7c4..fc9308fe5d 100644 --- a/core/commons/pom.xml +++ b/core/commons/pom.xml @@ -17,7 +17,7 @@ che-core-parent org.eclipse.che.core - 7.73.0-SNAPSHOT + 7.74.0-SNAPSHOT ../pom.xml che-core-commons-parent diff --git a/core/pom.xml b/core/pom.xml index 0112b04192..088a25fe1e 100644 --- a/core/pom.xml +++ b/core/pom.xml @@ -17,7 +17,7 @@ che-server org.eclipse.che - 7.73.0-SNAPSHOT + 7.74.0-SNAPSHOT ../pom.xml org.eclipse.che.core diff --git a/infrastructures/infrastructure-distributed/pom.xml b/infrastructures/infrastructure-distributed/pom.xml index 6e24cf7e1f..66c493e694 100644 --- a/infrastructures/infrastructure-distributed/pom.xml +++ b/infrastructures/infrastructure-distributed/pom.xml @@ -17,7 +17,7 @@ che-infrastructures-parent org.eclipse.che.infrastructure - 7.73.0-SNAPSHOT + 7.74.0-SNAPSHOT infrastructure-distributed jar diff --git a/infrastructures/infrastructure-factory/pom.xml b/infrastructures/infrastructure-factory/pom.xml index 143a6ccf4d..57a94af672 100644 --- a/infrastructures/infrastructure-factory/pom.xml +++ b/infrastructures/infrastructure-factory/pom.xml @@ -17,7 +17,7 @@ che-infrastructures-parent org.eclipse.che.infrastructure - 7.73.0-SNAPSHOT + 7.74.0-SNAPSHOT infrastructure-factory jar diff --git a/infrastructures/infrastructure-metrics/pom.xml b/infrastructures/infrastructure-metrics/pom.xml index dc6ad89539..038f3d723b 100644 --- a/infrastructures/infrastructure-metrics/pom.xml +++ b/infrastructures/infrastructure-metrics/pom.xml @@ -17,7 +17,7 @@ che-infrastructures-parent org.eclipse.che.infrastructure - 7.73.0-SNAPSHOT + 7.74.0-SNAPSHOT ../pom.xml infrastructure-metrics diff --git a/infrastructures/infrastructure-permission/pom.xml b/infrastructures/infrastructure-permission/pom.xml index 42347db8a0..a760e0741a 100644 --- a/infrastructures/infrastructure-permission/pom.xml +++ b/infrastructures/infrastructure-permission/pom.xml @@ -17,7 +17,7 @@ che-infrastructures-parent org.eclipse.che.infrastructure - 7.73.0-SNAPSHOT + 7.74.0-SNAPSHOT infrastructure-permission Infrastructure :: Kubernetes Permissions diff --git a/infrastructures/kubernetes/pom.xml b/infrastructures/kubernetes/pom.xml index 12e1b97366..95aa07d233 100644 --- a/infrastructures/kubernetes/pom.xml +++ b/infrastructures/kubernetes/pom.xml @@ -17,7 +17,7 @@ che-infrastructures-parent org.eclipse.che.infrastructure - 7.73.0-SNAPSHOT + 7.74.0-SNAPSHOT infrastructure-kubernetes Infrastructure :: Kubernetes diff --git a/infrastructures/openshift/pom.xml b/infrastructures/openshift/pom.xml index 6f2fa5d10f..03aa3a28ed 100644 --- a/infrastructures/openshift/pom.xml +++ b/infrastructures/openshift/pom.xml @@ -17,7 +17,7 @@ che-infrastructures-parent org.eclipse.che.infrastructure - 7.73.0-SNAPSHOT + 7.74.0-SNAPSHOT infrastructure-openshift Infrastructure :: OpenShift diff --git a/infrastructures/pom.xml b/infrastructures/pom.xml index 7c8a411597..0d616f77f4 100644 --- a/infrastructures/pom.xml +++ b/infrastructures/pom.xml @@ -17,7 +17,7 @@ che-server org.eclipse.che - 7.73.0-SNAPSHOT + 7.74.0-SNAPSHOT ../pom.xml org.eclipse.che.infrastructure diff --git a/multiuser/api/che-multiuser-api-authentication-commons/pom.xml b/multiuser/api/che-multiuser-api-authentication-commons/pom.xml index 2a6e23c7df..f9ec158708 100644 --- a/multiuser/api/che-multiuser-api-authentication-commons/pom.xml +++ b/multiuser/api/che-multiuser-api-authentication-commons/pom.xml @@ -17,7 +17,7 @@ che-multiuser-api org.eclipse.che.multiuser - 7.73.0-SNAPSHOT + 7.74.0-SNAPSHOT che-multiuser-api-authentication-commons jar diff --git a/multiuser/api/che-multiuser-api-authorization-impl/pom.xml b/multiuser/api/che-multiuser-api-authorization-impl/pom.xml index 497f90be3c..a12c7c9cb3 100644 --- a/multiuser/api/che-multiuser-api-authorization-impl/pom.xml +++ b/multiuser/api/che-multiuser-api-authorization-impl/pom.xml @@ -17,7 +17,7 @@ che-multiuser-api org.eclipse.che.multiuser - 7.73.0-SNAPSHOT + 7.74.0-SNAPSHOT che-multiuser-api-authorization-impl jar diff --git a/multiuser/api/che-multiuser-api-authorization/pom.xml b/multiuser/api/che-multiuser-api-authorization/pom.xml index 79dcdd2888..87dc6084a4 100644 --- a/multiuser/api/che-multiuser-api-authorization/pom.xml +++ b/multiuser/api/che-multiuser-api-authorization/pom.xml @@ -17,7 +17,7 @@ che-multiuser-api org.eclipse.che.multiuser - 7.73.0-SNAPSHOT + 7.74.0-SNAPSHOT che-multiuser-api-authorization jar diff --git a/multiuser/api/che-multiuser-api-organization-shared/pom.xml b/multiuser/api/che-multiuser-api-organization-shared/pom.xml index 2da06a8685..8c517f2d5a 100644 --- a/multiuser/api/che-multiuser-api-organization-shared/pom.xml +++ b/multiuser/api/che-multiuser-api-organization-shared/pom.xml @@ -17,7 +17,7 @@ che-multiuser-api org.eclipse.che.multiuser - 7.73.0-SNAPSHOT + 7.74.0-SNAPSHOT che-multiuser-api-organization-shared jar diff --git a/multiuser/api/che-multiuser-api-organization/pom.xml b/multiuser/api/che-multiuser-api-organization/pom.xml index fab10b7eb1..e96cca4428 100644 --- a/multiuser/api/che-multiuser-api-organization/pom.xml +++ b/multiuser/api/che-multiuser-api-organization/pom.xml @@ -17,7 +17,7 @@ che-multiuser-api org.eclipse.che.multiuser - 7.73.0-SNAPSHOT + 7.74.0-SNAPSHOT che-multiuser-api-organization jar diff --git a/multiuser/api/che-multiuser-api-permission-shared/pom.xml b/multiuser/api/che-multiuser-api-permission-shared/pom.xml index dfef2af1a9..07faf0ca39 100644 --- a/multiuser/api/che-multiuser-api-permission-shared/pom.xml +++ b/multiuser/api/che-multiuser-api-permission-shared/pom.xml @@ -17,7 +17,7 @@ che-multiuser-api org.eclipse.che.multiuser - 7.73.0-SNAPSHOT + 7.74.0-SNAPSHOT che-multiuser-api-permission-shared jar diff --git a/multiuser/api/che-multiuser-api-permission/pom.xml b/multiuser/api/che-multiuser-api-permission/pom.xml index 9e0ac6b758..5f85bba74f 100644 --- a/multiuser/api/che-multiuser-api-permission/pom.xml +++ b/multiuser/api/che-multiuser-api-permission/pom.xml @@ -17,7 +17,7 @@ che-multiuser-api org.eclipse.che.multiuser - 7.73.0-SNAPSHOT + 7.74.0-SNAPSHOT che-multiuser-api-permission jar diff --git a/multiuser/api/che-multiuser-api-resource-shared/pom.xml b/multiuser/api/che-multiuser-api-resource-shared/pom.xml index fa1db4fa1b..6794b24719 100644 --- a/multiuser/api/che-multiuser-api-resource-shared/pom.xml +++ b/multiuser/api/che-multiuser-api-resource-shared/pom.xml @@ -17,7 +17,7 @@ che-multiuser-api org.eclipse.che.multiuser - 7.73.0-SNAPSHOT + 7.74.0-SNAPSHOT che-multiuser-api-resource-shared jar diff --git a/multiuser/api/che-multiuser-api-resource/pom.xml b/multiuser/api/che-multiuser-api-resource/pom.xml index 4519c5759b..66b70c398f 100644 --- a/multiuser/api/che-multiuser-api-resource/pom.xml +++ b/multiuser/api/che-multiuser-api-resource/pom.xml @@ -17,7 +17,7 @@ che-multiuser-api org.eclipse.che.multiuser - 7.73.0-SNAPSHOT + 7.74.0-SNAPSHOT che-multiuser-api-resource jar diff --git a/multiuser/api/che-multiuser-api-workspace-activity/pom.xml b/multiuser/api/che-multiuser-api-workspace-activity/pom.xml index c93c7b3be2..6e294be270 100644 --- a/multiuser/api/che-multiuser-api-workspace-activity/pom.xml +++ b/multiuser/api/che-multiuser-api-workspace-activity/pom.xml @@ -17,7 +17,7 @@ che-multiuser-api org.eclipse.che.multiuser - 7.73.0-SNAPSHOT + 7.74.0-SNAPSHOT che-multiuser-api-workspace-activity jar diff --git a/multiuser/api/pom.xml b/multiuser/api/pom.xml index 8ab3ab656c..957589ec63 100644 --- a/multiuser/api/pom.xml +++ b/multiuser/api/pom.xml @@ -17,7 +17,7 @@ che-multiuser-parent org.eclipse.che.multiuser - 7.73.0-SNAPSHOT + 7.74.0-SNAPSHOT ../pom.xml che-multiuser-api diff --git a/multiuser/integration-tests/che-multiuser-cascade-removal/pom.xml b/multiuser/integration-tests/che-multiuser-cascade-removal/pom.xml index 2ec0523475..59202417c5 100644 --- a/multiuser/integration-tests/che-multiuser-cascade-removal/pom.xml +++ b/multiuser/integration-tests/che-multiuser-cascade-removal/pom.xml @@ -17,7 +17,7 @@ che-multiuser-integration-tests org.eclipse.che.multiuser - 7.73.0-SNAPSHOT + 7.74.0-SNAPSHOT che-multiuser-cascade-removal jar diff --git a/multiuser/integration-tests/che-multiuser-mysql-tck/pom.xml b/multiuser/integration-tests/che-multiuser-mysql-tck/pom.xml index fa6c42c9a9..91ad5d7877 100644 --- a/multiuser/integration-tests/che-multiuser-mysql-tck/pom.xml +++ b/multiuser/integration-tests/che-multiuser-mysql-tck/pom.xml @@ -17,7 +17,7 @@ che-multiuser-integration-tests org.eclipse.che.multiuser - 7.73.0-SNAPSHOT + 7.74.0-SNAPSHOT che-multiuser-mysql-tck jar diff --git a/multiuser/integration-tests/che-multiuser-postgresql-tck/pom.xml b/multiuser/integration-tests/che-multiuser-postgresql-tck/pom.xml index 8b27226771..0aa8bcdb34 100644 --- a/multiuser/integration-tests/che-multiuser-postgresql-tck/pom.xml +++ b/multiuser/integration-tests/che-multiuser-postgresql-tck/pom.xml @@ -17,7 +17,7 @@ che-multiuser-integration-tests org.eclipse.che.multiuser - 7.73.0-SNAPSHOT + 7.74.0-SNAPSHOT che-multiuser-postgresql-tck jar diff --git a/multiuser/integration-tests/pom.xml b/multiuser/integration-tests/pom.xml index 7aeab72bec..667c7a8af5 100644 --- a/multiuser/integration-tests/pom.xml +++ b/multiuser/integration-tests/pom.xml @@ -17,7 +17,7 @@ che-multiuser-parent org.eclipse.che.multiuser - 7.73.0-SNAPSHOT + 7.74.0-SNAPSHOT che-multiuser-integration-tests pom diff --git a/multiuser/keycloak/che-multiuser-keycloak-server/pom.xml b/multiuser/keycloak/che-multiuser-keycloak-server/pom.xml index b7af3554ea..eb27db9720 100644 --- a/multiuser/keycloak/che-multiuser-keycloak-server/pom.xml +++ b/multiuser/keycloak/che-multiuser-keycloak-server/pom.xml @@ -17,7 +17,7 @@ che-multiuser-keycloak org.eclipse.che.multiuser - 7.73.0-SNAPSHOT + 7.74.0-SNAPSHOT che-multiuser-keycloak-server jar diff --git a/multiuser/keycloak/che-multiuser-keycloak-shared/pom.xml b/multiuser/keycloak/che-multiuser-keycloak-shared/pom.xml index f79bc49861..21565d767b 100644 --- a/multiuser/keycloak/che-multiuser-keycloak-shared/pom.xml +++ b/multiuser/keycloak/che-multiuser-keycloak-shared/pom.xml @@ -17,7 +17,7 @@ che-multiuser-keycloak org.eclipse.che.multiuser - 7.73.0-SNAPSHOT + 7.74.0-SNAPSHOT che-multiuser-keycloak-shared jar diff --git a/multiuser/keycloak/che-multiuser-keycloak-token-provider/pom.xml b/multiuser/keycloak/che-multiuser-keycloak-token-provider/pom.xml index 219b9b41b5..392a95c2af 100644 --- a/multiuser/keycloak/che-multiuser-keycloak-token-provider/pom.xml +++ b/multiuser/keycloak/che-multiuser-keycloak-token-provider/pom.xml @@ -17,7 +17,7 @@ che-multiuser-keycloak org.eclipse.che.multiuser - 7.73.0-SNAPSHOT + 7.74.0-SNAPSHOT che-multiuser-keycloak-token-provider Che Multiuser :: Keycloak Token Provider diff --git a/multiuser/keycloak/che-multiuser-keycloak-user-remover/pom.xml b/multiuser/keycloak/che-multiuser-keycloak-user-remover/pom.xml index f2cb08bd69..a6bd3c1a68 100644 --- a/multiuser/keycloak/che-multiuser-keycloak-user-remover/pom.xml +++ b/multiuser/keycloak/che-multiuser-keycloak-user-remover/pom.xml @@ -17,7 +17,7 @@ che-multiuser-keycloak org.eclipse.che.multiuser - 7.73.0-SNAPSHOT + 7.74.0-SNAPSHOT che-multiuser-keycloak-user-remover jar diff --git a/multiuser/keycloak/pom.xml b/multiuser/keycloak/pom.xml index e4c69e29b0..553d63536a 100644 --- a/multiuser/keycloak/pom.xml +++ b/multiuser/keycloak/pom.xml @@ -17,7 +17,7 @@ che-multiuser-parent org.eclipse.che.multiuser - 7.73.0-SNAPSHOT + 7.74.0-SNAPSHOT ../pom.xml che-multiuser-keycloak diff --git a/multiuser/machine-auth/che-multiuser-machine-authentication-shared/pom.xml b/multiuser/machine-auth/che-multiuser-machine-authentication-shared/pom.xml index aa40b09846..644c8840d8 100644 --- a/multiuser/machine-auth/che-multiuser-machine-authentication-shared/pom.xml +++ b/multiuser/machine-auth/che-multiuser-machine-authentication-shared/pom.xml @@ -17,7 +17,7 @@ che-multiuser-machine-auth org.eclipse.che.multiuser - 7.73.0-SNAPSHOT + 7.74.0-SNAPSHOT che-multiuser-machine-authentication-shared jar diff --git a/multiuser/machine-auth/che-multiuser-machine-authentication/pom.xml b/multiuser/machine-auth/che-multiuser-machine-authentication/pom.xml index 1282022396..9ec6ffdad2 100644 --- a/multiuser/machine-auth/che-multiuser-machine-authentication/pom.xml +++ b/multiuser/machine-auth/che-multiuser-machine-authentication/pom.xml @@ -17,7 +17,7 @@ che-multiuser-machine-auth org.eclipse.che.multiuser - 7.73.0-SNAPSHOT + 7.74.0-SNAPSHOT che-multiuser-machine-authentication jar diff --git a/multiuser/machine-auth/pom.xml b/multiuser/machine-auth/pom.xml index 66077ae0af..f129c5321f 100644 --- a/multiuser/machine-auth/pom.xml +++ b/multiuser/machine-auth/pom.xml @@ -17,7 +17,7 @@ che-multiuser-parent org.eclipse.che.multiuser - 7.73.0-SNAPSHOT + 7.74.0-SNAPSHOT ../pom.xml che-multiuser-machine-auth diff --git a/multiuser/oidc/pom.xml b/multiuser/oidc/pom.xml index c00804f16e..c2aa2da352 100644 --- a/multiuser/oidc/pom.xml +++ b/multiuser/oidc/pom.xml @@ -17,7 +17,7 @@ che-multiuser-parent org.eclipse.che.multiuser - 7.73.0-SNAPSHOT + 7.74.0-SNAPSHOT che-multiuser-oidc jar diff --git a/multiuser/permission/che-multiuser-permission-devfile/pom.xml b/multiuser/permission/che-multiuser-permission-devfile/pom.xml index 35bbdd8550..c39e655c3f 100644 --- a/multiuser/permission/che-multiuser-permission-devfile/pom.xml +++ b/multiuser/permission/che-multiuser-permission-devfile/pom.xml @@ -17,7 +17,7 @@ che-multiuser-permission org.eclipse.che.multiuser - 7.73.0-SNAPSHOT + 7.74.0-SNAPSHOT che-multiuser-permission-devfile Che Multiuser :: Devfile Permissions diff --git a/multiuser/permission/che-multiuser-permission-logger/pom.xml b/multiuser/permission/che-multiuser-permission-logger/pom.xml index e0bd8d3cfc..cbf314d12c 100644 --- a/multiuser/permission/che-multiuser-permission-logger/pom.xml +++ b/multiuser/permission/che-multiuser-permission-logger/pom.xml @@ -17,7 +17,7 @@ che-multiuser-permission org.eclipse.che.multiuser - 7.73.0-SNAPSHOT + 7.74.0-SNAPSHOT che-multiuser-permission-logger Che Multiuser :: Logger Permissions diff --git a/multiuser/permission/che-multiuser-permission-resource/pom.xml b/multiuser/permission/che-multiuser-permission-resource/pom.xml index 5816ca51e4..da6194cb9f 100644 --- a/multiuser/permission/che-multiuser-permission-resource/pom.xml +++ b/multiuser/permission/che-multiuser-permission-resource/pom.xml @@ -17,7 +17,7 @@ che-multiuser-permission org.eclipse.che.multiuser - 7.73.0-SNAPSHOT + 7.74.0-SNAPSHOT che-multiuser-permission-resource Che Multiuser :: Resource :: Permissions diff --git a/multiuser/permission/che-multiuser-permission-system/pom.xml b/multiuser/permission/che-multiuser-permission-system/pom.xml index 2c02a66aad..a420a1cb12 100644 --- a/multiuser/permission/che-multiuser-permission-system/pom.xml +++ b/multiuser/permission/che-multiuser-permission-system/pom.xml @@ -17,7 +17,7 @@ che-multiuser-permission org.eclipse.che.multiuser - 7.73.0-SNAPSHOT + 7.74.0-SNAPSHOT che-multiuser-permission-system Che Multiuser :: System Permissions diff --git a/multiuser/permission/che-multiuser-permission-user/pom.xml b/multiuser/permission/che-multiuser-permission-user/pom.xml index d4b3dcb1b9..c013ab9aed 100644 --- a/multiuser/permission/che-multiuser-permission-user/pom.xml +++ b/multiuser/permission/che-multiuser-permission-user/pom.xml @@ -17,7 +17,7 @@ che-multiuser-permission org.eclipse.che.multiuser - 7.73.0-SNAPSHOT + 7.74.0-SNAPSHOT che-multiuser-permission-user Che Multiuser :: User Permissions diff --git a/multiuser/permission/che-multiuser-permission-workspace-activity/pom.xml b/multiuser/permission/che-multiuser-permission-workspace-activity/pom.xml index bf70752d9a..61fca5dffb 100644 --- a/multiuser/permission/che-multiuser-permission-workspace-activity/pom.xml +++ b/multiuser/permission/che-multiuser-permission-workspace-activity/pom.xml @@ -17,7 +17,7 @@ che-multiuser-permission org.eclipse.che.multiuser - 7.73.0-SNAPSHOT + 7.74.0-SNAPSHOT che-multiuser-permission-workspace-activity Che Multiuser :: Workspace Activity Permissions diff --git a/multiuser/permission/che-multiuser-permission-workspace/pom.xml b/multiuser/permission/che-multiuser-permission-workspace/pom.xml index 6f5a7ea553..80c0ae16fe 100644 --- a/multiuser/permission/che-multiuser-permission-workspace/pom.xml +++ b/multiuser/permission/che-multiuser-permission-workspace/pom.xml @@ -17,7 +17,7 @@ che-multiuser-permission org.eclipse.che.multiuser - 7.73.0-SNAPSHOT + 7.74.0-SNAPSHOT che-multiuser-permission-workspace Che Multiuser :: Workspace Permissions diff --git a/multiuser/permission/pom.xml b/multiuser/permission/pom.xml index 3feedfaefb..eed4ae3975 100644 --- a/multiuser/permission/pom.xml +++ b/multiuser/permission/pom.xml @@ -17,7 +17,7 @@ che-multiuser-parent org.eclipse.che.multiuser - 7.73.0-SNAPSHOT + 7.74.0-SNAPSHOT ../pom.xml che-multiuser-permission diff --git a/multiuser/personal-account/pom.xml b/multiuser/personal-account/pom.xml index 3e790130fe..a582250ae5 100644 --- a/multiuser/personal-account/pom.xml +++ b/multiuser/personal-account/pom.xml @@ -17,7 +17,7 @@ che-multiuser-parent org.eclipse.che.multiuser - 7.73.0-SNAPSHOT + 7.74.0-SNAPSHOT che-multiuser-personal-account jar diff --git a/multiuser/pom.xml b/multiuser/pom.xml index 6bae24c14f..0fa4cade6f 100644 --- a/multiuser/pom.xml +++ b/multiuser/pom.xml @@ -17,7 +17,7 @@ che-server org.eclipse.che - 7.73.0-SNAPSHOT + 7.74.0-SNAPSHOT ../pom.xml org.eclipse.che.multiuser diff --git a/multiuser/sql-schema/pom.xml b/multiuser/sql-schema/pom.xml index 52d2d062b0..b8379a3215 100644 --- a/multiuser/sql-schema/pom.xml +++ b/multiuser/sql-schema/pom.xml @@ -17,7 +17,7 @@ che-multiuser-parent org.eclipse.che.multiuser - 7.73.0-SNAPSHOT + 7.74.0-SNAPSHOT ../pom.xml che-multiuser-sql-schema diff --git a/pom.xml b/pom.xml index 0a55134347..9e7665287e 100644 --- a/pom.xml +++ b/pom.xml @@ -16,7 +16,7 @@ 4.0.0 org.eclipse.che che-server - 7.73.0-SNAPSHOT + 7.74.0-SNAPSHOT pom Che Server Eclipse Che Server @@ -100,7 +100,7 @@ Red Hat, Inc. - initial API and implementation ${project.version} - 7.73.0-SNAPSHOT + 7.74.0-SNAPSHOT 1.0-beta2 Red Hat, Inc. diff --git a/typescript-dto/dto-pom.xml b/typescript-dto/dto-pom.xml index 69facc90b5..72457d72c9 100644 --- a/typescript-dto/dto-pom.xml +++ b/typescript-dto/dto-pom.xml @@ -23,7 +23,7 @@ pom Che TypeScript DTO - 7.73.0-SNAPSHOT + 7.74.0-SNAPSHOT diff --git a/wsmaster/che-core-api-account/pom.xml b/wsmaster/che-core-api-account/pom.xml index bc9493b0c8..23b5de9401 100644 --- a/wsmaster/che-core-api-account/pom.xml +++ b/wsmaster/che-core-api-account/pom.xml @@ -17,7 +17,7 @@ che-master-parent org.eclipse.che.core - 7.73.0-SNAPSHOT + 7.74.0-SNAPSHOT che-core-api-account Che Core :: API :: Account diff --git a/wsmaster/che-core-api-auth-azure-devops/pom.xml b/wsmaster/che-core-api-auth-azure-devops/pom.xml index d525238c49..127576967a 100644 --- a/wsmaster/che-core-api-auth-azure-devops/pom.xml +++ b/wsmaster/che-core-api-auth-azure-devops/pom.xml @@ -17,7 +17,7 @@ che-master-parent org.eclipse.che.core - 7.73.0-SNAPSHOT + 7.74.0-SNAPSHOT che-core-api-auth-azure-devops jar diff --git a/wsmaster/che-core-api-auth-bitbucket/pom.xml b/wsmaster/che-core-api-auth-bitbucket/pom.xml index ae6c39d18c..d32dc40adc 100644 --- a/wsmaster/che-core-api-auth-bitbucket/pom.xml +++ b/wsmaster/che-core-api-auth-bitbucket/pom.xml @@ -17,7 +17,7 @@ che-master-parent org.eclipse.che.core - 7.73.0-SNAPSHOT + 7.74.0-SNAPSHOT che-core-api-auth-bitbucket jar diff --git a/wsmaster/che-core-api-auth-github/pom.xml b/wsmaster/che-core-api-auth-github/pom.xml index 8352670ffd..04b1abe27b 100644 --- a/wsmaster/che-core-api-auth-github/pom.xml +++ b/wsmaster/che-core-api-auth-github/pom.xml @@ -17,7 +17,7 @@ che-master-parent org.eclipse.che.core - 7.73.0-SNAPSHOT + 7.74.0-SNAPSHOT che-core-api-auth-github jar diff --git a/wsmaster/che-core-api-auth-gitlab/pom.xml b/wsmaster/che-core-api-auth-gitlab/pom.xml index 4c7a8f69d5..dba9b53e2d 100644 --- a/wsmaster/che-core-api-auth-gitlab/pom.xml +++ b/wsmaster/che-core-api-auth-gitlab/pom.xml @@ -17,7 +17,7 @@ che-master-parent org.eclipse.che.core - 7.73.0-SNAPSHOT + 7.74.0-SNAPSHOT che-core-api-auth-gitlab jar diff --git a/wsmaster/che-core-api-auth-openshift/pom.xml b/wsmaster/che-core-api-auth-openshift/pom.xml index f6eb011e77..7fbdd86461 100644 --- a/wsmaster/che-core-api-auth-openshift/pom.xml +++ b/wsmaster/che-core-api-auth-openshift/pom.xml @@ -17,7 +17,7 @@ che-master-parent org.eclipse.che.core - 7.73.0-SNAPSHOT + 7.74.0-SNAPSHOT che-core-api-auth-openshift jar diff --git a/wsmaster/che-core-api-auth-shared/pom.xml b/wsmaster/che-core-api-auth-shared/pom.xml index 2d99d35823..f084f62b11 100644 --- a/wsmaster/che-core-api-auth-shared/pom.xml +++ b/wsmaster/che-core-api-auth-shared/pom.xml @@ -17,7 +17,7 @@ che-master-parent org.eclipse.che.core - 7.73.0-SNAPSHOT + 7.74.0-SNAPSHOT che-core-api-auth-shared jar diff --git a/wsmaster/che-core-api-auth/pom.xml b/wsmaster/che-core-api-auth/pom.xml index 875d931776..f01db0df93 100644 --- a/wsmaster/che-core-api-auth/pom.xml +++ b/wsmaster/che-core-api-auth/pom.xml @@ -17,7 +17,7 @@ che-master-parent org.eclipse.che.core - 7.73.0-SNAPSHOT + 7.74.0-SNAPSHOT che-core-api-auth jar diff --git a/wsmaster/che-core-api-devfile-shared/pom.xml b/wsmaster/che-core-api-devfile-shared/pom.xml index ab6f7924a1..c6ba4a028f 100644 --- a/wsmaster/che-core-api-devfile-shared/pom.xml +++ b/wsmaster/che-core-api-devfile-shared/pom.xml @@ -17,7 +17,7 @@ che-master-parent org.eclipse.che.core - 7.73.0-SNAPSHOT + 7.74.0-SNAPSHOT che-core-api-devfile-shared jar diff --git a/wsmaster/che-core-api-devfile/pom.xml b/wsmaster/che-core-api-devfile/pom.xml index 70a54b2599..825ec71401 100644 --- a/wsmaster/che-core-api-devfile/pom.xml +++ b/wsmaster/che-core-api-devfile/pom.xml @@ -17,7 +17,7 @@ che-master-parent org.eclipse.che.core - 7.73.0-SNAPSHOT + 7.74.0-SNAPSHOT che-core-api-devfile jar diff --git a/wsmaster/che-core-api-factory-azure-devops/pom.xml b/wsmaster/che-core-api-factory-azure-devops/pom.xml index e6fb299ca2..2ce181bfc6 100644 --- a/wsmaster/che-core-api-factory-azure-devops/pom.xml +++ b/wsmaster/che-core-api-factory-azure-devops/pom.xml @@ -17,7 +17,7 @@ che-master-parent org.eclipse.che.core - 7.73.0-SNAPSHOT + 7.74.0-SNAPSHOT che-core-api-factory-azure-devops jar diff --git a/wsmaster/che-core-api-factory-bitbucket-server/pom.xml b/wsmaster/che-core-api-factory-bitbucket-server/pom.xml index d61b1c2a5c..c35f13660d 100644 --- a/wsmaster/che-core-api-factory-bitbucket-server/pom.xml +++ b/wsmaster/che-core-api-factory-bitbucket-server/pom.xml @@ -17,7 +17,7 @@ che-master-parent org.eclipse.che.core - 7.73.0-SNAPSHOT + 7.74.0-SNAPSHOT che-core-api-factory-bitbucket-server jar diff --git a/wsmaster/che-core-api-factory-bitbucket/pom.xml b/wsmaster/che-core-api-factory-bitbucket/pom.xml index 9786fefc96..780b5f5c93 100644 --- a/wsmaster/che-core-api-factory-bitbucket/pom.xml +++ b/wsmaster/che-core-api-factory-bitbucket/pom.xml @@ -17,7 +17,7 @@ che-master-parent org.eclipse.che.core - 7.73.0-SNAPSHOT + 7.74.0-SNAPSHOT che-core-api-factory-bitbucket jar diff --git a/wsmaster/che-core-api-factory-git-ssh/pom.xml b/wsmaster/che-core-api-factory-git-ssh/pom.xml index 7069c8ba1a..76fec090cd 100644 --- a/wsmaster/che-core-api-factory-git-ssh/pom.xml +++ b/wsmaster/che-core-api-factory-git-ssh/pom.xml @@ -17,7 +17,7 @@ che-master-parent org.eclipse.che.core - 7.73.0-SNAPSHOT + 7.74.0-SNAPSHOT che-core-api-factory-git-ssh jar diff --git a/wsmaster/che-core-api-factory-github/pom.xml b/wsmaster/che-core-api-factory-github/pom.xml index 7f67f5d040..b40040bdaf 100644 --- a/wsmaster/che-core-api-factory-github/pom.xml +++ b/wsmaster/che-core-api-factory-github/pom.xml @@ -17,7 +17,7 @@ che-master-parent org.eclipse.che.core - 7.73.0-SNAPSHOT + 7.74.0-SNAPSHOT che-core-api-factory-github jar diff --git a/wsmaster/che-core-api-factory-gitlab/pom.xml b/wsmaster/che-core-api-factory-gitlab/pom.xml index 83260e991c..4a85797e4f 100644 --- a/wsmaster/che-core-api-factory-gitlab/pom.xml +++ b/wsmaster/che-core-api-factory-gitlab/pom.xml @@ -17,7 +17,7 @@ che-master-parent org.eclipse.che.core - 7.73.0-SNAPSHOT + 7.74.0-SNAPSHOT che-core-api-factory-gitlab jar diff --git a/wsmaster/che-core-api-factory-shared/pom.xml b/wsmaster/che-core-api-factory-shared/pom.xml index ee17f6694f..8877b08d2e 100644 --- a/wsmaster/che-core-api-factory-shared/pom.xml +++ b/wsmaster/che-core-api-factory-shared/pom.xml @@ -17,7 +17,7 @@ che-master-parent org.eclipse.che.core - 7.73.0-SNAPSHOT + 7.74.0-SNAPSHOT che-core-api-factory-shared jar diff --git a/wsmaster/che-core-api-factory/pom.xml b/wsmaster/che-core-api-factory/pom.xml index e2252ec26c..737e26c30d 100644 --- a/wsmaster/che-core-api-factory/pom.xml +++ b/wsmaster/che-core-api-factory/pom.xml @@ -17,7 +17,7 @@ che-master-parent org.eclipse.che.core - 7.73.0-SNAPSHOT + 7.74.0-SNAPSHOT che-core-api-factory jar diff --git a/wsmaster/che-core-api-logger-shared/pom.xml b/wsmaster/che-core-api-logger-shared/pom.xml index d515c15e73..a27060dd51 100644 --- a/wsmaster/che-core-api-logger-shared/pom.xml +++ b/wsmaster/che-core-api-logger-shared/pom.xml @@ -17,7 +17,7 @@ che-master-parent org.eclipse.che.core - 7.73.0-SNAPSHOT + 7.74.0-SNAPSHOT che-core-api-logger-shared jar diff --git a/wsmaster/che-core-api-logger/pom.xml b/wsmaster/che-core-api-logger/pom.xml index a76ce28e58..c2a20596c6 100644 --- a/wsmaster/che-core-api-logger/pom.xml +++ b/wsmaster/che-core-api-logger/pom.xml @@ -17,7 +17,7 @@ che-master-parent org.eclipse.che.core - 7.73.0-SNAPSHOT + 7.74.0-SNAPSHOT che-core-api-logger jar diff --git a/wsmaster/che-core-api-metrics/pom.xml b/wsmaster/che-core-api-metrics/pom.xml index 4029b3f459..008ba93c7b 100644 --- a/wsmaster/che-core-api-metrics/pom.xml +++ b/wsmaster/che-core-api-metrics/pom.xml @@ -17,7 +17,7 @@ che-master-parent org.eclipse.che.core - 7.73.0-SNAPSHOT + 7.74.0-SNAPSHOT che-core-api-metrics jar diff --git a/wsmaster/che-core-api-ssh-shared/pom.xml b/wsmaster/che-core-api-ssh-shared/pom.xml index 7f50c8c543..38d0c4ebf5 100644 --- a/wsmaster/che-core-api-ssh-shared/pom.xml +++ b/wsmaster/che-core-api-ssh-shared/pom.xml @@ -17,7 +17,7 @@ che-master-parent org.eclipse.che.core - 7.73.0-SNAPSHOT + 7.74.0-SNAPSHOT che-core-api-ssh-shared jar diff --git a/wsmaster/che-core-api-ssh/pom.xml b/wsmaster/che-core-api-ssh/pom.xml index 3cb7e3af54..7510df7e55 100644 --- a/wsmaster/che-core-api-ssh/pom.xml +++ b/wsmaster/che-core-api-ssh/pom.xml @@ -17,7 +17,7 @@ che-master-parent org.eclipse.che.core - 7.73.0-SNAPSHOT + 7.74.0-SNAPSHOT che-core-api-ssh jar diff --git a/wsmaster/che-core-api-system-shared/pom.xml b/wsmaster/che-core-api-system-shared/pom.xml index fe30c5bb11..04e878756c 100644 --- a/wsmaster/che-core-api-system-shared/pom.xml +++ b/wsmaster/che-core-api-system-shared/pom.xml @@ -17,7 +17,7 @@ che-master-parent org.eclipse.che.core - 7.73.0-SNAPSHOT + 7.74.0-SNAPSHOT che-core-api-system-shared jar diff --git a/wsmaster/che-core-api-system/pom.xml b/wsmaster/che-core-api-system/pom.xml index 973ece02f6..2c3f8d44cd 100644 --- a/wsmaster/che-core-api-system/pom.xml +++ b/wsmaster/che-core-api-system/pom.xml @@ -17,7 +17,7 @@ che-master-parent org.eclipse.che.core - 7.73.0-SNAPSHOT + 7.74.0-SNAPSHOT che-core-api-system jar diff --git a/wsmaster/che-core-api-user-shared/pom.xml b/wsmaster/che-core-api-user-shared/pom.xml index 556832cb44..93dd04b885 100644 --- a/wsmaster/che-core-api-user-shared/pom.xml +++ b/wsmaster/che-core-api-user-shared/pom.xml @@ -17,7 +17,7 @@ che-master-parent org.eclipse.che.core - 7.73.0-SNAPSHOT + 7.74.0-SNAPSHOT che-core-api-user-shared Che Core :: API :: User :: Shared diff --git a/wsmaster/che-core-api-user/pom.xml b/wsmaster/che-core-api-user/pom.xml index d9327480f8..4e60130ac0 100644 --- a/wsmaster/che-core-api-user/pom.xml +++ b/wsmaster/che-core-api-user/pom.xml @@ -17,7 +17,7 @@ che-master-parent org.eclipse.che.core - 7.73.0-SNAPSHOT + 7.74.0-SNAPSHOT che-core-api-user Che Core :: API :: User diff --git a/wsmaster/che-core-api-workspace-activity/pom.xml b/wsmaster/che-core-api-workspace-activity/pom.xml index 38499fc800..0c8dfd9df5 100644 --- a/wsmaster/che-core-api-workspace-activity/pom.xml +++ b/wsmaster/che-core-api-workspace-activity/pom.xml @@ -17,7 +17,7 @@ che-master-parent org.eclipse.che.core - 7.73.0-SNAPSHOT + 7.74.0-SNAPSHOT che-core-api-workspace-activity jar diff --git a/wsmaster/che-core-api-workspace-shared/pom.xml b/wsmaster/che-core-api-workspace-shared/pom.xml index 1d38cd7d7c..a4fb61b895 100644 --- a/wsmaster/che-core-api-workspace-shared/pom.xml +++ b/wsmaster/che-core-api-workspace-shared/pom.xml @@ -17,7 +17,7 @@ che-master-parent org.eclipse.che.core - 7.73.0-SNAPSHOT + 7.74.0-SNAPSHOT che-core-api-workspace-shared jar diff --git a/wsmaster/che-core-api-workspace/pom.xml b/wsmaster/che-core-api-workspace/pom.xml index 02fc8d87c6..a95c0f98ba 100644 --- a/wsmaster/che-core-api-workspace/pom.xml +++ b/wsmaster/che-core-api-workspace/pom.xml @@ -17,7 +17,7 @@ che-master-parent org.eclipse.che.core - 7.73.0-SNAPSHOT + 7.74.0-SNAPSHOT che-core-api-workspace jar diff --git a/wsmaster/che-core-sql-schema/pom.xml b/wsmaster/che-core-sql-schema/pom.xml index 6f44c7ec34..c40e1adef5 100644 --- a/wsmaster/che-core-sql-schema/pom.xml +++ b/wsmaster/che-core-sql-schema/pom.xml @@ -17,7 +17,7 @@ che-master-parent org.eclipse.che.core - 7.73.0-SNAPSHOT + 7.74.0-SNAPSHOT che-core-sql-schema Che Core :: SQL :: Schema diff --git a/wsmaster/integration-tests/cascade-removal/pom.xml b/wsmaster/integration-tests/cascade-removal/pom.xml index 76a95e20a1..a99e5f093c 100644 --- a/wsmaster/integration-tests/cascade-removal/pom.xml +++ b/wsmaster/integration-tests/cascade-removal/pom.xml @@ -17,7 +17,7 @@ integration-tests-parent org.eclipse.che.core - 7.73.0-SNAPSHOT + 7.74.0-SNAPSHOT cascade-removal Integration Tests :: Cascade Removal diff --git a/wsmaster/integration-tests/mysql-tck/pom.xml b/wsmaster/integration-tests/mysql-tck/pom.xml index df6348ca4c..a283748387 100644 --- a/wsmaster/integration-tests/mysql-tck/pom.xml +++ b/wsmaster/integration-tests/mysql-tck/pom.xml @@ -17,7 +17,7 @@ integration-tests-parent org.eclipse.che.core - 7.73.0-SNAPSHOT + 7.74.0-SNAPSHOT mysql-tck jar diff --git a/wsmaster/integration-tests/pom.xml b/wsmaster/integration-tests/pom.xml index 6d83b92e29..07c5acfd7a 100644 --- a/wsmaster/integration-tests/pom.xml +++ b/wsmaster/integration-tests/pom.xml @@ -17,7 +17,7 @@ che-master-parent org.eclipse.che.core - 7.73.0-SNAPSHOT + 7.74.0-SNAPSHOT ../pom.xml integration-tests-parent diff --git a/wsmaster/integration-tests/postgresql-tck/pom.xml b/wsmaster/integration-tests/postgresql-tck/pom.xml index 57f09aae44..e588a526d0 100644 --- a/wsmaster/integration-tests/postgresql-tck/pom.xml +++ b/wsmaster/integration-tests/postgresql-tck/pom.xml @@ -17,7 +17,7 @@ integration-tests-parent org.eclipse.che.core - 7.73.0-SNAPSHOT + 7.74.0-SNAPSHOT postgresql-tck jar diff --git a/wsmaster/pom.xml b/wsmaster/pom.xml index 0b3699f0d3..c47f46601f 100644 --- a/wsmaster/pom.xml +++ b/wsmaster/pom.xml @@ -17,7 +17,7 @@ che-core-parent org.eclipse.che.core - 7.73.0-SNAPSHOT + 7.74.0-SNAPSHOT ../core/pom.xml che-master-parent From 7d0cfb306c3e9c718a9850db0adb5637704ca1f7 Mon Sep 17 00:00:00 2001 From: Igor Vinokur Date: Sun, 27 Aug 2023 16:17:13 +0300 Subject: [PATCH 47/75] Support SSH urls (#539) Extend each SCM provider implementation to support SSH urls. --- assembly/assembly-wsmaster-war/pom.xml | 4 - .../che/api/deploy/WsMasterModule.java | 4 - pom.xml | 5 - .../azure/devops/AzureDevOpsURLParser.java | 43 ++-- .../server/azure/devops/AzureDevOpsUrl.java | 20 +- .../devops/AzureDevOpsURLParserTest.java | 49 ++++ .../azure/devops/AzureDevOpsURLTest.java | 219 ++++++++++++++++++ .../bitbucket/BitbucketServerURLParser.java | 51 +++- .../server/bitbucket/BitbucketServerUrl.java | 29 ++- ...verAuthorizingFileContentProviderTest.java | 23 +- .../BitbucketServerURLParserTest.java | 22 ++ .../bitbucket/BitbucketServerURLTest.java | 137 +++++++++++ .../server/bitbucket/BitbucketURLParser.java | 20 +- .../server/bitbucket/BitbucketUrl.java | 26 ++- .../bitbucket/BitbucketURLParserTest.java | 29 ++- .../server/bitbucket/BitbucketUrlTest.java | 23 ++ wsmaster/che-core-api-factory-git-ssh/pom.xml | 112 --------- .../GitSshAuthorizingFileContentProvider.java | 31 --- .../ssh/GitSshFactoryParametersResolver.java | 129 ----------- .../server/git/ssh/GitSshScmFileResolver.java | 45 ---- .../server/git/ssh/GitSshURLParser.java | 66 ------ .../api/factory/server/git/ssh/GitSshUrl.java | 108 --------- .../server/git/ssh/GitSshURLParserTest.java | 50 ---- .../src/test/resources/logback-test.xml | 26 --- .../server/github/GithubURLParser.java | 27 ++- .../api/factory/server/github/GithubUrl.java | 20 +- .../server/github/GithubURLParserTest.java | 31 ++- .../factory/server/github/GithubUrlTest.java | 49 ++++ .../api/factory/server/gitlab/GitlabUrl.java | 24 +- .../server/gitlab/GitlabUrlParser.java | 57 +++-- ...labAuthorizingFileContentProviderTest.java | 3 +- .../server/gitlab/GitlabUrlParserTest.java | 33 ++- .../factory/server/gitlab/GitlabUrlTest.java | 19 ++ .../scm/AuthorizingFileContentProvider.java | 2 +- .../server/urlfactory/DefaultFactoryUrl.java | 5 + .../server/urlfactory/RemoteFactoryUrl.java | 3 + ...thorizingFactoryParameterResolverTest.java | 2 +- .../urlfactory/URLFactoryBuilderTest.java | 10 + wsmaster/pom.xml | 1 - 39 files changed, 888 insertions(+), 669 deletions(-) create mode 100644 wsmaster/che-core-api-factory-azure-devops/src/test/java/org/eclipse/che/api/factory/server/azure/devops/AzureDevOpsURLTest.java create mode 100644 wsmaster/che-core-api-factory-bitbucket-server/src/test/java/org/eclipse/che/api/factory/server/bitbucket/BitbucketServerURLTest.java delete mode 100644 wsmaster/che-core-api-factory-git-ssh/pom.xml delete mode 100644 wsmaster/che-core-api-factory-git-ssh/src/main/java/org/eclipse/che/api/factory/server/git/ssh/GitSshAuthorizingFileContentProvider.java delete mode 100644 wsmaster/che-core-api-factory-git-ssh/src/main/java/org/eclipse/che/api/factory/server/git/ssh/GitSshFactoryParametersResolver.java delete mode 100644 wsmaster/che-core-api-factory-git-ssh/src/main/java/org/eclipse/che/api/factory/server/git/ssh/GitSshScmFileResolver.java delete mode 100644 wsmaster/che-core-api-factory-git-ssh/src/main/java/org/eclipse/che/api/factory/server/git/ssh/GitSshURLParser.java delete mode 100644 wsmaster/che-core-api-factory-git-ssh/src/main/java/org/eclipse/che/api/factory/server/git/ssh/GitSshUrl.java delete mode 100644 wsmaster/che-core-api-factory-git-ssh/src/test/java/org/eclipse/che/api/factory/server/git/ssh/GitSshURLParserTest.java delete mode 100644 wsmaster/che-core-api-factory-git-ssh/src/test/resources/logback-test.xml diff --git a/assembly/assembly-wsmaster-war/pom.xml b/assembly/assembly-wsmaster-war/pom.xml index b18fa33434..75e59b3650 100644 --- a/assembly/assembly-wsmaster-war/pom.xml +++ b/assembly/assembly-wsmaster-war/pom.xml @@ -139,10 +139,6 @@ org.eclipse.che.core che-core-api-factory-bitbucket-server - - org.eclipse.che.core - che-core-api-factory-git-ssh - org.eclipse.che.core che-core-api-factory-github diff --git a/assembly/assembly-wsmaster-war/src/main/java/org/eclipse/che/api/deploy/WsMasterModule.java b/assembly/assembly-wsmaster-war/src/main/java/org/eclipse/che/api/deploy/WsMasterModule.java index 97867dfe71..274c1ff2f8 100644 --- a/assembly/assembly-wsmaster-war/src/main/java/org/eclipse/che/api/deploy/WsMasterModule.java +++ b/assembly/assembly-wsmaster-war/src/main/java/org/eclipse/che/api/deploy/WsMasterModule.java @@ -44,8 +44,6 @@ import org.eclipse.che.api.factory.server.bitbucket.BitbucketFactoryParametersRe import org.eclipse.che.api.factory.server.bitbucket.BitbucketScmFileResolver; import org.eclipse.che.api.factory.server.bitbucket.BitbucketServerAuthorizingFactoryParametersResolver; import org.eclipse.che.api.factory.server.bitbucket.BitbucketServerScmFileResolver; -import org.eclipse.che.api.factory.server.git.ssh.GitSshFactoryParametersResolver; -import org.eclipse.che.api.factory.server.git.ssh.GitSshScmFileResolver; import org.eclipse.che.api.factory.server.github.GithubFactoryParametersResolver; import org.eclipse.che.api.factory.server.github.GithubScmFileResolver; import org.eclipse.che.api.factory.server.gitlab.GitlabFactoryParametersResolver; @@ -177,7 +175,6 @@ public class WsMasterModule extends AbstractModule { factoryParametersResolverMultibinder .addBinding() .to(AzureDevOpsFactoryParametersResolver.class); - factoryParametersResolverMultibinder.addBinding().to(GitSshFactoryParametersResolver.class); Multibinder scmFileResolverResolverMultibinder = Multibinder.newSetBinder(binder(), ScmFileResolver.class); @@ -186,7 +183,6 @@ public class WsMasterModule extends AbstractModule { scmFileResolverResolverMultibinder.addBinding().to(GitlabScmFileResolver.class); scmFileResolverResolverMultibinder.addBinding().to(BitbucketServerScmFileResolver.class); scmFileResolverResolverMultibinder.addBinding().to(AzureDevOpsScmFileResolver.class); - scmFileResolverResolverMultibinder.addBinding().to(GitSshScmFileResolver.class); install(new org.eclipse.che.api.factory.server.scm.KubernetesScmModule()); install(new org.eclipse.che.api.factory.server.bitbucket.BitbucketServerModule()); diff --git a/pom.xml b/pom.xml index 9e7665287e..bfc7217bba 100644 --- a/pom.xml +++ b/pom.xml @@ -759,11 +759,6 @@ che-core-api-factory-bitbucket-server ${che.version} - - org.eclipse.che.core - che-core-api-factory-git-ssh - ${che.version} - org.eclipse.che.core che-core-api-factory-github diff --git a/wsmaster/che-core-api-factory-azure-devops/src/main/java/org/eclipse/che/api/factory/server/azure/devops/AzureDevOpsURLParser.java b/wsmaster/che-core-api-factory-azure-devops/src/main/java/org/eclipse/che/api/factory/server/azure/devops/AzureDevOpsURLParser.java index a2aa19e19d..b3e5a4e377 100644 --- a/wsmaster/che-core-api-factory-azure-devops/src/main/java/org/eclipse/che/api/factory/server/azure/devops/AzureDevOpsURLParser.java +++ b/wsmaster/che-core-api-factory-azure-devops/src/main/java/org/eclipse/che/api/factory/server/azure/devops/AzureDevOpsURLParser.java @@ -40,6 +40,8 @@ public class AzureDevOpsURLParser { */ private final Pattern azureDevOpsPattern; + private final Pattern azureSSHDevOpsPattern; + @Inject public AzureDevOpsURLParser( DevfileFilenamesProvider devfileFilenamesProvider, @@ -58,14 +60,22 @@ public class AzureDevOpsURLParser { + "([?&]version=GB(?[^&]++))?" + "(.*)", azureDevOpsScmApiEndpointHost)); + this.azureSSHDevOpsPattern = + compile( + format( + "^git@ssh\\.%s:v3/(?.*)/(?.*)/(?.*)$", + azureDevOpsScmApiEndpointHost)); } public boolean isValid(@NotNull String url) { - return azureDevOpsPattern.matcher(url).matches(); + return azureDevOpsPattern.matcher(url).matches() + || azureSSHDevOpsPattern.matcher(url).matches(); } public AzureDevOpsUrl parse(String url) { - Matcher matcher = azureDevOpsPattern.matcher(url); + boolean isHTTPSUrl = azureDevOpsPattern.matcher(url).matches(); + Matcher matcher = + isHTTPSUrl ? azureDevOpsPattern.matcher(url) : azureSSHDevOpsPattern.matcher(url); if (!matcher.matches()) { throw new IllegalArgumentException(format("The given url %s is not a valid.", url)); } @@ -79,23 +89,28 @@ public class AzureDevOpsURLParser { project = repoName; } - String organization = matcher.group("organization"); - String branch = matcher.group("branch"); - String tag = matcher.group("tag"); + String branch = null; + String tag = null; - // The url might have the following formats: - // - https://@///_git/ - // - https://@///_git/ - // For the first case we need to remove the `organization` from the url to distinguish it from - // `credentials` - // TODO: return empty credentials like the BitBucketUrl - String organizationCanIgnore = matcher.group("organizationCanIgnore"); - if (!isNullOrEmpty(organization) && organization.equals(organizationCanIgnore)) { - url = url.replace(organizationCanIgnore + "@", ""); + String organization = matcher.group("organization"); + if (isHTTPSUrl) { + branch = matcher.group("branch"); + tag = matcher.group("tag"); + // The url might have the following formats: + // - https://@///_git/ + // - https://@///_git/ + // For the first case we need to remove the `organization` from the url to distinguish it from + // `credentials` + // TODO: return empty credentials like the BitBucketUrl + String organizationCanIgnore = matcher.group("organizationCanIgnore"); + if (!isNullOrEmpty(organization) && organization.equals(organizationCanIgnore)) { + url = url.replace(organizationCanIgnore + "@", ""); + } } return new AzureDevOpsUrl() .withHostName(azureDevOpsScmApiEndpointHost) + .setIsHTTPSUrl(isHTTPSUrl) .withProject(project) .withRepository(repoName) .withOrganization(organization) diff --git a/wsmaster/che-core-api-factory-azure-devops/src/main/java/org/eclipse/che/api/factory/server/azure/devops/AzureDevOpsUrl.java b/wsmaster/che-core-api-factory-azure-devops/src/main/java/org/eclipse/che/api/factory/server/azure/devops/AzureDevOpsUrl.java index ac25cf9655..6ae07240a6 100644 --- a/wsmaster/che-core-api-factory-azure-devops/src/main/java/org/eclipse/che/api/factory/server/azure/devops/AzureDevOpsUrl.java +++ b/wsmaster/che-core-api-factory-azure-devops/src/main/java/org/eclipse/che/api/factory/server/azure/devops/AzureDevOpsUrl.java @@ -30,6 +30,7 @@ import org.eclipse.che.api.factory.server.urlfactory.DefaultFactoryUrl; */ public class AzureDevOpsUrl extends DefaultFactoryUrl { + private boolean isHTTPSUrl; private String hostName; private String repository; @@ -97,6 +98,11 @@ public class AzureDevOpsUrl extends DefaultFactoryUrl { return this; } + @Override + public String getProviderUrl() { + return "https://" + hostName; + } + protected AzureDevOpsUrl withDevfileFilenames(List devfileFilenames) { this.devfileFilenames.addAll(devfileFilenames); return this; @@ -145,11 +151,14 @@ public class AzureDevOpsUrl extends DefaultFactoryUrl { } public String getRepositoryLocation() { - return getRepoPathJoiner().add("_git").add(repository).toString(); + if (isHTTPSUrl) { + return getRepoPathJoiner().add("_git").add(repository).toString(); + } + return "git@ssh." + hostName + ":v3/" + organization + "/" + project + "/" + repository; } private StringJoiner getRepoPathJoiner() { - return new StringJoiner("/").add(hostName).add(organization).add(project); + return new StringJoiner("/").add(getProviderUrl()).add(organization).add(project); } @Override @@ -157,8 +166,13 @@ public class AzureDevOpsUrl extends DefaultFactoryUrl { return hostName; } + public AzureDevOpsUrl setIsHTTPSUrl(boolean isHTTPSUrl) { + this.isHTTPSUrl = isHTTPSUrl; + return this; + } + public AzureDevOpsUrl withHostName(String hostName) { - this.hostName = "https://" + hostName; + this.hostName = hostName; return this; } } diff --git a/wsmaster/che-core-api-factory-azure-devops/src/test/java/org/eclipse/che/api/factory/server/azure/devops/AzureDevOpsURLParserTest.java b/wsmaster/che-core-api-factory-azure-devops/src/test/java/org/eclipse/che/api/factory/server/azure/devops/AzureDevOpsURLParserTest.java index 0b6242612c..7265d3baa6 100644 --- a/wsmaster/che-core-api-factory-azure-devops/src/test/java/org/eclipse/che/api/factory/server/azure/devops/AzureDevOpsURLParserTest.java +++ b/wsmaster/che-core-api-factory-azure-devops/src/test/java/org/eclipse/che/api/factory/server/azure/devops/AzureDevOpsURLParserTest.java @@ -116,6 +116,55 @@ public class AzureDevOpsURLParserTest { "main", null }, + { + "git@ssh.dev.azure.com:v3/MyOrg/MyProject/MyRepo", + "MyOrg", + "MyProject", + "MyRepo", + null, + null + }, + { + "git@ssh.dev.azure.com:v3/MyOrg/MyProject/MyRepo.git", + "MyOrg", + "MyProject", + "MyRepo.git", + null, + null + }, + { + "git@ssh.dev.azure.com:v3/MyOrg/MyProject/MyRepo.dot.git", + "MyOrg", + "MyProject", + "MyRepo.dot.git", + null, + null + }, + { + "git@ssh.dev.azure.com:v3/MyOrg/MyProject/MyRepo", + "MyOrg", + "MyProject", + "MyRepo", + null, + null + }, + { + "git@ssh.dev.azure.com:v3/MyOrg/MyProject/MyRepo-with-hypen", + "MyOrg", + "MyProject", + "MyRepo-with-hypen", + null, + null + }, + {"git@ssh.dev.azure.com:v3/MyOrg/MyProject/-", "MyOrg", "MyProject", "-", null, null}, + { + "git@ssh.dev.azure.com:v3/MyOrg/MyProject/-j.git", + "MyOrg", + "MyProject", + "-j.git", + null, + null + }, { "https://MyOrg@dev.azure.com/MyOrg/MyProject/_git/MyRepo?path=MyFile&version=GBmain", "MyOrg", diff --git a/wsmaster/che-core-api-factory-azure-devops/src/test/java/org/eclipse/che/api/factory/server/azure/devops/AzureDevOpsURLTest.java b/wsmaster/che-core-api-factory-azure-devops/src/test/java/org/eclipse/che/api/factory/server/azure/devops/AzureDevOpsURLTest.java new file mode 100644 index 0000000000..240c590df7 --- /dev/null +++ b/wsmaster/che-core-api-factory-azure-devops/src/test/java/org/eclipse/che/api/factory/server/azure/devops/AzureDevOpsURLTest.java @@ -0,0 +1,219 @@ +/* + * Copyright (c) 2012-2023 Red Hat, Inc. + * This program and the accompanying materials are made + * available under the terms of the Eclipse Public License 2.0 + * which is available at https://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 + * + * Contributors: + * Red Hat, Inc. - initial API and implementation + */ +package org.eclipse.che.api.factory.server.azure.devops; + +import static java.lang.String.format; +import static org.mockito.Mockito.mock; +import static org.testng.Assert.assertEquals; + +import java.util.Arrays; +import java.util.Iterator; +import org.eclipse.che.api.factory.server.urlfactory.DevfileFilenamesProvider; +import org.eclipse.che.api.factory.server.urlfactory.RemoteFactoryUrl; +import org.mockito.testng.MockitoTestNGListener; +import org.testng.annotations.BeforeMethod; +import org.testng.annotations.DataProvider; +import org.testng.annotations.Listeners; +import org.testng.annotations.Test; + +@Listeners(MockitoTestNGListener.class) +public class AzureDevOpsURLTest { + private AzureDevOpsURLParser azureDevOpsURLParser; + + @BeforeMethod + protected void init() { + azureDevOpsURLParser = + new AzureDevOpsURLParser(mock(DevfileFilenamesProvider.class), "https://dev.azure.com/"); + } + + @Test(dataProvider = "urlsProvider") + public void checkDevfileLocation(String repoUrl, String fileUrl) { + + AzureDevOpsUrl azureDevOpsUrl = + azureDevOpsURLParser + .parse(repoUrl) + .withDevfileFilenames(Arrays.asList("devfile.yaml", "foo.bar")); + assertEquals(azureDevOpsUrl.devfileFileLocations().size(), 2); + Iterator iterator = + azureDevOpsUrl.devfileFileLocations().iterator(); + String location = iterator.next().location(); + assertEquals(location, format(fileUrl, "devfile.yaml")); + assertEquals(location, format(fileUrl, "foo.bar")); + } + + @DataProvider + public static Object[][] urlsProvider() { + return new Object[][] { + { + "https://MyOrg@dev.azure.com/MyOrg/MyProject/_git/MyRepo", + "https://dev.azure.com/MyOrg/MyProject/_apis/git/repositories/MyRepo/items?path=/devfile.yaml&api-version=7.0" + }, + { + "https://MyOrg@dev.azure.com/MyOrg/MyProject/_git/MyRepo.git", + "https://dev.azure.com/MyOrg/MyProject/_apis/git/repositories/MyRepo.git/items?path=/devfile.yaml&api-version=7.0" + }, + { + "https://MyOrg@dev.azure.com/MyOrg/MyProject/_git/MyRepo.dot.git", + "https://dev.azure.com/MyOrg/MyProject/_apis/git/repositories/MyRepo.dot.git/items?path=/devfile.yaml&api-version=7.0" + }, + { + "https://dev.azure.com/MyOrg/MyProject/_git/MyRepo", + "https://dev.azure.com/MyOrg/MyProject/_apis/git/repositories/MyRepo/items?path=/devfile.yaml&api-version=7.0" + }, + { + "https://dev.azure.com/MyOrg/MyProject/_git/MyRepo-with-hypen", + "https://dev.azure.com/MyOrg/MyProject/_apis/git/repositories/MyRepo-with-hypen/items?path=/devfile.yaml&api-version=7.0" + }, + { + "https://dev.azure.com/MyOrg/MyProject/_git/-", + "https://dev.azure.com/MyOrg/MyProject/_apis/git/repositories/-/items?path=/devfile.yaml&api-version=7.0" + }, + { + "https://dev.azure.com/MyOrg/MyProject/_git/-j.git", + "https://dev.azure.com/MyOrg/MyProject/_apis/git/repositories/-j.git/items?path=/devfile.yaml&api-version=7.0" + }, + { + "git@ssh.dev.azure.com:v3/MyOrg/MyProject/MyRepo", + "https://dev.azure.com/MyOrg/MyProject/_apis/git/repositories/MyRepo/items?path=/devfile.yaml&api-version=7.0" + }, + { + "git@ssh.dev.azure.com:v3/MyOrg/MyProject/MyRepo.git", + "https://dev.azure.com/MyOrg/MyProject/_apis/git/repositories/MyRepo.git/items?path=/devfile.yaml&api-version=7.0" + }, + { + "git@ssh.dev.azure.com:v3/MyOrg/MyProject/MyRepo.dot.git", + "https://dev.azure.com/MyOrg/MyProject/_apis/git/repositories/MyRepo.dot.git/items?path=/devfile.yaml&api-version=7.0" + }, + { + "git@ssh.dev.azure.com:v3/MyOrg/MyProject/MyRepo", + "https://dev.azure.com/MyOrg/MyProject/_apis/git/repositories/MyRepo/items?path=/devfile.yaml&api-version=7.0" + }, + { + "git@ssh.dev.azure.com:v3/MyOrg/MyProject/MyRepo-with-hypen", + "https://dev.azure.com/MyOrg/MyProject/_apis/git/repositories/MyRepo-with-hypen/items?path=/devfile.yaml&api-version=7.0" + }, + { + "git@ssh.dev.azure.com:v3/MyOrg/MyProject/-", + "https://dev.azure.com/MyOrg/MyProject/_apis/git/repositories/-/items?path=/devfile.yaml&api-version=7.0" + }, + { + "git@ssh.dev.azure.com:v3/MyOrg/MyProject/-j.git", + "https://dev.azure.com/MyOrg/MyProject/_apis/git/repositories/-j.git/items?path=/devfile.yaml&api-version=7.0" + }, + { + "https://MyOrg@dev.azure.com/MyOrg/MyProject/_git/MyRepo?path=MyFile&version=GBmain&_a=contents", + "https://dev.azure.com/MyOrg/MyProject/_apis/git/repositories/MyRepo/items?path=/devfile.yaml&versionType=branch&version=main&api-version=7.0" + }, + { + "https://MyOrg@dev.azure.com/MyOrg/MyProject/_git/MyRepo?path=MyFile&version=GBmain", + "https://dev.azure.com/MyOrg/MyProject/_apis/git/repositories/MyRepo/items?path=/devfile.yaml&versionType=branch&version=main&api-version=7.0" + }, + { + "https://MyOrg@dev.azure.com/MyOrg/MyProject/_git/MyRepo?path=MyFile&version=GTMyTag&_a=contents", + "https://dev.azure.com/MyOrg/MyProject/_apis/git/repositories/MyRepo/items?path=/devfile.yaml&versionType=tag&version=MyTag&api-version=7.0" + }, + { + "https://MyOrg@dev.azure.com/MyOrg/MyProject/_git/MyRepo?path=MyFile&version=GTMyTag", + "https://dev.azure.com/MyOrg/MyProject/_apis/git/repositories/MyRepo/items?path=/devfile.yaml&versionType=tag&version=MyTag&api-version=7.0" + }, + { + "https://MyOrg@dev.azure.com/MyOrg/_git/MyRepo", + "https://dev.azure.com/MyOrg/MyRepo/_apis/git/repositories/MyRepo/items?path=/devfile.yaml&api-version=7.0" + } + }; + } + + @Test(dataProvider = "repoProvider") + public void checkRepositoryLocation(String rawUrl, String repoUrl) { + AzureDevOpsUrl azureDevOpsUrl = azureDevOpsURLParser.parse(rawUrl); + assertEquals(azureDevOpsUrl.getRepositoryLocation(), repoUrl); + } + + @DataProvider + public static Object[][] repoProvider() { + return new Object[][] { + { + "https://MyOrg@dev.azure.com/MyOrg/MyProject/_git/MyRepo", + "https://dev.azure.com/MyOrg/MyProject/_git/MyRepo" + }, + { + "https://MyOrg@dev.azure.com/MyOrg/MyProject/_git/MyRepo.git", + "https://dev.azure.com/MyOrg/MyProject/_git/MyRepo.git" + }, + { + "https://MyOrg@dev.azure.com/MyOrg/MyProject/_git/MyRepo.dot.git", + "https://dev.azure.com/MyOrg/MyProject/_git/MyRepo.dot.git" + }, + { + "https://dev.azure.com/MyOrg/MyProject/_git/MyRepo", + "https://dev.azure.com/MyOrg/MyProject/_git/MyRepo" + }, + { + "https://dev.azure.com/MyOrg/MyProject/_git/MyRepo-with-hypen", + "https://dev.azure.com/MyOrg/MyProject/_git/MyRepo-with-hypen" + }, + { + "https://dev.azure.com/MyOrg/MyProject/_git/-", + "https://dev.azure.com/MyOrg/MyProject/_git/-" + }, + { + "https://dev.azure.com/MyOrg/MyProject/_git/-j.git", + "https://dev.azure.com/MyOrg/MyProject/_git/-j.git" + }, + { + "git@ssh.dev.azure.com:v3/MyOrg/MyProject/MyRepo", + "git@ssh.dev.azure.com:v3/MyOrg/MyProject/MyRepo" + }, + { + "git@ssh.dev.azure.com:v3/MyOrg/MyProject/MyRepo.git", + "git@ssh.dev.azure.com:v3/MyOrg/MyProject/MyRepo.git" + }, + { + "git@ssh.dev.azure.com:v3/MyOrg/MyProject/MyRepo.dot.git", + "git@ssh.dev.azure.com:v3/MyOrg/MyProject/MyRepo.dot.git" + }, + { + "git@ssh.dev.azure.com:v3/MyOrg/MyProject/MyRepo", + "git@ssh.dev.azure.com:v3/MyOrg/MyProject/MyRepo" + }, + { + "git@ssh.dev.azure.com:v3/MyOrg/MyProject/MyRepo-with-hypen", + "git@ssh.dev.azure.com:v3/MyOrg/MyProject/MyRepo-with-hypen" + }, + {"git@ssh.dev.azure.com:v3/MyOrg/MyProject/-", "git@ssh.dev.azure.com:v3/MyOrg/MyProject/-"}, + { + "git@ssh.dev.azure.com:v3/MyOrg/MyProject/-j.git", + "git@ssh.dev.azure.com:v3/MyOrg/MyProject/-j.git" + }, + { + "https://MyOrg@dev.azure.com/MyOrg/MyProject/_git/MyRepo?path=MyFile&version=GBmain&_a=contents", + "https://dev.azure.com/MyOrg/MyProject/_git/MyRepo" + }, + { + "https://MyOrg@dev.azure.com/MyOrg/MyProject/_git/MyRepo?path=MyFile&version=GBmain", + "https://dev.azure.com/MyOrg/MyProject/_git/MyRepo" + }, + { + "https://MyOrg@dev.azure.com/MyOrg/MyProject/_git/MyRepo?path=MyFile&version=GTMyTag&_a=contents", + "https://dev.azure.com/MyOrg/MyProject/_git/MyRepo" + }, + { + "https://MyOrg@dev.azure.com/MyOrg/MyProject/_git/MyRepo?path=MyFile&version=GTMyTag", + "https://dev.azure.com/MyOrg/MyProject/_git/MyRepo" + }, + { + "https://MyOrg@dev.azure.com/MyOrg/_git/MyRepo", + "https://dev.azure.com/MyOrg/MyRepo/_git/MyRepo" + } + }; + } +} diff --git a/wsmaster/che-core-api-factory-bitbucket-server/src/main/java/org/eclipse/che/api/factory/server/bitbucket/BitbucketServerURLParser.java b/wsmaster/che-core-api-factory-bitbucket-server/src/main/java/org/eclipse/che/api/factory/server/bitbucket/BitbucketServerURLParser.java index b76d4d517a..f275b6b5f3 100644 --- a/wsmaster/che-core-api-factory-bitbucket-server/src/main/java/org/eclipse/che/api/factory/server/bitbucket/BitbucketServerURLParser.java +++ b/wsmaster/che-core-api-factory-bitbucket-server/src/main/java/org/eclipse/che/api/factory/server/bitbucket/BitbucketServerURLParser.java @@ -16,6 +16,7 @@ import static java.util.regex.Pattern.compile; import com.google.common.base.Splitter; import jakarta.validation.constraints.NotNull; +import java.net.URI; import java.util.ArrayList; import java.util.List; import java.util.Optional; @@ -50,11 +51,13 @@ public class BitbucketServerURLParser { private final PersonalAccessTokenManager personalAccessTokenManager; private static final List bitbucketUrlPatternTemplates = List.of( - "^(?%s)/scm/~(?[^/]+)/(?.*).git$", - "^(?%s)/users/(?[^/]+)/repos/(?[^/]+)/browse(\\?at=(?.*))?", - "^(?%s)/users/(?[^/]+)/repos/(?[^/]+)/?", - "^(?%s)/scm/(?[^/~]+)/(?[^/]+).git", - "^(?%s)/projects/(?[^/]+)/repos/(?[^/]+)/browse(\\?at=(?.*))?"); + "^(?%s)://(?%s)/scm/~(?[^/]+)/(?.*).git$", + "^(?%s)://(?%s)/users/(?[^/]+)/repos/(?[^/]+)/browse(\\?at=(?.*))?", + "^(?%s)://(?%s)/users/(?[^/]+)/repos/(?[^/]+)/?", + "^(?%s)://(?%s)/scm/(?[^/~]+)/(?[^/]+).git", + "^(?%s)://(?%s)/projects/(?[^/]+)/repos/(?[^/]+)/browse(\\?at=(?.*))?", + "^(?%s)://git@(?%s):(?\\d*)/~(?[^/]+)/(?.*).git$", + "^(?%s)://git@(?%s):(?\\d*)/(?[^/]+)/(?.*).git$"); private final List bitbucketUrlPatterns = new ArrayList<>(); private static final String OAUTH_PROVIDER_NAME = "bitbucket-server"; @@ -70,16 +73,24 @@ public class BitbucketServerURLParser { if (bitbucketEndpoints != null) { for (String bitbucketEndpoint : Splitter.on(",").split(bitbucketEndpoints)) { String trimmedEndpoint = StringUtils.trimEnd(bitbucketEndpoint, '/'); + URI uri = URI.create(trimmedEndpoint); bitbucketUrlPatternTemplates.forEach( - t -> bitbucketUrlPatterns.add(Pattern.compile(format(t, trimmedEndpoint)))); + t -> { + String scheme = t.contains("git@") ? "ssh" : uri.getScheme(); + String host = uri.getHost(); + bitbucketUrlPatterns.add(Pattern.compile(format(t, scheme, host))); + }); } } } private boolean isUserTokenPresent(String repositoryUrl) { String serverUrl = getServerUrl(repositoryUrl); + URI uri = URI.create(repositoryUrl); + String schema = uri.getScheme(); + String host = uri.getHost(); if (bitbucketUrlPatternTemplates.stream() - .anyMatch(t -> Pattern.compile(format(t, serverUrl)).matcher(repositoryUrl).matches())) { + .anyMatch(t -> Pattern.compile(format(t, schema, host)).matcher(repositoryUrl).matches())) { try { Optional token = personalAccessTokenManager.get(EnvironmentContext.getCurrent().getSubject(), serverUrl); @@ -94,7 +105,9 @@ public class BitbucketServerURLParser { } public boolean isValid(@NotNull String url) { - if (!bitbucketUrlPatterns.isEmpty()) { + if (!url.contains("://")) { + return false; + } else if (!bitbucketUrlPatterns.isEmpty()) { return bitbucketUrlPatterns.stream().anyMatch(pattern -> pattern.matcher(url).matches()); } else { return @@ -126,18 +139,27 @@ public class BitbucketServerURLParser { } private String getServerUrl(String repositoryUrl) { + if (repositoryUrl.startsWith("ssh://git@")) { + String substring = repositoryUrl.substring(10); + return "https://" + substring.substring(0, substring.indexOf(":")); + } return repositoryUrl.substring( 0, repositoryUrl.indexOf("/scm") > 0 ? repositoryUrl.indexOf("/scm") : repositoryUrl.indexOf("/users") > 0 ? repositoryUrl.indexOf("/users") - : repositoryUrl.length()); + : repositoryUrl.indexOf("/projects") > 0 + ? repositoryUrl.indexOf("/projects") + : repositoryUrl.length()); } private Optional getPatternMatcherByUrl(String url) { + URI uri = URI.create(url); + String scheme = uri.getScheme(); + String host = uri.getHost(); return bitbucketUrlPatternTemplates.stream() - .map(t -> compile(format(t, getServerUrl(url))).matcher(url)) + .map(t -> compile(format(t, scheme, host)).matcher(url)) .filter(Matcher::matches) .findAny(); } @@ -174,7 +196,14 @@ public class BitbucketServerURLParser { } private BitbucketServerUrl parse(Matcher matcher) { + String scheme = matcher.group("scheme"); String host = matcher.group("host"); + String port = null; + try { + port = matcher.group("port"); + } catch (IllegalArgumentException e) { + // keep port with null, as the pattern doesn't have the port group + } String user = null; String project = null; try { @@ -191,7 +220,9 @@ public class BitbucketServerURLParser { } return new BitbucketServerUrl() + .withScheme(scheme) .withHostName(host) + .withPort(port) .withProject(project) .withUser(user) .withRepository(repoName) diff --git a/wsmaster/che-core-api-factory-bitbucket-server/src/main/java/org/eclipse/che/api/factory/server/bitbucket/BitbucketServerUrl.java b/wsmaster/che-core-api-factory-bitbucket-server/src/main/java/org/eclipse/che/api/factory/server/bitbucket/BitbucketServerUrl.java index 74afa28c80..458f332daf 100644 --- a/wsmaster/che-core-api-factory-bitbucket-server/src/main/java/org/eclipse/che/api/factory/server/bitbucket/BitbucketServerUrl.java +++ b/wsmaster/che-core-api-factory-bitbucket-server/src/main/java/org/eclipse/che/api/factory/server/bitbucket/BitbucketServerUrl.java @@ -29,6 +29,9 @@ public class BitbucketServerUrl extends DefaultFactoryUrl { /** Hostname of bitbucket URL */ private String hostName; + private String scheme; + private String port; + /** Project part of bitbucket URL */ private String project; @@ -54,6 +57,11 @@ public class BitbucketServerUrl extends DefaultFactoryUrl { return NAME; } + @Override + public String getProviderUrl() { + return (scheme.equals("ssh") ? "https" : scheme) + "://" + hostName; + } + /** * Gets hostname of this bitbucket server url * @@ -68,6 +76,16 @@ public class BitbucketServerUrl extends DefaultFactoryUrl { return this; } + public BitbucketServerUrl withScheme(String scheme) { + this.scheme = scheme; + return this; + } + + public BitbucketServerUrl withPort(String port) { + this.port = port; + return this; + } + /** * Gets project of this bitbucket server url * @@ -171,7 +189,7 @@ public class BitbucketServerUrl extends DefaultFactoryUrl { public String rawFileLocation(String fileName) { StringJoiner joiner = new StringJoiner("/") - .add(hostName) + .add((scheme.equals("ssh") ? "https" : scheme) + "://" + hostName) .add("rest/api/1.0") .add(!isNullOrEmpty(user) && isNullOrEmpty(project) ? "users" : "projects") .add(firstNonNull(user, project)) @@ -192,7 +210,14 @@ public class BitbucketServerUrl extends DefaultFactoryUrl { * @return location of the repository. */ protected String repositoryLocation() { - return hostName + if (scheme.equals("ssh")) { + return String.format( + "%s://git@%s:%s/%s/%s.git", + scheme, hostName, port, (isNullOrEmpty(user) ? project : "~" + user), repository); + } + return scheme + + "://" + + hostName + "/scm/" + (isNullOrEmpty(user) ? project : "~" + user) + "/" diff --git a/wsmaster/che-core-api-factory-bitbucket-server/src/test/java/org/eclipse/che/api/factory/server/bitbucket/BitbucketServerAuthorizingFileContentProviderTest.java b/wsmaster/che-core-api-factory-bitbucket-server/src/test/java/org/eclipse/che/api/factory/server/bitbucket/BitbucketServerAuthorizingFileContentProviderTest.java index 62819f3ea0..2a52b60ae0 100644 --- a/wsmaster/che-core-api-factory-bitbucket-server/src/test/java/org/eclipse/che/api/factory/server/bitbucket/BitbucketServerAuthorizingFileContentProviderTest.java +++ b/wsmaster/che-core-api-factory-bitbucket-server/src/test/java/org/eclipse/che/api/factory/server/bitbucket/BitbucketServerAuthorizingFileContentProviderTest.java @@ -29,18 +29,21 @@ import org.testng.annotations.Test; @Listeners(MockitoTestNGListener.class) public class BitbucketServerAuthorizingFileContentProviderTest { - public static final String TEST_HOSTNAME = "https://foo.bar"; + public static final String TEST_HOSTNAME = "foo.bar"; + public static final String TEST_SCHEME = "https"; @Mock private URLFetcher urlFetcher; @Mock private PersonalAccessTokenManager personalAccessTokenManager; @Test public void shouldFetchContentWithTokenIfPresent() throws Exception { - BitbucketServerUrl url = new BitbucketServerUrl().withHostName(TEST_HOSTNAME); + BitbucketServerUrl url = + new BitbucketServerUrl().withHostName(TEST_HOSTNAME).withScheme(TEST_SCHEME); BitbucketServerAuthorizingFileContentProvider fileContentProvider = new BitbucketServerAuthorizingFileContentProvider( url, urlFetcher, personalAccessTokenManager); - PersonalAccessToken token = new PersonalAccessToken(TEST_HOSTNAME, "user1", "token"); + PersonalAccessToken token = + new PersonalAccessToken(TEST_SCHEME + "://" + TEST_HOSTNAME, "user1", "token"); when(personalAccessTokenManager.get(anyString())).thenReturn(token); String fileURL = "https://foo.bar/scm/repo/.devfile"; @@ -54,13 +57,15 @@ public class BitbucketServerAuthorizingFileContentProviderTest { @Test public void shouldFetchTokenIfNotYetPresent() throws Exception { - BitbucketServerUrl url = new BitbucketServerUrl().withHostName(TEST_HOSTNAME); + BitbucketServerUrl url = + new BitbucketServerUrl().withHostName(TEST_HOSTNAME).withScheme(TEST_SCHEME); BitbucketServerAuthorizingFileContentProvider fileContentProvider = new BitbucketServerAuthorizingFileContentProvider( url, urlFetcher, personalAccessTokenManager); - PersonalAccessToken token = new PersonalAccessToken(TEST_HOSTNAME, "user1", "token"); - when(personalAccessTokenManager.get(eq(TEST_HOSTNAME))).thenReturn(token); + PersonalAccessToken token = + new PersonalAccessToken(TEST_SCHEME + "://" + TEST_HOSTNAME, "user1", "token"); + when(personalAccessTokenManager.get(eq(TEST_SCHEME + "://" + TEST_HOSTNAME))).thenReturn(token); String fileURL = "https://foo.bar/scm/repo/.devfile"; @@ -68,7 +73,7 @@ public class BitbucketServerAuthorizingFileContentProviderTest { fileContentProvider.fetchContent(fileURL); // then - verify(personalAccessTokenManager).get(eq(TEST_HOSTNAME)); + verify(personalAccessTokenManager).get(eq(TEST_SCHEME + "://" + TEST_HOSTNAME)); verify(urlFetcher).fetch(eq(fileURL), eq("Bearer token")); } @@ -78,6 +83,7 @@ public class BitbucketServerAuthorizingFileContentProviderTest { BitbucketServerUrl url = new BitbucketServerUrl() .withHostName(TEST_HOSTNAME) + .withScheme(TEST_SCHEME) .withProject("proj") .withRepository("repo") .withDevfileFilenames(Collections.singletonList(".devfile")); @@ -87,7 +93,8 @@ public class BitbucketServerAuthorizingFileContentProviderTest { BitbucketServerAuthorizingFileContentProvider fileContentProvider = new BitbucketServerAuthorizingFileContentProvider( url, urlFetcher, personalAccessTokenManager); - PersonalAccessToken token = new PersonalAccessToken(TEST_HOSTNAME, "user1", "token"); + PersonalAccessToken token = + new PersonalAccessToken(TEST_SCHEME + "://" + TEST_HOSTNAME, "user1", "token"); when(personalAccessTokenManager.get(anyString())).thenReturn(token); // when diff --git a/wsmaster/che-core-api-factory-bitbucket-server/src/test/java/org/eclipse/che/api/factory/server/bitbucket/BitbucketServerURLParserTest.java b/wsmaster/che-core-api-factory-bitbucket-server/src/test/java/org/eclipse/che/api/factory/server/bitbucket/BitbucketServerURLParserTest.java index 4af35e693f..8cdd21ead6 100644 --- a/wsmaster/che-core-api-factory-bitbucket-server/src/test/java/org/eclipse/che/api/factory/server/bitbucket/BitbucketServerURLParserTest.java +++ b/wsmaster/che-core-api-factory-bitbucket-server/src/test/java/org/eclipse/che/api/factory/server/bitbucket/BitbucketServerURLParserTest.java @@ -83,6 +83,24 @@ public class BitbucketServerURLParserTest { assertEquals(bitbucketServerUrl.getBranch(), branch); } + @Test(dataProvider = "parsing") + public void shouldParseWithoutPredefinedEndpoint( + String url, String user, String project, String repository, String branch) { + // given + bitbucketURLParser = + new BitbucketServerURLParser( + null, devfileFilenamesProvider, oAuthAPI, mock(PersonalAccessTokenManager.class)); + + // when + BitbucketServerUrl bitbucketServerUrl = bitbucketURLParser.parse(url); + + // then + assertEquals(bitbucketServerUrl.getUser(), user); + assertEquals(bitbucketServerUrl.getProject(), project); + assertEquals(bitbucketServerUrl.getRepository(), repository); + assertEquals(bitbucketServerUrl.getBranch(), branch); + } + @Test( expectedExceptions = IllegalArgumentException.class, expectedExceptionsMessageRegExp = @@ -134,6 +152,8 @@ public class BitbucketServerURLParserTest { {"https://bitbucket.2mcl.com/users/user/repos/repo"}, {"https://bitbucket.2mcl.com/users/user/repos/repo/"}, {"https://bbkt.com/scm/project/test1.git"}, + {"ssh://git@bitbucket.2mcl.com:12345/~user/repo.git"}, + {"ssh://git@bitbucket.2mcl.com:12345/project/test1.git"} }; } @@ -141,6 +161,8 @@ public class BitbucketServerURLParserTest { public Object[][] expectedParsing() { return new Object[][] { {"https://bitbucket.2mcl.com/scm/project/test1.git", null, "project", "test1", null}, + {"ssh://git@bitbucket.2mcl.com:12345/project/test1.git", null, "project", "test1", null}, + {"ssh://git@bitbucket.2mcl.com:12345/~user/test1.git", "user", null, "test1", null}, { "https://bitbucket.2mcl.com/projects/project/repos/test1/browse?at=refs%2Fheads%2Fbranch", null, diff --git a/wsmaster/che-core-api-factory-bitbucket-server/src/test/java/org/eclipse/che/api/factory/server/bitbucket/BitbucketServerURLTest.java b/wsmaster/che-core-api-factory-bitbucket-server/src/test/java/org/eclipse/che/api/factory/server/bitbucket/BitbucketServerURLTest.java new file mode 100644 index 0000000000..49b9e51c4a --- /dev/null +++ b/wsmaster/che-core-api-factory-bitbucket-server/src/test/java/org/eclipse/che/api/factory/server/bitbucket/BitbucketServerURLTest.java @@ -0,0 +1,137 @@ +/* + * Copyright (c) 2012-2023 Red Hat, Inc. + * This program and the accompanying materials are made + * available under the terms of the Eclipse Public License 2.0 + * which is available at https://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 + * + * Contributors: + * Red Hat, Inc. - initial API and implementation + */ +package org.eclipse.che.api.factory.server.bitbucket; + +import static java.lang.String.format; +import static org.mockito.Mockito.lenient; +import static org.mockito.Mockito.mock; +import static org.mockito.Mockito.when; +import static org.testng.Assert.assertEquals; + +import java.util.Arrays; +import java.util.Iterator; +import org.eclipse.che.api.factory.server.scm.PersonalAccessTokenManager; +import org.eclipse.che.api.factory.server.urlfactory.DevfileFilenamesProvider; +import org.eclipse.che.api.factory.server.urlfactory.RemoteFactoryUrl; +import org.eclipse.che.security.oauth.OAuthAPI; +import org.mockito.Mock; +import org.mockito.testng.MockitoTestNGListener; +import org.testng.annotations.BeforeMethod; +import org.testng.annotations.DataProvider; +import org.testng.annotations.Listeners; +import org.testng.annotations.Test; + +@Listeners(MockitoTestNGListener.class) +public class BitbucketServerURLTest { + private BitbucketServerURLParser bitbucketServerURLParser; + @Mock private DevfileFilenamesProvider devfileFilenamesProvider; + + @BeforeMethod + protected void init() { + when(devfileFilenamesProvider.getConfiguredDevfileFilenames()) + .thenReturn(Arrays.asList("devfile.yaml", "foo.bar")); + bitbucketServerURLParser = + new BitbucketServerURLParser( + "https://bitbucket.net", + devfileFilenamesProvider, + mock(OAuthAPI.class), + mock(PersonalAccessTokenManager.class)); + } + + @Test(dataProvider = "urlsProvider") + public void checkDevfileLocation(String repoUrl, String fileUrl) { + lenient() + .when(devfileFilenamesProvider.getConfiguredDevfileFilenames()) + .thenReturn(Arrays.asList("devfile.yaml", "foo.bar")); + + BitbucketServerUrl gitlabUrl = bitbucketServerURLParser.parse(repoUrl); + assertEquals(gitlabUrl.devfileFileLocations().size(), 2); + Iterator iterator = + gitlabUrl.devfileFileLocations().iterator(); + assertEquals(iterator.next().location(), format(fileUrl, "devfile.yaml")); + assertEquals(iterator.next().location(), format(fileUrl, "foo.bar")); + } + + @DataProvider + public static Object[][] urlsProvider() { + return new Object[][] { + { + "https://bitbucket.net/scm/~user/repo.git", + "https://bitbucket.net/rest/api/1.0/users/user/repos/repo/raw/%s" + }, + { + "https://bitbucket.net/users/user/repos/repo/browse?at=branch", + "https://bitbucket.net/rest/api/1.0/users/user/repos/repo/raw/%s?at=branch" + }, + { + "https://bitbucket.net/users/user/repos/repo", + "https://bitbucket.net/rest/api/1.0/users/user/repos/repo/raw/%s" + }, + { + "https://bitbucket.net/scm/project/repo.git", + "https://bitbucket.net/rest/api/1.0/projects/project/repos/repo/raw/%s" + }, + { + "https://bitbucket.net/projects/project/repos/repo/browse?at=branch", + "https://bitbucket.net/rest/api/1.0/projects/project/repos/repo/raw/%s?at=branch" + }, + { + "ssh://git@bitbucket.net:12345/project/repo.git", + "https://bitbucket.net/rest/api/1.0/projects/project/repos/repo/raw/%s" + }, + { + "ssh://git@bitbucket.net:12345/~user/repo.git", + "https://bitbucket.net/rest/api/1.0/users/user/repos/repo/raw/%s" + } + }; + } + + @Test(dataProvider = "repoProvider") + public void checkRepositoryLocation(String rawUrl, String repoUrl) { + BitbucketServerUrl bitbucketServerUrl = bitbucketServerURLParser.parse(rawUrl); + assertEquals(bitbucketServerUrl.repositoryLocation(), repoUrl); + } + + @Test(dataProvider = "urlsProvider") + public void shouldReturnProviderUrl(String repoUrl, String ignored) { + // when + BitbucketServerUrl bitbucketServerUrl = bitbucketServerURLParser.parse(repoUrl); + + // then + assertEquals(bitbucketServerUrl.getProviderUrl(), "https://bitbucket.net"); + } + + @DataProvider + public static Object[][] repoProvider() { + return new Object[][] { + {"https://bitbucket.net/scm/~user/repo.git", "https://bitbucket.net/scm/~user/repo.git"}, + { + "https://bitbucket.net/users/user/repos/repo/browse?at=branch", + "https://bitbucket.net/scm/~user/repo.git" + }, + {"https://bitbucket.net/users/user/repos/repo", "https://bitbucket.net/scm/~user/repo.git"}, + {"https://bitbucket.net/scm/project/repo.git", "https://bitbucket.net/scm/project/repo.git"}, + { + "https://bitbucket.net/projects/project/repos/repo/browse?at=branch", + "https://bitbucket.net/scm/project/repo.git" + }, + { + "ssh://git@bitbucket.net:12345/project/repo.git", + "ssh://git@bitbucket.net:12345/project/repo.git" + }, + { + "ssh://git@bitbucket.net:12345/~user/repo.git", + "ssh://git@bitbucket.net:12345/~user/repo.git" + }, + }; + } +} diff --git a/wsmaster/che-core-api-factory-bitbucket/src/main/java/org/eclipse/che/api/factory/server/bitbucket/BitbucketURLParser.java b/wsmaster/che-core-api-factory-bitbucket/src/main/java/org/eclipse/che/api/factory/server/bitbucket/BitbucketURLParser.java index fb70810d69..8eb541794e 100644 --- a/wsmaster/che-core-api-factory-bitbucket/src/main/java/org/eclipse/che/api/factory/server/bitbucket/BitbucketURLParser.java +++ b/wsmaster/che-core-api-factory-bitbucket/src/main/java/org/eclipse/che/api/factory/server/bitbucket/BitbucketURLParser.java @@ -36,29 +36,39 @@ public class BitbucketURLParser { Pattern.compile( "^https?://(?[^/@]+)?@?bitbucket\\.org/(?[^/]+)/(?[^/]+)/?(\\.git)?(/(src|branch)/(?[^/]+)/?)?$"); + protected static final Pattern BITBUCKET_SSH_PATTERN = + Pattern.compile("^git@bitbucket.org:(?.*)/(?.*)$"); + public boolean isValid(@NotNull String url) { - return BITBUCKET_PATTERN.matcher(url).matches(); + return BITBUCKET_PATTERN.matcher(url).matches() || BITBUCKET_SSH_PATTERN.matcher(url).matches(); } public BitbucketUrl parse(String url) { // Apply bitbucket url to the regexp - Matcher matcher = BITBUCKET_PATTERN.matcher(url); + boolean isHTTPSUrl = BITBUCKET_PATTERN.matcher(url).matches(); + Matcher matcher = + isHTTPSUrl ? BITBUCKET_PATTERN.matcher(url) : BITBUCKET_SSH_PATTERN.matcher(url); if (!matcher.matches()) { throw new IllegalArgumentException( String.format("The given bitbucket url %s is not a valid URL bitbucket url. ", url)); } - String username = matcher.group("username"); + String workspaceId = matcher.group("workspaceId"); String repoName = matcher.group("repoName"); if (repoName.matches("^[\\w-][\\w.-]*?\\.git$")) { repoName = repoName.substring(0, repoName.length() - 4); } - String workspaceId = matcher.group("workspaceId"); - String branchName = matcher.group("branchName"); + String username = null; + String branchName = null; + if (isHTTPSUrl) { + username = matcher.group("username"); + branchName = matcher.group("branchName"); + } return new BitbucketUrl() .withUsername(username) .withRepository(repoName) + .setIsHTTPSUrl(isHTTPSUrl) .withBranch(branchName) .withWorkspaceId(workspaceId) .withDevfileFilenames(devfileFilenamesProvider.getConfiguredDevfileFilenames()) diff --git a/wsmaster/che-core-api-factory-bitbucket/src/main/java/org/eclipse/che/api/factory/server/bitbucket/BitbucketUrl.java b/wsmaster/che-core-api-factory-bitbucket/src/main/java/org/eclipse/che/api/factory/server/bitbucket/BitbucketUrl.java index 08f18c3335..f8491987ef 100644 --- a/wsmaster/che-core-api-factory-bitbucket/src/main/java/org/eclipse/che/api/factory/server/bitbucket/BitbucketUrl.java +++ b/wsmaster/che-core-api-factory-bitbucket/src/main/java/org/eclipse/che/api/factory/server/bitbucket/BitbucketUrl.java @@ -41,6 +41,8 @@ public class BitbucketUrl extends DefaultFactoryUrl { /** Repository part of the URL. */ private String repository; + private boolean isHTTPSUrl; + /** Branch name */ private String branch; @@ -81,6 +83,11 @@ public class BitbucketUrl extends DefaultFactoryUrl { return this; } + public BitbucketUrl setIsHTTPSUrl(boolean isHTTPSUrl) { + this.isHTTPSUrl = isHTTPSUrl; + return this; + } + public String getWorkspaceId() { return workspaceId; } @@ -164,13 +171,16 @@ public class BitbucketUrl extends DefaultFactoryUrl { * @return location of the repository. */ protected String repositoryLocation() { - return "https://" - + (this.username != null ? this.username + '@' : "") - + HOSTNAME - + "/" - + this.workspaceId - + "/" - + this.repository - + ".git"; + if (isHTTPSUrl) { + return "https://" + + (this.username != null ? this.username + '@' : "") + + HOSTNAME + + "/" + + workspaceId + + "/" + + repository + + ".git"; + } + return String.format("git@%s:%s/%s.git", HOSTNAME, workspaceId, repository); } } diff --git a/wsmaster/che-core-api-factory-bitbucket/src/test/java/org/eclipse/che/api/factory/server/bitbucket/BitbucketURLParserTest.java b/wsmaster/che-core-api-factory-bitbucket/src/test/java/org/eclipse/che/api/factory/server/bitbucket/BitbucketURLParserTest.java index 1a3ee3c61e..348d579d70 100644 --- a/wsmaster/che-core-api-factory-bitbucket/src/test/java/org/eclipse/che/api/factory/server/bitbucket/BitbucketURLParserTest.java +++ b/wsmaster/che-core-api-factory-bitbucket/src/test/java/org/eclipse/che/api/factory/server/bitbucket/BitbucketURLParserTest.java @@ -76,6 +76,15 @@ public class BitbucketURLParserTest { {"https://bitbucket.org/eclipse/che.with.dots.git"}, {"https://bitbucket.org/eclipse/che-with-hyphen"}, {"https://bitbucket.org/eclipse/che-with-hyphen.git"}, + {"git@bitbucket.org:eclipse/che"}, + {"git@bitbucket.org:eclipse/che123"}, + {"git@bitbucket.org:eclipse/che/"}, + {"git@bitbucket.org:eclipse/che/src/4.2.x"}, + {"git@bitbucket.org:eclipse/che/src/master/"}, + {"git@bitbucket.org:eclipse/che.git"}, + {"git@bitbucket.org:eclipse/che.with.dots.git"}, + {"git@bitbucket.org:eclipse/che-with-hyphen"}, + {"git@bitbucket.org:eclipse/che-with-hyphen.git"}, {"https://username@bitbucket.org/eclipse/che"}, {"https://username@bitbucket.org/eclipse/che123"}, {"https://username@bitbucket.org/eclipse/che/"}, @@ -102,6 +111,16 @@ public class BitbucketURLParserTest { {"https://bitbucket.org/eclipse/che-with-hyphen.git", "eclipse", "che-with-hyphen", null}, {"https://bitbucket.org/eclipse/che/", "eclipse", "che", null}, {"https://bitbucket.org/eclipse/repositorygit", "eclipse", "repositorygit", null}, + {"git@bitbucket.org:eclipse/che", "eclipse", "che", null}, + {"git@bitbucket.org:eclipse/che123", "eclipse", "che123", null}, + {"git@bitbucket.org:eclipse/che.git", "eclipse", "che", null}, + {"git@bitbucket.org:eclipse/che.with.dot.git", "eclipse", "che.with.dot", null}, + {"git@bitbucket.org:eclipse/-.git", "eclipse", "-", null}, + {"git@bitbucket.org:eclipse/-j.git", "eclipse", "-j", null}, + {"git@bitbucket.org:eclipse/-", "eclipse", "-", null}, + {"git@bitbucket.org:eclipse/che-with-hyphen", "eclipse", "che-with-hyphen", null}, + {"git@bitbucket.org:eclipse/che-with-hyphen.git", "eclipse", "che-with-hyphen", null}, + {"git@bitbucket.org:eclipse/repositorygit", "eclipse", "repositorygit", null}, {"https://bitbucket.org/eclipse/che/src/4.2.x", "eclipse", "che", "4.2.x"}, {"https://bitbucket.org/eclipse/che/src/master/", "eclipse", "che", "master"} }; @@ -117,7 +136,15 @@ public class BitbucketURLParserTest { {"https://bitbucket.org/eclipse/івапівап.git", "івапівап.git"}, {"https://bitbucket.org/eclipse/ ", " "}, {"https://bitbucket.org/eclipse/.", "."}, - {"https://bitbucket.org/eclipse/ .git", " .git"} + {"https://bitbucket.org/eclipse/ .git", " .git"}, + {"git@bitbucket.org:eclipse/che .git", "che .git"}, + {"git@bitbucket.org:eclipse/.git", ".git"}, + {"git@bitbucket.org:eclipse/myB@dR&pository.git", "myB@dR&pository.git"}, + {"git@bitbucket.org:eclipse/.", "."}, + {"git@bitbucket.org:eclipse/івапівап.git", "івапівап.git"}, + {"git@bitbucket.org:eclipse/ ", " "}, + {"git@bitbucket.org:eclipse/.", "."}, + {"git@bitbucket.org:eclipse/ .git", " .git"} }; } } diff --git a/wsmaster/che-core-api-factory-bitbucket/src/test/java/org/eclipse/che/api/factory/server/bitbucket/BitbucketUrlTest.java b/wsmaster/che-core-api-factory-bitbucket/src/test/java/org/eclipse/che/api/factory/server/bitbucket/BitbucketUrlTest.java index 8b589d2030..cdce9e5954 100644 --- a/wsmaster/che-core-api-factory-bitbucket/src/test/java/org/eclipse/che/api/factory/server/bitbucket/BitbucketUrlTest.java +++ b/wsmaster/che-core-api-factory-bitbucket/src/test/java/org/eclipse/che/api/factory/server/bitbucket/BitbucketUrlTest.java @@ -64,6 +64,22 @@ public class BitbucketUrlTest { assertEquals(iterator.next().location(), "https://bitbucket.org/eclipse/che/raw/HEAD/foo.bar"); } + @Test + public void shouldReturnDevfileLocationBySSHUrl() { + bitbucketUrl = bitbucketURLParser.parse("git@bitbucket.org:eclipse/che"); + + lenient() + .when(devfileFilenamesProvider.getConfiguredDevfileFilenames()) + .thenReturn(Arrays.asList("devfile.yaml", "foo.bar")); + + assertEquals(bitbucketUrl.devfileFileLocations().size(), 2); + Iterator iterator = bitbucketUrl.devfileFileLocations().iterator(); + assertEquals( + iterator.next().location(), "https://bitbucket.org/eclipse/che/raw/HEAD/devfile.yaml"); + + assertEquals(iterator.next().location(), "https://bitbucket.org/eclipse/che/raw/HEAD/foo.bar"); + } + @Test public void shouldReturnEmptyCredentials() { // when @@ -77,4 +93,11 @@ public class BitbucketUrlTest { public void checkRepositoryLocation() { assertEquals(bitbucketUrl.repositoryLocation(), "https://bitbucket.org/eclipse/che.git"); } + + @Test + public void shouldReturnRepositoryLocationBySSHUrl() { + bitbucketUrl = bitbucketURLParser.parse("git@bitbucket.org:eclipse/che"); + + assertEquals(bitbucketUrl.repositoryLocation(), "git@bitbucket.org:eclipse/che.git"); + } } diff --git a/wsmaster/che-core-api-factory-git-ssh/pom.xml b/wsmaster/che-core-api-factory-git-ssh/pom.xml deleted file mode 100644 index 76fec090cd..0000000000 --- a/wsmaster/che-core-api-factory-git-ssh/pom.xml +++ /dev/null @@ -1,112 +0,0 @@ - - - - 4.0.0 - - che-master-parent - org.eclipse.che.core - 7.74.0-SNAPSHOT - - che-core-api-factory-git-ssh - jar - Che Core :: API :: Factory Resolver Git Ssh - - true - - - - jakarta.inject - jakarta.inject-api - - - jakarta.validation - jakarta.validation-api - - - org.eclipse.che.core - che-core-api-core - - - org.eclipse.che.core - che-core-api-dto - - - org.eclipse.che.core - che-core-api-factory - - - org.eclipse.che.core - che-core-api-factory-shared - - - org.eclipse.che.core - che-core-api-workspace - - - org.eclipse.che.core - che-core-api-workspace-shared - - - ch.qos.logback - logback-classic - test - - - com.github.tomakehurst - wiremock-jre8-standalone - test - - - jakarta.servlet - jakarta.servlet-api - test - - - jakarta.ws.rs - jakarta.ws.rs-api - test - - - org.eclipse.che.core - che-core-commons-json - test - - - org.hamcrest - hamcrest-core - test - - - org.mockito - mockito-core - test - - - org.mockito - mockito-testng - test - - - org.slf4j - jcl-over-slf4j - test - - - org.testng - testng - test - - - diff --git a/wsmaster/che-core-api-factory-git-ssh/src/main/java/org/eclipse/che/api/factory/server/git/ssh/GitSshAuthorizingFileContentProvider.java b/wsmaster/che-core-api-factory-git-ssh/src/main/java/org/eclipse/che/api/factory/server/git/ssh/GitSshAuthorizingFileContentProvider.java deleted file mode 100644 index 094a2a2575..0000000000 --- a/wsmaster/che-core-api-factory-git-ssh/src/main/java/org/eclipse/che/api/factory/server/git/ssh/GitSshAuthorizingFileContentProvider.java +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Copyright (c) 2012-2023 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.api.factory.server.git.ssh; - -import org.eclipse.che.api.factory.server.scm.AuthorizingFileContentProvider; -import org.eclipse.che.api.factory.server.scm.PersonalAccessTokenManager; -import org.eclipse.che.api.workspace.server.devfile.URLFetcher; - -/** - * Git Ssh specific authorizing file content provider. - * - * @author Anatolii Bazko - */ -class GitSshAuthorizingFileContentProvider extends AuthorizingFileContentProvider { - - GitSshAuthorizingFileContentProvider( - GitSshUrl gitSshUrl, - URLFetcher urlFetcher, - PersonalAccessTokenManager personalAccessTokenManager) { - super(gitSshUrl, urlFetcher, personalAccessTokenManager); - } -} diff --git a/wsmaster/che-core-api-factory-git-ssh/src/main/java/org/eclipse/che/api/factory/server/git/ssh/GitSshFactoryParametersResolver.java b/wsmaster/che-core-api-factory-git-ssh/src/main/java/org/eclipse/che/api/factory/server/git/ssh/GitSshFactoryParametersResolver.java deleted file mode 100644 index 0d5add093e..0000000000 --- a/wsmaster/che-core-api-factory-git-ssh/src/main/java/org/eclipse/che/api/factory/server/git/ssh/GitSshFactoryParametersResolver.java +++ /dev/null @@ -1,129 +0,0 @@ -/* - * Copyright (c) 2012-2023 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.api.factory.server.git.ssh; - -import static org.eclipse.che.api.factory.shared.Constants.CURRENT_VERSION; -import static org.eclipse.che.api.factory.shared.Constants.URL_PARAMETER_NAME; -import static org.eclipse.che.dto.server.DtoFactory.newDto; - -import jakarta.validation.constraints.NotNull; -import java.util.Map; -import javax.inject.Inject; -import javax.inject.Singleton; -import org.eclipse.che.api.core.ApiException; -import org.eclipse.che.api.factory.server.RawDevfileUrlFactoryParameterResolver; -import org.eclipse.che.api.factory.server.scm.PersonalAccessTokenManager; -import org.eclipse.che.api.factory.server.urlfactory.RemoteFactoryUrl; -import org.eclipse.che.api.factory.server.urlfactory.URLFactoryBuilder; -import org.eclipse.che.api.factory.shared.dto.FactoryDevfileV2Dto; -import org.eclipse.che.api.factory.shared.dto.FactoryDto; -import org.eclipse.che.api.factory.shared.dto.FactoryMetaDto; -import org.eclipse.che.api.factory.shared.dto.FactoryVisitor; -import org.eclipse.che.api.factory.shared.dto.ScmInfoDto; -import org.eclipse.che.api.workspace.server.devfile.URLFetcher; -import org.eclipse.che.api.workspace.shared.dto.devfile.ProjectDto; -import org.eclipse.che.api.workspace.shared.dto.devfile.SourceDto; - -/** - * Provides Factory Parameters resolver for Git Ssh repositories. - * - * @author Anatolii Bazko - */ -@Singleton -public class GitSshFactoryParametersResolver extends RawDevfileUrlFactoryParameterResolver { - - private final GitSshURLParser gitSshURLParser; - - private final PersonalAccessTokenManager personalAccessTokenManager; - - @Inject - public GitSshFactoryParametersResolver( - GitSshURLParser gitSshURLParser, - URLFetcher urlFetcher, - URLFactoryBuilder urlFactoryBuilder, - PersonalAccessTokenManager personalAccessTokenManager) { - super(urlFactoryBuilder, urlFetcher); - this.gitSshURLParser = gitSshURLParser; - this.personalAccessTokenManager = personalAccessTokenManager; - } - - @Override - public boolean accept(@NotNull final Map factoryParameters) { - return factoryParameters.containsKey(URL_PARAMETER_NAME) - && gitSshURLParser.isValid(factoryParameters.get(URL_PARAMETER_NAME)); - } - - @Override - public FactoryMetaDto createFactory(@NotNull final Map factoryParameters) - throws ApiException { - // no need to check null value of url parameter as accept() method has performed the check - final GitSshUrl gitSshUrl = gitSshURLParser.parse(factoryParameters.get(URL_PARAMETER_NAME)); - - // create factory from the following location if location exists, else create default factory - return urlFactoryBuilder - .createFactoryFromDevfile( - gitSshUrl, - new GitSshAuthorizingFileContentProvider( - gitSshUrl, urlFetcher, personalAccessTokenManager), - extractOverrideParams(factoryParameters), - true) - .orElseGet(() -> newDto(FactoryDto.class).withV(CURRENT_VERSION).withSource("repo")) - .acceptVisitor(new GitSshFactoryVisitor(gitSshUrl)); - } - - /** - * Visitor that puts the default devfile or updates devfile projects into the Git Ssh Factory, if - * needed. - */ - private class GitSshFactoryVisitor implements FactoryVisitor { - - private final GitSshUrl gitSshUrl; - - private GitSshFactoryVisitor(GitSshUrl gitSshUrl) { - this.gitSshUrl = gitSshUrl; - } - - @Override - public FactoryDevfileV2Dto visit(FactoryDevfileV2Dto factoryDto) { - ScmInfoDto scmInfo = - newDto(ScmInfoDto.class) - .withScmProviderName(gitSshUrl.getProviderName()) - .withRepositoryUrl(gitSshUrl.getRepositoryLocation()); - return factoryDto.withScmInfo(scmInfo); - } - - @Override - public FactoryDto visit(FactoryDto factory) { - if (factory.getDevfile() == null) { - factory.setDevfile(urlFactoryBuilder.buildDefaultDevfile(gitSshUrl.getRepository())); - } - - updateProjects( - factory.getDevfile(), - () -> - newDto(ProjectDto.class) - .withSource( - newDto(SourceDto.class) - .withLocation(gitSshUrl.getRepositoryLocation()) - .withType("git")) - .withName(gitSshUrl.getRepository()), - project -> {}); - - return factory; - } - } - - @Override - public RemoteFactoryUrl parseFactoryUrl(String factoryUrl) { - return gitSshURLParser.parse(factoryUrl); - } -} diff --git a/wsmaster/che-core-api-factory-git-ssh/src/main/java/org/eclipse/che/api/factory/server/git/ssh/GitSshScmFileResolver.java b/wsmaster/che-core-api-factory-git-ssh/src/main/java/org/eclipse/che/api/factory/server/git/ssh/GitSshScmFileResolver.java deleted file mode 100644 index a28b208cb8..0000000000 --- a/wsmaster/che-core-api-factory-git-ssh/src/main/java/org/eclipse/che/api/factory/server/git/ssh/GitSshScmFileResolver.java +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (c) 2012-2023 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.api.factory.server.git.ssh; - -import jakarta.validation.constraints.NotNull; -import javax.inject.Inject; -import org.eclipse.che.api.factory.server.ScmFileResolver; - -/** - * Git Ssh specific SCM file resolver. - * - * @author Anatolii Bazko - */ -public class GitSshScmFileResolver implements ScmFileResolver { - - private final GitSshURLParser gitSshURLParser; - - @Inject - public GitSshScmFileResolver(GitSshURLParser gitSshURLParser) { - this.gitSshURLParser = gitSshURLParser; - } - - @Override - public boolean accept(@NotNull String repository) { - return gitSshURLParser.isValid(repository); - } - - /** - * There is no way to get a file content from a git repository via ssh protocol. So this method - * always returns an empty string. It allows to start a workspace from an empty devfile. - */ - @Override - public String fileContent(@NotNull String repository, @NotNull String filePath) { - return ""; - } -} diff --git a/wsmaster/che-core-api-factory-git-ssh/src/main/java/org/eclipse/che/api/factory/server/git/ssh/GitSshURLParser.java b/wsmaster/che-core-api-factory-git-ssh/src/main/java/org/eclipse/che/api/factory/server/git/ssh/GitSshURLParser.java deleted file mode 100644 index 9c25e825b7..0000000000 --- a/wsmaster/che-core-api-factory-git-ssh/src/main/java/org/eclipse/che/api/factory/server/git/ssh/GitSshURLParser.java +++ /dev/null @@ -1,66 +0,0 @@ -/* - * Copyright (c) 2012-2023 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.api.factory.server.git.ssh; - -import static java.lang.String.format; -import static java.util.regex.Pattern.compile; - -import jakarta.validation.constraints.NotNull; -import java.util.regex.Matcher; -import java.util.regex.Pattern; -import javax.inject.Inject; -import javax.inject.Singleton; -import org.eclipse.che.api.factory.server.urlfactory.DevfileFilenamesProvider; - -/** - * Parser of String Git Ssh URLs and provide {@link GitSshUrl} objects. - * - * @author Anatolii Bazko - */ -@Singleton -public class GitSshURLParser { - - private final Pattern gitSshPattern; - - private final DevfileFilenamesProvider devfileFilenamesProvider; - - @Inject - public GitSshURLParser(DevfileFilenamesProvider devfileFilenamesProvider) { - this.devfileFilenamesProvider = devfileFilenamesProvider; - this.gitSshPattern = compile("^git@(?[^:]++):(.*)/(?[^/]++)$"); - } - - public boolean isValid(@NotNull String url) { - return gitSshPattern.matcher(url).matches(); - } - - public GitSshUrl parse(String url) { - Matcher matcher = gitSshPattern.matcher(url); - if (!matcher.matches()) { - throw new IllegalArgumentException( - format("The given url %s is not a valid. It should start with git@", url)); - } - - String hostName = matcher.group("hostName"); - String repoName = matcher.group("repoName"); - if (repoName.endsWith(".git")) { - repoName = repoName.substring(0, repoName.length() - 4); - } - - return new GitSshUrl() - .withDevfileFilenames(devfileFilenamesProvider.getConfiguredDevfileFilenames()) - .withHostName(hostName) - .withRepository(repoName) - .withRepositoryLocation(url) - .withUrl(url); - } -} diff --git a/wsmaster/che-core-api-factory-git-ssh/src/main/java/org/eclipse/che/api/factory/server/git/ssh/GitSshUrl.java b/wsmaster/che-core-api-factory-git-ssh/src/main/java/org/eclipse/che/api/factory/server/git/ssh/GitSshUrl.java deleted file mode 100644 index ae180c9e07..0000000000 --- a/wsmaster/che-core-api-factory-git-ssh/src/main/java/org/eclipse/che/api/factory/server/git/ssh/GitSshUrl.java +++ /dev/null @@ -1,108 +0,0 @@ -/* - * Copyright (c) 2012-2023 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.api.factory.server.git.ssh; - -import java.util.ArrayList; -import java.util.List; -import java.util.Optional; -import java.util.stream.Collectors; -import org.eclipse.che.api.factory.server.urlfactory.DefaultFactoryUrl; - -/** - * Representation of Git Ssh URL, allowing to get details from it. - * - * @author Anatolii Bazko - */ -public class GitSshUrl extends DefaultFactoryUrl { - - private String repository; - private String hostName; - - private String repositoryLocation; - - private final List devfileFilenames = new ArrayList<>(); - - protected GitSshUrl() {} - - @Override - public String getProviderName() { - return "git-ssh"; - } - - @Override - public String getBranch() { - return null; - } - - public GitSshUrl withDevfileFilenames(List devfileFilenames) { - this.devfileFilenames.addAll(devfileFilenames); - return this; - } - - @Override - public void setDevfileFilename(String devfileName) { - this.devfileFilenames.clear(); - this.devfileFilenames.add(devfileName); - } - - @Override - public List devfileFileLocations() { - return devfileFilenames.stream().map(this::createDevfileLocation).collect(Collectors.toList()); - } - - @Override - public String rawFileLocation(String filename) { - return filename; - } - - private DevfileLocation createDevfileLocation(String devfileFilename) { - return new DevfileLocation() { - @Override - public Optional filename() { - return Optional.of(devfileFilename); - } - - @Override - public String location() { - return devfileFilename; - } - }; - } - - @Override - public String getHostName() { - return hostName; - } - - public GitSshUrl withHostName(String hostName) { - this.hostName = hostName; - return this; - } - - public String getRepositoryLocation() { - return repositoryLocation; - } - - public GitSshUrl withRepositoryLocation(String repositoryLocation) { - this.repositoryLocation = repositoryLocation; - return this; - } - - public String getRepository() { - return repository; - } - - public GitSshUrl withRepository(String repository) { - this.repository = repository; - return this; - } -} diff --git a/wsmaster/che-core-api-factory-git-ssh/src/test/java/org/eclipse/che/api/factory/server/git/ssh/GitSshURLParserTest.java b/wsmaster/che-core-api-factory-git-ssh/src/test/java/org/eclipse/che/api/factory/server/git/ssh/GitSshURLParserTest.java deleted file mode 100644 index 715e5f544b..0000000000 --- a/wsmaster/che-core-api-factory-git-ssh/src/test/java/org/eclipse/che/api/factory/server/git/ssh/GitSshURLParserTest.java +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Copyright (c) 2012-2023 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.api.factory.server.git.ssh; - -import static org.mockito.Mockito.mock; -import static org.testng.Assert.assertEquals; - -import org.eclipse.che.api.factory.server.urlfactory.DevfileFilenamesProvider; -import org.mockito.testng.MockitoTestNGListener; -import org.testng.annotations.BeforeMethod; -import org.testng.annotations.DataProvider; -import org.testng.annotations.Listeners; -import org.testng.annotations.Test; - -/** @author Anatalii Bazko */ -@Listeners(MockitoTestNGListener.class) -public class GitSshURLParserTest { - - private GitSshURLParser gitSshURLParser; - - @BeforeMethod - protected void start() { - gitSshURLParser = new GitSshURLParser(mock(DevfileFilenamesProvider.class)); - } - - @Test(dataProvider = "parsing") - public void testParse(String url, String hostName, String repository) { - GitSshUrl gitSshUrl = gitSshURLParser.parse(url); - - assertEquals(gitSshUrl.getHostName(), hostName); - assertEquals(gitSshUrl.getRepository(), repository); - } - - @DataProvider(name = "parsing") - public Object[][] expectedParsing() { - return new Object[][] { - {"git@ssh.dev.azure.com:v3/MyOrg/MyProject/MyRepo", "ssh.dev.azure.com", "MyRepo"}, - {"git@github.com:MyOrg/MyRepo.git", "github.com", "MyRepo"}, - }; - } -} diff --git a/wsmaster/che-core-api-factory-git-ssh/src/test/resources/logback-test.xml b/wsmaster/che-core-api-factory-git-ssh/src/test/resources/logback-test.xml deleted file mode 100644 index 704cbbf50f..0000000000 --- a/wsmaster/che-core-api-factory-git-ssh/src/test/resources/logback-test.xml +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - %-41(%date[%.15thread]) %-45([%-5level] [%.30logger{30} %L]) - %msg%n%nopex - - - - - - - - diff --git a/wsmaster/che-core-api-factory-github/src/main/java/org/eclipse/che/api/factory/server/github/GithubURLParser.java b/wsmaster/che-core-api-factory-github/src/main/java/org/eclipse/che/api/factory/server/github/GithubURLParser.java index 811853e51d..a8ea88b991 100644 --- a/wsmaster/che-core-api-factory-github/src/main/java/org/eclipse/che/api/factory/server/github/GithubURLParser.java +++ b/wsmaster/che-core-api-factory-github/src/main/java/org/eclipse/che/api/factory/server/github/GithubURLParser.java @@ -20,6 +20,7 @@ import static org.eclipse.che.api.factory.server.github.GithubApiClient.GITHUB_S import static org.eclipse.che.commons.lang.StringUtils.trimEnd; import jakarta.validation.constraints.NotNull; +import java.net.URI; import java.net.URISyntaxException; import java.util.Optional; import java.util.regex.Matcher; @@ -63,6 +64,8 @@ public class GithubURLParser { */ private final Pattern githubPattern; + private final Pattern githubSSHPattern; + private final boolean disableSubdomainIsolation; @Inject @@ -101,10 +104,14 @@ public class GithubURLParser { format( "^%s/(?[^/]+)/(?[^/]++)((/)|(?:/tree/(?.++))|(/pull/(?\\d++)))?$", endpoint)); + this.githubSSHPattern = + compile(format("^git@%s:(?.*)/(?.*)$", URI.create(endpoint).getHost())); } public boolean isValid(@NotNull String url) { - return githubPattern.matcher(trimEnd(url, '/')).matches(); + String trimmedUrl = trimEnd(url, '/'); + return githubPattern.matcher(trimmedUrl).matches() + || githubSSHPattern.matcher(trimmedUrl).matches(); } public GithubUrl parseWithoutAuthentication(String url) throws ApiException { @@ -116,13 +123,11 @@ public class GithubURLParser { } private GithubUrl parse(String url, boolean authenticationRequired) throws ApiException { - // Apply github url to the regexp - Matcher matcher = githubPattern.matcher(url); + boolean isHTTPSUrl = githubPattern.matcher(url).matches(); + Matcher matcher = isHTTPSUrl ? githubPattern.matcher(url) : githubSSHPattern.matcher(url); if (!matcher.matches()) { throw new IllegalArgumentException( - format( - "The given github url %s is not a valid URL github url. It should start with https://github.com//", - url)); + format("The given url %s is not a valid github URL. ", url)); } String serverUrl = @@ -135,9 +140,12 @@ public class GithubURLParser { repoName = repoName.substring(0, repoName.length() - 4); } - String branchName = matcher.group("branchName"); - - String pullRequestId = matcher.group("pullRequestId"); + String branchName = null; + String pullRequestId = null; + if (isHTTPSUrl) { + branchName = matcher.group("branchName"); + pullRequestId = matcher.group("pullRequestId"); + } if (pullRequestId != null) { GithubPullRequest pullRequest = @@ -169,6 +177,7 @@ public class GithubURLParser { return new GithubUrl() .withUsername(repoUser) .withRepository(repoName) + .setIsHTTPSUrl(isHTTPSUrl) .withServerUrl(serverUrl) .withDisableSubdomainIsolation(disableSubdomainIsolation) .withBranch(branchName) diff --git a/wsmaster/che-core-api-factory-github/src/main/java/org/eclipse/che/api/factory/server/github/GithubUrl.java b/wsmaster/che-core-api-factory-github/src/main/java/org/eclipse/che/api/factory/server/github/GithubUrl.java index 46ea5be275..148bae9bf4 100644 --- a/wsmaster/che-core-api-factory-github/src/main/java/org/eclipse/che/api/factory/server/github/GithubUrl.java +++ b/wsmaster/che-core-api-factory-github/src/main/java/org/eclipse/che/api/factory/server/github/GithubUrl.java @@ -37,6 +37,8 @@ public class GithubUrl extends DefaultFactoryUrl { /** Username part of github URL */ private String username; + private boolean isHTTPSUrl = true; + /** Repository part of the URL. */ private String repository; @@ -78,6 +80,11 @@ public class GithubUrl extends DefaultFactoryUrl { return this; } + public GithubUrl setIsHTTPSUrl(boolean isHTTPSUrl) { + this.isHTTPSUrl = isHTTPSUrl; + return this; + } + /** * Gets repository of this github url * @@ -209,8 +216,17 @@ public class GithubUrl extends DefaultFactoryUrl { * @return location of the repository. */ protected String repositoryLocation() { - return (isNullOrEmpty(serverUrl) ? HOSTNAME : serverUrl) - + "/" + if (isHTTPSUrl) { + return (isNullOrEmpty(serverUrl) ? HOSTNAME : serverUrl) + + "/" + + this.username + + "/" + + this.repository + + ".git"; + } + return "git@" + + getHostName().substring(getHostName().indexOf("://") + 3) + + ":" + this.username + "/" + this.repository diff --git a/wsmaster/che-core-api-factory-github/src/test/java/org/eclipse/che/api/factory/server/github/GithubURLParserTest.java b/wsmaster/che-core-api-factory-github/src/test/java/org/eclipse/che/api/factory/server/github/GithubURLParserTest.java index 42a97931a4..3183546cac 100644 --- a/wsmaster/che-core-api-factory-github/src/test/java/org/eclipse/che/api/factory/server/github/GithubURLParserTest.java +++ b/wsmaster/che-core-api-factory-github/src/test/java/org/eclipse/che/api/factory/server/github/GithubURLParserTest.java @@ -108,7 +108,13 @@ public class GithubURLParserTest { {"https://github.com/eclipse/che.git"}, {"https://github.com/eclipse/che.with.dots.git"}, {"https://github.com/eclipse/che-with-hyphen"}, - {"https://github.com/eclipse/che-with-hyphen.git"} + {"https://github.com/eclipse/che-with-hyphen.git"}, + {"git@github.com:eclipse/che.git)"}, + {"git@github.com:eclipse/che)"}, + {"git@github.com:eclipse/che123)"}, + {"git@github.com:eclipse/che.with.dots.git)"}, + {"git@github.com:eclipse/che-with-hyphen)"}, + {"git@github.com:eclipse/che-with-hyphen.git)"} }; } @@ -133,7 +139,18 @@ public class GithubURLParserTest { "eclipse", "che", "branch/with/slash" - } + }, + {"git@github.com:eclipse/che", "eclipse", "che", null}, + {"git@github.com:eclipse/che123", "eclipse", "che123", null}, + {"git@github.com:eclipse/che.git", "eclipse", "che", null}, + {"git@github.com:eclipse/che.with.dot.git", "eclipse", "che.with.dot", null}, + {"git@github.com:eclipse/-.git", "eclipse", "-", null}, + {"git@github.com:eclipse/-j.git", "eclipse", "-j", null}, + {"git@github.com:eclipse/-", "eclipse", "-", null}, + {"git@github.com:eclipse/che-with-hyphen", "eclipse", "che-with-hyphen", null}, + {"git@github.com:eclipse/che-with-hyphen.git", "eclipse", "che-with-hyphen", null}, + {"git@github.com:eclipse/che/", "eclipse", "che", null}, + {"git@github.com:eclipse/repositorygit", "eclipse", "repositorygit", null}, }; } @@ -147,7 +164,15 @@ public class GithubURLParserTest { {"https://github.com/eclipse/івапівап.git", "івапівап.git"}, {"https://github.com/eclipse/ ", " "}, {"https://github.com/eclipse/.", "."}, - {"https://github.com/eclipse/ .git", " .git"} + {"https://github.com/eclipse/ .git", " .git"}, + {"git@github.com:eclipse/che .git", "che .git"}, + {"git@github.com:eclipse/.git", ".git"}, + {"git@github.com:eclipse/myB@dR&pository.git", "myB@dR&pository.git"}, + {"git@github.com:eclipse/.", "."}, + {"git@github.com:eclipse/івапівап.git", "івапівап.git"}, + {"git@github.com:eclipse/ ", " "}, + {"git@github.com:eclipse/.", "."}, + {"git@github.com:eclipse/ .git", " .git"} }; } diff --git a/wsmaster/che-core-api-factory-github/src/test/java/org/eclipse/che/api/factory/server/github/GithubUrlTest.java b/wsmaster/che-core-api-factory-github/src/test/java/org/eclipse/che/api/factory/server/github/GithubUrlTest.java index cdb5aeaf00..8c0ff82e14 100644 --- a/wsmaster/che-core-api-factory-github/src/test/java/org/eclipse/che/api/factory/server/github/GithubUrlTest.java +++ b/wsmaster/che-core-api-factory-github/src/test/java/org/eclipse/che/api/factory/server/github/GithubUrlTest.java @@ -64,6 +64,34 @@ public class GithubUrlTest { iterator.next().location(), "https://raw.githubusercontent.com/eclipse/che/HEAD/foo.bar"); } + @Test + public void shouldReturnDevfileLocationFromSSHUrl() throws Exception { + DevfileFilenamesProvider devfileFilenamesProvider = mock(DevfileFilenamesProvider.class); + + /** Parser used to create the url. */ + GithubURLParser githubUrlParser = + new GithubURLParser( + mock(PersonalAccessTokenManager.class), + devfileFilenamesProvider, + githubApiClient, + null, + false); + + when(devfileFilenamesProvider.getConfiguredDevfileFilenames()) + .thenReturn(Arrays.asList("devfile.yaml", "foo.bar")); + + GithubUrl githubUrl = githubUrlParser.parse("git@github.com:eclipse/che"); + + assertEquals(githubUrl.devfileFileLocations().size(), 2); + Iterator iterator = githubUrl.devfileFileLocations().iterator(); + assertEquals( + iterator.next().location(), + "https://raw.githubusercontent.com/eclipse/che/HEAD/devfile.yaml"); + + assertEquals( + iterator.next().location(), "https://raw.githubusercontent.com/eclipse/che/HEAD/foo.bar"); + } + /** Check the original repository */ @Test public void checkRepositoryLocation() throws Exception { @@ -86,6 +114,27 @@ public class GithubUrlTest { assertEquals(githubUrl.repositoryLocation(), "https://github.com/eclipse/che.git"); } + @Test + public void shouldReturnRepositoryLocationFromSSHUrl() throws Exception { + DevfileFilenamesProvider devfileFilenamesProvider = mock(DevfileFilenamesProvider.class); + + /** Parser used to create the url. */ + GithubURLParser githubUrlParser = + new GithubURLParser( + mock(PersonalAccessTokenManager.class), + devfileFilenamesProvider, + githubApiClient, + null, + false); + + when(devfileFilenamesProvider.getConfiguredDevfileFilenames()) + .thenReturn(Arrays.asList("devfile.yaml", "foo.bar")); + + GithubUrl githubUrl = githubUrlParser.parse("git@github.com:eclipse/che.git"); + + assertEquals(githubUrl.repositoryLocation(), "git@github.com:eclipse/che.git"); + } + @Test public void testRawFileLocationWithDefaultBranchName() { String file = ".che/che-theia-plugins.yaml"; diff --git a/wsmaster/che-core-api-factory-gitlab/src/main/java/org/eclipse/che/api/factory/server/gitlab/GitlabUrl.java b/wsmaster/che-core-api-factory-gitlab/src/main/java/org/eclipse/che/api/factory/server/gitlab/GitlabUrl.java index 057630821a..74f3f108c3 100644 --- a/wsmaster/che-core-api-factory-gitlab/src/main/java/org/eclipse/che/api/factory/server/gitlab/GitlabUrl.java +++ b/wsmaster/che-core-api-factory-gitlab/src/main/java/org/eclipse/che/api/factory/server/gitlab/GitlabUrl.java @@ -11,10 +11,10 @@ */ package org.eclipse.che.api.factory.server.gitlab; +import static com.google.common.base.Strings.isNullOrEmpty; import static java.net.URLEncoder.encode; import com.google.common.base.Charsets; -import com.google.common.base.Strings; import java.util.ArrayList; import java.util.List; import java.util.Optional; @@ -37,6 +37,9 @@ public class GitlabUrl extends DefaultFactoryUrl { /** Hostname of the gitlab URL */ private String hostName; + /** Scheme of the gitlab URL */ + private String scheme; + /** Project part of the gitlab URL */ private String project; @@ -63,6 +66,11 @@ public class GitlabUrl extends DefaultFactoryUrl { return NAME; } + @Override + public String getProviderUrl() { + return (isNullOrEmpty(scheme) ? "https" : scheme) + "://" + hostName; + } + /** * Gets hostname of this gitlab url * @@ -77,6 +85,11 @@ public class GitlabUrl extends DefaultFactoryUrl { return this; } + public GitlabUrl withScheme(String scheme) { + this.scheme = scheme; + return this; + } + /** * Gets project of this bitbucket url * @@ -120,7 +133,7 @@ public class GitlabUrl extends DefaultFactoryUrl { } protected GitlabUrl withBranch(String branch) { - if (!Strings.isNullOrEmpty(branch)) { + if (!isNullOrEmpty(branch)) { this.branch = branch; } return this; @@ -158,7 +171,7 @@ public class GitlabUrl extends DefaultFactoryUrl { public String rawFileLocation(String fileName) { String resultUrl = new StringJoiner("/") - .add(hostName) + .add((isNullOrEmpty(scheme) ? "https" : scheme) + "://" + hostName) .add("api/v4/projects") // use URL-encoded path to the project as a selector instead of id .add(encode(subGroups, Charsets.UTF_8)) @@ -180,6 +193,9 @@ public class GitlabUrl extends DefaultFactoryUrl { * @return location of the repository. */ protected String repositoryLocation() { - return hostName + "/" + subGroups + ".git"; + if (isNullOrEmpty(scheme)) { + return "git@" + hostName + ":" + subGroups + ".git"; + } + return scheme + "://" + hostName + "/" + subGroups + ".git"; } } diff --git a/wsmaster/che-core-api-factory-gitlab/src/main/java/org/eclipse/che/api/factory/server/gitlab/GitlabUrlParser.java b/wsmaster/che-core-api-factory-gitlab/src/main/java/org/eclipse/che/api/factory/server/gitlab/GitlabUrlParser.java index 7545ab38ee..952bd5c6b3 100644 --- a/wsmaster/che-core-api-factory-gitlab/src/main/java/org/eclipse/che/api/factory/server/gitlab/GitlabUrlParser.java +++ b/wsmaster/che-core-api-factory-gitlab/src/main/java/org/eclipse/che/api/factory/server/gitlab/GitlabUrlParser.java @@ -18,6 +18,7 @@ import static org.eclipse.che.commons.lang.StringUtils.trimEnd; import com.google.common.base.Splitter; import jakarta.validation.constraints.NotNull; +import java.net.URI; import java.util.ArrayList; import java.util.List; import java.util.Optional; @@ -46,8 +47,10 @@ public class GitlabUrlParser { private final PersonalAccessTokenManager personalAccessTokenManager; private static final List gitlabUrlPatternTemplates = List.of( - "^(?%s)/(?([^/]++/?)+)/-/tree/(?.++)(/)?", - "^(?%s)/(?.*)"); // a wider one, should be the last in the + "^(?%s)://(?%s)/(?([^/]++/?)+)/-/tree/(?.++)(/)?", + "^(?%s)://(?%s)/(?.*)"); // a wider one, should be the last in + // the list + private final String gitlabSSHPatternTemplate = "^git@(?%s):(?.*)$"; // list private final List gitlabUrlPatterns = new ArrayList<>(); private static final String OAUTH_PROVIDER_NAME = "gitlab"; @@ -62,13 +65,18 @@ public class GitlabUrlParser { if (gitlabEndpoints != null) { for (String gitlabEndpoint : Splitter.on(",").split(gitlabEndpoints)) { String trimmedEndpoint = trimEnd(gitlabEndpoint, '/'); + URI uri = URI.create(trimmedEndpoint); + String schema = uri.getScheme(); + String host = uri.getHost(); for (String gitlabUrlPatternTemplate : gitlabUrlPatternTemplates) { - gitlabUrlPatterns.add(compile(format(gitlabUrlPatternTemplate, trimmedEndpoint))); + gitlabUrlPatterns.add(compile(format(gitlabUrlPatternTemplate, schema, host))); } + gitlabUrlPatterns.add(compile(format(gitlabSSHPatternTemplate, host))); } } else { gitlabUrlPatternTemplates.forEach( - t -> gitlabUrlPatterns.add(compile(format(t, "https://gitlab.com")))); + t -> gitlabUrlPatterns.add(compile(format(t, "https", "gitlab.com")))); + gitlabUrlPatterns.add(compile(format(gitlabSSHPatternTemplate, "gitlab.com"))); } } @@ -112,7 +120,7 @@ public class GitlabUrlParser { gitlabApiClient.getOAuthTokenInfo(""); } catch (ScmCommunicationException e) { return e.getStatusCode() == HTTP_UNAUTHORIZED; - } catch (ScmItemNotFoundException e) { + } catch (ScmItemNotFoundException | IllegalArgumentException e) { return false; } } @@ -120,18 +128,32 @@ public class GitlabUrlParser { } private Optional getPatternMatcherByUrl(String url) { - Optional serverUrlOptional = getServerUrl(url); - if (serverUrlOptional.isPresent()) { - String serverUrl = serverUrlOptional.get(); - return gitlabUrlPatternTemplates.stream() - .map(t -> compile(format(t, serverUrl)).matcher(url)) - .filter(Matcher::matches) - .findAny(); - } - return Optional.empty(); + URI uri = + URI.create( + url.matches(format(gitlabSSHPatternTemplate, ".*")) + ? "ssh://" + url.replace(":", "/") + : url); + String scheme = uri.getScheme(); + String host = uri.getHost(); + return gitlabUrlPatternTemplates.stream() + .map(t -> compile(format(t, scheme, host)).matcher(url)) + .filter(Matcher::matches) + .findAny() + .or( + () -> { + Matcher matcher = compile(format(gitlabSSHPatternTemplate, host)).matcher(url); + if (matcher.matches()) { + return Optional.of(matcher); + } + return Optional.empty(); + }); } private Optional getServerUrl(String repositoryUrl) { + if (repositoryUrl.startsWith("git@")) { + String substring = repositoryUrl.substring(4); + return Optional.of("https://" + substring.substring(0, substring.indexOf(":"))); + } Matcher serverUrlMatcher = compile("[^/|:]/").matcher(repositoryUrl); if (serverUrlMatcher.find()) { return Optional.of( @@ -162,6 +184,12 @@ public class GitlabUrlParser { } private GitlabUrl parse(Matcher matcher) { + String scheme = null; + try { + scheme = matcher.group("scheme"); + } catch (IllegalArgumentException e) { + // ok no such group + } String host = matcher.group("host"); String subGroups = trimEnd(matcher.group("subgroups"), '/'); if (subGroups.endsWith(".git")) { @@ -177,6 +205,7 @@ public class GitlabUrlParser { return new GitlabUrl() .withHostName(host) + .withScheme(scheme) .withSubGroups(subGroups) .withBranch(branch) .withDevfileFilenames(devfileFilenamesProvider.getConfiguredDevfileFilenames()); diff --git a/wsmaster/che-core-api-factory-gitlab/src/test/java/org/eclipse/che/api/factory/server/gitlab/GitlabAuthorizingFileContentProviderTest.java b/wsmaster/che-core-api-factory-gitlab/src/test/java/org/eclipse/che/api/factory/server/gitlab/GitlabAuthorizingFileContentProviderTest.java index 0c784206ac..9685b6cf55 100644 --- a/wsmaster/che-core-api-factory-gitlab/src/test/java/org/eclipse/che/api/factory/server/gitlab/GitlabAuthorizingFileContentProviderTest.java +++ b/wsmaster/che-core-api-factory-gitlab/src/test/java/org/eclipse/che/api/factory/server/gitlab/GitlabAuthorizingFileContentProviderTest.java @@ -32,8 +32,7 @@ public class GitlabAuthorizingFileContentProviderTest { @Test public void shouldExpandRelativePaths() throws Exception { URLFetcher urlFetcher = Mockito.mock(URLFetcher.class); - GitlabUrl gitlabUrl = - new GitlabUrl().withHostName("https://gitlab.net").withSubGroups("eclipse/che"); + GitlabUrl gitlabUrl = new GitlabUrl().withHostName("gitlab.net").withSubGroups("eclipse/che"); FileContentProvider fileContentProvider = new GitlabAuthorizingFileContentProvider(gitlabUrl, urlFetcher, personalAccessTokenManager); var personalAccessToken = new PersonalAccessToken("foo", "che", "my-token"); diff --git a/wsmaster/che-core-api-factory-gitlab/src/test/java/org/eclipse/che/api/factory/server/gitlab/GitlabUrlParserTest.java b/wsmaster/che-core-api-factory-gitlab/src/test/java/org/eclipse/che/api/factory/server/gitlab/GitlabUrlParserTest.java index 27aadf7c2a..e8022fd043 100644 --- a/wsmaster/che-core-api-factory-gitlab/src/test/java/org/eclipse/che/api/factory/server/gitlab/GitlabUrlParserTest.java +++ b/wsmaster/che-core-api-factory-gitlab/src/test/java/org/eclipse/che/api/factory/server/gitlab/GitlabUrlParserTest.java @@ -79,6 +79,22 @@ public class GitlabUrlParserTest { assertEquals(gitlabUrl.getBranch(), branch); } + /** Compare parsing */ + @Test(dataProvider = "parsing") + public void shouldParseWithoutPredefinedEndpoint( + String url, String project, String subGroups, String branch) { + // given + gitlabUrlParser = + new GitlabUrlParser(null, devfileFilenamesProvider, mock(PersonalAccessTokenManager.class)); + // when + GitlabUrl gitlabUrl = gitlabUrlParser.parse(url); + + // then + assertEquals(gitlabUrl.getProject(), project); + assertEquals(gitlabUrl.getSubGroups(), subGroups); + assertEquals(gitlabUrl.getBranch(), branch); + } + @Test public void shouldValidateUrlByApiRequest() { // given @@ -114,7 +130,12 @@ public class GitlabUrlParserTest { {"https://gitlab1.com/user/project/"}, {"https://gitlab1.com/user/project/repo/"}, {"https://gitlab1.com/user/project/-/tree/master/"}, - {"https://gitlab1.com/user/project/repo/-/tree/master/subfolder"} + {"https://gitlab1.com/user/project/repo/-/tree/master/subfolder"}, + {"git@gitlab1.com:user/project/test1.git"}, + {"git@gitlab1.com:user/project1.git"}, + {"git@gitlab.foo.xxx:scm/project/test1.git"}, + {"git@gitlab1.com:user/project/"}, + {"git@gitlab1.com:user/project/repo/"}, }; } @@ -131,6 +152,16 @@ public class GitlabUrlParserTest { }, {"https://gitlab1.com/user/project/", "project", "user/project", null}, {"https://gitlab1.com/user/project/repo/", "repo", "user/project/repo", null}, + {"git@gitlab1.com:user/project1.git", "project1", "user/project1", null}, + {"git@gitlab1.com:user/project/test1.git", "test1", "user/project/test1", null}, + { + "git@gitlab1.com:user/project/group1/group2/test1.git", + "test1", + "user/project/group1/group2/test1", + null + }, + {"git@gitlab1.com:user/project/", "project", "user/project", null}, + {"git@gitlab1.com:user/project/repo/", "repo", "user/project/repo", null}, {"https://gitlab1.com/user/project/-/tree/master/", "project", "user/project", "master"}, {"https://gitlab1.com/user/project/repo/-/tree/foo", "repo", "user/project/repo", "foo"}, { diff --git a/wsmaster/che-core-api-factory-gitlab/src/test/java/org/eclipse/che/api/factory/server/gitlab/GitlabUrlTest.java b/wsmaster/che-core-api-factory-gitlab/src/test/java/org/eclipse/che/api/factory/server/gitlab/GitlabUrlTest.java index e03e5b49f1..c392362af6 100644 --- a/wsmaster/che-core-api-factory-gitlab/src/test/java/org/eclipse/che/api/factory/server/gitlab/GitlabUrlTest.java +++ b/wsmaster/che-core-api-factory-gitlab/src/test/java/org/eclipse/che/api/factory/server/gitlab/GitlabUrlTest.java @@ -66,6 +66,15 @@ public class GitlabUrlTest { assertEquals(iterator.next().location(), format(fileUrl, "foo.bar")); } + @Test(dataProvider = "urlsProvider") + public void shouldReturnProviderUrl(String repoUrl, String ignored) { + // when + GitlabUrl gitlabUrl = gitlabUrlParser.parse(repoUrl); + + // then + assertEquals(gitlabUrl.getProviderUrl(), "https://gitlab.net"); + } + @DataProvider public static Object[][] urlsProvider() { return new Object[][] { @@ -77,6 +86,14 @@ public class GitlabUrlTest { "https://gitlab.net/eclipse/fooproj/che.git", "https://gitlab.net/api/v4/projects/eclipse%%2Ffooproj%%2Fche/repository/files/%s/raw" }, + { + "git@gitlab.net:eclipse/che.git", + "https://gitlab.net/api/v4/projects/eclipse%%2Fche/repository/files/%s/raw" + }, + { + "git@gitlab.net:eclipse/fooproj/che.git", + "https://gitlab.net/api/v4/projects/eclipse%%2Ffooproj%%2Fche/repository/files/%s/raw" + }, { "https://gitlab.net/eclipse/fooproj/-/tree/master/", "https://gitlab.net/api/v4/projects/eclipse%%2Ffooproj/repository/files/%s/raw?ref=master" @@ -100,6 +117,8 @@ public class GitlabUrlTest { return new Object[][] { {"https://gitlab.net/eclipse/che.git", "https://gitlab.net/eclipse/che.git"}, {"https://gitlab.net/eclipse/foo/che.git", "https://gitlab.net/eclipse/foo/che.git"}, + {"git@gitlab.net:eclipse/che.git", "git@gitlab.net:eclipse/che.git"}, + {"git@gitlab.net:eclipse/foo/che.git", "git@gitlab.net:eclipse/foo/che.git"}, { "https://gitlab.net/eclipse/fooproj/che/-/tree/master/", "https://gitlab.net/eclipse/fooproj/che.git" diff --git a/wsmaster/che-core-api-factory/src/main/java/org/eclipse/che/api/factory/server/scm/AuthorizingFileContentProvider.java b/wsmaster/che-core-api-factory/src/main/java/org/eclipse/che/api/factory/server/scm/AuthorizingFileContentProvider.java index aa5de7bf30..14cf3fc176 100644 --- a/wsmaster/che-core-api-factory/src/main/java/org/eclipse/che/api/factory/server/scm/AuthorizingFileContentProvider.java +++ b/wsmaster/che-core-api-factory/src/main/java/org/eclipse/che/api/factory/server/scm/AuthorizingFileContentProvider.java @@ -80,7 +80,7 @@ public class AuthorizingFileContentProvider String authorization; if (isNullOrEmpty(credentials)) { PersonalAccessToken token = - personalAccessTokenManager.get(remoteFactoryUrl.getHostName()); + personalAccessTokenManager.get(remoteFactoryUrl.getProviderUrl()); authorization = formatAuthorization( token.getToken(), diff --git a/wsmaster/che-core-api-factory/src/main/java/org/eclipse/che/api/factory/server/urlfactory/DefaultFactoryUrl.java b/wsmaster/che-core-api-factory/src/main/java/org/eclipse/che/api/factory/server/urlfactory/DefaultFactoryUrl.java index 16078985ff..6560435f68 100644 --- a/wsmaster/che-core-api-factory/src/main/java/org/eclipse/che/api/factory/server/urlfactory/DefaultFactoryUrl.java +++ b/wsmaster/che-core-api-factory/src/main/java/org/eclipse/che/api/factory/server/urlfactory/DefaultFactoryUrl.java @@ -61,6 +61,11 @@ public class DefaultFactoryUrl implements RemoteFactoryUrl { return URI.create(devfileFileLocation).getHost(); } + @Override + public String getProviderUrl() { + return getHostName(); + } + @Override public String getBranch() { return null; diff --git a/wsmaster/che-core-api-factory/src/main/java/org/eclipse/che/api/factory/server/urlfactory/RemoteFactoryUrl.java b/wsmaster/che-core-api-factory/src/main/java/org/eclipse/che/api/factory/server/urlfactory/RemoteFactoryUrl.java index 213be2cbd2..7a8f3e25b7 100644 --- a/wsmaster/che-core-api-factory/src/main/java/org/eclipse/che/api/factory/server/urlfactory/RemoteFactoryUrl.java +++ b/wsmaster/che-core-api-factory/src/main/java/org/eclipse/che/api/factory/server/urlfactory/RemoteFactoryUrl.java @@ -39,6 +39,9 @@ public interface RemoteFactoryUrl { /** Remote hostname */ String getHostName(); + /** Remote provider URL */ + String getProviderUrl(); + /** Remote branch */ String getBranch(); diff --git a/wsmaster/che-core-api-factory/src/test/java/org/eclipse/che/api/factory/server/scm/AuthorizingFactoryParameterResolverTest.java b/wsmaster/che-core-api-factory/src/test/java/org/eclipse/che/api/factory/server/scm/AuthorizingFactoryParameterResolverTest.java index 6853e1a735..6b10db9cc5 100644 --- a/wsmaster/che-core-api-factory/src/test/java/org/eclipse/che/api/factory/server/scm/AuthorizingFactoryParameterResolverTest.java +++ b/wsmaster/che-core-api-factory/src/test/java/org/eclipse/che/api/factory/server/scm/AuthorizingFactoryParameterResolverTest.java @@ -46,7 +46,7 @@ public class AuthorizingFactoryParameterResolverTest { @Test public void shouldFetchContentWithAuthentication() throws Exception { // given - when(remoteFactoryUrl.getHostName()).thenReturn("hostName"); + when(remoteFactoryUrl.getProviderUrl()).thenReturn("https://provider.url"); when(urlFetcher.fetch(anyString(), anyString())).thenReturn("content"); when(personalAccessTokenManager.get(anyString())).thenReturn(personalAccessToken); diff --git a/wsmaster/che-core-api-factory/src/test/java/org/eclipse/che/api/factory/server/urlfactory/URLFactoryBuilderTest.java b/wsmaster/che-core-api-factory/src/test/java/org/eclipse/che/api/factory/server/urlfactory/URLFactoryBuilderTest.java index bc24344372..324eb6fa79 100644 --- a/wsmaster/che-core-api-factory/src/test/java/org/eclipse/che/api/factory/server/urlfactory/URLFactoryBuilderTest.java +++ b/wsmaster/che-core-api-factory/src/test/java/org/eclipse/che/api/factory/server/urlfactory/URLFactoryBuilderTest.java @@ -214,6 +214,11 @@ public class URLFactoryBuilderTest { return null; } + @Override + public String getProviderUrl() { + return null; + } + @Override public String getBranch() { return null; @@ -286,6 +291,11 @@ public class URLFactoryBuilderTest { return null; } + @Override + public String getProviderUrl() { + return null; + } + @Override public String getBranch() { return null; diff --git a/wsmaster/pom.xml b/wsmaster/pom.xml index c47f46601f..80a43b0902 100644 --- a/wsmaster/pom.xml +++ b/wsmaster/pom.xml @@ -40,7 +40,6 @@ che-core-api-account che-core-api-user che-core-api-factory-azure-devops - che-core-api-factory-git-ssh che-core-api-factory-shared che-core-api-factory che-core-api-factory-github From ce6ed7e9c03e901c4b8c19a1903c1f04887641db Mon Sep 17 00:00:00 2001 From: Igor Vinokur Date: Tue, 29 Aug 2023 16:38:31 +0300 Subject: [PATCH 48/75] Update io.fabric8.kubernetes-client version to latest (#549) --- .../infrastructure-factory/pom.xml | 2 +- .../KubernetesGitCredentialManagerTest.java | 2 +- infrastructures/kubernetes/pom.xml | 2 +- .../kubernetes/KubernetesClientFactory.java | 6 ++--- .../namespace/KubernetesDeployments.java | 20 ++++++++--------- .../namespace/KubernetesObjectUtil.java | 20 +++++++++-------- .../KubernetesInternalRuntimeTest.java | 2 +- .../namespace/CheNamespaceTest.java | 8 +++---- .../namespace/KubernetesDeploymentsTest.java | 15 +++++++------ .../KubernetesNamespaceFactoryTest.java | 22 ++++++++++--------- .../namespace/KubernetesSecretsTest.java | 8 +++---- .../namespace/log/ContainerLogWatchTest.java | 22 ++++--------------- .../server/IngressServerResolverTest.java | 8 +++---- infrastructures/openshift/pom.xml | 6 ++++- .../openshift/OpenShiftClientFactory.java | 5 ++--- .../OpenShiftWorkspaceServiceAccount.java | 4 ++-- .../OpenShiftInternalRuntimeTest.java | 2 +- .../openshift/RouteServerResolverTest.java | 4 ++-- .../project/OpenShiftProjectFactoryTest.java | 5 +++-- pom.xml | 4 ++-- 20 files changed, 80 insertions(+), 87 deletions(-) diff --git a/infrastructures/infrastructure-factory/pom.xml b/infrastructures/infrastructure-factory/pom.xml index 57a94af672..ac978e3239 100644 --- a/infrastructures/infrastructure-factory/pom.xml +++ b/infrastructures/infrastructure-factory/pom.xml @@ -33,7 +33,7 @@ io.fabric8 - kubernetes-client + kubernetes-client-api io.fabric8 diff --git a/infrastructures/infrastructure-factory/src/test/java/org/eclipse/che/api/factory/server/scm/kubernetes/KubernetesGitCredentialManagerTest.java b/infrastructures/infrastructure-factory/src/test/java/org/eclipse/che/api/factory/server/scm/kubernetes/KubernetesGitCredentialManagerTest.java index 07e93a2040..621bc5838a 100644 --- a/infrastructures/infrastructure-factory/src/test/java/org/eclipse/che/api/factory/server/scm/kubernetes/KubernetesGitCredentialManagerTest.java +++ b/infrastructures/infrastructure-factory/src/test/java/org/eclipse/che/api/factory/server/scm/kubernetes/KubernetesGitCredentialManagerTest.java @@ -64,7 +64,7 @@ public class KubernetesGitCredentialManagerTest { @Mock NonNamespaceOperation> nonNamespaceOperation; - @Mock private FilterWatchListDeletable filterWatchDeletable; + @Mock private FilterWatchListDeletable> filterWatchDeletable; @Mock private SecretList secretList; diff --git a/infrastructures/kubernetes/pom.xml b/infrastructures/kubernetes/pom.xml index 95aa07d233..1d2a534702 100644 --- a/infrastructures/kubernetes/pom.xml +++ b/infrastructures/kubernetes/pom.xml @@ -63,7 +63,7 @@ io.fabric8 - kubernetes-client + kubernetes-client-api io.fabric8 diff --git a/infrastructures/kubernetes/src/main/java/org/eclipse/che/workspace/infrastructure/kubernetes/KubernetesClientFactory.java b/infrastructures/kubernetes/src/main/java/org/eclipse/che/workspace/infrastructure/kubernetes/KubernetesClientFactory.java index 6576bac6b3..dcb2f77566 100644 --- a/infrastructures/kubernetes/src/main/java/org/eclipse/che/workspace/infrastructure/kubernetes/KubernetesClientFactory.java +++ b/infrastructures/kubernetes/src/main/java/org/eclipse/che/workspace/infrastructure/kubernetes/KubernetesClientFactory.java @@ -11,7 +11,6 @@ */ package org.eclipse.che.workspace.infrastructure.kubernetes; -import io.fabric8.kubernetes.client.BaseKubernetesClient; import io.fabric8.kubernetes.client.Config; import io.fabric8.kubernetes.client.DefaultKubernetesClient; import io.fabric8.kubernetes.client.KubernetesClient; @@ -19,7 +18,6 @@ import io.fabric8.kubernetes.client.http.HttpClient; import io.fabric8.kubernetes.client.utils.HttpClientUtils; import javax.inject.Inject; import javax.inject.Singleton; -import okhttp3.OkHttpClient; import org.eclipse.che.api.workspace.server.spi.InfrastructureException; import org.eclipse.che.commons.annotation.Nullable; @@ -94,12 +92,12 @@ public class KubernetesClientFactory { } /** - * Creates instance of {@link KubernetesClient} that uses an {@link OkHttpClient} instance derived + * Creates instance of {@link KubernetesClient} that uses an {@link HttpClient} instance derived * from the shared {@code httpClient} instance in which interceptors are overridden to * authenticate with the credentials (user/password or Oauth token) contained in the {@code * config} parameter. */ - protected BaseKubernetesClient create(Config config) { + protected KubernetesClient create(Config config) { return new UnclosableKubernetesClient(httpClient, config); } diff --git a/infrastructures/kubernetes/src/main/java/org/eclipse/che/workspace/infrastructure/kubernetes/namespace/KubernetesDeployments.java b/infrastructures/kubernetes/src/main/java/org/eclipse/che/workspace/infrastructure/kubernetes/namespace/KubernetesDeployments.java index 62fdee249a..4c76a5917e 100644 --- a/infrastructures/kubernetes/src/main/java/org/eclipse/che/workspace/infrastructure/kubernetes/namespace/KubernetesDeployments.java +++ b/infrastructures/kubernetes/src/main/java/org/eclipse/che/workspace/infrastructure/kubernetes/namespace/KubernetesDeployments.java @@ -37,6 +37,7 @@ import io.fabric8.kubernetes.api.model.Pod; import io.fabric8.kubernetes.api.model.PodSpec; import io.fabric8.kubernetes.api.model.PodStatus; import io.fabric8.kubernetes.api.model.ServiceAccount; +import io.fabric8.kubernetes.api.model.StatusDetails; import io.fabric8.kubernetes.api.model.apps.Deployment; import io.fabric8.kubernetes.api.model.apps.DeploymentBuilder; import io.fabric8.kubernetes.client.KubernetesClientException; @@ -71,7 +72,6 @@ import java.util.function.Predicate; import java.util.regex.Matcher; import java.util.regex.Pattern; import java.util.stream.Collectors; -import okhttp3.Response; import org.eclipse.che.api.workspace.server.spi.InfrastructureException; import org.eclipse.che.commons.annotation.Nullable; import org.eclipse.che.workspace.infrastructure.kubernetes.KubernetesClientFactory; @@ -301,7 +301,7 @@ public class KubernetesDeployments { CompletableFuture future = new CompletableFuture<>(); try { - PodResource podResource = + PodResource podResource = clientFactory.create(workspaceId).pods().inNamespace(namespace).withName(podName); Watch watch = @@ -366,7 +366,7 @@ public class KubernetesDeployments { final CompletableFuture podRunningFuture = new CompletableFuture<>(); try { final String podName = getPodName(name); - final PodResource podResource = + final PodResource podResource = clientFactory.create(workspaceId).pods().inNamespace(namespace).withName(podName); final Watch watch = podResource.watch( @@ -941,18 +941,18 @@ public class KubernetesDeployments { // If we have a Pod, we have to watch to make sure it is deleted, otherwise, we watch the // Deployment we are deleting. if (!Strings.isNullOrEmpty(podName)) { - PodResource podResource = + PodResource podResource = clientFactory.create(workspaceId).pods().inNamespace(namespace).withName(podName); watch = podResource.watch(new DeleteWatcher<>(deleteFuture)); toCloseOnException = watch; } else { - watch = deploymentResource.watch(new DeleteWatcher(deleteFuture)); + watch = deploymentResource.watch(new DeleteWatcher<>(deleteFuture)); toCloseOnException = watch; } - Boolean deleteSucceeded = deploymentResource.withPropagationPolicy(BACKGROUND).delete(); + List deleted = deploymentResource.withPropagationPolicy(BACKGROUND).delete(); - if (deleteSucceeded == null || !deleteSucceeded) { + if (deleted == null || deleted.isEmpty()) { deleteFuture.complete(null); } return deleteFuture.whenComplete( @@ -978,7 +978,7 @@ public class KubernetesDeployments { protected CompletableFuture doDeletePod(String podName) throws InfrastructureException { Watch toCloseOnException = null; try { - PodResource podResource = + PodResource podResource = clientFactory.create(workspaceId).pods().inNamespace(namespace).withName(podName); if (podResource.get() == null) { throw new InfrastructureException(format("No pod found to delete for name %s", podName)); @@ -988,8 +988,8 @@ public class KubernetesDeployments { final Watch watch = podResource.watch(new DeleteWatcher<>(deleteFuture)); toCloseOnException = watch; - Boolean deleteSucceeded = podResource.withPropagationPolicy(BACKGROUND).delete(); - if (deleteSucceeded == null || !deleteSucceeded) { + List deleted = podResource.withPropagationPolicy(BACKGROUND).delete(); + if (deleted == null || deleted.isEmpty()) { deleteFuture.complete(null); } return deleteFuture.whenComplete( diff --git a/infrastructures/kubernetes/src/main/java/org/eclipse/che/workspace/infrastructure/kubernetes/namespace/KubernetesObjectUtil.java b/infrastructures/kubernetes/src/main/java/org/eclipse/che/workspace/infrastructure/kubernetes/namespace/KubernetesObjectUtil.java index 2ff0495192..c2c029e9a1 100644 --- a/infrastructures/kubernetes/src/main/java/org/eclipse/che/workspace/infrastructure/kubernetes/namespace/KubernetesObjectUtil.java +++ b/infrastructures/kubernetes/src/main/java/org/eclipse/che/workspace/infrastructure/kubernetes/namespace/KubernetesObjectUtil.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012-2021 Red Hat, Inc. + * Copyright (c) 2012-2023 Red Hat, Inc. * This program and the accompanying materials are made * available under the terms of the Eclipse Public License 2.0 * which is available at https://www.eclipse.org/legal/epl-2.0/ @@ -22,7 +22,7 @@ import io.fabric8.kubernetes.api.model.LabelSelector; import io.fabric8.kubernetes.api.model.ObjectMeta; import io.fabric8.kubernetes.api.model.PersistentVolumeClaim; import io.fabric8.kubernetes.api.model.PersistentVolumeClaimBuilder; -import io.fabric8.kubernetes.api.model.PersistentVolumeClaimFluent.SpecNested; +import io.fabric8.kubernetes.api.model.PersistentVolumeClaimFluent; import io.fabric8.kubernetes.api.model.PersistentVolumeClaimVolumeSource; import io.fabric8.kubernetes.api.model.PersistentVolumeClaimVolumeSourceBuilder; import io.fabric8.kubernetes.api.model.Quantity; @@ -199,13 +199,15 @@ public class KubernetesObjectUtil { */ public static PersistentVolumeClaim newPVC( String name, String accessMode, String quantity, String storageClassName) { - SpecNested specs = - new PersistentVolumeClaimBuilder() - .withNewMetadata() - .withName(name) - .endMetadata() - .withNewSpec() - .withAccessModes(accessMode); + PersistentVolumeClaimFluent.SpecNested< + PersistentVolumeClaimBuilder> + specs = + new PersistentVolumeClaimBuilder() + .withNewMetadata() + .withName(name) + .endMetadata() + .withNewSpec() + .withAccessModes(accessMode); if (!isNullOrEmpty(storageClassName)) { specs.withStorageClassName(storageClassName); } diff --git a/infrastructures/kubernetes/src/test/java/org/eclipse/che/workspace/infrastructure/kubernetes/KubernetesInternalRuntimeTest.java b/infrastructures/kubernetes/src/test/java/org/eclipse/che/workspace/infrastructure/kubernetes/KubernetesInternalRuntimeTest.java index 5e52ad89cb..e0c833f7ec 100644 --- a/infrastructures/kubernetes/src/test/java/org/eclipse/che/workspace/infrastructure/kubernetes/KubernetesInternalRuntimeTest.java +++ b/infrastructures/kubernetes/src/test/java/org/eclipse/che/workspace/infrastructure/kubernetes/KubernetesInternalRuntimeTest.java @@ -843,7 +843,7 @@ public class KubernetesInternalRuntimeTest { } private static IntOrString intOrString(int port) { - return new IntOrStringBuilder().withIntVal(port).withStrVal(String.valueOf(port)).build(); + return new IntOrStringBuilder().withValue(port).withValue(String.valueOf(port)).build(); } private static class MapBasedRuntimeStateCache implements KubernetesRuntimeStateCache { diff --git a/infrastructures/kubernetes/src/test/java/org/eclipse/che/workspace/infrastructure/kubernetes/namespace/CheNamespaceTest.java b/infrastructures/kubernetes/src/test/java/org/eclipse/che/workspace/infrastructure/kubernetes/namespace/CheNamespaceTest.java index 84f3d4a180..b66b5dc902 100644 --- a/infrastructures/kubernetes/src/test/java/org/eclipse/che/workspace/infrastructure/kubernetes/namespace/CheNamespaceTest.java +++ b/infrastructures/kubernetes/src/test/java/org/eclipse/che/workspace/infrastructure/kubernetes/namespace/CheNamespaceTest.java @@ -25,8 +25,8 @@ import com.google.common.collect.ImmutableMap; import io.fabric8.kubernetes.api.model.ConfigMap; import io.fabric8.kubernetes.api.model.ConfigMapBuilder; import io.fabric8.kubernetes.api.model.ConfigMapList; +import io.fabric8.kubernetes.client.GracePeriodConfigurable; import io.fabric8.kubernetes.client.KubernetesClient; -import io.fabric8.kubernetes.client.dsl.EditReplacePatchDeletable; import io.fabric8.kubernetes.client.dsl.MixedOperation; import io.fabric8.kubernetes.client.dsl.Resource; import java.util.Arrays; @@ -70,7 +70,7 @@ public class CheNamespaceTest { @Mock private MixedOperation> kubeConfigMapsWithLabel; - @Mock private EditReplacePatchDeletable kubeConfigMapsWithPropagationPolicy; + @Mock private GracePeriodConfigurable gracePeriodConfigurable; @Mock private InternalRuntime internalRuntime; @@ -237,12 +237,12 @@ public class CheNamespaceTest { when(kubeConfigMapsInNamespace.withLabel(CHE_WORKSPACE_ID_LABEL, WORKSPACE_ID)) .thenReturn(kubeConfigMapsWithLabel); when(kubeConfigMapsWithLabel.withPropagationPolicy(BACKGROUND)) - .thenReturn(kubeConfigMapsWithPropagationPolicy); + .thenReturn(gracePeriodConfigurable); // when cheNamespace.cleanUp(WORKSPACE_ID); // then - verify(kubeConfigMapsWithPropagationPolicy).delete(); + verify(gracePeriodConfigurable).delete(); } } diff --git a/infrastructures/kubernetes/src/test/java/org/eclipse/che/workspace/infrastructure/kubernetes/namespace/KubernetesDeploymentsTest.java b/infrastructures/kubernetes/src/test/java/org/eclipse/che/workspace/infrastructure/kubernetes/namespace/KubernetesDeploymentsTest.java index c053ee3f6e..759bf7f689 100644 --- a/infrastructures/kubernetes/src/test/java/org/eclipse/che/workspace/infrastructure/kubernetes/namespace/KubernetesDeploymentsTest.java +++ b/infrastructures/kubernetes/src/test/java/org/eclipse/che/workspace/infrastructure/kubernetes/namespace/KubernetesDeploymentsTest.java @@ -13,6 +13,7 @@ package org.eclipse.che.workspace.infrastructure.kubernetes.namespace; import static io.fabric8.kubernetes.api.model.DeletionPropagation.BACKGROUND; import static java.util.Arrays.asList; +import static java.util.Collections.emptyList; import static java.util.Collections.singletonList; import static org.eclipse.che.workspace.infrastructure.kubernetes.Constants.POD_STATUS_PHASE_FAILED; import static org.eclipse.che.workspace.infrastructure.kubernetes.Constants.POD_STATUS_PHASE_RUNNING; @@ -55,12 +56,12 @@ import io.fabric8.kubernetes.api.model.apps.DeploymentBuilder; import io.fabric8.kubernetes.api.model.apps.DeploymentList; import io.fabric8.kubernetes.api.model.apps.DeploymentSpec; import io.fabric8.kubernetes.api.model.apps.DeploymentSpecBuilder; +import io.fabric8.kubernetes.client.GracePeriodConfigurable; import io.fabric8.kubernetes.client.KubernetesClient; import io.fabric8.kubernetes.client.KubernetesClientException; import io.fabric8.kubernetes.client.Watch; import io.fabric8.kubernetes.client.Watcher; import io.fabric8.kubernetes.client.dsl.AppsAPIGroupDSL; -import io.fabric8.kubernetes.client.dsl.EditReplacePatchDeletable; import io.fabric8.kubernetes.client.dsl.FilterWatchListDeletable; import io.fabric8.kubernetes.client.dsl.MixedOperation; import io.fabric8.kubernetes.client.dsl.NonNamespaceOperation; @@ -119,12 +120,12 @@ public class KubernetesDeploymentsTest { @Mock private Deployment deployment; @Mock private ObjectMeta deploymentMetadata; @Mock private DeploymentSpec deploymentSpec; - @Mock private EditReplacePatchDeletable deploymentEditReplacePatchDeletable; + @Mock private GracePeriodConfigurable gracePeriodConfigurable; // Pod Mocks @Mock private Pod pod; @Mock private PodStatus status; - @Mock private PodResource podResource; + @Mock private PodResource podResource; @Mock private ObjectMeta metadata; @Mock private MixedOperation podsMixedOperation; @Mock private NonNamespaceOperation podsNamespaceOperation; @@ -491,7 +492,7 @@ public class KubernetesDeploymentsTest { public void testDeleteNonExistingPodBeforeWatch() throws Exception { final String POD_NAME = "nonExistingPod"; - doReturn(Boolean.FALSE).when(podResource).delete(); + doReturn(emptyList()).when(podResource).delete(); doReturn(podResource).when(podResource).withPropagationPolicy(eq(BACKGROUND)); Watch watch = mock(Watch.class); doReturn(watch).when(podResource).watch(any()); @@ -527,7 +528,7 @@ public class KubernetesDeploymentsTest { public void testDeleteNonExistingDeploymentBeforeWatch() throws Exception { final String DEPLOYMENT_NAME = "nonExistingPod"; doReturn(deploymentResource).when(deploymentResource).withPropagationPolicy(eq(BACKGROUND)); - doReturn(Boolean.FALSE).when(deploymentResource).delete(); + doReturn(emptyList()).when(deploymentResource).delete(); Watch watch = mock(Watch.class); doReturn(watch).when(podResource).watch(any()); @@ -587,9 +588,9 @@ public class KubernetesDeploymentsTest { public void testDeleteDeploymentThrowingAnyExceptionShouldCloseWatch() throws Exception { final String DEPLOYMENT_NAME = "nonExistingPod"; when(deploymentResource.withPropagationPolicy(eq(BACKGROUND))) - .thenReturn(deploymentEditReplacePatchDeletable); + .thenReturn(gracePeriodConfigurable); doThrow(new RuntimeException("testDeleteDeploymentThrowingAnyExceptionShouldCloseWatch msg")) - .when(deploymentEditReplacePatchDeletable) + .when(gracePeriodConfigurable) .delete(); Watch watch = mock(Watch.class); doReturn(watch).when(podResource).watch(any()); diff --git a/infrastructures/kubernetes/src/test/java/org/eclipse/che/workspace/infrastructure/kubernetes/namespace/KubernetesNamespaceFactoryTest.java b/infrastructures/kubernetes/src/test/java/org/eclipse/che/workspace/infrastructure/kubernetes/namespace/KubernetesNamespaceFactoryTest.java index b24e010725..061c06aaf9 100644 --- a/infrastructures/kubernetes/src/test/java/org/eclipse/che/workspace/infrastructure/kubernetes/namespace/KubernetesNamespaceFactoryTest.java +++ b/infrastructures/kubernetes/src/test/java/org/eclipse/che/workspace/infrastructure/kubernetes/namespace/KubernetesNamespaceFactoryTest.java @@ -135,7 +135,9 @@ public class KubernetesNamespaceFactoryTest { private KubernetesNamespaceFactory namespaceFactory; - @Mock private FilterWatchListDeletable namespaceListResource; + @Mock + private FilterWatchListDeletable> + namespaceListResource; @Mock private NamespaceList namespaceList; @@ -277,7 +279,7 @@ public class KubernetesNamespaceFactoryTest { .withAnnotations(Map.of(NAMESPACE_ANNOTATION_NAME, "jondoe")) .endMetadata() .withNewStatus() - .withNewPhase("Active") + .withPhase("Active") .endStatus() .build(), new NamespaceBuilder() @@ -286,7 +288,7 @@ public class KubernetesNamespaceFactoryTest { .withAnnotations(Map.of(NAMESPACE_ANNOTATION_NAME, "jondoe")) .endMetadata() .withNewStatus() - .withNewPhase("Active") + .withPhase("Active") .endStatus() .build(), new NamespaceBuilder() @@ -295,7 +297,7 @@ public class KubernetesNamespaceFactoryTest { .withAnnotations(Map.of(NAMESPACE_ANNOTATION_NAME, "some_other_user")) .endMetadata() .withNewStatus() - .withNewPhase("Active") + .withPhase("Active") .endStatus() .build()); doReturn(namespaces).when(namespaceList).getItems(); @@ -333,7 +335,7 @@ public class KubernetesNamespaceFactoryTest { .withName("ns1") .endMetadata() .withNewStatus() - .withNewPhase("Active") + .withPhase("Active") .endStatus() .build(); doThrow(new KubernetesClientException("Not allowed.", 403, new Status())) @@ -397,7 +399,7 @@ public class KubernetesNamespaceFactoryTest { .withName("jondoe-che") .endMetadata() .withNewStatus() - .withNewPhase("Active") + .withPhase("Active") .endStatus() .build()); namespaceFactory = @@ -1127,7 +1129,7 @@ public class KubernetesNamespaceFactoryTest { .withAnnotations(Map.of(NAMESPACE_ANNOTATION_NAME, "jondoe")) .endMetadata() .withNewStatus() - .withNewPhase("Active") + .withPhase("Active") .endStatus() .build(), new NamespaceBuilder() @@ -1136,7 +1138,7 @@ public class KubernetesNamespaceFactoryTest { .withAnnotations(Map.of(NAMESPACE_ANNOTATION_NAME, "jondoe")) .endMetadata() .withNewStatus() - .withNewPhase("Active") + .withPhase("Active") .endStatus() .build()); doReturn(namespaces).when(namespaceList).getItems(); @@ -1281,7 +1283,7 @@ public class KubernetesNamespaceFactoryTest { .withAnnotations(Map.of(NAMESPACE_ANNOTATION_NAME, "jondoe")) .endMetadata() .withNewStatus() - .withNewPhase("Active") + .withPhase("Active") .endStatus() .build()); doReturn(namespaces).when(namespaceList).getItems(); @@ -1458,7 +1460,7 @@ public class KubernetesNamespaceFactoryTest { .withName(name) .endMetadata() .withNewStatus() - .withNewPhase(phase) + .withPhase(phase) .endStatus() .build(); } diff --git a/infrastructures/kubernetes/src/test/java/org/eclipse/che/workspace/infrastructure/kubernetes/namespace/KubernetesSecretsTest.java b/infrastructures/kubernetes/src/test/java/org/eclipse/che/workspace/infrastructure/kubernetes/namespace/KubernetesSecretsTest.java index c525739bf0..40cfee0f3e 100644 --- a/infrastructures/kubernetes/src/test/java/org/eclipse/che/workspace/infrastructure/kubernetes/namespace/KubernetesSecretsTest.java +++ b/infrastructures/kubernetes/src/test/java/org/eclipse/che/workspace/infrastructure/kubernetes/namespace/KubernetesSecretsTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012-2021 Red Hat, Inc. + * Copyright (c) 2012-2023 Red Hat, Inc. * This program and the accompanying materials are made * available under the terms of the Eclipse Public License 2.0 * which is available at https://www.eclipse.org/legal/epl-2.0/ @@ -22,8 +22,8 @@ import static org.testng.Assert.assertEquals; import io.fabric8.kubernetes.api.model.Secret; import io.fabric8.kubernetes.api.model.SecretList; +import io.fabric8.kubernetes.client.GracePeriodConfigurable; import io.fabric8.kubernetes.client.KubernetesClient; -import io.fabric8.kubernetes.client.dsl.EditReplacePatchDeletable; import io.fabric8.kubernetes.client.dsl.FilterWatchListDeletable; import io.fabric8.kubernetes.client.dsl.MixedOperation; import io.fabric8.kubernetes.client.dsl.NonNamespaceOperation; @@ -53,8 +53,8 @@ public class KubernetesSecretsTest { @Mock private NonNamespaceOperation> nonNamespaceOperation; - @Mock private FilterWatchListDeletable deletableList; - @Mock private EditReplacePatchDeletable deletableSecret; + @Mock private FilterWatchListDeletable> deletableList; + @Mock private GracePeriodConfigurable deletableSecret; private KubernetesSecrets kubernetesSecrets; diff --git a/infrastructures/kubernetes/src/test/java/org/eclipse/che/workspace/infrastructure/kubernetes/namespace/log/ContainerLogWatchTest.java b/infrastructures/kubernetes/src/test/java/org/eclipse/che/workspace/infrastructure/kubernetes/namespace/log/ContainerLogWatchTest.java index 6837c7c1f1..1f02dd4699 100644 --- a/infrastructures/kubernetes/src/test/java/org/eclipse/che/workspace/infrastructure/kubernetes/namespace/log/ContainerLogWatchTest.java +++ b/infrastructures/kubernetes/src/test/java/org/eclipse/che/workspace/infrastructure/kubernetes/namespace/log/ContainerLogWatchTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012-2021 Red Hat, Inc. + * Copyright (c) 2012-2023 Red Hat, Inc. * This program and the accompanying materials are made * available under the terms of the Eclipse Public License 2.0 * which is available at https://www.eclipse.org/legal/epl-2.0/ @@ -24,13 +24,11 @@ import io.fabric8.kubernetes.api.model.Pod; import io.fabric8.kubernetes.api.model.PodList; import io.fabric8.kubernetes.client.KubernetesClient; import io.fabric8.kubernetes.client.dsl.ContainerResource; -import io.fabric8.kubernetes.client.dsl.ExecWatch; import io.fabric8.kubernetes.client.dsl.LogWatch; import io.fabric8.kubernetes.client.dsl.MixedOperation; import io.fabric8.kubernetes.client.dsl.PodResource; import java.io.IOException; import java.io.InputStream; -import java.io.OutputStream; import java.io.PipedInputStream; import java.io.PipedOutputStream; import java.util.concurrent.CountDownLatch; @@ -57,22 +55,10 @@ public class ContainerLogWatchTest { @Mock PodLogHandler podLogHandler; - @Mock MixedOperation> pods; - @Mock PodResource podResource; + @Mock MixedOperation pods; + @Mock PodResource podResource; - @Mock - ContainerResource< - LogWatch, - InputStream, - PipedOutputStream, - OutputStream, - PipedInputStream, - String, - ExecWatch, - Boolean, - InputStream, - Boolean> - containerResource; + @Mock ContainerResource containerResource; LogWatchMock logWatch; diff --git a/infrastructures/kubernetes/src/test/java/org/eclipse/che/workspace/infrastructure/kubernetes/server/IngressServerResolverTest.java b/infrastructures/kubernetes/src/test/java/org/eclipse/che/workspace/infrastructure/kubernetes/server/IngressServerResolverTest.java index 14d25072ec..0a76a335fa 100644 --- a/infrastructures/kubernetes/src/test/java/org/eclipse/che/workspace/infrastructure/kubernetes/server/IngressServerResolverTest.java +++ b/infrastructures/kubernetes/src/test/java/org/eclipse/che/workspace/infrastructure/kubernetes/server/IngressServerResolverTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012-2021 Red Hat, Inc. + * Copyright (c) 2012-2023 Red Hat, Inc. * This program and the accompanying materials are made * available under the terms of the Eclipse Public License 2.0 * which is available at https://www.eclipse.org/legal/epl-2.0/ @@ -17,7 +17,6 @@ import static java.util.Collections.singletonMap; import static org.testng.Assert.assertEquals; import static org.testng.Assert.assertTrue; -import io.fabric8.kubernetes.api.model.LoadBalancerStatusBuilder; import io.fabric8.kubernetes.api.model.Service; import io.fabric8.kubernetes.api.model.ServiceBuilder; import io.fabric8.kubernetes.api.model.ServicePortBuilder; @@ -26,6 +25,7 @@ import io.fabric8.kubernetes.api.model.networking.v1.HTTPIngressRuleValue; import io.fabric8.kubernetes.api.model.networking.v1.Ingress; import io.fabric8.kubernetes.api.model.networking.v1.IngressBackend; import io.fabric8.kubernetes.api.model.networking.v1.IngressBuilder; +import io.fabric8.kubernetes.api.model.networking.v1.IngressLoadBalancerStatusBuilder; import io.fabric8.kubernetes.api.model.networking.v1.IngressRule; import io.fabric8.kubernetes.api.model.networking.v1.IngressServiceBackend; import io.fabric8.kubernetes.api.model.networking.v1.ServiceBackendPort; @@ -276,7 +276,7 @@ public class IngressServerResolverTest { new ServicePortBuilder() .withPort(port) .withNewTargetPort() - .withIntVal(port) + .withValue(port) .endTargetPort() .build()) .endSpec() @@ -310,7 +310,7 @@ public class IngressServerResolverTest { .endSpec() .withNewStatus() .withLoadBalancer( - new LoadBalancerStatusBuilder() + new IngressLoadBalancerStatusBuilder() .addNewIngress() .withIp("127.0.0.1") .endIngress() diff --git a/infrastructures/openshift/pom.xml b/infrastructures/openshift/pom.xml index 03aa3a28ed..5620834144 100644 --- a/infrastructures/openshift/pom.xml +++ b/infrastructures/openshift/pom.xml @@ -36,7 +36,7 @@ io.fabric8 - kubernetes-client + kubernetes-client-api io.fabric8 @@ -58,6 +58,10 @@ io.fabric8 openshift-client + + io.fabric8 + openshift-client-api + io.fabric8 openshift-model diff --git a/infrastructures/openshift/src/main/java/org/eclipse/che/workspace/infrastructure/openshift/OpenShiftClientFactory.java b/infrastructures/openshift/src/main/java/org/eclipse/che/workspace/infrastructure/openshift/OpenShiftClientFactory.java index 2fc569aa49..4b44dd81f1 100644 --- a/infrastructures/openshift/src/main/java/org/eclipse/che/workspace/infrastructure/openshift/OpenShiftClientFactory.java +++ b/infrastructures/openshift/src/main/java/org/eclipse/che/workspace/infrastructure/openshift/OpenShiftClientFactory.java @@ -15,7 +15,6 @@ import io.fabric8.kubernetes.client.Config; import io.fabric8.kubernetes.client.DefaultKubernetesClient; import io.fabric8.kubernetes.client.KubernetesClient; import io.fabric8.kubernetes.client.http.HttpClient; -import io.fabric8.kubernetes.client.utils.HttpClientUtils; import io.fabric8.kubernetes.client.utils.TokenRefreshInterceptor; import io.fabric8.openshift.client.DefaultOpenShiftClient; import io.fabric8.openshift.client.OpenShiftClient; @@ -85,8 +84,8 @@ public class OpenShiftClientFactory extends KubernetesClientFactory { } private HttpClient clientForConfig(OpenShiftConfig config) { - HttpClient.Builder builder = httpClient.newBuilder().authenticatorNone(); - builder.addOrReplaceInterceptor(HttpClientUtils.HEADER_INTERCEPTOR, null); + HttpClient.DerivedClientBuilder builder = httpClient.newBuilder().authenticatorNone(); + builder.addOrReplaceInterceptor("HEADER", null); return builder .addOrReplaceInterceptor( TokenRefreshInterceptor.NAME, new OpenShiftOAuthInterceptor(httpClient, config)) diff --git a/infrastructures/openshift/src/main/java/org/eclipse/che/workspace/infrastructure/openshift/project/OpenShiftWorkspaceServiceAccount.java b/infrastructures/openshift/src/main/java/org/eclipse/che/workspace/infrastructure/openshift/project/OpenShiftWorkspaceServiceAccount.java index 2933fc0af0..3e27c8ad16 100644 --- a/infrastructures/openshift/src/main/java/org/eclipse/che/workspace/infrastructure/openshift/project/OpenShiftWorkspaceServiceAccount.java +++ b/infrastructures/openshift/src/main/java/org/eclipse/che/workspace/infrastructure/openshift/project/OpenShiftWorkspaceServiceAccount.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012-2021 Red Hat, Inc. + * Copyright (c) 2012-2023 Red Hat, Inc. * This program and the accompanying materials are made * available under the terms of the Eclipse Public License 2.0 * which is available at https://www.eclipse.org/legal/epl-2.0/ @@ -77,7 +77,7 @@ public class OpenShiftWorkspaceServiceAccount @Override protected RoleBinding createRoleBinding( String roleName, String bindingName, boolean clusterRole) { - RoleBindingFluent.RoleRefNested bld = + RoleBindingFluent.RoleRefNested bld = new RoleBindingBuilder() .withNewMetadata() .withName(bindingName) diff --git a/infrastructures/openshift/src/test/java/org/eclipse/che/workspace/infrastructure/openshift/OpenShiftInternalRuntimeTest.java b/infrastructures/openshift/src/test/java/org/eclipse/che/workspace/infrastructure/openshift/OpenShiftInternalRuntimeTest.java index fe720a7507..0873fe1465 100644 --- a/infrastructures/openshift/src/test/java/org/eclipse/che/workspace/infrastructure/openshift/OpenShiftInternalRuntimeTest.java +++ b/infrastructures/openshift/src/test/java/org/eclipse/che/workspace/infrastructure/openshift/OpenShiftInternalRuntimeTest.java @@ -312,6 +312,6 @@ public class OpenShiftInternalRuntimeTest { } private static IntOrString intOrString(int port) { - return new IntOrStringBuilder().withIntVal(port).withStrVal(String.valueOf(port)).build(); + return new IntOrStringBuilder().withValue(port).withValue(String.valueOf(port)).build(); } } diff --git a/infrastructures/openshift/src/test/java/org/eclipse/che/workspace/infrastructure/openshift/RouteServerResolverTest.java b/infrastructures/openshift/src/test/java/org/eclipse/che/workspace/infrastructure/openshift/RouteServerResolverTest.java index bfb24891f4..bb0e2b4200 100644 --- a/infrastructures/openshift/src/test/java/org/eclipse/che/workspace/infrastructure/openshift/RouteServerResolverTest.java +++ b/infrastructures/openshift/src/test/java/org/eclipse/che/workspace/infrastructure/openshift/RouteServerResolverTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012-2021 Red Hat, Inc. + * Copyright (c) 2012-2023 Red Hat, Inc. * This program and the accompanying materials are made * available under the terms of the Eclipse Public License 2.0 * which is available at https://www.eclipse.org/legal/epl-2.0/ @@ -279,7 +279,7 @@ public class RouteServerResolverTest { new ServicePortBuilder() .withPort(port) .withNewTargetPort() - .withIntVal(port) + .withValue(port) .endTargetPort() .build()) .endSpec() diff --git a/infrastructures/openshift/src/test/java/org/eclipse/che/workspace/infrastructure/openshift/project/OpenShiftProjectFactoryTest.java b/infrastructures/openshift/src/test/java/org/eclipse/che/workspace/infrastructure/openshift/project/OpenShiftProjectFactoryTest.java index f04aebd85d..93f2d36876 100644 --- a/infrastructures/openshift/src/test/java/org/eclipse/che/workspace/infrastructure/openshift/project/OpenShiftProjectFactoryTest.java +++ b/infrastructures/openshift/src/test/java/org/eclipse/che/workspace/infrastructure/openshift/project/OpenShiftProjectFactoryTest.java @@ -122,7 +122,8 @@ public class OpenShiftProjectFactoryTest { private OpenShiftProjectFactory projectFactory; - @Mock private FilterWatchListDeletable projectListResource; + @Mock + private FilterWatchListDeletable> projectListResource; @Mock private ProjectList projectList; @@ -861,7 +862,7 @@ public class OpenShiftProjectFactoryTest { .withAnnotations(annotations) .endMetadata() .withNewStatus() - .withNewPhase(phase) + .withPhase(phase) .endStatus() .build(); } diff --git a/pom.xml b/pom.xml index bfc7217bba..93d2b0e19a 100644 --- a/pom.xml +++ b/pom.xml @@ -69,7 +69,7 @@ false quay.io/eclipse/che--centos--mysql-57-centos7:latest-e08ee4d43b7356607685b69bde6335e27cf20c020f345b6c6c59400183882764 quay.io/eclipse/che--centos--postgresql-13-centos7:1-71b24684d64da46f960682cc4216222a7e4ed8b1a31dd5a865b3e71afdea20d2 - 5.12.4 + 6.8.1 0.2.2 1.8.1 1.8.1 @@ -1413,7 +1413,7 @@ io.fabric8 - kubernetes-client + kubernetes-client-api ${io.fabric8.kubernetes-client} pom import From afd7cad8b8bac4b4fdb711d5754f7fae13de1f95 Mon Sep 17 00:00:00 2001 From: Igor Vinokur Date: Wed, 30 Aug 2023 09:35:08 +0300 Subject: [PATCH 49/75] Set original message and stack trace to a Runtime Exception DTO (#550) In order to extend the predefined error message in the dashboard, pass original message and stack trace to a Runtime Exception DTO --- .../api/core/rest/RuntimeExceptionMapper.java | 17 ++++++++++++++--- .../api/core/rest/shared/dto/ServiceError.java | 7 ++++++- 2 files changed, 20 insertions(+), 4 deletions(-) diff --git a/core/che-core-api-core/src/main/java/org/eclipse/che/api/core/rest/RuntimeExceptionMapper.java b/core/che-core-api-core/src/main/java/org/eclipse/che/api/core/rest/RuntimeExceptionMapper.java index d6ec045c4e..49dd5b7ecd 100644 --- a/core/che-core-api-core/src/main/java/org/eclipse/che/api/core/rest/RuntimeExceptionMapper.java +++ b/core/che-core-api-core/src/main/java/org/eclipse/che/api/core/rest/RuntimeExceptionMapper.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012-2021 Red Hat, Inc. + * Copyright (c) 2012-2023 Red Hat, Inc. * This program and the accompanying materials are made * available under the terms of the Eclipse Public License 2.0 * which is available at https://www.eclipse.org/legal/epl-2.0/ @@ -11,7 +11,10 @@ */ package org.eclipse.che.api.core.rest; +import static com.google.common.base.Strings.isNullOrEmpty; import static java.lang.String.format; +import static java.util.Arrays.stream; +import static java.util.stream.Collectors.toList; import jakarta.ws.rs.core.MediaType; import jakarta.ws.rs.core.Response; @@ -19,6 +22,7 @@ import jakarta.ws.rs.ext.ExceptionMapper; import jakarta.ws.rs.ext.Provider; import java.text.SimpleDateFormat; import java.util.Date; +import java.util.List; import java.util.TimeZone; import javax.inject.Singleton; import org.eclipse.che.api.core.rest.shared.dto.ServiceError; @@ -42,11 +46,18 @@ public class RuntimeExceptionMapper implements ExceptionMapper final SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); dateFormat.setTimeZone(TimeZone.getTimeZone("UTC")); final String utcTime = dateFormat.format(new Date()); - final String errorMessage = format("Internal Server Error occurred, error time: %s", utcTime); + String message = exception.getMessage(); + final String errorMessage = + isNullOrEmpty(message) + ? format("Internal Server Error occurred, error time: %s", utcTime) + : message; LOG.error(errorMessage, exception); - ServiceError serviceError = DtoFactory.newDto(ServiceError.class).withMessage(errorMessage); + List trace = + stream(exception.getStackTrace()).map(StackTraceElement::toString).collect(toList()); + ServiceError serviceError = + DtoFactory.newDto(ServiceError.class).withMessage(errorMessage).withTrace(trace); return Response.serverError() .entity(DtoFactory.getInstance().toJson(serviceError)) .type(MediaType.APPLICATION_JSON) diff --git a/core/che-core-api-core/src/main/java/org/eclipse/che/api/core/rest/shared/dto/ServiceError.java b/core/che-core-api-core/src/main/java/org/eclipse/che/api/core/rest/shared/dto/ServiceError.java index e1ff4d6d13..17f5879018 100644 --- a/core/che-core-api-core/src/main/java/org/eclipse/che/api/core/rest/shared/dto/ServiceError.java +++ b/core/che-core-api-core/src/main/java/org/eclipse/che/api/core/rest/shared/dto/ServiceError.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012-2018 Red Hat, Inc. + * Copyright (c) 2012-2023 Red Hat, Inc. * This program and the accompanying materials are made * available under the terms of the Eclipse Public License 2.0 * which is available at https://www.eclipse.org/legal/epl-2.0/ @@ -11,6 +11,7 @@ */ package org.eclipse.che.api.core.rest.shared.dto; +import java.util.List; import org.eclipse.che.dto.shared.DTO; /** @@ -30,8 +31,12 @@ public interface ServiceError { */ String getMessage(); + List getTrace(); + ServiceError withMessage(String message); + ServiceError withTrace(List trace); + /** * Set error message. * From da5174bf17fad84d878effc7309c9213658155af Mon Sep 17 00:00:00 2001 From: Igor Vinokur Date: Tue, 5 Sep 2023 12:49:09 +0300 Subject: [PATCH 50/75] Duplicate creating a git-credentials secret on token fetch (#551) Duplicate the git-credentials secret creation step on create personal access token secret. Currently this step is performed on workspace provision step but in this case the PAT secret might be initialised when the provision is finished. In order to synchronise the personal access token secret and git credentials secret creation step duplicate the git credentials secret creation step after the PAT secret creation step. Refactor the get(scmServerUrl) function in the KubernetesPersonalAccessTokenManager class --- .../KubernetesPersonalAccessTokenManager.java | 10 +--------- ...cketServerAuthorizingFileContentProviderTest.java | 9 +++++---- .../BitbucketServerScmFileResolverTest.java | 4 ++-- .../GithubAuthorizingFileContentProviderTest.java | 12 +++++++----- .../server/github/GithubScmFileResolverTest.java | 4 ++-- .../GitlabAuthorizingFileContentProviderTest.java | 4 ++-- .../server/gitlab/GitlabScmFileResolverTest.java | 4 ++-- .../server/scm/AuthorizingFileContentProvider.java | 2 +- .../scm/AuthorizingFactoryParameterResolverTest.java | 4 ++-- 9 files changed, 24 insertions(+), 29 deletions(-) diff --git a/infrastructures/infrastructure-factory/src/main/java/org/eclipse/che/api/factory/server/scm/kubernetes/KubernetesPersonalAccessTokenManager.java b/infrastructures/infrastructure-factory/src/main/java/org/eclipse/che/api/factory/server/scm/kubernetes/KubernetesPersonalAccessTokenManager.java index 621609e64d..2ddd31079c 100644 --- a/infrastructures/infrastructure-factory/src/main/java/org/eclipse/che/api/factory/server/scm/kubernetes/KubernetesPersonalAccessTokenManager.java +++ b/infrastructures/infrastructure-factory/src/main/java/org/eclipse/che/api/factory/server/scm/kubernetes/KubernetesPersonalAccessTokenManager.java @@ -232,15 +232,7 @@ public class KubernetesPersonalAccessTokenManager implements PersonalAccessToken throws ScmCommunicationException, ScmConfigurationPersistenceException, UnknownScmProviderException, UnsatisfiedScmPreconditionException, ScmUnauthorizedException { - Subject subject = EnvironmentContext.getCurrent().getSubject(); - Optional tokenOptional = get(subject, scmServerUrl); - PersonalAccessToken personalAccessToken; - if (tokenOptional.isPresent()) { - personalAccessToken = tokenOptional.get(); - } else { - // try to authenticate for the given URL - personalAccessToken = fetchAndSave(subject, scmServerUrl); - } + PersonalAccessToken personalAccessToken = get(scmServerUrl); gitCredentialManager.createOrReplace(personalAccessToken); return personalAccessToken; } diff --git a/wsmaster/che-core-api-factory-bitbucket-server/src/test/java/org/eclipse/che/api/factory/server/bitbucket/BitbucketServerAuthorizingFileContentProviderTest.java b/wsmaster/che-core-api-factory-bitbucket-server/src/test/java/org/eclipse/che/api/factory/server/bitbucket/BitbucketServerAuthorizingFileContentProviderTest.java index 2a52b60ae0..df12f5277b 100644 --- a/wsmaster/che-core-api-factory-bitbucket-server/src/test/java/org/eclipse/che/api/factory/server/bitbucket/BitbucketServerAuthorizingFileContentProviderTest.java +++ b/wsmaster/che-core-api-factory-bitbucket-server/src/test/java/org/eclipse/che/api/factory/server/bitbucket/BitbucketServerAuthorizingFileContentProviderTest.java @@ -44,7 +44,7 @@ public class BitbucketServerAuthorizingFileContentProviderTest { PersonalAccessToken token = new PersonalAccessToken(TEST_SCHEME + "://" + TEST_HOSTNAME, "user1", "token"); - when(personalAccessTokenManager.get(anyString())).thenReturn(token); + when(personalAccessTokenManager.getAndStore(anyString())).thenReturn(token); String fileURL = "https://foo.bar/scm/repo/.devfile"; @@ -65,7 +65,8 @@ public class BitbucketServerAuthorizingFileContentProviderTest { PersonalAccessToken token = new PersonalAccessToken(TEST_SCHEME + "://" + TEST_HOSTNAME, "user1", "token"); - when(personalAccessTokenManager.get(eq(TEST_SCHEME + "://" + TEST_HOSTNAME))).thenReturn(token); + when(personalAccessTokenManager.getAndStore(eq(TEST_SCHEME + "://" + TEST_HOSTNAME))) + .thenReturn(token); String fileURL = "https://foo.bar/scm/repo/.devfile"; @@ -73,7 +74,7 @@ public class BitbucketServerAuthorizingFileContentProviderTest { fileContentProvider.fetchContent(fileURL); // then - verify(personalAccessTokenManager).get(eq(TEST_SCHEME + "://" + TEST_HOSTNAME)); + verify(personalAccessTokenManager).getAndStore(eq(TEST_SCHEME + "://" + TEST_HOSTNAME)); verify(urlFetcher).fetch(eq(fileURL), eq("Bearer token")); } @@ -95,7 +96,7 @@ public class BitbucketServerAuthorizingFileContentProviderTest { url, urlFetcher, personalAccessTokenManager); PersonalAccessToken token = new PersonalAccessToken(TEST_SCHEME + "://" + TEST_HOSTNAME, "user1", "token"); - when(personalAccessTokenManager.get(anyString())).thenReturn(token); + when(personalAccessTokenManager.getAndStore(anyString())).thenReturn(token); // when fileContentProvider.fetchContent(relative); diff --git a/wsmaster/che-core-api-factory-bitbucket-server/src/test/java/org/eclipse/che/api/factory/server/bitbucket/BitbucketServerScmFileResolverTest.java b/wsmaster/che-core-api-factory-bitbucket-server/src/test/java/org/eclipse/che/api/factory/server/bitbucket/BitbucketServerScmFileResolverTest.java index 6a4cf5ed0b..593c89f79e 100644 --- a/wsmaster/che-core-api-factory-bitbucket-server/src/test/java/org/eclipse/che/api/factory/server/bitbucket/BitbucketServerScmFileResolverTest.java +++ b/wsmaster/che-core-api-factory-bitbucket-server/src/test/java/org/eclipse/che/api/factory/server/bitbucket/BitbucketServerScmFileResolverTest.java @@ -73,7 +73,7 @@ public class BitbucketServerScmFileResolverTest { public void shouldReturnContentFromUrlFetcher() throws Exception { final String rawContent = "raw_content"; final String filename = "devfile.yaml"; - when(personalAccessTokenManager.get(anyString())) + when(personalAccessTokenManager.getAndStore(anyString())) .thenReturn(new PersonalAccessToken(SCM_URL, "root", "token123")); when(urlFetcher.fetch(anyString(), eq("Bearer token123"))).thenReturn(rawContent); @@ -87,7 +87,7 @@ public class BitbucketServerScmFileResolverTest { @Test public void shouldFetchContentWithoutAuthentication() throws Exception { // given - when(personalAccessTokenManager.get(anyString())) + when(personalAccessTokenManager.getAndStore(anyString())) .thenThrow(new ScmUnauthorizedException("message", "bitbucket-server", "v1", "url")); // when diff --git a/wsmaster/che-core-api-factory-github/src/test/java/org/eclipse/che/api/factory/server/github/GithubAuthorizingFileContentProviderTest.java b/wsmaster/che-core-api-factory-github/src/test/java/org/eclipse/che/api/factory/server/github/GithubAuthorizingFileContentProviderTest.java index 8adc803223..1cd4564839 100644 --- a/wsmaster/che-core-api-factory-github/src/test/java/org/eclipse/che/api/factory/server/github/GithubAuthorizingFileContentProviderTest.java +++ b/wsmaster/che-core-api-factory-github/src/test/java/org/eclipse/che/api/factory/server/github/GithubAuthorizingFileContentProviderTest.java @@ -54,7 +54,7 @@ public class GithubAuthorizingFileContentProviderTest { FileContentProvider fileContentProvider = new GithubAuthorizingFileContentProvider(githubUrl, urlFetcher, personalAccessTokenManager); - when(personalAccessTokenManager.get(anyString())) + when(personalAccessTokenManager.getAndStore(anyString())) .thenReturn(new PersonalAccessToken("foo", "che", "my-token")); fileContentProvider.fetchContent("devfile.yaml"); @@ -81,7 +81,7 @@ public class GithubAuthorizingFileContentProviderTest { FileContentProvider fileContentProvider = new GithubAuthorizingFileContentProvider(githubUrl, urlFetcher, personalAccessTokenManager); - when(personalAccessTokenManager.get(anyString())) + when(personalAccessTokenManager.getAndStore(anyString())) .thenReturn(new PersonalAccessToken(raw_url, "che", "my-token")); fileContentProvider.fetchContent(raw_url); @@ -98,7 +98,8 @@ public class GithubAuthorizingFileContentProviderTest { FileContentProvider fileContentProvider = new GithubAuthorizingFileContentProvider(githubUrl, urlFetcher, personalAccessTokenManager); - when(personalAccessTokenManager.get(anyString())).thenThrow(UnknownScmProviderException.class); + when(personalAccessTokenManager.getAndStore(anyString())) + .thenThrow(UnknownScmProviderException.class); when(urlFetcher.fetch(eq(url))).thenThrow(FileNotFoundException.class); @@ -114,7 +115,8 @@ public class GithubAuthorizingFileContentProviderTest { FileContentProvider fileContentProvider = new GithubAuthorizingFileContentProvider(githubUrl, urlFetcher, personalAccessTokenManager); - when(personalAccessTokenManager.get(anyString())).thenThrow(UnknownScmProviderException.class); + when(personalAccessTokenManager.getAndStore(anyString())) + .thenThrow(UnknownScmProviderException.class); when(urlFetcher.fetch(eq(url))).thenThrow(FileNotFoundException.class); when(urlFetcher.fetch(eq("https://github.com/eclipse/che"))).thenThrow(IOException.class); @@ -130,7 +132,7 @@ public class GithubAuthorizingFileContentProviderTest { FileContentProvider fileContentProvider = new GithubAuthorizingFileContentProvider(githubUrl, urlFetcher, personalAccessTokenManager); var personalAccessToken = new PersonalAccessToken(raw_url, "che", "my-token"); - when(personalAccessTokenManager.get(anyString())).thenReturn(personalAccessToken); + when(personalAccessTokenManager.getAndStore(anyString())).thenReturn(personalAccessToken); fileContentProvider.fetchContent(raw_url); diff --git a/wsmaster/che-core-api-factory-github/src/test/java/org/eclipse/che/api/factory/server/github/GithubScmFileResolverTest.java b/wsmaster/che-core-api-factory-github/src/test/java/org/eclipse/che/api/factory/server/github/GithubScmFileResolverTest.java index 9783ccd75b..641fcd44f6 100644 --- a/wsmaster/che-core-api-factory-github/src/test/java/org/eclipse/che/api/factory/server/github/GithubScmFileResolverTest.java +++ b/wsmaster/che-core-api-factory-github/src/test/java/org/eclipse/che/api/factory/server/github/GithubScmFileResolverTest.java @@ -87,7 +87,7 @@ public class GithubScmFileResolverTest { .thenReturn(rawContent); lenient() - .when(personalAccessTokenManager.get(anyString())) + .when(personalAccessTokenManager.getAndStore(anyString())) .thenReturn(new PersonalAccessToken("foo", "che", "my-token")); when(githubApiClient.getLatestCommit(anyString(), anyString(), anyString(), any())) @@ -106,7 +106,7 @@ public class GithubScmFileResolverTest { public void shouldReturnContentWithoutAuthentication() throws Exception { // given lenient() - .when(personalAccessTokenManager.get(anyString())) + .when(personalAccessTokenManager.getAndStore(anyString())) .thenThrow(new ScmUnauthorizedException("message", "github", "v1", "url")); // when diff --git a/wsmaster/che-core-api-factory-gitlab/src/test/java/org/eclipse/che/api/factory/server/gitlab/GitlabAuthorizingFileContentProviderTest.java b/wsmaster/che-core-api-factory-gitlab/src/test/java/org/eclipse/che/api/factory/server/gitlab/GitlabAuthorizingFileContentProviderTest.java index 9685b6cf55..6150c317b7 100644 --- a/wsmaster/che-core-api-factory-gitlab/src/test/java/org/eclipse/che/api/factory/server/gitlab/GitlabAuthorizingFileContentProviderTest.java +++ b/wsmaster/che-core-api-factory-gitlab/src/test/java/org/eclipse/che/api/factory/server/gitlab/GitlabAuthorizingFileContentProviderTest.java @@ -36,7 +36,7 @@ public class GitlabAuthorizingFileContentProviderTest { FileContentProvider fileContentProvider = new GitlabAuthorizingFileContentProvider(gitlabUrl, urlFetcher, personalAccessTokenManager); var personalAccessToken = new PersonalAccessToken("foo", "che", "my-token"); - when(personalAccessTokenManager.get(anyString())).thenReturn(personalAccessToken); + when(personalAccessTokenManager.getAndStore(anyString())).thenReturn(personalAccessToken); fileContentProvider.fetchContent("devfile.yaml"); verify(urlFetcher) .fetch( @@ -54,7 +54,7 @@ public class GitlabAuthorizingFileContentProviderTest { String url = "https://gitlab.net/api/v4/projects/eclipse%2Fche/repository/files/devfile.yaml/raw"; var personalAccessToken = new PersonalAccessToken(url, "che", "my-token"); - when(personalAccessTokenManager.get(anyString())).thenReturn(personalAccessToken); + when(personalAccessTokenManager.getAndStore(anyString())).thenReturn(personalAccessToken); fileContentProvider.fetchContent(url); verify(urlFetcher).fetch(eq(url), eq("Bearer my-token")); diff --git a/wsmaster/che-core-api-factory-gitlab/src/test/java/org/eclipse/che/api/factory/server/gitlab/GitlabScmFileResolverTest.java b/wsmaster/che-core-api-factory-gitlab/src/test/java/org/eclipse/che/api/factory/server/gitlab/GitlabScmFileResolverTest.java index a51ed0aa78..f2dccda7ca 100644 --- a/wsmaster/che-core-api-factory-gitlab/src/test/java/org/eclipse/che/api/factory/server/gitlab/GitlabScmFileResolverTest.java +++ b/wsmaster/che-core-api-factory-gitlab/src/test/java/org/eclipse/che/api/factory/server/gitlab/GitlabScmFileResolverTest.java @@ -72,7 +72,7 @@ public class GitlabScmFileResolverTest { public void shouldReturnContentFromUrlFetcher() throws Exception { final String rawContent = "raw_content"; final String filename = "devfile.yaml"; - when(personalAccessTokenManager.get(any(String.class))) + when(personalAccessTokenManager.getAndStore(any(String.class))) .thenReturn(new PersonalAccessToken(SCM_URL, "root", "token123")); when(urlFetcher.fetch(anyString(), eq("Bearer token123"))).thenReturn(rawContent); @@ -86,7 +86,7 @@ public class GitlabScmFileResolverTest { @Test public void shouldFetchContentWithoutAuthentication() throws Exception { // given - when(personalAccessTokenManager.get(anyString())) + when(personalAccessTokenManager.getAndStore(anyString())) .thenThrow(new ScmUnauthorizedException("message", "gitlab", "v1", "url")); // when diff --git a/wsmaster/che-core-api-factory/src/main/java/org/eclipse/che/api/factory/server/scm/AuthorizingFileContentProvider.java b/wsmaster/che-core-api-factory/src/main/java/org/eclipse/che/api/factory/server/scm/AuthorizingFileContentProvider.java index 14cf3fc176..3cae693181 100644 --- a/wsmaster/che-core-api-factory/src/main/java/org/eclipse/che/api/factory/server/scm/AuthorizingFileContentProvider.java +++ b/wsmaster/che-core-api-factory/src/main/java/org/eclipse/che/api/factory/server/scm/AuthorizingFileContentProvider.java @@ -80,7 +80,7 @@ public class AuthorizingFileContentProvider String authorization; if (isNullOrEmpty(credentials)) { PersonalAccessToken token = - personalAccessTokenManager.get(remoteFactoryUrl.getProviderUrl()); + personalAccessTokenManager.getAndStore(remoteFactoryUrl.getProviderUrl()); authorization = formatAuthorization( token.getToken(), diff --git a/wsmaster/che-core-api-factory/src/test/java/org/eclipse/che/api/factory/server/scm/AuthorizingFactoryParameterResolverTest.java b/wsmaster/che-core-api-factory/src/test/java/org/eclipse/che/api/factory/server/scm/AuthorizingFactoryParameterResolverTest.java index 6b10db9cc5..4986a640dd 100644 --- a/wsmaster/che-core-api-factory/src/test/java/org/eclipse/che/api/factory/server/scm/AuthorizingFactoryParameterResolverTest.java +++ b/wsmaster/che-core-api-factory/src/test/java/org/eclipse/che/api/factory/server/scm/AuthorizingFactoryParameterResolverTest.java @@ -48,13 +48,13 @@ public class AuthorizingFactoryParameterResolverTest { // given when(remoteFactoryUrl.getProviderUrl()).thenReturn("https://provider.url"); when(urlFetcher.fetch(anyString(), anyString())).thenReturn("content"); - when(personalAccessTokenManager.get(anyString())).thenReturn(personalAccessToken); + when(personalAccessTokenManager.getAndStore(anyString())).thenReturn(personalAccessToken); // when provider.fetchContent("url"); // then - verify(personalAccessTokenManager).get(anyString()); + verify(personalAccessTokenManager).getAndStore(anyString()); } @Test From 6edfa3910f6298b73f5d02f7ead41cbfd18ee28d Mon Sep 17 00:00:00 2001 From: Igor Vinokur Date: Tue, 5 Sep 2023 12:51:27 +0300 Subject: [PATCH 51/75] Apply permanetn `ref` query param to the GitLab raw file location request (#545) A user claims that he couldn't start a workspace form GitLab repository because of the raw file location request doesn't contain the ref query parameter. Rework the way of generating the GitLab raw file location function to permanently add the ref query param. --- .../org/eclipse/che/api/factory/server/gitlab/GitlabUrl.java | 5 +---- .../gitlab/GitlabAuthorizingFileContentProviderTest.java | 2 +- .../eclipse/che/api/factory/server/gitlab/GitlabUrlTest.java | 4 ++-- 3 files changed, 4 insertions(+), 7 deletions(-) diff --git a/wsmaster/che-core-api-factory-gitlab/src/main/java/org/eclipse/che/api/factory/server/gitlab/GitlabUrl.java b/wsmaster/che-core-api-factory-gitlab/src/main/java/org/eclipse/che/api/factory/server/gitlab/GitlabUrl.java index 74f3f108c3..f0bda15187 100644 --- a/wsmaster/che-core-api-factory-gitlab/src/main/java/org/eclipse/che/api/factory/server/gitlab/GitlabUrl.java +++ b/wsmaster/che-core-api-factory-gitlab/src/main/java/org/eclipse/che/api/factory/server/gitlab/GitlabUrl.java @@ -178,11 +178,8 @@ public class GitlabUrl extends DefaultFactoryUrl { .add("repository") .add("files") .add(encode(fileName, Charsets.UTF_8)) - .add("raw") + .add("raw?ref=" + (isNullOrEmpty(branch) ? "HEAD" : branch)) .toString(); - if (branch != null) { - resultUrl = resultUrl + "?ref=" + branch; - } return resultUrl; } diff --git a/wsmaster/che-core-api-factory-gitlab/src/test/java/org/eclipse/che/api/factory/server/gitlab/GitlabAuthorizingFileContentProviderTest.java b/wsmaster/che-core-api-factory-gitlab/src/test/java/org/eclipse/che/api/factory/server/gitlab/GitlabAuthorizingFileContentProviderTest.java index 6150c317b7..ca74f83fae 100644 --- a/wsmaster/che-core-api-factory-gitlab/src/test/java/org/eclipse/che/api/factory/server/gitlab/GitlabAuthorizingFileContentProviderTest.java +++ b/wsmaster/che-core-api-factory-gitlab/src/test/java/org/eclipse/che/api/factory/server/gitlab/GitlabAuthorizingFileContentProviderTest.java @@ -41,7 +41,7 @@ public class GitlabAuthorizingFileContentProviderTest { verify(urlFetcher) .fetch( eq( - "https://gitlab.net/api/v4/projects/eclipse%2Fche/repository/files/devfile.yaml/raw"), + "https://gitlab.net/api/v4/projects/eclipse%2Fche/repository/files/devfile.yaml/raw?ref=HEAD"), eq("Bearer my-token")); } diff --git a/wsmaster/che-core-api-factory-gitlab/src/test/java/org/eclipse/che/api/factory/server/gitlab/GitlabUrlTest.java b/wsmaster/che-core-api-factory-gitlab/src/test/java/org/eclipse/che/api/factory/server/gitlab/GitlabUrlTest.java index c392362af6..6abaac16fa 100644 --- a/wsmaster/che-core-api-factory-gitlab/src/test/java/org/eclipse/che/api/factory/server/gitlab/GitlabUrlTest.java +++ b/wsmaster/che-core-api-factory-gitlab/src/test/java/org/eclipse/che/api/factory/server/gitlab/GitlabUrlTest.java @@ -80,11 +80,11 @@ public class GitlabUrlTest { return new Object[][] { { "https://gitlab.net/eclipse/che.git", - "https://gitlab.net/api/v4/projects/eclipse%%2Fche/repository/files/%s/raw" + "https://gitlab.net/api/v4/projects/eclipse%%2Fche/repository/files/%s/raw?ref=HEAD" }, { "https://gitlab.net/eclipse/fooproj/che.git", - "https://gitlab.net/api/v4/projects/eclipse%%2Ffooproj%%2Fche/repository/files/%s/raw" + "https://gitlab.net/api/v4/projects/eclipse%%2Ffooproj%%2Fche/repository/files/%s/raw?ref=HEAD" }, { "git@gitlab.net:eclipse/che.git", From ea67092cbccafcdc97df6cd24261ca5808b72916 Mon Sep 17 00:00:00 2001 From: Igor Vinokur Date: Wed, 6 Sep 2023 12:48:04 +0300 Subject: [PATCH 52/75] Fix failing unit tests (#553) Signed-off-by: Igor --- .../eclipse/che/api/factory/server/gitlab/GitlabUrlTest.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/wsmaster/che-core-api-factory-gitlab/src/test/java/org/eclipse/che/api/factory/server/gitlab/GitlabUrlTest.java b/wsmaster/che-core-api-factory-gitlab/src/test/java/org/eclipse/che/api/factory/server/gitlab/GitlabUrlTest.java index 6abaac16fa..aaf7728b93 100644 --- a/wsmaster/che-core-api-factory-gitlab/src/test/java/org/eclipse/che/api/factory/server/gitlab/GitlabUrlTest.java +++ b/wsmaster/che-core-api-factory-gitlab/src/test/java/org/eclipse/che/api/factory/server/gitlab/GitlabUrlTest.java @@ -88,11 +88,11 @@ public class GitlabUrlTest { }, { "git@gitlab.net:eclipse/che.git", - "https://gitlab.net/api/v4/projects/eclipse%%2Fche/repository/files/%s/raw" + "https://gitlab.net/api/v4/projects/eclipse%%2Fche/repository/files/%s/raw?ref=HEAD" }, { "git@gitlab.net:eclipse/fooproj/che.git", - "https://gitlab.net/api/v4/projects/eclipse%%2Ffooproj%%2Fche/repository/files/%s/raw" + "https://gitlab.net/api/v4/projects/eclipse%%2Ffooproj%%2Fche/repository/files/%s/raw?ref=HEAD" }, { "https://gitlab.net/eclipse/fooproj/-/tree/master/", From 9d43803100dab5629aa440c4f29ec748a23740be Mon Sep 17 00:00:00 2001 From: Igor Vinokur Date: Wed, 6 Sep 2023 14:15:11 +0300 Subject: [PATCH 53/75] Simplify the Raw devfile filename check (#548) Do not check the Raw devfile file name but check if the url ends with .yaml before using the Raw devfile url resolver. --- ...RawDevfileUrlFactoryParameterResolver.java | 6 +--- ...evfileUrlFactoryParameterResolverTest.java | 28 +++++++++---------- 2 files changed, 14 insertions(+), 20 deletions(-) diff --git a/wsmaster/che-core-api-factory/src/main/java/org/eclipse/che/api/factory/server/RawDevfileUrlFactoryParameterResolver.java b/wsmaster/che-core-api-factory/src/main/java/org/eclipse/che/api/factory/server/RawDevfileUrlFactoryParameterResolver.java index 9f65640a21..2c87847d6a 100644 --- a/wsmaster/che-core-api-factory/src/main/java/org/eclipse/che/api/factory/server/RawDevfileUrlFactoryParameterResolver.java +++ b/wsmaster/che-core-api-factory/src/main/java/org/eclipse/che/api/factory/server/RawDevfileUrlFactoryParameterResolver.java @@ -32,7 +32,6 @@ import javax.inject.Singleton; import org.eclipse.che.api.core.ApiException; import org.eclipse.che.api.core.BadRequestException; import org.eclipse.che.api.factory.server.urlfactory.DefaultFactoryUrl; -import org.eclipse.che.api.factory.server.urlfactory.DevfileFilenamesProvider; import org.eclipse.che.api.factory.server.urlfactory.RemoteFactoryUrl; import org.eclipse.che.api.factory.server.urlfactory.URLFactoryBuilder; import org.eclipse.che.api.factory.shared.dto.FactoryMetaDto; @@ -52,7 +51,6 @@ public class RawDevfileUrlFactoryParameterResolver implements FactoryParametersR protected final URLFactoryBuilder urlFactoryBuilder; protected final URLFetcher urlFetcher; - @Inject private DevfileFilenamesProvider devfileFilenamesProvider; @Inject public RawDevfileUrlFactoryParameterResolver( @@ -71,9 +69,7 @@ public class RawDevfileUrlFactoryParameterResolver implements FactoryParametersR @Override public boolean accept(Map factoryParameters) { String url = factoryParameters.get(URL_PARAMETER_NAME); - return !isNullOrEmpty(url) - && devfileFilenamesProvider.getConfiguredDevfileFilenames().stream() - .anyMatch(url::endsWith); + return !isNullOrEmpty(url) && (url.endsWith(".yaml") || url.endsWith(".yml")); } /** diff --git a/wsmaster/che-core-api-factory/src/test/java/org/eclipse/che/api/factory/server/RawDevfileUrlFactoryParameterResolverTest.java b/wsmaster/che-core-api-factory/src/test/java/org/eclipse/che/api/factory/server/RawDevfileUrlFactoryParameterResolverTest.java index 800353220b..12bed43bc5 100644 --- a/wsmaster/che-core-api-factory/src/test/java/org/eclipse/che/api/factory/server/RawDevfileUrlFactoryParameterResolverTest.java +++ b/wsmaster/che-core-api-factory/src/test/java/org/eclipse/che/api/factory/server/RawDevfileUrlFactoryParameterResolverTest.java @@ -28,12 +28,10 @@ import static org.testng.Assert.fail; import static org.testng.AssertJUnit.assertEquals; import static org.testng.AssertJUnit.assertTrue; -import java.lang.reflect.Field; import java.util.Collections; import java.util.HashMap; import java.util.Map; import org.eclipse.che.api.core.BadRequestException; -import org.eclipse.che.api.factory.server.urlfactory.DevfileFilenamesProvider; import org.eclipse.che.api.factory.server.urlfactory.RemoteFactoryUrl; import org.eclipse.che.api.factory.server.urlfactory.URLFactoryBuilder; import org.eclipse.che.api.workspace.server.devfile.DevfileParser; @@ -67,8 +65,6 @@ public class RawDevfileUrlFactoryParameterResolverTest { + " reference: ../localfile\n"; @Mock private URLFetcher urlFetcher; - private final DevfileFilenamesProvider devfileFilenamesProvider = - new DevfileFilenamesProvider("devfile.yaml, .devfile.yaml"); @InjectMocks private RawDevfileUrlFactoryParameterResolver rawDevfileUrlFactoryParameterResolver; @@ -167,16 +163,7 @@ public class RawDevfileUrlFactoryParameterResolverTest { } @Test(dataProvider = "devfileNames") - public void shouldAcceptRawDevfileUrl(String devfileName) - throws NoSuchFieldException, IllegalAccessException { - // given - Field field = - rawDevfileUrlFactoryParameterResolver - .getClass() - .getDeclaredField("devfileFilenamesProvider"); - field.setAccessible(true); - field.set(rawDevfileUrlFactoryParameterResolver, devfileFilenamesProvider); - + public void shouldAcceptRawDevfileUrl(String devfileName) { // when boolean result = rawDevfileUrlFactoryParameterResolver.accept( @@ -186,6 +173,17 @@ public class RawDevfileUrlFactoryParameterResolverTest { assertTrue(result); } + @Test + public void shouldNotAcceptRawDevfileUrl() { + // when + boolean result = + rawDevfileUrlFactoryParameterResolver.accept( + Collections.singletonMap(URL_PARAMETER_NAME, "https://host/user/repo.git")); + + // then + assertFalse(result); + } + @DataProvider(name = "invalidURLsProvider") private Object[][] invalidUrlsProvider() { return new Object[][] { @@ -200,6 +198,6 @@ public class RawDevfileUrlFactoryParameterResolverTest { @DataProvider(name = "devfileNames") private Object[] devfileNames() { - return new String[] {"devfile.yaml", ".devfile.yaml"}; + return new String[] {"devfile.yaml", ".devfile.yaml", "any-name.yaml", "any-name.yml"}; } } From 7686dab07a6e6e3505110744d327d7d1546f4f52 Mon Sep 17 00:00:00 2001 From: Shmaraiev Oleksandr Date: Thu, 7 Sep 2023 13:53:32 +0300 Subject: [PATCH 54/75] Update Dockerfile to fix an error 'node is not installed' (#555) * Update Dockerfile to fix an error * Fix the image --- .ci/openshift-ci/Dockerfile | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/.ci/openshift-ci/Dockerfile b/.ci/openshift-ci/Dockerfile index 7c912ee523..aa7caf8cad 100644 --- a/.ci/openshift-ci/Dockerfile +++ b/.ci/openshift-ci/Dockerfile @@ -12,17 +12,27 @@ # Dockerfile to bootstrap build and test in openshift-ci -FROM registry.ci.openshift.org/openshift/release:golang-1.18 +FROM registry.access.redhat.com/ubi9/nodejs-18:1 SHELL ["/bin/bash", "-c"] +USER 0 + # Install yq, kubectl, chectl cli used by olm/olm.sh script. -RUN yum install --assumeyes -d1 python3-pip httpd-tools && \ +RUN dnf install -y -q --allowerasing --nobest nodejs-devel nodejs-libs \ + # already installed or installed as deps: + openssl openssl-devel ca-certificates make cmake cpp gcc gcc-c++ zlib zlib-devel brotli brotli-devel python3 nodejs-packaging && \ + dnf update -y && dnf clean all && \ + npm install -g yarn@1.22 npm@9 && \ + echo -n "node version: "; node -v; \ + echo -n "npm version: "; npm -v; \ + echo -n "yarn version: "; yarn -v && \ + yum install --assumeyes -d1 python3-pip httpd-tools && \ pip3 install --upgrade setuptools && \ pip3 install yq && \ curl -LO https://storage.googleapis.com/kubernetes-release/release/$(curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt)/bin/linux/amd64/kubectl && \ chmod +x ./kubectl && \ mv ./kubectl /usr/local/bin && \ bash <(curl -sL https://www.eclipse.org/che/chectl/) --channel=next && \ - curl https://mirror.openshift.com/pub/openshift-v4/clients/ocp/4.12.4/openshift-client-linux.tar.gz | tar xvzf - -C /usr/local/bin/ oc && \ + curl https://mirror.openshift.com/pub/openshift-v4/clients/ocp/4.12.30/openshift-client-linux.tar.gz | tar xvzf - -C /usr/local/bin/ oc && \ chmod ug+x /usr/local/bin/oc From a6ea66285f13c50e24ee3e81325681bdf2a6fd07 Mon Sep 17 00:00:00 2001 From: Shmaraiev Oleksandr Date: Fri, 8 Sep 2023 10:27:14 +0300 Subject: [PATCH 55/75] Update command 'dnf install' (#556) --- .ci/openshift-ci/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.ci/openshift-ci/Dockerfile b/.ci/openshift-ci/Dockerfile index aa7caf8cad..0ceedc09d6 100644 --- a/.ci/openshift-ci/Dockerfile +++ b/.ci/openshift-ci/Dockerfile @@ -19,7 +19,7 @@ SHELL ["/bin/bash", "-c"] USER 0 # Install yq, kubectl, chectl cli used by olm/olm.sh script. -RUN dnf install -y -q --allowerasing --nobest nodejs-devel nodejs-libs \ +RUN dnf install -y psmisc nodejs-devel nodejs-libs -q --allowerasing --nobest \ # already installed or installed as deps: openssl openssl-devel ca-certificates make cmake cpp gcc gcc-c++ zlib zlib-devel brotli brotli-devel python3 nodejs-packaging && \ dnf update -y && dnf clean all && \ From 8731ac153a3395a04c5cefb0a34421ec5702bdca Mon Sep 17 00:00:00 2001 From: Shmaraiev Oleksandr Date: Mon, 11 Sep 2023 21:15:17 +0300 Subject: [PATCH 56/75] Add tests to check 'Azure DevOps' provider in PR checks (#552) * Add tests to check git-flow on 'azure-devops' git-provider * Refactor methods * Upfdate tests * Update 'pat-secret.yaml' file * Update the '.ci/openshift-ci/Dockerfile' * Exclude 'testFactoryResolverNoPatOAuth' from the test * Fix variable name * Refactor '' methods to handle errors more informative --- .ci/openshift-ci/common.sh | 38 +++++++++++------ .ci/openshift-ci/pat-secret.yaml | 3 +- .../test-azure-no-pat-oauth-flow.sh | 32 +++++++++++++++ .../test-azure-with-pat-setup-flow.sh | 41 +++++++++++++++++++ .../test-github-with-pat-setup-flow.sh | 10 +++-- .../test-gitlab-with-pat-setup-flow.sh | 10 +++-- 6 files changed, 113 insertions(+), 21 deletions(-) create mode 100644 .ci/openshift-ci/test-azure-no-pat-oauth-flow.sh create mode 100644 .ci/openshift-ci/test-azure-with-pat-setup-flow.sh diff --git a/.ci/openshift-ci/common.sh b/.ci/openshift-ci/common.sh index 4c6fe9a5f8..17b6b1d8e5 100644 --- a/.ci/openshift-ci/common.sh +++ b/.ci/openshift-ci/common.sh @@ -166,8 +166,7 @@ initUserNamespace() { setupPersonalAccessToken() { GIT_PROVIDER_TYPE=$1 GIT_PROVIDER_URL=$2 - GIT_PROVIDER_USER_ID=$3 - GIT_PROVIDER_PAT=$4 + GIT_PROVIDER_PAT=$3 echo "[INFO] Setup Personal Access Token Secret" oc project ${USER_CHE_NAMESPACE} @@ -179,9 +178,12 @@ setupPersonalAccessToken() { sed -i "s#che-user-id#${CHE_USER_ID}#g" pat-secret.yaml sed -i "s#git-provider-name#${GIT_PROVIDER_TYPE}#g" pat-secret.yaml sed -i "s#git-provider-url#${GIT_PROVIDER_URL}#g" pat-secret.yaml - sed -i "s#git-provider-user-id#${GIT_PROVIDER_USER_ID}#g" pat-secret.yaml sed -i "s#encoded-access-token#${ENCODED_PAT}#g" pat-secret.yaml + if [ "${GIT_PROVIDER_TYPE}" == "azure-devops" ]; then + sed -i "s#''#${GIT_PROVIDER_USERNAME}#g" pat-secret.yaml + fi + cat pat-secret.yaml oc apply -f pat-secret.yaml -n ${USER_CHE_NAMESPACE} @@ -216,23 +218,32 @@ testProjectIsCloned() { if oc exec -it -n ${OCP_USER_NAMESPACE} ${WORKSPACE_POD_NAME} -- test -f /projects/${PROJECT_NAME}/${YAML_FILE_NAME}; then echo "[INFO] Project file /projects/${PROJECT_NAME}/${YAML_FILE_NAME} exists." else - echo "[ERROR] Project file /projects/${PROJECT_NAME}/${YAML_FILE_NAME} does not exist." + echo "[INFO] Project file /projects/${PROJECT_NAME}/${YAML_FILE_NAME} is absent." return 1 fi } -testGitCredentials() { +testGitCredentialsData() { OCP_USER_NAMESPACE=$1 GIT_PROVIDER_PAT=$2 + GIT_PROVIDER_URL=$3 echo "[INFO] Check the 'git credentials' is in a workspace" - gitCredentials="${GIT_PROVIDER_USERNAME}:${GIT_PROVIDER_PAT}" + hostName="${GIT_PROVIDER_URL#https://}" + + if [ "${GIT_PROVIDER_TYPE}" == "azure-devops" ]; then + userName="username" + else + userName=${GIT_PROVIDER_USERNAME} + fi + + gitCredentials="https://${userName}:${GIT_PROVIDER_PAT}@${hostName}" WORKSPACE_POD_NAME=$(oc get pods -n ${OCP_USER_NAMESPACE} | grep workspace | awk '{print $1}') if oc exec -it -n ${OCP_USER_NAMESPACE} ${WORKSPACE_POD_NAME} -- cat /.git-credentials/credentials | grep -q ${gitCredentials}; then echo "[INFO] Git credentials file '/.git-credentials/credentials' exists and has the expected content." else echo "[ERROR] Git credentials file '/.git-credentials/credentials' does not exist or has incorrect content." - return 1 + exit 1 fi } @@ -273,7 +284,8 @@ testClonePublicRepoNoPatOAuth() { runTestWorkspaceWithGitRepoUrl ${WS_NAME} ${PROJECT_NAME} ${GIT_REPO_URL} ${OCP_USER_NAMESPACE} echo "[INFO] Check the public repository is cloned with NO PAT/OAuth setup" - testProjectIsCloned ${PROJECT_NAME} ${OCP_USER_NAMESPACE} || exit 1 + testProjectIsCloned ${PROJECT_NAME} ${OCP_USER_NAMESPACE} || \ + { echo "[ERROR] Project file /projects/${PROJECT_NAME}/${YAML_FILE_NAME} should be present." && exit 1; } deleteTestWorkspace ${WS_NAME} ${OCP_USER_NAMESPACE} } @@ -285,7 +297,9 @@ testClonePrivateRepoNoPatOAuth() { runTestWorkspaceWithGitRepoUrl ${WS_NAME} ${PROJECT_NAME} ${GIT_REPO_URL} ${OCP_USER_NAMESPACE} echo "[INFO] Check the private repository is NOT cloned with NO PAT/OAuth setup" - testProjectIsCloned ${PROJECT_NAME} ${OCP_USER_NAMESPACE} && exit 1 + testProjectIsCloned ${PROJECT_NAME} ${OCP_USER_NAMESPACE} && \ + { echo "[ERROR] Project file /projects/${PROJECT_NAME}/${YAML_FILE_NAME} should NOT be present" && exit 1; } + echo "[INFO] Project file /projects/${PROJECT_NAME}/${YAML_FILE_NAME} is NOT present. This is EXPECTED" deleteTestWorkspace ${WS_NAME} ${OCP_USER_NAMESPACE} } @@ -294,12 +308,10 @@ testCloneGitRepoWithSetupPat() { PROJECT_NAME=$2 GIT_REPO_URL=$3 OCP_USER_NAMESPACE=$4 - GIT_PROVIDER_PATH=$5 runTestWorkspaceWithGitRepoUrl ${WS_NAME} ${PROJECT_NAME} ${GIT_REPO_URL} ${OCP_USER_NAMESPACE} - testProjectIsCloned ${PROJECT_NAME} ${OCP_USER_NAMESPACE} || exit 1 - testGitCredentials ${OCP_USER_NAMESPACE} ${GIT_PROVIDER_PAT} - deleteTestWorkspace ${WS_NAME} ${OCP_USER_NAMESPACE} + testProjectIsCloned ${PROJECT_NAME} ${OCP_USER_NAMESPACE} || \ + { echo "[ERROR] Project file /projects/${PROJECT_NAME}/${YAML_FILE_NAME} should be present." && exit 1; } } setupTestEnvironment() { diff --git a/.ci/openshift-ci/pat-secret.yaml b/.ci/openshift-ci/pat-secret.yaml index f45ed810d5..4ec0df9da7 100644 --- a/.ci/openshift-ci/pat-secret.yaml +++ b/.ci/openshift-ci/pat-secret.yaml @@ -9,8 +9,7 @@ metadata: che.eclipse.org/che-userid: che-user-id che.eclipse.org/scm-personal-access-token-name: git-provider-name che.eclipse.org/scm-url: git-provider-url - che.eclipse.org/scm-userid: 'git-provider-user-id' - che.eclipse.org/scm-username: chepullreq1 + che.eclipse.org/scm-organization: '' data: token: encoded-access-token type: Opaque diff --git a/.ci/openshift-ci/test-azure-no-pat-oauth-flow.sh b/.ci/openshift-ci/test-azure-no-pat-oauth-flow.sh new file mode 100644 index 0000000000..96ff2b2f43 --- /dev/null +++ b/.ci/openshift-ci/test-azure-no-pat-oauth-flow.sh @@ -0,0 +1,32 @@ +#!/bin/bash +# +# Copyright (c) 2023 Red Hat, Inc. +# This program and the accompanying materials are made +# available under the terms of the Eclipse Public License 2.0 +# which is available at https://www.eclipse.org/legal/epl-2.0/ +# +# SPDX-License-Identifier: EPL-2.0 +# +# Contributors: +# Red Hat, Inc. - initial API and implementation +# + +# exit immediately when a command fails +set -ex +# only exit with zero if all commands of the pipeline exit successfully +set -o pipefail + +export PUBLIC_REPO_URL=${PUBLIC_REPO_URL:-"https://chepullreq1@dev.azure.com/chepullreq1/che-pr-public/_git/public-repo"} +export PRIVATE_REPO_URL=${PRIVATE_REPO_URL:-"https://dev.azure.com/chepullreq1/che-pr-private/_git/private-repo"} + +# import common test functions +SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )" +source "${SCRIPT_DIR}"/common.sh + +trap "catchFinish" EXIT SIGINT + +setupTestEnvironment ${OCP_NON_ADMIN_USER_NAME} +# due to the issue https://github.com/eclipse/che/issues/22469 +# testFactoryResolverNoPatOAuth ${PUBLIC_REPO_URL} ${PRIVATE_REPO_URL} +testClonePublicRepoNoPatOAuth ${PUBLIC_REPO_WORKSPACE_NAME} ${PUBLIC_PROJECT_NAME} ${PUBLIC_REPO_URL} ${USER_CHE_NAMESPACE} +testClonePrivateRepoNoPatOAuth ${PRIVATE_REPO_WORKSPACE_NAME} ${PRIVATE_PROJECT_NAME} ${PRIVATE_REPO_URL} ${USER_CHE_NAMESPACE} diff --git a/.ci/openshift-ci/test-azure-with-pat-setup-flow.sh b/.ci/openshift-ci/test-azure-with-pat-setup-flow.sh new file mode 100644 index 0000000000..2638864dda --- /dev/null +++ b/.ci/openshift-ci/test-azure-with-pat-setup-flow.sh @@ -0,0 +1,41 @@ +#!/bin/bash +# +# Copyright (c) 2023 Red Hat, Inc. +# This program and the accompanying materials are made +# available under the terms of the Eclipse Public License 2.0 +# which is available at https://www.eclipse.org/legal/epl-2.0/ +# +# SPDX-License-Identifier: EPL-2.0 +# +# Contributors: +# Red Hat, Inc. - initial API and implementation +# + +# exit immediately when a command fails +set -ex +# only exit with zero if all commands of the pipeline exit successfully +set -o pipefail + +export PUBLIC_REPO_URL=${PUBLIC_REPO_URL:-"https://chepullreq1@dev.azure.com/chepullreq1/che-pr-public/_git/public-repo"} +export PRIVATE_REPO_URL=${PRIVATE_REPO_URL:-"https://dev.azure.com/chepullreq1/che-pr-private/_git/private-repo"} +export GIT_PROVIDER_TYPE=${GIT_PROVIDER_TYPE:-"azure-devops"} +export GIT_PROVIDER_URL=${GIT_PROVIDER_URL:-"https://dev.azure.com"} + +# import common test functions +SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )" +source "${SCRIPT_DIR}"/common.sh + +trap "catchFinish" EXIT SIGINT + +setupTestEnvironment ${OCP_NON_ADMIN_USER_NAME} +setupPersonalAccessToken ${GIT_PROVIDER_TYPE} ${GIT_PROVIDER_URL} ${AZURE_PAT} +requestProvisionNamespace +testFactoryResolverWithPatOAuth ${PUBLIC_REPO_URL} ${PRIVATE_REPO_URL} +echo "[INFO] Check clone public repository with PAT setup" +testCloneGitRepoWithSetupPat ${PUBLIC_REPO_WORKSPACE_NAME} ${PUBLIC_PROJECT_NAME} ${PUBLIC_REPO_URL} ${USER_CHE_NAMESPACE} +testGitCredentialsData ${USER_CHE_NAMESPACE} ${AZURE_PAT} ${GIT_PROVIDER_URL} +deleteTestWorkspace ${PUBLIC_REPO_WORKSPACE_NAME} ${USER_CHE_NAMESPACE} +echo "[INFO] Check clone private repository with PAT setup" +testCloneGitRepoWithSetupPat ${PRIVATE_REPO_WORKSPACE_NAME} ${PRIVATE_PROJECT_NAME} ${PRIVATE_REPO_URL} ${USER_CHE_NAMESPACE} +testGitCredentialsData ${USER_CHE_NAMESPACE} ${AZURE_PAT} ${GIT_PROVIDER_URL} +deleteTestWorkspace ${PRIVATE_REPO_WORKSPACE_NAME} ${USER_CHE_NAMESPACE} diff --git a/.ci/openshift-ci/test-github-with-pat-setup-flow.sh b/.ci/openshift-ci/test-github-with-pat-setup-flow.sh index 53ab05a2a8..f522f970fd 100644 --- a/.ci/openshift-ci/test-github-with-pat-setup-flow.sh +++ b/.ci/openshift-ci/test-github-with-pat-setup-flow.sh @@ -28,10 +28,14 @@ source "${SCRIPT_DIR}"/common.sh trap "catchFinish" EXIT SIGINT setupTestEnvironment ${OCP_NON_ADMIN_USER_NAME} -setupPersonalAccessToken ${GIT_PROVIDER_TYPE} ${GIT_PROVIDER_URL} ${GITHUB_USER_ID} ${GITHUB_PAT} +setupPersonalAccessToken ${GIT_PROVIDER_TYPE} ${GIT_PROVIDER_URL} ${GITHUB_PAT} requestProvisionNamespace testFactoryResolverWithPatOAuth ${PUBLIC_REPO_URL} ${PRIVATE_REPO_URL} echo "[INFO] Check clone public repository with PAT setup" -testCloneGitRepoWithSetupPat ${PUBLIC_REPO_WORKSPACE_NAME} ${PUBLIC_PROJECT_NAME} ${PUBLIC_REPO_URL} ${USER_CHE_NAMESPACE} ${GITHUB_PAT} +testCloneGitRepoWithSetupPat ${PUBLIC_REPO_WORKSPACE_NAME} ${PUBLIC_PROJECT_NAME} ${PUBLIC_REPO_URL} ${USER_CHE_NAMESPACE} +testGitCredentialsData ${USER_CHE_NAMESPACE} ${GITHUB_PAT} ${GIT_PROVIDER_URL} +deleteTestWorkspace ${PUBLIC_REPO_WORKSPACE_NAME} ${USER_CHE_NAMESPACE} echo "[INFO] Check clone private repository with PAT setup" -testCloneGitRepoWithSetupPat ${PRIVATE_REPO_WORKSPACE_NAME} ${PRIVATE_PROJECT_NAME} ${PRIVATE_REPO_URL} ${USER_CHE_NAMESPACE} ${GITHUB_PAT} +testCloneGitRepoWithSetupPat ${PRIVATE_REPO_WORKSPACE_NAME} ${PRIVATE_PROJECT_NAME} ${PRIVATE_REPO_URL} ${USER_CHE_NAMESPACE} +testGitCredentialsData ${USER_CHE_NAMESPACE} ${GITHUB_PAT} ${GIT_PROVIDER_URL} +deleteTestWorkspace ${PRIVATE_REPO_WORKSPACE_NAME} ${USER_CHE_NAMESPACE} diff --git a/.ci/openshift-ci/test-gitlab-with-pat-setup-flow.sh b/.ci/openshift-ci/test-gitlab-with-pat-setup-flow.sh index c0ddfb6b09..9f7ddb3834 100644 --- a/.ci/openshift-ci/test-gitlab-with-pat-setup-flow.sh +++ b/.ci/openshift-ci/test-gitlab-with-pat-setup-flow.sh @@ -28,10 +28,14 @@ source "${SCRIPT_DIR}"/common.sh trap "catchFinish" EXIT SIGINT setupTestEnvironment ${OCP_NON_ADMIN_USER_NAME} -setupPersonalAccessToken ${GIT_PROVIDER_TYPE} ${GIT_PROVIDER_URL} ${GITLAB_USER_ID} ${GITLAB_PAT} +setupPersonalAccessToken ${GIT_PROVIDER_TYPE} ${GIT_PROVIDER_URL} ${GITLAB_PAT} requestProvisionNamespace testFactoryResolverWithPatOAuth ${PUBLIC_REPO_URL} ${PRIVATE_REPO_URL} echo "[INFO] Check clone public repository with PAT setup" -testCloneGitRepoWithSetupPat ${PUBLIC_REPO_WORKSPACE_NAME} ${PUBLIC_PROJECT_NAME} ${PUBLIC_REPO_URL} ${USER_CHE_NAMESPACE} ${GITLAB_PAT} +testCloneGitRepoWithSetupPat ${PUBLIC_REPO_WORKSPACE_NAME} ${PUBLIC_PROJECT_NAME} ${PUBLIC_REPO_URL} ${USER_CHE_NAMESPACE} +testGitCredentialsData ${USER_CHE_NAMESPACE} ${GITLAB_PAT} ${GIT_PROVIDER_URL} +deleteTestWorkspace ${PUBLIC_REPO_WORKSPACE_NAME} ${USER_CHE_NAMESPACE} echo "[INFO] Check clone private repository with PAT setup" -testCloneGitRepoWithSetupPat ${PRIVATE_REPO_WORKSPACE_NAME} ${PRIVATE_PROJECT_NAME} ${PRIVATE_REPO_URL} ${USER_CHE_NAMESPACE} ${GITLAB_PAT} +testCloneGitRepoWithSetupPat ${PRIVATE_REPO_WORKSPACE_NAME} ${PRIVATE_PROJECT_NAME} ${PRIVATE_REPO_URL} ${USER_CHE_NAMESPACE} +testGitCredentialsData ${USER_CHE_NAMESPACE} ${GITLAB_PAT} ${GIT_PROVIDER_URL} +deleteTestWorkspace ${PRIVATE_REPO_WORKSPACE_NAME} ${USER_CHE_NAMESPACE} From 033d310b0dec801f2e45d670d8b699adf4ffe3da Mon Sep 17 00:00:00 2001 From: che-bot <39771996+che-bot@users.noreply.github.com> Date: Tue, 12 Sep 2023 00:17:12 +0200 Subject: [PATCH 57/75] chore: Bump to 7.75.0-SNAPSHOT in main (#554) Signed-off-by: Mykhailo Kuznietsov Co-authored-by: Mykhailo Kuznietsov --- assembly/assembly-che-tomcat/pom.xml | 2 +- assembly/assembly-main/pom.xml | 2 +- assembly/assembly-root-war/pom.xml | 2 +- assembly/assembly-swagger-war/pom.xml | 2 +- assembly/assembly-wsmaster-war/pom.xml | 2 +- assembly/pom.xml | 2 +- core/che-core-api-core/pom.xml | 2 +- core/che-core-api-dto-maven-plugin/pom.xml | 2 +- core/che-core-api-dto/pom.xml | 2 +- core/che-core-api-model/pom.xml | 2 +- core/che-core-db-vendor-h2/pom.xml | 2 +- core/che-core-db-vendor-mysql/pom.xml | 2 +- core/che-core-db-vendor-postgresql/pom.xml | 2 +- core/che-core-db/pom.xml | 2 +- core/che-core-logback/pom.xml | 2 +- core/che-core-metrics-core/pom.xml | 2 +- core/che-core-tracing-core/pom.xml | 2 +- core/che-core-tracing-metrics/pom.xml | 2 +- core/che-core-tracing-web/pom.xml | 2 +- core/che-core-typescript-dto-maven-plugin/pom.xml | 2 +- core/commons/che-core-commons-annotations/pom.xml | 2 +- core/commons/che-core-commons-inject/pom.xml | 2 +- core/commons/che-core-commons-j2ee/pom.xml | 2 +- core/commons/che-core-commons-json/pom.xml | 2 +- core/commons/che-core-commons-lang/pom.xml | 2 +- core/commons/che-core-commons-observability/pom.xml | 2 +- core/commons/che-core-commons-schedule/pom.xml | 2 +- core/commons/che-core-commons-test/pom.xml | 2 +- core/commons/che-core-commons-tracing/pom.xml | 2 +- core/commons/pom.xml | 2 +- core/pom.xml | 2 +- infrastructures/infrastructure-distributed/pom.xml | 2 +- infrastructures/infrastructure-factory/pom.xml | 2 +- infrastructures/infrastructure-metrics/pom.xml | 2 +- infrastructures/infrastructure-permission/pom.xml | 2 +- infrastructures/kubernetes/pom.xml | 2 +- infrastructures/openshift/pom.xml | 2 +- infrastructures/pom.xml | 2 +- .../api/che-multiuser-api-authentication-commons/pom.xml | 2 +- multiuser/api/che-multiuser-api-authorization-impl/pom.xml | 2 +- multiuser/api/che-multiuser-api-authorization/pom.xml | 2 +- multiuser/api/che-multiuser-api-organization-shared/pom.xml | 2 +- multiuser/api/che-multiuser-api-organization/pom.xml | 2 +- multiuser/api/che-multiuser-api-permission-shared/pom.xml | 2 +- multiuser/api/che-multiuser-api-permission/pom.xml | 2 +- multiuser/api/che-multiuser-api-resource-shared/pom.xml | 2 +- multiuser/api/che-multiuser-api-resource/pom.xml | 2 +- multiuser/api/che-multiuser-api-workspace-activity/pom.xml | 2 +- multiuser/api/pom.xml | 2 +- .../integration-tests/che-multiuser-cascade-removal/pom.xml | 2 +- multiuser/integration-tests/che-multiuser-mysql-tck/pom.xml | 2 +- .../integration-tests/che-multiuser-postgresql-tck/pom.xml | 2 +- multiuser/integration-tests/pom.xml | 2 +- multiuser/keycloak/che-multiuser-keycloak-server/pom.xml | 2 +- multiuser/keycloak/che-multiuser-keycloak-shared/pom.xml | 2 +- .../keycloak/che-multiuser-keycloak-token-provider/pom.xml | 2 +- .../keycloak/che-multiuser-keycloak-user-remover/pom.xml | 2 +- multiuser/keycloak/pom.xml | 2 +- .../che-multiuser-machine-authentication-shared/pom.xml | 2 +- .../machine-auth/che-multiuser-machine-authentication/pom.xml | 2 +- multiuser/machine-auth/pom.xml | 2 +- multiuser/oidc/pom.xml | 2 +- multiuser/permission/che-multiuser-permission-devfile/pom.xml | 2 +- multiuser/permission/che-multiuser-permission-logger/pom.xml | 2 +- .../permission/che-multiuser-permission-resource/pom.xml | 2 +- multiuser/permission/che-multiuser-permission-system/pom.xml | 2 +- multiuser/permission/che-multiuser-permission-user/pom.xml | 2 +- .../che-multiuser-permission-workspace-activity/pom.xml | 2 +- .../permission/che-multiuser-permission-workspace/pom.xml | 2 +- multiuser/permission/pom.xml | 2 +- multiuser/personal-account/pom.xml | 2 +- multiuser/pom.xml | 2 +- multiuser/sql-schema/pom.xml | 2 +- pom.xml | 4 ++-- typescript-dto/dto-pom.xml | 2 +- wsmaster/che-core-api-account/pom.xml | 2 +- wsmaster/che-core-api-auth-azure-devops/pom.xml | 2 +- wsmaster/che-core-api-auth-bitbucket/pom.xml | 2 +- wsmaster/che-core-api-auth-github/pom.xml | 2 +- wsmaster/che-core-api-auth-gitlab/pom.xml | 2 +- wsmaster/che-core-api-auth-openshift/pom.xml | 2 +- wsmaster/che-core-api-auth-shared/pom.xml | 2 +- wsmaster/che-core-api-auth/pom.xml | 2 +- wsmaster/che-core-api-devfile-shared/pom.xml | 2 +- wsmaster/che-core-api-devfile/pom.xml | 2 +- wsmaster/che-core-api-factory-azure-devops/pom.xml | 2 +- wsmaster/che-core-api-factory-bitbucket-server/pom.xml | 2 +- wsmaster/che-core-api-factory-bitbucket/pom.xml | 2 +- wsmaster/che-core-api-factory-github/pom.xml | 2 +- wsmaster/che-core-api-factory-gitlab/pom.xml | 2 +- wsmaster/che-core-api-factory-shared/pom.xml | 2 +- wsmaster/che-core-api-factory/pom.xml | 2 +- wsmaster/che-core-api-logger-shared/pom.xml | 2 +- wsmaster/che-core-api-logger/pom.xml | 2 +- wsmaster/che-core-api-metrics/pom.xml | 2 +- wsmaster/che-core-api-ssh-shared/pom.xml | 2 +- wsmaster/che-core-api-ssh/pom.xml | 2 +- wsmaster/che-core-api-system-shared/pom.xml | 2 +- wsmaster/che-core-api-system/pom.xml | 2 +- wsmaster/che-core-api-user-shared/pom.xml | 2 +- wsmaster/che-core-api-user/pom.xml | 2 +- wsmaster/che-core-api-workspace-activity/pom.xml | 2 +- wsmaster/che-core-api-workspace-shared/pom.xml | 2 +- wsmaster/che-core-api-workspace/pom.xml | 2 +- wsmaster/che-core-sql-schema/pom.xml | 2 +- wsmaster/integration-tests/cascade-removal/pom.xml | 2 +- wsmaster/integration-tests/mysql-tck/pom.xml | 2 +- wsmaster/integration-tests/pom.xml | 2 +- wsmaster/integration-tests/postgresql-tck/pom.xml | 2 +- wsmaster/pom.xml | 2 +- 110 files changed, 111 insertions(+), 111 deletions(-) diff --git a/assembly/assembly-che-tomcat/pom.xml b/assembly/assembly-che-tomcat/pom.xml index f5c81234cb..9f5fcafab7 100644 --- a/assembly/assembly-che-tomcat/pom.xml +++ b/assembly/assembly-che-tomcat/pom.xml @@ -17,7 +17,7 @@ che-assembly-parent org.eclipse.che - 7.74.0-SNAPSHOT + 7.75.0-SNAPSHOT assembly-che-tomcat jar diff --git a/assembly/assembly-main/pom.xml b/assembly/assembly-main/pom.xml index 0b96a305e9..986194f214 100644 --- a/assembly/assembly-main/pom.xml +++ b/assembly/assembly-main/pom.xml @@ -17,7 +17,7 @@ che-assembly-parent org.eclipse.che - 7.74.0-SNAPSHOT + 7.75.0-SNAPSHOT assembly-main pom diff --git a/assembly/assembly-root-war/pom.xml b/assembly/assembly-root-war/pom.xml index 36f0315df1..e30607a7fc 100644 --- a/assembly/assembly-root-war/pom.xml +++ b/assembly/assembly-root-war/pom.xml @@ -17,7 +17,7 @@ che-assembly-parent org.eclipse.che - 7.74.0-SNAPSHOT + 7.75.0-SNAPSHOT assembly-root-war war diff --git a/assembly/assembly-swagger-war/pom.xml b/assembly/assembly-swagger-war/pom.xml index a61a032af9..717e916051 100644 --- a/assembly/assembly-swagger-war/pom.xml +++ b/assembly/assembly-swagger-war/pom.xml @@ -17,7 +17,7 @@ che-assembly-parent org.eclipse.che - 7.74.0-SNAPSHOT + 7.75.0-SNAPSHOT assembly-swagger-war war diff --git a/assembly/assembly-wsmaster-war/pom.xml b/assembly/assembly-wsmaster-war/pom.xml index 75e59b3650..503c89825c 100644 --- a/assembly/assembly-wsmaster-war/pom.xml +++ b/assembly/assembly-wsmaster-war/pom.xml @@ -17,7 +17,7 @@ che-assembly-parent org.eclipse.che - 7.74.0-SNAPSHOT + 7.75.0-SNAPSHOT assembly-wsmaster-war war diff --git a/assembly/pom.xml b/assembly/pom.xml index efe41d5a55..b0b824f028 100644 --- a/assembly/pom.xml +++ b/assembly/pom.xml @@ -17,7 +17,7 @@ che-server org.eclipse.che - 7.74.0-SNAPSHOT + 7.75.0-SNAPSHOT ../pom.xml che-assembly-parent diff --git a/core/che-core-api-core/pom.xml b/core/che-core-api-core/pom.xml index 7c0ffa9636..54bd5e1ea3 100644 --- a/core/che-core-api-core/pom.xml +++ b/core/che-core-api-core/pom.xml @@ -17,7 +17,7 @@ che-core-parent org.eclipse.che.core - 7.74.0-SNAPSHOT + 7.75.0-SNAPSHOT che-core-api-core jar diff --git a/core/che-core-api-dto-maven-plugin/pom.xml b/core/che-core-api-dto-maven-plugin/pom.xml index ba1dcf4d6e..8f96126a96 100644 --- a/core/che-core-api-dto-maven-plugin/pom.xml +++ b/core/che-core-api-dto-maven-plugin/pom.xml @@ -17,7 +17,7 @@ che-core-parent org.eclipse.che.core - 7.74.0-SNAPSHOT + 7.75.0-SNAPSHOT che-core-api-dto-maven-plugin maven-plugin diff --git a/core/che-core-api-dto/pom.xml b/core/che-core-api-dto/pom.xml index 320a249d6f..62f08a27ac 100644 --- a/core/che-core-api-dto/pom.xml +++ b/core/che-core-api-dto/pom.xml @@ -17,7 +17,7 @@ che-core-parent org.eclipse.che.core - 7.74.0-SNAPSHOT + 7.75.0-SNAPSHOT che-core-api-dto jar diff --git a/core/che-core-api-model/pom.xml b/core/che-core-api-model/pom.xml index bc75eb2bfb..bf4636e9a8 100644 --- a/core/che-core-api-model/pom.xml +++ b/core/che-core-api-model/pom.xml @@ -17,7 +17,7 @@ che-core-parent org.eclipse.che.core - 7.74.0-SNAPSHOT + 7.75.0-SNAPSHOT che-core-api-model jar diff --git a/core/che-core-db-vendor-h2/pom.xml b/core/che-core-db-vendor-h2/pom.xml index 80032b44e1..86dca7cd3c 100644 --- a/core/che-core-db-vendor-h2/pom.xml +++ b/core/che-core-db-vendor-h2/pom.xml @@ -17,7 +17,7 @@ che-core-parent org.eclipse.che.core - 7.74.0-SNAPSHOT + 7.75.0-SNAPSHOT che-core-db-vendor-h2 Che Core :: Commons :: DB :: Vendor H2 diff --git a/core/che-core-db-vendor-mysql/pom.xml b/core/che-core-db-vendor-mysql/pom.xml index b92bb670a7..54f2683026 100644 --- a/core/che-core-db-vendor-mysql/pom.xml +++ b/core/che-core-db-vendor-mysql/pom.xml @@ -17,7 +17,7 @@ che-core-parent org.eclipse.che.core - 7.74.0-SNAPSHOT + 7.75.0-SNAPSHOT che-core-db-vendor-mysql Che Core :: Commons :: DB :: Vendor MySQL diff --git a/core/che-core-db-vendor-postgresql/pom.xml b/core/che-core-db-vendor-postgresql/pom.xml index de89925014..df40e25b63 100644 --- a/core/che-core-db-vendor-postgresql/pom.xml +++ b/core/che-core-db-vendor-postgresql/pom.xml @@ -17,7 +17,7 @@ che-core-parent org.eclipse.che.core - 7.74.0-SNAPSHOT + 7.75.0-SNAPSHOT che-core-db-vendor-postgresql Che Core :: Commons :: DB :: Vendor PostgreSQL diff --git a/core/che-core-db/pom.xml b/core/che-core-db/pom.xml index b84498ca4f..b54cc16678 100644 --- a/core/che-core-db/pom.xml +++ b/core/che-core-db/pom.xml @@ -17,7 +17,7 @@ che-core-parent org.eclipse.che.core - 7.74.0-SNAPSHOT + 7.75.0-SNAPSHOT che-core-db Che Core :: Commons :: DB diff --git a/core/che-core-logback/pom.xml b/core/che-core-logback/pom.xml index 737d4247cb..c858c34407 100644 --- a/core/che-core-logback/pom.xml +++ b/core/che-core-logback/pom.xml @@ -17,7 +17,7 @@ che-core-parent org.eclipse.che.core - 7.74.0-SNAPSHOT + 7.75.0-SNAPSHOT che-core-logback jar diff --git a/core/che-core-metrics-core/pom.xml b/core/che-core-metrics-core/pom.xml index 20009594cb..21d1c69f78 100644 --- a/core/che-core-metrics-core/pom.xml +++ b/core/che-core-metrics-core/pom.xml @@ -17,7 +17,7 @@ che-core-parent org.eclipse.che.core - 7.74.0-SNAPSHOT + 7.75.0-SNAPSHOT che-core-metrics-core Che Core :: Commons :: Metrics :: Core diff --git a/core/che-core-tracing-core/pom.xml b/core/che-core-tracing-core/pom.xml index 75b703e5b5..371026b4f8 100644 --- a/core/che-core-tracing-core/pom.xml +++ b/core/che-core-tracing-core/pom.xml @@ -17,7 +17,7 @@ che-core-parent org.eclipse.che.core - 7.74.0-SNAPSHOT + 7.75.0-SNAPSHOT che-core-tracing-core Che Core :: Commons :: Tracing :: Core diff --git a/core/che-core-tracing-metrics/pom.xml b/core/che-core-tracing-metrics/pom.xml index 088185b477..566a1dfed7 100644 --- a/core/che-core-tracing-metrics/pom.xml +++ b/core/che-core-tracing-metrics/pom.xml @@ -17,7 +17,7 @@ che-core-parent org.eclipse.che.core - 7.74.0-SNAPSHOT + 7.75.0-SNAPSHOT che-core-tracing-metrics Che Core :: Commons :: Tracing :: Metrics diff --git a/core/che-core-tracing-web/pom.xml b/core/che-core-tracing-web/pom.xml index 974c8f6389..fed33839b1 100644 --- a/core/che-core-tracing-web/pom.xml +++ b/core/che-core-tracing-web/pom.xml @@ -17,7 +17,7 @@ che-core-parent org.eclipse.che.core - 7.74.0-SNAPSHOT + 7.75.0-SNAPSHOT che-core-tracing-web Che Core :: Commons :: Tracing :: Web diff --git a/core/che-core-typescript-dto-maven-plugin/pom.xml b/core/che-core-typescript-dto-maven-plugin/pom.xml index 774d06e331..6d80616004 100644 --- a/core/che-core-typescript-dto-maven-plugin/pom.xml +++ b/core/che-core-typescript-dto-maven-plugin/pom.xml @@ -17,7 +17,7 @@ che-core-parent org.eclipse.che.core - 7.74.0-SNAPSHOT + 7.75.0-SNAPSHOT che-core-typescript-dto-maven-plugin maven-plugin diff --git a/core/commons/che-core-commons-annotations/pom.xml b/core/commons/che-core-commons-annotations/pom.xml index 035bd8afe7..db4741319e 100644 --- a/core/commons/che-core-commons-annotations/pom.xml +++ b/core/commons/che-core-commons-annotations/pom.xml @@ -17,7 +17,7 @@ che-core-commons-parent org.eclipse.che.core - 7.74.0-SNAPSHOT + 7.75.0-SNAPSHOT che-core-commons-annotations jar diff --git a/core/commons/che-core-commons-inject/pom.xml b/core/commons/che-core-commons-inject/pom.xml index de225d55c8..9ee3077fb5 100644 --- a/core/commons/che-core-commons-inject/pom.xml +++ b/core/commons/che-core-commons-inject/pom.xml @@ -17,7 +17,7 @@ che-core-commons-parent org.eclipse.che.core - 7.74.0-SNAPSHOT + 7.75.0-SNAPSHOT che-core-commons-inject jar diff --git a/core/commons/che-core-commons-j2ee/pom.xml b/core/commons/che-core-commons-j2ee/pom.xml index abb99c95b4..3952df3ebf 100644 --- a/core/commons/che-core-commons-j2ee/pom.xml +++ b/core/commons/che-core-commons-j2ee/pom.xml @@ -17,7 +17,7 @@ che-core-commons-parent org.eclipse.che.core - 7.74.0-SNAPSHOT + 7.75.0-SNAPSHOT che-core-commons-j2ee jar diff --git a/core/commons/che-core-commons-json/pom.xml b/core/commons/che-core-commons-json/pom.xml index 1660496595..9f54dda9bc 100644 --- a/core/commons/che-core-commons-json/pom.xml +++ b/core/commons/che-core-commons-json/pom.xml @@ -17,7 +17,7 @@ che-core-commons-parent org.eclipse.che.core - 7.74.0-SNAPSHOT + 7.75.0-SNAPSHOT che-core-commons-json jar diff --git a/core/commons/che-core-commons-lang/pom.xml b/core/commons/che-core-commons-lang/pom.xml index 08a9a4a68e..95fce88cbb 100644 --- a/core/commons/che-core-commons-lang/pom.xml +++ b/core/commons/che-core-commons-lang/pom.xml @@ -17,7 +17,7 @@ che-core-commons-parent org.eclipse.che.core - 7.74.0-SNAPSHOT + 7.75.0-SNAPSHOT che-core-commons-lang jar diff --git a/core/commons/che-core-commons-observability/pom.xml b/core/commons/che-core-commons-observability/pom.xml index 4ce9237280..1c4bad351e 100644 --- a/core/commons/che-core-commons-observability/pom.xml +++ b/core/commons/che-core-commons-observability/pom.xml @@ -17,7 +17,7 @@ che-core-commons-parent org.eclipse.che.core - 7.74.0-SNAPSHOT + 7.75.0-SNAPSHOT che-core-commons-observability Che Core :: Commons :: Tracing and Monitoring wrapper diff --git a/core/commons/che-core-commons-schedule/pom.xml b/core/commons/che-core-commons-schedule/pom.xml index 28234240a1..777b396731 100644 --- a/core/commons/che-core-commons-schedule/pom.xml +++ b/core/commons/che-core-commons-schedule/pom.xml @@ -17,7 +17,7 @@ che-core-commons-parent org.eclipse.che.core - 7.74.0-SNAPSHOT + 7.75.0-SNAPSHOT che-core-commons-schedule jar diff --git a/core/commons/che-core-commons-test/pom.xml b/core/commons/che-core-commons-test/pom.xml index 1c3390e902..9074d47ca6 100644 --- a/core/commons/che-core-commons-test/pom.xml +++ b/core/commons/che-core-commons-test/pom.xml @@ -17,7 +17,7 @@ che-core-commons-parent org.eclipse.che.core - 7.74.0-SNAPSHOT + 7.75.0-SNAPSHOT che-core-commons-test jar diff --git a/core/commons/che-core-commons-tracing/pom.xml b/core/commons/che-core-commons-tracing/pom.xml index 8f65721327..65a68c35c2 100644 --- a/core/commons/che-core-commons-tracing/pom.xml +++ b/core/commons/che-core-commons-tracing/pom.xml @@ -17,7 +17,7 @@ che-core-commons-parent org.eclipse.che.core - 7.74.0-SNAPSHOT + 7.75.0-SNAPSHOT che-core-commons-tracing Che Core :: Commons :: Tracing diff --git a/core/commons/pom.xml b/core/commons/pom.xml index fc9308fe5d..4187196357 100644 --- a/core/commons/pom.xml +++ b/core/commons/pom.xml @@ -17,7 +17,7 @@ che-core-parent org.eclipse.che.core - 7.74.0-SNAPSHOT + 7.75.0-SNAPSHOT ../pom.xml che-core-commons-parent diff --git a/core/pom.xml b/core/pom.xml index 088a25fe1e..b8d05d80de 100644 --- a/core/pom.xml +++ b/core/pom.xml @@ -17,7 +17,7 @@ che-server org.eclipse.che - 7.74.0-SNAPSHOT + 7.75.0-SNAPSHOT ../pom.xml org.eclipse.che.core diff --git a/infrastructures/infrastructure-distributed/pom.xml b/infrastructures/infrastructure-distributed/pom.xml index 66c493e694..e6a140eb37 100644 --- a/infrastructures/infrastructure-distributed/pom.xml +++ b/infrastructures/infrastructure-distributed/pom.xml @@ -17,7 +17,7 @@ che-infrastructures-parent org.eclipse.che.infrastructure - 7.74.0-SNAPSHOT + 7.75.0-SNAPSHOT infrastructure-distributed jar diff --git a/infrastructures/infrastructure-factory/pom.xml b/infrastructures/infrastructure-factory/pom.xml index ac978e3239..1f4fa349b7 100644 --- a/infrastructures/infrastructure-factory/pom.xml +++ b/infrastructures/infrastructure-factory/pom.xml @@ -17,7 +17,7 @@ che-infrastructures-parent org.eclipse.che.infrastructure - 7.74.0-SNAPSHOT + 7.75.0-SNAPSHOT infrastructure-factory jar diff --git a/infrastructures/infrastructure-metrics/pom.xml b/infrastructures/infrastructure-metrics/pom.xml index 038f3d723b..c3f02e737d 100644 --- a/infrastructures/infrastructure-metrics/pom.xml +++ b/infrastructures/infrastructure-metrics/pom.xml @@ -17,7 +17,7 @@ che-infrastructures-parent org.eclipse.che.infrastructure - 7.74.0-SNAPSHOT + 7.75.0-SNAPSHOT ../pom.xml infrastructure-metrics diff --git a/infrastructures/infrastructure-permission/pom.xml b/infrastructures/infrastructure-permission/pom.xml index a760e0741a..d3dcd81a5e 100644 --- a/infrastructures/infrastructure-permission/pom.xml +++ b/infrastructures/infrastructure-permission/pom.xml @@ -17,7 +17,7 @@ che-infrastructures-parent org.eclipse.che.infrastructure - 7.74.0-SNAPSHOT + 7.75.0-SNAPSHOT infrastructure-permission Infrastructure :: Kubernetes Permissions diff --git a/infrastructures/kubernetes/pom.xml b/infrastructures/kubernetes/pom.xml index 1d2a534702..bb03ddbb22 100644 --- a/infrastructures/kubernetes/pom.xml +++ b/infrastructures/kubernetes/pom.xml @@ -17,7 +17,7 @@ che-infrastructures-parent org.eclipse.che.infrastructure - 7.74.0-SNAPSHOT + 7.75.0-SNAPSHOT infrastructure-kubernetes Infrastructure :: Kubernetes diff --git a/infrastructures/openshift/pom.xml b/infrastructures/openshift/pom.xml index 5620834144..4ebbcbedc6 100644 --- a/infrastructures/openshift/pom.xml +++ b/infrastructures/openshift/pom.xml @@ -17,7 +17,7 @@ che-infrastructures-parent org.eclipse.che.infrastructure - 7.74.0-SNAPSHOT + 7.75.0-SNAPSHOT infrastructure-openshift Infrastructure :: OpenShift diff --git a/infrastructures/pom.xml b/infrastructures/pom.xml index 0d616f77f4..9899692419 100644 --- a/infrastructures/pom.xml +++ b/infrastructures/pom.xml @@ -17,7 +17,7 @@ che-server org.eclipse.che - 7.74.0-SNAPSHOT + 7.75.0-SNAPSHOT ../pom.xml org.eclipse.che.infrastructure diff --git a/multiuser/api/che-multiuser-api-authentication-commons/pom.xml b/multiuser/api/che-multiuser-api-authentication-commons/pom.xml index f9ec158708..089f68622c 100644 --- a/multiuser/api/che-multiuser-api-authentication-commons/pom.xml +++ b/multiuser/api/che-multiuser-api-authentication-commons/pom.xml @@ -17,7 +17,7 @@ che-multiuser-api org.eclipse.che.multiuser - 7.74.0-SNAPSHOT + 7.75.0-SNAPSHOT che-multiuser-api-authentication-commons jar diff --git a/multiuser/api/che-multiuser-api-authorization-impl/pom.xml b/multiuser/api/che-multiuser-api-authorization-impl/pom.xml index a12c7c9cb3..fb2e99ff6a 100644 --- a/multiuser/api/che-multiuser-api-authorization-impl/pom.xml +++ b/multiuser/api/che-multiuser-api-authorization-impl/pom.xml @@ -17,7 +17,7 @@ che-multiuser-api org.eclipse.che.multiuser - 7.74.0-SNAPSHOT + 7.75.0-SNAPSHOT che-multiuser-api-authorization-impl jar diff --git a/multiuser/api/che-multiuser-api-authorization/pom.xml b/multiuser/api/che-multiuser-api-authorization/pom.xml index 87dc6084a4..f94e1b8cc8 100644 --- a/multiuser/api/che-multiuser-api-authorization/pom.xml +++ b/multiuser/api/che-multiuser-api-authorization/pom.xml @@ -17,7 +17,7 @@ che-multiuser-api org.eclipse.che.multiuser - 7.74.0-SNAPSHOT + 7.75.0-SNAPSHOT che-multiuser-api-authorization jar diff --git a/multiuser/api/che-multiuser-api-organization-shared/pom.xml b/multiuser/api/che-multiuser-api-organization-shared/pom.xml index 8c517f2d5a..dc6e4ac795 100644 --- a/multiuser/api/che-multiuser-api-organization-shared/pom.xml +++ b/multiuser/api/che-multiuser-api-organization-shared/pom.xml @@ -17,7 +17,7 @@ che-multiuser-api org.eclipse.che.multiuser - 7.74.0-SNAPSHOT + 7.75.0-SNAPSHOT che-multiuser-api-organization-shared jar diff --git a/multiuser/api/che-multiuser-api-organization/pom.xml b/multiuser/api/che-multiuser-api-organization/pom.xml index e96cca4428..f9b71197df 100644 --- a/multiuser/api/che-multiuser-api-organization/pom.xml +++ b/multiuser/api/che-multiuser-api-organization/pom.xml @@ -17,7 +17,7 @@ che-multiuser-api org.eclipse.che.multiuser - 7.74.0-SNAPSHOT + 7.75.0-SNAPSHOT che-multiuser-api-organization jar diff --git a/multiuser/api/che-multiuser-api-permission-shared/pom.xml b/multiuser/api/che-multiuser-api-permission-shared/pom.xml index 07faf0ca39..d13ab8cd91 100644 --- a/multiuser/api/che-multiuser-api-permission-shared/pom.xml +++ b/multiuser/api/che-multiuser-api-permission-shared/pom.xml @@ -17,7 +17,7 @@ che-multiuser-api org.eclipse.che.multiuser - 7.74.0-SNAPSHOT + 7.75.0-SNAPSHOT che-multiuser-api-permission-shared jar diff --git a/multiuser/api/che-multiuser-api-permission/pom.xml b/multiuser/api/che-multiuser-api-permission/pom.xml index 5f85bba74f..aac5449177 100644 --- a/multiuser/api/che-multiuser-api-permission/pom.xml +++ b/multiuser/api/che-multiuser-api-permission/pom.xml @@ -17,7 +17,7 @@ che-multiuser-api org.eclipse.che.multiuser - 7.74.0-SNAPSHOT + 7.75.0-SNAPSHOT che-multiuser-api-permission jar diff --git a/multiuser/api/che-multiuser-api-resource-shared/pom.xml b/multiuser/api/che-multiuser-api-resource-shared/pom.xml index 6794b24719..181044f412 100644 --- a/multiuser/api/che-multiuser-api-resource-shared/pom.xml +++ b/multiuser/api/che-multiuser-api-resource-shared/pom.xml @@ -17,7 +17,7 @@ che-multiuser-api org.eclipse.che.multiuser - 7.74.0-SNAPSHOT + 7.75.0-SNAPSHOT che-multiuser-api-resource-shared jar diff --git a/multiuser/api/che-multiuser-api-resource/pom.xml b/multiuser/api/che-multiuser-api-resource/pom.xml index 66b70c398f..a093052cd7 100644 --- a/multiuser/api/che-multiuser-api-resource/pom.xml +++ b/multiuser/api/che-multiuser-api-resource/pom.xml @@ -17,7 +17,7 @@ che-multiuser-api org.eclipse.che.multiuser - 7.74.0-SNAPSHOT + 7.75.0-SNAPSHOT che-multiuser-api-resource jar diff --git a/multiuser/api/che-multiuser-api-workspace-activity/pom.xml b/multiuser/api/che-multiuser-api-workspace-activity/pom.xml index 6e294be270..2407e9d542 100644 --- a/multiuser/api/che-multiuser-api-workspace-activity/pom.xml +++ b/multiuser/api/che-multiuser-api-workspace-activity/pom.xml @@ -17,7 +17,7 @@ che-multiuser-api org.eclipse.che.multiuser - 7.74.0-SNAPSHOT + 7.75.0-SNAPSHOT che-multiuser-api-workspace-activity jar diff --git a/multiuser/api/pom.xml b/multiuser/api/pom.xml index 957589ec63..db319f4bfb 100644 --- a/multiuser/api/pom.xml +++ b/multiuser/api/pom.xml @@ -17,7 +17,7 @@ che-multiuser-parent org.eclipse.che.multiuser - 7.74.0-SNAPSHOT + 7.75.0-SNAPSHOT ../pom.xml che-multiuser-api diff --git a/multiuser/integration-tests/che-multiuser-cascade-removal/pom.xml b/multiuser/integration-tests/che-multiuser-cascade-removal/pom.xml index 59202417c5..1d6a254a92 100644 --- a/multiuser/integration-tests/che-multiuser-cascade-removal/pom.xml +++ b/multiuser/integration-tests/che-multiuser-cascade-removal/pom.xml @@ -17,7 +17,7 @@ che-multiuser-integration-tests org.eclipse.che.multiuser - 7.74.0-SNAPSHOT + 7.75.0-SNAPSHOT che-multiuser-cascade-removal jar diff --git a/multiuser/integration-tests/che-multiuser-mysql-tck/pom.xml b/multiuser/integration-tests/che-multiuser-mysql-tck/pom.xml index 91ad5d7877..990ba4989e 100644 --- a/multiuser/integration-tests/che-multiuser-mysql-tck/pom.xml +++ b/multiuser/integration-tests/che-multiuser-mysql-tck/pom.xml @@ -17,7 +17,7 @@ che-multiuser-integration-tests org.eclipse.che.multiuser - 7.74.0-SNAPSHOT + 7.75.0-SNAPSHOT che-multiuser-mysql-tck jar diff --git a/multiuser/integration-tests/che-multiuser-postgresql-tck/pom.xml b/multiuser/integration-tests/che-multiuser-postgresql-tck/pom.xml index 0aa8bcdb34..2368e6092c 100644 --- a/multiuser/integration-tests/che-multiuser-postgresql-tck/pom.xml +++ b/multiuser/integration-tests/che-multiuser-postgresql-tck/pom.xml @@ -17,7 +17,7 @@ che-multiuser-integration-tests org.eclipse.che.multiuser - 7.74.0-SNAPSHOT + 7.75.0-SNAPSHOT che-multiuser-postgresql-tck jar diff --git a/multiuser/integration-tests/pom.xml b/multiuser/integration-tests/pom.xml index 667c7a8af5..4ef514f6ce 100644 --- a/multiuser/integration-tests/pom.xml +++ b/multiuser/integration-tests/pom.xml @@ -17,7 +17,7 @@ che-multiuser-parent org.eclipse.che.multiuser - 7.74.0-SNAPSHOT + 7.75.0-SNAPSHOT che-multiuser-integration-tests pom diff --git a/multiuser/keycloak/che-multiuser-keycloak-server/pom.xml b/multiuser/keycloak/che-multiuser-keycloak-server/pom.xml index eb27db9720..6d68396d4e 100644 --- a/multiuser/keycloak/che-multiuser-keycloak-server/pom.xml +++ b/multiuser/keycloak/che-multiuser-keycloak-server/pom.xml @@ -17,7 +17,7 @@ che-multiuser-keycloak org.eclipse.che.multiuser - 7.74.0-SNAPSHOT + 7.75.0-SNAPSHOT che-multiuser-keycloak-server jar diff --git a/multiuser/keycloak/che-multiuser-keycloak-shared/pom.xml b/multiuser/keycloak/che-multiuser-keycloak-shared/pom.xml index 21565d767b..851ca79f8b 100644 --- a/multiuser/keycloak/che-multiuser-keycloak-shared/pom.xml +++ b/multiuser/keycloak/che-multiuser-keycloak-shared/pom.xml @@ -17,7 +17,7 @@ che-multiuser-keycloak org.eclipse.che.multiuser - 7.74.0-SNAPSHOT + 7.75.0-SNAPSHOT che-multiuser-keycloak-shared jar diff --git a/multiuser/keycloak/che-multiuser-keycloak-token-provider/pom.xml b/multiuser/keycloak/che-multiuser-keycloak-token-provider/pom.xml index 392a95c2af..3dc133ac10 100644 --- a/multiuser/keycloak/che-multiuser-keycloak-token-provider/pom.xml +++ b/multiuser/keycloak/che-multiuser-keycloak-token-provider/pom.xml @@ -17,7 +17,7 @@ che-multiuser-keycloak org.eclipse.che.multiuser - 7.74.0-SNAPSHOT + 7.75.0-SNAPSHOT che-multiuser-keycloak-token-provider Che Multiuser :: Keycloak Token Provider diff --git a/multiuser/keycloak/che-multiuser-keycloak-user-remover/pom.xml b/multiuser/keycloak/che-multiuser-keycloak-user-remover/pom.xml index a6bd3c1a68..7226feb4f6 100644 --- a/multiuser/keycloak/che-multiuser-keycloak-user-remover/pom.xml +++ b/multiuser/keycloak/che-multiuser-keycloak-user-remover/pom.xml @@ -17,7 +17,7 @@ che-multiuser-keycloak org.eclipse.che.multiuser - 7.74.0-SNAPSHOT + 7.75.0-SNAPSHOT che-multiuser-keycloak-user-remover jar diff --git a/multiuser/keycloak/pom.xml b/multiuser/keycloak/pom.xml index 553d63536a..904e89acdc 100644 --- a/multiuser/keycloak/pom.xml +++ b/multiuser/keycloak/pom.xml @@ -17,7 +17,7 @@ che-multiuser-parent org.eclipse.che.multiuser - 7.74.0-SNAPSHOT + 7.75.0-SNAPSHOT ../pom.xml che-multiuser-keycloak diff --git a/multiuser/machine-auth/che-multiuser-machine-authentication-shared/pom.xml b/multiuser/machine-auth/che-multiuser-machine-authentication-shared/pom.xml index 644c8840d8..14aba9336d 100644 --- a/multiuser/machine-auth/che-multiuser-machine-authentication-shared/pom.xml +++ b/multiuser/machine-auth/che-multiuser-machine-authentication-shared/pom.xml @@ -17,7 +17,7 @@ che-multiuser-machine-auth org.eclipse.che.multiuser - 7.74.0-SNAPSHOT + 7.75.0-SNAPSHOT che-multiuser-machine-authentication-shared jar diff --git a/multiuser/machine-auth/che-multiuser-machine-authentication/pom.xml b/multiuser/machine-auth/che-multiuser-machine-authentication/pom.xml index 9ec6ffdad2..773bcff6c5 100644 --- a/multiuser/machine-auth/che-multiuser-machine-authentication/pom.xml +++ b/multiuser/machine-auth/che-multiuser-machine-authentication/pom.xml @@ -17,7 +17,7 @@ che-multiuser-machine-auth org.eclipse.che.multiuser - 7.74.0-SNAPSHOT + 7.75.0-SNAPSHOT che-multiuser-machine-authentication jar diff --git a/multiuser/machine-auth/pom.xml b/multiuser/machine-auth/pom.xml index f129c5321f..c38fcc1e40 100644 --- a/multiuser/machine-auth/pom.xml +++ b/multiuser/machine-auth/pom.xml @@ -17,7 +17,7 @@ che-multiuser-parent org.eclipse.che.multiuser - 7.74.0-SNAPSHOT + 7.75.0-SNAPSHOT ../pom.xml che-multiuser-machine-auth diff --git a/multiuser/oidc/pom.xml b/multiuser/oidc/pom.xml index c2aa2da352..1baf320a1e 100644 --- a/multiuser/oidc/pom.xml +++ b/multiuser/oidc/pom.xml @@ -17,7 +17,7 @@ che-multiuser-parent org.eclipse.che.multiuser - 7.74.0-SNAPSHOT + 7.75.0-SNAPSHOT che-multiuser-oidc jar diff --git a/multiuser/permission/che-multiuser-permission-devfile/pom.xml b/multiuser/permission/che-multiuser-permission-devfile/pom.xml index c39e655c3f..0d3659181e 100644 --- a/multiuser/permission/che-multiuser-permission-devfile/pom.xml +++ b/multiuser/permission/che-multiuser-permission-devfile/pom.xml @@ -17,7 +17,7 @@ che-multiuser-permission org.eclipse.che.multiuser - 7.74.0-SNAPSHOT + 7.75.0-SNAPSHOT che-multiuser-permission-devfile Che Multiuser :: Devfile Permissions diff --git a/multiuser/permission/che-multiuser-permission-logger/pom.xml b/multiuser/permission/che-multiuser-permission-logger/pom.xml index cbf314d12c..ce8699e8d2 100644 --- a/multiuser/permission/che-multiuser-permission-logger/pom.xml +++ b/multiuser/permission/che-multiuser-permission-logger/pom.xml @@ -17,7 +17,7 @@ che-multiuser-permission org.eclipse.che.multiuser - 7.74.0-SNAPSHOT + 7.75.0-SNAPSHOT che-multiuser-permission-logger Che Multiuser :: Logger Permissions diff --git a/multiuser/permission/che-multiuser-permission-resource/pom.xml b/multiuser/permission/che-multiuser-permission-resource/pom.xml index da6194cb9f..a5294a511d 100644 --- a/multiuser/permission/che-multiuser-permission-resource/pom.xml +++ b/multiuser/permission/che-multiuser-permission-resource/pom.xml @@ -17,7 +17,7 @@ che-multiuser-permission org.eclipse.che.multiuser - 7.74.0-SNAPSHOT + 7.75.0-SNAPSHOT che-multiuser-permission-resource Che Multiuser :: Resource :: Permissions diff --git a/multiuser/permission/che-multiuser-permission-system/pom.xml b/multiuser/permission/che-multiuser-permission-system/pom.xml index a420a1cb12..4dc62ecc03 100644 --- a/multiuser/permission/che-multiuser-permission-system/pom.xml +++ b/multiuser/permission/che-multiuser-permission-system/pom.xml @@ -17,7 +17,7 @@ che-multiuser-permission org.eclipse.che.multiuser - 7.74.0-SNAPSHOT + 7.75.0-SNAPSHOT che-multiuser-permission-system Che Multiuser :: System Permissions diff --git a/multiuser/permission/che-multiuser-permission-user/pom.xml b/multiuser/permission/che-multiuser-permission-user/pom.xml index c013ab9aed..cec6e34c85 100644 --- a/multiuser/permission/che-multiuser-permission-user/pom.xml +++ b/multiuser/permission/che-multiuser-permission-user/pom.xml @@ -17,7 +17,7 @@ che-multiuser-permission org.eclipse.che.multiuser - 7.74.0-SNAPSHOT + 7.75.0-SNAPSHOT che-multiuser-permission-user Che Multiuser :: User Permissions diff --git a/multiuser/permission/che-multiuser-permission-workspace-activity/pom.xml b/multiuser/permission/che-multiuser-permission-workspace-activity/pom.xml index 61fca5dffb..e496cd0912 100644 --- a/multiuser/permission/che-multiuser-permission-workspace-activity/pom.xml +++ b/multiuser/permission/che-multiuser-permission-workspace-activity/pom.xml @@ -17,7 +17,7 @@ che-multiuser-permission org.eclipse.che.multiuser - 7.74.0-SNAPSHOT + 7.75.0-SNAPSHOT che-multiuser-permission-workspace-activity Che Multiuser :: Workspace Activity Permissions diff --git a/multiuser/permission/che-multiuser-permission-workspace/pom.xml b/multiuser/permission/che-multiuser-permission-workspace/pom.xml index 80c0ae16fe..68aaf53f7b 100644 --- a/multiuser/permission/che-multiuser-permission-workspace/pom.xml +++ b/multiuser/permission/che-multiuser-permission-workspace/pom.xml @@ -17,7 +17,7 @@ che-multiuser-permission org.eclipse.che.multiuser - 7.74.0-SNAPSHOT + 7.75.0-SNAPSHOT che-multiuser-permission-workspace Che Multiuser :: Workspace Permissions diff --git a/multiuser/permission/pom.xml b/multiuser/permission/pom.xml index eed4ae3975..3b5181177b 100644 --- a/multiuser/permission/pom.xml +++ b/multiuser/permission/pom.xml @@ -17,7 +17,7 @@ che-multiuser-parent org.eclipse.che.multiuser - 7.74.0-SNAPSHOT + 7.75.0-SNAPSHOT ../pom.xml che-multiuser-permission diff --git a/multiuser/personal-account/pom.xml b/multiuser/personal-account/pom.xml index a582250ae5..096389ccd7 100644 --- a/multiuser/personal-account/pom.xml +++ b/multiuser/personal-account/pom.xml @@ -17,7 +17,7 @@ che-multiuser-parent org.eclipse.che.multiuser - 7.74.0-SNAPSHOT + 7.75.0-SNAPSHOT che-multiuser-personal-account jar diff --git a/multiuser/pom.xml b/multiuser/pom.xml index 0fa4cade6f..57e3aad284 100644 --- a/multiuser/pom.xml +++ b/multiuser/pom.xml @@ -17,7 +17,7 @@ che-server org.eclipse.che - 7.74.0-SNAPSHOT + 7.75.0-SNAPSHOT ../pom.xml org.eclipse.che.multiuser diff --git a/multiuser/sql-schema/pom.xml b/multiuser/sql-schema/pom.xml index b8379a3215..0fe0967700 100644 --- a/multiuser/sql-schema/pom.xml +++ b/multiuser/sql-schema/pom.xml @@ -17,7 +17,7 @@ che-multiuser-parent org.eclipse.che.multiuser - 7.74.0-SNAPSHOT + 7.75.0-SNAPSHOT ../pom.xml che-multiuser-sql-schema diff --git a/pom.xml b/pom.xml index 93d2b0e19a..ffc0d49db6 100644 --- a/pom.xml +++ b/pom.xml @@ -16,7 +16,7 @@ 4.0.0 org.eclipse.che che-server - 7.74.0-SNAPSHOT + 7.75.0-SNAPSHOT pom Che Server Eclipse Che Server @@ -100,7 +100,7 @@ Red Hat, Inc. - initial API and implementation ${project.version} - 7.74.0-SNAPSHOT + 7.75.0-SNAPSHOT 1.0-beta2 Red Hat, Inc. diff --git a/typescript-dto/dto-pom.xml b/typescript-dto/dto-pom.xml index 72457d72c9..a4594765d6 100644 --- a/typescript-dto/dto-pom.xml +++ b/typescript-dto/dto-pom.xml @@ -23,7 +23,7 @@ pom Che TypeScript DTO - 7.74.0-SNAPSHOT + 7.75.0-SNAPSHOT diff --git a/wsmaster/che-core-api-account/pom.xml b/wsmaster/che-core-api-account/pom.xml index 23b5de9401..17aa856799 100644 --- a/wsmaster/che-core-api-account/pom.xml +++ b/wsmaster/che-core-api-account/pom.xml @@ -17,7 +17,7 @@ che-master-parent org.eclipse.che.core - 7.74.0-SNAPSHOT + 7.75.0-SNAPSHOT che-core-api-account Che Core :: API :: Account diff --git a/wsmaster/che-core-api-auth-azure-devops/pom.xml b/wsmaster/che-core-api-auth-azure-devops/pom.xml index 127576967a..cdc830a937 100644 --- a/wsmaster/che-core-api-auth-azure-devops/pom.xml +++ b/wsmaster/che-core-api-auth-azure-devops/pom.xml @@ -17,7 +17,7 @@ che-master-parent org.eclipse.che.core - 7.74.0-SNAPSHOT + 7.75.0-SNAPSHOT che-core-api-auth-azure-devops jar diff --git a/wsmaster/che-core-api-auth-bitbucket/pom.xml b/wsmaster/che-core-api-auth-bitbucket/pom.xml index d32dc40adc..f60f284967 100644 --- a/wsmaster/che-core-api-auth-bitbucket/pom.xml +++ b/wsmaster/che-core-api-auth-bitbucket/pom.xml @@ -17,7 +17,7 @@ che-master-parent org.eclipse.che.core - 7.74.0-SNAPSHOT + 7.75.0-SNAPSHOT che-core-api-auth-bitbucket jar diff --git a/wsmaster/che-core-api-auth-github/pom.xml b/wsmaster/che-core-api-auth-github/pom.xml index 04b1abe27b..1d7b8a4bdc 100644 --- a/wsmaster/che-core-api-auth-github/pom.xml +++ b/wsmaster/che-core-api-auth-github/pom.xml @@ -17,7 +17,7 @@ che-master-parent org.eclipse.che.core - 7.74.0-SNAPSHOT + 7.75.0-SNAPSHOT che-core-api-auth-github jar diff --git a/wsmaster/che-core-api-auth-gitlab/pom.xml b/wsmaster/che-core-api-auth-gitlab/pom.xml index dba9b53e2d..215695cfb7 100644 --- a/wsmaster/che-core-api-auth-gitlab/pom.xml +++ b/wsmaster/che-core-api-auth-gitlab/pom.xml @@ -17,7 +17,7 @@ che-master-parent org.eclipse.che.core - 7.74.0-SNAPSHOT + 7.75.0-SNAPSHOT che-core-api-auth-gitlab jar diff --git a/wsmaster/che-core-api-auth-openshift/pom.xml b/wsmaster/che-core-api-auth-openshift/pom.xml index 7fbdd86461..fa7dfb1022 100644 --- a/wsmaster/che-core-api-auth-openshift/pom.xml +++ b/wsmaster/che-core-api-auth-openshift/pom.xml @@ -17,7 +17,7 @@ che-master-parent org.eclipse.che.core - 7.74.0-SNAPSHOT + 7.75.0-SNAPSHOT che-core-api-auth-openshift jar diff --git a/wsmaster/che-core-api-auth-shared/pom.xml b/wsmaster/che-core-api-auth-shared/pom.xml index f084f62b11..bc005ffc46 100644 --- a/wsmaster/che-core-api-auth-shared/pom.xml +++ b/wsmaster/che-core-api-auth-shared/pom.xml @@ -17,7 +17,7 @@ che-master-parent org.eclipse.che.core - 7.74.0-SNAPSHOT + 7.75.0-SNAPSHOT che-core-api-auth-shared jar diff --git a/wsmaster/che-core-api-auth/pom.xml b/wsmaster/che-core-api-auth/pom.xml index f01db0df93..364b463dd1 100644 --- a/wsmaster/che-core-api-auth/pom.xml +++ b/wsmaster/che-core-api-auth/pom.xml @@ -17,7 +17,7 @@ che-master-parent org.eclipse.che.core - 7.74.0-SNAPSHOT + 7.75.0-SNAPSHOT che-core-api-auth jar diff --git a/wsmaster/che-core-api-devfile-shared/pom.xml b/wsmaster/che-core-api-devfile-shared/pom.xml index c6ba4a028f..cb38057287 100644 --- a/wsmaster/che-core-api-devfile-shared/pom.xml +++ b/wsmaster/che-core-api-devfile-shared/pom.xml @@ -17,7 +17,7 @@ che-master-parent org.eclipse.che.core - 7.74.0-SNAPSHOT + 7.75.0-SNAPSHOT che-core-api-devfile-shared jar diff --git a/wsmaster/che-core-api-devfile/pom.xml b/wsmaster/che-core-api-devfile/pom.xml index 825ec71401..e0d31f582e 100644 --- a/wsmaster/che-core-api-devfile/pom.xml +++ b/wsmaster/che-core-api-devfile/pom.xml @@ -17,7 +17,7 @@ che-master-parent org.eclipse.che.core - 7.74.0-SNAPSHOT + 7.75.0-SNAPSHOT che-core-api-devfile jar diff --git a/wsmaster/che-core-api-factory-azure-devops/pom.xml b/wsmaster/che-core-api-factory-azure-devops/pom.xml index 2ce181bfc6..534cfd26b2 100644 --- a/wsmaster/che-core-api-factory-azure-devops/pom.xml +++ b/wsmaster/che-core-api-factory-azure-devops/pom.xml @@ -17,7 +17,7 @@ che-master-parent org.eclipse.che.core - 7.74.0-SNAPSHOT + 7.75.0-SNAPSHOT che-core-api-factory-azure-devops jar diff --git a/wsmaster/che-core-api-factory-bitbucket-server/pom.xml b/wsmaster/che-core-api-factory-bitbucket-server/pom.xml index c35f13660d..cb848a2096 100644 --- a/wsmaster/che-core-api-factory-bitbucket-server/pom.xml +++ b/wsmaster/che-core-api-factory-bitbucket-server/pom.xml @@ -17,7 +17,7 @@ che-master-parent org.eclipse.che.core - 7.74.0-SNAPSHOT + 7.75.0-SNAPSHOT che-core-api-factory-bitbucket-server jar diff --git a/wsmaster/che-core-api-factory-bitbucket/pom.xml b/wsmaster/che-core-api-factory-bitbucket/pom.xml index 780b5f5c93..c98ed177e3 100644 --- a/wsmaster/che-core-api-factory-bitbucket/pom.xml +++ b/wsmaster/che-core-api-factory-bitbucket/pom.xml @@ -17,7 +17,7 @@ che-master-parent org.eclipse.che.core - 7.74.0-SNAPSHOT + 7.75.0-SNAPSHOT che-core-api-factory-bitbucket jar diff --git a/wsmaster/che-core-api-factory-github/pom.xml b/wsmaster/che-core-api-factory-github/pom.xml index b40040bdaf..2912b85fe1 100644 --- a/wsmaster/che-core-api-factory-github/pom.xml +++ b/wsmaster/che-core-api-factory-github/pom.xml @@ -17,7 +17,7 @@ che-master-parent org.eclipse.che.core - 7.74.0-SNAPSHOT + 7.75.0-SNAPSHOT che-core-api-factory-github jar diff --git a/wsmaster/che-core-api-factory-gitlab/pom.xml b/wsmaster/che-core-api-factory-gitlab/pom.xml index 4a85797e4f..aa5767c0c9 100644 --- a/wsmaster/che-core-api-factory-gitlab/pom.xml +++ b/wsmaster/che-core-api-factory-gitlab/pom.xml @@ -17,7 +17,7 @@ che-master-parent org.eclipse.che.core - 7.74.0-SNAPSHOT + 7.75.0-SNAPSHOT che-core-api-factory-gitlab jar diff --git a/wsmaster/che-core-api-factory-shared/pom.xml b/wsmaster/che-core-api-factory-shared/pom.xml index 8877b08d2e..ce212b3c04 100644 --- a/wsmaster/che-core-api-factory-shared/pom.xml +++ b/wsmaster/che-core-api-factory-shared/pom.xml @@ -17,7 +17,7 @@ che-master-parent org.eclipse.che.core - 7.74.0-SNAPSHOT + 7.75.0-SNAPSHOT che-core-api-factory-shared jar diff --git a/wsmaster/che-core-api-factory/pom.xml b/wsmaster/che-core-api-factory/pom.xml index 737e26c30d..56b06fe743 100644 --- a/wsmaster/che-core-api-factory/pom.xml +++ b/wsmaster/che-core-api-factory/pom.xml @@ -17,7 +17,7 @@ che-master-parent org.eclipse.che.core - 7.74.0-SNAPSHOT + 7.75.0-SNAPSHOT che-core-api-factory jar diff --git a/wsmaster/che-core-api-logger-shared/pom.xml b/wsmaster/che-core-api-logger-shared/pom.xml index a27060dd51..7413f2d148 100644 --- a/wsmaster/che-core-api-logger-shared/pom.xml +++ b/wsmaster/che-core-api-logger-shared/pom.xml @@ -17,7 +17,7 @@ che-master-parent org.eclipse.che.core - 7.74.0-SNAPSHOT + 7.75.0-SNAPSHOT che-core-api-logger-shared jar diff --git a/wsmaster/che-core-api-logger/pom.xml b/wsmaster/che-core-api-logger/pom.xml index c2a20596c6..11b64a9b4a 100644 --- a/wsmaster/che-core-api-logger/pom.xml +++ b/wsmaster/che-core-api-logger/pom.xml @@ -17,7 +17,7 @@ che-master-parent org.eclipse.che.core - 7.74.0-SNAPSHOT + 7.75.0-SNAPSHOT che-core-api-logger jar diff --git a/wsmaster/che-core-api-metrics/pom.xml b/wsmaster/che-core-api-metrics/pom.xml index 008ba93c7b..5a613a3d37 100644 --- a/wsmaster/che-core-api-metrics/pom.xml +++ b/wsmaster/che-core-api-metrics/pom.xml @@ -17,7 +17,7 @@ che-master-parent org.eclipse.che.core - 7.74.0-SNAPSHOT + 7.75.0-SNAPSHOT che-core-api-metrics jar diff --git a/wsmaster/che-core-api-ssh-shared/pom.xml b/wsmaster/che-core-api-ssh-shared/pom.xml index 38d0c4ebf5..bfd4e51621 100644 --- a/wsmaster/che-core-api-ssh-shared/pom.xml +++ b/wsmaster/che-core-api-ssh-shared/pom.xml @@ -17,7 +17,7 @@ che-master-parent org.eclipse.che.core - 7.74.0-SNAPSHOT + 7.75.0-SNAPSHOT che-core-api-ssh-shared jar diff --git a/wsmaster/che-core-api-ssh/pom.xml b/wsmaster/che-core-api-ssh/pom.xml index 7510df7e55..159fc3b254 100644 --- a/wsmaster/che-core-api-ssh/pom.xml +++ b/wsmaster/che-core-api-ssh/pom.xml @@ -17,7 +17,7 @@ che-master-parent org.eclipse.che.core - 7.74.0-SNAPSHOT + 7.75.0-SNAPSHOT che-core-api-ssh jar diff --git a/wsmaster/che-core-api-system-shared/pom.xml b/wsmaster/che-core-api-system-shared/pom.xml index 04e878756c..60514b9525 100644 --- a/wsmaster/che-core-api-system-shared/pom.xml +++ b/wsmaster/che-core-api-system-shared/pom.xml @@ -17,7 +17,7 @@ che-master-parent org.eclipse.che.core - 7.74.0-SNAPSHOT + 7.75.0-SNAPSHOT che-core-api-system-shared jar diff --git a/wsmaster/che-core-api-system/pom.xml b/wsmaster/che-core-api-system/pom.xml index 2c3f8d44cd..48387d7739 100644 --- a/wsmaster/che-core-api-system/pom.xml +++ b/wsmaster/che-core-api-system/pom.xml @@ -17,7 +17,7 @@ che-master-parent org.eclipse.che.core - 7.74.0-SNAPSHOT + 7.75.0-SNAPSHOT che-core-api-system jar diff --git a/wsmaster/che-core-api-user-shared/pom.xml b/wsmaster/che-core-api-user-shared/pom.xml index 93dd04b885..4ee5e04054 100644 --- a/wsmaster/che-core-api-user-shared/pom.xml +++ b/wsmaster/che-core-api-user-shared/pom.xml @@ -17,7 +17,7 @@ che-master-parent org.eclipse.che.core - 7.74.0-SNAPSHOT + 7.75.0-SNAPSHOT che-core-api-user-shared Che Core :: API :: User :: Shared diff --git a/wsmaster/che-core-api-user/pom.xml b/wsmaster/che-core-api-user/pom.xml index 4e60130ac0..9e6cdfd0b8 100644 --- a/wsmaster/che-core-api-user/pom.xml +++ b/wsmaster/che-core-api-user/pom.xml @@ -17,7 +17,7 @@ che-master-parent org.eclipse.che.core - 7.74.0-SNAPSHOT + 7.75.0-SNAPSHOT che-core-api-user Che Core :: API :: User diff --git a/wsmaster/che-core-api-workspace-activity/pom.xml b/wsmaster/che-core-api-workspace-activity/pom.xml index 0c8dfd9df5..7b694ef885 100644 --- a/wsmaster/che-core-api-workspace-activity/pom.xml +++ b/wsmaster/che-core-api-workspace-activity/pom.xml @@ -17,7 +17,7 @@ che-master-parent org.eclipse.che.core - 7.74.0-SNAPSHOT + 7.75.0-SNAPSHOT che-core-api-workspace-activity jar diff --git a/wsmaster/che-core-api-workspace-shared/pom.xml b/wsmaster/che-core-api-workspace-shared/pom.xml index a4fb61b895..c52e8c933d 100644 --- a/wsmaster/che-core-api-workspace-shared/pom.xml +++ b/wsmaster/che-core-api-workspace-shared/pom.xml @@ -17,7 +17,7 @@ che-master-parent org.eclipse.che.core - 7.74.0-SNAPSHOT + 7.75.0-SNAPSHOT che-core-api-workspace-shared jar diff --git a/wsmaster/che-core-api-workspace/pom.xml b/wsmaster/che-core-api-workspace/pom.xml index a95c0f98ba..86c66872a3 100644 --- a/wsmaster/che-core-api-workspace/pom.xml +++ b/wsmaster/che-core-api-workspace/pom.xml @@ -17,7 +17,7 @@ che-master-parent org.eclipse.che.core - 7.74.0-SNAPSHOT + 7.75.0-SNAPSHOT che-core-api-workspace jar diff --git a/wsmaster/che-core-sql-schema/pom.xml b/wsmaster/che-core-sql-schema/pom.xml index c40e1adef5..022e567ccc 100644 --- a/wsmaster/che-core-sql-schema/pom.xml +++ b/wsmaster/che-core-sql-schema/pom.xml @@ -17,7 +17,7 @@ che-master-parent org.eclipse.che.core - 7.74.0-SNAPSHOT + 7.75.0-SNAPSHOT che-core-sql-schema Che Core :: SQL :: Schema diff --git a/wsmaster/integration-tests/cascade-removal/pom.xml b/wsmaster/integration-tests/cascade-removal/pom.xml index a99e5f093c..de24f8b897 100644 --- a/wsmaster/integration-tests/cascade-removal/pom.xml +++ b/wsmaster/integration-tests/cascade-removal/pom.xml @@ -17,7 +17,7 @@ integration-tests-parent org.eclipse.che.core - 7.74.0-SNAPSHOT + 7.75.0-SNAPSHOT cascade-removal Integration Tests :: Cascade Removal diff --git a/wsmaster/integration-tests/mysql-tck/pom.xml b/wsmaster/integration-tests/mysql-tck/pom.xml index a283748387..1e7e527738 100644 --- a/wsmaster/integration-tests/mysql-tck/pom.xml +++ b/wsmaster/integration-tests/mysql-tck/pom.xml @@ -17,7 +17,7 @@ integration-tests-parent org.eclipse.che.core - 7.74.0-SNAPSHOT + 7.75.0-SNAPSHOT mysql-tck jar diff --git a/wsmaster/integration-tests/pom.xml b/wsmaster/integration-tests/pom.xml index 07c5acfd7a..62bc04171d 100644 --- a/wsmaster/integration-tests/pom.xml +++ b/wsmaster/integration-tests/pom.xml @@ -17,7 +17,7 @@ che-master-parent org.eclipse.che.core - 7.74.0-SNAPSHOT + 7.75.0-SNAPSHOT ../pom.xml integration-tests-parent diff --git a/wsmaster/integration-tests/postgresql-tck/pom.xml b/wsmaster/integration-tests/postgresql-tck/pom.xml index e588a526d0..24c18b6bae 100644 --- a/wsmaster/integration-tests/postgresql-tck/pom.xml +++ b/wsmaster/integration-tests/postgresql-tck/pom.xml @@ -17,7 +17,7 @@ integration-tests-parent org.eclipse.che.core - 7.74.0-SNAPSHOT + 7.75.0-SNAPSHOT postgresql-tck jar diff --git a/wsmaster/pom.xml b/wsmaster/pom.xml index 80a43b0902..8ebb3cb90f 100644 --- a/wsmaster/pom.xml +++ b/wsmaster/pom.xml @@ -17,7 +17,7 @@ che-core-parent org.eclipse.che.core - 7.74.0-SNAPSHOT + 7.75.0-SNAPSHOT ../core/pom.xml che-master-parent From 74924f84ae33662b8d6b4afe9ec664ae235aa06f Mon Sep 17 00:00:00 2001 From: Nick Boldt Date: Tue, 12 Sep 2023 09:17:48 -0300 Subject: [PATCH 58/75] chore: tweak dockerfile; (#560) use latest ocp 4.12 oc binary; fix typo in pom.xml bump to latest mavn 3.9.4 Change-Id: Ie9d9aea49e7e46bec4814477489450b277f926b4 Signed-off-by: Nick Boldt --- .ci/openshift-ci/Dockerfile | 22 ++++++++++++---------- README.md | 2 +- pom.xml | 12 ++++++------ 3 files changed, 19 insertions(+), 17 deletions(-) diff --git a/.ci/openshift-ci/Dockerfile b/.ci/openshift-ci/Dockerfile index 0ceedc09d6..718fd06652 100644 --- a/.ci/openshift-ci/Dockerfile +++ b/.ci/openshift-ci/Dockerfile @@ -11,28 +11,30 @@ # Red Hat, Inc. - initial API and implementation # Dockerfile to bootstrap build and test in openshift-ci - FROM registry.access.redhat.com/ubi9/nodejs-18:1 - -SHELL ["/bin/bash", "-c"] - +# hadolint ignore=DL3002 USER 0 # Install yq, kubectl, chectl cli used by olm/olm.sh script. -RUN dnf install -y psmisc nodejs-devel nodejs-libs -q --allowerasing --nobest \ +# hadolint ignore=DL3041 +RUN dnf install -y -q --allowerasing --nobest nodejs-devel nodejs-libs psmisc python3-pip jq golang httpd-tools \ # already installed or installed as deps: openssl openssl-devel ca-certificates make cmake cpp gcc gcc-c++ zlib zlib-devel brotli brotli-devel python3 nodejs-packaging && \ dnf update -y && dnf clean all && \ npm install -g yarn@1.22 npm@9 && \ echo -n "node version: "; node -v; \ echo -n "npm version: "; npm -v; \ - echo -n "yarn version: "; yarn -v && \ - yum install --assumeyes -d1 python3-pip httpd-tools && \ - pip3 install --upgrade setuptools && \ - pip3 install yq && \ + echo -n "yarn version: "; yarn -v; \ + go version; \ + pip3 install --upgrade pip setuptools yq && \ + + # Install kubectl, chectl cli used by olm/olm.sh script. curl -LO https://storage.googleapis.com/kubernetes-release/release/$(curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt)/bin/linux/amd64/kubectl && \ chmod +x ./kubectl && \ mv ./kubectl /usr/local/bin && \ bash <(curl -sL https://www.eclipse.org/che/chectl/) --channel=next && \ - curl https://mirror.openshift.com/pub/openshift-v4/clients/ocp/4.12.30/openshift-client-linux.tar.gz | tar xvzf - -C /usr/local/bin/ oc && \ + curl https://mirror.openshift.com/pub/openshift-v4/clients/ocp/latest-4.12/openshift-client-linux.tar.gz | tar xvzf - -C /usr/local/bin/ oc && \ chmod ug+x /usr/local/bin/oc + +SHELL ["/bin/bash", "-c"] + diff --git a/README.md b/README.md index a494bc5d28..9ac58077bf 100644 --- a/README.md +++ b/README.md @@ -25,7 +25,7 @@ Che Server is mostly a Java web application deployed on an Apache Tomcat server Other modules are deprecated and will be removed in the future. # Build requirements -- Apache Maven 3.6.3 or later +- Apache Maven 3.9 or later - JDK 11 - Podman or Docker (required for running integration tests) diff --git a/pom.xml b/pom.xml index ffc0d49db6..a3327d661f 100644 --- a/pom.xml +++ b/pom.xml @@ -137,7 +137,7 @@ 4.4.15 3.3.0 3.6.2 - 3.8.4 + 3.9.4 10.1.6 3.4.1 2.7.10 @@ -558,27 +558,27 @@ org.apache.maven maven-artifact - ${org.apache.maven.verson} + ${org.apache.maven.version} org.apache.maven maven-compat - ${org.apache.maven.verson} + ${org.apache.maven.version} org.apache.maven maven-core - ${org.apache.maven.verson} + ${org.apache.maven.version} org.apache.maven maven-model - ${org.apache.maven.verson} + ${org.apache.maven.version} org.apache.maven maven-plugin-api - ${org.apache.maven.verson} + ${org.apache.maven.version} jsr250-api From f67bbbd52a2b0339890a7d8adc16ac747098c004 Mon Sep 17 00:00:00 2001 From: Anatolii Bazko Date: Tue, 12 Sep 2023 15:45:41 +0200 Subject: [PATCH 59/75] =?UTF-8?q?chore:=20Add=20PR=20check=20for=20BitBuck?= =?UTF-8?q?et=20to=20start=20a=20workspace=20from=20a=20raw=20and=E2=80=A6?= =?UTF-8?q?=20(#558)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * chore: Add PR check for BitBucket to start a workspace from a raw and ssh urls Signed-off-by: Anatolii Bazko --- .ci/openshift-ci/common.sh | 31 +++++++++++++++++ .ci/openshift-ci/ssh-secret.yaml | 15 ++++++++ ...ucket-no-pat-oauth-flow-raw-devfile-url.sh | 32 +++++++++++++++++ ...est-bitbucket-no-pat-oauth-flow-ssh-url.sh | 34 +++++++++++++++++++ 4 files changed, 112 insertions(+) create mode 100644 .ci/openshift-ci/ssh-secret.yaml create mode 100644 .ci/openshift-ci/test-bitbucket-no-pat-oauth-flow-raw-devfile-url.sh create mode 100644 .ci/openshift-ci/test-bitbucket-no-pat-oauth-flow-ssh-url.sh diff --git a/.ci/openshift-ci/common.sh b/.ci/openshift-ci/common.sh index 17b6b1d8e5..ef9cba78ec 100644 --- a/.ci/openshift-ci/common.sh +++ b/.ci/openshift-ci/common.sh @@ -189,6 +189,25 @@ setupPersonalAccessToken() { oc apply -f pat-secret.yaml -n ${USER_CHE_NAMESPACE} } +setupSSHKeyPairs() { + GIT_PRIVATE_KEY=$1 + GIT_PUBLIC_KEY=$2 + + echo "[INFO] Setup SSH Key Pairs Secret" + oc project ${USER_CHE_NAMESPACE} + ENCODED_GIT_PRIVATE_KEY=$(echo "${GIT_PRIVATE_KEY}" | base64 -w 0) + ENCODED_GIT_PUBLIC_KEY=$(echo "${GIT_PUBLIC_KEY}" | base64 -w 0) + cat .ci/openshift-ci/ssh-secret.yaml > ssh-secret.yaml + + # patch the ssh-secret.yaml file + sed -i "s#ssh_private_key#${ENCODED_GIT_PRIVATE_KEY}#g" ssh-secret.yaml + sed -i "s#ssh_public_key#${ENCODED_GIT_PUBLIC_KEY}#g" ssh-secret.yaml + + cat ssh-secret.yaml + + oc apply -f ssh-secret.yaml -n ${USER_CHE_NAMESPACE} +} + runTestWorkspaceWithGitRepoUrl() { WS_NAME=$1 PROJECT_NAME=$2 @@ -314,6 +333,18 @@ testCloneGitRepoWithSetupPat() { { echo "[ERROR] Project file /projects/${PROJECT_NAME}/${YAML_FILE_NAME} should be present." && exit 1; } } +testCloneGitRepoProjectShouldExists() { + WS_NAME=$1 + PROJECT_NAME=$2 + GIT_REPO_URL=$3 + OCP_USER_NAMESPACE=$4 + + runTestWorkspaceWithGitRepoUrl ${WS_NAME} ${PROJECT_NAME} ${GIT_REPO_URL} ${OCP_USER_NAMESPACE} + echo "[INFO] Check the repository is cloned" + testProjectIsCloned ${PROJECT_NAME} ${OCP_USER_NAMESPACE} || \ + { echo "[ERROR] Project file /projects/${PROJECT_NAME}/${YAML_FILE_NAME} should be present." && exit 1; } +} + setupTestEnvironment() { OCP_USER_NAME=$1 diff --git a/.ci/openshift-ci/ssh-secret.yaml b/.ci/openshift-ci/ssh-secret.yaml new file mode 100644 index 0000000000..2e514c796d --- /dev/null +++ b/.ci/openshift-ci/ssh-secret.yaml @@ -0,0 +1,15 @@ +apiVersion: v1 +kind: Secret +metadata: + name: git-ssh-key + annotations: + controller.devfile.io/mount-as: subpath + controller.devfile.io/mount-path: /etc/ssh/ + labels: + controller.devfile.io/mount-to-devworkspace: "true" + controller.devfile.io/watch-secret: "true" +type: Opaque +data: + dwo_ssh_key: ssh_private_key + dwo_ssh_key.pub: ssh_public_key + ssh_config: aG9zdCAqCiAgSWRlbnRpdHlGaWxlIC9ldGMvc3NoL2R3b19zc2hfa2V5CiAgU3RyaWN0SG9zdEtleUNoZWNraW5nID0gbm8K diff --git a/.ci/openshift-ci/test-bitbucket-no-pat-oauth-flow-raw-devfile-url.sh b/.ci/openshift-ci/test-bitbucket-no-pat-oauth-flow-raw-devfile-url.sh new file mode 100644 index 0000000000..b97800a52a --- /dev/null +++ b/.ci/openshift-ci/test-bitbucket-no-pat-oauth-flow-raw-devfile-url.sh @@ -0,0 +1,32 @@ +#!/bin/bash +# +# Copyright (c) 2023 Red Hat, Inc. +# This program and the accompanying materials are made +# available under the terms of the Eclipse Public License 2.0 +# which is available at https://www.eclipse.org/legal/epl-2.0/ +# +# SPDX-License-Identifier: EPL-2.0 +# +# Contributors: +# Red Hat, Inc. - initial API and implementation +# + +# exit immediately when a command fails +set -ex +# only exit with zero if all commands of the pipeline exit successfully +set -o pipefail + +export PUBLIC_REPO_RAW_PATH_URL=${PUBLIC_REPO_RAW_PATH_URL:-"https://bitbucket.org/chepullreq/public-repo/raw/746000bd63a54eaf8ea8aba9dfe6620e5c6c61d7/devfile.yaml"} +export PRIVATE_REPO_RAW_PATH_URL=${PRIVATE_REPO_URL:-"https://bitbucket.org/chepullreq/private-repo/raw/80b183d27c6c533462128b0c092208aad73b2906/devfile.yaml"} + +# import common test functions +SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )" +source "${SCRIPT_DIR}"/common.sh + +trap "catchFinish" EXIT SIGINT + +setupTestEnvironment ${OCP_NON_ADMIN_USER_NAME} +testFactoryResolverNoPatOAuth ${PUBLIC_REPO_RAW_PATH_URL} ${PRIVATE_REPO_RAW_PATH_URL} + +testClonePublicRepoNoPatOAuth ${PUBLIC_REPO_WORKSPACE_NAME} ${PUBLIC_PROJECT_NAME} ${PUBLIC_REPO_RAW_PATH_URL} ${USER_CHE_NAMESPACE} +testClonePrivateRepoNoPatOAuth ${PRIVATE_REPO_WORKSPACE_NAME} ${PRIVATE_PROJECT_NAME} ${PRIVATE_REPO_RAW_PATH_URL} ${USER_CHE_NAMESPACE} diff --git a/.ci/openshift-ci/test-bitbucket-no-pat-oauth-flow-ssh-url.sh b/.ci/openshift-ci/test-bitbucket-no-pat-oauth-flow-ssh-url.sh new file mode 100644 index 0000000000..d64ec38435 --- /dev/null +++ b/.ci/openshift-ci/test-bitbucket-no-pat-oauth-flow-ssh-url.sh @@ -0,0 +1,34 @@ + +#!/bin/bash +# +# Copyright (c) 2023 Red Hat, Inc. +# This program and the accompanying materials are made +# available under the terms of the Eclipse Public License 2.0 +# which is available at https://www.eclipse.org/legal/epl-2.0/ +# +# SPDX-License-Identifier: EPL-2.0 +# +# Contributors: +# Red Hat, Inc. - initial API and implementation +# + +# exit immediately when a command fails +set -ex +# only exit with zero if all commands of the pipeline exit successfully +set -o pipefail + +export PUBLIC_REPO_SSH_URL=${PUBLIC_REPO_SSH_URL:-"git@bitbucket.org:chepullreq/public-repo.git"} +export PRIVATE_REPO_SSH_URL=${PRIVATE_REPO_SSH_URL:-"git@bitbucket.org:chepullreq/private-repo.git"} + +# import common test functions +SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )" +source "${SCRIPT_DIR}"/common.sh + +trap "catchFinish" EXIT SIGINT + +setupTestEnvironment ${OCP_NON_ADMIN_USER_NAME} +setupSSHKeyPairs "${BITBUCKET_PRIVATE_KEY}" "${BITBUCKET_PUBLIC_KEY}" +testFactoryResolverNoPatOAuth ${PUBLIC_REPO_SSH_URL} ${PRIVATE_REPO_SSH_URL} + +testCloneGitRepoProjectShouldExists ${PUBLIC_REPO_WORKSPACE_NAME} ${PUBLIC_PROJECT_NAME} ${PUBLIC_REPO_SSH_URL} ${USER_CHE_NAMESPACE} +testCloneGitRepoProjectShouldExists ${PRIVATE_REPO_WORKSPACE_NAME} ${PRIVATE_PROJECT_NAME} ${PRIVATE_REPO_SSH_URL} ${USER_CHE_NAMESPACE} From 3bac40d2a381d002befb0012fc276fae07593661 Mon Sep 17 00:00:00 2001 From: Anatolii Bazko Date: Thu, 14 Sep 2023 10:12:58 +0200 Subject: [PATCH 60/75] =?UTF-8?q?chore:=20Add=20PR=20checks=20to=20test=20?= =?UTF-8?q?workspace=20startup=20from=20raw=20devfile=20and=20s=E2=80=A6?= =?UTF-8?q?=20(#562)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * chore: Add PR checks to test workspace startup from raw devfile and ssh urls for GitHub provider Signed-off-by: Anatolii Bazko --- .ci/openshift-ci/common.sh | 46 +++++-------------- .../test-azure-no-pat-oauth-flow.sh | 6 ++- .../test-azure-with-pat-setup-flow.sh | 4 +- ...ucket-no-pat-oauth-flow-raw-devfile-url.sh | 7 ++- ...est-bitbucket-no-pat-oauth-flow-ssh-url.sh | 2 + .../test-bitbucket-no-pat-oauth-flow.sh | 6 ++- ...ithub-no-pat-oauth-flow-raw-devfile-url.sh | 36 +++++++++++++++ .../test-github-no-pat-oauth-flow-ssh-url.sh | 36 +++++++++++++++ .../test-github-no-pat-oauth-flow.sh | 6 ++- .../test-github-with-pat-setup-flow.sh | 4 +- .../test-gitlab-no-pat-oauth-flow.sh | 6 ++- .../test-gitlab-with-pat-setup-flow.sh | 4 +- 12 files changed, 112 insertions(+), 51 deletions(-) create mode 100644 .ci/openshift-ci/test-github-no-pat-oauth-flow-raw-devfile-url.sh create mode 100644 .ci/openshift-ci/test-github-no-pat-oauth-flow-ssh-url.sh diff --git a/.ci/openshift-ci/common.sh b/.ci/openshift-ci/common.sh index ef9cba78ec..d8d4a9ab40 100644 --- a/.ci/openshift-ci/common.sh +++ b/.ci/openshift-ci/common.sh @@ -295,44 +295,20 @@ collectEclipseCheLogs() { oc get checluster -o yaml -n $CHE_NAMESPACE > "${ARTIFACTS_DIR}/che-cluster.yaml" } -testClonePublicRepoNoPatOAuth() { - WS_NAME=$1 - PROJECT_NAME=$2 - GIT_REPO_URL=$3 - OCP_USER_NAMESPACE=$4 +testCloneGitRepoNoProjectExists() { + WS_NAME=$1 + PROJECT_NAME=$2 + GIT_REPO_URL=$3 + OCP_USER_NAMESPACE=$4 - runTestWorkspaceWithGitRepoUrl ${WS_NAME} ${PROJECT_NAME} ${GIT_REPO_URL} ${OCP_USER_NAMESPACE} - echo "[INFO] Check the public repository is cloned with NO PAT/OAuth setup" - testProjectIsCloned ${PROJECT_NAME} ${OCP_USER_NAMESPACE} || \ - { echo "[ERROR] Project file /projects/${PROJECT_NAME}/${YAML_FILE_NAME} should be present." && exit 1; } - deleteTestWorkspace ${WS_NAME} ${OCP_USER_NAMESPACE} -} - -testClonePrivateRepoNoPatOAuth() { - WS_NAME=$1 - PROJECT_NAME=$2 - GIT_REPO_URL=$3 - OCP_USER_NAMESPACE=$4 - - runTestWorkspaceWithGitRepoUrl ${WS_NAME} ${PROJECT_NAME} ${GIT_REPO_URL} ${OCP_USER_NAMESPACE} - echo "[INFO] Check the private repository is NOT cloned with NO PAT/OAuth setup" - testProjectIsCloned ${PROJECT_NAME} ${OCP_USER_NAMESPACE} && \ - { echo "[ERROR] Project file /projects/${PROJECT_NAME}/${YAML_FILE_NAME} should NOT be present" && exit 1; } - echo "[INFO] Project file /projects/${PROJECT_NAME}/${YAML_FILE_NAME} is NOT present. This is EXPECTED" - deleteTestWorkspace ${WS_NAME} ${OCP_USER_NAMESPACE} -} - -testCloneGitRepoWithSetupPat() { - WS_NAME=$1 - PROJECT_NAME=$2 - GIT_REPO_URL=$3 - OCP_USER_NAMESPACE=$4 - - runTestWorkspaceWithGitRepoUrl ${WS_NAME} ${PROJECT_NAME} ${GIT_REPO_URL} ${OCP_USER_NAMESPACE} - testProjectIsCloned ${PROJECT_NAME} ${OCP_USER_NAMESPACE} || \ - { echo "[ERROR] Project file /projects/${PROJECT_NAME}/${YAML_FILE_NAME} should be present." && exit 1; } + runTestWorkspaceWithGitRepoUrl ${WS_NAME} ${PROJECT_NAME} ${GIT_REPO_URL} ${OCP_USER_NAMESPACE} + echo "[INFO] Check the private repository is NOT cloned with NO PAT/OAuth setup" + testProjectIsCloned ${PROJECT_NAME} ${OCP_USER_NAMESPACE} && \ + { echo "[ERROR] Project file /projects/${PROJECT_NAME}/${YAML_FILE_NAME} should NOT be present" && exit 1; } + echo "[INFO] Project file /projects/${PROJECT_NAME}/${YAML_FILE_NAME} is NOT present. This is EXPECTED" } +# Test that the repository is cloned when PAT, OAuth or SSH is configured testCloneGitRepoProjectShouldExists() { WS_NAME=$1 PROJECT_NAME=$2 diff --git a/.ci/openshift-ci/test-azure-no-pat-oauth-flow.sh b/.ci/openshift-ci/test-azure-no-pat-oauth-flow.sh index 96ff2b2f43..a6268176ca 100644 --- a/.ci/openshift-ci/test-azure-no-pat-oauth-flow.sh +++ b/.ci/openshift-ci/test-azure-no-pat-oauth-flow.sh @@ -28,5 +28,7 @@ trap "catchFinish" EXIT SIGINT setupTestEnvironment ${OCP_NON_ADMIN_USER_NAME} # due to the issue https://github.com/eclipse/che/issues/22469 # testFactoryResolverNoPatOAuth ${PUBLIC_REPO_URL} ${PRIVATE_REPO_URL} -testClonePublicRepoNoPatOAuth ${PUBLIC_REPO_WORKSPACE_NAME} ${PUBLIC_PROJECT_NAME} ${PUBLIC_REPO_URL} ${USER_CHE_NAMESPACE} -testClonePrivateRepoNoPatOAuth ${PRIVATE_REPO_WORKSPACE_NAME} ${PRIVATE_PROJECT_NAME} ${PRIVATE_REPO_URL} ${USER_CHE_NAMESPACE} +testCloneGitRepoProjectShouldExists ${PUBLIC_REPO_WORKSPACE_NAME} ${PUBLIC_PROJECT_NAME} ${PUBLIC_REPO_URL} ${USER_CHE_NAMESPACE} +deleteTestWorkspace ${PUBLIC_REPO_WORKSPACE_NAME} ${USER_CHE_NAMESPACE} +testCloneGitRepoNoProjectExists ${PRIVATE_REPO_WORKSPACE_NAME} ${PRIVATE_PROJECT_NAME} ${PRIVATE_REPO_URL} ${USER_CHE_NAMESPACE} +deleteTestWorkspace ${PRIVATE_REPO_WORKSPACE_NAME} ${USER_CHE_NAMESPACE} diff --git a/.ci/openshift-ci/test-azure-with-pat-setup-flow.sh b/.ci/openshift-ci/test-azure-with-pat-setup-flow.sh index 2638864dda..bc69772ca7 100644 --- a/.ci/openshift-ci/test-azure-with-pat-setup-flow.sh +++ b/.ci/openshift-ci/test-azure-with-pat-setup-flow.sh @@ -32,10 +32,10 @@ setupPersonalAccessToken ${GIT_PROVIDER_TYPE} ${GIT_PROVIDER_URL} ${AZURE_PAT} requestProvisionNamespace testFactoryResolverWithPatOAuth ${PUBLIC_REPO_URL} ${PRIVATE_REPO_URL} echo "[INFO] Check clone public repository with PAT setup" -testCloneGitRepoWithSetupPat ${PUBLIC_REPO_WORKSPACE_NAME} ${PUBLIC_PROJECT_NAME} ${PUBLIC_REPO_URL} ${USER_CHE_NAMESPACE} +testCloneGitRepoProjectShouldExists ${PUBLIC_REPO_WORKSPACE_NAME} ${PUBLIC_PROJECT_NAME} ${PUBLIC_REPO_URL} ${USER_CHE_NAMESPACE} testGitCredentialsData ${USER_CHE_NAMESPACE} ${AZURE_PAT} ${GIT_PROVIDER_URL} deleteTestWorkspace ${PUBLIC_REPO_WORKSPACE_NAME} ${USER_CHE_NAMESPACE} echo "[INFO] Check clone private repository with PAT setup" -testCloneGitRepoWithSetupPat ${PRIVATE_REPO_WORKSPACE_NAME} ${PRIVATE_PROJECT_NAME} ${PRIVATE_REPO_URL} ${USER_CHE_NAMESPACE} +testCloneGitRepoProjectShouldExists ${PRIVATE_REPO_WORKSPACE_NAME} ${PRIVATE_PROJECT_NAME} ${PRIVATE_REPO_URL} ${USER_CHE_NAMESPACE} testGitCredentialsData ${USER_CHE_NAMESPACE} ${AZURE_PAT} ${GIT_PROVIDER_URL} deleteTestWorkspace ${PRIVATE_REPO_WORKSPACE_NAME} ${USER_CHE_NAMESPACE} diff --git a/.ci/openshift-ci/test-bitbucket-no-pat-oauth-flow-raw-devfile-url.sh b/.ci/openshift-ci/test-bitbucket-no-pat-oauth-flow-raw-devfile-url.sh index b97800a52a..240b20183e 100644 --- a/.ci/openshift-ci/test-bitbucket-no-pat-oauth-flow-raw-devfile-url.sh +++ b/.ci/openshift-ci/test-bitbucket-no-pat-oauth-flow-raw-devfile-url.sh @@ -28,5 +28,8 @@ trap "catchFinish" EXIT SIGINT setupTestEnvironment ${OCP_NON_ADMIN_USER_NAME} testFactoryResolverNoPatOAuth ${PUBLIC_REPO_RAW_PATH_URL} ${PRIVATE_REPO_RAW_PATH_URL} -testClonePublicRepoNoPatOAuth ${PUBLIC_REPO_WORKSPACE_NAME} ${PUBLIC_PROJECT_NAME} ${PUBLIC_REPO_RAW_PATH_URL} ${USER_CHE_NAMESPACE} -testClonePrivateRepoNoPatOAuth ${PRIVATE_REPO_WORKSPACE_NAME} ${PRIVATE_PROJECT_NAME} ${PRIVATE_REPO_RAW_PATH_URL} ${USER_CHE_NAMESPACE} +testCloneGitRepoProjectShouldExists ${PUBLIC_REPO_WORKSPACE_NAME} ${PUBLIC_PROJECT_NAME} ${PUBLIC_REPO_RAW_PATH_URL} ${USER_CHE_NAMESPACE} +deleteTestWorkspace ${PUBLIC_REPO_WORKSPACE_NAME} ${USER_CHE_NAMESPACE} + +testCloneGitRepoNoProjectExists ${PRIVATE_REPO_WORKSPACE_NAME} ${PRIVATE_PROJECT_NAME} ${PRIVATE_REPO_RAW_PATH_URL} ${USER_CHE_NAMESPACE} +deleteTestWorkspace ${PRIVATE_REPO_WORKSPACE_NAME} ${USER_CHE_NAMESPACE} diff --git a/.ci/openshift-ci/test-bitbucket-no-pat-oauth-flow-ssh-url.sh b/.ci/openshift-ci/test-bitbucket-no-pat-oauth-flow-ssh-url.sh index d64ec38435..eb47a01b86 100644 --- a/.ci/openshift-ci/test-bitbucket-no-pat-oauth-flow-ssh-url.sh +++ b/.ci/openshift-ci/test-bitbucket-no-pat-oauth-flow-ssh-url.sh @@ -31,4 +31,6 @@ setupSSHKeyPairs "${BITBUCKET_PRIVATE_KEY}" "${BITBUCKET_PUBLIC_KEY}" testFactoryResolverNoPatOAuth ${PUBLIC_REPO_SSH_URL} ${PRIVATE_REPO_SSH_URL} testCloneGitRepoProjectShouldExists ${PUBLIC_REPO_WORKSPACE_NAME} ${PUBLIC_PROJECT_NAME} ${PUBLIC_REPO_SSH_URL} ${USER_CHE_NAMESPACE} +deleteTestWorkspace ${PUBLIC_REPO_WORKSPACE_NAME} ${USER_CHE_NAMESPACE} testCloneGitRepoProjectShouldExists ${PRIVATE_REPO_WORKSPACE_NAME} ${PRIVATE_PROJECT_NAME} ${PRIVATE_REPO_SSH_URL} ${USER_CHE_NAMESPACE} +deleteTestWorkspace ${PRIVATE_REPO_WORKSPACE_NAME} ${USER_CHE_NAMESPACE} diff --git a/.ci/openshift-ci/test-bitbucket-no-pat-oauth-flow.sh b/.ci/openshift-ci/test-bitbucket-no-pat-oauth-flow.sh index 6516c7afb1..463ca2a86b 100644 --- a/.ci/openshift-ci/test-bitbucket-no-pat-oauth-flow.sh +++ b/.ci/openshift-ci/test-bitbucket-no-pat-oauth-flow.sh @@ -27,5 +27,7 @@ trap "catchFinish" EXIT SIGINT setupTestEnvironment ${OCP_NON_ADMIN_USER_NAME} testFactoryResolverNoPatOAuth ${PUBLIC_REPO_URL} ${PRIVATE_REPO_URL} -testClonePublicRepoNoPatOAuth ${PUBLIC_REPO_WORKSPACE_NAME} ${PUBLIC_PROJECT_NAME} ${PUBLIC_REPO_URL} ${USER_CHE_NAMESPACE} -testClonePrivateRepoNoPatOAuth ${PRIVATE_REPO_WORKSPACE_NAME} ${PRIVATE_PROJECT_NAME} ${PRIVATE_REPO_URL} ${USER_CHE_NAMESPACE} +testCloneGitRepoProjectShouldExists ${PUBLIC_REPO_WORKSPACE_NAME} ${PUBLIC_PROJECT_NAME} ${PUBLIC_REPO_URL} ${USER_CHE_NAMESPACE} +deleteTestWorkspace ${PUBLIC_REPO_WORKSPACE_NAME} ${USER_CHE_NAMESPACE} +testCloneGitRepoNoProjectExists ${PRIVATE_REPO_WORKSPACE_NAME} ${PRIVATE_PROJECT_NAME} ${PRIVATE_REPO_URL} ${USER_CHE_NAMESPACE} +deleteTestWorkspace ${PRIVATE_REPO_WORKSPACE_NAME} ${USER_CHE_NAMESPACE} diff --git a/.ci/openshift-ci/test-github-no-pat-oauth-flow-raw-devfile-url.sh b/.ci/openshift-ci/test-github-no-pat-oauth-flow-raw-devfile-url.sh new file mode 100644 index 0000000000..a4bddfe32c --- /dev/null +++ b/.ci/openshift-ci/test-github-no-pat-oauth-flow-raw-devfile-url.sh @@ -0,0 +1,36 @@ +#!/bin/bash +# +# Copyright (c) 2023 Red Hat, Inc. +# This program and the accompanying materials are made +# available under the terms of the Eclipse Public License 2.0 +# which is available at https://www.eclipse.org/legal/epl-2.0/ +# +# SPDX-License-Identifier: EPL-2.0 +# +# Contributors: +# Red Hat, Inc. - initial API and implementation +# + +# exit immediately when a command fails +set -ex +# only exit with zero if all commands of the pipeline exit successfully +set -o pipefail + +export PUBLIC_REPO_RAW_PATH_URL=${PUBLIC_REPO_RAW_PATH_URL:-"https://raw.githubusercontent.com/chepullreq1/public-repo/main/devfile.yaml"} +export PRIVATE_REPO_RAW_PATH_URL=${PRIVATE_REPO_URL:-"https://raw.githubusercontent.com/chepullreq1/private-repo/main/devfile.yaml"} + +# import common test functions +SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )" +source "${SCRIPT_DIR}"/common.sh + +trap "catchFinish" EXIT SIGINT + +setupTestEnvironment ${OCP_NON_ADMIN_USER_NAME} +testFactoryResolverNoPatOAuth ${PUBLIC_REPO_RAW_PATH_URL} ${PRIVATE_REPO_RAW_PATH_URL} + +testCloneGitRepoNoProjectExists ${PUBLIC_REPO_WORKSPACE_NAME} ${PUBLIC_PROJECT_NAME} ${PUBLIC_REPO_RAW_PATH_URL} ${USER_CHE_NAMESPACE} +deleteTestWorkspace ${PUBLIC_REPO_WORKSPACE_NAME} ${USER_CHE_NAMESPACE} + +testCloneGitRepoNoProjectExists ${PRIVATE_REPO_WORKSPACE_NAME} ${PRIVATE_PROJECT_NAME} ${PRIVATE_REPO_RAW_PATH_URL} ${USER_CHE_NAMESPACE} +deleteTestWorkspace ${PRIVATE_REPO_WORKSPACE_NAME} ${USER_CHE_NAMESPACE} + diff --git a/.ci/openshift-ci/test-github-no-pat-oauth-flow-ssh-url.sh b/.ci/openshift-ci/test-github-no-pat-oauth-flow-ssh-url.sh new file mode 100644 index 0000000000..cf6f2359bc --- /dev/null +++ b/.ci/openshift-ci/test-github-no-pat-oauth-flow-ssh-url.sh @@ -0,0 +1,36 @@ + +#!/bin/bash +# +# Copyright (c) 2023 Red Hat, Inc. +# This program and the accompanying materials are made +# available under the terms of the Eclipse Public License 2.0 +# which is available at https://www.eclipse.org/legal/epl-2.0/ +# +# SPDX-License-Identifier: EPL-2.0 +# +# Contributors: +# Red Hat, Inc. - initial API and implementation +# + +# exit immediately when a command fails +set -ex +# only exit with zero if all commands of the pipeline exit successfully +set -o pipefail + +export PUBLIC_REPO_SSH_URL=${PUBLIC_REPO_SSH_URL:-"git@github.com:chepullreq1/public-repo.git"} +export PRIVATE_REPO_SSH_URL=${PRIVATE_REPO_SSH_URL:-"git@github.com:chepullreq1/private-repo.git"} + +# import common test functions +SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )" +source "${SCRIPT_DIR}"/common.sh + +trap "catchFinish" EXIT SIGINT + +setupTestEnvironment ${OCP_NON_ADMIN_USER_NAME} +setupSSHKeyPairs "${GITHUB_PRIVATE_KEY}" "${GITHUB_PUBLIC_KEY}" +testFactoryResolverNoPatOAuth ${PUBLIC_REPO_SSH_URL} ${PRIVATE_REPO_SSH_URL} + +testCloneGitRepoProjectShouldExists ${PUBLIC_REPO_WORKSPACE_NAME} ${PUBLIC_PROJECT_NAME} ${PUBLIC_REPO_SSH_URL} ${USER_CHE_NAMESPACE} +deleteTestWorkspace ${PUBLIC_REPO_WORKSPACE_NAME} ${USER_CHE_NAMESPACE} +testCloneGitRepoProjectShouldExists ${PRIVATE_REPO_WORKSPACE_NAME} ${PRIVATE_PROJECT_NAME} ${PRIVATE_REPO_SSH_URL} ${USER_CHE_NAMESPACE} +deleteTestWorkspace ${PRIVATE_REPO_WORKSPACE_NAME} ${USER_CHE_NAMESPACE} diff --git a/.ci/openshift-ci/test-github-no-pat-oauth-flow.sh b/.ci/openshift-ci/test-github-no-pat-oauth-flow.sh index 22d025cd41..6ce9f457e4 100644 --- a/.ci/openshift-ci/test-github-no-pat-oauth-flow.sh +++ b/.ci/openshift-ci/test-github-no-pat-oauth-flow.sh @@ -27,5 +27,7 @@ trap "catchFinish" EXIT SIGINT setupTestEnvironment ${OCP_NON_ADMIN_USER_NAME} testFactoryResolverNoPatOAuth ${PUBLIC_REPO_URL} ${PRIVATE_REPO_URL} -testClonePublicRepoNoPatOAuth ${PUBLIC_REPO_WORKSPACE_NAME} ${PUBLIC_PROJECT_NAME} ${PUBLIC_REPO_URL} ${USER_CHE_NAMESPACE} -testClonePrivateRepoNoPatOAuth ${PRIVATE_REPO_WORKSPACE_NAME} ${PRIVATE_PROJECT_NAME} ${PRIVATE_REPO_URL} ${USER_CHE_NAMESPACE} +testCloneGitRepoProjectShouldExists ${PUBLIC_REPO_WORKSPACE_NAME} ${PUBLIC_PROJECT_NAME} ${PUBLIC_REPO_URL} ${USER_CHE_NAMESPACE} +deleteTestWorkspace ${PUBLIC_REPO_WORKSPACE_NAME} ${USER_CHE_NAMESPACE} +testCloneGitRepoNoProjectExists ${PRIVATE_REPO_WORKSPACE_NAME} ${PRIVATE_PROJECT_NAME} ${PRIVATE_REPO_URL} ${USER_CHE_NAMESPACE} +deleteTestWorkspace ${PRIVATE_REPO_WORKSPACE_NAME} ${USER_CHE_NAMESPACE} diff --git a/.ci/openshift-ci/test-github-with-pat-setup-flow.sh b/.ci/openshift-ci/test-github-with-pat-setup-flow.sh index f522f970fd..008d7be760 100644 --- a/.ci/openshift-ci/test-github-with-pat-setup-flow.sh +++ b/.ci/openshift-ci/test-github-with-pat-setup-flow.sh @@ -32,10 +32,10 @@ setupPersonalAccessToken ${GIT_PROVIDER_TYPE} ${GIT_PROVIDER_URL} ${GITHUB_PAT} requestProvisionNamespace testFactoryResolverWithPatOAuth ${PUBLIC_REPO_URL} ${PRIVATE_REPO_URL} echo "[INFO] Check clone public repository with PAT setup" -testCloneGitRepoWithSetupPat ${PUBLIC_REPO_WORKSPACE_NAME} ${PUBLIC_PROJECT_NAME} ${PUBLIC_REPO_URL} ${USER_CHE_NAMESPACE} +testCloneGitRepoProjectShouldExists ${PUBLIC_REPO_WORKSPACE_NAME} ${PUBLIC_PROJECT_NAME} ${PUBLIC_REPO_URL} ${USER_CHE_NAMESPACE} testGitCredentialsData ${USER_CHE_NAMESPACE} ${GITHUB_PAT} ${GIT_PROVIDER_URL} deleteTestWorkspace ${PUBLIC_REPO_WORKSPACE_NAME} ${USER_CHE_NAMESPACE} echo "[INFO] Check clone private repository with PAT setup" -testCloneGitRepoWithSetupPat ${PRIVATE_REPO_WORKSPACE_NAME} ${PRIVATE_PROJECT_NAME} ${PRIVATE_REPO_URL} ${USER_CHE_NAMESPACE} +testCloneGitRepoProjectShouldExists ${PRIVATE_REPO_WORKSPACE_NAME} ${PRIVATE_PROJECT_NAME} ${PRIVATE_REPO_URL} ${USER_CHE_NAMESPACE} testGitCredentialsData ${USER_CHE_NAMESPACE} ${GITHUB_PAT} ${GIT_PROVIDER_URL} deleteTestWorkspace ${PRIVATE_REPO_WORKSPACE_NAME} ${USER_CHE_NAMESPACE} diff --git a/.ci/openshift-ci/test-gitlab-no-pat-oauth-flow.sh b/.ci/openshift-ci/test-gitlab-no-pat-oauth-flow.sh index 6d67a5cc64..835268c42a 100644 --- a/.ci/openshift-ci/test-gitlab-no-pat-oauth-flow.sh +++ b/.ci/openshift-ci/test-gitlab-no-pat-oauth-flow.sh @@ -27,5 +27,7 @@ trap "catchFinish" EXIT SIGINT setupTestEnvironment ${OCP_NON_ADMIN_USER_NAME} testFactoryResolverNoPatOAuth ${PUBLIC_REPO_URL} ${PRIVATE_REPO_URL} -testClonePublicRepoNoPatOAuth ${PUBLIC_REPO_WORKSPACE_NAME} ${PUBLIC_PROJECT_NAME} ${PUBLIC_REPO_URL} ${USER_CHE_NAMESPACE} -testClonePrivateRepoNoPatOAuth ${PRIVATE_REPO_WORKSPACE_NAME} ${PRIVATE_PROJECT_NAME} ${PRIVATE_REPO_URL} ${USER_CHE_NAMESPACE} +testCloneGitRepoProjectShouldExists ${PUBLIC_REPO_WORKSPACE_NAME} ${PUBLIC_PROJECT_NAME} ${PUBLIC_REPO_URL} ${USER_CHE_NAMESPACE} +deleteTestWorkspace ${PUBLIC_REPO_WORKSPACE_NAME} ${USER_CHE_NAMESPACE} +testCloneGitRepoNoProjectExists ${PRIVATE_REPO_WORKSPACE_NAME} ${PRIVATE_PROJECT_NAME} ${PRIVATE_REPO_URL} ${USER_CHE_NAMESPACE} +deleteTestWorkspace ${PRIVATE_REPO_WORKSPACE_NAME} ${USER_CHE_NAMESPACE} diff --git a/.ci/openshift-ci/test-gitlab-with-pat-setup-flow.sh b/.ci/openshift-ci/test-gitlab-with-pat-setup-flow.sh index 9f7ddb3834..17efd771cf 100644 --- a/.ci/openshift-ci/test-gitlab-with-pat-setup-flow.sh +++ b/.ci/openshift-ci/test-gitlab-with-pat-setup-flow.sh @@ -32,10 +32,10 @@ setupPersonalAccessToken ${GIT_PROVIDER_TYPE} ${GIT_PROVIDER_URL} ${GITLAB_PAT} requestProvisionNamespace testFactoryResolverWithPatOAuth ${PUBLIC_REPO_URL} ${PRIVATE_REPO_URL} echo "[INFO] Check clone public repository with PAT setup" -testCloneGitRepoWithSetupPat ${PUBLIC_REPO_WORKSPACE_NAME} ${PUBLIC_PROJECT_NAME} ${PUBLIC_REPO_URL} ${USER_CHE_NAMESPACE} +testCloneGitRepoProjectShouldExists ${PUBLIC_REPO_WORKSPACE_NAME} ${PUBLIC_PROJECT_NAME} ${PUBLIC_REPO_URL} ${USER_CHE_NAMESPACE} testGitCredentialsData ${USER_CHE_NAMESPACE} ${GITLAB_PAT} ${GIT_PROVIDER_URL} deleteTestWorkspace ${PUBLIC_REPO_WORKSPACE_NAME} ${USER_CHE_NAMESPACE} echo "[INFO] Check clone private repository with PAT setup" -testCloneGitRepoWithSetupPat ${PRIVATE_REPO_WORKSPACE_NAME} ${PRIVATE_PROJECT_NAME} ${PRIVATE_REPO_URL} ${USER_CHE_NAMESPACE} +testCloneGitRepoProjectShouldExists ${PRIVATE_REPO_WORKSPACE_NAME} ${PRIVATE_PROJECT_NAME} ${PRIVATE_REPO_URL} ${USER_CHE_NAMESPACE} testGitCredentialsData ${USER_CHE_NAMESPACE} ${GITLAB_PAT} ${GIT_PROVIDER_URL} deleteTestWorkspace ${PRIVATE_REPO_WORKSPACE_NAME} ${USER_CHE_NAMESPACE} From e337edc50fdf6eb1e96b0a9a8877719a31108a8e Mon Sep 17 00:00:00 2001 From: Anatolii Bazko Date: Fri, 15 Sep 2023 15:01:10 +0200 Subject: [PATCH 61/75] chore: Add Eclipse Che server azure and gitlab providers tests (#564) * chore: Add Eclipse Che server azure and gitlab providers tests Signed-off-by: Anatolii Bazko --- .ci/openshift-ci/common.sh | 41 +++++++------------ ...azure-no-pat-oauth-flow-raw-devfile-url.sh | 36 ++++++++++++++++ .../test-azure-no-pat-oauth-flow-ssh-url.sh | 38 +++++++++++++++++ ...itlab-no-pat-oauth-flow-raw-devfile-url.sh | 35 ++++++++++++++++ .../test-gitlab-no-pat-oauth-flow-ssh-url.sh | 37 +++++++++++++++++ 5 files changed, 160 insertions(+), 27 deletions(-) create mode 100644 .ci/openshift-ci/test-azure-no-pat-oauth-flow-raw-devfile-url.sh create mode 100644 .ci/openshift-ci/test-azure-no-pat-oauth-flow-ssh-url.sh create mode 100644 .ci/openshift-ci/test-gitlab-no-pat-oauth-flow-raw-devfile-url.sh create mode 100644 .ci/openshift-ci/test-gitlab-no-pat-oauth-flow-ssh-url.sh diff --git a/.ci/openshift-ci/common.sh b/.ci/openshift-ci/common.sh index d8d4a9ab40..fc35495781 100644 --- a/.ci/openshift-ci/common.sh +++ b/.ci/openshift-ci/common.sh @@ -98,44 +98,31 @@ requestFactoryResolverGitRepoUrl() { # check that factory resolver returns correct value without any PAT/OAuth setup testFactoryResolverNoPatOAuth() { - PUBLIC_REPO_URL=$1 - PRIVATE_REPO_URL=$2 - echo "[INFO] Check factory resolver for public repository with NO PAT/OAuth setup" - if [ "$(requestFactoryResolverGitRepoUrl ${PUBLIC_REPO_URL} | grep "HTTP/1.1 200")" ]; then - echo "[INFO] Factory resolver returned 'HTTP/1.1 200' status code." - else - echo "[ERROR] Factory resolver returned wrong status code. Expected: HTTP/1.1 200." - exit 1 - fi + testFactoryResolverResponse $1 200 echo "[INFO] Check factory resolver for private repository with NO PAT/OAuth setup" - if [ "$(requestFactoryResolverGitRepoUrl ${PRIVATE_REPO_URL} | grep "HTTP/1.1 400")" ]; then - echo "[INFO] Factory resolver returned 'HTTP/1.1 400' status code. Expected client side error." - else - echo "[ERROR] Factory resolver returned wrong status code. Expected 'HTTP/1.1 400'." - exit 1 - fi + testFactoryResolverResponse $2 400 } # check that factory resolver returns correct value with PAT/OAuth setup testFactoryResolverWithPatOAuth() { - PUBLIC_REPO_URL=$1 - PRIVATE_REPO_URL=$2 - echo "[INFO] Check factory resolver for public repository with PAT/OAuth setup" - if [ "$(requestFactoryResolverGitRepoUrl ${PUBLIC_REPO_URL} | grep "HTTP/1.1 200")" ]; then - echo "[INFO] Factory resolver returned 'HTTP/1.1 200' status code." - else - echo "[ERROR] Factory resolver returned wrong status code. Expected: HTTP/1.1 200" - exit 1 - fi + testFactoryResolverResponse $1 200 echo "[INFO] Check factory resolver for private repository with PAT/OAuth setup" - if [ "$(requestFactoryResolverGitRepoUrl ${PRIVATE_REPO_URL} | grep "HTTP/1.1 200")" ]; then - echo "[INFO] Factory resolver returned 'HTTP/1.1 200' status code." + testFactoryResolverResponse $2 200 +} + +testFactoryResolverResponse() { + URL=$1 + RESPONSE_CODE=$2 + + echo "[INFO] Check factory resolver" + if [ "$(requestFactoryResolverGitRepoUrl ${URL} | grep "HTTP/1.1 ${RESPONSE_CODE}")" ]; then + echo "[INFO] Factory resolver returned 'HTTP/1.1 ${RESPONSE_CODE}' status code. Expected client side response." else - echo "[ERROR] Factory resolver returned wrong status code. Expected: HTTP/1.1 200" + echo "[ERROR] Factory resolver returned wrong status code. Expected: HTTP/1.1 ${RESPONSE_CODE}." exit 1 fi } diff --git a/.ci/openshift-ci/test-azure-no-pat-oauth-flow-raw-devfile-url.sh b/.ci/openshift-ci/test-azure-no-pat-oauth-flow-raw-devfile-url.sh new file mode 100644 index 0000000000..3c2c2e0ace --- /dev/null +++ b/.ci/openshift-ci/test-azure-no-pat-oauth-flow-raw-devfile-url.sh @@ -0,0 +1,36 @@ +#!/bin/bash +# +# Copyright (c) 2023 Red Hat, Inc. +# This program and the accompanying materials are made +# available under the terms of the Eclipse Public License 2.0 +# which is available at https://www.eclipse.org/legal/epl-2.0/ +# +# SPDX-License-Identifier: EPL-2.0 +# +# Contributors: +# Red Hat, Inc. - initial API and implementation +# + +# exit immediately when a command fails +set -ex +# only exit with zero if all commands of the pipeline exit successfully +set -o pipefail + +export PUBLIC_REPO_RAW_PATH_URL=${PUBLIC_REPO_RAW_PATH_URL:-"https://dev.azure.com/chepullreq1/che-pr-public/_apis/git/repositories/public-repo/items?path=/devfile.yaml"} +export PRIVATE_REPO_RAW_PATH_URL=${PRIVATE_REPO_URL:-"https://dev.azure.com/chepullreq1/che-pr-private/_apis/git/repositories/private-repo/items?path=/devfile.yaml"} + +# import common test functions +SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )" +source "${SCRIPT_DIR}"/common.sh + +trap "catchFinish" EXIT SIGINT + +setupTestEnvironment ${OCP_NON_ADMIN_USER_NAME} +testFactoryResolverResponse ${PUBLIC_REPO_RAW_PATH_URL} 200 +testFactoryResolverResponse ${PRIVATE_REPO_RAW_PATH_URL} 500 + +testCloneGitRepoNoProjectExists ${PUBLIC_REPO_WORKSPACE_NAME} ${PUBLIC_PROJECT_NAME} ${PUBLIC_REPO_RAW_PATH_URL} ${USER_CHE_NAMESPACE} +deleteTestWorkspace ${PUBLIC_REPO_WORKSPACE_NAME} ${USER_CHE_NAMESPACE} + +testCloneGitRepoNoProjectExists ${PRIVATE_REPO_WORKSPACE_NAME} ${PRIVATE_PROJECT_NAME} ${PRIVATE_REPO_RAW_PATH_URL} ${USER_CHE_NAMESPACE} +deleteTestWorkspace ${PRIVATE_REPO_WORKSPACE_NAME} ${USER_CHE_NAMESPACE} \ No newline at end of file diff --git a/.ci/openshift-ci/test-azure-no-pat-oauth-flow-ssh-url.sh b/.ci/openshift-ci/test-azure-no-pat-oauth-flow-ssh-url.sh new file mode 100644 index 0000000000..1218db1bbf --- /dev/null +++ b/.ci/openshift-ci/test-azure-no-pat-oauth-flow-ssh-url.sh @@ -0,0 +1,38 @@ + +#!/bin/bash +# +# Copyright (c) 2023 Red Hat, Inc. +# This program and the accompanying materials are made +# available under the terms of the Eclipse Public License 2.0 +# which is available at https://www.eclipse.org/legal/epl-2.0/ +# +# SPDX-License-Identifier: EPL-2.0 +# +# Contributors: +# Red Hat, Inc. - initial API and implementation +# + +# exit immediately when a command fails +set -ex +# only exit with zero if all commands of the pipeline exit successfully +set -o pipefail + +export PUBLIC_REPO_SSH_URL=${PUBLIC_REPO_SSH_URL:-"git@ssh.dev.azure.com:v3/chepullreq1/che-pr-public/public-repo"} +export PRIVATE_REPO_SSH_URL=${PRIVATE_REPO_SSH_URL:-"git@ssh.dev.azure.com:v3/chepullreq1/che-pr-private/private-repo"} + +# import common test functions +SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )" +source "${SCRIPT_DIR}"/common.sh + +trap "catchFinish" EXIT SIGINT + +setupTestEnvironment ${OCP_NON_ADMIN_USER_NAME} +setupSSHKeyPairs "${AZURE_PRIVATE_KEY}" "${AZURE_PUBLIC_KEY}" +testFactoryResolverResponse ${PUBLIC_REPO_SSH_URL} 200 +testFactoryResolverResponse ${PRIVATE_REPO_SSH_URL} 500 + +testCloneGitRepoProjectShouldExists ${PUBLIC_REPO_WORKSPACE_NAME} ${PUBLIC_PROJECT_NAME} ${PUBLIC_REPO_SSH_URL} ${USER_CHE_NAMESPACE} +deleteTestWorkspace ${PUBLIC_REPO_WORKSPACE_NAME} ${USER_CHE_NAMESPACE} + +testCloneGitRepoProjectShouldExists ${PRIVATE_REPO_WORKSPACE_NAME} ${PRIVATE_PROJECT_NAME} ${PRIVATE_REPO_SSH_URL} ${USER_CHE_NAMESPACE} +deleteTestWorkspace ${PRIVATE_REPO_WORKSPACE_NAME} ${USER_CHE_NAMESPACE} \ No newline at end of file diff --git a/.ci/openshift-ci/test-gitlab-no-pat-oauth-flow-raw-devfile-url.sh b/.ci/openshift-ci/test-gitlab-no-pat-oauth-flow-raw-devfile-url.sh new file mode 100644 index 0000000000..b12a21369e --- /dev/null +++ b/.ci/openshift-ci/test-gitlab-no-pat-oauth-flow-raw-devfile-url.sh @@ -0,0 +1,35 @@ +#!/bin/bash +# +# Copyright (c) 2023 Red Hat, Inc. +# This program and the accompanying materials are made +# available under the terms of the Eclipse Public License 2.0 +# which is available at https://www.eclipse.org/legal/epl-2.0/ +# +# SPDX-License-Identifier: EPL-2.0 +# +# Contributors: +# Red Hat, Inc. - initial API and implementation +# + +# exit immediately when a command fails +set -ex +# only exit with zero if all commands of the pipeline exit successfully +set -o pipefail + +export PUBLIC_REPO_RAW_PATH_URL=${PUBLIC_REPO_RAW_PATH_URL:-"https://gitlab.com/chepullreq1/public-repo/-/raw/main/devfile.yaml"} +export PRIVATE_REPO_RAW_PATH_URL=${PRIVATE_REPO_URL:-"https://gitlab.com/chepullreq1/private-repo/-/raw/main/devfile.yaml"} + +# import common test functions +SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )" +source "${SCRIPT_DIR}"/common.sh + +trap "catchFinish" EXIT SIGINT + +setupTestEnvironment ${OCP_NON_ADMIN_USER_NAME} +testFactoryResolverNoPatOAuth ${PUBLIC_REPO_RAW_PATH_URL} ${PRIVATE_REPO_RAW_PATH_URL} + +testCloneGitRepoNoProjectExists ${PUBLIC_REPO_WORKSPACE_NAME} ${PUBLIC_PROJECT_NAME} ${PUBLIC_REPO_RAW_PATH_URL} ${USER_CHE_NAMESPACE} +deleteTestWorkspace ${PUBLIC_REPO_WORKSPACE_NAME} ${USER_CHE_NAMESPACE} + +testCloneGitRepoNoProjectExists ${PRIVATE_REPO_WORKSPACE_NAME} ${PRIVATE_PROJECT_NAME} ${PRIVATE_REPO_RAW_PATH_URL} ${USER_CHE_NAMESPACE} +deleteTestWorkspace ${PRIVATE_REPO_WORKSPACE_NAME} ${USER_CHE_NAMESPACE} diff --git a/.ci/openshift-ci/test-gitlab-no-pat-oauth-flow-ssh-url.sh b/.ci/openshift-ci/test-gitlab-no-pat-oauth-flow-ssh-url.sh new file mode 100644 index 0000000000..13abdb607a --- /dev/null +++ b/.ci/openshift-ci/test-gitlab-no-pat-oauth-flow-ssh-url.sh @@ -0,0 +1,37 @@ + +#!/bin/bash +# +# Copyright (c) 2023 Red Hat, Inc. +# This program and the accompanying materials are made +# available under the terms of the Eclipse Public License 2.0 +# which is available at https://www.eclipse.org/legal/epl-2.0/ +# +# SPDX-License-Identifier: EPL-2.0 +# +# Contributors: +# Red Hat, Inc. - initial API and implementation +# + +# exit immediately when a command fails +set -ex +# only exit with zero if all commands of the pipeline exit successfully +set -o pipefail + +export PUBLIC_REPO_SSH_URL=${PUBLIC_REPO_SSH_URL:-"git@gitlab.com:chepullreq1/public-repo.git"} +export PRIVATE_REPO_SSH_URL=${PRIVATE_REPO_SSH_URL:-"git@gitlab.com:chepullreq1/private-repo.git"} + +# import common test functions +SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )" +source "${SCRIPT_DIR}"/common.sh + +trap "catchFinish" EXIT SIGINT + +setupTestEnvironment ${OCP_NON_ADMIN_USER_NAME} +setupSSHKeyPairs "${GITLAB_PRIVATE_KEY}" "${GITLAB_PUBLIC_KEY}" +testFactoryResolverNoPatOAuth ${PUBLIC_REPO_SSH_URL} ${PRIVATE_REPO_SSH_URL} + +testCloneGitRepoProjectShouldExists ${PUBLIC_REPO_WORKSPACE_NAME} ${PUBLIC_PROJECT_NAME} ${PUBLIC_REPO_SSH_URL} ${USER_CHE_NAMESPACE} +deleteTestWorkspace ${PUBLIC_REPO_WORKSPACE_NAME} ${USER_CHE_NAMESPACE} + +testCloneGitRepoProjectShouldExists ${PRIVATE_REPO_WORKSPACE_NAME} ${PRIVATE_PROJECT_NAME} ${PRIVATE_REPO_SSH_URL} ${USER_CHE_NAMESPACE} +deleteTestWorkspace ${PRIVATE_REPO_WORKSPACE_NAME} ${USER_CHE_NAMESPACE} \ No newline at end of file From a3cceea64003568143f8e02b9dbfb76e9917ccdb Mon Sep 17 00:00:00 2001 From: Anatolii Bazko Date: Mon, 18 Sep 2023 11:18:37 +0200 Subject: [PATCH 62/75] chore: Add tests to start a workspace from raw devfile and ssh urls when PAT configured (#566) Signed-off-by: Anatolii Bazko --- .../test-azure-with-pat-setup-flow.sh | 16 ++++++++++++++++ .../test-github-with-pat-setup-flow.sh | 16 ++++++++++++++++ .../test-gitlab-with-pat-setup-flow.sh | 16 ++++++++++++++++ 3 files changed, 48 insertions(+) diff --git a/.ci/openshift-ci/test-azure-with-pat-setup-flow.sh b/.ci/openshift-ci/test-azure-with-pat-setup-flow.sh index bc69772ca7..8fe8f4ba20 100644 --- a/.ci/openshift-ci/test-azure-with-pat-setup-flow.sh +++ b/.ci/openshift-ci/test-azure-with-pat-setup-flow.sh @@ -20,6 +20,8 @@ export PUBLIC_REPO_URL=${PUBLIC_REPO_URL:-"https://chepullreq1@dev.azure.com/che export PRIVATE_REPO_URL=${PRIVATE_REPO_URL:-"https://dev.azure.com/chepullreq1/che-pr-private/_git/private-repo"} export GIT_PROVIDER_TYPE=${GIT_PROVIDER_TYPE:-"azure-devops"} export GIT_PROVIDER_URL=${GIT_PROVIDER_URL:-"https://dev.azure.com"} +export PRIVATE_REPO_SSH_URL=${PRIVATE_REPO_SSH_URL:-"git@ssh.dev.azure.com:v3/chepullreq1/che-pr-private/private-repo"} +export PRIVATE_REPO_RAW_PATH_URL=${PRIVATE_REPO_URL:-"https://dev.azure.com/chepullreq1/che-pr-private/_apis/git/repositories/private-repo/items?path=/devfile.yaml"} # import common test functions SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )" @@ -31,11 +33,25 @@ setupTestEnvironment ${OCP_NON_ADMIN_USER_NAME} setupPersonalAccessToken ${GIT_PROVIDER_TYPE} ${GIT_PROVIDER_URL} ${AZURE_PAT} requestProvisionNamespace testFactoryResolverWithPatOAuth ${PUBLIC_REPO_URL} ${PRIVATE_REPO_URL} + echo "[INFO] Check clone public repository with PAT setup" testCloneGitRepoProjectShouldExists ${PUBLIC_REPO_WORKSPACE_NAME} ${PUBLIC_PROJECT_NAME} ${PUBLIC_REPO_URL} ${USER_CHE_NAMESPACE} testGitCredentialsData ${USER_CHE_NAMESPACE} ${AZURE_PAT} ${GIT_PROVIDER_URL} deleteTestWorkspace ${PUBLIC_REPO_WORKSPACE_NAME} ${USER_CHE_NAMESPACE} + echo "[INFO] Check clone private repository with PAT setup" testCloneGitRepoProjectShouldExists ${PRIVATE_REPO_WORKSPACE_NAME} ${PRIVATE_PROJECT_NAME} ${PRIVATE_REPO_URL} ${USER_CHE_NAMESPACE} testGitCredentialsData ${USER_CHE_NAMESPACE} ${AZURE_PAT} ${GIT_PROVIDER_URL} deleteTestWorkspace ${PRIVATE_REPO_WORKSPACE_NAME} ${USER_CHE_NAMESPACE} + +echo "[INFO] Check clone private repository by raw devfile URL with PAT setup" +testFactoryResolverResponse ${PRIVATE_REPO_RAW_PATH_URL} 200 +testCloneGitRepoProjectShouldExists ${PRIVATE_REPO_WORKSPACE_NAME} ${PRIVATE_PROJECT_NAME} ${PRIVATE_REPO_RAW_PATH_URL} ${USER_CHE_NAMESPACE} +deleteTestWorkspace ${PRIVATE_REPO_WORKSPACE_NAME} ${USER_CHE_NAMESPACE} + +setupSSHKeyPairs "${AZURE_PRIVATE_KEY}" "${AZURE_PUBLIC_KEY}" + +echo "[INFO] Check clone private repository by SSH URL with PAT setup" +testFactoryResolverResponse ${PRIVATE_REPO_SSH_URL} 200 +testCloneGitRepoProjectShouldExists ${PRIVATE_REPO_WORKSPACE_NAME} ${PRIVATE_PROJECT_NAME} ${PRIVATE_REPO_SSH_URL} ${USER_CHE_NAMESPACE} +deleteTestWorkspace ${PRIVATE_REPO_WORKSPACE_NAME} ${USER_CHE_NAMESPACE} diff --git a/.ci/openshift-ci/test-github-with-pat-setup-flow.sh b/.ci/openshift-ci/test-github-with-pat-setup-flow.sh index 008d7be760..fa997bc307 100644 --- a/.ci/openshift-ci/test-github-with-pat-setup-flow.sh +++ b/.ci/openshift-ci/test-github-with-pat-setup-flow.sh @@ -20,6 +20,8 @@ export PUBLIC_REPO_URL=${PUBLIC_REPO_URL:-"https://github.com/chepullreq1/public export PRIVATE_REPO_URL=${PRIVATE_REPO_URL:-"https://github.com/chepullreq1/private-repo.git"} export GIT_PROVIDER_TYPE=${GIT_PROVIDER_TYPE:-"github"} export GIT_PROVIDER_URL=${GIT_PROVIDER_URL:-"https://github.com"} +export PRIVATE_REPO_RAW_PATH_URL=${PRIVATE_REPO_URL:-"https://raw.githubusercontent.com/chepullreq1/private-repo/main/devfile.yaml"} +export PRIVATE_REPO_SSH_URL=${PRIVATE_REPO_SSH_URL:-"git@github.com:chepullreq1/private-repo.git"} # import common test functions SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )" @@ -31,11 +33,25 @@ setupTestEnvironment ${OCP_NON_ADMIN_USER_NAME} setupPersonalAccessToken ${GIT_PROVIDER_TYPE} ${GIT_PROVIDER_URL} ${GITHUB_PAT} requestProvisionNamespace testFactoryResolverWithPatOAuth ${PUBLIC_REPO_URL} ${PRIVATE_REPO_URL} + echo "[INFO] Check clone public repository with PAT setup" testCloneGitRepoProjectShouldExists ${PUBLIC_REPO_WORKSPACE_NAME} ${PUBLIC_PROJECT_NAME} ${PUBLIC_REPO_URL} ${USER_CHE_NAMESPACE} testGitCredentialsData ${USER_CHE_NAMESPACE} ${GITHUB_PAT} ${GIT_PROVIDER_URL} deleteTestWorkspace ${PUBLIC_REPO_WORKSPACE_NAME} ${USER_CHE_NAMESPACE} + echo "[INFO] Check clone private repository with PAT setup" testCloneGitRepoProjectShouldExists ${PRIVATE_REPO_WORKSPACE_NAME} ${PRIVATE_PROJECT_NAME} ${PRIVATE_REPO_URL} ${USER_CHE_NAMESPACE} testGitCredentialsData ${USER_CHE_NAMESPACE} ${GITHUB_PAT} ${GIT_PROVIDER_URL} deleteTestWorkspace ${PRIVATE_REPO_WORKSPACE_NAME} ${USER_CHE_NAMESPACE} + +echo "[INFO] Check clone private repository by raw devfile URL with PAT setup" +testFactoryResolverResponse ${PRIVATE_REPO_RAW_PATH_URL} 200 +testCloneGitRepoProjectShouldExists ${PRIVATE_REPO_WORKSPACE_NAME} ${PRIVATE_PROJECT_NAME} ${PRIVATE_REPO_RAW_PATH_URL} ${USER_CHE_NAMESPACE} +deleteTestWorkspace ${PRIVATE_REPO_WORKSPACE_NAME} ${USER_CHE_NAMESPACE} + +setupSSHKeyPairs "${GITHUB_PRIVATE_KEY}" "${GITHUB_PUBLIC_KEY}" + +echo "[INFO] Check clone private repository by SSH URL with PAT setup" +testFactoryResolverResponse ${PRIVATE_REPO_SSH_URL} 200 +testCloneGitRepoProjectShouldExists ${PRIVATE_REPO_WORKSPACE_NAME} ${PRIVATE_PROJECT_NAME} ${PRIVATE_REPO_SSH_URL} ${USER_CHE_NAMESPACE} +deleteTestWorkspace ${PRIVATE_REPO_WORKSPACE_NAME} ${USER_CHE_NAMESPACE} \ No newline at end of file diff --git a/.ci/openshift-ci/test-gitlab-with-pat-setup-flow.sh b/.ci/openshift-ci/test-gitlab-with-pat-setup-flow.sh index 17efd771cf..f41519c16a 100644 --- a/.ci/openshift-ci/test-gitlab-with-pat-setup-flow.sh +++ b/.ci/openshift-ci/test-gitlab-with-pat-setup-flow.sh @@ -20,6 +20,8 @@ export PUBLIC_REPO_URL=${PUBLIC_REPO_URL:-"https://gitlab.com/chepullreq1/public export PRIVATE_REPO_URL=${PRIVATE_REPO_URL:-"https://gitlab.com/chepullreq1/private-repo.git"} export GIT_PROVIDER_TYPE=${GIT_PROVIDER_TYPE:-"gitlab"} export GIT_PROVIDER_URL=${GIT_PROVIDER_URL:-"https://gitlab.com"} +export PRIVATE_REPO_SSH_URL=${PRIVATE_REPO_SSH_URL:-"git@gitlab.com:chepullreq1/private-repo.git"} +export PRIVATE_REPO_RAW_PATH_URL=${PRIVATE_REPO_URL:-"https://gitlab.com/chepullreq1/private-repo/-/raw/main/devfile.yaml"} # import common test functions SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )" @@ -31,11 +33,25 @@ setupTestEnvironment ${OCP_NON_ADMIN_USER_NAME} setupPersonalAccessToken ${GIT_PROVIDER_TYPE} ${GIT_PROVIDER_URL} ${GITLAB_PAT} requestProvisionNamespace testFactoryResolverWithPatOAuth ${PUBLIC_REPO_URL} ${PRIVATE_REPO_URL} + echo "[INFO] Check clone public repository with PAT setup" testCloneGitRepoProjectShouldExists ${PUBLIC_REPO_WORKSPACE_NAME} ${PUBLIC_PROJECT_NAME} ${PUBLIC_REPO_URL} ${USER_CHE_NAMESPACE} testGitCredentialsData ${USER_CHE_NAMESPACE} ${GITLAB_PAT} ${GIT_PROVIDER_URL} deleteTestWorkspace ${PUBLIC_REPO_WORKSPACE_NAME} ${USER_CHE_NAMESPACE} + echo "[INFO] Check clone private repository with PAT setup" testCloneGitRepoProjectShouldExists ${PRIVATE_REPO_WORKSPACE_NAME} ${PRIVATE_PROJECT_NAME} ${PRIVATE_REPO_URL} ${USER_CHE_NAMESPACE} testGitCredentialsData ${USER_CHE_NAMESPACE} ${GITLAB_PAT} ${GIT_PROVIDER_URL} deleteTestWorkspace ${PRIVATE_REPO_WORKSPACE_NAME} ${USER_CHE_NAMESPACE} + +echo "[INFO] Check clone private repository by raw devfile URL with PAT setup" +testFactoryResolverResponse ${PRIVATE_REPO_RAW_PATH_URL} 200 +testCloneGitRepoProjectShouldExists ${PRIVATE_REPO_WORKSPACE_NAME} ${PRIVATE_PROJECT_NAME} ${PRIVATE_REPO_RAW_PATH_URL} ${USER_CHE_NAMESPACE} +deleteTestWorkspace ${PRIVATE_REPO_WORKSPACE_NAME} ${USER_CHE_NAMESPACE} + +setupSSHKeyPairs "${GITLAB_PRIVATE_KEY}" "${GITLAB_PUBLIC_KEY}" + +echo "[INFO] Check clone private repository by SSH URL with PAT setup" +testFactoryResolverResponse ${PRIVATE_REPO_SSH_URL} 200 +testCloneGitRepoProjectShouldExists ${PRIVATE_REPO_WORKSPACE_NAME} ${PRIVATE_PROJECT_NAME} ${PRIVATE_REPO_SSH_URL} ${USER_CHE_NAMESPACE} +deleteTestWorkspace ${PRIVATE_REPO_WORKSPACE_NAME} ${USER_CHE_NAMESPACE} From 261be8f99d1df1465f35556ca36598ab838c7539 Mon Sep 17 00:00:00 2001 From: Igor Vinokur Date: Thu, 21 Sep 2023 10:48:32 +0300 Subject: [PATCH 63/75] Add a null check before reading GitHub response (#563) Add a null check to prevent NullPointer exception while reading body from the GitHub API response. response.body() should not return null according to the java documentation, but the NullPointer exception was found in the customer debug logs --- .../server/github/GithubApiClient.java | 5 +++- .../server/github/GithubApiClientTest.java | 23 +++++++++++++++++++ 2 files changed, 27 insertions(+), 1 deletion(-) diff --git a/wsmaster/che-core-api-factory-github/src/main/java/org/eclipse/che/api/factory/server/github/GithubApiClient.java b/wsmaster/che-core-api-factory-github/src/main/java/org/eclipse/che/api/factory/server/github/GithubApiClient.java index 8e9a4f5a50..4aebfe1440 100644 --- a/wsmaster/che-core-api-factory-github/src/main/java/org/eclipse/che/api/factory/server/github/GithubApiClient.java +++ b/wsmaster/che-core-api-factory-github/src/main/java/org/eclipse/che/api/factory/server/github/GithubApiClient.java @@ -275,7 +275,10 @@ public class GithubApiClient { } else if (response.statusCode() == HTTP_NO_CONTENT) { return null; } else { - String body = CharStreams.toString(new InputStreamReader(response.body(), Charsets.UTF_8)); + String body = + response.body() == null + ? "Unrecognised error" + : CharStreams.toString(new InputStreamReader(response.body(), Charsets.UTF_8)); switch (response.statusCode()) { case HTTP_BAD_REQUEST: throw new ScmBadRequestException(body); diff --git a/wsmaster/che-core-api-factory-github/src/test/java/org/eclipse/che/api/factory/server/github/GithubApiClientTest.java b/wsmaster/che-core-api-factory-github/src/test/java/org/eclipse/che/api/factory/server/github/GithubApiClientTest.java index 6e9e775d5f..7949f1cdf6 100644 --- a/wsmaster/che-core-api-factory-github/src/test/java/org/eclipse/che/api/factory/server/github/GithubApiClientTest.java +++ b/wsmaster/che-core-api-factory-github/src/test/java/org/eclipse/che/api/factory/server/github/GithubApiClientTest.java @@ -21,6 +21,8 @@ import static java.net.HttpURLConnection.HTTP_BAD_GATEWAY; import static java.net.HttpURLConnection.HTTP_BAD_REQUEST; import static java.net.HttpURLConnection.HTTP_NOT_FOUND; import static java.net.HttpURLConnection.HTTP_NO_CONTENT; +import static org.mockito.ArgumentMatchers.any; +import static org.mockito.Mockito.when; import static org.testng.Assert.assertEquals; import static org.testng.Assert.assertEqualsNoOrder; import static org.testng.Assert.assertFalse; @@ -33,10 +35,13 @@ import com.github.tomakehurst.wiremock.client.WireMock; import com.github.tomakehurst.wiremock.common.Slf4jNotifier; import com.google.common.net.HttpHeaders; import java.lang.reflect.Field; +import java.net.http.HttpClient; +import java.net.http.HttpResponse; import org.eclipse.che.api.factory.server.scm.exception.ScmBadRequestException; import org.eclipse.che.api.factory.server.scm.exception.ScmCommunicationException; import org.eclipse.che.api.factory.server.scm.exception.ScmItemNotFoundException; import org.eclipse.che.commons.lang.Pair; +import org.mockito.Mockito; import org.mockito.testng.MockitoTestNGListener; import org.testng.annotations.AfterMethod; import org.testng.annotations.BeforeMethod; @@ -260,6 +265,24 @@ public class GithubApiClientTest { client.getUser("token"); } + @Test( + expectedExceptions = ScmBadRequestException.class, + expectedExceptionsMessageRegExp = "Unrecognised error") + public void shouldThrowExceptionWithUnrecognisedErrorIfResponseBodyIsNull() throws Exception { + // given + HttpClient httpClient = Mockito.mock(HttpClient.class); + HttpResponse response = Mockito.mock(HttpResponse.class); + Field declaredField = GithubApiClient.class.getDeclaredField("httpClient"); + declaredField.setAccessible(true); + declaredField.set(client, httpClient); + when(httpClient.send(any(), any())).thenReturn(response); + when(response.body()).thenReturn(null); + when(response.statusCode()).thenReturn(HTTP_BAD_REQUEST); + + // when + client.getUser("token"); + } + @Test( expectedExceptions = ScmCommunicationException.class, expectedExceptionsMessageRegExp = From b1da9ef12136b5111631f996f503e302251f5d61 Mon Sep 17 00:00:00 2001 From: Igor Vinokur Date: Fri, 22 Sep 2023 17:09:48 +0300 Subject: [PATCH 64/75] Add an SSH Factory parameter resolver for unsupported SCM providers (#567) Return the SSH factory resolver in order to handle SSH urls from unsupported SCM providers. Add a priority value for all factory resolvers to be able to control resolver's priority. --------- Co-authored-by: Aleksandr Shmaraiev --- assembly/assembly-wsmaster-war/pom.xml | 4 + .../che/api/deploy/WsMasterModule.java | 8 + .../che/core/db/TracingDataSourceTest.java | 4 +- pom.xml | 5 + .../AzureDevOpsFactoryParametersResolver.java | 9 +- ...rAuthorizingFactoryParametersResolver.java | 9 +- ...tbucketAuthorizingFileContentProvider.java | 2 +- .../BitbucketFactoryParametersResolver.java | 9 +- wsmaster/che-core-api-factory-git-ssh/pom.xml | 112 ++++++++++++++ .../GitSshAuthorizingFileContentProvider.java | 31 ++++ .../ssh/GitSshFactoryParametersResolver.java | 139 +++++++++++++++++ .../server/git/ssh/GitSshScmFileResolver.java | 45 ++++++ .../server/git/ssh/GitSshURLParser.java | 66 ++++++++ .../api/factory/server/git/ssh/GitSshUrl.java | 108 ++++++++++++++ .../server/git/ssh/GitSshURLParserTest.java | 50 +++++++ .../src/test/resources/logback-test.xml | 26 ++++ .../GithubFactoryParametersResolver.java | 30 +--- .../GitlabFactoryParametersResolver.java | 9 +- .../server/FactoryParametersResolver.java | 51 ++++++- .../server/FactoryResolverPriority.java | 28 ++++ .../api/factory/server/FactoryService.java | 31 ++-- ...RawDevfileUrlFactoryParameterResolver.java | 47 +----- .../scm/AuthorizingFileContentProvider.java | 6 +- .../factory/server/FactoryServiceTest.java | 141 +++++++++--------- wsmaster/pom.xml | 1 + 25 files changed, 804 insertions(+), 167 deletions(-) create mode 100644 wsmaster/che-core-api-factory-git-ssh/pom.xml create mode 100644 wsmaster/che-core-api-factory-git-ssh/src/main/java/org/eclipse/che/api/factory/server/git/ssh/GitSshAuthorizingFileContentProvider.java create mode 100644 wsmaster/che-core-api-factory-git-ssh/src/main/java/org/eclipse/che/api/factory/server/git/ssh/GitSshFactoryParametersResolver.java create mode 100644 wsmaster/che-core-api-factory-git-ssh/src/main/java/org/eclipse/che/api/factory/server/git/ssh/GitSshScmFileResolver.java create mode 100644 wsmaster/che-core-api-factory-git-ssh/src/main/java/org/eclipse/che/api/factory/server/git/ssh/GitSshURLParser.java create mode 100644 wsmaster/che-core-api-factory-git-ssh/src/main/java/org/eclipse/che/api/factory/server/git/ssh/GitSshUrl.java create mode 100644 wsmaster/che-core-api-factory-git-ssh/src/test/java/org/eclipse/che/api/factory/server/git/ssh/GitSshURLParserTest.java create mode 100644 wsmaster/che-core-api-factory-git-ssh/src/test/resources/logback-test.xml create mode 100644 wsmaster/che-core-api-factory/src/main/java/org/eclipse/che/api/factory/server/FactoryResolverPriority.java diff --git a/assembly/assembly-wsmaster-war/pom.xml b/assembly/assembly-wsmaster-war/pom.xml index 503c89825c..8d121c3ecc 100644 --- a/assembly/assembly-wsmaster-war/pom.xml +++ b/assembly/assembly-wsmaster-war/pom.xml @@ -139,6 +139,10 @@ org.eclipse.che.core che-core-api-factory-bitbucket-server + + org.eclipse.che.core + che-core-api-factory-git-ssh + org.eclipse.che.core che-core-api-factory-github diff --git a/assembly/assembly-wsmaster-war/src/main/java/org/eclipse/che/api/deploy/WsMasterModule.java b/assembly/assembly-wsmaster-war/src/main/java/org/eclipse/che/api/deploy/WsMasterModule.java index 274c1ff2f8..93379d7a99 100644 --- a/assembly/assembly-wsmaster-war/src/main/java/org/eclipse/che/api/deploy/WsMasterModule.java +++ b/assembly/assembly-wsmaster-war/src/main/java/org/eclipse/che/api/deploy/WsMasterModule.java @@ -36,6 +36,7 @@ import org.eclipse.che.api.factory.server.FactoryAcceptValidator; import org.eclipse.che.api.factory.server.FactoryCreateValidator; import org.eclipse.che.api.factory.server.FactoryEditValidator; import org.eclipse.che.api.factory.server.FactoryParametersResolver; +import org.eclipse.che.api.factory.server.RawDevfileUrlFactoryParameterResolver; import org.eclipse.che.api.factory.server.ScmFileResolver; import org.eclipse.che.api.factory.server.ScmService; import org.eclipse.che.api.factory.server.azure.devops.AzureDevOpsFactoryParametersResolver; @@ -44,6 +45,8 @@ import org.eclipse.che.api.factory.server.bitbucket.BitbucketFactoryParametersRe import org.eclipse.che.api.factory.server.bitbucket.BitbucketScmFileResolver; import org.eclipse.che.api.factory.server.bitbucket.BitbucketServerAuthorizingFactoryParametersResolver; import org.eclipse.che.api.factory.server.bitbucket.BitbucketServerScmFileResolver; +import org.eclipse.che.api.factory.server.git.ssh.GitSshFactoryParametersResolver; +import org.eclipse.che.api.factory.server.git.ssh.GitSshScmFileResolver; import org.eclipse.che.api.factory.server.github.GithubFactoryParametersResolver; import org.eclipse.che.api.factory.server.github.GithubScmFileResolver; import org.eclipse.che.api.factory.server.gitlab.GitlabFactoryParametersResolver; @@ -175,6 +178,10 @@ public class WsMasterModule extends AbstractModule { factoryParametersResolverMultibinder .addBinding() .to(AzureDevOpsFactoryParametersResolver.class); + factoryParametersResolverMultibinder + .addBinding() + .to(RawDevfileUrlFactoryParameterResolver.class); + factoryParametersResolverMultibinder.addBinding().to(GitSshFactoryParametersResolver.class); Multibinder scmFileResolverResolverMultibinder = Multibinder.newSetBinder(binder(), ScmFileResolver.class); @@ -183,6 +190,7 @@ public class WsMasterModule extends AbstractModule { scmFileResolverResolverMultibinder.addBinding().to(GitlabScmFileResolver.class); scmFileResolverResolverMultibinder.addBinding().to(BitbucketServerScmFileResolver.class); scmFileResolverResolverMultibinder.addBinding().to(AzureDevOpsScmFileResolver.class); + scmFileResolverResolverMultibinder.addBinding().to(GitSshScmFileResolver.class); install(new org.eclipse.che.api.factory.server.scm.KubernetesScmModule()); install(new org.eclipse.che.api.factory.server.bitbucket.BitbucketServerModule()); diff --git a/core/che-core-db/src/test/java/org/eclipse/che/core/db/TracingDataSourceTest.java b/core/che-core-db/src/test/java/org/eclipse/che/core/db/TracingDataSourceTest.java index 4d62c46237..b6f7ebc5d3 100644 --- a/core/che-core-db/src/test/java/org/eclipse/che/core/db/TracingDataSourceTest.java +++ b/core/che-core-db/src/test/java/org/eclipse/che/core/db/TracingDataSourceTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012-2021 Red Hat, Inc. + * Copyright (c) 2012-2023 Red Hat, Inc. * This program and the accompanying materials are made * available under the terms of the Eclipse Public License 2.0 * which is available at https://www.eclipse.org/legal/epl-2.0/ @@ -77,7 +77,7 @@ public class TracingDataSourceTest { } @Test - public void shouldNotWrapDatasourceIfEnvSetToFalseØ() throws Exception { + public void shouldNotWrapDatasourceIfEnvSetToFalse() throws Exception { setEnv(ImmutableMap.of("CHE_DB_TRACING_ENABLED", "false")); DataSource actual = TracingDataSource.wrapWithTracingIfEnabled(dataSource); diff --git a/pom.xml b/pom.xml index a3327d661f..b6386b7de5 100644 --- a/pom.xml +++ b/pom.xml @@ -759,6 +759,11 @@ che-core-api-factory-bitbucket-server ${che.version} + + org.eclipse.che.core + che-core-api-factory-git-ssh + ${che.version} + org.eclipse.che.core che-core-api-factory-github diff --git a/wsmaster/che-core-api-factory-azure-devops/src/main/java/org/eclipse/che/api/factory/server/azure/devops/AzureDevOpsFactoryParametersResolver.java b/wsmaster/che-core-api-factory-azure-devops/src/main/java/org/eclipse/che/api/factory/server/azure/devops/AzureDevOpsFactoryParametersResolver.java index 065beb994c..e98e35d7e6 100644 --- a/wsmaster/che-core-api-factory-azure-devops/src/main/java/org/eclipse/che/api/factory/server/azure/devops/AzureDevOpsFactoryParametersResolver.java +++ b/wsmaster/che-core-api-factory-azure-devops/src/main/java/org/eclipse/che/api/factory/server/azure/devops/AzureDevOpsFactoryParametersResolver.java @@ -23,7 +23,7 @@ import java.util.Map; import javax.inject.Inject; import javax.inject.Singleton; import org.eclipse.che.api.core.ApiException; -import org.eclipse.che.api.factory.server.RawDevfileUrlFactoryParameterResolver; +import org.eclipse.che.api.factory.server.FactoryParametersResolver; import org.eclipse.che.api.factory.server.scm.PersonalAccessTokenManager; import org.eclipse.che.api.factory.server.urlfactory.ProjectConfigDtoMerger; import org.eclipse.che.api.factory.server.urlfactory.RemoteFactoryUrl; @@ -45,11 +45,13 @@ import org.eclipse.che.api.workspace.shared.dto.devfile.SourceDto; * @author Anatolii Bazko */ @Singleton -public class AzureDevOpsFactoryParametersResolver extends RawDevfileUrlFactoryParameterResolver { +public class AzureDevOpsFactoryParametersResolver implements FactoryParametersResolver { /** Parser which will allow to check validity of URLs and create objects. */ private final AzureDevOpsURLParser azureDevOpsURLParser; + private final URLFetcher urlFetcher; + private final URLFactoryBuilder urlFactoryBuilder; private final PersonalAccessTokenManager personalAccessTokenManager; private final ProjectConfigDtoMerger projectConfigDtoMerger; @@ -60,8 +62,9 @@ public class AzureDevOpsFactoryParametersResolver extends RawDevfileUrlFactoryPa URLFetcher urlFetcher, URLFactoryBuilder urlFactoryBuilder, PersonalAccessTokenManager personalAccessTokenManager) { - super(urlFactoryBuilder, urlFetcher); this.azureDevOpsURLParser = azureDevOpsURLParser; + this.urlFetcher = urlFetcher; + this.urlFactoryBuilder = urlFactoryBuilder; this.personalAccessTokenManager = personalAccessTokenManager; this.projectConfigDtoMerger = projectConfigDtoMerger; } diff --git a/wsmaster/che-core-api-factory-bitbucket-server/src/main/java/org/eclipse/che/api/factory/server/bitbucket/BitbucketServerAuthorizingFactoryParametersResolver.java b/wsmaster/che-core-api-factory-bitbucket-server/src/main/java/org/eclipse/che/api/factory/server/bitbucket/BitbucketServerAuthorizingFactoryParametersResolver.java index b055d51d70..7aafa4baec 100644 --- a/wsmaster/che-core-api-factory-bitbucket-server/src/main/java/org/eclipse/che/api/factory/server/bitbucket/BitbucketServerAuthorizingFactoryParametersResolver.java +++ b/wsmaster/che-core-api-factory-bitbucket-server/src/main/java/org/eclipse/che/api/factory/server/bitbucket/BitbucketServerAuthorizingFactoryParametersResolver.java @@ -22,7 +22,7 @@ import javax.inject.Inject; import javax.inject.Singleton; import org.eclipse.che.api.core.ApiException; import org.eclipse.che.api.core.BadRequestException; -import org.eclipse.che.api.factory.server.RawDevfileUrlFactoryParameterResolver; +import org.eclipse.che.api.factory.server.FactoryParametersResolver; import org.eclipse.che.api.factory.server.scm.PersonalAccessTokenManager; import org.eclipse.che.api.factory.server.urlfactory.RemoteFactoryUrl; import org.eclipse.che.api.factory.server.urlfactory.URLFactoryBuilder; @@ -43,8 +43,10 @@ import org.eclipse.che.api.workspace.shared.dto.devfile.SourceDto; */ @Singleton public class BitbucketServerAuthorizingFactoryParametersResolver - extends RawDevfileUrlFactoryParameterResolver { + implements FactoryParametersResolver { + private final URLFactoryBuilder urlFactoryBuilder; + private final URLFetcher urlFetcher; /** Parser which will allow to check validity of URLs and create objects. */ private final BitbucketServerURLParser bitbucketURLParser; @@ -56,7 +58,8 @@ public class BitbucketServerAuthorizingFactoryParametersResolver URLFetcher urlFetcher, BitbucketServerURLParser bitbucketURLParser, PersonalAccessTokenManager personalAccessTokenManager) { - super(urlFactoryBuilder, urlFetcher); + this.urlFactoryBuilder = urlFactoryBuilder; + this.urlFetcher = urlFetcher; this.bitbucketURLParser = bitbucketURLParser; this.personalAccessTokenManager = personalAccessTokenManager; } diff --git a/wsmaster/che-core-api-factory-bitbucket/src/main/java/org/eclipse/che/api/factory/server/bitbucket/BitbucketAuthorizingFileContentProvider.java b/wsmaster/che-core-api-factory-bitbucket/src/main/java/org/eclipse/che/api/factory/server/bitbucket/BitbucketAuthorizingFileContentProvider.java index 66e03c8bcd..bdee138fcc 100644 --- a/wsmaster/che-core-api-factory-bitbucket/src/main/java/org/eclipse/che/api/factory/server/bitbucket/BitbucketAuthorizingFileContentProvider.java +++ b/wsmaster/che-core-api-factory-bitbucket/src/main/java/org/eclipse/che/api/factory/server/bitbucket/BitbucketAuthorizingFileContentProvider.java @@ -61,7 +61,7 @@ class BitbucketAuthorizingFileContentProvider extends AuthorizingFileContentProv requestURL.substring(requestURL.indexOf(split[6]) + split[6].length() + 1), token.getToken()); } catch (UnknownScmProviderException e) { - return fetchContentWithoutToken(requestURL, e); + return fetchContentWithoutToken(requestURL); } catch (ScmCommunicationException e) { return toIOException(fileURL, e); } catch (ScmUnauthorizedException diff --git a/wsmaster/che-core-api-factory-bitbucket/src/main/java/org/eclipse/che/api/factory/server/bitbucket/BitbucketFactoryParametersResolver.java b/wsmaster/che-core-api-factory-bitbucket/src/main/java/org/eclipse/che/api/factory/server/bitbucket/BitbucketFactoryParametersResolver.java index 75631a9624..86b37a7cb0 100644 --- a/wsmaster/che-core-api-factory-bitbucket/src/main/java/org/eclipse/che/api/factory/server/bitbucket/BitbucketFactoryParametersResolver.java +++ b/wsmaster/che-core-api-factory-bitbucket/src/main/java/org/eclipse/che/api/factory/server/bitbucket/BitbucketFactoryParametersResolver.java @@ -22,7 +22,7 @@ import javax.inject.Inject; import javax.inject.Singleton; import org.eclipse.che.api.core.ApiException; import org.eclipse.che.api.core.BadRequestException; -import org.eclipse.che.api.factory.server.RawDevfileUrlFactoryParameterResolver; +import org.eclipse.che.api.factory.server.FactoryParametersResolver; import org.eclipse.che.api.factory.server.scm.PersonalAccessTokenManager; import org.eclipse.che.api.factory.server.urlfactory.ProjectConfigDtoMerger; import org.eclipse.che.api.factory.server.urlfactory.RemoteFactoryUrl; @@ -38,14 +38,16 @@ import org.eclipse.che.api.workspace.shared.dto.devfile.ProjectDto; /** Provides Factory Parameters resolver for bitbucket repositories. */ @Singleton -public class BitbucketFactoryParametersResolver extends RawDevfileUrlFactoryParameterResolver { +public class BitbucketFactoryParametersResolver implements FactoryParametersResolver { /** Parser which will allow to check validity of URLs and create objects. */ private final BitbucketURLParser bitbucketURLParser; + private final URLFetcher urlFetcher; /** Builder allowing to build objects from bitbucket URL. */ private final BitbucketSourceStorageBuilder bitbucketSourceStorageBuilder; + private final URLFactoryBuilder urlFactoryBuilder; /** ProjectDtoMerger */ private final ProjectConfigDtoMerger projectConfigDtoMerger; @@ -63,9 +65,10 @@ public class BitbucketFactoryParametersResolver extends RawDevfileUrlFactoryPara ProjectConfigDtoMerger projectConfigDtoMerger, PersonalAccessTokenManager personalAccessTokenManager, BitbucketApiClient bitbucketApiClient) { - super(urlFactoryBuilder, urlFetcher); this.bitbucketURLParser = bitbucketURLParser; + this.urlFetcher = urlFetcher; this.bitbucketSourceStorageBuilder = bitbucketSourceStorageBuilder; + this.urlFactoryBuilder = urlFactoryBuilder; this.projectConfigDtoMerger = projectConfigDtoMerger; this.personalAccessTokenManager = personalAccessTokenManager; this.bitbucketApiClient = bitbucketApiClient; diff --git a/wsmaster/che-core-api-factory-git-ssh/pom.xml b/wsmaster/che-core-api-factory-git-ssh/pom.xml new file mode 100644 index 0000000000..b99ad19815 --- /dev/null +++ b/wsmaster/che-core-api-factory-git-ssh/pom.xml @@ -0,0 +1,112 @@ + + + + 4.0.0 + + che-master-parent + org.eclipse.che.core + 7.75.0-SNAPSHOT + + che-core-api-factory-git-ssh + jar + Che Core :: API :: Factory Resolver Git Ssh + + true + + + + jakarta.inject + jakarta.inject-api + + + jakarta.validation + jakarta.validation-api + + + org.eclipse.che.core + che-core-api-core + + + org.eclipse.che.core + che-core-api-dto + + + org.eclipse.che.core + che-core-api-factory + + + org.eclipse.che.core + che-core-api-factory-shared + + + org.eclipse.che.core + che-core-api-workspace + + + org.eclipse.che.core + che-core-api-workspace-shared + + + ch.qos.logback + logback-classic + test + + + com.github.tomakehurst + wiremock-jre8-standalone + test + + + jakarta.servlet + jakarta.servlet-api + test + + + jakarta.ws.rs + jakarta.ws.rs-api + test + + + org.eclipse.che.core + che-core-commons-json + test + + + org.hamcrest + hamcrest-core + test + + + org.mockito + mockito-core + test + + + org.mockito + mockito-testng + test + + + org.slf4j + jcl-over-slf4j + test + + + org.testng + testng + test + + + diff --git a/wsmaster/che-core-api-factory-git-ssh/src/main/java/org/eclipse/che/api/factory/server/git/ssh/GitSshAuthorizingFileContentProvider.java b/wsmaster/che-core-api-factory-git-ssh/src/main/java/org/eclipse/che/api/factory/server/git/ssh/GitSshAuthorizingFileContentProvider.java new file mode 100644 index 0000000000..094a2a2575 --- /dev/null +++ b/wsmaster/che-core-api-factory-git-ssh/src/main/java/org/eclipse/che/api/factory/server/git/ssh/GitSshAuthorizingFileContentProvider.java @@ -0,0 +1,31 @@ +/* + * Copyright (c) 2012-2023 Red Hat, Inc. + * This program and the accompanying materials are made + * available under the terms of the Eclipse Public License 2.0 + * which is available at https://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 + * + * Contributors: + * Red Hat, Inc. - initial API and implementation + */ +package org.eclipse.che.api.factory.server.git.ssh; + +import org.eclipse.che.api.factory.server.scm.AuthorizingFileContentProvider; +import org.eclipse.che.api.factory.server.scm.PersonalAccessTokenManager; +import org.eclipse.che.api.workspace.server.devfile.URLFetcher; + +/** + * Git Ssh specific authorizing file content provider. + * + * @author Anatolii Bazko + */ +class GitSshAuthorizingFileContentProvider extends AuthorizingFileContentProvider { + + GitSshAuthorizingFileContentProvider( + GitSshUrl gitSshUrl, + URLFetcher urlFetcher, + PersonalAccessTokenManager personalAccessTokenManager) { + super(gitSshUrl, urlFetcher, personalAccessTokenManager); + } +} diff --git a/wsmaster/che-core-api-factory-git-ssh/src/main/java/org/eclipse/che/api/factory/server/git/ssh/GitSshFactoryParametersResolver.java b/wsmaster/che-core-api-factory-git-ssh/src/main/java/org/eclipse/che/api/factory/server/git/ssh/GitSshFactoryParametersResolver.java new file mode 100644 index 0000000000..685976aef1 --- /dev/null +++ b/wsmaster/che-core-api-factory-git-ssh/src/main/java/org/eclipse/che/api/factory/server/git/ssh/GitSshFactoryParametersResolver.java @@ -0,0 +1,139 @@ +/* + * Copyright (c) 2012-2023 Red Hat, Inc. + * This program and the accompanying materials are made + * available under the terms of the Eclipse Public License 2.0 + * which is available at https://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 + * + * Contributors: + * Red Hat, Inc. - initial API and implementation + */ +package org.eclipse.che.api.factory.server.git.ssh; + +import static org.eclipse.che.api.factory.server.FactoryResolverPriority.LOWEST; +import static org.eclipse.che.api.factory.shared.Constants.CURRENT_VERSION; +import static org.eclipse.che.api.factory.shared.Constants.URL_PARAMETER_NAME; +import static org.eclipse.che.dto.server.DtoFactory.newDto; + +import jakarta.validation.constraints.NotNull; +import java.util.Map; +import javax.inject.Inject; +import javax.inject.Singleton; +import org.eclipse.che.api.core.ApiException; +import org.eclipse.che.api.factory.server.FactoryParametersResolver; +import org.eclipse.che.api.factory.server.FactoryResolverPriority; +import org.eclipse.che.api.factory.server.scm.PersonalAccessTokenManager; +import org.eclipse.che.api.factory.server.urlfactory.RemoteFactoryUrl; +import org.eclipse.che.api.factory.server.urlfactory.URLFactoryBuilder; +import org.eclipse.che.api.factory.shared.dto.FactoryDevfileV2Dto; +import org.eclipse.che.api.factory.shared.dto.FactoryDto; +import org.eclipse.che.api.factory.shared.dto.FactoryMetaDto; +import org.eclipse.che.api.factory.shared.dto.FactoryVisitor; +import org.eclipse.che.api.factory.shared.dto.ScmInfoDto; +import org.eclipse.che.api.workspace.server.devfile.URLFetcher; +import org.eclipse.che.api.workspace.shared.dto.devfile.ProjectDto; +import org.eclipse.che.api.workspace.shared.dto.devfile.SourceDto; + +/** + * Provides Factory Parameters resolver for Git Ssh repositories. + * + * @author Anatolii Bazko + */ +@Singleton +public class GitSshFactoryParametersResolver implements FactoryParametersResolver { + + private final GitSshURLParser gitSshURLParser; + + private final URLFetcher urlFetcher; + private final URLFactoryBuilder urlFactoryBuilder; + private final PersonalAccessTokenManager personalAccessTokenManager; + + @Inject + public GitSshFactoryParametersResolver( + GitSshURLParser gitSshURLParser, + URLFetcher urlFetcher, + URLFactoryBuilder urlFactoryBuilder, + PersonalAccessTokenManager personalAccessTokenManager) { + this.gitSshURLParser = gitSshURLParser; + this.urlFetcher = urlFetcher; + this.urlFactoryBuilder = urlFactoryBuilder; + this.personalAccessTokenManager = personalAccessTokenManager; + } + + @Override + public boolean accept(@NotNull final Map factoryParameters) { + return factoryParameters.containsKey(URL_PARAMETER_NAME) + && gitSshURLParser.isValid(factoryParameters.get(URL_PARAMETER_NAME)); + } + + @Override + public FactoryMetaDto createFactory(@NotNull final Map factoryParameters) + throws ApiException { + // no need to check null value of url parameter as accept() method has performed the check + final GitSshUrl gitSshUrl = gitSshURLParser.parse(factoryParameters.get(URL_PARAMETER_NAME)); + + // create factory from the following location if location exists, else create default factory + return urlFactoryBuilder + .createFactoryFromDevfile( + gitSshUrl, + new GitSshAuthorizingFileContentProvider( + gitSshUrl, urlFetcher, personalAccessTokenManager), + extractOverrideParams(factoryParameters), + true) + .orElseGet(() -> newDto(FactoryDto.class).withV(CURRENT_VERSION).withSource("repo")) + .acceptVisitor(new GitSshFactoryVisitor(gitSshUrl)); + } + + /** + * Visitor that puts the default devfile or updates devfile projects into the Git Ssh Factory, if + * needed. + */ + private class GitSshFactoryVisitor implements FactoryVisitor { + + private final GitSshUrl gitSshUrl; + + private GitSshFactoryVisitor(GitSshUrl gitSshUrl) { + this.gitSshUrl = gitSshUrl; + } + + @Override + public FactoryDevfileV2Dto visit(FactoryDevfileV2Dto factoryDto) { + ScmInfoDto scmInfo = + newDto(ScmInfoDto.class) + .withScmProviderName(gitSshUrl.getProviderName()) + .withRepositoryUrl(gitSshUrl.getRepositoryLocation()); + return factoryDto.withScmInfo(scmInfo); + } + + @Override + public FactoryDto visit(FactoryDto factory) { + if (factory.getDevfile() == null) { + factory.setDevfile(urlFactoryBuilder.buildDefaultDevfile(gitSshUrl.getRepository())); + } + + updateProjects( + factory.getDevfile(), + () -> + newDto(ProjectDto.class) + .withSource( + newDto(SourceDto.class) + .withLocation(gitSshUrl.getRepositoryLocation()) + .withType("git")) + .withName(gitSshUrl.getRepository()), + project -> {}); + + return factory; + } + } + + @Override + public RemoteFactoryUrl parseFactoryUrl(String factoryUrl) { + return gitSshURLParser.parse(factoryUrl); + } + + @Override + public FactoryResolverPriority priority() { + return LOWEST; + } +} diff --git a/wsmaster/che-core-api-factory-git-ssh/src/main/java/org/eclipse/che/api/factory/server/git/ssh/GitSshScmFileResolver.java b/wsmaster/che-core-api-factory-git-ssh/src/main/java/org/eclipse/che/api/factory/server/git/ssh/GitSshScmFileResolver.java new file mode 100644 index 0000000000..a28b208cb8 --- /dev/null +++ b/wsmaster/che-core-api-factory-git-ssh/src/main/java/org/eclipse/che/api/factory/server/git/ssh/GitSshScmFileResolver.java @@ -0,0 +1,45 @@ +/* + * Copyright (c) 2012-2023 Red Hat, Inc. + * This program and the accompanying materials are made + * available under the terms of the Eclipse Public License 2.0 + * which is available at https://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 + * + * Contributors: + * Red Hat, Inc. - initial API and implementation + */ +package org.eclipse.che.api.factory.server.git.ssh; + +import jakarta.validation.constraints.NotNull; +import javax.inject.Inject; +import org.eclipse.che.api.factory.server.ScmFileResolver; + +/** + * Git Ssh specific SCM file resolver. + * + * @author Anatolii Bazko + */ +public class GitSshScmFileResolver implements ScmFileResolver { + + private final GitSshURLParser gitSshURLParser; + + @Inject + public GitSshScmFileResolver(GitSshURLParser gitSshURLParser) { + this.gitSshURLParser = gitSshURLParser; + } + + @Override + public boolean accept(@NotNull String repository) { + return gitSshURLParser.isValid(repository); + } + + /** + * There is no way to get a file content from a git repository via ssh protocol. So this method + * always returns an empty string. It allows to start a workspace from an empty devfile. + */ + @Override + public String fileContent(@NotNull String repository, @NotNull String filePath) { + return ""; + } +} diff --git a/wsmaster/che-core-api-factory-git-ssh/src/main/java/org/eclipse/che/api/factory/server/git/ssh/GitSshURLParser.java b/wsmaster/che-core-api-factory-git-ssh/src/main/java/org/eclipse/che/api/factory/server/git/ssh/GitSshURLParser.java new file mode 100644 index 0000000000..9c25e825b7 --- /dev/null +++ b/wsmaster/che-core-api-factory-git-ssh/src/main/java/org/eclipse/che/api/factory/server/git/ssh/GitSshURLParser.java @@ -0,0 +1,66 @@ +/* + * Copyright (c) 2012-2023 Red Hat, Inc. + * This program and the accompanying materials are made + * available under the terms of the Eclipse Public License 2.0 + * which is available at https://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 + * + * Contributors: + * Red Hat, Inc. - initial API and implementation + */ +package org.eclipse.che.api.factory.server.git.ssh; + +import static java.lang.String.format; +import static java.util.regex.Pattern.compile; + +import jakarta.validation.constraints.NotNull; +import java.util.regex.Matcher; +import java.util.regex.Pattern; +import javax.inject.Inject; +import javax.inject.Singleton; +import org.eclipse.che.api.factory.server.urlfactory.DevfileFilenamesProvider; + +/** + * Parser of String Git Ssh URLs and provide {@link GitSshUrl} objects. + * + * @author Anatolii Bazko + */ +@Singleton +public class GitSshURLParser { + + private final Pattern gitSshPattern; + + private final DevfileFilenamesProvider devfileFilenamesProvider; + + @Inject + public GitSshURLParser(DevfileFilenamesProvider devfileFilenamesProvider) { + this.devfileFilenamesProvider = devfileFilenamesProvider; + this.gitSshPattern = compile("^git@(?[^:]++):(.*)/(?[^/]++)$"); + } + + public boolean isValid(@NotNull String url) { + return gitSshPattern.matcher(url).matches(); + } + + public GitSshUrl parse(String url) { + Matcher matcher = gitSshPattern.matcher(url); + if (!matcher.matches()) { + throw new IllegalArgumentException( + format("The given url %s is not a valid. It should start with git@", url)); + } + + String hostName = matcher.group("hostName"); + String repoName = matcher.group("repoName"); + if (repoName.endsWith(".git")) { + repoName = repoName.substring(0, repoName.length() - 4); + } + + return new GitSshUrl() + .withDevfileFilenames(devfileFilenamesProvider.getConfiguredDevfileFilenames()) + .withHostName(hostName) + .withRepository(repoName) + .withRepositoryLocation(url) + .withUrl(url); + } +} diff --git a/wsmaster/che-core-api-factory-git-ssh/src/main/java/org/eclipse/che/api/factory/server/git/ssh/GitSshUrl.java b/wsmaster/che-core-api-factory-git-ssh/src/main/java/org/eclipse/che/api/factory/server/git/ssh/GitSshUrl.java new file mode 100644 index 0000000000..ae180c9e07 --- /dev/null +++ b/wsmaster/che-core-api-factory-git-ssh/src/main/java/org/eclipse/che/api/factory/server/git/ssh/GitSshUrl.java @@ -0,0 +1,108 @@ +/* + * Copyright (c) 2012-2023 Red Hat, Inc. + * This program and the accompanying materials are made + * available under the terms of the Eclipse Public License 2.0 + * which is available at https://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 + * + * Contributors: + * Red Hat, Inc. - initial API and implementation + */ +package org.eclipse.che.api.factory.server.git.ssh; + +import java.util.ArrayList; +import java.util.List; +import java.util.Optional; +import java.util.stream.Collectors; +import org.eclipse.che.api.factory.server.urlfactory.DefaultFactoryUrl; + +/** + * Representation of Git Ssh URL, allowing to get details from it. + * + * @author Anatolii Bazko + */ +public class GitSshUrl extends DefaultFactoryUrl { + + private String repository; + private String hostName; + + private String repositoryLocation; + + private final List devfileFilenames = new ArrayList<>(); + + protected GitSshUrl() {} + + @Override + public String getProviderName() { + return "git-ssh"; + } + + @Override + public String getBranch() { + return null; + } + + public GitSshUrl withDevfileFilenames(List devfileFilenames) { + this.devfileFilenames.addAll(devfileFilenames); + return this; + } + + @Override + public void setDevfileFilename(String devfileName) { + this.devfileFilenames.clear(); + this.devfileFilenames.add(devfileName); + } + + @Override + public List devfileFileLocations() { + return devfileFilenames.stream().map(this::createDevfileLocation).collect(Collectors.toList()); + } + + @Override + public String rawFileLocation(String filename) { + return filename; + } + + private DevfileLocation createDevfileLocation(String devfileFilename) { + return new DevfileLocation() { + @Override + public Optional filename() { + return Optional.of(devfileFilename); + } + + @Override + public String location() { + return devfileFilename; + } + }; + } + + @Override + public String getHostName() { + return hostName; + } + + public GitSshUrl withHostName(String hostName) { + this.hostName = hostName; + return this; + } + + public String getRepositoryLocation() { + return repositoryLocation; + } + + public GitSshUrl withRepositoryLocation(String repositoryLocation) { + this.repositoryLocation = repositoryLocation; + return this; + } + + public String getRepository() { + return repository; + } + + public GitSshUrl withRepository(String repository) { + this.repository = repository; + return this; + } +} diff --git a/wsmaster/che-core-api-factory-git-ssh/src/test/java/org/eclipse/che/api/factory/server/git/ssh/GitSshURLParserTest.java b/wsmaster/che-core-api-factory-git-ssh/src/test/java/org/eclipse/che/api/factory/server/git/ssh/GitSshURLParserTest.java new file mode 100644 index 0000000000..715e5f544b --- /dev/null +++ b/wsmaster/che-core-api-factory-git-ssh/src/test/java/org/eclipse/che/api/factory/server/git/ssh/GitSshURLParserTest.java @@ -0,0 +1,50 @@ +/* + * Copyright (c) 2012-2023 Red Hat, Inc. + * This program and the accompanying materials are made + * available under the terms of the Eclipse Public License 2.0 + * which is available at https://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 + * + * Contributors: + * Red Hat, Inc. - initial API and implementation + */ +package org.eclipse.che.api.factory.server.git.ssh; + +import static org.mockito.Mockito.mock; +import static org.testng.Assert.assertEquals; + +import org.eclipse.che.api.factory.server.urlfactory.DevfileFilenamesProvider; +import org.mockito.testng.MockitoTestNGListener; +import org.testng.annotations.BeforeMethod; +import org.testng.annotations.DataProvider; +import org.testng.annotations.Listeners; +import org.testng.annotations.Test; + +/** @author Anatalii Bazko */ +@Listeners(MockitoTestNGListener.class) +public class GitSshURLParserTest { + + private GitSshURLParser gitSshURLParser; + + @BeforeMethod + protected void start() { + gitSshURLParser = new GitSshURLParser(mock(DevfileFilenamesProvider.class)); + } + + @Test(dataProvider = "parsing") + public void testParse(String url, String hostName, String repository) { + GitSshUrl gitSshUrl = gitSshURLParser.parse(url); + + assertEquals(gitSshUrl.getHostName(), hostName); + assertEquals(gitSshUrl.getRepository(), repository); + } + + @DataProvider(name = "parsing") + public Object[][] expectedParsing() { + return new Object[][] { + {"git@ssh.dev.azure.com:v3/MyOrg/MyProject/MyRepo", "ssh.dev.azure.com", "MyRepo"}, + {"git@github.com:MyOrg/MyRepo.git", "github.com", "MyRepo"}, + }; + } +} diff --git a/wsmaster/che-core-api-factory-git-ssh/src/test/resources/logback-test.xml b/wsmaster/che-core-api-factory-git-ssh/src/test/resources/logback-test.xml new file mode 100644 index 0000000000..704cbbf50f --- /dev/null +++ b/wsmaster/che-core-api-factory-git-ssh/src/test/resources/logback-test.xml @@ -0,0 +1,26 @@ + + + + + + %-41(%date[%.15thread]) %-45([%-5level] [%.30logger{30} %L]) - %msg%n%nopex + + + + + + + + diff --git a/wsmaster/che-core-api-factory-github/src/main/java/org/eclipse/che/api/factory/server/github/GithubFactoryParametersResolver.java b/wsmaster/che-core-api-factory-github/src/main/java/org/eclipse/che/api/factory/server/github/GithubFactoryParametersResolver.java index 477e8ce542..4c96fd8244 100644 --- a/wsmaster/che-core-api-factory-github/src/main/java/org/eclipse/che/api/factory/server/github/GithubFactoryParametersResolver.java +++ b/wsmaster/che-core-api-factory-github/src/main/java/org/eclipse/che/api/factory/server/github/GithubFactoryParametersResolver.java @@ -19,11 +19,10 @@ import static org.eclipse.che.security.oauth1.OAuthAuthenticationService.ERROR_Q import jakarta.validation.constraints.NotNull; import java.util.Map; import javax.inject.Inject; -import javax.inject.Named; import javax.inject.Singleton; import org.eclipse.che.api.core.ApiException; import org.eclipse.che.api.core.BadRequestException; -import org.eclipse.che.api.factory.server.RawDevfileUrlFactoryParameterResolver; +import org.eclipse.che.api.factory.server.FactoryParametersResolver; import org.eclipse.che.api.factory.server.scm.PersonalAccessTokenManager; import org.eclipse.che.api.factory.server.urlfactory.ProjectConfigDtoMerger; import org.eclipse.che.api.factory.server.urlfactory.RemoteFactoryUrl; @@ -36,7 +35,6 @@ import org.eclipse.che.api.factory.shared.dto.ScmInfoDto; import org.eclipse.che.api.workspace.server.devfile.URLFetcher; import org.eclipse.che.api.workspace.shared.dto.ProjectConfigDto; import org.eclipse.che.api.workspace.shared.dto.devfile.ProjectDto; -import org.eclipse.che.commons.annotation.Nullable; /** * Provides Factory Parameters resolver for github repositories. @@ -44,14 +42,18 @@ import org.eclipse.che.commons.annotation.Nullable; * @author Florent Benoit */ @Singleton -public class GithubFactoryParametersResolver extends RawDevfileUrlFactoryParameterResolver { +public class GithubFactoryParametersResolver implements FactoryParametersResolver { /** Parser which will allow to check validity of URLs and create objects. */ private final GithubURLParser githubUrlParser; + private final URLFetcher urlFetcher; + /** Builder allowing to build objects from github URL. */ private final GithubSourceStorageBuilder githubSourceStorageBuilder; + private final URLFactoryBuilder urlFactoryBuilder; + /** ProjectDtoMerger */ private final ProjectConfigDtoMerger projectConfigDtoMerger; @@ -59,32 +61,16 @@ public class GithubFactoryParametersResolver extends RawDevfileUrlFactoryParamet @Inject public GithubFactoryParametersResolver( - GithubURLParser githubUrlParser, - URLFetcher urlFetcher, - GithubSourceStorageBuilder githubSourceStorageBuilder, - URLFactoryBuilder urlFactoryBuilder, - ProjectConfigDtoMerger projectConfigDtoMerger, - PersonalAccessTokenManager personalAccessTokenManager, - @Nullable @Named("che.integration.github.oauth_endpoint") String oauthEndpoint) { - this( - githubUrlParser, - urlFetcher, - githubSourceStorageBuilder, - urlFactoryBuilder, - projectConfigDtoMerger, - personalAccessTokenManager); - } - - GithubFactoryParametersResolver( GithubURLParser githubUrlParser, URLFetcher urlFetcher, GithubSourceStorageBuilder githubSourceStorageBuilder, URLFactoryBuilder urlFactoryBuilder, ProjectConfigDtoMerger projectConfigDtoMerger, PersonalAccessTokenManager personalAccessTokenManager) { - super(urlFactoryBuilder, urlFetcher); this.githubUrlParser = githubUrlParser; + this.urlFetcher = urlFetcher; this.githubSourceStorageBuilder = githubSourceStorageBuilder; + this.urlFactoryBuilder = urlFactoryBuilder; this.projectConfigDtoMerger = projectConfigDtoMerger; this.personalAccessTokenManager = personalAccessTokenManager; } diff --git a/wsmaster/che-core-api-factory-gitlab/src/main/java/org/eclipse/che/api/factory/server/gitlab/GitlabFactoryParametersResolver.java b/wsmaster/che-core-api-factory-gitlab/src/main/java/org/eclipse/che/api/factory/server/gitlab/GitlabFactoryParametersResolver.java index cdbf4a0204..efedf3f1ee 100644 --- a/wsmaster/che-core-api-factory-gitlab/src/main/java/org/eclipse/che/api/factory/server/gitlab/GitlabFactoryParametersResolver.java +++ b/wsmaster/che-core-api-factory-gitlab/src/main/java/org/eclipse/che/api/factory/server/gitlab/GitlabFactoryParametersResolver.java @@ -22,7 +22,7 @@ import javax.inject.Inject; import javax.inject.Singleton; import org.eclipse.che.api.core.ApiException; import org.eclipse.che.api.core.BadRequestException; -import org.eclipse.che.api.factory.server.RawDevfileUrlFactoryParameterResolver; +import org.eclipse.che.api.factory.server.FactoryParametersResolver; import org.eclipse.che.api.factory.server.scm.PersonalAccessTokenManager; import org.eclipse.che.api.factory.server.urlfactory.RemoteFactoryUrl; import org.eclipse.che.api.factory.server.urlfactory.URLFactoryBuilder; @@ -41,8 +41,10 @@ import org.eclipse.che.api.workspace.shared.dto.devfile.SourceDto; * @author Max Shaposhnyk */ @Singleton -public class GitlabFactoryParametersResolver extends RawDevfileUrlFactoryParameterResolver { +public class GitlabFactoryParametersResolver implements FactoryParametersResolver { + private final URLFactoryBuilder urlFactoryBuilder; + private final URLFetcher urlFetcher; private final GitlabUrlParser gitlabURLParser; private final PersonalAccessTokenManager personalAccessTokenManager; @@ -52,7 +54,8 @@ public class GitlabFactoryParametersResolver extends RawDevfileUrlFactoryParamet URLFetcher urlFetcher, GitlabUrlParser gitlabURLParser, PersonalAccessTokenManager personalAccessTokenManager) { - super(urlFactoryBuilder, urlFetcher); + this.urlFactoryBuilder = urlFactoryBuilder; + this.urlFetcher = urlFetcher; this.gitlabURLParser = gitlabURLParser; this.personalAccessTokenManager = personalAccessTokenManager; } diff --git a/wsmaster/che-core-api-factory/src/main/java/org/eclipse/che/api/factory/server/FactoryParametersResolver.java b/wsmaster/che-core-api-factory/src/main/java/org/eclipse/che/api/factory/server/FactoryParametersResolver.java index 617b075851..d29e982e43 100644 --- a/wsmaster/che-core-api-factory/src/main/java/org/eclipse/che/api/factory/server/FactoryParametersResolver.java +++ b/wsmaster/che-core-api-factory/src/main/java/org/eclipse/che/api/factory/server/FactoryParametersResolver.java @@ -11,12 +11,20 @@ */ package org.eclipse.che.api.factory.server; +import static java.util.stream.Collectors.toMap; + import jakarta.validation.constraints.NotNull; +import java.util.Collections; +import java.util.List; import java.util.Map; +import java.util.function.Consumer; +import java.util.function.Supplier; import org.eclipse.che.api.core.ApiException; import org.eclipse.che.api.core.BadRequestException; import org.eclipse.che.api.factory.server.urlfactory.RemoteFactoryUrl; import org.eclipse.che.api.factory.shared.dto.FactoryMetaDto; +import org.eclipse.che.api.workspace.shared.dto.devfile.DevfileDto; +import org.eclipse.che.api.workspace.shared.dto.devfile.ProjectDto; /** * Defines a resolver that will produce factories for some parameters @@ -24,7 +32,6 @@ import org.eclipse.che.api.factory.shared.dto.FactoryMetaDto; * @author Florent Benoit */ public interface FactoryParametersResolver { - /** * Resolver acceptance based on the given parameters. * @@ -50,4 +57,46 @@ public interface FactoryParametersResolver { * @throws ApiException when authentication required operations fail */ RemoteFactoryUrl parseFactoryUrl(String factoryUrl) throws ApiException; + + /** + * Returns priority of the resolver. Resolvers with higher priority will be used among matched + * resolvers. + */ + default FactoryResolverPriority priority() { + return FactoryResolverPriority.DEFAULT; + } + + /** + * Finds and returns devfile override parameters in general factory parameters map. + * + * @param factoryParameters map containing factory data parameters provided through URL + * @return filtered devfile values override map + */ + default Map extractOverrideParams(Map factoryParameters) { + String overridePrefix = "override."; + return factoryParameters.entrySet().stream() + .filter(e -> e.getKey().startsWith(overridePrefix)) + .collect(toMap(e -> e.getKey().substring(overridePrefix.length()), Map.Entry::getValue)); + } + + /** + * If devfile has no projects, put there one provided by given `projectSupplier`. Otherwise update + * all projects with given `projectModifier`. + * + * @param devfile of the projects to update + * @param projectSupplier provides default project + * @param projectModifier updates existing projects + */ + default void updateProjects( + DevfileDto devfile, + Supplier projectSupplier, + Consumer projectModifier) { + List projects = devfile.getProjects(); + if (projects.isEmpty()) { + devfile.setProjects(Collections.singletonList(projectSupplier.get())); + } else { + // update existing project with same repository, set current branch if needed + projects.forEach(projectModifier); + } + } } diff --git a/wsmaster/che-core-api-factory/src/main/java/org/eclipse/che/api/factory/server/FactoryResolverPriority.java b/wsmaster/che-core-api-factory/src/main/java/org/eclipse/che/api/factory/server/FactoryResolverPriority.java new file mode 100644 index 0000000000..abbc82a57e --- /dev/null +++ b/wsmaster/che-core-api-factory/src/main/java/org/eclipse/che/api/factory/server/FactoryResolverPriority.java @@ -0,0 +1,28 @@ +/* + * Copyright (c) 2012-2023 Red Hat, Inc. + * This program and the accompanying materials are made + * available under the terms of the Eclipse Public License 2.0 + * which is available at https://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 + * + * Contributors: + * Red Hat, Inc. - initial API and implementation + */ +package org.eclipse.che.api.factory.server; + +public enum FactoryResolverPriority { + DEFAULT(1), + HIGHEST(2), + LOWEST(0); + + private final int value; + + FactoryResolverPriority(int value) { + this.value = value; + } + + public int getValue() { + return value; + } +} diff --git a/wsmaster/che-core-api-factory/src/main/java/org/eclipse/che/api/factory/server/FactoryService.java b/wsmaster/che-core-api-factory/src/main/java/org/eclipse/che/api/factory/server/FactoryService.java index 580e42f4af..6a5b030d3a 100644 --- a/wsmaster/che-core-api-factory/src/main/java/org/eclipse/che/api/factory/server/FactoryService.java +++ b/wsmaster/che-core-api-factory/src/main/java/org/eclipse/che/api/factory/server/FactoryService.java @@ -13,6 +13,7 @@ package org.eclipse.che.api.factory.server; import static jakarta.ws.rs.core.MediaType.APPLICATION_JSON; import static java.util.Collections.singletonMap; +import static java.util.Comparator.comparingInt; import static org.eclipse.che.api.factory.server.ApiExceptionMapper.toApiException; import static org.eclipse.che.api.factory.server.FactoryLinksHelper.createLinks; import static org.eclipse.che.api.factory.shared.Constants.URL_PARAMETER_NAME; @@ -28,6 +29,7 @@ import jakarta.ws.rs.Path; import jakarta.ws.rs.Produces; import jakarta.ws.rs.QueryParam; import java.util.Map; +import java.util.Optional; import java.util.Set; import javax.inject.Inject; import org.eclipse.che.api.core.ApiException; @@ -175,8 +177,6 @@ public class FactoryService extends Service { @SuppressWarnings("unused") private Set specificFactoryParametersResolvers; - @Inject private RawDevfileUrlFactoryParameterResolver defaultFactoryResolver; - /** * Provides a suitable resolver for the given parameters. If there is no at least one resolver * able to process parameters,then {@link BadRequestException} will be thrown @@ -185,20 +185,19 @@ public class FactoryService extends Service { */ public FactoryParametersResolver getFactoryParametersResolver(Map parameters) throws BadRequestException { - // Check if the URL is a raw devfile URL. If so, use the default resolver, - // which resolves factories from a direct URL to a devfile content. - if (defaultFactoryResolver.accept(parameters)) { - return defaultFactoryResolver; - } - for (FactoryParametersResolver factoryParametersResolver : - specificFactoryParametersResolvers) { - try { - if (factoryParametersResolver.accept(parameters)) { - return factoryParametersResolver; - } - } catch (IllegalArgumentException e) { - // ignore and try next resolver - } + Optional resolverOptional = + specificFactoryParametersResolvers.stream() + .filter( + r -> { + try { + return r.accept(parameters); + } catch (IllegalArgumentException e) { + return false; + } + }) + .max(comparingInt(r -> r.priority().getValue())); + if (resolverOptional.isPresent()) { + return resolverOptional.get(); } throw new BadRequestException(FACTORY_NOT_RESOLVABLE); } diff --git a/wsmaster/che-core-api-factory/src/main/java/org/eclipse/che/api/factory/server/RawDevfileUrlFactoryParameterResolver.java b/wsmaster/che-core-api-factory/src/main/java/org/eclipse/che/api/factory/server/RawDevfileUrlFactoryParameterResolver.java index 2c87847d6a..50e5147cbe 100644 --- a/wsmaster/che-core-api-factory/src/main/java/org/eclipse/che/api/factory/server/RawDevfileUrlFactoryParameterResolver.java +++ b/wsmaster/che-core-api-factory/src/main/java/org/eclipse/che/api/factory/server/RawDevfileUrlFactoryParameterResolver.java @@ -13,7 +13,7 @@ package org.eclipse.che.api.factory.server; import static com.google.common.base.Strings.isNullOrEmpty; import static java.lang.String.format; -import static java.util.stream.Collectors.toMap; +import static org.eclipse.che.api.factory.server.FactoryResolverPriority.HIGHEST; import static org.eclipse.che.api.factory.shared.Constants.URL_PARAMETER_NAME; import jakarta.validation.constraints.NotNull; @@ -21,14 +21,8 @@ import java.net.MalformedURLException; import java.net.URI; import java.net.URISyntaxException; import java.net.URL; -import java.util.Collections; -import java.util.List; import java.util.Map; -import java.util.Map.Entry; -import java.util.function.Consumer; -import java.util.function.Supplier; import javax.inject.Inject; -import javax.inject.Singleton; import org.eclipse.che.api.core.ApiException; import org.eclipse.che.api.core.BadRequestException; import org.eclipse.che.api.factory.server.urlfactory.DefaultFactoryUrl; @@ -37,18 +31,13 @@ import org.eclipse.che.api.factory.server.urlfactory.URLFactoryBuilder; import org.eclipse.che.api.factory.shared.dto.FactoryMetaDto; import org.eclipse.che.api.workspace.server.devfile.URLFetcher; import org.eclipse.che.api.workspace.server.devfile.URLFileContentProvider; -import org.eclipse.che.api.workspace.shared.dto.devfile.DevfileDto; -import org.eclipse.che.api.workspace.shared.dto.devfile.ProjectDto; /** * {@link FactoryParametersResolver} implementation to resolve factory based on url parameter as a * direct URL to a devfile content. Extracts and applies devfile values override parameters. */ -@Singleton public class RawDevfileUrlFactoryParameterResolver implements FactoryParametersResolver { - private static final String OVERRIDE_PREFIX = "override."; - protected final URLFactoryBuilder urlFactoryBuilder; protected final URLFetcher urlFetcher; @@ -109,36 +98,8 @@ public class RawDevfileUrlFactoryParameterResolver implements FactoryParametersR throw new ApiException("Operation is not supported"); } - /** - * Finds and returns devfile override parameters in general factory parameters map. - * - * @param factoryParameters map containing factory data parameters provided through URL - * @return filtered devfile values override map - */ - protected Map extractOverrideParams(Map factoryParameters) { - return factoryParameters.entrySet().stream() - .filter(e -> e.getKey().startsWith(OVERRIDE_PREFIX)) - .collect(toMap(e -> e.getKey().substring(OVERRIDE_PREFIX.length()), Entry::getValue)); - } - - /** - * If devfile has no projects, put there one provided by given `projectSupplier`. Otherwise update - * all projects with given `projectModifier`. - * - * @param devfile of the projects to update - * @param projectSupplier provides default project - * @param projectModifier updates existing projects - */ - protected void updateProjects( - DevfileDto devfile, - Supplier projectSupplier, - Consumer projectModifier) { - List projects = devfile.getProjects(); - if (projects.isEmpty()) { - devfile.setProjects(Collections.singletonList(projectSupplier.get())); - } else { - // update existing project with same repository, set current branch if needed - projects.forEach(projectModifier); - } + @Override + public FactoryResolverPriority priority() { + return HIGHEST; } } diff --git a/wsmaster/che-core-api-factory/src/main/java/org/eclipse/che/api/factory/server/scm/AuthorizingFileContentProvider.java b/wsmaster/che-core-api-factory/src/main/java/org/eclipse/che/api/factory/server/scm/AuthorizingFileContentProvider.java index 3cae693181..1bb4fbcfa1 100644 --- a/wsmaster/che-core-api-factory/src/main/java/org/eclipse/che/api/factory/server/scm/AuthorizingFileContentProvider.java +++ b/wsmaster/che-core-api-factory/src/main/java/org/eclipse/che/api/factory/server/scm/AuthorizingFileContentProvider.java @@ -92,7 +92,7 @@ public class AuthorizingFileContentProvider return urlFetcher.fetch(requestURL, authorization); } } catch (UnknownScmProviderException e) { - return fetchContentWithoutToken(requestURL, e); + return fetchContentWithoutToken(requestURL); } catch (ScmCommunicationException e) { return toIOException(fileURL, e); } catch (ScmUnauthorizedException @@ -102,7 +102,7 @@ public class AuthorizingFileContentProvider } } - protected String fetchContentWithoutToken(String requestURL, UnknownScmProviderException e) + protected String fetchContentWithoutToken(String requestURL) throws DevfileException, IOException { // we don't have any provider matching this SCM provider // so try without secrets being configured @@ -123,7 +123,7 @@ public class AuthorizingFileContentProvider } } throw new DevfileException( - String.format("%s: %s", e.getMessage(), exception.getMessage()), exception); + "Could not reach devfile at " + "`" + exception.getMessage() + "`", exception); } } diff --git a/wsmaster/che-core-api-factory/src/test/java/org/eclipse/che/api/factory/server/FactoryServiceTest.java b/wsmaster/che-core-api-factory/src/test/java/org/eclipse/che/api/factory/server/FactoryServiceTest.java index 77157764af..44046b990f 100644 --- a/wsmaster/che-core-api-factory/src/test/java/org/eclipse/che/api/factory/server/FactoryServiceTest.java +++ b/wsmaster/che-core-api-factory/src/test/java/org/eclipse/che/api/factory/server/FactoryServiceTest.java @@ -15,6 +15,9 @@ import static io.restassured.RestAssured.given; import static jakarta.ws.rs.core.Response.Status.BAD_REQUEST; import static java.lang.String.valueOf; import static java.util.Collections.singletonMap; +import static org.eclipse.che.api.factory.server.FactoryResolverPriority.DEFAULT; +import static org.eclipse.che.api.factory.server.FactoryResolverPriority.HIGHEST; +import static org.eclipse.che.api.factory.server.FactoryResolverPriority.LOWEST; import static org.eclipse.che.api.factory.server.FactoryService.VALIDATE_QUERY_PARAMETER; import static org.eclipse.che.api.factory.shared.Constants.CURRENT_VERSION; import static org.eclipse.che.api.factory.shared.Constants.URL_PARAMETER_NAME; @@ -35,40 +38,27 @@ import static org.mockito.Mockito.when; import static org.testng.Assert.assertEquals; import static org.testng.Assert.assertTrue; -import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; import io.restassured.http.ContentType; import io.restassured.response.Response; -import java.io.IOException; -import java.util.ArrayList; +import java.lang.reflect.Field; import java.util.HashMap; -import java.util.List; +import java.util.HashSet; import java.util.Map; +import java.util.Set; import org.eclipse.che.api.core.BadRequestException; import org.eclipse.che.api.core.model.user.User; -import org.eclipse.che.api.core.model.workspace.WorkspaceConfig; -import org.eclipse.che.api.core.model.workspace.config.ProjectConfig; import org.eclipse.che.api.core.rest.ApiExceptionMapper; import org.eclipse.che.api.core.rest.shared.dto.ServiceError; import org.eclipse.che.api.factory.server.FactoryService.FactoryParametersResolverHolder; import org.eclipse.che.api.factory.server.builder.FactoryBuilder; import org.eclipse.che.api.factory.server.impl.SourceStorageParametersValidator; -import org.eclipse.che.api.factory.server.model.impl.AuthorImpl; -import org.eclipse.che.api.factory.server.model.impl.FactoryImpl; import org.eclipse.che.api.factory.server.scm.PersonalAccessTokenManager; import org.eclipse.che.api.factory.server.urlfactory.RemoteFactoryUrl; import org.eclipse.che.api.factory.shared.dto.FactoryDto; import org.eclipse.che.api.user.server.PreferenceManager; import org.eclipse.che.api.user.server.UserManager; import org.eclipse.che.api.user.server.model.impl.UserImpl; -import org.eclipse.che.api.workspace.server.model.impl.EnvironmentImpl; -import org.eclipse.che.api.workspace.server.model.impl.MachineConfigImpl; -import org.eclipse.che.api.workspace.server.model.impl.ProjectConfigImpl; -import org.eclipse.che.api.workspace.server.model.impl.RecipeImpl; -import org.eclipse.che.api.workspace.server.model.impl.ServerConfigImpl; -import org.eclipse.che.api.workspace.server.model.impl.SourceStorageImpl; -import org.eclipse.che.api.workspace.server.model.impl.WorkspaceConfigImpl; -import org.eclipse.che.api.workspace.shared.dto.EnvironmentDto; import org.eclipse.che.commons.env.EnvironmentContext; import org.eclipse.che.commons.subject.SubjectImpl; import org.eclipse.che.dto.server.DtoFactory; @@ -111,6 +101,7 @@ public class FactoryServiceTest { @Mock private PersonalAccessTokenManager personalAccessTokenManager; @InjectMocks private FactoryParametersResolverHolder factoryParametersResolverHolder; + private Set specificFactoryParametersResolvers; private FactoryBuilder factoryBuilderSpy; @@ -126,6 +117,13 @@ public class FactoryServiceTest { @BeforeMethod public void setUp() throws Exception { + specificFactoryParametersResolvers = new HashSet<>(); + Field parametersResolvers = + FactoryParametersResolverHolder.class.getDeclaredField( + "specificFactoryParametersResolvers"); + parametersResolvers.setAccessible(true); + parametersResolvers.set(factoryParametersResolverHolder, specificFactoryParametersResolvers); + specificFactoryParametersResolvers.add(rawDevfileUrlFactoryParameterResolver); factoryBuilderSpy = spy(new FactoryBuilder(new SourceStorageParametersValidator())); lenient().doNothing().when(factoryBuilderSpy).checkValid(any(FactoryDto.class)); lenient().doNothing().when(factoryBuilderSpy).checkValid(any(FactoryDto.class), anyBoolean()); @@ -284,62 +282,71 @@ public class FactoryServiceTest { .startsWith(RawDevfileUrlFactoryParameterResolver.class.getName())); } - private FactoryImpl createFactory() { - return createNamedFactory(FACTORY_NAME); + @Test + public void shouldReturnTopPriorityFactoryParameterResolverOverLowPriority() throws Exception { + // given + Map params = singletonMap(URL_PARAMETER_NAME, "https://host/path/devfile.yaml"); + specificFactoryParametersResolvers.clear(); + FactoryParametersResolver topPriorityResolver = mock(FactoryParametersResolver.class); + FactoryParametersResolver lowPriorityResolver = mock(FactoryParametersResolver.class); + when(topPriorityResolver.accept(eq(params))).thenReturn(true); + when(lowPriorityResolver.accept(eq(params))).thenReturn(true); + when(topPriorityResolver.priority()).thenReturn(HIGHEST); + when(lowPriorityResolver.priority()).thenReturn(LOWEST); + specificFactoryParametersResolvers.add(topPriorityResolver); + specificFactoryParametersResolvers.add(lowPriorityResolver); + + // when + FactoryParametersResolver factoryParametersResolver = + factoryParametersResolverHolder.getFactoryParametersResolver(params); + + // then + assertEquals(factoryParametersResolver, topPriorityResolver); } - private FactoryImpl createNamedFactory(String name) { - return createFactoryWithStorage(name, PROJECT_SOURCE_TYPE, PROJECT_SOURCE_LOCATION); + @Test + public void shouldReturnTopPriorityFactoryParameterResolverOverDefaultPriority() + throws Exception { + // given + Map params = singletonMap(URL_PARAMETER_NAME, "https://host/path/devfile.yaml"); + specificFactoryParametersResolvers.clear(); + FactoryParametersResolver topPriorityResolver = mock(FactoryParametersResolver.class); + FactoryParametersResolver defaultPriorityResolver = mock(FactoryParametersResolver.class); + when(topPriorityResolver.accept(eq(params))).thenReturn(true); + when(defaultPriorityResolver.accept(eq(params))).thenReturn(true); + when(topPriorityResolver.priority()).thenReturn(HIGHEST); + when(defaultPriorityResolver.priority()).thenReturn(DEFAULT); + specificFactoryParametersResolvers.add(topPriorityResolver); + specificFactoryParametersResolvers.add(defaultPriorityResolver); + + // when + FactoryParametersResolver factoryParametersResolver = + factoryParametersResolverHolder.getFactoryParametersResolver(params); + + // then + assertEquals(factoryParametersResolver, topPriorityResolver); } - private FactoryImpl createFactoryWithStorage(String name, String type, String location) { - return FactoryImpl.builder() - .setId(FACTORY_ID) - .setVersion("4.0") - .setWorkspace(createWorkspaceConfig(type, location)) - .setCreator(new AuthorImpl(USER_ID, 12L)) - .setName(name) - .build(); - } + @Test + public void shouldReturnDefaultPriorityFactoryParameterResolverOverLowPriority() + throws Exception { + // given + Map params = singletonMap(URL_PARAMETER_NAME, "https://host/path/devfile.yaml"); + specificFactoryParametersResolvers.clear(); + FactoryParametersResolver lowPriorityResolver = mock(FactoryParametersResolver.class); + FactoryParametersResolver defaultPriorityResolver = mock(FactoryParametersResolver.class); + when(lowPriorityResolver.accept(eq(params))).thenReturn(true); + when(defaultPriorityResolver.accept(eq(params))).thenReturn(true); + when(lowPriorityResolver.priority()).thenReturn(LOWEST); + when(defaultPriorityResolver.priority()).thenReturn(DEFAULT); + specificFactoryParametersResolvers.add(lowPriorityResolver); + specificFactoryParametersResolvers.add(defaultPriorityResolver); - private static WorkspaceConfig createWorkspaceConfig(String type, String location) { - return WorkspaceConfigImpl.builder() - .setName(WORKSPACE_NAME) - .setEnvironments(singletonMap("env1", new EnvironmentImpl(createEnvDto()))) - .setProjects(createProjects(type, location)) - .build(); - } + // when + FactoryParametersResolver factoryParametersResolver = + factoryParametersResolverHolder.getFactoryParametersResolver(params); - private static EnvironmentDto createEnvDto() { - final RecipeImpl environmentRecipe = new RecipeImpl(); - environmentRecipe.setType("type"); - environmentRecipe.setContent("content"); - environmentRecipe.setContentType("compose"); - environmentRecipe.setLocation("location"); - final EnvironmentImpl env = new EnvironmentImpl(); - final MachineConfigImpl extendedMachine = new MachineConfigImpl(); - extendedMachine.setAttributes(singletonMap("att1", "value")); - extendedMachine.setServers( - singletonMap( - "agent", new ServerConfigImpl("5555", "https", "path", singletonMap("key", "value")))); - env.setRecipe(environmentRecipe); - env.setMachines(singletonMap("machine1", extendedMachine)); - return org.eclipse.che.api.workspace.server.DtoConverter.asDto(env); - } - - private static List createProjects(String type, String location) { - final ProjectConfigImpl projectConfig = new ProjectConfigImpl(); - projectConfig.setSource(new SourceStorageImpl(type, location, null)); - return ImmutableList.of(projectConfig); - } - - private static T getFromResponse(Response response, Class clazz) throws Exception { - return DTO.createDtoFromJson(response.getBody().asInputStream(), clazz); - } - - private static List unwrapDtoList(Response response, Class dtoClass) - throws IOException { - return new ArrayList<>( - DtoFactory.getInstance().createListDtoFromJson(response.body().asInputStream(), dtoClass)); + // then + assertEquals(factoryParametersResolver, defaultPriorityResolver); } } diff --git a/wsmaster/pom.xml b/wsmaster/pom.xml index 8ebb3cb90f..2eaf61d8d1 100644 --- a/wsmaster/pom.xml +++ b/wsmaster/pom.xml @@ -40,6 +40,7 @@ che-core-api-account che-core-api-user che-core-api-factory-azure-devops + che-core-api-factory-git-ssh che-core-api-factory-shared che-core-api-factory che-core-api-factory-github From a28e1553d28be6523c767744c8fd6b73ac212d33 Mon Sep 17 00:00:00 2001 From: Anatolii Bazko Date: Mon, 25 Sep 2023 14:54:49 +0200 Subject: [PATCH 65/75] =?UTF-8?q?chore:=20Add=20tests=20to=20start=20a=20w?= =?UTF-8?q?orkspace=20from=20raw=20devfile=20and=20ssh=20urls=20f=E2=80=A6?= =?UTF-8?q?=20(#569)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * chore: Add tests to start a workspace from raw devfile and ssh urls for GITEA provider Signed-off-by: Anatolii Bazko --- .../test-gitea-no-pat-oauth-flow.sh | 43 +++++++++++++++++++ .../test-gitea-with-pat-setup-flow.sh | 31 +++++++++++++ 2 files changed, 74 insertions(+) create mode 100644 .ci/openshift-ci/test-gitea-no-pat-oauth-flow.sh create mode 100644 .ci/openshift-ci/test-gitea-with-pat-setup-flow.sh diff --git a/.ci/openshift-ci/test-gitea-no-pat-oauth-flow.sh b/.ci/openshift-ci/test-gitea-no-pat-oauth-flow.sh new file mode 100644 index 0000000000..9ff5e93c2e --- /dev/null +++ b/.ci/openshift-ci/test-gitea-no-pat-oauth-flow.sh @@ -0,0 +1,43 @@ +#!/bin/bash +# +# Copyright (c) 2023 Red Hat, Inc. +# This program and the accompanying materials are made +# available under the terms of the Eclipse Public License 2.0 +# which is available at https://www.eclipse.org/legal/epl-2.0/ +# +# SPDX-License-Identifier: EPL-2.0 +# +# Contributors: +# Red Hat, Inc. - initial API and implementation +# + +# exit immediately when a command fails +set -ex +# only exit with zero if all commands of the pipeline exit successfully +set -o pipefail + +export PUBLIC_REPO_SSH_URL=${PUBLIC_REPO_SSH_URL:-"git@gitea.com:chepullreq1/public-repo.git"} +export PRIVATE_REPO_SSH_URL=${PRIVATE_REPO_SSH_URL:-"git@gitea.com:chepullreq1/private-repo.git"} +export PUBLIC_REPO_RAW_PATH_URL=${PUBLIC_REPO_RAW_PATH_URL:-"https://gitea.com/chepullreq1/public-repo/raw/branch/main/devfile.yaml"} + +# import common test functions +SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )" +source "${SCRIPT_DIR}"/common.sh + +trap "catchFinish" EXIT SIGINT + +setupTestEnvironment ${OCP_NON_ADMIN_USER_NAME} +setupSSHKeyPairs "${GITEA_PRIVATE_KEY}" "${GITEA_PUBLIC_KEY}" + +testFactoryResolverResponse ${PUBLIC_REPO_SSH_URL} 200 +testFactoryResolverResponse ${PRIVATE_REPO_SSH_URL} 200 +testFactoryResolverResponse ${PUBLIC_REPO_RAW_PATH_URL} 200 + +testCloneGitRepoProjectShouldExists ${PUBLIC_REPO_WORKSPACE_NAME} ${PUBLIC_PROJECT_NAME} ${PUBLIC_REPO_SSH_URL} ${USER_CHE_NAMESPACE} +deleteTestWorkspace ${PUBLIC_REPO_WORKSPACE_NAME} ${USER_CHE_NAMESPACE} + +testCloneGitRepoNoProjectExists ${PUBLIC_REPO_WORKSPACE_NAME} ${PUBLIC_PROJECT_NAME} ${PUBLIC_REPO_RAW_PATH_URL} ${USER_CHE_NAMESPACE} +deleteTestWorkspace ${PUBLIC_REPO_WORKSPACE_NAME} ${USER_CHE_NAMESPACE} + +testCloneGitRepoProjectShouldExists ${PRIVATE_REPO_WORKSPACE_NAME} ${PRIVATE_PROJECT_NAME} ${PRIVATE_REPO_SSH_URL} ${USER_CHE_NAMESPACE} +deleteTestWorkspace ${PRIVATE_REPO_WORKSPACE_NAME} ${USER_CHE_NAMESPACE} diff --git a/.ci/openshift-ci/test-gitea-with-pat-setup-flow.sh b/.ci/openshift-ci/test-gitea-with-pat-setup-flow.sh new file mode 100644 index 0000000000..896af7763d --- /dev/null +++ b/.ci/openshift-ci/test-gitea-with-pat-setup-flow.sh @@ -0,0 +1,31 @@ +#!/bin/bash +# +# Copyright (c) 2023 Red Hat, Inc. +# This program and the accompanying materials are made +# available under the terms of the Eclipse Public License 2.0 +# which is available at https://www.eclipse.org/legal/epl-2.0/ +# +# SPDX-License-Identifier: EPL-2.0 +# +# Contributors: +# Red Hat, Inc. - initial API and implementation +# + +# exit immediately when a command fails +set -ex +# only exit with zero if all commands of the pipeline exit successfully +set -o pipefail + +export PRIVATE_REPO_RAW_PATH_URL=${PRIVATE_REPO_RAW_PATH_URL:-"https://${GITEA_PAT}@gitea.com/chepullreq1/private-repo/raw/branch/main/devfile.yaml"} + +# import common test functions +SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )" +source "${SCRIPT_DIR}"/common.sh + +trap "catchFinish" EXIT SIGINT + +setupTestEnvironment ${OCP_NON_ADMIN_USER_NAME} +testFactoryResolverResponse ${PRIVATE_REPO_RAW_PATH_URL} 200 + +testCloneGitRepoNoProjectExists ${PRIVATE_REPO_WORKSPACE_NAME} ${PRIVATE_PROJECT_NAME} ${PRIVATE_REPO_RAW_PATH_URL} ${USER_CHE_NAMESPACE} +deleteTestWorkspace ${PRIVATE_REPO_WORKSPACE_NAME} ${USER_CHE_NAMESPACE} From 9a553b6344e02629b7a5e117e560760c1e418e39 Mon Sep 17 00:00:00 2001 From: che-bot <39771996+che-bot@users.noreply.github.com> Date: Mon, 25 Sep 2023 15:17:02 +0200 Subject: [PATCH 66/75] chore: Update from ubi8-minimal:8.8-1037 to ubi8-minimal:8.8-1072 (#570) Signed-off-by: Nick Boldt Co-authored-by: Nick Boldt --- dockerfiles/che/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dockerfiles/che/Dockerfile b/dockerfiles/che/Dockerfile index 91e4822ca6..b737db1b68 100644 --- a/dockerfiles/che/Dockerfile +++ b/dockerfiles/che/Dockerfile @@ -10,7 +10,7 @@ # # https://access.redhat.com/containers/?tab=tags#/registry.access.redhat.com/ubi8-minimal -FROM registry.access.redhat.com/ubi8-minimal:8.8-1037 +FROM registry.access.redhat.com/ubi8-minimal:8.8-1072 USER root ENV CHE_HOME=/home/user/eclipse-che ENV JAVA_HOME=/usr/lib/jvm/jre From 46592e65ce9a3aa9ff2457eee6967562d6c0983a Mon Sep 17 00:00:00 2001 From: Nick Boldt Date: Mon, 25 Sep 2023 16:53:30 -0300 Subject: [PATCH 67/75] chore: update to latest com.fasterxml.jackson 2.14.z (CRW-4790, #22548) (#571) Change-Id: Iacdbd86ccc1480c8badbbc15ffe48bdb01206e44 Signed-off-by: Nick Boldt --- .gitignore | 8 ++------ README.md | 6 ++++++ pom.xml | 2 +- 3 files changed, 9 insertions(+), 7 deletions(-) diff --git a/.gitignore b/.gitignore index d29966b921..615c4b0765 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,5 @@ +.repository/ + # Eclipse # ################### @@ -11,10 +13,6 @@ test-output/ maven-eclipse.xml .factorypath -# Theia # -################## -.theia/ - # Idea # ################## *.iml @@ -48,8 +46,6 @@ maven-eclipse.xml *.war *.ear - - # Logs and databases # ###################### *.log diff --git a/README.md b/README.md index 9ac58077bf..23535e476f 100644 --- a/README.md +++ b/README.md @@ -32,6 +32,12 @@ Other modules are deprecated and will be removed in the future. # Sources build Run `mvn clean install` to build. Activate a faster profile build by adding `-Pfast`. +You can skip enforcers, validators, and tests with: + +``` +mvn clean install -V -B -e -Pfast -DskipTests -Dskip-validate-sources -Denforcer.skip=true -Dmaven.repo.local=.repository/ +``` + # Image build and push 1. Go to the `dockerfiles` directory. 2. Run `./build.sh`. diff --git a/pom.xml b/pom.xml index b6386b7de5..fd2e7d89f6 100644 --- a/pom.xml +++ b/pom.xml @@ -50,7 +50,7 @@ 1.0 1.2.11 0.20.0 - 2.14.1 + 2.14.3 1.7.1 2.32.0 5.0.1 From b2ff110da5d227ca6b55669f8fbbe854e5c22d65 Mon Sep 17 00:00:00 2001 From: Igor Vinokur Date: Wed, 27 Sep 2023 14:20:27 +0300 Subject: [PATCH 68/75] Encode the authentication reject error to build a proper callback url (#568) Encode the &error_code=access_denied query param for the callback url in order to fix the bug when the authentication request appears again if it was rejected. --- .../che/security/oauth/EmbeddedOAuthAPI.java | 24 +++++++++++++++--- .../security/oauth/EmbeddedOAuthAPITest.java | 25 ++++++++++++++++++- 2 files changed, 45 insertions(+), 4 deletions(-) diff --git a/wsmaster/che-core-api-auth/src/main/java/org/eclipse/che/security/oauth/EmbeddedOAuthAPI.java b/wsmaster/che-core-api-auth/src/main/java/org/eclipse/che/security/oauth/EmbeddedOAuthAPI.java index 35e0b4a874..f04d2832e5 100644 --- a/wsmaster/che-core-api-auth/src/main/java/org/eclipse/che/security/oauth/EmbeddedOAuthAPI.java +++ b/wsmaster/che-core-api-auth/src/main/java/org/eclipse/che/security/oauth/EmbeddedOAuthAPI.java @@ -12,6 +12,7 @@ package org.eclipse.che.security.oauth; import static com.google.common.base.Strings.isNullOrEmpty; +import static java.nio.charset.StandardCharsets.UTF_8; import static java.util.Collections.emptyList; import static org.eclipse.che.commons.lang.UrlUtils.*; import static org.eclipse.che.commons.lang.UrlUtils.getParameter; @@ -24,8 +25,10 @@ import jakarta.ws.rs.core.Response; import jakarta.ws.rs.core.UriBuilder; import jakarta.ws.rs.core.UriInfo; import java.io.IOException; +import java.net.MalformedURLException; import java.net.URI; import java.net.URL; +import java.net.URLEncoder; import java.util.*; import javax.inject.Inject; import javax.inject.Named; @@ -84,9 +87,7 @@ public class EmbeddedOAuthAPI implements OAuthAPI, OAuthTokenFetcher { if (!isNullOrEmpty(redirectAfterLogin) && errorValues != null && errorValues.contains("access_denied")) { - return Response.temporaryRedirect( - URI.create(redirectAfterLogin + "&error_code=access_denied")) - .build(); + return Response.temporaryRedirect(URI.create(encodeRedirectUrl())).build(); } final String providerName = getParameter(params, "oauth_provider"); OAuthAuthenticator oauth = getAuthenticator(providerName); @@ -104,6 +105,23 @@ public class EmbeddedOAuthAPI implements OAuthAPI, OAuthTokenFetcher { return Response.temporaryRedirect(URI.create(redirectAfterLogin)).build(); } + /** + * Encode the redirect URL query parameters to avoid the error when the redirect URL contains + * JSON, as a query parameter. This prevents passing unsupported characters, like '{' and '}' to + * the {@link URI#create(String)} method. + */ + private String encodeRedirectUrl() { + try { + URL url = new URL(redirectAfterLogin); + String query = url.getQuery(); + return redirectAfterLogin.substring(0, redirectAfterLogin.indexOf(query)) + + URLEncoder.encode(query + "&error_code=access_denied", UTF_8); + } catch (MalformedURLException e) { + LOG.error(e.getMessage(), e); + throw new RuntimeException(e); + } + } + @Override public Set getRegisteredAuthenticators(UriInfo uriInfo) { Set result = new HashSet<>(); diff --git a/wsmaster/che-core-api-auth/src/test/java/org/eclipse/che/security/oauth/EmbeddedOAuthAPITest.java b/wsmaster/che-core-api-auth/src/test/java/org/eclipse/che/security/oauth/EmbeddedOAuthAPITest.java index 74269621d3..53670aa6e4 100644 --- a/wsmaster/che-core-api-auth/src/test/java/org/eclipse/che/security/oauth/EmbeddedOAuthAPITest.java +++ b/wsmaster/che-core-api-auth/src/test/java/org/eclipse/che/security/oauth/EmbeddedOAuthAPITest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012-2018 Red Hat, Inc. + * Copyright (c) 2012-2023 Red Hat, Inc. * This program and the accompanying materials are made * available under the terms of the Eclipse Public License 2.0 * which is available at https://www.eclipse.org/legal/epl-2.0/ @@ -11,6 +11,7 @@ */ package org.eclipse.che.security.oauth; +import static java.util.Collections.singletonList; import static org.eclipse.che.dto.server.DtoFactory.newDto; import static org.mockito.ArgumentMatchers.anyString; import static org.mockito.ArgumentMatchers.eq; @@ -18,6 +19,10 @@ import static org.mockito.Mockito.mock; import static org.mockito.Mockito.when; import static org.testng.Assert.assertEquals; +import jakarta.ws.rs.core.Response; +import jakarta.ws.rs.core.UriInfo; +import java.lang.reflect.Field; +import java.net.URI; import org.eclipse.che.api.auth.shared.dto.OAuthToken; import org.eclipse.che.api.core.NotFoundException; import org.mockito.InjectMocks; @@ -54,4 +59,22 @@ public class EmbeddedOAuthAPITest { assertEquals(result.getToken(), token); } + + @Test + public void shouldEncodeRejectErrorForRedirectUrl() throws Exception { + // given + UriInfo uriInfo = mock(UriInfo.class); + when(uriInfo.getRequestUri()).thenReturn(new URI("http://eclipse.che")); + Field redirectAfterLogin = EmbeddedOAuthAPI.class.getDeclaredField("redirectAfterLogin"); + redirectAfterLogin.setAccessible(true); + redirectAfterLogin.set(embeddedOAuthAPI, "http://eclipse.che?quary=param"); + + // when + Response callback = embeddedOAuthAPI.callback(uriInfo, singletonList("access_denied")); + + // then + assertEquals( + callback.getLocation().toString(), + "http://eclipse.che?quary%3Dparam%26error_code%3Daccess_denied"); + } } From 2f2a9398234f88182c0062eff934304ba70e5a73 Mon Sep 17 00:00:00 2001 From: Mykhailo Kuznietsov Date: Wed, 27 Sep 2023 17:00:20 +0000 Subject: [PATCH 69/75] chore: Bump to 7.76.0-SNAPSHOT in main Signed-off-by: Mykhailo Kuznietsov --- assembly/assembly-che-tomcat/pom.xml | 2 +- assembly/assembly-main/pom.xml | 2 +- assembly/assembly-root-war/pom.xml | 2 +- assembly/assembly-swagger-war/pom.xml | 2 +- assembly/assembly-wsmaster-war/pom.xml | 2 +- assembly/pom.xml | 2 +- core/che-core-api-core/pom.xml | 2 +- core/che-core-api-dto-maven-plugin/pom.xml | 2 +- core/che-core-api-dto/pom.xml | 2 +- core/che-core-api-model/pom.xml | 2 +- core/che-core-db-vendor-h2/pom.xml | 2 +- core/che-core-db-vendor-mysql/pom.xml | 2 +- core/che-core-db-vendor-postgresql/pom.xml | 2 +- core/che-core-db/pom.xml | 2 +- core/che-core-logback/pom.xml | 2 +- core/che-core-metrics-core/pom.xml | 2 +- core/che-core-tracing-core/pom.xml | 2 +- core/che-core-tracing-metrics/pom.xml | 2 +- core/che-core-tracing-web/pom.xml | 2 +- core/che-core-typescript-dto-maven-plugin/pom.xml | 2 +- core/commons/che-core-commons-annotations/pom.xml | 2 +- core/commons/che-core-commons-inject/pom.xml | 2 +- core/commons/che-core-commons-j2ee/pom.xml | 2 +- core/commons/che-core-commons-json/pom.xml | 2 +- core/commons/che-core-commons-lang/pom.xml | 2 +- core/commons/che-core-commons-observability/pom.xml | 2 +- core/commons/che-core-commons-schedule/pom.xml | 2 +- core/commons/che-core-commons-test/pom.xml | 2 +- core/commons/che-core-commons-tracing/pom.xml | 2 +- core/commons/pom.xml | 2 +- core/pom.xml | 2 +- infrastructures/infrastructure-distributed/pom.xml | 2 +- infrastructures/infrastructure-factory/pom.xml | 2 +- infrastructures/infrastructure-metrics/pom.xml | 2 +- infrastructures/infrastructure-permission/pom.xml | 2 +- infrastructures/kubernetes/pom.xml | 2 +- infrastructures/openshift/pom.xml | 2 +- infrastructures/pom.xml | 2 +- .../api/che-multiuser-api-authentication-commons/pom.xml | 2 +- multiuser/api/che-multiuser-api-authorization-impl/pom.xml | 2 +- multiuser/api/che-multiuser-api-authorization/pom.xml | 2 +- multiuser/api/che-multiuser-api-organization-shared/pom.xml | 2 +- multiuser/api/che-multiuser-api-organization/pom.xml | 2 +- multiuser/api/che-multiuser-api-permission-shared/pom.xml | 2 +- multiuser/api/che-multiuser-api-permission/pom.xml | 2 +- multiuser/api/che-multiuser-api-resource-shared/pom.xml | 2 +- multiuser/api/che-multiuser-api-resource/pom.xml | 2 +- multiuser/api/che-multiuser-api-workspace-activity/pom.xml | 2 +- multiuser/api/pom.xml | 2 +- .../integration-tests/che-multiuser-cascade-removal/pom.xml | 2 +- multiuser/integration-tests/che-multiuser-mysql-tck/pom.xml | 2 +- .../integration-tests/che-multiuser-postgresql-tck/pom.xml | 2 +- multiuser/integration-tests/pom.xml | 2 +- multiuser/keycloak/che-multiuser-keycloak-server/pom.xml | 2 +- multiuser/keycloak/che-multiuser-keycloak-shared/pom.xml | 2 +- .../keycloak/che-multiuser-keycloak-token-provider/pom.xml | 2 +- .../keycloak/che-multiuser-keycloak-user-remover/pom.xml | 2 +- multiuser/keycloak/pom.xml | 2 +- .../che-multiuser-machine-authentication-shared/pom.xml | 2 +- .../machine-auth/che-multiuser-machine-authentication/pom.xml | 2 +- multiuser/machine-auth/pom.xml | 2 +- multiuser/oidc/pom.xml | 2 +- multiuser/permission/che-multiuser-permission-devfile/pom.xml | 2 +- multiuser/permission/che-multiuser-permission-logger/pom.xml | 2 +- .../permission/che-multiuser-permission-resource/pom.xml | 2 +- multiuser/permission/che-multiuser-permission-system/pom.xml | 2 +- multiuser/permission/che-multiuser-permission-user/pom.xml | 2 +- .../che-multiuser-permission-workspace-activity/pom.xml | 2 +- .../permission/che-multiuser-permission-workspace/pom.xml | 2 +- multiuser/permission/pom.xml | 2 +- multiuser/personal-account/pom.xml | 2 +- multiuser/pom.xml | 2 +- multiuser/sql-schema/pom.xml | 2 +- pom.xml | 4 ++-- typescript-dto/dto-pom.xml | 2 +- wsmaster/che-core-api-account/pom.xml | 2 +- wsmaster/che-core-api-auth-azure-devops/pom.xml | 2 +- wsmaster/che-core-api-auth-bitbucket/pom.xml | 2 +- wsmaster/che-core-api-auth-github/pom.xml | 2 +- wsmaster/che-core-api-auth-gitlab/pom.xml | 2 +- wsmaster/che-core-api-auth-openshift/pom.xml | 2 +- wsmaster/che-core-api-auth-shared/pom.xml | 2 +- wsmaster/che-core-api-auth/pom.xml | 2 +- wsmaster/che-core-api-devfile-shared/pom.xml | 2 +- wsmaster/che-core-api-devfile/pom.xml | 2 +- wsmaster/che-core-api-factory-azure-devops/pom.xml | 2 +- wsmaster/che-core-api-factory-bitbucket-server/pom.xml | 2 +- wsmaster/che-core-api-factory-bitbucket/pom.xml | 2 +- wsmaster/che-core-api-factory-git-ssh/pom.xml | 2 +- wsmaster/che-core-api-factory-github/pom.xml | 2 +- wsmaster/che-core-api-factory-gitlab/pom.xml | 2 +- wsmaster/che-core-api-factory-shared/pom.xml | 2 +- wsmaster/che-core-api-factory/pom.xml | 2 +- wsmaster/che-core-api-logger-shared/pom.xml | 2 +- wsmaster/che-core-api-logger/pom.xml | 2 +- wsmaster/che-core-api-metrics/pom.xml | 2 +- wsmaster/che-core-api-ssh-shared/pom.xml | 2 +- wsmaster/che-core-api-ssh/pom.xml | 2 +- wsmaster/che-core-api-system-shared/pom.xml | 2 +- wsmaster/che-core-api-system/pom.xml | 2 +- wsmaster/che-core-api-user-shared/pom.xml | 2 +- wsmaster/che-core-api-user/pom.xml | 2 +- wsmaster/che-core-api-workspace-activity/pom.xml | 2 +- wsmaster/che-core-api-workspace-shared/pom.xml | 2 +- wsmaster/che-core-api-workspace/pom.xml | 2 +- wsmaster/che-core-sql-schema/pom.xml | 2 +- wsmaster/integration-tests/cascade-removal/pom.xml | 2 +- wsmaster/integration-tests/mysql-tck/pom.xml | 2 +- wsmaster/integration-tests/pom.xml | 2 +- wsmaster/integration-tests/postgresql-tck/pom.xml | 2 +- wsmaster/pom.xml | 2 +- 111 files changed, 112 insertions(+), 112 deletions(-) diff --git a/assembly/assembly-che-tomcat/pom.xml b/assembly/assembly-che-tomcat/pom.xml index 9f5fcafab7..eaa31e822c 100644 --- a/assembly/assembly-che-tomcat/pom.xml +++ b/assembly/assembly-che-tomcat/pom.xml @@ -17,7 +17,7 @@ che-assembly-parent org.eclipse.che - 7.75.0-SNAPSHOT + 7.76.0-SNAPSHOT assembly-che-tomcat jar diff --git a/assembly/assembly-main/pom.xml b/assembly/assembly-main/pom.xml index 986194f214..be18943403 100644 --- a/assembly/assembly-main/pom.xml +++ b/assembly/assembly-main/pom.xml @@ -17,7 +17,7 @@ che-assembly-parent org.eclipse.che - 7.75.0-SNAPSHOT + 7.76.0-SNAPSHOT assembly-main pom diff --git a/assembly/assembly-root-war/pom.xml b/assembly/assembly-root-war/pom.xml index e30607a7fc..7f713805c0 100644 --- a/assembly/assembly-root-war/pom.xml +++ b/assembly/assembly-root-war/pom.xml @@ -17,7 +17,7 @@ che-assembly-parent org.eclipse.che - 7.75.0-SNAPSHOT + 7.76.0-SNAPSHOT assembly-root-war war diff --git a/assembly/assembly-swagger-war/pom.xml b/assembly/assembly-swagger-war/pom.xml index 717e916051..803c95fc73 100644 --- a/assembly/assembly-swagger-war/pom.xml +++ b/assembly/assembly-swagger-war/pom.xml @@ -17,7 +17,7 @@ che-assembly-parent org.eclipse.che - 7.75.0-SNAPSHOT + 7.76.0-SNAPSHOT assembly-swagger-war war diff --git a/assembly/assembly-wsmaster-war/pom.xml b/assembly/assembly-wsmaster-war/pom.xml index 8d121c3ecc..742395a6b5 100644 --- a/assembly/assembly-wsmaster-war/pom.xml +++ b/assembly/assembly-wsmaster-war/pom.xml @@ -17,7 +17,7 @@ che-assembly-parent org.eclipse.che - 7.75.0-SNAPSHOT + 7.76.0-SNAPSHOT assembly-wsmaster-war war diff --git a/assembly/pom.xml b/assembly/pom.xml index b0b824f028..b1a8573aba 100644 --- a/assembly/pom.xml +++ b/assembly/pom.xml @@ -17,7 +17,7 @@ che-server org.eclipse.che - 7.75.0-SNAPSHOT + 7.76.0-SNAPSHOT ../pom.xml che-assembly-parent diff --git a/core/che-core-api-core/pom.xml b/core/che-core-api-core/pom.xml index 54bd5e1ea3..86135b9dbb 100644 --- a/core/che-core-api-core/pom.xml +++ b/core/che-core-api-core/pom.xml @@ -17,7 +17,7 @@ che-core-parent org.eclipse.che.core - 7.75.0-SNAPSHOT + 7.76.0-SNAPSHOT che-core-api-core jar diff --git a/core/che-core-api-dto-maven-plugin/pom.xml b/core/che-core-api-dto-maven-plugin/pom.xml index 8f96126a96..3c41fdfdb2 100644 --- a/core/che-core-api-dto-maven-plugin/pom.xml +++ b/core/che-core-api-dto-maven-plugin/pom.xml @@ -17,7 +17,7 @@ che-core-parent org.eclipse.che.core - 7.75.0-SNAPSHOT + 7.76.0-SNAPSHOT che-core-api-dto-maven-plugin maven-plugin diff --git a/core/che-core-api-dto/pom.xml b/core/che-core-api-dto/pom.xml index 62f08a27ac..f876b55d98 100644 --- a/core/che-core-api-dto/pom.xml +++ b/core/che-core-api-dto/pom.xml @@ -17,7 +17,7 @@ che-core-parent org.eclipse.che.core - 7.75.0-SNAPSHOT + 7.76.0-SNAPSHOT che-core-api-dto jar diff --git a/core/che-core-api-model/pom.xml b/core/che-core-api-model/pom.xml index bf4636e9a8..232297c732 100644 --- a/core/che-core-api-model/pom.xml +++ b/core/che-core-api-model/pom.xml @@ -17,7 +17,7 @@ che-core-parent org.eclipse.che.core - 7.75.0-SNAPSHOT + 7.76.0-SNAPSHOT che-core-api-model jar diff --git a/core/che-core-db-vendor-h2/pom.xml b/core/che-core-db-vendor-h2/pom.xml index 86dca7cd3c..b92ef9e750 100644 --- a/core/che-core-db-vendor-h2/pom.xml +++ b/core/che-core-db-vendor-h2/pom.xml @@ -17,7 +17,7 @@ che-core-parent org.eclipse.che.core - 7.75.0-SNAPSHOT + 7.76.0-SNAPSHOT che-core-db-vendor-h2 Che Core :: Commons :: DB :: Vendor H2 diff --git a/core/che-core-db-vendor-mysql/pom.xml b/core/che-core-db-vendor-mysql/pom.xml index 54f2683026..017d357edb 100644 --- a/core/che-core-db-vendor-mysql/pom.xml +++ b/core/che-core-db-vendor-mysql/pom.xml @@ -17,7 +17,7 @@ che-core-parent org.eclipse.che.core - 7.75.0-SNAPSHOT + 7.76.0-SNAPSHOT che-core-db-vendor-mysql Che Core :: Commons :: DB :: Vendor MySQL diff --git a/core/che-core-db-vendor-postgresql/pom.xml b/core/che-core-db-vendor-postgresql/pom.xml index df40e25b63..e6b8c64777 100644 --- a/core/che-core-db-vendor-postgresql/pom.xml +++ b/core/che-core-db-vendor-postgresql/pom.xml @@ -17,7 +17,7 @@ che-core-parent org.eclipse.che.core - 7.75.0-SNAPSHOT + 7.76.0-SNAPSHOT che-core-db-vendor-postgresql Che Core :: Commons :: DB :: Vendor PostgreSQL diff --git a/core/che-core-db/pom.xml b/core/che-core-db/pom.xml index b54cc16678..df0f55debe 100644 --- a/core/che-core-db/pom.xml +++ b/core/che-core-db/pom.xml @@ -17,7 +17,7 @@ che-core-parent org.eclipse.che.core - 7.75.0-SNAPSHOT + 7.76.0-SNAPSHOT che-core-db Che Core :: Commons :: DB diff --git a/core/che-core-logback/pom.xml b/core/che-core-logback/pom.xml index c858c34407..e2421bbc55 100644 --- a/core/che-core-logback/pom.xml +++ b/core/che-core-logback/pom.xml @@ -17,7 +17,7 @@ che-core-parent org.eclipse.che.core - 7.75.0-SNAPSHOT + 7.76.0-SNAPSHOT che-core-logback jar diff --git a/core/che-core-metrics-core/pom.xml b/core/che-core-metrics-core/pom.xml index 21d1c69f78..1aca68298d 100644 --- a/core/che-core-metrics-core/pom.xml +++ b/core/che-core-metrics-core/pom.xml @@ -17,7 +17,7 @@ che-core-parent org.eclipse.che.core - 7.75.0-SNAPSHOT + 7.76.0-SNAPSHOT che-core-metrics-core Che Core :: Commons :: Metrics :: Core diff --git a/core/che-core-tracing-core/pom.xml b/core/che-core-tracing-core/pom.xml index 371026b4f8..1fe864a70f 100644 --- a/core/che-core-tracing-core/pom.xml +++ b/core/che-core-tracing-core/pom.xml @@ -17,7 +17,7 @@ che-core-parent org.eclipse.che.core - 7.75.0-SNAPSHOT + 7.76.0-SNAPSHOT che-core-tracing-core Che Core :: Commons :: Tracing :: Core diff --git a/core/che-core-tracing-metrics/pom.xml b/core/che-core-tracing-metrics/pom.xml index 566a1dfed7..08ad03adcf 100644 --- a/core/che-core-tracing-metrics/pom.xml +++ b/core/che-core-tracing-metrics/pom.xml @@ -17,7 +17,7 @@ che-core-parent org.eclipse.che.core - 7.75.0-SNAPSHOT + 7.76.0-SNAPSHOT che-core-tracing-metrics Che Core :: Commons :: Tracing :: Metrics diff --git a/core/che-core-tracing-web/pom.xml b/core/che-core-tracing-web/pom.xml index fed33839b1..4829bcc621 100644 --- a/core/che-core-tracing-web/pom.xml +++ b/core/che-core-tracing-web/pom.xml @@ -17,7 +17,7 @@ che-core-parent org.eclipse.che.core - 7.75.0-SNAPSHOT + 7.76.0-SNAPSHOT che-core-tracing-web Che Core :: Commons :: Tracing :: Web diff --git a/core/che-core-typescript-dto-maven-plugin/pom.xml b/core/che-core-typescript-dto-maven-plugin/pom.xml index 6d80616004..cccadbcb22 100644 --- a/core/che-core-typescript-dto-maven-plugin/pom.xml +++ b/core/che-core-typescript-dto-maven-plugin/pom.xml @@ -17,7 +17,7 @@ che-core-parent org.eclipse.che.core - 7.75.0-SNAPSHOT + 7.76.0-SNAPSHOT che-core-typescript-dto-maven-plugin maven-plugin diff --git a/core/commons/che-core-commons-annotations/pom.xml b/core/commons/che-core-commons-annotations/pom.xml index db4741319e..2067641232 100644 --- a/core/commons/che-core-commons-annotations/pom.xml +++ b/core/commons/che-core-commons-annotations/pom.xml @@ -17,7 +17,7 @@ che-core-commons-parent org.eclipse.che.core - 7.75.0-SNAPSHOT + 7.76.0-SNAPSHOT che-core-commons-annotations jar diff --git a/core/commons/che-core-commons-inject/pom.xml b/core/commons/che-core-commons-inject/pom.xml index 9ee3077fb5..ebc9fd4af7 100644 --- a/core/commons/che-core-commons-inject/pom.xml +++ b/core/commons/che-core-commons-inject/pom.xml @@ -17,7 +17,7 @@ che-core-commons-parent org.eclipse.che.core - 7.75.0-SNAPSHOT + 7.76.0-SNAPSHOT che-core-commons-inject jar diff --git a/core/commons/che-core-commons-j2ee/pom.xml b/core/commons/che-core-commons-j2ee/pom.xml index 3952df3ebf..6c0141521b 100644 --- a/core/commons/che-core-commons-j2ee/pom.xml +++ b/core/commons/che-core-commons-j2ee/pom.xml @@ -17,7 +17,7 @@ che-core-commons-parent org.eclipse.che.core - 7.75.0-SNAPSHOT + 7.76.0-SNAPSHOT che-core-commons-j2ee jar diff --git a/core/commons/che-core-commons-json/pom.xml b/core/commons/che-core-commons-json/pom.xml index 9f54dda9bc..b29d16da02 100644 --- a/core/commons/che-core-commons-json/pom.xml +++ b/core/commons/che-core-commons-json/pom.xml @@ -17,7 +17,7 @@ che-core-commons-parent org.eclipse.che.core - 7.75.0-SNAPSHOT + 7.76.0-SNAPSHOT che-core-commons-json jar diff --git a/core/commons/che-core-commons-lang/pom.xml b/core/commons/che-core-commons-lang/pom.xml index 95fce88cbb..55d2849c6d 100644 --- a/core/commons/che-core-commons-lang/pom.xml +++ b/core/commons/che-core-commons-lang/pom.xml @@ -17,7 +17,7 @@ che-core-commons-parent org.eclipse.che.core - 7.75.0-SNAPSHOT + 7.76.0-SNAPSHOT che-core-commons-lang jar diff --git a/core/commons/che-core-commons-observability/pom.xml b/core/commons/che-core-commons-observability/pom.xml index 1c4bad351e..e85097bd30 100644 --- a/core/commons/che-core-commons-observability/pom.xml +++ b/core/commons/che-core-commons-observability/pom.xml @@ -17,7 +17,7 @@ che-core-commons-parent org.eclipse.che.core - 7.75.0-SNAPSHOT + 7.76.0-SNAPSHOT che-core-commons-observability Che Core :: Commons :: Tracing and Monitoring wrapper diff --git a/core/commons/che-core-commons-schedule/pom.xml b/core/commons/che-core-commons-schedule/pom.xml index 777b396731..d893b2652b 100644 --- a/core/commons/che-core-commons-schedule/pom.xml +++ b/core/commons/che-core-commons-schedule/pom.xml @@ -17,7 +17,7 @@ che-core-commons-parent org.eclipse.che.core - 7.75.0-SNAPSHOT + 7.76.0-SNAPSHOT che-core-commons-schedule jar diff --git a/core/commons/che-core-commons-test/pom.xml b/core/commons/che-core-commons-test/pom.xml index 9074d47ca6..bafa7c2817 100644 --- a/core/commons/che-core-commons-test/pom.xml +++ b/core/commons/che-core-commons-test/pom.xml @@ -17,7 +17,7 @@ che-core-commons-parent org.eclipse.che.core - 7.75.0-SNAPSHOT + 7.76.0-SNAPSHOT che-core-commons-test jar diff --git a/core/commons/che-core-commons-tracing/pom.xml b/core/commons/che-core-commons-tracing/pom.xml index 65a68c35c2..794f605568 100644 --- a/core/commons/che-core-commons-tracing/pom.xml +++ b/core/commons/che-core-commons-tracing/pom.xml @@ -17,7 +17,7 @@ che-core-commons-parent org.eclipse.che.core - 7.75.0-SNAPSHOT + 7.76.0-SNAPSHOT che-core-commons-tracing Che Core :: Commons :: Tracing diff --git a/core/commons/pom.xml b/core/commons/pom.xml index 4187196357..14909c9b4e 100644 --- a/core/commons/pom.xml +++ b/core/commons/pom.xml @@ -17,7 +17,7 @@ che-core-parent org.eclipse.che.core - 7.75.0-SNAPSHOT + 7.76.0-SNAPSHOT ../pom.xml che-core-commons-parent diff --git a/core/pom.xml b/core/pom.xml index b8d05d80de..2853f64519 100644 --- a/core/pom.xml +++ b/core/pom.xml @@ -17,7 +17,7 @@ che-server org.eclipse.che - 7.75.0-SNAPSHOT + 7.76.0-SNAPSHOT ../pom.xml org.eclipse.che.core diff --git a/infrastructures/infrastructure-distributed/pom.xml b/infrastructures/infrastructure-distributed/pom.xml index e6a140eb37..2fe2338da2 100644 --- a/infrastructures/infrastructure-distributed/pom.xml +++ b/infrastructures/infrastructure-distributed/pom.xml @@ -17,7 +17,7 @@ che-infrastructures-parent org.eclipse.che.infrastructure - 7.75.0-SNAPSHOT + 7.76.0-SNAPSHOT infrastructure-distributed jar diff --git a/infrastructures/infrastructure-factory/pom.xml b/infrastructures/infrastructure-factory/pom.xml index 1f4fa349b7..809d2d42b5 100644 --- a/infrastructures/infrastructure-factory/pom.xml +++ b/infrastructures/infrastructure-factory/pom.xml @@ -17,7 +17,7 @@ che-infrastructures-parent org.eclipse.che.infrastructure - 7.75.0-SNAPSHOT + 7.76.0-SNAPSHOT infrastructure-factory jar diff --git a/infrastructures/infrastructure-metrics/pom.xml b/infrastructures/infrastructure-metrics/pom.xml index c3f02e737d..3e9e04f9e1 100644 --- a/infrastructures/infrastructure-metrics/pom.xml +++ b/infrastructures/infrastructure-metrics/pom.xml @@ -17,7 +17,7 @@ che-infrastructures-parent org.eclipse.che.infrastructure - 7.75.0-SNAPSHOT + 7.76.0-SNAPSHOT ../pom.xml infrastructure-metrics diff --git a/infrastructures/infrastructure-permission/pom.xml b/infrastructures/infrastructure-permission/pom.xml index d3dcd81a5e..f6ebe2c620 100644 --- a/infrastructures/infrastructure-permission/pom.xml +++ b/infrastructures/infrastructure-permission/pom.xml @@ -17,7 +17,7 @@ che-infrastructures-parent org.eclipse.che.infrastructure - 7.75.0-SNAPSHOT + 7.76.0-SNAPSHOT infrastructure-permission Infrastructure :: Kubernetes Permissions diff --git a/infrastructures/kubernetes/pom.xml b/infrastructures/kubernetes/pom.xml index bb03ddbb22..ba3e23675e 100644 --- a/infrastructures/kubernetes/pom.xml +++ b/infrastructures/kubernetes/pom.xml @@ -17,7 +17,7 @@ che-infrastructures-parent org.eclipse.che.infrastructure - 7.75.0-SNAPSHOT + 7.76.0-SNAPSHOT infrastructure-kubernetes Infrastructure :: Kubernetes diff --git a/infrastructures/openshift/pom.xml b/infrastructures/openshift/pom.xml index 4ebbcbedc6..07bb14d873 100644 --- a/infrastructures/openshift/pom.xml +++ b/infrastructures/openshift/pom.xml @@ -17,7 +17,7 @@ che-infrastructures-parent org.eclipse.che.infrastructure - 7.75.0-SNAPSHOT + 7.76.0-SNAPSHOT infrastructure-openshift Infrastructure :: OpenShift diff --git a/infrastructures/pom.xml b/infrastructures/pom.xml index 9899692419..06039c2b95 100644 --- a/infrastructures/pom.xml +++ b/infrastructures/pom.xml @@ -17,7 +17,7 @@ che-server org.eclipse.che - 7.75.0-SNAPSHOT + 7.76.0-SNAPSHOT ../pom.xml org.eclipse.che.infrastructure diff --git a/multiuser/api/che-multiuser-api-authentication-commons/pom.xml b/multiuser/api/che-multiuser-api-authentication-commons/pom.xml index 089f68622c..4767b782f3 100644 --- a/multiuser/api/che-multiuser-api-authentication-commons/pom.xml +++ b/multiuser/api/che-multiuser-api-authentication-commons/pom.xml @@ -17,7 +17,7 @@ che-multiuser-api org.eclipse.che.multiuser - 7.75.0-SNAPSHOT + 7.76.0-SNAPSHOT che-multiuser-api-authentication-commons jar diff --git a/multiuser/api/che-multiuser-api-authorization-impl/pom.xml b/multiuser/api/che-multiuser-api-authorization-impl/pom.xml index fb2e99ff6a..f1d3c78c1c 100644 --- a/multiuser/api/che-multiuser-api-authorization-impl/pom.xml +++ b/multiuser/api/che-multiuser-api-authorization-impl/pom.xml @@ -17,7 +17,7 @@ che-multiuser-api org.eclipse.che.multiuser - 7.75.0-SNAPSHOT + 7.76.0-SNAPSHOT che-multiuser-api-authorization-impl jar diff --git a/multiuser/api/che-multiuser-api-authorization/pom.xml b/multiuser/api/che-multiuser-api-authorization/pom.xml index f94e1b8cc8..d3bfd6b2be 100644 --- a/multiuser/api/che-multiuser-api-authorization/pom.xml +++ b/multiuser/api/che-multiuser-api-authorization/pom.xml @@ -17,7 +17,7 @@ che-multiuser-api org.eclipse.che.multiuser - 7.75.0-SNAPSHOT + 7.76.0-SNAPSHOT che-multiuser-api-authorization jar diff --git a/multiuser/api/che-multiuser-api-organization-shared/pom.xml b/multiuser/api/che-multiuser-api-organization-shared/pom.xml index dc6e4ac795..bd36720c16 100644 --- a/multiuser/api/che-multiuser-api-organization-shared/pom.xml +++ b/multiuser/api/che-multiuser-api-organization-shared/pom.xml @@ -17,7 +17,7 @@ che-multiuser-api org.eclipse.che.multiuser - 7.75.0-SNAPSHOT + 7.76.0-SNAPSHOT che-multiuser-api-organization-shared jar diff --git a/multiuser/api/che-multiuser-api-organization/pom.xml b/multiuser/api/che-multiuser-api-organization/pom.xml index f9b71197df..13c09881ea 100644 --- a/multiuser/api/che-multiuser-api-organization/pom.xml +++ b/multiuser/api/che-multiuser-api-organization/pom.xml @@ -17,7 +17,7 @@ che-multiuser-api org.eclipse.che.multiuser - 7.75.0-SNAPSHOT + 7.76.0-SNAPSHOT che-multiuser-api-organization jar diff --git a/multiuser/api/che-multiuser-api-permission-shared/pom.xml b/multiuser/api/che-multiuser-api-permission-shared/pom.xml index d13ab8cd91..3db4caf57a 100644 --- a/multiuser/api/che-multiuser-api-permission-shared/pom.xml +++ b/multiuser/api/che-multiuser-api-permission-shared/pom.xml @@ -17,7 +17,7 @@ che-multiuser-api org.eclipse.che.multiuser - 7.75.0-SNAPSHOT + 7.76.0-SNAPSHOT che-multiuser-api-permission-shared jar diff --git a/multiuser/api/che-multiuser-api-permission/pom.xml b/multiuser/api/che-multiuser-api-permission/pom.xml index aac5449177..9907749fd2 100644 --- a/multiuser/api/che-multiuser-api-permission/pom.xml +++ b/multiuser/api/che-multiuser-api-permission/pom.xml @@ -17,7 +17,7 @@ che-multiuser-api org.eclipse.che.multiuser - 7.75.0-SNAPSHOT + 7.76.0-SNAPSHOT che-multiuser-api-permission jar diff --git a/multiuser/api/che-multiuser-api-resource-shared/pom.xml b/multiuser/api/che-multiuser-api-resource-shared/pom.xml index 181044f412..ec63cd52b7 100644 --- a/multiuser/api/che-multiuser-api-resource-shared/pom.xml +++ b/multiuser/api/che-multiuser-api-resource-shared/pom.xml @@ -17,7 +17,7 @@ che-multiuser-api org.eclipse.che.multiuser - 7.75.0-SNAPSHOT + 7.76.0-SNAPSHOT che-multiuser-api-resource-shared jar diff --git a/multiuser/api/che-multiuser-api-resource/pom.xml b/multiuser/api/che-multiuser-api-resource/pom.xml index a093052cd7..46b3478ec3 100644 --- a/multiuser/api/che-multiuser-api-resource/pom.xml +++ b/multiuser/api/che-multiuser-api-resource/pom.xml @@ -17,7 +17,7 @@ che-multiuser-api org.eclipse.che.multiuser - 7.75.0-SNAPSHOT + 7.76.0-SNAPSHOT che-multiuser-api-resource jar diff --git a/multiuser/api/che-multiuser-api-workspace-activity/pom.xml b/multiuser/api/che-multiuser-api-workspace-activity/pom.xml index 2407e9d542..bc81e96d85 100644 --- a/multiuser/api/che-multiuser-api-workspace-activity/pom.xml +++ b/multiuser/api/che-multiuser-api-workspace-activity/pom.xml @@ -17,7 +17,7 @@ che-multiuser-api org.eclipse.che.multiuser - 7.75.0-SNAPSHOT + 7.76.0-SNAPSHOT che-multiuser-api-workspace-activity jar diff --git a/multiuser/api/pom.xml b/multiuser/api/pom.xml index db319f4bfb..ac67a8d9b3 100644 --- a/multiuser/api/pom.xml +++ b/multiuser/api/pom.xml @@ -17,7 +17,7 @@ che-multiuser-parent org.eclipse.che.multiuser - 7.75.0-SNAPSHOT + 7.76.0-SNAPSHOT ../pom.xml che-multiuser-api diff --git a/multiuser/integration-tests/che-multiuser-cascade-removal/pom.xml b/multiuser/integration-tests/che-multiuser-cascade-removal/pom.xml index 1d6a254a92..2fb79604ef 100644 --- a/multiuser/integration-tests/che-multiuser-cascade-removal/pom.xml +++ b/multiuser/integration-tests/che-multiuser-cascade-removal/pom.xml @@ -17,7 +17,7 @@ che-multiuser-integration-tests org.eclipse.che.multiuser - 7.75.0-SNAPSHOT + 7.76.0-SNAPSHOT che-multiuser-cascade-removal jar diff --git a/multiuser/integration-tests/che-multiuser-mysql-tck/pom.xml b/multiuser/integration-tests/che-multiuser-mysql-tck/pom.xml index 990ba4989e..81bab65b1e 100644 --- a/multiuser/integration-tests/che-multiuser-mysql-tck/pom.xml +++ b/multiuser/integration-tests/che-multiuser-mysql-tck/pom.xml @@ -17,7 +17,7 @@ che-multiuser-integration-tests org.eclipse.che.multiuser - 7.75.0-SNAPSHOT + 7.76.0-SNAPSHOT che-multiuser-mysql-tck jar diff --git a/multiuser/integration-tests/che-multiuser-postgresql-tck/pom.xml b/multiuser/integration-tests/che-multiuser-postgresql-tck/pom.xml index 2368e6092c..db4d4e45f3 100644 --- a/multiuser/integration-tests/che-multiuser-postgresql-tck/pom.xml +++ b/multiuser/integration-tests/che-multiuser-postgresql-tck/pom.xml @@ -17,7 +17,7 @@ che-multiuser-integration-tests org.eclipse.che.multiuser - 7.75.0-SNAPSHOT + 7.76.0-SNAPSHOT che-multiuser-postgresql-tck jar diff --git a/multiuser/integration-tests/pom.xml b/multiuser/integration-tests/pom.xml index 4ef514f6ce..dca18d1a7c 100644 --- a/multiuser/integration-tests/pom.xml +++ b/multiuser/integration-tests/pom.xml @@ -17,7 +17,7 @@ che-multiuser-parent org.eclipse.che.multiuser - 7.75.0-SNAPSHOT + 7.76.0-SNAPSHOT che-multiuser-integration-tests pom diff --git a/multiuser/keycloak/che-multiuser-keycloak-server/pom.xml b/multiuser/keycloak/che-multiuser-keycloak-server/pom.xml index 6d68396d4e..5f566b2b10 100644 --- a/multiuser/keycloak/che-multiuser-keycloak-server/pom.xml +++ b/multiuser/keycloak/che-multiuser-keycloak-server/pom.xml @@ -17,7 +17,7 @@ che-multiuser-keycloak org.eclipse.che.multiuser - 7.75.0-SNAPSHOT + 7.76.0-SNAPSHOT che-multiuser-keycloak-server jar diff --git a/multiuser/keycloak/che-multiuser-keycloak-shared/pom.xml b/multiuser/keycloak/che-multiuser-keycloak-shared/pom.xml index 851ca79f8b..9aad9763b0 100644 --- a/multiuser/keycloak/che-multiuser-keycloak-shared/pom.xml +++ b/multiuser/keycloak/che-multiuser-keycloak-shared/pom.xml @@ -17,7 +17,7 @@ che-multiuser-keycloak org.eclipse.che.multiuser - 7.75.0-SNAPSHOT + 7.76.0-SNAPSHOT che-multiuser-keycloak-shared jar diff --git a/multiuser/keycloak/che-multiuser-keycloak-token-provider/pom.xml b/multiuser/keycloak/che-multiuser-keycloak-token-provider/pom.xml index 3dc133ac10..9a62039eb8 100644 --- a/multiuser/keycloak/che-multiuser-keycloak-token-provider/pom.xml +++ b/multiuser/keycloak/che-multiuser-keycloak-token-provider/pom.xml @@ -17,7 +17,7 @@ che-multiuser-keycloak org.eclipse.che.multiuser - 7.75.0-SNAPSHOT + 7.76.0-SNAPSHOT che-multiuser-keycloak-token-provider Che Multiuser :: Keycloak Token Provider diff --git a/multiuser/keycloak/che-multiuser-keycloak-user-remover/pom.xml b/multiuser/keycloak/che-multiuser-keycloak-user-remover/pom.xml index 7226feb4f6..445933c90a 100644 --- a/multiuser/keycloak/che-multiuser-keycloak-user-remover/pom.xml +++ b/multiuser/keycloak/che-multiuser-keycloak-user-remover/pom.xml @@ -17,7 +17,7 @@ che-multiuser-keycloak org.eclipse.che.multiuser - 7.75.0-SNAPSHOT + 7.76.0-SNAPSHOT che-multiuser-keycloak-user-remover jar diff --git a/multiuser/keycloak/pom.xml b/multiuser/keycloak/pom.xml index 904e89acdc..61c22b283d 100644 --- a/multiuser/keycloak/pom.xml +++ b/multiuser/keycloak/pom.xml @@ -17,7 +17,7 @@ che-multiuser-parent org.eclipse.che.multiuser - 7.75.0-SNAPSHOT + 7.76.0-SNAPSHOT ../pom.xml che-multiuser-keycloak diff --git a/multiuser/machine-auth/che-multiuser-machine-authentication-shared/pom.xml b/multiuser/machine-auth/che-multiuser-machine-authentication-shared/pom.xml index 14aba9336d..5de376a9d4 100644 --- a/multiuser/machine-auth/che-multiuser-machine-authentication-shared/pom.xml +++ b/multiuser/machine-auth/che-multiuser-machine-authentication-shared/pom.xml @@ -17,7 +17,7 @@ che-multiuser-machine-auth org.eclipse.che.multiuser - 7.75.0-SNAPSHOT + 7.76.0-SNAPSHOT che-multiuser-machine-authentication-shared jar diff --git a/multiuser/machine-auth/che-multiuser-machine-authentication/pom.xml b/multiuser/machine-auth/che-multiuser-machine-authentication/pom.xml index 773bcff6c5..38cf9143ca 100644 --- a/multiuser/machine-auth/che-multiuser-machine-authentication/pom.xml +++ b/multiuser/machine-auth/che-multiuser-machine-authentication/pom.xml @@ -17,7 +17,7 @@ che-multiuser-machine-auth org.eclipse.che.multiuser - 7.75.0-SNAPSHOT + 7.76.0-SNAPSHOT che-multiuser-machine-authentication jar diff --git a/multiuser/machine-auth/pom.xml b/multiuser/machine-auth/pom.xml index c38fcc1e40..1e972be468 100644 --- a/multiuser/machine-auth/pom.xml +++ b/multiuser/machine-auth/pom.xml @@ -17,7 +17,7 @@ che-multiuser-parent org.eclipse.che.multiuser - 7.75.0-SNAPSHOT + 7.76.0-SNAPSHOT ../pom.xml che-multiuser-machine-auth diff --git a/multiuser/oidc/pom.xml b/multiuser/oidc/pom.xml index 1baf320a1e..e197a0f257 100644 --- a/multiuser/oidc/pom.xml +++ b/multiuser/oidc/pom.xml @@ -17,7 +17,7 @@ che-multiuser-parent org.eclipse.che.multiuser - 7.75.0-SNAPSHOT + 7.76.0-SNAPSHOT che-multiuser-oidc jar diff --git a/multiuser/permission/che-multiuser-permission-devfile/pom.xml b/multiuser/permission/che-multiuser-permission-devfile/pom.xml index 0d3659181e..e0aaaeade2 100644 --- a/multiuser/permission/che-multiuser-permission-devfile/pom.xml +++ b/multiuser/permission/che-multiuser-permission-devfile/pom.xml @@ -17,7 +17,7 @@ che-multiuser-permission org.eclipse.che.multiuser - 7.75.0-SNAPSHOT + 7.76.0-SNAPSHOT che-multiuser-permission-devfile Che Multiuser :: Devfile Permissions diff --git a/multiuser/permission/che-multiuser-permission-logger/pom.xml b/multiuser/permission/che-multiuser-permission-logger/pom.xml index ce8699e8d2..0e94c146dd 100644 --- a/multiuser/permission/che-multiuser-permission-logger/pom.xml +++ b/multiuser/permission/che-multiuser-permission-logger/pom.xml @@ -17,7 +17,7 @@ che-multiuser-permission org.eclipse.che.multiuser - 7.75.0-SNAPSHOT + 7.76.0-SNAPSHOT che-multiuser-permission-logger Che Multiuser :: Logger Permissions diff --git a/multiuser/permission/che-multiuser-permission-resource/pom.xml b/multiuser/permission/che-multiuser-permission-resource/pom.xml index a5294a511d..a8a3d4a785 100644 --- a/multiuser/permission/che-multiuser-permission-resource/pom.xml +++ b/multiuser/permission/che-multiuser-permission-resource/pom.xml @@ -17,7 +17,7 @@ che-multiuser-permission org.eclipse.che.multiuser - 7.75.0-SNAPSHOT + 7.76.0-SNAPSHOT che-multiuser-permission-resource Che Multiuser :: Resource :: Permissions diff --git a/multiuser/permission/che-multiuser-permission-system/pom.xml b/multiuser/permission/che-multiuser-permission-system/pom.xml index 4dc62ecc03..d5957de9a2 100644 --- a/multiuser/permission/che-multiuser-permission-system/pom.xml +++ b/multiuser/permission/che-multiuser-permission-system/pom.xml @@ -17,7 +17,7 @@ che-multiuser-permission org.eclipse.che.multiuser - 7.75.0-SNAPSHOT + 7.76.0-SNAPSHOT che-multiuser-permission-system Che Multiuser :: System Permissions diff --git a/multiuser/permission/che-multiuser-permission-user/pom.xml b/multiuser/permission/che-multiuser-permission-user/pom.xml index cec6e34c85..5129c91798 100644 --- a/multiuser/permission/che-multiuser-permission-user/pom.xml +++ b/multiuser/permission/che-multiuser-permission-user/pom.xml @@ -17,7 +17,7 @@ che-multiuser-permission org.eclipse.che.multiuser - 7.75.0-SNAPSHOT + 7.76.0-SNAPSHOT che-multiuser-permission-user Che Multiuser :: User Permissions diff --git a/multiuser/permission/che-multiuser-permission-workspace-activity/pom.xml b/multiuser/permission/che-multiuser-permission-workspace-activity/pom.xml index e496cd0912..57daf4f140 100644 --- a/multiuser/permission/che-multiuser-permission-workspace-activity/pom.xml +++ b/multiuser/permission/che-multiuser-permission-workspace-activity/pom.xml @@ -17,7 +17,7 @@ che-multiuser-permission org.eclipse.che.multiuser - 7.75.0-SNAPSHOT + 7.76.0-SNAPSHOT che-multiuser-permission-workspace-activity Che Multiuser :: Workspace Activity Permissions diff --git a/multiuser/permission/che-multiuser-permission-workspace/pom.xml b/multiuser/permission/che-multiuser-permission-workspace/pom.xml index 68aaf53f7b..b985c8dd9d 100644 --- a/multiuser/permission/che-multiuser-permission-workspace/pom.xml +++ b/multiuser/permission/che-multiuser-permission-workspace/pom.xml @@ -17,7 +17,7 @@ che-multiuser-permission org.eclipse.che.multiuser - 7.75.0-SNAPSHOT + 7.76.0-SNAPSHOT che-multiuser-permission-workspace Che Multiuser :: Workspace Permissions diff --git a/multiuser/permission/pom.xml b/multiuser/permission/pom.xml index 3b5181177b..34834bd2c5 100644 --- a/multiuser/permission/pom.xml +++ b/multiuser/permission/pom.xml @@ -17,7 +17,7 @@ che-multiuser-parent org.eclipse.che.multiuser - 7.75.0-SNAPSHOT + 7.76.0-SNAPSHOT ../pom.xml che-multiuser-permission diff --git a/multiuser/personal-account/pom.xml b/multiuser/personal-account/pom.xml index 096389ccd7..bd161408e1 100644 --- a/multiuser/personal-account/pom.xml +++ b/multiuser/personal-account/pom.xml @@ -17,7 +17,7 @@ che-multiuser-parent org.eclipse.che.multiuser - 7.75.0-SNAPSHOT + 7.76.0-SNAPSHOT che-multiuser-personal-account jar diff --git a/multiuser/pom.xml b/multiuser/pom.xml index 57e3aad284..96db344213 100644 --- a/multiuser/pom.xml +++ b/multiuser/pom.xml @@ -17,7 +17,7 @@ che-server org.eclipse.che - 7.75.0-SNAPSHOT + 7.76.0-SNAPSHOT ../pom.xml org.eclipse.che.multiuser diff --git a/multiuser/sql-schema/pom.xml b/multiuser/sql-schema/pom.xml index 0fe0967700..616ce1b15f 100644 --- a/multiuser/sql-schema/pom.xml +++ b/multiuser/sql-schema/pom.xml @@ -17,7 +17,7 @@ che-multiuser-parent org.eclipse.che.multiuser - 7.75.0-SNAPSHOT + 7.76.0-SNAPSHOT ../pom.xml che-multiuser-sql-schema diff --git a/pom.xml b/pom.xml index fd2e7d89f6..0bd1a24c10 100644 --- a/pom.xml +++ b/pom.xml @@ -16,7 +16,7 @@ 4.0.0 org.eclipse.che che-server - 7.75.0-SNAPSHOT + 7.76.0-SNAPSHOT pom Che Server Eclipse Che Server @@ -100,7 +100,7 @@ Red Hat, Inc. - initial API and implementation ${project.version} - 7.75.0-SNAPSHOT + 7.76.0-SNAPSHOT 1.0-beta2 Red Hat, Inc. diff --git a/typescript-dto/dto-pom.xml b/typescript-dto/dto-pom.xml index a4594765d6..566b3d25ee 100644 --- a/typescript-dto/dto-pom.xml +++ b/typescript-dto/dto-pom.xml @@ -23,7 +23,7 @@ pom Che TypeScript DTO - 7.75.0-SNAPSHOT + 7.76.0-SNAPSHOT diff --git a/wsmaster/che-core-api-account/pom.xml b/wsmaster/che-core-api-account/pom.xml index 17aa856799..849ca8de2a 100644 --- a/wsmaster/che-core-api-account/pom.xml +++ b/wsmaster/che-core-api-account/pom.xml @@ -17,7 +17,7 @@ che-master-parent org.eclipse.che.core - 7.75.0-SNAPSHOT + 7.76.0-SNAPSHOT che-core-api-account Che Core :: API :: Account diff --git a/wsmaster/che-core-api-auth-azure-devops/pom.xml b/wsmaster/che-core-api-auth-azure-devops/pom.xml index cdc830a937..3371ff075b 100644 --- a/wsmaster/che-core-api-auth-azure-devops/pom.xml +++ b/wsmaster/che-core-api-auth-azure-devops/pom.xml @@ -17,7 +17,7 @@ che-master-parent org.eclipse.che.core - 7.75.0-SNAPSHOT + 7.76.0-SNAPSHOT che-core-api-auth-azure-devops jar diff --git a/wsmaster/che-core-api-auth-bitbucket/pom.xml b/wsmaster/che-core-api-auth-bitbucket/pom.xml index f60f284967..bb23c0dcc4 100644 --- a/wsmaster/che-core-api-auth-bitbucket/pom.xml +++ b/wsmaster/che-core-api-auth-bitbucket/pom.xml @@ -17,7 +17,7 @@ che-master-parent org.eclipse.che.core - 7.75.0-SNAPSHOT + 7.76.0-SNAPSHOT che-core-api-auth-bitbucket jar diff --git a/wsmaster/che-core-api-auth-github/pom.xml b/wsmaster/che-core-api-auth-github/pom.xml index 1d7b8a4bdc..0f91dfc23a 100644 --- a/wsmaster/che-core-api-auth-github/pom.xml +++ b/wsmaster/che-core-api-auth-github/pom.xml @@ -17,7 +17,7 @@ che-master-parent org.eclipse.che.core - 7.75.0-SNAPSHOT + 7.76.0-SNAPSHOT che-core-api-auth-github jar diff --git a/wsmaster/che-core-api-auth-gitlab/pom.xml b/wsmaster/che-core-api-auth-gitlab/pom.xml index 215695cfb7..b24f8d528d 100644 --- a/wsmaster/che-core-api-auth-gitlab/pom.xml +++ b/wsmaster/che-core-api-auth-gitlab/pom.xml @@ -17,7 +17,7 @@ che-master-parent org.eclipse.che.core - 7.75.0-SNAPSHOT + 7.76.0-SNAPSHOT che-core-api-auth-gitlab jar diff --git a/wsmaster/che-core-api-auth-openshift/pom.xml b/wsmaster/che-core-api-auth-openshift/pom.xml index fa7dfb1022..644d2a6631 100644 --- a/wsmaster/che-core-api-auth-openshift/pom.xml +++ b/wsmaster/che-core-api-auth-openshift/pom.xml @@ -17,7 +17,7 @@ che-master-parent org.eclipse.che.core - 7.75.0-SNAPSHOT + 7.76.0-SNAPSHOT che-core-api-auth-openshift jar diff --git a/wsmaster/che-core-api-auth-shared/pom.xml b/wsmaster/che-core-api-auth-shared/pom.xml index bc005ffc46..27d4d3b143 100644 --- a/wsmaster/che-core-api-auth-shared/pom.xml +++ b/wsmaster/che-core-api-auth-shared/pom.xml @@ -17,7 +17,7 @@ che-master-parent org.eclipse.che.core - 7.75.0-SNAPSHOT + 7.76.0-SNAPSHOT che-core-api-auth-shared jar diff --git a/wsmaster/che-core-api-auth/pom.xml b/wsmaster/che-core-api-auth/pom.xml index 364b463dd1..1f68b3ad3d 100644 --- a/wsmaster/che-core-api-auth/pom.xml +++ b/wsmaster/che-core-api-auth/pom.xml @@ -17,7 +17,7 @@ che-master-parent org.eclipse.che.core - 7.75.0-SNAPSHOT + 7.76.0-SNAPSHOT che-core-api-auth jar diff --git a/wsmaster/che-core-api-devfile-shared/pom.xml b/wsmaster/che-core-api-devfile-shared/pom.xml index cb38057287..07b5cefd5c 100644 --- a/wsmaster/che-core-api-devfile-shared/pom.xml +++ b/wsmaster/che-core-api-devfile-shared/pom.xml @@ -17,7 +17,7 @@ che-master-parent org.eclipse.che.core - 7.75.0-SNAPSHOT + 7.76.0-SNAPSHOT che-core-api-devfile-shared jar diff --git a/wsmaster/che-core-api-devfile/pom.xml b/wsmaster/che-core-api-devfile/pom.xml index e0d31f582e..d7bb454b9f 100644 --- a/wsmaster/che-core-api-devfile/pom.xml +++ b/wsmaster/che-core-api-devfile/pom.xml @@ -17,7 +17,7 @@ che-master-parent org.eclipse.che.core - 7.75.0-SNAPSHOT + 7.76.0-SNAPSHOT che-core-api-devfile jar diff --git a/wsmaster/che-core-api-factory-azure-devops/pom.xml b/wsmaster/che-core-api-factory-azure-devops/pom.xml index 534cfd26b2..9ca8e9dad8 100644 --- a/wsmaster/che-core-api-factory-azure-devops/pom.xml +++ b/wsmaster/che-core-api-factory-azure-devops/pom.xml @@ -17,7 +17,7 @@ che-master-parent org.eclipse.che.core - 7.75.0-SNAPSHOT + 7.76.0-SNAPSHOT che-core-api-factory-azure-devops jar diff --git a/wsmaster/che-core-api-factory-bitbucket-server/pom.xml b/wsmaster/che-core-api-factory-bitbucket-server/pom.xml index cb848a2096..09ecff99e1 100644 --- a/wsmaster/che-core-api-factory-bitbucket-server/pom.xml +++ b/wsmaster/che-core-api-factory-bitbucket-server/pom.xml @@ -17,7 +17,7 @@ che-master-parent org.eclipse.che.core - 7.75.0-SNAPSHOT + 7.76.0-SNAPSHOT che-core-api-factory-bitbucket-server jar diff --git a/wsmaster/che-core-api-factory-bitbucket/pom.xml b/wsmaster/che-core-api-factory-bitbucket/pom.xml index c98ed177e3..3d11345ad0 100644 --- a/wsmaster/che-core-api-factory-bitbucket/pom.xml +++ b/wsmaster/che-core-api-factory-bitbucket/pom.xml @@ -17,7 +17,7 @@ che-master-parent org.eclipse.che.core - 7.75.0-SNAPSHOT + 7.76.0-SNAPSHOT che-core-api-factory-bitbucket jar diff --git a/wsmaster/che-core-api-factory-git-ssh/pom.xml b/wsmaster/che-core-api-factory-git-ssh/pom.xml index b99ad19815..e55b8ea177 100644 --- a/wsmaster/che-core-api-factory-git-ssh/pom.xml +++ b/wsmaster/che-core-api-factory-git-ssh/pom.xml @@ -17,7 +17,7 @@ che-master-parent org.eclipse.che.core - 7.75.0-SNAPSHOT + 7.76.0-SNAPSHOT che-core-api-factory-git-ssh jar diff --git a/wsmaster/che-core-api-factory-github/pom.xml b/wsmaster/che-core-api-factory-github/pom.xml index 2912b85fe1..7f33beebbd 100644 --- a/wsmaster/che-core-api-factory-github/pom.xml +++ b/wsmaster/che-core-api-factory-github/pom.xml @@ -17,7 +17,7 @@ che-master-parent org.eclipse.che.core - 7.75.0-SNAPSHOT + 7.76.0-SNAPSHOT che-core-api-factory-github jar diff --git a/wsmaster/che-core-api-factory-gitlab/pom.xml b/wsmaster/che-core-api-factory-gitlab/pom.xml index aa5767c0c9..ad9a2af20a 100644 --- a/wsmaster/che-core-api-factory-gitlab/pom.xml +++ b/wsmaster/che-core-api-factory-gitlab/pom.xml @@ -17,7 +17,7 @@ che-master-parent org.eclipse.che.core - 7.75.0-SNAPSHOT + 7.76.0-SNAPSHOT che-core-api-factory-gitlab jar diff --git a/wsmaster/che-core-api-factory-shared/pom.xml b/wsmaster/che-core-api-factory-shared/pom.xml index ce212b3c04..f693ecc310 100644 --- a/wsmaster/che-core-api-factory-shared/pom.xml +++ b/wsmaster/che-core-api-factory-shared/pom.xml @@ -17,7 +17,7 @@ che-master-parent org.eclipse.che.core - 7.75.0-SNAPSHOT + 7.76.0-SNAPSHOT che-core-api-factory-shared jar diff --git a/wsmaster/che-core-api-factory/pom.xml b/wsmaster/che-core-api-factory/pom.xml index 56b06fe743..4368fe77d0 100644 --- a/wsmaster/che-core-api-factory/pom.xml +++ b/wsmaster/che-core-api-factory/pom.xml @@ -17,7 +17,7 @@ che-master-parent org.eclipse.che.core - 7.75.0-SNAPSHOT + 7.76.0-SNAPSHOT che-core-api-factory jar diff --git a/wsmaster/che-core-api-logger-shared/pom.xml b/wsmaster/che-core-api-logger-shared/pom.xml index 7413f2d148..273f583ab7 100644 --- a/wsmaster/che-core-api-logger-shared/pom.xml +++ b/wsmaster/che-core-api-logger-shared/pom.xml @@ -17,7 +17,7 @@ che-master-parent org.eclipse.che.core - 7.75.0-SNAPSHOT + 7.76.0-SNAPSHOT che-core-api-logger-shared jar diff --git a/wsmaster/che-core-api-logger/pom.xml b/wsmaster/che-core-api-logger/pom.xml index 11b64a9b4a..d706201b0f 100644 --- a/wsmaster/che-core-api-logger/pom.xml +++ b/wsmaster/che-core-api-logger/pom.xml @@ -17,7 +17,7 @@ che-master-parent org.eclipse.che.core - 7.75.0-SNAPSHOT + 7.76.0-SNAPSHOT che-core-api-logger jar diff --git a/wsmaster/che-core-api-metrics/pom.xml b/wsmaster/che-core-api-metrics/pom.xml index 5a613a3d37..c57b85bebc 100644 --- a/wsmaster/che-core-api-metrics/pom.xml +++ b/wsmaster/che-core-api-metrics/pom.xml @@ -17,7 +17,7 @@ che-master-parent org.eclipse.che.core - 7.75.0-SNAPSHOT + 7.76.0-SNAPSHOT che-core-api-metrics jar diff --git a/wsmaster/che-core-api-ssh-shared/pom.xml b/wsmaster/che-core-api-ssh-shared/pom.xml index bfd4e51621..1b74b60687 100644 --- a/wsmaster/che-core-api-ssh-shared/pom.xml +++ b/wsmaster/che-core-api-ssh-shared/pom.xml @@ -17,7 +17,7 @@ che-master-parent org.eclipse.che.core - 7.75.0-SNAPSHOT + 7.76.0-SNAPSHOT che-core-api-ssh-shared jar diff --git a/wsmaster/che-core-api-ssh/pom.xml b/wsmaster/che-core-api-ssh/pom.xml index 159fc3b254..79e4b43c6b 100644 --- a/wsmaster/che-core-api-ssh/pom.xml +++ b/wsmaster/che-core-api-ssh/pom.xml @@ -17,7 +17,7 @@ che-master-parent org.eclipse.che.core - 7.75.0-SNAPSHOT + 7.76.0-SNAPSHOT che-core-api-ssh jar diff --git a/wsmaster/che-core-api-system-shared/pom.xml b/wsmaster/che-core-api-system-shared/pom.xml index 60514b9525..3f763d63d8 100644 --- a/wsmaster/che-core-api-system-shared/pom.xml +++ b/wsmaster/che-core-api-system-shared/pom.xml @@ -17,7 +17,7 @@ che-master-parent org.eclipse.che.core - 7.75.0-SNAPSHOT + 7.76.0-SNAPSHOT che-core-api-system-shared jar diff --git a/wsmaster/che-core-api-system/pom.xml b/wsmaster/che-core-api-system/pom.xml index 48387d7739..903952b36c 100644 --- a/wsmaster/che-core-api-system/pom.xml +++ b/wsmaster/che-core-api-system/pom.xml @@ -17,7 +17,7 @@ che-master-parent org.eclipse.che.core - 7.75.0-SNAPSHOT + 7.76.0-SNAPSHOT che-core-api-system jar diff --git a/wsmaster/che-core-api-user-shared/pom.xml b/wsmaster/che-core-api-user-shared/pom.xml index 4ee5e04054..cbcbce1067 100644 --- a/wsmaster/che-core-api-user-shared/pom.xml +++ b/wsmaster/che-core-api-user-shared/pom.xml @@ -17,7 +17,7 @@ che-master-parent org.eclipse.che.core - 7.75.0-SNAPSHOT + 7.76.0-SNAPSHOT che-core-api-user-shared Che Core :: API :: User :: Shared diff --git a/wsmaster/che-core-api-user/pom.xml b/wsmaster/che-core-api-user/pom.xml index 9e6cdfd0b8..12f4fd6778 100644 --- a/wsmaster/che-core-api-user/pom.xml +++ b/wsmaster/che-core-api-user/pom.xml @@ -17,7 +17,7 @@ che-master-parent org.eclipse.che.core - 7.75.0-SNAPSHOT + 7.76.0-SNAPSHOT che-core-api-user Che Core :: API :: User diff --git a/wsmaster/che-core-api-workspace-activity/pom.xml b/wsmaster/che-core-api-workspace-activity/pom.xml index 7b694ef885..3a960d37f9 100644 --- a/wsmaster/che-core-api-workspace-activity/pom.xml +++ b/wsmaster/che-core-api-workspace-activity/pom.xml @@ -17,7 +17,7 @@ che-master-parent org.eclipse.che.core - 7.75.0-SNAPSHOT + 7.76.0-SNAPSHOT che-core-api-workspace-activity jar diff --git a/wsmaster/che-core-api-workspace-shared/pom.xml b/wsmaster/che-core-api-workspace-shared/pom.xml index c52e8c933d..a01ec3e413 100644 --- a/wsmaster/che-core-api-workspace-shared/pom.xml +++ b/wsmaster/che-core-api-workspace-shared/pom.xml @@ -17,7 +17,7 @@ che-master-parent org.eclipse.che.core - 7.75.0-SNAPSHOT + 7.76.0-SNAPSHOT che-core-api-workspace-shared jar diff --git a/wsmaster/che-core-api-workspace/pom.xml b/wsmaster/che-core-api-workspace/pom.xml index 86c66872a3..4e9994781e 100644 --- a/wsmaster/che-core-api-workspace/pom.xml +++ b/wsmaster/che-core-api-workspace/pom.xml @@ -17,7 +17,7 @@ che-master-parent org.eclipse.che.core - 7.75.0-SNAPSHOT + 7.76.0-SNAPSHOT che-core-api-workspace jar diff --git a/wsmaster/che-core-sql-schema/pom.xml b/wsmaster/che-core-sql-schema/pom.xml index 022e567ccc..2a2b3fa931 100644 --- a/wsmaster/che-core-sql-schema/pom.xml +++ b/wsmaster/che-core-sql-schema/pom.xml @@ -17,7 +17,7 @@ che-master-parent org.eclipse.che.core - 7.75.0-SNAPSHOT + 7.76.0-SNAPSHOT che-core-sql-schema Che Core :: SQL :: Schema diff --git a/wsmaster/integration-tests/cascade-removal/pom.xml b/wsmaster/integration-tests/cascade-removal/pom.xml index de24f8b897..196aad5da8 100644 --- a/wsmaster/integration-tests/cascade-removal/pom.xml +++ b/wsmaster/integration-tests/cascade-removal/pom.xml @@ -17,7 +17,7 @@ integration-tests-parent org.eclipse.che.core - 7.75.0-SNAPSHOT + 7.76.0-SNAPSHOT cascade-removal Integration Tests :: Cascade Removal diff --git a/wsmaster/integration-tests/mysql-tck/pom.xml b/wsmaster/integration-tests/mysql-tck/pom.xml index 1e7e527738..1d8b104f4d 100644 --- a/wsmaster/integration-tests/mysql-tck/pom.xml +++ b/wsmaster/integration-tests/mysql-tck/pom.xml @@ -17,7 +17,7 @@ integration-tests-parent org.eclipse.che.core - 7.75.0-SNAPSHOT + 7.76.0-SNAPSHOT mysql-tck jar diff --git a/wsmaster/integration-tests/pom.xml b/wsmaster/integration-tests/pom.xml index 62bc04171d..2e4ebbf362 100644 --- a/wsmaster/integration-tests/pom.xml +++ b/wsmaster/integration-tests/pom.xml @@ -17,7 +17,7 @@ che-master-parent org.eclipse.che.core - 7.75.0-SNAPSHOT + 7.76.0-SNAPSHOT ../pom.xml integration-tests-parent diff --git a/wsmaster/integration-tests/postgresql-tck/pom.xml b/wsmaster/integration-tests/postgresql-tck/pom.xml index 24c18b6bae..4775fc3ea4 100644 --- a/wsmaster/integration-tests/postgresql-tck/pom.xml +++ b/wsmaster/integration-tests/postgresql-tck/pom.xml @@ -17,7 +17,7 @@ integration-tests-parent org.eclipse.che.core - 7.75.0-SNAPSHOT + 7.76.0-SNAPSHOT postgresql-tck jar diff --git a/wsmaster/pom.xml b/wsmaster/pom.xml index 2eaf61d8d1..da7ddd78f7 100644 --- a/wsmaster/pom.xml +++ b/wsmaster/pom.xml @@ -17,7 +17,7 @@ che-core-parent org.eclipse.che.core - 7.75.0-SNAPSHOT + 7.76.0-SNAPSHOT ../core/pom.xml che-master-parent From ea9bb95f7c6d06e57597b7dc0d615ceead7818e3 Mon Sep 17 00:00:00 2001 From: Igor Date: Wed, 27 Sep 2023 10:15:07 +0300 Subject: [PATCH 70/75] Add CONTRIBUTING.md file --- CONTRIBUTING.md | 63 +++++++++++++++++++++++++++++++++++++++++++++++++ README.md | 57 ++------------------------------------------ 2 files changed, 65 insertions(+), 55 deletions(-) create mode 100644 CONTRIBUTING.md diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000000..686a646050 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,63 @@ +# Build requirements +- Apache Maven 3.9 or later +- JDK 11 +- Podman or Docker (required for running integration tests) +A Che workspace environment allows to build the image internaly, using the workspace terminal. + +# Sources build +Run `mvn clean install` to build. Activate a faster profile build by adding `-Pfast`. + +# Image build and push +1. Go to the `dockerfiles` directory. +2. Run `./build.sh`. +3. Tag the **che-server** image with your account: `docker tag quay.io/eclipse/che-server:next //che-server:next`. +4. Push the **che-server** image to your account: `docker push //che-server:next`. + +# Start and debug +1. Deploy Che to a [Red Hat OpenShift](https://www.eclipse.org/che/docs/stable/administration-guide/installing-che-on-openshift-using-cli/) or [Minikube](https://www.eclipse.org/che/docs/stable/administration-guide/installing-che-on-minikube/) cluster by using a previously built image: `chectl server:start --platform= --cheimage=//che-server:next`. +2. Enable local debugging of the Eclipse Che server: `chectl server:debug`. +3. In your IDE, create a new Remote JVM Debug configuration on `localhost:8000`. +4. Hit a breakpoint in the code and activate the debug configuration. + +# Contributing an SCM provider +An SCM provider support has to be provided by adding new maven modules to the wsmaster directory. + +## Implementing che-core-api-oauth- module +This module is responsible for Oauth requests to the SCM provider and contans next implementations: +1. `OAuthAuthenticator` contains specific implementation of Oauth token requestand authentication endpoint. +2. `OAuthAuthenticatorProvider` a provider of the `OAuthAuthenticator`. + +## Implementing coresponding che-core-api-factory- module +This module is responsible for API operations of the specific SCM provider. +1. `ApiClient` contains all necessary HTTP API calls like `getUser()`. +2. `AuthorisingFileContentProvider` overrides the common `AuthorisingFileContentProvider` to define the specific `isPublicRepository()` function. +3. `FactoryParameterResolver` validates SCM URL if it corresponds to the SCM provider. Also Provides specific Factory Parameters resolver for the SCM repository. +4. `PersonalAccessTokenFetcher` fetches Personal Access Token from the SCM provider by reqesting the OAuth API of the provider. Validates the token by comparing the token access scopes with the predefined scope list. +5. `FileResolver` Implementation of a resolver that can return particular file content from specified SCM repository. +6. `URLParser` Parses the string representation of the URL to an SCM specific object +7. `UserDataFetcher` Implementation of a resolver that can return particular file content from specified SCM repository. + +# CI +There are several [GitHub Actions](https://github.com/eclipse-che/che-server/actions) workflows implemented for this repository: + +- [![build-next](https://github.com/eclipse-che/che-server/actions/workflows/next-build.yml/badge.svg)](https://github.com/eclipse-che/che-server/actions/workflows/next-build.yml) +Builds Maven artifacts, builds container images and pushes them to [quay.io](https://quay.io/organization/eclipse) on each commit to [`main`](https://github.com/eclipse-che/che-server/tree/main) branch. +- [![Release Che Server](https://github.com/eclipse-che/che-server/actions/workflows/release.yml/badge.svg)](https://github.com/eclipse-che/che-server/actions/workflows/release.yml) +Builds Maven artifacts and container images. Images are public and pushed to [quay.io](https://quay.io/organization/eclipse). See [RELEASE.md](https://github.com/eclipse-che/che-server/blob/master/RELEASE.md) for more information about this workflow. +- [![Release Changelog](https://github.com/eclipse-che/che-server/actions/workflows/release-changelog.yml/badge.svg)](https://github.com/eclipse-che/che-server/actions/workflows/release-changelog.yml) +Creates a GitHub release which will include a generated changelog. +- [![Update Che docs variables](https://github.com/eclipse-che/che-server/actions/workflows/che-properties-docs-update.yml/badge.svg)](https://github.com/eclipse-che/che-server/actions/workflows/che-properties-docs-update.yml/badge.svg) +Runs on each commit to [`main`](https://github.com/eclipse-che/che-server/tree/main) branch. +- [![build-pr-check](https://github.com/eclipse-che/che-server/actions/workflows/build-pr-check.yml/badge.svg)](https://github.com/eclipse-che/che-server/actions/workflows/build-pr-check.yml) +Builds Maven artifacts and container images. This workflow is used as a check for all pull requests that are submitted to this project. +- [![Sonar](https://github.com/eclipse-che/che-server/actions/workflows/sonar.yaml/badge.svg)](https://github.com/eclipse-che/che-server/actions/workflows/sonar.yaml) +Runs Sonar against the main branch. The result can be seen [here](https://sonarcloud.io/dashboard?id=org.eclipse.che%3Ache-server). +- [![Try in Web IDE](https://github.com/eclipse-che/che-server/actions/workflows/try-in-web-ide.yaml/badge.svg)](https://github.com/eclipse-che/che-server/actions/workflows/try-in-web-ide.yaml) +Used as a check for pull requests that are submitted to this project. + +Downstream builds can be found at the link below, which is _internal to Red Hat_. Stable builds can be found by replacing the 3.x with a specific version like 3.2. + +- [server_3.x](https://main-jenkins-csb-crwqe.apps.ocp-c1.prod.psi.redhat.com/job/DS_CI/job/server_3.x/) + +# Report issues +Issues are tracked on the main Eclipse Che Repository: https://github.com/eclipse/che/issues diff --git a/README.md b/README.md index 23535e476f..fa53d3968a 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # What is Che server -Che Server provides an API for managing Kubernetes namespaces, and to retrieve devfile content from repositories, -hosted on GitHub, GitLab, Bitbucket, and Microsoft Azure Repos. +Che Server provides an API for managing Kubernetes namespaces and to retrieve devfile content from repositories, +hosted on GitHub, GitLab, Bitbucket and Microsoft Azure Repos. # Project structure Che Server is mostly a Java web application deployed on an Apache Tomcat server in a container. Che Server uses the following modules: @@ -24,55 +24,6 @@ Che Server is mostly a Java web application deployed on an Apache Tomcat server Other modules are deprecated and will be removed in the future. -# Build requirements -- Apache Maven 3.9 or later -- JDK 11 -- Podman or Docker (required for running integration tests) - -# Sources build -Run `mvn clean install` to build. Activate a faster profile build by adding `-Pfast`. - -You can skip enforcers, validators, and tests with: - -``` -mvn clean install -V -B -e -Pfast -DskipTests -Dskip-validate-sources -Denforcer.skip=true -Dmaven.repo.local=.repository/ -``` - -# Image build and push -1. Go to the `dockerfiles` directory. -2. Run `./build.sh`. -3. Tag the **che-server** image with your account: `docker tag quay.io/eclipse/che-server:next //che-server:next`. -4. Push the **che-server** image to your account: `docker push //che-server:next`. - -# Debug -1. Deploy Che to a [Red Hat OpenShift](https://www.eclipse.org/che/docs/stable/administration-guide/installing-che-on-openshift-using-cli/) or [Minikube](https://www.eclipse.org/che/docs/stable/administration-guide/installing-che-on-minikube/) cluster by using a previously built image: `chectl server:start --platform= --cheimage=//che-server:next`. -2. Enable local debugging of the Eclipse Che server: `chectl server:debug`. -3. In your IDE, create a new Remote JVM Debug configuration on `localhost:8000`. -4. Hit a breakpoint in the code and activate the debug configuration. - - -# CI -There are several [GitHub Actions](https://github.com/eclipse-che/che-server/actions) workflows implemented for this repository: - -- [![build-next](https://github.com/eclipse-che/che-server/actions/workflows/next-build.yml/badge.svg)](https://github.com/eclipse-che/che-server/actions/workflows/next-build.yml) -Builds Maven artifacts, builds container images and pushes them to [quay.io](https://quay.io/organization/eclipse) on each commit to [`main`](https://github.com/eclipse-che/che-server/tree/main) branch. -- [![Release Che Server](https://github.com/eclipse-che/che-server/actions/workflows/release.yml/badge.svg)](https://github.com/eclipse-che/che-server/actions/workflows/release.yml) -Builds Maven artifacts and container images. Images are public and pushed to [quay.io](https://quay.io/organization/eclipse). See [RELEASE.md](https://github.com/eclipse-che/che-server/blob/master/RELEASE.md) for more information about this workflow. -- [![Release Changelog](https://github.com/eclipse-che/che-server/actions/workflows/release-changelog.yml/badge.svg)](https://github.com/eclipse-che/che-server/actions/workflows/release-changelog.yml) -Creates a GitHub release which will include a generated changelog. -- [![Update Che docs variables](https://github.com/eclipse-che/che-server/actions/workflows/che-properties-docs-update.yml/badge.svg)](https://github.com/eclipse-che/che-server/actions/workflows/che-properties-docs-update.yml/badge.svg) -Runs on each commit to [`main`](https://github.com/eclipse-che/che-server/tree/main) branch. -- [![build-pr-check](https://github.com/eclipse-che/che-server/actions/workflows/build-pr-check.yml/badge.svg)](https://github.com/eclipse-che/che-server/actions/workflows/build-pr-check.yml) -Builds Maven artifacts and container images. This workflow is used as a check for all pull requests that are submitted to this project. -- [![Sonar](https://github.com/eclipse-che/che-server/actions/workflows/sonar.yaml/badge.svg)](https://github.com/eclipse-che/che-server/actions/workflows/sonar.yaml) -Runs Sonar against the main branch. The result can be seen [here](https://sonarcloud.io/dashboard?id=org.eclipse.che%3Ache-server). -- [![Try in Web IDE](https://github.com/eclipse-che/che-server/actions/workflows/try-in-web-ide.yaml/badge.svg)](https://github.com/eclipse-che/che-server/actions/workflows/try-in-web-ide.yaml) -Used as a check for pull requests that are submitted to this project. - -Downstream builds can be found at the link below, which is _internal to Red Hat_. Stable builds can be found by replacing the 3.x with a specific version like 3.2. - -- [server_3.x](https://main-jenkins-csb-crwqe.apps.ocp-c1.prod.psi.redhat.com/job/DS_CI/job/server_3.x/) - # License - [Eclipse Public License 2.0](LICENSE) @@ -81,7 +32,3 @@ Downstream builds can be found at the link below, which is _internal to Red Hat_ The Eclipse Che community is globally reachable through public chat rooms, mailing list and weekly calls. See the Eclipse Che Documentation about [how you can join our community](https://www.eclipse.org/che/docs/stable/overview/introduction-to-eclipse-che/#_joining_the_community). - -## Report issues - -Issues are tracked on the main Eclipse Che Repository: https://github.com/eclipse/che/issues From 5d645e1d3ccb6aac3ae04fa81d88e1c7660f80b0 Mon Sep 17 00:00:00 2001 From: Igor Date: Wed, 27 Sep 2023 11:08:37 +0300 Subject: [PATCH 71/75] Update contributing.md file --- CONTRIBUTING.md | 41 ++++++++++++++++++++++++++++++----------- 1 file changed, 30 insertions(+), 11 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 686a646050..46b9272335 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,17 +1,36 @@ -# Build requirements +## Developing with Eclipse Che + +This project contains a [devfile v2](https://github.com/eclipse-che/che-server/blob/main/devfile.yaml) located in the project's root directory. +With this devfile you can perform the following tasks: + +- Build project sources with maven. +- Build a container image. +- Push your changes to GitHub. + +### Starting a Workspace within Eclipse Che + +To start a new workspace within Eclipse Che, navigate to the following URL: + +```sh +{CHE-HOST}/#https://github.com/eclipse-che/che-server +``` + +### Running Devfile Tasks for Downloading Dependencies and Building the Project + +For VS Code, execute tasks defined in the devfile with these steps: + +1. Open the command palette (Ctrl/Cmd + Shift + P). +2. Execute the `Tasks: Run Task` command. +3. Select the `devfile` folder and select the `1. Build sources` task to build the project sources with maven. +4. Follow steps 1 and 2 again, select the `1. Build image` task to build a container image. +5. In the workspace terminal, tag the **che-server** image with your account: `podman tag quay.io/eclipse/che-server:next //che-server:next`. +6. Push the **che-server** image to your account: `podman push //che-server:next`. + +# Local build requirements - Apache Maven 3.9 or later - JDK 11 - Podman or Docker (required for running integration tests) -A Che workspace environment allows to build the image internaly, using the workspace terminal. - -# Sources build -Run `mvn clean install` to build. Activate a faster profile build by adding `-Pfast`. - -# Image build and push -1. Go to the `dockerfiles` directory. -2. Run `./build.sh`. -3. Tag the **che-server** image with your account: `docker tag quay.io/eclipse/che-server:next //che-server:next`. -4. Push the **che-server** image to your account: `docker push //che-server:next`. +A Che workspace environment allows to build the image internally, using the workspace terminal. # Start and debug 1. Deploy Che to a [Red Hat OpenShift](https://www.eclipse.org/che/docs/stable/administration-guide/installing-che-on-openshift-using-cli/) or [Minikube](https://www.eclipse.org/che/docs/stable/administration-guide/installing-che-on-minikube/) cluster by using a previously built image: `chectl server:start --platform= --cheimage=//che-server:next`. From f27f8b1589fa289ffaa8c6e05d7908001347dee7 Mon Sep 17 00:00:00 2001 From: Igor Vinokur Date: Thu, 12 Oct 2023 14:38:05 +0300 Subject: [PATCH 72/75] Update minor maven dependencies (#577) --- .../src/test/resources/jwtproxy-confg.yaml | 1 + .../che-multiuser-keycloak-server/pom.xml | 5 ++ .../pom.xml | 5 ++ pom.xml | 65 ++++++++++--------- wsmaster/che-core-api-auth-bitbucket/pom.xml | 5 ++ wsmaster/che-core-api-auth-github/pom.xml | 5 ++ wsmaster/che-core-api-auth-gitlab/pom.xml | 5 ++ wsmaster/che-core-api-auth/pom.xml | 5 ++ .../pom.xml | 5 ++ .../che-core-api-factory-bitbucket/pom.xml | 5 ++ wsmaster/che-core-api-factory-github/pom.xml | 5 ++ wsmaster/che-core-api-factory-gitlab/pom.xml | 5 ++ 12 files changed, 86 insertions(+), 30 deletions(-) diff --git a/infrastructures/kubernetes/src/test/resources/jwtproxy-confg.yaml b/infrastructures/kubernetes/src/test/resources/jwtproxy-confg.yaml index e6d9e710a4..adb045d04c 100644 --- a/infrastructures/kubernetes/src/test/resources/jwtproxy-confg.yaml +++ b/infrastructures/kubernetes/src/test/resources/jwtproxy-confg.yaml @@ -49,3 +49,4 @@ jwtproxy: type: "void" public_base_path: "/here" upstream: "ws://terminal:4101" + diff --git a/multiuser/keycloak/che-multiuser-keycloak-server/pom.xml b/multiuser/keycloak/che-multiuser-keycloak-server/pom.xml index 5f566b2b10..bc87be2c33 100644 --- a/multiuser/keycloak/che-multiuser-keycloak-server/pom.xml +++ b/multiuser/keycloak/che-multiuser-keycloak-server/pom.xml @@ -194,6 +194,11 @@ testng test + + org.wiremock + wiremock-standalone + test + diff --git a/multiuser/keycloak/che-multiuser-keycloak-user-remover/pom.xml b/multiuser/keycloak/che-multiuser-keycloak-user-remover/pom.xml index 445933c90a..4191f6eb9c 100644 --- a/multiuser/keycloak/che-multiuser-keycloak-user-remover/pom.xml +++ b/multiuser/keycloak/che-multiuser-keycloak-user-remover/pom.xml @@ -117,5 +117,10 @@ testng test + + org.wiremock + wiremock-standalone + test + diff --git a/pom.xml b/pom.xml index 0bd1a24c10..5ef0baf4b5 100644 --- a/pom.xml +++ b/pom.xml @@ -48,33 +48,32 @@ 1.0 - 1.2.11 - 0.20.0 - 2.14.3 + 1.4.11 + 0.22.1 + 2.15.2 1.7.1 - 2.32.0 5.0.1 2.3.4 32.1.2-jre 1.43.3 1.34.1 - 2.8.9 - 2.1.210 + 2.10.1 + 2.2.224 0.1.55 3.14.9 - 3.5.0 + 3.6.0 1.5 - 2.11.0 + 2.14.0 2.6 false quay.io/eclipse/che--centos--mysql-57-centos7:latest-e08ee4d43b7356607685b69bde6335e27cf20c020f345b6c6c59400183882764 quay.io/eclipse/che--centos--postgresql-13-centos7:1-71b24684d64da46f960682cc4216222a7e4ed8b1a31dd5a865b3e71afdea20d2 - 6.8.1 + 6.9.0 0.2.2 1.8.1 1.8.1 0.11.2 - 1.10.5 + 1.11.4 0.6.0 0.4.0 0.3.0 @@ -84,19 +83,19 @@ 0.4.1 0.16.0 4.4.0 - 2.1.11 - 2.0.1 - 2.0.0 + 2.2.16 + 2.1.2 + 2.1.1 1.0.5 - 2.0.0 + 2.0.1 2.0.1 - 5.0.0 - 3.0.0 + 6.0.0 + 3.0.2 2.0.0 - 3.0.0 + 3.1.0 11 ${java.target.version} - 4.12 + 4.13.2 Red Hat, Inc. - initial API and implementation ${project.version} @@ -104,7 +103,7 @@ 1.0-beta2 Red Hat, Inc. - 7.0.1 + 7.4 3.0.0 3.5.0 3.2.0 @@ -129,20 +128,20 @@ [3.6.2,) 3.0.0-M5 3.3.2 - 8.0.27 + 8.0.33 4.1.0 - 4.3.1 - 3.12.0 - 4.5.13 - 4.4.15 + 4.3.4 + 3.13.0 + 4.5.14 + 4.4.16 3.3.0 - 3.6.2 + 3.9.0 3.9.4 10.1.6 3.4.1 2.7.10 2.2.3 - 0.3.5 + 0.9.0.M2 1.15.0 4.2.0 2.2 @@ -152,10 +151,11 @@ 3.1.0 0.4.13 3.11.2 - 42.5.1 + 42.6.0 0.9.9 - 1.7.36 - 7.4.0 + 2.0.9 + 7.8.0 + 3.0.1 @@ -187,7 +187,7 @@ com.github.tomakehurst wiremock-jre8-standalone - ${com.github.tomakehurst.wiremock-jre8-standalone.version} + ${org.wiremock.version} com.google.code.gson @@ -1409,6 +1409,11 @@ testng ${org.testng.version} + + org.wiremock + wiremock-standalone + ${org.wiremock.version} + com.fasterxml.jackson jackson-bom diff --git a/wsmaster/che-core-api-auth-bitbucket/pom.xml b/wsmaster/che-core-api-auth-bitbucket/pom.xml index bb23c0dcc4..1a1ab4d71c 100644 --- a/wsmaster/che-core-api-auth-bitbucket/pom.xml +++ b/wsmaster/che-core-api-auth-bitbucket/pom.xml @@ -73,5 +73,10 @@ testng test + + org.wiremock + wiremock-standalone + test + diff --git a/wsmaster/che-core-api-auth-github/pom.xml b/wsmaster/che-core-api-auth-github/pom.xml index 0f91dfc23a..c4efb182af 100644 --- a/wsmaster/che-core-api-auth-github/pom.xml +++ b/wsmaster/che-core-api-auth-github/pom.xml @@ -73,5 +73,10 @@ testng test + + org.wiremock + wiremock-standalone + test + diff --git a/wsmaster/che-core-api-auth-gitlab/pom.xml b/wsmaster/che-core-api-auth-gitlab/pom.xml index b24f8d528d..64283da6a9 100644 --- a/wsmaster/che-core-api-auth-gitlab/pom.xml +++ b/wsmaster/che-core-api-auth-gitlab/pom.xml @@ -68,5 +68,10 @@ testng test + + org.wiremock + wiremock-standalone + test + diff --git a/wsmaster/che-core-api-auth/pom.xml b/wsmaster/che-core-api-auth/pom.xml index 1f68b3ad3d..1e841b160f 100644 --- a/wsmaster/che-core-api-auth/pom.xml +++ b/wsmaster/che-core-api-auth/pom.xml @@ -154,6 +154,11 @@ testng test + + org.wiremock + wiremock-standalone + test + diff --git a/wsmaster/che-core-api-factory-bitbucket-server/pom.xml b/wsmaster/che-core-api-factory-bitbucket-server/pom.xml index 09ecff99e1..65b07d8f33 100644 --- a/wsmaster/che-core-api-factory-bitbucket-server/pom.xml +++ b/wsmaster/che-core-api-factory-bitbucket-server/pom.xml @@ -154,5 +154,10 @@ testng test + + org.wiremock + wiremock-standalone + test + diff --git a/wsmaster/che-core-api-factory-bitbucket/pom.xml b/wsmaster/che-core-api-factory-bitbucket/pom.xml index 3d11345ad0..9bc09c8b04 100644 --- a/wsmaster/che-core-api-factory-bitbucket/pom.xml +++ b/wsmaster/che-core-api-factory-bitbucket/pom.xml @@ -144,5 +144,10 @@ testng test + + org.wiremock + wiremock-standalone + test + diff --git a/wsmaster/che-core-api-factory-github/pom.xml b/wsmaster/che-core-api-factory-github/pom.xml index 7f33beebbd..e47dcdfdb3 100644 --- a/wsmaster/che-core-api-factory-github/pom.xml +++ b/wsmaster/che-core-api-factory-github/pom.xml @@ -148,5 +148,10 @@ testng test + + org.wiremock + wiremock-standalone + test + diff --git a/wsmaster/che-core-api-factory-gitlab/pom.xml b/wsmaster/che-core-api-factory-gitlab/pom.xml index ad9a2af20a..7ceac5ce66 100644 --- a/wsmaster/che-core-api-factory-gitlab/pom.xml +++ b/wsmaster/che-core-api-factory-gitlab/pom.xml @@ -144,5 +144,10 @@ testng test + + org.wiremock + wiremock-standalone + test + From 386f84962d5d7f0f9535437b2683c3389fc2ecb3 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 12 Oct 2023 15:42:17 +0300 Subject: [PATCH 73/75] chore(deps): bump mockito-testng from 0.4.13 to 0.5.2 (#509) * chore(deps): bump mockito-testng from 0.4.13 to 0.5.0 Bumps [mockito-testng](https://github.com/mockito/mockito-testng) from 0.4.13 to 0.5.0. - [Release notes](https://github.com/mockito/mockito-testng/releases) - [Changelog](https://github.com/mockito/mockito-testng/blob/master/docs/release-notes.md) - [Commits](https://github.com/mockito/mockito-testng/compare/v0.4.13...v0.5.0) --- updated-dependencies: - dependency-name: org.mockito:mockito-testng dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] * Update pom.xml --------- Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Igor Vinokur --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 5ef0baf4b5..1528dff033 100644 --- a/pom.xml +++ b/pom.xml @@ -149,7 +149,7 @@ 1.0.13.Final 4.1.9.Final 3.1.0 - 0.4.13 + 0.5.2 3.11.2 42.6.0 0.9.9 From 148415c69160f091e604bc283ef3554504ea1ce4 Mon Sep 17 00:00:00 2001 From: Igor Vinokur Date: Thu, 12 Oct 2023 15:59:42 +0300 Subject: [PATCH 74/75] Respect authorisation request opt-out on workspace start (#576) If user rejects an scm provider authorisation request while creating or starting existed workspace store the name of the scm provider in the workspace-preferences config-map. The workspace create/start step must proceed without token fetch step. If user creates another workspace or starts existed workspace from an scm provider which name is stored in the config-map, do not ask the authorisation as it was already rejected once. --- .../che/api/deploy/WsMasterModule.java | 2 - .../infrastructure-factory/pom.xml | 12 ++ .../server/scm/KubernetesScmModule.java | 5 +- ...KubernetesAuthorisationRequestManager.java | 145 +++++++++++++ ...rnetesAuthorisationRequestManagerTest.java | 197 ++++++++++++++++++ wsmaster/che-core-api-auth/pom.xml | 4 - .../oauth/AuthorisationRequestManager.java | 47 +++++ .../che/security/oauth/EmbeddedOAuthAPI.java | 3 +- .../oauth/OAuthAuthenticationService.java | 4 +- .../AzureDevOpsFactoryParametersResolver.java | 37 ++-- .../devops/AzureDevOpsUserDataFetcher.java | 4 +- ...rAuthorizingFactoryParametersResolver.java | 40 ++-- ...horizingFactoryParametersResolverTest.java | 9 +- .../BitbucketFactoryParametersResolver.java | 36 ++-- ...itbucketFactoryParametersResolverTest.java | 6 +- wsmaster/che-core-api-factory-git-ssh/pom.xml | 4 + .../ssh/GitSshFactoryParametersResolver.java | 16 +- .../GithubFactoryParametersResolver.java | 44 ++-- .../server/github/GithubUserDataFetcher.java | 6 +- .../GithubFactoryParametersResolverTest.java | 47 +++++ .../github/GithubGitUserDataFetcherTest.java | 4 +- .../GitlabFactoryParametersResolver.java | 36 ++-- .../server/gitlab/GitlabUserDataFetcher.java | 3 +- .../GitlabFactoryParametersResolverTest.java | 9 +- .../gitlab/GitlabUserDataFetcherTest.java | 4 +- wsmaster/che-core-api-factory/pom.xml | 4 + .../server/BaseFactoryParameterResolver.java | 121 +++++++++++ .../server/FactoryParametersResolver.java | 49 +---- .../api/factory/server/FactoryService.java | 12 +- ...RawDevfileUrlFactoryParameterResolver.java | 11 +- .../scm/AbstractGitUserDataFetcher.java | 5 +- .../factory/server/scm/OAuthTokenFetcher.java | 34 --- .../BaseFactoryParameterResolverTest.java | 76 +++++++ .../factory/server/FactoryServiceTest.java | 53 ++++- 34 files changed, 886 insertions(+), 203 deletions(-) create mode 100644 infrastructures/infrastructure-factory/src/main/java/org/eclipse/che/api/factory/server/scm/kubernetes/KubernetesAuthorisationRequestManager.java create mode 100644 infrastructures/infrastructure-factory/src/test/java/org/eclipse/che/api/factory/server/scm/kubernetes/KubernetesAuthorisationRequestManagerTest.java create mode 100644 wsmaster/che-core-api-auth/src/main/java/org/eclipse/che/security/oauth/AuthorisationRequestManager.java create mode 100644 wsmaster/che-core-api-factory/src/main/java/org/eclipse/che/api/factory/server/BaseFactoryParameterResolver.java delete mode 100644 wsmaster/che-core-api-factory/src/main/java/org/eclipse/che/api/factory/server/scm/OAuthTokenFetcher.java create mode 100644 wsmaster/che-core-api-factory/src/test/java/org/eclipse/che/api/factory/server/BaseFactoryParameterResolverTest.java diff --git a/assembly/assembly-wsmaster-war/src/main/java/org/eclipse/che/api/deploy/WsMasterModule.java b/assembly/assembly-wsmaster-war/src/main/java/org/eclipse/che/api/deploy/WsMasterModule.java index 93379d7a99..08acaa2eaf 100644 --- a/assembly/assembly-wsmaster-war/src/main/java/org/eclipse/che/api/deploy/WsMasterModule.java +++ b/assembly/assembly-wsmaster-war/src/main/java/org/eclipse/che/api/deploy/WsMasterModule.java @@ -51,7 +51,6 @@ import org.eclipse.che.api.factory.server.github.GithubFactoryParametersResolver import org.eclipse.che.api.factory.server.github.GithubScmFileResolver; import org.eclipse.che.api.factory.server.gitlab.GitlabFactoryParametersResolver; import org.eclipse.che.api.factory.server.gitlab.GitlabScmFileResolver; -import org.eclipse.che.api.factory.server.scm.OAuthTokenFetcher; import org.eclipse.che.api.metrics.WsMasterMetricsModule; import org.eclipse.che.api.system.server.ServiceTermination; import org.eclipse.che.api.system.server.SystemModule; @@ -413,7 +412,6 @@ public class WsMasterModule extends AbstractModule { bind(TokenValidator.class).to(NotImplementedTokenValidator.class); bind(ProfileDao.class).to(JpaProfileDao.class); bind(OAuthAPI.class).to(EmbeddedOAuthAPI.class).asEagerSingleton(); - bind(OAuthTokenFetcher.class).to(EmbeddedOAuthAPI.class).asEagerSingleton(); } bind(AdminPermissionInitializer.class).asEagerSingleton(); diff --git a/infrastructures/infrastructure-factory/pom.xml b/infrastructures/infrastructure-factory/pom.xml index 809d2d42b5..2593e203fc 100644 --- a/infrastructures/infrastructure-factory/pom.xml +++ b/infrastructures/infrastructure-factory/pom.xml @@ -23,6 +23,10 @@ jar Infrastructure :: Factory components + + com.google.code.gson + gson + com.google.guava guava @@ -43,6 +47,14 @@ jakarta.inject jakarta.inject-api + + jakarta.ws.rs + jakarta.ws.rs-api + + + org.eclipse.che.core + che-core-api-auth + org.eclipse.che.core che-core-api-core diff --git a/infrastructures/infrastructure-factory/src/main/java/org/eclipse/che/api/factory/server/scm/KubernetesScmModule.java b/infrastructures/infrastructure-factory/src/main/java/org/eclipse/che/api/factory/server/scm/KubernetesScmModule.java index 014a68dc35..c7e0f79dd4 100644 --- a/infrastructures/infrastructure-factory/src/main/java/org/eclipse/che/api/factory/server/scm/KubernetesScmModule.java +++ b/infrastructures/infrastructure-factory/src/main/java/org/eclipse/che/api/factory/server/scm/KubernetesScmModule.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012-2021 Red Hat, Inc. + * Copyright (c) 2012-2023 Red Hat, Inc. * This program and the accompanying materials are made * available under the terms of the Eclipse Public License 2.0 * which is available at https://www.eclipse.org/legal/epl-2.0/ @@ -12,13 +12,16 @@ package org.eclipse.che.api.factory.server.scm; import com.google.inject.AbstractModule; +import org.eclipse.che.api.factory.server.scm.kubernetes.KubernetesAuthorisationRequestManager; import org.eclipse.che.api.factory.server.scm.kubernetes.KubernetesGitCredentialManager; import org.eclipse.che.api.factory.server.scm.kubernetes.KubernetesPersonalAccessTokenManager; +import org.eclipse.che.security.oauth.AuthorisationRequestManager; public class KubernetesScmModule extends AbstractModule { @Override protected void configure() { bind(GitCredentialManager.class).to(KubernetesGitCredentialManager.class); bind(PersonalAccessTokenManager.class).to(KubernetesPersonalAccessTokenManager.class); + bind(AuthorisationRequestManager.class).to(KubernetesAuthorisationRequestManager.class); } } diff --git a/infrastructures/infrastructure-factory/src/main/java/org/eclipse/che/api/factory/server/scm/kubernetes/KubernetesAuthorisationRequestManager.java b/infrastructures/infrastructure-factory/src/main/java/org/eclipse/che/api/factory/server/scm/kubernetes/KubernetesAuthorisationRequestManager.java new file mode 100644 index 0000000000..51dd6e6258 --- /dev/null +++ b/infrastructures/infrastructure-factory/src/main/java/org/eclipse/che/api/factory/server/scm/kubernetes/KubernetesAuthorisationRequestManager.java @@ -0,0 +1,145 @@ +/* + * Copyright (c) 2012-2023 Red Hat, Inc. + * This program and the accompanying materials are made + * available under the terms of the Eclipse Public License 2.0 + * which is available at https://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 + * + * Contributors: + * Red Hat, Inc. - initial API and implementation + */ +package org.eclipse.che.api.factory.server.scm.kubernetes; + +import static com.google.common.base.Strings.isNullOrEmpty; +import static org.eclipse.che.commons.lang.UrlUtils.getParameter; +import static org.eclipse.che.commons.lang.UrlUtils.getQueryParametersFromState; +import static org.eclipse.che.commons.lang.UrlUtils.getRequestUrl; +import static org.eclipse.che.commons.lang.UrlUtils.getState; +import static org.eclipse.che.workspace.infrastructure.kubernetes.namespace.AbstractWorkspaceServiceAccount.PREFERENCES_CONFIGMAP_NAME; + +import com.google.gson.Gson; +import io.fabric8.kubernetes.api.model.ConfigMap; +import io.fabric8.kubernetes.client.KubernetesClient; +import jakarta.ws.rs.core.UriInfo; +import java.net.URL; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import javax.inject.Inject; +import javax.inject.Singleton; +import org.eclipse.che.api.factory.server.scm.exception.ScmConfigurationPersistenceException; +import org.eclipse.che.api.factory.server.scm.exception.UnsatisfiedScmPreconditionException; +import org.eclipse.che.api.workspace.server.spi.InfrastructureException; +import org.eclipse.che.security.oauth.AuthorisationRequestManager; +import org.eclipse.che.workspace.infrastructure.kubernetes.CheServerKubernetesClientFactory; +import org.eclipse.che.workspace.infrastructure.kubernetes.api.shared.KubernetesNamespaceMeta; +import org.eclipse.che.workspace.infrastructure.kubernetes.namespace.KubernetesNamespaceFactory; + +/** Store and retrieve rejected authorisation requests in the Kubernetes ConfigMap. */ +@Singleton +public class KubernetesAuthorisationRequestManager implements AuthorisationRequestManager { + private final KubernetesNamespaceFactory namespaceFactory; + private final CheServerKubernetesClientFactory cheServerKubernetesClientFactory; + private static final String SKIP_AUTHORISATION_MAP_KEY = "skip-authorisation"; + + @Inject + public KubernetesAuthorisationRequestManager( + KubernetesNamespaceFactory namespaceFactory, + CheServerKubernetesClientFactory cheServerKubernetesClientFactory) { + this.namespaceFactory = namespaceFactory; + this.cheServerKubernetesClientFactory = cheServerKubernetesClientFactory; + } + + @Override + public void store(String scmProviderName) { + if (isStored(scmProviderName)) { + return; + } + ConfigMap configMap = getConfigMap(); + HashSet fromJson = getSkipAuthorisationValues(); + fromJson.add(scmProviderName); + + configMap.setData(Map.of(SKIP_AUTHORISATION_MAP_KEY, fromJson.toString())); + + patchConfigMap(configMap); + } + + @Override + public void remove(String scmProviderName) { + if (!isStored(scmProviderName)) { + return; + } + ConfigMap configMap = getConfigMap(); + HashSet fromJson = getSkipAuthorisationValues(); + fromJson.remove(scmProviderName); + + configMap.setData(Map.of(SKIP_AUTHORISATION_MAP_KEY, fromJson.toString())); + + patchConfigMap(configMap); + } + + @Override + public boolean isStored(String scmProviderName) { + return getSkipAuthorisationValues().contains(scmProviderName); + } + + @Override + public void callback(UriInfo uriInfo, List errorValues) { + URL requestUrl = getRequestUrl(uriInfo); + Map> params = getQueryParametersFromState(getState(requestUrl)); + errorValues = errorValues == null ? uriInfo.getQueryParameters().get("error") : errorValues; + if (errorValues != null && errorValues.contains("access_denied")) { + store(getParameter(params, "oauth_provider")); + } + } + + private ConfigMap getConfigMap() { + try (KubernetesClient kubernetesClient = cheServerKubernetesClientFactory.create()) { + String namespace = getFirstNamespace(); + return kubernetesClient + .configMaps() + .inNamespace(namespace) + .withName(PREFERENCES_CONFIGMAP_NAME) + .get(); + } catch (UnsatisfiedScmPreconditionException + | ScmConfigurationPersistenceException + | InfrastructureException e) { + throw new RuntimeException(e); + } + } + + private void patchConfigMap(ConfigMap configMap) { + try (KubernetesClient kubernetesClient = cheServerKubernetesClientFactory.create()) { + kubernetesClient + .configMaps() + .inNamespace(getFirstNamespace()) + .withName(PREFERENCES_CONFIGMAP_NAME) + .patch(configMap); + } catch (UnsatisfiedScmPreconditionException + | ScmConfigurationPersistenceException + | InfrastructureException e) { + throw new RuntimeException(e); + } + } + + private HashSet getSkipAuthorisationValues() { + String data = getConfigMap().getData().get(SKIP_AUTHORISATION_MAP_KEY); + return new Gson().fromJson(isNullOrEmpty(data) ? "[]" : data, HashSet.class); + } + + private String getFirstNamespace() + throws UnsatisfiedScmPreconditionException, ScmConfigurationPersistenceException { + try { + return namespaceFactory.list().stream() + .map(KubernetesNamespaceMeta::getName) + .findFirst() + .orElseThrow( + () -> + new UnsatisfiedScmPreconditionException( + "No user namespace found. Cannot read SCM credentials.")); + } catch (InfrastructureException e) { + throw new ScmConfigurationPersistenceException(e.getMessage(), e); + } + } +} diff --git a/infrastructures/infrastructure-factory/src/test/java/org/eclipse/che/api/factory/server/scm/kubernetes/KubernetesAuthorisationRequestManagerTest.java b/infrastructures/infrastructure-factory/src/test/java/org/eclipse/che/api/factory/server/scm/kubernetes/KubernetesAuthorisationRequestManagerTest.java new file mode 100644 index 0000000000..f585bb678a --- /dev/null +++ b/infrastructures/infrastructure-factory/src/test/java/org/eclipse/che/api/factory/server/scm/kubernetes/KubernetesAuthorisationRequestManagerTest.java @@ -0,0 +1,197 @@ +/* + * Copyright (c) 2012-2023 Red Hat, Inc. + * This program and the accompanying materials are made + * available under the terms of the Eclipse Public License 2.0 + * which is available at https://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 + * + * Contributors: + * Red Hat, Inc. - initial API and implementation + */ +package org.eclipse.che.api.factory.server.scm.kubernetes; + +import static org.eclipse.che.workspace.infrastructure.kubernetes.namespace.AbstractWorkspaceServiceAccount.PREFERENCES_CONFIGMAP_NAME; +import static org.mockito.ArgumentMatchers.anyMap; +import static org.mockito.ArgumentMatchers.eq; +import static org.mockito.Mockito.never; +import static org.mockito.Mockito.verify; +import static org.mockito.Mockito.when; +import static org.testng.Assert.assertEquals; +import static org.testng.Assert.assertFalse; +import static org.testng.Assert.assertTrue; + +import io.fabric8.kubernetes.api.model.ConfigMap; +import io.fabric8.kubernetes.api.model.ConfigMapList; +import io.fabric8.kubernetes.client.KubernetesClient; +import io.fabric8.kubernetes.client.dsl.MixedOperation; +import io.fabric8.kubernetes.client.dsl.NonNamespaceOperation; +import io.fabric8.kubernetes.client.dsl.Resource; +import java.util.Collections; +import java.util.Map; +import org.eclipse.che.workspace.infrastructure.kubernetes.CheServerKubernetesClientFactory; +import org.eclipse.che.workspace.infrastructure.kubernetes.api.server.impls.KubernetesNamespaceMetaImpl; +import org.eclipse.che.workspace.infrastructure.kubernetes.api.shared.KubernetesNamespaceMeta; +import org.eclipse.che.workspace.infrastructure.kubernetes.namespace.KubernetesNamespaceFactory; +import org.mockito.ArgumentCaptor; +import org.mockito.Mock; +import org.mockito.testng.MockitoTestNGListener; +import org.testng.annotations.BeforeMethod; +import org.testng.annotations.Listeners; +import org.testng.annotations.Test; + +@Listeners(MockitoTestNGListener.class) +public class KubernetesAuthorisationRequestManagerTest { + @Mock private KubernetesNamespaceFactory namespaceFactory; + + @Mock + private MixedOperation> configMapsMixedOperation; + + @Mock NonNamespaceOperation> nonNamespaceOperation; + + @Mock private Resource configMapResource; + + @Mock private ConfigMap configMap; + + @Mock private KubernetesClient kubeClient; + + @Mock private CheServerKubernetesClientFactory cheServerKubernetesClientFactory; + + private KubernetesAuthorisationRequestManager authorisationRequestManager; + + @BeforeMethod + protected void init() throws Exception { + KubernetesNamespaceMeta meta = new KubernetesNamespaceMetaImpl("test"); + when(namespaceFactory.list()).thenReturn(Collections.singletonList(meta)); + + when(cheServerKubernetesClientFactory.create()).thenReturn(kubeClient); + when(kubeClient.configMaps()).thenReturn(configMapsMixedOperation); + when(configMapsMixedOperation.inNamespace(eq(meta.getName()))) + .thenReturn(nonNamespaceOperation); + when(nonNamespaceOperation.withName(eq(PREFERENCES_CONFIGMAP_NAME))) + .thenReturn(configMapResource); + when(configMapResource.get()).thenReturn(configMap); + + authorisationRequestManager = + new KubernetesAuthorisationRequestManager( + namespaceFactory, cheServerKubernetesClientFactory); + } + + @Test + public void shouldStoreAuthorisationRequestToEmptyConfigMap() { + // given + ArgumentCaptor> captor = ArgumentCaptor.forClass(Map.class); + + // when + authorisationRequestManager.store("test-provider"); + + // then + verify(configMap).setData(captor.capture()); + Map value = captor.getValue(); + assertEquals(value.get("skip-authorisation"), "[test-provider]"); + } + + @Test + public void shouldStoreAuthorisationRequestToNonEmptyConfigMap() { + // given + when(configMap.getData()).thenReturn(Map.of("skip-authorisation", "[existing-provider]")); + ArgumentCaptor> captor = ArgumentCaptor.forClass(Map.class); + + // when + authorisationRequestManager.store("test-provider"); + + // then + verify(configMap).setData(captor.capture()); + Map value = captor.getValue(); + assertEquals(value.get("skip-authorisation"), "[test-provider, existing-provider]"); + } + + @Test + public void shouldNotStoreAuthorisationRequestIfAlreadyStored() { + // given + when(configMap.getData()).thenReturn(Map.of("skip-authorisation", "[test-provider]")); + + // when + authorisationRequestManager.store("test-provider"); + + // then + verify(configMap, never()).setData(anyMap()); + } + + @Test + public void shouldRemoveAuthorisationRequestFromNonEmptyConfigMap() { + // given + when(configMap.getData()) + .thenReturn(Map.of("skip-authorisation", "[test-provider, existing-provider]")); + ArgumentCaptor> captor = ArgumentCaptor.forClass(Map.class); + + // when + authorisationRequestManager.remove("test-provider"); + + // then + verify(configMap).setData(captor.capture()); + Map value = captor.getValue(); + assertEquals(value.get("skip-authorisation"), "[existing-provider]"); + } + + @Test + public void shouldRemoveAuthorisationRequestFromSingleValueConfigMap() { + // given + when(configMap.getData()).thenReturn(Map.of("skip-authorisation", "[test-provider]")); + ArgumentCaptor> captor = ArgumentCaptor.forClass(Map.class); + + // when + authorisationRequestManager.remove("test-provider"); + + // then + verify(configMap).setData(captor.capture()); + Map value = captor.getValue(); + assertEquals(value.get("skip-authorisation"), "[]"); + } + + @Test + public void shouldNotRemoveAuthorisationRequestIfAlreadyRemoved() { + // given + when(configMap.getData()).thenReturn(Map.of("skip-authorisation", "[]")); + + // when + authorisationRequestManager.remove("test-provider"); + + // then + verify(configMap, never()).setData(anyMap()); + } + + @Test + public void shouldReturnFalseAuthorisationRequestStateFromEmptyConfigMap() { + // when + boolean stored = authorisationRequestManager.isStored("test-provider"); + + // then + assertFalse(stored); + } + + @Test + public void shouldReturnFalseAuthorisationRequestStateFromNonEmptyConfigMap() { + // given + when(configMap.getData()).thenReturn(Map.of("skip-authorisation", "[existing-provider]")); + + // when + boolean stored = authorisationRequestManager.isStored("test-provider"); + + // then + assertFalse(stored); + } + + @Test + public void shouldReturnTrueAuthorisationRequestStateFromNonEmptyConfigMap() { + // given + when(configMap.getData()) + .thenReturn(Map.of("skip-authorisation", "[existing-provider, test-provider]")); + + // when + boolean stored = authorisationRequestManager.isStored("test-provider"); + + // then + assertTrue(stored); + } +} diff --git a/wsmaster/che-core-api-auth/pom.xml b/wsmaster/che-core-api-auth/pom.xml index 1e841b160f..c39ddd1229 100644 --- a/wsmaster/che-core-api-auth/pom.xml +++ b/wsmaster/che-core-api-auth/pom.xml @@ -59,10 +59,6 @@ org.eclipse.che.core che-core-api-dto - - org.eclipse.che.core - che-core-api-factory - org.eclipse.che.core che-core-commons-annotations diff --git a/wsmaster/che-core-api-auth/src/main/java/org/eclipse/che/security/oauth/AuthorisationRequestManager.java b/wsmaster/che-core-api-auth/src/main/java/org/eclipse/che/security/oauth/AuthorisationRequestManager.java new file mode 100644 index 0000000000..d2492a6597 --- /dev/null +++ b/wsmaster/che-core-api-auth/src/main/java/org/eclipse/che/security/oauth/AuthorisationRequestManager.java @@ -0,0 +1,47 @@ +/* + * Copyright (c) 2012-2023 Red Hat, Inc. + * This program and the accompanying materials are made + * available under the terms of the Eclipse Public License 2.0 + * which is available at https://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 + * + * Contributors: + * Red Hat, Inc. - initial API and implementation + */ +package org.eclipse.che.security.oauth; + +import jakarta.ws.rs.core.UriInfo; +import java.util.List; + +/** + * Manager for storing and retrieving rejected authorisation requests. This is used to prevent from + * asking the user to grant access to the SCM provider after the user has already rejected the + * request. + */ +public interface AuthorisationRequestManager { + /** + * Store the reject flag for the given SCM provider name. + * + * @param scmProviderName the SCM provider name + */ + void store(String scmProviderName); + + /** + * Remove the reject flag for the given SCM provider name. + * + * @param scmProviderName the SCM provider name + */ + void remove(String scmProviderName); + + /** + * Check if the reject flag is stored for the given SCM provider name. + * + * @param scmProviderName the SCM provider name to check + * @return {@code true} if the reject flag is stored, {@code false} otherwise + */ + boolean isStored(String scmProviderName); + + /** This method must be called on the Oauth callback from the SCM provider. */ + void callback(UriInfo uriInfo, List errorValues); +} diff --git a/wsmaster/che-core-api-auth/src/main/java/org/eclipse/che/security/oauth/EmbeddedOAuthAPI.java b/wsmaster/che-core-api-auth/src/main/java/org/eclipse/che/security/oauth/EmbeddedOAuthAPI.java index f04d2832e5..2ba960cb0e 100644 --- a/wsmaster/che-core-api-auth/src/main/java/org/eclipse/che/security/oauth/EmbeddedOAuthAPI.java +++ b/wsmaster/che-core-api-auth/src/main/java/org/eclipse/che/security/oauth/EmbeddedOAuthAPI.java @@ -40,7 +40,6 @@ import org.eclipse.che.api.core.UnauthorizedException; import org.eclipse.che.api.core.rest.shared.dto.Link; import org.eclipse.che.api.core.rest.shared.dto.LinkParameter; import org.eclipse.che.api.core.util.LinksHelper; -import org.eclipse.che.api.factory.server.scm.OAuthTokenFetcher; import org.eclipse.che.commons.env.EnvironmentContext; import org.eclipse.che.commons.subject.Subject; import org.eclipse.che.security.oauth.shared.dto.OAuthAuthenticatorDescriptor; @@ -54,7 +53,7 @@ import org.slf4j.LoggerFactory; * @author Mykhailo Kuznietsov */ @Singleton -public class EmbeddedOAuthAPI implements OAuthAPI, OAuthTokenFetcher { +public class EmbeddedOAuthAPI implements OAuthAPI { private static final Logger LOG = LoggerFactory.getLogger(EmbeddedOAuthAPI.class); @Inject diff --git a/wsmaster/che-core-api-auth/src/main/java/org/eclipse/che/security/oauth/OAuthAuthenticationService.java b/wsmaster/che-core-api-auth/src/main/java/org/eclipse/che/security/oauth/OAuthAuthenticationService.java index 66e03434d5..eb135c99b9 100644 --- a/wsmaster/che-core-api-auth/src/main/java/org/eclipse/che/security/oauth/OAuthAuthenticationService.java +++ b/wsmaster/che-core-api-auth/src/main/java/org/eclipse/che/security/oauth/OAuthAuthenticationService.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012-2021 Red Hat, Inc. + * Copyright (c) 2012-2023 Red Hat, Inc. * This program and the accompanying materials are made * available under the terms of the Eclipse Public License 2.0 * which is available at https://www.eclipse.org/legal/epl-2.0/ @@ -38,6 +38,7 @@ public class OAuthAuthenticationService extends Service { @Context protected SecurityContext security; @Inject private OAuthAPI oAuthAPI; + @Inject private AuthorisationRequestManager authorisationRequestManager; /** * Redirect request to OAuth provider site for authentication|authorization. Client must provide @@ -66,6 +67,7 @@ public class OAuthAuthenticationService extends Service { /** Process OAuth callback */ public Response callback(@QueryParam("errorValues") List errorValues) throws OAuthAuthenticationException, NotFoundException, ForbiddenException { + authorisationRequestManager.callback(uriInfo, errorValues); return oAuthAPI.callback(uriInfo, errorValues); } diff --git a/wsmaster/che-core-api-factory-azure-devops/src/main/java/org/eclipse/che/api/factory/server/azure/devops/AzureDevOpsFactoryParametersResolver.java b/wsmaster/che-core-api-factory-azure-devops/src/main/java/org/eclipse/che/api/factory/server/azure/devops/AzureDevOpsFactoryParametersResolver.java index e98e35d7e6..60f307ad1a 100644 --- a/wsmaster/che-core-api-factory-azure-devops/src/main/java/org/eclipse/che/api/factory/server/azure/devops/AzureDevOpsFactoryParametersResolver.java +++ b/wsmaster/che-core-api-factory-azure-devops/src/main/java/org/eclipse/che/api/factory/server/azure/devops/AzureDevOpsFactoryParametersResolver.java @@ -11,10 +11,8 @@ */ package org.eclipse.che.api.factory.server.azure.devops; -import static org.eclipse.che.api.factory.shared.Constants.CURRENT_VERSION; import static org.eclipse.che.api.factory.shared.Constants.URL_PARAMETER_NAME; import static org.eclipse.che.dto.server.DtoFactory.newDto; -import static org.eclipse.che.security.oauth1.OAuthAuthenticationService.ERROR_QUERY_NAME; import com.google.common.base.Strings; import jakarta.validation.constraints.NotNull; @@ -23,6 +21,7 @@ import java.util.Map; import javax.inject.Inject; import javax.inject.Singleton; import org.eclipse.che.api.core.ApiException; +import org.eclipse.che.api.factory.server.BaseFactoryParameterResolver; import org.eclipse.che.api.factory.server.FactoryParametersResolver; import org.eclipse.che.api.factory.server.scm.PersonalAccessTokenManager; import org.eclipse.che.api.factory.server.urlfactory.ProjectConfigDtoMerger; @@ -38,6 +37,7 @@ import org.eclipse.che.api.workspace.shared.dto.ProjectConfigDto; import org.eclipse.che.api.workspace.shared.dto.SourceStorageDto; import org.eclipse.che.api.workspace.shared.dto.devfile.ProjectDto; import org.eclipse.che.api.workspace.shared.dto.devfile.SourceDto; +import org.eclipse.che.security.oauth.AuthorisationRequestManager; /** * Provides Factory Parameters resolver for Azure DevOps repositories. @@ -45,7 +45,10 @@ import org.eclipse.che.api.workspace.shared.dto.devfile.SourceDto; * @author Anatolii Bazko */ @Singleton -public class AzureDevOpsFactoryParametersResolver implements FactoryParametersResolver { +public class AzureDevOpsFactoryParametersResolver extends BaseFactoryParameterResolver + implements FactoryParametersResolver { + + private static final String PROVIDER_NAME = "azure-devops"; /** Parser which will allow to check validity of URLs and create objects. */ private final AzureDevOpsURLParser azureDevOpsURLParser; @@ -61,7 +64,9 @@ public class AzureDevOpsFactoryParametersResolver implements FactoryParametersRe AzureDevOpsURLParser azureDevOpsURLParser, URLFetcher urlFetcher, URLFactoryBuilder urlFactoryBuilder, - PersonalAccessTokenManager personalAccessTokenManager) { + PersonalAccessTokenManager personalAccessTokenManager, + AuthorisationRequestManager authorisationRequestManager) { + super(authorisationRequestManager, urlFactoryBuilder, PROVIDER_NAME); this.azureDevOpsURLParser = azureDevOpsURLParser; this.urlFetcher = urlFetcher; this.urlFactoryBuilder = urlFactoryBuilder; @@ -75,27 +80,25 @@ public class AzureDevOpsFactoryParametersResolver implements FactoryParametersRe && azureDevOpsURLParser.isValid(factoryParameters.get(URL_PARAMETER_NAME)); } + @Override + public String getProviderName() { + return PROVIDER_NAME; + } + @Override public FactoryMetaDto createFactory(@NotNull final Map factoryParameters) throws ApiException { - boolean skipAuthentication = - factoryParameters.get(ERROR_QUERY_NAME) != null - && factoryParameters.get(ERROR_QUERY_NAME).equals("access_denied"); - // no need to check null value of url parameter as accept() method has performed the check final AzureDevOpsUrl azureDevOpsUrl = azureDevOpsURLParser.parse(factoryParameters.get(URL_PARAMETER_NAME)); // create factory from the following location if location exists, else create default factory - return urlFactoryBuilder - .createFactoryFromDevfile( - azureDevOpsUrl, - new AzureDevOpsAuthorizingFileContentProvider( - azureDevOpsUrl, urlFetcher, personalAccessTokenManager), - extractOverrideParams(factoryParameters), - skipAuthentication) - .orElseGet(() -> newDto(FactoryDto.class).withV(CURRENT_VERSION).withSource("repo")) - .acceptVisitor(new AzureDevOpsFactoryVisitor(azureDevOpsUrl)); + return createFactory( + factoryParameters, + azureDevOpsUrl, + new AzureDevOpsFactoryVisitor(azureDevOpsUrl), + new AzureDevOpsAuthorizingFileContentProvider( + azureDevOpsUrl, urlFetcher, personalAccessTokenManager)); } /** diff --git a/wsmaster/che-core-api-factory-azure-devops/src/main/java/org/eclipse/che/api/factory/server/azure/devops/AzureDevOpsUserDataFetcher.java b/wsmaster/che-core-api-factory-azure-devops/src/main/java/org/eclipse/che/api/factory/server/azure/devops/AzureDevOpsUserDataFetcher.java index 75f126570d..5e8f23ac51 100644 --- a/wsmaster/che-core-api-factory-azure-devops/src/main/java/org/eclipse/che/api/factory/server/azure/devops/AzureDevOpsUserDataFetcher.java +++ b/wsmaster/che-core-api-factory-azure-devops/src/main/java/org/eclipse/che/api/factory/server/azure/devops/AzureDevOpsUserDataFetcher.java @@ -18,12 +18,12 @@ import javax.inject.Named; import org.eclipse.che.api.auth.shared.dto.OAuthToken; import org.eclipse.che.api.factory.server.scm.AbstractGitUserDataFetcher; import org.eclipse.che.api.factory.server.scm.GitUserData; -import org.eclipse.che.api.factory.server.scm.OAuthTokenFetcher; import org.eclipse.che.api.factory.server.scm.PersonalAccessToken; import org.eclipse.che.api.factory.server.scm.PersonalAccessTokenManager; import org.eclipse.che.api.factory.server.scm.exception.ScmBadRequestException; import org.eclipse.che.api.factory.server.scm.exception.ScmCommunicationException; import org.eclipse.che.api.factory.server.scm.exception.ScmItemNotFoundException; +import org.eclipse.che.security.oauth.OAuthAPI; /** * Azure DevOps user data fetcher. @@ -37,7 +37,7 @@ public class AzureDevOpsUserDataFetcher extends AbstractGitUserDataFetcher { @Inject public AzureDevOpsUserDataFetcher( - OAuthTokenFetcher oAuthTokenFetcher, + OAuthAPI oAuthTokenFetcher, PersonalAccessTokenManager personalAccessTokenManager, AzureDevOpsApiClient azureDevOpsApiClient, @Named("che.api") String cheApiEndpoint, diff --git a/wsmaster/che-core-api-factory-bitbucket-server/src/main/java/org/eclipse/che/api/factory/server/bitbucket/BitbucketServerAuthorizingFactoryParametersResolver.java b/wsmaster/che-core-api-factory-bitbucket-server/src/main/java/org/eclipse/che/api/factory/server/bitbucket/BitbucketServerAuthorizingFactoryParametersResolver.java index 7aafa4baec..e53a93b40c 100644 --- a/wsmaster/che-core-api-factory-bitbucket-server/src/main/java/org/eclipse/che/api/factory/server/bitbucket/BitbucketServerAuthorizingFactoryParametersResolver.java +++ b/wsmaster/che-core-api-factory-bitbucket-server/src/main/java/org/eclipse/che/api/factory/server/bitbucket/BitbucketServerAuthorizingFactoryParametersResolver.java @@ -11,10 +11,8 @@ */ package org.eclipse.che.api.factory.server.bitbucket; -import static org.eclipse.che.api.factory.shared.Constants.CURRENT_VERSION; import static org.eclipse.che.api.factory.shared.Constants.URL_PARAMETER_NAME; import static org.eclipse.che.dto.server.DtoFactory.newDto; -import static org.eclipse.che.security.oauth1.OAuthAuthenticationService.ERROR_QUERY_NAME; import jakarta.validation.constraints.NotNull; import java.util.Map; @@ -22,6 +20,7 @@ import javax.inject.Inject; import javax.inject.Singleton; import org.eclipse.che.api.core.ApiException; import org.eclipse.che.api.core.BadRequestException; +import org.eclipse.che.api.factory.server.BaseFactoryParameterResolver; import org.eclipse.che.api.factory.server.FactoryParametersResolver; import org.eclipse.che.api.factory.server.scm.PersonalAccessTokenManager; import org.eclipse.che.api.factory.server.urlfactory.RemoteFactoryUrl; @@ -31,10 +30,10 @@ import org.eclipse.che.api.factory.shared.dto.FactoryDto; import org.eclipse.che.api.factory.shared.dto.FactoryMetaDto; import org.eclipse.che.api.factory.shared.dto.FactoryVisitor; import org.eclipse.che.api.factory.shared.dto.ScmInfoDto; -import org.eclipse.che.api.workspace.server.devfile.FileContentProvider; import org.eclipse.che.api.workspace.server.devfile.URLFetcher; import org.eclipse.che.api.workspace.shared.dto.devfile.ProjectDto; import org.eclipse.che.api.workspace.shared.dto.devfile.SourceDto; +import org.eclipse.che.security.oauth.AuthorisationRequestManager; /** * Provides Factory Parameters resolver for both public and private bitbucket repositories. @@ -43,7 +42,9 @@ import org.eclipse.che.api.workspace.shared.dto.devfile.SourceDto; */ @Singleton public class BitbucketServerAuthorizingFactoryParametersResolver - implements FactoryParametersResolver { + extends BaseFactoryParameterResolver implements FactoryParametersResolver { + + private static final String PROVIDER_NAME = "bitbucket-server"; private final URLFactoryBuilder urlFactoryBuilder; private final URLFetcher urlFetcher; @@ -57,7 +58,9 @@ public class BitbucketServerAuthorizingFactoryParametersResolver URLFactoryBuilder urlFactoryBuilder, URLFetcher urlFetcher, BitbucketServerURLParser bitbucketURLParser, - PersonalAccessTokenManager personalAccessTokenManager) { + PersonalAccessTokenManager personalAccessTokenManager, + AuthorisationRequestManager authorisationRequestManager) { + super(authorisationRequestManager, urlFactoryBuilder, PROVIDER_NAME); this.urlFactoryBuilder = urlFactoryBuilder; this.urlFetcher = urlFetcher; this.bitbucketURLParser = bitbucketURLParser; @@ -77,6 +80,11 @@ public class BitbucketServerAuthorizingFactoryParametersResolver && bitbucketURLParser.isValid(factoryParameters.get(URL_PARAMETER_NAME)); } + @Override + public String getProviderName() { + return PROVIDER_NAME; + } + /** * Create factory object based on provided parameters * @@ -90,23 +98,13 @@ public class BitbucketServerAuthorizingFactoryParametersResolver // no need to check null value of url parameter as accept() method has performed the check final BitbucketServerUrl bitbucketServerUrl = bitbucketURLParser.parse(factoryParameters.get(URL_PARAMETER_NAME)); - - final FileContentProvider fileContentProvider = - new BitbucketServerAuthorizingFileContentProvider( - bitbucketServerUrl, urlFetcher, personalAccessTokenManager); - - boolean skipAuthentication = - factoryParameters.get(ERROR_QUERY_NAME) != null - && factoryParameters.get(ERROR_QUERY_NAME).equals("access_denied"); // create factory from the following location if location exists, else create default factory - return urlFactoryBuilder - .createFactoryFromDevfile( - bitbucketServerUrl, - fileContentProvider, - extractOverrideParams(factoryParameters), - skipAuthentication) - .orElseGet(() -> newDto(FactoryDto.class).withV(CURRENT_VERSION).withSource("repo")) - .acceptVisitor(new BitbucketFactoryVisitor(bitbucketServerUrl)); + return createFactory( + factoryParameters, + bitbucketServerUrl, + new BitbucketFactoryVisitor(bitbucketServerUrl), + new BitbucketServerAuthorizingFileContentProvider( + bitbucketServerUrl, urlFetcher, personalAccessTokenManager)); } /** diff --git a/wsmaster/che-core-api-factory-bitbucket-server/src/test/java/org/eclipse/che/api/factory/server/bitbucket/BitbucketServerAuthorizingFactoryParametersResolverTest.java b/wsmaster/che-core-api-factory-bitbucket-server/src/test/java/org/eclipse/che/api/factory/server/bitbucket/BitbucketServerAuthorizingFactoryParametersResolverTest.java index bd1160dc10..664d0749d2 100644 --- a/wsmaster/che-core-api-factory-bitbucket-server/src/test/java/org/eclipse/che/api/factory/server/bitbucket/BitbucketServerAuthorizingFactoryParametersResolverTest.java +++ b/wsmaster/che-core-api-factory-bitbucket-server/src/test/java/org/eclipse/che/api/factory/server/bitbucket/BitbucketServerAuthorizingFactoryParametersResolverTest.java @@ -45,6 +45,7 @@ import org.eclipse.che.api.workspace.server.devfile.URLFetcher; import org.eclipse.che.api.workspace.shared.dto.devfile.DevfileDto; import org.eclipse.che.api.workspace.shared.dto.devfile.MetadataDto; import org.eclipse.che.api.workspace.shared.dto.devfile.SourceDto; +import org.eclipse.che.security.oauth.AuthorisationRequestManager; import org.eclipse.che.security.oauth.OAuthAPI; import org.mockito.Mock; import org.mockito.testng.MockitoTestNGListener; @@ -62,6 +63,8 @@ public class BitbucketServerAuthorizingFactoryParametersResolverTest { @Mock private DevfileFilenamesProvider devfileFilenamesProvider; + @Mock private AuthorisationRequestManager authorisationRequestManager; + BitbucketServerURLParser bitbucketURLParser; @Mock private PersonalAccessTokenManager personalAccessTokenManager; @@ -79,7 +82,11 @@ public class BitbucketServerAuthorizingFactoryParametersResolverTest { assertNotNull(this.bitbucketURLParser); bitbucketServerFactoryParametersResolver = new BitbucketServerAuthorizingFactoryParametersResolver( - urlFactoryBuilder, urlFetcher, bitbucketURLParser, personalAccessTokenManager); + urlFactoryBuilder, + urlFetcher, + bitbucketURLParser, + personalAccessTokenManager, + authorisationRequestManager); assertNotNull(this.bitbucketServerFactoryParametersResolver); } diff --git a/wsmaster/che-core-api-factory-bitbucket/src/main/java/org/eclipse/che/api/factory/server/bitbucket/BitbucketFactoryParametersResolver.java b/wsmaster/che-core-api-factory-bitbucket/src/main/java/org/eclipse/che/api/factory/server/bitbucket/BitbucketFactoryParametersResolver.java index 86b37a7cb0..9c67f50f22 100644 --- a/wsmaster/che-core-api-factory-bitbucket/src/main/java/org/eclipse/che/api/factory/server/bitbucket/BitbucketFactoryParametersResolver.java +++ b/wsmaster/che-core-api-factory-bitbucket/src/main/java/org/eclipse/che/api/factory/server/bitbucket/BitbucketFactoryParametersResolver.java @@ -11,10 +11,8 @@ */ package org.eclipse.che.api.factory.server.bitbucket; -import static org.eclipse.che.api.factory.shared.Constants.CURRENT_VERSION; import static org.eclipse.che.api.factory.shared.Constants.URL_PARAMETER_NAME; import static org.eclipse.che.dto.server.DtoFactory.newDto; -import static org.eclipse.che.security.oauth1.OAuthAuthenticationService.ERROR_QUERY_NAME; import jakarta.validation.constraints.NotNull; import java.util.Map; @@ -22,6 +20,7 @@ import javax.inject.Inject; import javax.inject.Singleton; import org.eclipse.che.api.core.ApiException; import org.eclipse.che.api.core.BadRequestException; +import org.eclipse.che.api.factory.server.BaseFactoryParameterResolver; import org.eclipse.che.api.factory.server.FactoryParametersResolver; import org.eclipse.che.api.factory.server.scm.PersonalAccessTokenManager; import org.eclipse.che.api.factory.server.urlfactory.ProjectConfigDtoMerger; @@ -35,10 +34,14 @@ import org.eclipse.che.api.factory.shared.dto.ScmInfoDto; import org.eclipse.che.api.workspace.server.devfile.URLFetcher; import org.eclipse.che.api.workspace.shared.dto.ProjectConfigDto; import org.eclipse.che.api.workspace.shared.dto.devfile.ProjectDto; +import org.eclipse.che.security.oauth.AuthorisationRequestManager; /** Provides Factory Parameters resolver for bitbucket repositories. */ @Singleton -public class BitbucketFactoryParametersResolver implements FactoryParametersResolver { +public class BitbucketFactoryParametersResolver extends BaseFactoryParameterResolver + implements FactoryParametersResolver { + + private static final String PROVIDER_NAME = "bitbucket"; /** Parser which will allow to check validity of URLs and create objects. */ private final BitbucketURLParser bitbucketURLParser; @@ -64,7 +67,9 @@ public class BitbucketFactoryParametersResolver implements FactoryParametersReso URLFactoryBuilder urlFactoryBuilder, ProjectConfigDtoMerger projectConfigDtoMerger, PersonalAccessTokenManager personalAccessTokenManager, - BitbucketApiClient bitbucketApiClient) { + BitbucketApiClient bitbucketApiClient, + AuthorisationRequestManager authorisationRequestManager) { + super(authorisationRequestManager, urlFactoryBuilder, PROVIDER_NAME); this.bitbucketURLParser = bitbucketURLParser; this.urlFetcher = urlFetcher; this.bitbucketSourceStorageBuilder = bitbucketSourceStorageBuilder; @@ -88,6 +93,11 @@ public class BitbucketFactoryParametersResolver implements FactoryParametersReso && bitbucketURLParser.isValid(factoryParameters.get(URL_PARAMETER_NAME)); } + @Override + public String getProviderName() { + return PROVIDER_NAME; + } + /** * Create factory object based on provided parameters * @@ -100,19 +110,13 @@ public class BitbucketFactoryParametersResolver implements FactoryParametersReso // no need to check null value of url parameter as accept() method has performed the check final BitbucketUrl bitbucketUrl = bitbucketURLParser.parse(factoryParameters.get(URL_PARAMETER_NAME)); - boolean skipAuthentication = - factoryParameters.get(ERROR_QUERY_NAME) != null - && factoryParameters.get(ERROR_QUERY_NAME).equals("access_denied"); // create factory from the following location if location exists, else create default factory - return urlFactoryBuilder - .createFactoryFromDevfile( - bitbucketUrl, - new BitbucketAuthorizingFileContentProvider( - bitbucketUrl, urlFetcher, personalAccessTokenManager, bitbucketApiClient), - extractOverrideParams(factoryParameters), - skipAuthentication) - .orElseGet(() -> newDto(FactoryDto.class).withV(CURRENT_VERSION).withSource("repo")) - .acceptVisitor(new BitbucketFactoryVisitor(bitbucketUrl)); + return createFactory( + factoryParameters, + bitbucketUrl, + new BitbucketFactoryVisitor(bitbucketUrl), + new BitbucketAuthorizingFileContentProvider( + bitbucketUrl, urlFetcher, personalAccessTokenManager, bitbucketApiClient)); } /** diff --git a/wsmaster/che-core-api-factory-bitbucket/src/test/java/org/eclipse/che/api/factory/server/bitbucket/BitbucketFactoryParametersResolverTest.java b/wsmaster/che-core-api-factory-bitbucket/src/test/java/org/eclipse/che/api/factory/server/bitbucket/BitbucketFactoryParametersResolverTest.java index 16a977f21e..7d6e2ae754 100644 --- a/wsmaster/che-core-api-factory-bitbucket/src/test/java/org/eclipse/che/api/factory/server/bitbucket/BitbucketFactoryParametersResolverTest.java +++ b/wsmaster/che-core-api-factory-bitbucket/src/test/java/org/eclipse/che/api/factory/server/bitbucket/BitbucketFactoryParametersResolverTest.java @@ -49,6 +49,7 @@ import org.eclipse.che.api.workspace.shared.dto.devfile.DevfileDto; import org.eclipse.che.api.workspace.shared.dto.devfile.MetadataDto; import org.eclipse.che.api.workspace.shared.dto.devfile.ProjectDto; import org.eclipse.che.api.workspace.shared.dto.devfile.SourceDto; +import org.eclipse.che.security.oauth.AuthorisationRequestManager; import org.mockito.ArgumentCaptor; import org.mockito.Captor; import org.mockito.Mock; @@ -66,6 +67,8 @@ public class BitbucketFactoryParametersResolverTest { @Mock private DevfileFilenamesProvider devfileFilenamesProvider; + @Mock private AuthorisationRequestManager authorisationRequestManager; + /** Parser which will allow to check validity of URLs and create objects. */ private BitbucketURLParser bitbucketURLParser; @@ -104,7 +107,8 @@ public class BitbucketFactoryParametersResolverTest { urlFactoryBuilder, projectConfigDtoMerger, personalAccessTokenManager, - bitbucketApiClient); + bitbucketApiClient, + authorisationRequestManager); assertNotNull(this.bitbucketFactoryParametersResolver); } diff --git a/wsmaster/che-core-api-factory-git-ssh/pom.xml b/wsmaster/che-core-api-factory-git-ssh/pom.xml index e55b8ea177..674fadee55 100644 --- a/wsmaster/che-core-api-factory-git-ssh/pom.xml +++ b/wsmaster/che-core-api-factory-git-ssh/pom.xml @@ -34,6 +34,10 @@ jakarta.validation jakarta.validation-api + + org.eclipse.che.core + che-core-api-auth + org.eclipse.che.core che-core-api-core diff --git a/wsmaster/che-core-api-factory-git-ssh/src/main/java/org/eclipse/che/api/factory/server/git/ssh/GitSshFactoryParametersResolver.java b/wsmaster/che-core-api-factory-git-ssh/src/main/java/org/eclipse/che/api/factory/server/git/ssh/GitSshFactoryParametersResolver.java index 685976aef1..97698512d9 100644 --- a/wsmaster/che-core-api-factory-git-ssh/src/main/java/org/eclipse/che/api/factory/server/git/ssh/GitSshFactoryParametersResolver.java +++ b/wsmaster/che-core-api-factory-git-ssh/src/main/java/org/eclipse/che/api/factory/server/git/ssh/GitSshFactoryParametersResolver.java @@ -21,6 +21,7 @@ import java.util.Map; import javax.inject.Inject; import javax.inject.Singleton; import org.eclipse.che.api.core.ApiException; +import org.eclipse.che.api.factory.server.BaseFactoryParameterResolver; import org.eclipse.che.api.factory.server.FactoryParametersResolver; import org.eclipse.che.api.factory.server.FactoryResolverPriority; import org.eclipse.che.api.factory.server.scm.PersonalAccessTokenManager; @@ -34,6 +35,7 @@ import org.eclipse.che.api.factory.shared.dto.ScmInfoDto; import org.eclipse.che.api.workspace.server.devfile.URLFetcher; import org.eclipse.che.api.workspace.shared.dto.devfile.ProjectDto; import org.eclipse.che.api.workspace.shared.dto.devfile.SourceDto; +import org.eclipse.che.security.oauth.AuthorisationRequestManager; /** * Provides Factory Parameters resolver for Git Ssh repositories. @@ -41,7 +43,10 @@ import org.eclipse.che.api.workspace.shared.dto.devfile.SourceDto; * @author Anatolii Bazko */ @Singleton -public class GitSshFactoryParametersResolver implements FactoryParametersResolver { +public class GitSshFactoryParametersResolver extends BaseFactoryParameterResolver + implements FactoryParametersResolver { + + private static final String PROVIDER_NAME = "git-ssh"; private final GitSshURLParser gitSshURLParser; @@ -54,7 +59,9 @@ public class GitSshFactoryParametersResolver implements FactoryParametersResolve GitSshURLParser gitSshURLParser, URLFetcher urlFetcher, URLFactoryBuilder urlFactoryBuilder, - PersonalAccessTokenManager personalAccessTokenManager) { + PersonalAccessTokenManager personalAccessTokenManager, + AuthorisationRequestManager authorisationRequestManager) { + super(authorisationRequestManager, urlFactoryBuilder, PROVIDER_NAME); this.gitSshURLParser = gitSshURLParser; this.urlFetcher = urlFetcher; this.urlFactoryBuilder = urlFactoryBuilder; @@ -67,6 +74,11 @@ public class GitSshFactoryParametersResolver implements FactoryParametersResolve && gitSshURLParser.isValid(factoryParameters.get(URL_PARAMETER_NAME)); } + @Override + public String getProviderName() { + return PROVIDER_NAME; + } + @Override public FactoryMetaDto createFactory(@NotNull final Map factoryParameters) throws ApiException { diff --git a/wsmaster/che-core-api-factory-github/src/main/java/org/eclipse/che/api/factory/server/github/GithubFactoryParametersResolver.java b/wsmaster/che-core-api-factory-github/src/main/java/org/eclipse/che/api/factory/server/github/GithubFactoryParametersResolver.java index 4c96fd8244..f769f8fb32 100644 --- a/wsmaster/che-core-api-factory-github/src/main/java/org/eclipse/che/api/factory/server/github/GithubFactoryParametersResolver.java +++ b/wsmaster/che-core-api-factory-github/src/main/java/org/eclipse/che/api/factory/server/github/GithubFactoryParametersResolver.java @@ -11,10 +11,9 @@ */ package org.eclipse.che.api.factory.server.github; -import static org.eclipse.che.api.factory.shared.Constants.CURRENT_VERSION; +import static java.util.Collections.emptyMap; import static org.eclipse.che.api.factory.shared.Constants.URL_PARAMETER_NAME; import static org.eclipse.che.dto.server.DtoFactory.newDto; -import static org.eclipse.che.security.oauth1.OAuthAuthenticationService.ERROR_QUERY_NAME; import jakarta.validation.constraints.NotNull; import java.util.Map; @@ -22,6 +21,7 @@ import javax.inject.Inject; import javax.inject.Singleton; import org.eclipse.che.api.core.ApiException; import org.eclipse.che.api.core.BadRequestException; +import org.eclipse.che.api.factory.server.BaseFactoryParameterResolver; import org.eclipse.che.api.factory.server.FactoryParametersResolver; import org.eclipse.che.api.factory.server.scm.PersonalAccessTokenManager; import org.eclipse.che.api.factory.server.urlfactory.ProjectConfigDtoMerger; @@ -35,6 +35,7 @@ import org.eclipse.che.api.factory.shared.dto.ScmInfoDto; import org.eclipse.che.api.workspace.server.devfile.URLFetcher; import org.eclipse.che.api.workspace.shared.dto.ProjectConfigDto; import org.eclipse.che.api.workspace.shared.dto.devfile.ProjectDto; +import org.eclipse.che.security.oauth.AuthorisationRequestManager; /** * Provides Factory Parameters resolver for github repositories. @@ -42,7 +43,10 @@ import org.eclipse.che.api.workspace.shared.dto.devfile.ProjectDto; * @author Florent Benoit */ @Singleton -public class GithubFactoryParametersResolver implements FactoryParametersResolver { +public class GithubFactoryParametersResolver extends BaseFactoryParameterResolver + implements FactoryParametersResolver { + + private static final String PROVIDER_NAME = "github"; /** Parser which will allow to check validity of URLs and create objects. */ private final GithubURLParser githubUrlParser; @@ -64,9 +68,11 @@ public class GithubFactoryParametersResolver implements FactoryParametersResolve GithubURLParser githubUrlParser, URLFetcher urlFetcher, GithubSourceStorageBuilder githubSourceStorageBuilder, + AuthorisationRequestManager authorisationRequestManager, URLFactoryBuilder urlFactoryBuilder, ProjectConfigDtoMerger projectConfigDtoMerger, PersonalAccessTokenManager personalAccessTokenManager) { + super(authorisationRequestManager, urlFactoryBuilder, PROVIDER_NAME); this.githubUrlParser = githubUrlParser; this.urlFetcher = urlFetcher; this.githubSourceStorageBuilder = githubSourceStorageBuilder; @@ -89,6 +95,11 @@ public class GithubFactoryParametersResolver implements FactoryParametersResolve && githubUrlParser.isValid(factoryParameters.get(URL_PARAMETER_NAME)); } + @Override + public String getProviderName() { + return PROVIDER_NAME; + } + /** * Create factory object based on provided parameters * @@ -98,28 +109,21 @@ public class GithubFactoryParametersResolver implements FactoryParametersResolve @Override public FactoryMetaDto createFactory(@NotNull final Map factoryParameters) throws ApiException { - boolean skipAuthentication = - factoryParameters.get(ERROR_QUERY_NAME) != null - && factoryParameters.get(ERROR_QUERY_NAME).equals("access_denied"); // no need to check null value of url parameter as accept() method has performed the check final GithubUrl githubUrl; - if (skipAuthentication) { + if (getSkipAuthorisation(factoryParameters)) { githubUrl = githubUrlParser.parseWithoutAuthentication(factoryParameters.get(URL_PARAMETER_NAME)); } else { githubUrl = githubUrlParser.parse(factoryParameters.get(URL_PARAMETER_NAME)); } - // create factory from the following location if location exists, else create default factory - return urlFactoryBuilder - .createFactoryFromDevfile( - githubUrl, - new GithubAuthorizingFileContentProvider( - githubUrl, urlFetcher, personalAccessTokenManager), - extractOverrideParams(factoryParameters), - skipAuthentication) - .orElseGet(() -> newDto(FactoryDto.class).withV(CURRENT_VERSION).withSource("repo")) - .acceptVisitor(new GithubFactoryVisitor(githubUrl)); + return createFactory( + factoryParameters, + githubUrl, + new GithubFactoryVisitor(githubUrl), + new GithubAuthorizingFileContentProvider( + githubUrl, urlFetcher, personalAccessTokenManager)); } /** @@ -182,6 +186,10 @@ public class GithubFactoryParametersResolver implements FactoryParametersResolve @Override public RemoteFactoryUrl parseFactoryUrl(String factoryUrl) throws ApiException { - return githubUrlParser.parse(factoryUrl); + if (getSkipAuthorisation(emptyMap())) { + return githubUrlParser.parseWithoutAuthentication(factoryUrl); + } else { + return githubUrlParser.parse(factoryUrl); + } } } diff --git a/wsmaster/che-core-api-factory-github/src/main/java/org/eclipse/che/api/factory/server/github/GithubUserDataFetcher.java b/wsmaster/che-core-api-factory-github/src/main/java/org/eclipse/che/api/factory/server/github/GithubUserDataFetcher.java index e05c48b21c..3b319cc988 100644 --- a/wsmaster/che-core-api-factory-github/src/main/java/org/eclipse/che/api/factory/server/github/GithubUserDataFetcher.java +++ b/wsmaster/che-core-api-factory-github/src/main/java/org/eclipse/che/api/factory/server/github/GithubUserDataFetcher.java @@ -19,13 +19,13 @@ import javax.inject.Named; import org.eclipse.che.api.auth.shared.dto.OAuthToken; import org.eclipse.che.api.factory.server.scm.AbstractGitUserDataFetcher; import org.eclipse.che.api.factory.server.scm.GitUserData; -import org.eclipse.che.api.factory.server.scm.OAuthTokenFetcher; import org.eclipse.che.api.factory.server.scm.PersonalAccessToken; import org.eclipse.che.api.factory.server.scm.PersonalAccessTokenManager; import org.eclipse.che.api.factory.server.scm.exception.ScmBadRequestException; import org.eclipse.che.api.factory.server.scm.exception.ScmCommunicationException; import org.eclipse.che.api.factory.server.scm.exception.ScmItemNotFoundException; import org.eclipse.che.commons.annotation.Nullable; +import org.eclipse.che.security.oauth.OAuthAPI; /** GitHub user data retriever. */ public class GithubUserDataFetcher extends AbstractGitUserDataFetcher { @@ -44,7 +44,7 @@ public class GithubUserDataFetcher extends AbstractGitUserDataFetcher { public GithubUserDataFetcher( @Named("che.api") String apiEndpoint, @Nullable @Named("che.integration.github.oauth_endpoint") String oauthEndpoint, - OAuthTokenFetcher oAuthTokenFetcher, + OAuthAPI oAuthTokenFetcher, PersonalAccessTokenManager personalAccessTokenManager) { this( apiEndpoint, @@ -56,7 +56,7 @@ public class GithubUserDataFetcher extends AbstractGitUserDataFetcher { /** Constructor used for testing only. */ public GithubUserDataFetcher( String apiEndpoint, - OAuthTokenFetcher oAuthTokenFetcher, + OAuthAPI oAuthTokenFetcher, PersonalAccessTokenManager personalAccessTokenManager, GithubApiClient githubApiClient) { super(OAUTH_PROVIDER_NAME, personalAccessTokenManager, oAuthTokenFetcher); diff --git a/wsmaster/che-core-api-factory-github/src/test/java/org/eclipse/che/api/factory/server/github/GithubFactoryParametersResolverTest.java b/wsmaster/che-core-api-factory-github/src/test/java/org/eclipse/che/api/factory/server/github/GithubFactoryParametersResolverTest.java index 087bf19a3e..853ed13f61 100644 --- a/wsmaster/che-core-api-factory-github/src/test/java/org/eclipse/che/api/factory/server/github/GithubFactoryParametersResolverTest.java +++ b/wsmaster/che-core-api-factory-github/src/test/java/org/eclipse/che/api/factory/server/github/GithubFactoryParametersResolverTest.java @@ -51,6 +51,7 @@ import org.eclipse.che.api.workspace.shared.dto.devfile.DevfileDto; import org.eclipse.che.api.workspace.shared.dto.devfile.MetadataDto; import org.eclipse.che.api.workspace.shared.dto.devfile.ProjectDto; import org.eclipse.che.api.workspace.shared.dto.devfile.SourceDto; +import org.eclipse.che.security.oauth.AuthorisationRequestManager; import org.mockito.ArgumentCaptor; import org.mockito.Captor; import org.mockito.Mock; @@ -88,6 +89,7 @@ public class GithubFactoryParametersResolverTest { private URLFactoryBuilder urlFactoryBuilder; @Mock private PersonalAccessTokenManager personalAccessTokenManager; + @Mock private AuthorisationRequestManager authorisationRequestManager; /** * Capturing the location parameter when calling {@link @@ -113,6 +115,7 @@ public class GithubFactoryParametersResolverTest { githubUrlParser, urlFetcher, githubSourceStorageBuilder, + authorisationRequestManager, urlFactoryBuilder, projectConfigDtoMerger, personalAccessTokenManager); @@ -351,6 +354,50 @@ public class GithubFactoryParametersResolverTest { eq(true)); } + @Test + public void shouldParseFactoryUrlWithAuthentication() throws Exception { + // given + githubUrlParser = mock(GithubURLParser.class); + + githubFactoryParametersResolver = + new GithubFactoryParametersResolver( + githubUrlParser, + urlFetcher, + githubSourceStorageBuilder, + authorisationRequestManager, + urlFactoryBuilder, + projectConfigDtoMerger, + personalAccessTokenManager); + when(authorisationRequestManager.isStored(eq("github"))).thenReturn(true); + // when + githubFactoryParametersResolver.parseFactoryUrl("url"); + // then + verify(githubUrlParser).parseWithoutAuthentication("url"); + verify(githubUrlParser, never()).parse("url"); + } + + @Test + public void shouldParseFactoryUrlWithOutAuthentication() throws Exception { + // given + githubUrlParser = mock(GithubURLParser.class); + + githubFactoryParametersResolver = + new GithubFactoryParametersResolver( + githubUrlParser, + urlFetcher, + githubSourceStorageBuilder, + authorisationRequestManager, + urlFactoryBuilder, + projectConfigDtoMerger, + personalAccessTokenManager); + when(authorisationRequestManager.isStored(eq("github"))).thenReturn(false); + // when + githubFactoryParametersResolver.parseFactoryUrl("url"); + // then + verify(githubUrlParser).parse("url"); + verify(githubUrlParser, never()).parseWithoutAuthentication("url"); + } + private FactoryDto generateDevfileFactory() { return newDto(FactoryDto.class) .withV(CURRENT_VERSION) diff --git a/wsmaster/che-core-api-factory-github/src/test/java/org/eclipse/che/api/factory/server/github/GithubGitUserDataFetcherTest.java b/wsmaster/che-core-api-factory-github/src/test/java/org/eclipse/che/api/factory/server/github/GithubGitUserDataFetcherTest.java index 714dd961b2..412b1e9ecf 100644 --- a/wsmaster/che-core-api-factory-github/src/test/java/org/eclipse/che/api/factory/server/github/GithubGitUserDataFetcherTest.java +++ b/wsmaster/che-core-api-factory-github/src/test/java/org/eclipse/che/api/factory/server/github/GithubGitUserDataFetcherTest.java @@ -28,8 +28,8 @@ import com.github.tomakehurst.wiremock.common.Slf4jNotifier; import com.google.common.net.HttpHeaders; import org.eclipse.che.api.auth.shared.dto.OAuthToken; import org.eclipse.che.api.factory.server.scm.GitUserData; -import org.eclipse.che.api.factory.server.scm.OAuthTokenFetcher; import org.eclipse.che.api.factory.server.scm.PersonalAccessTokenManager; +import org.eclipse.che.security.oauth.OAuthAPI; import org.mockito.Mock; import org.mockito.testng.MockitoTestNGListener; import org.testng.annotations.AfterMethod; @@ -40,7 +40,7 @@ import org.testng.annotations.Test; @Listeners(MockitoTestNGListener.class) public class GithubGitUserDataFetcherTest { - @Mock OAuthTokenFetcher oAuthTokenFetcher; + @Mock OAuthAPI oAuthTokenFetcher; @Mock PersonalAccessTokenManager personalAccessTokenManager; GithubUserDataFetcher githubGUDFetcher; diff --git a/wsmaster/che-core-api-factory-gitlab/src/main/java/org/eclipse/che/api/factory/server/gitlab/GitlabFactoryParametersResolver.java b/wsmaster/che-core-api-factory-gitlab/src/main/java/org/eclipse/che/api/factory/server/gitlab/GitlabFactoryParametersResolver.java index efedf3f1ee..3a3efc3a66 100644 --- a/wsmaster/che-core-api-factory-gitlab/src/main/java/org/eclipse/che/api/factory/server/gitlab/GitlabFactoryParametersResolver.java +++ b/wsmaster/che-core-api-factory-gitlab/src/main/java/org/eclipse/che/api/factory/server/gitlab/GitlabFactoryParametersResolver.java @@ -11,10 +11,8 @@ */ package org.eclipse.che.api.factory.server.gitlab; -import static org.eclipse.che.api.factory.shared.Constants.CURRENT_VERSION; import static org.eclipse.che.api.factory.shared.Constants.URL_PARAMETER_NAME; import static org.eclipse.che.dto.server.DtoFactory.newDto; -import static org.eclipse.che.security.oauth1.OAuthAuthenticationService.ERROR_QUERY_NAME; import jakarta.validation.constraints.NotNull; import java.util.Map; @@ -22,6 +20,7 @@ import javax.inject.Inject; import javax.inject.Singleton; import org.eclipse.che.api.core.ApiException; import org.eclipse.che.api.core.BadRequestException; +import org.eclipse.che.api.factory.server.BaseFactoryParameterResolver; import org.eclipse.che.api.factory.server.FactoryParametersResolver; import org.eclipse.che.api.factory.server.scm.PersonalAccessTokenManager; import org.eclipse.che.api.factory.server.urlfactory.RemoteFactoryUrl; @@ -34,6 +33,7 @@ import org.eclipse.che.api.factory.shared.dto.ScmInfoDto; import org.eclipse.che.api.workspace.server.devfile.URLFetcher; import org.eclipse.che.api.workspace.shared.dto.devfile.ProjectDto; import org.eclipse.che.api.workspace.shared.dto.devfile.SourceDto; +import org.eclipse.che.security.oauth.AuthorisationRequestManager; /** * Provides Factory Parameters resolver for Gitlab repositories. @@ -41,7 +41,10 @@ import org.eclipse.che.api.workspace.shared.dto.devfile.SourceDto; * @author Max Shaposhnyk */ @Singleton -public class GitlabFactoryParametersResolver implements FactoryParametersResolver { +public class GitlabFactoryParametersResolver extends BaseFactoryParameterResolver + implements FactoryParametersResolver { + + private static final String PROVIDER_NAME = "gitlab"; private final URLFactoryBuilder urlFactoryBuilder; private final URLFetcher urlFetcher; @@ -53,7 +56,9 @@ public class GitlabFactoryParametersResolver implements FactoryParametersResolve URLFactoryBuilder urlFactoryBuilder, URLFetcher urlFetcher, GitlabUrlParser gitlabURLParser, - PersonalAccessTokenManager personalAccessTokenManager) { + PersonalAccessTokenManager personalAccessTokenManager, + AuthorisationRequestManager authorisationRequestManager) { + super(authorisationRequestManager, urlFactoryBuilder, PROVIDER_NAME); this.urlFactoryBuilder = urlFactoryBuilder; this.urlFetcher = urlFetcher; this.gitlabURLParser = gitlabURLParser; @@ -73,6 +78,11 @@ public class GitlabFactoryParametersResolver implements FactoryParametersResolve && gitlabURLParser.isValid(factoryParameters.get(URL_PARAMETER_NAME)); } + @Override + public String getProviderName() { + return PROVIDER_NAME; + } + /** * Create factory object based on provided parameters * @@ -84,19 +94,13 @@ public class GitlabFactoryParametersResolver implements FactoryParametersResolve throws ApiException { // no need to check null value of url parameter as accept() method has performed the check final GitlabUrl gitlabUrl = gitlabURLParser.parse(factoryParameters.get(URL_PARAMETER_NAME)); - boolean skipAuthentication = - factoryParameters.get(ERROR_QUERY_NAME) != null - && factoryParameters.get(ERROR_QUERY_NAME).equals("access_denied"); // create factory from the following location if location exists, else create default factory - return urlFactoryBuilder - .createFactoryFromDevfile( - gitlabUrl, - new GitlabAuthorizingFileContentProvider( - gitlabUrl, urlFetcher, personalAccessTokenManager), - extractOverrideParams(factoryParameters), - skipAuthentication) - .orElseGet(() -> newDto(FactoryDto.class).withV(CURRENT_VERSION).withSource("repo")) - .acceptVisitor(new GitlabFactoryVisitor(gitlabUrl)); + return createFactory( + factoryParameters, + gitlabUrl, + new GitlabFactoryVisitor(gitlabUrl), + new GitlabAuthorizingFileContentProvider( + gitlabUrl, urlFetcher, personalAccessTokenManager)); } /** diff --git a/wsmaster/che-core-api-factory-gitlab/src/main/java/org/eclipse/che/api/factory/server/gitlab/GitlabUserDataFetcher.java b/wsmaster/che-core-api-factory-gitlab/src/main/java/org/eclipse/che/api/factory/server/gitlab/GitlabUserDataFetcher.java index 2d22fafede..a9fb66cb1c 100644 --- a/wsmaster/che-core-api-factory-gitlab/src/main/java/org/eclipse/che/api/factory/server/gitlab/GitlabUserDataFetcher.java +++ b/wsmaster/che-core-api-factory-gitlab/src/main/java/org/eclipse/che/api/factory/server/gitlab/GitlabUserDataFetcher.java @@ -29,6 +29,7 @@ import org.eclipse.che.api.factory.server.scm.exception.ScmItemNotFoundException import org.eclipse.che.commons.annotation.Nullable; import org.eclipse.che.commons.lang.StringUtils; import org.eclipse.che.inject.ConfigurationException; +import org.eclipse.che.security.oauth.OAuthAPI; /** Gitlab OAuth token retriever. */ public class GitlabUserDataFetcher extends AbstractGitUserDataFetcher { @@ -48,7 +49,7 @@ public class GitlabUserDataFetcher extends AbstractGitUserDataFetcher { @Nullable @Named("che.integration.gitlab.oauth_endpoint") String oauthEndpoint, @Named("che.api") String apiEndpoint, PersonalAccessTokenManager personalAccessTokenManager, - OAuthTokenFetcher oAuthTokenFetcher) { + OAuthAPI oAuthTokenFetcher) { super(OAUTH_PROVIDER_NAME, personalAccessTokenManager, oAuthTokenFetcher); this.apiEndpoint = apiEndpoint; if (gitlabEndpoints != null) { diff --git a/wsmaster/che-core-api-factory-gitlab/src/test/java/org/eclipse/che/api/factory/server/gitlab/GitlabFactoryParametersResolverTest.java b/wsmaster/che-core-api-factory-gitlab/src/test/java/org/eclipse/che/api/factory/server/gitlab/GitlabFactoryParametersResolverTest.java index 6fa25c1497..15daf55ff9 100644 --- a/wsmaster/che-core-api-factory-gitlab/src/test/java/org/eclipse/che/api/factory/server/gitlab/GitlabFactoryParametersResolverTest.java +++ b/wsmaster/che-core-api-factory-gitlab/src/test/java/org/eclipse/che/api/factory/server/gitlab/GitlabFactoryParametersResolverTest.java @@ -45,6 +45,7 @@ import org.eclipse.che.api.workspace.server.devfile.URLFetcher; import org.eclipse.che.api.workspace.shared.dto.devfile.DevfileDto; import org.eclipse.che.api.workspace.shared.dto.devfile.MetadataDto; import org.eclipse.che.api.workspace.shared.dto.devfile.SourceDto; +import org.eclipse.che.security.oauth.AuthorisationRequestManager; import org.mockito.Mock; import org.mockito.testng.MockitoTestNGListener; import org.testng.annotations.BeforeMethod; @@ -68,6 +69,8 @@ public class GitlabFactoryParametersResolverTest { GitlabUrlParser gitlabUrlParser; @Mock private PersonalAccessTokenManager personalAccessTokenManager; + @Mock private AuthorisationRequestManager authorisationRequestManager; + private GitlabFactoryParametersResolver gitlabFactoryParametersResolver; @BeforeMethod @@ -80,7 +83,11 @@ public class GitlabFactoryParametersResolverTest { assertNotNull(this.gitlabUrlParser); gitlabFactoryParametersResolver = new GitlabFactoryParametersResolver( - urlFactoryBuilder, urlFetcher, gitlabUrlParser, personalAccessTokenManager); + urlFactoryBuilder, + urlFetcher, + gitlabUrlParser, + personalAccessTokenManager, + authorisationRequestManager); assertNotNull(this.gitlabFactoryParametersResolver); } diff --git a/wsmaster/che-core-api-factory-gitlab/src/test/java/org/eclipse/che/api/factory/server/gitlab/GitlabUserDataFetcherTest.java b/wsmaster/che-core-api-factory-gitlab/src/test/java/org/eclipse/che/api/factory/server/gitlab/GitlabUserDataFetcherTest.java index 953c24540e..220f3b4b8e 100644 --- a/wsmaster/che-core-api-factory-gitlab/src/test/java/org/eclipse/che/api/factory/server/gitlab/GitlabUserDataFetcherTest.java +++ b/wsmaster/che-core-api-factory-gitlab/src/test/java/org/eclipse/che/api/factory/server/gitlab/GitlabUserDataFetcherTest.java @@ -28,8 +28,8 @@ import com.github.tomakehurst.wiremock.common.Slf4jNotifier; import com.google.common.net.HttpHeaders; import org.eclipse.che.api.auth.shared.dto.OAuthToken; import org.eclipse.che.api.factory.server.scm.GitUserData; -import org.eclipse.che.api.factory.server.scm.OAuthTokenFetcher; import org.eclipse.che.api.factory.server.scm.PersonalAccessTokenManager; +import org.eclipse.che.security.oauth.OAuthAPI; import org.mockito.Mock; import org.mockito.testng.MockitoTestNGListener; import org.testng.annotations.AfterMethod; @@ -40,7 +40,7 @@ import org.testng.annotations.Test; @Listeners(MockitoTestNGListener.class) public class GitlabUserDataFetcherTest { - @Mock OAuthTokenFetcher oAuthTokenFetcher; + @Mock OAuthAPI oAuthTokenFetcher; @Mock PersonalAccessTokenManager personalAccessTokenManager; GitlabUserDataFetcher gitlabUserDataFetcher; diff --git a/wsmaster/che-core-api-factory/pom.xml b/wsmaster/che-core-api-factory/pom.xml index 4368fe77d0..062c2e0c2c 100644 --- a/wsmaster/che-core-api-factory/pom.xml +++ b/wsmaster/che-core-api-factory/pom.xml @@ -62,6 +62,10 @@ jakarta.ws.rs jakarta.ws.rs-api + + org.eclipse.che.core + che-core-api-auth + org.eclipse.che.core che-core-api-auth-shared diff --git a/wsmaster/che-core-api-factory/src/main/java/org/eclipse/che/api/factory/server/BaseFactoryParameterResolver.java b/wsmaster/che-core-api-factory/src/main/java/org/eclipse/che/api/factory/server/BaseFactoryParameterResolver.java new file mode 100644 index 0000000000..652191a557 --- /dev/null +++ b/wsmaster/che-core-api-factory/src/main/java/org/eclipse/che/api/factory/server/BaseFactoryParameterResolver.java @@ -0,0 +1,121 @@ +/* + * Copyright (c) 2012-2023 Red Hat, Inc. + * This program and the accompanying materials are made + * available under the terms of the Eclipse Public License 2.0 + * which is available at https://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 + * + * Contributors: + * Red Hat, Inc. - initial API and implementation + */ +package org.eclipse.che.api.factory.server; + +import static java.util.stream.Collectors.toMap; +import static org.eclipse.che.api.factory.shared.Constants.CURRENT_VERSION; +import static org.eclipse.che.dto.server.DtoFactory.newDto; + +import java.util.Collections; +import java.util.List; +import java.util.Map; +import java.util.function.Consumer; +import java.util.function.Supplier; +import org.eclipse.che.api.core.ApiException; +import org.eclipse.che.api.factory.server.urlfactory.RemoteFactoryUrl; +import org.eclipse.che.api.factory.server.urlfactory.URLFactoryBuilder; +import org.eclipse.che.api.factory.shared.dto.FactoryDto; +import org.eclipse.che.api.factory.shared.dto.FactoryMetaDto; +import org.eclipse.che.api.factory.shared.dto.FactoryVisitor; +import org.eclipse.che.api.workspace.server.devfile.FileContentProvider; +import org.eclipse.che.api.workspace.shared.dto.devfile.DevfileDto; +import org.eclipse.che.api.workspace.shared.dto.devfile.ProjectDto; +import org.eclipse.che.security.oauth.AuthorisationRequestManager; + +public class BaseFactoryParameterResolver { + + private final AuthorisationRequestManager authorisationRequestManager; + private final URLFactoryBuilder urlFactoryBuilder; + private final String providerName; + + public BaseFactoryParameterResolver( + AuthorisationRequestManager authorisationRequestManager, + URLFactoryBuilder urlFactoryBuilder, + String providerName) { + this.authorisationRequestManager = authorisationRequestManager; + this.urlFactoryBuilder = urlFactoryBuilder; + this.providerName = providerName; + } + + protected FactoryMetaDto createFactory( + Map factoryParameters, + RemoteFactoryUrl factoryUrl, + FactoryVisitor factoryVisitor, + FileContentProvider contentProvider) + throws ApiException { + + // create factory from the following location if location exists, else create default factory + return urlFactoryBuilder + .createFactoryFromDevfile( + factoryUrl, + contentProvider, + extractOverrideParams(factoryParameters), + getSkipAuthorisation(factoryParameters)) + .orElseGet(() -> newDto(FactoryDto.class).withV(CURRENT_VERSION).withSource("repo")) + .acceptVisitor(factoryVisitor); + } + + protected boolean getSkipAuthorisation(Map factoryParameters) { + String errorCode = "error_code"; + boolean stored = authorisationRequestManager.isStored(providerName); + boolean skipAuthentication = + factoryParameters.get(errorCode) != null + && factoryParameters.get(errorCode).equals("access_denied") + || stored; + if (skipAuthentication && !stored) { + authorisationRequestManager.store(providerName); + } + return skipAuthentication; + } + + /** + * Returns priority of the resolver. Resolvers with higher priority will be used among matched + * resolvers. + */ + public FactoryResolverPriority priority() { + return FactoryResolverPriority.DEFAULT; + } + + /** + * Finds and returns devfile override parameters in general factory parameters map. + * + * @param factoryParameters map containing factory data parameters provided through URL + * @return filtered devfile values override map + */ + protected Map extractOverrideParams(Map factoryParameters) { + String overridePrefix = "override."; + return factoryParameters.entrySet().stream() + .filter(e -> e.getKey().startsWith(overridePrefix)) + .collect(toMap(e -> e.getKey().substring(overridePrefix.length()), Map.Entry::getValue)); + } + + /** + * If devfile has no projects, put there one provided by given `projectSupplier`. Otherwise update + * all projects with given `projectModifier`. + * + * @param devfile of the projects to update + * @param projectSupplier provides default project + * @param projectModifier updates existing projects + */ + protected void updateProjects( + DevfileDto devfile, + Supplier projectSupplier, + Consumer projectModifier) { + List projects = devfile.getProjects(); + if (projects.isEmpty()) { + devfile.setProjects(Collections.singletonList(projectSupplier.get())); + } else { + // update existing project with same repository, set current branch if needed + projects.forEach(projectModifier); + } + } +} diff --git a/wsmaster/che-core-api-factory/src/main/java/org/eclipse/che/api/factory/server/FactoryParametersResolver.java b/wsmaster/che-core-api-factory/src/main/java/org/eclipse/che/api/factory/server/FactoryParametersResolver.java index d29e982e43..ea2732cc7a 100644 --- a/wsmaster/che-core-api-factory/src/main/java/org/eclipse/che/api/factory/server/FactoryParametersResolver.java +++ b/wsmaster/che-core-api-factory/src/main/java/org/eclipse/che/api/factory/server/FactoryParametersResolver.java @@ -11,20 +11,12 @@ */ package org.eclipse.che.api.factory.server; -import static java.util.stream.Collectors.toMap; - import jakarta.validation.constraints.NotNull; -import java.util.Collections; -import java.util.List; import java.util.Map; -import java.util.function.Consumer; -import java.util.function.Supplier; import org.eclipse.che.api.core.ApiException; import org.eclipse.che.api.core.BadRequestException; import org.eclipse.che.api.factory.server.urlfactory.RemoteFactoryUrl; import org.eclipse.che.api.factory.shared.dto.FactoryMetaDto; -import org.eclipse.che.api.workspace.shared.dto.devfile.DevfileDto; -import org.eclipse.che.api.workspace.shared.dto.devfile.ProjectDto; /** * Defines a resolver that will produce factories for some parameters @@ -41,6 +33,9 @@ public interface FactoryParametersResolver { */ boolean accept(@NotNull Map factoryParameters); + /** Returns the name of the provider */ + String getProviderName(); + /** * Create factory object based on provided parameters * @@ -62,41 +57,5 @@ public interface FactoryParametersResolver { * Returns priority of the resolver. Resolvers with higher priority will be used among matched * resolvers. */ - default FactoryResolverPriority priority() { - return FactoryResolverPriority.DEFAULT; - } - - /** - * Finds and returns devfile override parameters in general factory parameters map. - * - * @param factoryParameters map containing factory data parameters provided through URL - * @return filtered devfile values override map - */ - default Map extractOverrideParams(Map factoryParameters) { - String overridePrefix = "override."; - return factoryParameters.entrySet().stream() - .filter(e -> e.getKey().startsWith(overridePrefix)) - .collect(toMap(e -> e.getKey().substring(overridePrefix.length()), Map.Entry::getValue)); - } - - /** - * If devfile has no projects, put there one provided by given `projectSupplier`. Otherwise update - * all projects with given `projectModifier`. - * - * @param devfile of the projects to update - * @param projectSupplier provides default project - * @param projectModifier updates existing projects - */ - default void updateProjects( - DevfileDto devfile, - Supplier projectSupplier, - Consumer projectModifier) { - List projects = devfile.getProjects(); - if (projects.isEmpty()) { - devfile.setProjects(Collections.singletonList(projectSupplier.get())); - } else { - // update existing project with same repository, set current branch if needed - projects.forEach(projectModifier); - } - } + FactoryResolverPriority priority(); } diff --git a/wsmaster/che-core-api-factory/src/main/java/org/eclipse/che/api/factory/server/FactoryService.java b/wsmaster/che-core-api-factory/src/main/java/org/eclipse/che/api/factory/server/FactoryService.java index 6a5b030d3a..1008711cf9 100644 --- a/wsmaster/che-core-api-factory/src/main/java/org/eclipse/che/api/factory/server/FactoryService.java +++ b/wsmaster/che-core-api-factory/src/main/java/org/eclipse/che/api/factory/server/FactoryService.java @@ -42,6 +42,7 @@ import org.eclipse.che.api.factory.server.scm.exception.ScmUnauthorizedException import org.eclipse.che.api.factory.server.scm.exception.UnknownScmProviderException; import org.eclipse.che.api.factory.server.scm.exception.UnsatisfiedScmPreconditionException; import org.eclipse.che.api.factory.shared.dto.FactoryMetaDto; +import org.eclipse.che.security.oauth.AuthorisationRequestManager; /** * Defines Factory REST API. @@ -64,17 +65,20 @@ public class FactoryService extends Service { private final FactoryParametersResolverHolder factoryParametersResolverHolder; private final AdditionalFilenamesProvider additionalFilenamesProvider; private final PersonalAccessTokenManager personalAccessTokenManager; + private final AuthorisationRequestManager authorisationRequestManager; @Inject public FactoryService( FactoryAcceptValidator acceptValidator, FactoryParametersResolverHolder factoryParametersResolverHolder, AdditionalFilenamesProvider additionalFilenamesProvider, - PersonalAccessTokenManager personalAccessTokenManager) { + PersonalAccessTokenManager personalAccessTokenManager, + AuthorisationRequestManager authorisationRequestManager) { this.acceptValidator = acceptValidator; this.factoryParametersResolverHolder = factoryParametersResolverHolder; this.additionalFilenamesProvider = additionalFilenamesProvider; this.personalAccessTokenManager = personalAccessTokenManager; + this.authorisationRequestManager = authorisationRequestManager; } @POST @@ -147,8 +151,10 @@ public class FactoryService extends Service { FactoryParametersResolver factoryParametersResolver = factoryParametersResolverHolder.getFactoryParametersResolver( singletonMap(URL_PARAMETER_NAME, url)); - personalAccessTokenManager.getAndStore( - factoryParametersResolver.parseFactoryUrl(url).getHostName()); + if (!authorisationRequestManager.isStored(factoryParametersResolver.getProviderName())) { + personalAccessTokenManager.getAndStore( + factoryParametersResolver.parseFactoryUrl(url).getHostName()); + } } catch (ScmCommunicationException | ScmConfigurationPersistenceException | UnknownScmProviderException diff --git a/wsmaster/che-core-api-factory/src/main/java/org/eclipse/che/api/factory/server/RawDevfileUrlFactoryParameterResolver.java b/wsmaster/che-core-api-factory/src/main/java/org/eclipse/che/api/factory/server/RawDevfileUrlFactoryParameterResolver.java index 50e5147cbe..89ccea9aec 100644 --- a/wsmaster/che-core-api-factory/src/main/java/org/eclipse/che/api/factory/server/RawDevfileUrlFactoryParameterResolver.java +++ b/wsmaster/che-core-api-factory/src/main/java/org/eclipse/che/api/factory/server/RawDevfileUrlFactoryParameterResolver.java @@ -36,7 +36,10 @@ import org.eclipse.che.api.workspace.server.devfile.URLFileContentProvider; * {@link FactoryParametersResolver} implementation to resolve factory based on url parameter as a * direct URL to a devfile content. Extracts and applies devfile values override parameters. */ -public class RawDevfileUrlFactoryParameterResolver implements FactoryParametersResolver { +public class RawDevfileUrlFactoryParameterResolver extends BaseFactoryParameterResolver + implements FactoryParametersResolver { + + private static final String PROVIDER_NAME = "raw-devfile-url"; protected final URLFactoryBuilder urlFactoryBuilder; protected final URLFetcher urlFetcher; @@ -44,6 +47,7 @@ public class RawDevfileUrlFactoryParameterResolver implements FactoryParametersR @Inject public RawDevfileUrlFactoryParameterResolver( URLFactoryBuilder urlFactoryBuilder, URLFetcher urlFetcher) { + super(null, urlFactoryBuilder, PROVIDER_NAME); this.urlFactoryBuilder = urlFactoryBuilder; this.urlFetcher = urlFetcher; } @@ -61,6 +65,11 @@ public class RawDevfileUrlFactoryParameterResolver implements FactoryParametersR return !isNullOrEmpty(url) && (url.endsWith(".yaml") || url.endsWith(".yml")); } + @Override + public String getProviderName() { + return PROVIDER_NAME; + } + /** * Creates factory based on provided parameters. Presumes url parameter as direct URL to a devfile * content. diff --git a/wsmaster/che-core-api-factory/src/main/java/org/eclipse/che/api/factory/server/scm/AbstractGitUserDataFetcher.java b/wsmaster/che-core-api-factory/src/main/java/org/eclipse/che/api/factory/server/scm/AbstractGitUserDataFetcher.java index a5a25ed403..d42eab5606 100644 --- a/wsmaster/che-core-api-factory/src/main/java/org/eclipse/che/api/factory/server/scm/AbstractGitUserDataFetcher.java +++ b/wsmaster/che-core-api-factory/src/main/java/org/eclipse/che/api/factory/server/scm/AbstractGitUserDataFetcher.java @@ -17,6 +17,7 @@ import org.eclipse.che.api.core.*; import org.eclipse.che.api.factory.server.scm.exception.*; import org.eclipse.che.commons.env.EnvironmentContext; import org.eclipse.che.commons.subject.Subject; +import org.eclipse.che.security.oauth.OAuthAPI; /** * Abstraction to fetch git user data from the specific git provider using OAuth 2.0 or personal @@ -27,12 +28,12 @@ import org.eclipse.che.commons.subject.Subject; public abstract class AbstractGitUserDataFetcher implements GitUserDataFetcher { protected final String oAuthProviderName; protected final PersonalAccessTokenManager personalAccessTokenManager; - protected final OAuthTokenFetcher oAuthTokenFetcher; + protected final OAuthAPI oAuthTokenFetcher; public AbstractGitUserDataFetcher( String oAuthProviderName, PersonalAccessTokenManager personalAccessTokenManager, - OAuthTokenFetcher oAuthTokenFetcher) { + OAuthAPI oAuthTokenFetcher) { this.oAuthProviderName = oAuthProviderName; this.personalAccessTokenManager = personalAccessTokenManager; this.oAuthTokenFetcher = oAuthTokenFetcher; diff --git a/wsmaster/che-core-api-factory/src/main/java/org/eclipse/che/api/factory/server/scm/OAuthTokenFetcher.java b/wsmaster/che-core-api-factory/src/main/java/org/eclipse/che/api/factory/server/scm/OAuthTokenFetcher.java deleted file mode 100644 index 833fd92626..0000000000 --- a/wsmaster/che-core-api-factory/src/main/java/org/eclipse/che/api/factory/server/scm/OAuthTokenFetcher.java +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Copyright (c) 2012-2023 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.api.factory.server.scm; - -import org.eclipse.che.api.auth.shared.dto.OAuthToken; -import org.eclipse.che.api.core.*; - -/** - * OAuth 2.0 token fetcher is designed to use a dependency in che-core-api-factory module. It is - * needed to avoid circular dependency between che-core-api-factory and che-core-api-auth modules. - * - * @author Anatolii Bazko - */ -public interface OAuthTokenFetcher { - - /** - * Fetches OAuth token for the given OAuth provider name. - * - * @param oAuthProviderName OAuth provider name (e.g. github, bitbucket) - * @return OAuth token - */ - OAuthToken getToken(String oAuthProviderName) - throws NotFoundException, UnauthorizedException, ServerException, ForbiddenException, - BadRequestException, ConflictException; -} diff --git a/wsmaster/che-core-api-factory/src/test/java/org/eclipse/che/api/factory/server/BaseFactoryParameterResolverTest.java b/wsmaster/che-core-api-factory/src/test/java/org/eclipse/che/api/factory/server/BaseFactoryParameterResolverTest.java new file mode 100644 index 0000000000..4993faeb9f --- /dev/null +++ b/wsmaster/che-core-api-factory/src/test/java/org/eclipse/che/api/factory/server/BaseFactoryParameterResolverTest.java @@ -0,0 +1,76 @@ +/* + * Copyright (c) 2012-2023 Red Hat, Inc. + * This program and the accompanying materials are made + * available under the terms of the Eclipse Public License 2.0 + * which is available at https://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 + * + * Contributors: + * Red Hat, Inc. - initial API and implementation + */ +package org.eclipse.che.api.factory.server; + +import static java.util.Collections.emptyMap; +import static org.mockito.ArgumentMatchers.eq; +import static org.mockito.Mockito.when; +import static org.testng.Assert.assertFalse; +import static org.testng.Assert.assertTrue; + +import java.util.Map; +import org.eclipse.che.api.factory.server.urlfactory.URLFactoryBuilder; +import org.eclipse.che.security.oauth.AuthorisationRequestManager; +import org.mockito.Mock; +import org.mockito.testng.MockitoTestNGListener; +import org.testng.annotations.BeforeMethod; +import org.testng.annotations.Listeners; +import org.testng.annotations.Test; + +@Listeners(value = {MockitoTestNGListener.class}) +public class BaseFactoryParameterResolverTest { + + @Mock private AuthorisationRequestManager authorisationRequestManager; + @Mock private URLFactoryBuilder urlFactoryBuilder; + + private static final String PROVIDER_NAME = "test"; + + private BaseFactoryParameterResolver baseFactoryParameterResolver; + + @BeforeMethod + protected void init() throws Exception { + baseFactoryParameterResolver = + new BaseFactoryParameterResolver( + authorisationRequestManager, urlFactoryBuilder, PROVIDER_NAME); + } + + @Test + public void shouldReturnFalseOnGetSkipAuthorisation() { + // given + when(authorisationRequestManager.isStored(eq(PROVIDER_NAME))).thenReturn(false); + // when + boolean result = baseFactoryParameterResolver.getSkipAuthorisation(emptyMap()); + // then + assertFalse(result); + } + + @Test + public void shouldReturnTrueOnGetSkipAuthorisation() { + // given + when(authorisationRequestManager.isStored(eq(PROVIDER_NAME))).thenReturn(true); + // when + boolean result = baseFactoryParameterResolver.getSkipAuthorisation(emptyMap()); + // then + assertTrue(result); + } + + @Test + public void shouldReturnTrueOnGetSkipAuthorisationFromFactoryParams() { + // given + when(authorisationRequestManager.isStored(eq(PROVIDER_NAME))).thenReturn(false); + // when + boolean result = + baseFactoryParameterResolver.getSkipAuthorisation(Map.of("error_code", "access_denied")); + // then + assertTrue(result); + } +} diff --git a/wsmaster/che-core-api-factory/src/test/java/org/eclipse/che/api/factory/server/FactoryServiceTest.java b/wsmaster/che-core-api-factory/src/test/java/org/eclipse/che/api/factory/server/FactoryServiceTest.java index 44046b990f..56d5571881 100644 --- a/wsmaster/che-core-api-factory/src/test/java/org/eclipse/che/api/factory/server/FactoryServiceTest.java +++ b/wsmaster/che-core-api-factory/src/test/java/org/eclipse/che/api/factory/server/FactoryServiceTest.java @@ -32,6 +32,7 @@ import static org.mockito.Mockito.doReturn; import static org.mockito.Mockito.doThrow; import static org.mockito.Mockito.lenient; import static org.mockito.Mockito.mock; +import static org.mockito.Mockito.never; import static org.mockito.Mockito.spy; import static org.mockito.Mockito.verify; import static org.mockito.Mockito.when; @@ -62,6 +63,7 @@ import org.eclipse.che.api.user.server.model.impl.UserImpl; import org.eclipse.che.commons.env.EnvironmentContext; import org.eclipse.che.commons.subject.SubjectImpl; import org.eclipse.che.dto.server.DtoFactory; +import org.eclipse.che.security.oauth.AuthorisationRequestManager; import org.everrest.assured.EverrestJetty; import org.everrest.core.Filter; import org.everrest.core.GenericContainerRequest; @@ -99,6 +101,7 @@ public class FactoryServiceTest { @Mock private AdditionalFilenamesProvider additionalFilenamesProvider; @Mock private RawDevfileUrlFactoryParameterResolver rawDevfileUrlFactoryParameterResolver; @Mock private PersonalAccessTokenManager personalAccessTokenManager; + @Mock private AuthorisationRequestManager authorisationRequestManager; @InjectMocks private FactoryParametersResolverHolder factoryParametersResolverHolder; private Set specificFactoryParametersResolvers; @@ -136,7 +139,8 @@ public class FactoryServiceTest { acceptValidator, factoryParametersResolverHolder, additionalFilenamesProvider, - personalAccessTokenManager); + personalAccessTokenManager, + authorisationRequestManager); } @Filter @@ -157,7 +161,11 @@ public class FactoryServiceTest { // service instance with dummy holder service = new FactoryService( - acceptValidator, dummyHolder, additionalFilenamesProvider, personalAccessTokenManager); + acceptValidator, + dummyHolder, + additionalFilenamesProvider, + personalAccessTokenManager, + authorisationRequestManager); // when final Map map = new HashMap<>(); @@ -184,7 +192,11 @@ public class FactoryServiceTest { // service instance with dummy holder service = new FactoryService( - acceptValidator, dummyHolder, additionalFilenamesProvider, personalAccessTokenManager); + acceptValidator, + dummyHolder, + additionalFilenamesProvider, + personalAccessTokenManager, + authorisationRequestManager); // invalid factory final String invalidFactoryMessage = "invalid factory"; @@ -232,7 +244,11 @@ public class FactoryServiceTest { doReturn(factoryParametersResolver).when(dummyHolder).getFactoryParametersResolver(anyMap()); service = new FactoryService( - acceptValidator, dummyHolder, additionalFilenamesProvider, personalAccessTokenManager); + acceptValidator, + dummyHolder, + additionalFilenamesProvider, + personalAccessTokenManager, + authorisationRequestManager); // when given() @@ -245,6 +261,32 @@ public class FactoryServiceTest { verify(personalAccessTokenManager).getAndStore(eq("hostName")); } + @Test + public void shouldNotRefreshTokenIfAuthorisationRejected() throws Exception { + // given + final FactoryParametersResolverHolder dummyHolder = spy(factoryParametersResolverHolder); + FactoryParametersResolver factoryParametersResolver = mock(FactoryParametersResolver.class); + doReturn(factoryParametersResolver).when(dummyHolder).getFactoryParametersResolver(anyMap()); + when(authorisationRequestManager.isStored(any())).thenReturn(true); + service = + new FactoryService( + acceptValidator, + dummyHolder, + additionalFilenamesProvider, + personalAccessTokenManager, + authorisationRequestManager); + + // when + given() + .contentType(ContentType.JSON) + .when() + .queryParam("url", "someUrl") + .post(SERVICE_PATH + "/token/refresh"); + + // then + verify(personalAccessTokenManager, never()).getAndStore(eq("hostName")); + } + @Test public void shouldThrowBadRequestWhenRefreshTokenWithoutUrl() throws Exception { service = @@ -252,7 +294,8 @@ public class FactoryServiceTest { acceptValidator, factoryParametersResolverHolder, additionalFilenamesProvider, - personalAccessTokenManager); + personalAccessTokenManager, + authorisationRequestManager); // when final Response response = From 2adb6f6bee4b709157b6b9ec97c7bb256232c4e7 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 12 Oct 2023 16:00:18 +0300 Subject: [PATCH 75/75] chore(deps): bump maven-install-plugin from 3.0.0-M1 to 3.1.1 (#488) * chore(deps): bump maven-install-plugin from 3.0.0-M1 to 3.1.1 Bumps [maven-install-plugin](https://github.com/apache/maven-install-plugin) from 3.0.0-M1 to 3.1.1. - [Release notes](https://github.com/apache/maven-install-plugin/releases) - [Commits](https://github.com/apache/maven-install-plugin/compare/maven-install-plugin-3.0.0-M1...maven-install-plugin-3.1.1) --- updated-dependencies: - dependency-name: org.apache.maven.plugins:maven-install-plugin dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] * Update pom.xml * Update pom.xml * Update pom.xml --------- Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Igor Vinokur --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 1528dff033..d7e503a2cb 100644 --- a/pom.xml +++ b/pom.xml @@ -116,7 +116,7 @@ 0.37.0 3.0.0-M5 2.13 - 3.0.0-M1 + 3.1.1 0.8.7 3.2.0 4.1