Commit Graph

1433 Commits (97f3c3cb4aaa47aa331bb6168bba3fbdc84ffaeb)

Author SHA1 Message Date
Mykhailo Kuznietsov 97f3c3cb4a chore: Release version 7.86.0
Signed-off-by: Mykhailo Kuznietsov <mkuznets@redhat.com>
2024-05-17 10:28:42 +00:00
Mykhailo Kuznietsov 219d8bc1f2 chore: Bump to 7.86.1-SNAPSHOT in 7.86.x
Signed-off-by: Mykhailo Kuznietsov <mkuznets@redhat.com>
2024-05-17 10:22:17 +00:00
Igor Vinokur 88cbaebd1a
Support raw devfile urls without yaml extension (#683)
On handling raw devfile urls, request content by the url, and check if the content is a devfile. If yes treat the url as a raw devfile url.

---------

Signed-off-by: ivinokur <ivinokur@redhat.com>
Co-authored-by: Anatolii Bazko <abazko@redhat.com>
2024-05-15 10:13:37 +03:00
che-bot b5f110c659
chore: Bump to 7.86.0-SNAPSHOT in main (#680)
Signed-off-by: Mykhailo Kuznietsov <mkuznets@redhat.com>
Co-authored-by: Mykhailo Kuznietsov <mkuznets@redhat.com>
2024-04-26 08:16:38 +03:00
che-bot 7c07c3c135
chore: Bump to 7.85.0-SNAPSHOT in main (#675)
Signed-off-by: Mykhailo Kuznietsov <mkuznets@redhat.com>
Co-authored-by: Mykhailo Kuznietsov <mkuznets@redhat.com>
2024-04-09 15:52:32 +03:00
Igor Vinokur 2cfce0568a
Rework the Bitbucket Server oauth token validation (#673)
- Change the validation API request to get current user request. The /rest/api/1.0/application-properties request is irrelevant as it does not require a token.
- Pass oath token to the getPersonalAccessToken() API request in order to avoid circular getToken() request.
2024-04-08 09:30:02 +03:00
ivinokur c51919d1e3 fixup! Fix gitlab oauth token validation request 2024-04-04 11:10:45 +02:00
ivinokur 1fc4e07988 Fix gitlab oauth token validation request 2024-04-04 11:10:45 +02:00
Igor Vinokur 2e27c47f2f
Add provider name annotation to PAT secret (#670)
Add che.eclipse.org/scm-provider-name annotation to Personal Access Token secret.
2024-03-25 14:57:27 +02:00
che-bot 661d852250
chore: Bump to 7.84.0-SNAPSHOT in main (#669)
Signed-off-by: Mykhailo Kuznietsov <mkuznets@redhat.com>
Co-authored-by: Mykhailo Kuznietsov <mkuznets@redhat.com>
2024-03-19 08:51:13 +02:00
Igor Vinokur ba6f30f963
Add Gitlab invalidate token implementation (#667) 2024-03-16 12:56:55 +02:00
Igor Vinokur dbe167276a
Encode redirect URL if needed on oauth1 callback request (#663)
The latest BItBucket Server decodes the callback url so that causes IllegalArgumentException error. Catch the error and decode the redirect url.
2024-03-16 06:26:52 +02:00
Anatolii Bazko 28002fb835
fix: Support BitBucket endpoint with path (#665)
Signed-off-by: Anatolii Bazko <abazko@redhat.com>
2024-03-12 10:22:04 +01:00
Igor Vinokur 6cdf6f655a
Do not pass oauth2 as a username to Git credentials for Bitbucket (#662)
Set bitbucket-***** as a token name annotation for bitbucket token secret. This is needed to pass username instead of oauth2 for bitbucket credentials
2024-03-07 11:08:33 +02:00
che-bot 60262e3a72
chore: Bump to 7.83.0-SNAPSHOT in main (#658) 2024-02-28 09:18:10 +02:00
Igor Vinokur 3fef2347f0
Remove the DB related modules (#630) 2024-02-27 15:27:58 +02:00
Igor Vinokur f9f4c8e5d5
Encode redirect URL if needed on oauth callback request (#654)
Some SCM providers like BItBucket Server decode the callback url so that cause IllegalArgumentException error. Catch the error and decode the redirect url.
2024-02-19 19:07:07 +02:00
Igor Vinokur 4f8a84cb1d
Fetch oauth tokens from kubernetes secrets (#652)
Move AuthorisationRequestManager interface towsmaster/che-core-api-factory module in order to avoid circular dependency.
Rework the get oauth token method to return an oauth token from kubernetes secrets if token is not found in the system memory of the che-server pod. If provider name value is not configured in the kubernetes secret oauth token, get the token by mapping it by provider url from the secret and oauth provider name from the aouth config secret.
2024-02-08 10:22:51 +02:00
ivinokur 6f40c9856f Add isNullOrEmpty check to the BitbucketServerURLParser 2024-02-06 14:18:05 +01:00
che-bot 62f301c42d
chore: Bump to 7.82.0-SNAPSHOT in main (#651)
Signed-off-by: Mykhailo Kuznietsov <mkuznets@redhat.com>
Co-authored-by: Mykhailo Kuznietsov <mkuznets@redhat.com>
2024-02-02 19:53:07 +02:00
Igor Vinokur 12a3a8a8e7
Remove devfile validation schema mechanism (#640)
Remove devfile validation schema mechanism and related stuff.
2024-01-17 09:21:44 +02:00
Mykhailo Kuznietsov 978f2cdd21 chore: Bump to 7.81.0-SNAPSHOT in main
Signed-off-by: Mykhailo Kuznietsov <mkuznets@redhat.com>
2024-01-11 15:35:09 +01:00
Igor Vinokur f547c681a8
Fix license headers (#638)
Fix maven build by updating corresponding license headers
2024-01-10 11:36:56 +02:00
Igor Vinokur 06e14c854d
Pass status code to Exception on Unauthorised to GitHub Error (#618)
Pass status code to Exception on Unauthorised to GitHub Error in order to be able to recognise GitHub Server url if oAuth is not configured and no PAT is present.
2024-01-10 10:46:02 +02:00
Igor Vinokur d077bdd93d
Add new devfile versions support (#637)
Add missing devfile versions to the list of supported devfile versions
Add corresponding jsons.
2024-01-09 18:16:34 +02:00
che-bot e3ccf70b64
chore: Bump to 7.80.0-SNAPSHOT in main (#628)
Signed-off-by: Mykhailo Kuznietsov <mkuznets@redhat.com>
Co-authored-by: Mykhailo Kuznietsov <mkuznets@redhat.com>
2023-12-28 02:23:26 +02:00
Igor Vinokur 151ef89772
Return oauth1 providers on registered oauth providers list request (#624)
Add the list of oauth1 providers to the list of registered oauth2 providers on get registered oauth providers API request.
2023-12-21 14:03:42 +02:00
Anatolii Bazko f7a49f9fec
fix: work with Bitbucket users containing special characters in theirs names (#622)
Signed-off-by: Anatolii Bazko <abazko@redhat.com>
2023-12-07 17:35:43 +01:00
Igor Vinokur ebca10356e
Throw the API exception with authorization URL on SCMunauthorised error (#621)
Fixes a bug with broken oauth flow caused by https://github.com/eclipse-che/che-server/pull/615
2023-12-04 20:57:25 +02:00
Mykhailo Kuznietsov 7acf4cc2d9 chore: Bump to 7.79.0-SNAPSHOT in main
Signed-off-by: Mykhailo Kuznietsov <mkuznets@redhat.com>
2023-11-30 12:24:39 +01:00
Igor Vinokur 5baa3a7ccf
Align the unreachable devfile exception message (#615)
Add a common exception message and use it for cases when:

The devfile location is unavailable.
The devfile content is is not valid: e.g the response content is an html content of an scm authorisation page.
2023-11-28 18:09:57 +02:00
Igor Vinokur f34e80450b
Expand the raw devfile url resolver pattern with token query parameter (#616)
Rework the accept() check in the raw devfile url resolver to respect token query parameters e.g. https://raw.githubusercontent.com/vinokurig/private/main/devfile.yaml?token=<token>
2023-11-28 18:08:57 +02:00
Igor Vinokur 974c1b1890
Add support for PATs in GitHub Enterprise server (#603)
Add necessary checks to the GithubURLParser and AbstractGithubURLParser classes in order to support PAT for GitHub Enterprise server without configuring oAuth.
2023-11-21 11:11:06 +02:00
che-bot 92b37d2b6e
chore: Bump to 7.78.0-SNAPSHOT in main (#605)
Signed-off-by: Mykhailo Kuznietsov <mkuznets@redhat.com>
Co-authored-by: Mykhailo Kuznietsov <mkuznets@redhat.com>
2023-11-13 13:38:23 +02:00
Anatolii Bazko 72f191bcda
feat: Allow to configure 2 github providers simultaneously (#598)
* feat: Support enabling Github enterprise and SaaS simultaneously on Dev Spaces

Signed-off-by: Anatolii Bazko <abazko@redhat.com>
2023-11-07 12:57:48 +01:00
Mykhailo Kuznietsov 26cf509ea7 chore: Bump to 7.77.0-SNAPSHOT in main
Signed-off-by: Mykhailo Kuznietsov <mkuznets@redhat.com>
2023-11-06 09:39:16 +01:00
Igor Vinokur cb0c9f9d39
Fix update token on workspace start (#597)
Change the getHostName() function to getProviderUrl() in order to fix an error while updating an oauth token on workspace start.
Throw ScmUnauthorizedException if an oAuth token is not valid, for the dashboard to open the authorisation page and update the token.
2023-11-04 19:12:12 +02:00
Igor Vinokur 148415c691
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.
2023-10-12 15:59:42 +03:00
Igor Vinokur f27f8b1589
Update minor maven dependencies (#577) 2023-10-12 14:38:05 +03:00
Mykhailo Kuznietsov 2f2a939823 chore: Bump to 7.76.0-SNAPSHOT in main
Signed-off-by: Mykhailo Kuznietsov <mkuznets@redhat.com>
2023-09-28 10:13:22 +02:00
Igor Vinokur b2ff110da5
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.
2023-09-27 14:20:27 +03:00
Igor Vinokur b1da9ef121
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 <oshmarai@redhat.com>
2023-09-22 17:09:48 +03:00
Igor Vinokur 261be8f99d
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
2023-09-21 10:48:32 +03:00
che-bot 033d310b0d
chore: Bump to 7.75.0-SNAPSHOT in main (#554)
Signed-off-by: Mykhailo Kuznietsov <mkuznets@redhat.com>
Co-authored-by: Mykhailo Kuznietsov <mkuznets@redhat.com>
2023-09-11 19:17:12 -03:00
Igor Vinokur 9d43803100
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.
2023-09-06 14:15:11 +03:00
Igor Vinokur ea67092cbc
Fix failing unit tests (#553)
Signed-off-by: Igor <ivinokur@redhat.com>
2023-09-06 12:48:04 +03:00
Igor Vinokur 6edfa3910f
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.
2023-09-05 12:51:27 +03:00
Igor Vinokur da5174bf17
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
2023-09-05 12:49:09 +03:00
Igor Vinokur 7d0cfb306c
Support SSH urls (#539)
Extend each SCM provider implementation to support SSH urls.
2023-08-27 16:17:13 +03:00
Mykhailo Kuznietsov 8d19ea8046 chore: Bump to 7.74.0-SNAPSHOT in main
Signed-off-by: Mykhailo Kuznietsov <mkuznets@redhat.com>
2023-08-23 15:09:29 +02:00