Igor
0617d4b4cd
commit
2023-09-08 14:12:12 +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
Igor Vinokur
0ea20e687b
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.
2023-08-01 21:36:14 +03:00
Mykhailo Kuznietsov
29ff3f3e75
chore: Bump to 7.73.0-SNAPSHOT in main
...
Signed-off-by: Mykhailo Kuznietsov <mkuznets@redhat.com>
2023-07-31 10:50:12 +02:00
Igor Vinokur
df3fc9965a
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(<token>) request.
2023-07-25 18:52:54 +03:00
Mykhailo Kuznietsov
2cd1bb2b46
chore: Bump to 7.72.0-SNAPSHOT in main
...
Signed-off-by: Mykhailo Kuznietsov <mkuznets@redhat.com>
2023-07-24 12:10:57 +02:00
Igor Vinokur
c5963e0de7
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
2023-07-12 10:33:56 +03:00
Mykhailo Kuznietsov
454bc7304f
chore: Bump to 7.71.0-SNAPSHOT in main
...
Signed-off-by: Mykhailo Kuznietsov <mkuznets@redhat.com>
2023-06-30 09:45:41 +02:00
Igor Vinokur
287b903010
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.
2023-06-26 17:18:32 +03:00
Igor Vinokur
ab83bee400
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.
2023-06-15 13:41:43 +03:00
Mykhailo Kuznietsov
c23792c7b1
chore: Bump to 7.70.0-SNAPSHOT in main
...
Signed-off-by: Mykhailo Kuznietsov <mkuznets@redhat.com>
2023-06-15 10:18:24 +02:00
Igor Vinokur
32c67ed032
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.
2023-06-06 10:38:03 +03:00
Mykhailo Kuznietsov
fdb2dbf163
chore: Bump to 7.69.0-SNAPSHOT in main
...
Signed-off-by: Mykhailo Kuznietsov <mkuznets@redhat.com>
2023-06-02 16:13:59 +02:00
Mykhailo Kuznietsov
559de5a7f1
chore: Bump to 7.68.0-SNAPSHOT in main
...
Signed-off-by: Mykhailo Kuznietsov <mkuznets@redhat.com>
2023-05-18 10:44:15 +02:00
Mykhailo Kuznietsov
1fb16e5b63
chore: Bump to 7.67.0-SNAPSHOT in main
...
Signed-off-by: Mykhailo Kuznietsov <mkuznets@redhat.com>
2023-05-10 10:27:11 +02:00
Mykhailo Kuznietsov
b333b7bdb9
chore: Bump to 7.66.0-SNAPSHOT in main
...
Signed-off-by: Mykhailo Kuznietsov <mkuznets@redhat.com>
2023-04-21 13:06:43 +02:00
Mykhailo Kuznietsov
d0402f0b8e
chore: Bump to 7.65.0-SNAPSHOT in main
...
Signed-off-by: Mykhailo Kuznietsov <mkuznets@redhat.com>
2023-04-19 11:11:56 +02:00
Igor Vinokur
8d0d9ac5d8
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.
2023-04-19 09:37:29 +03:00
Anatolii Bazko
b24e3c7d95
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 <abazko@redhat.com>
2023-04-04 10:14:40 +03:00
Mykhailo Kuznietsov
63c72d2628
chore: Bump to 7.64.0-SNAPSHOT in main
...
Signed-off-by: Mykhailo Kuznietsov <mkuznets@redhat.com>
2023-03-27 15:40:05 +02:00
che-bot
709d872d24
chore: Bump to 7.63.0-SNAPSHOT in main ( #459 )
...
Signed-off-by: Mykhailo Kuznietsov <mkuznets@redhat.com>
Co-authored-by: Mykhailo Kuznietsov <mkuznets@redhat.com>
2023-03-08 18:05:13 -04:00
Anatolii Bazko
19d13edc7f
feat: Azure DevOps Service OAuth2
...
Signed-off-by: Anatolii Bazko <abazko@redhat.com>
2023-02-23 15:20:20 +02:00
Igor Vinokur
b9ededf339
Support Basic authentication for devfile factory URL ( #451 )
...
Add a parsing rule to detect credentials in factory URLs if it is in a format https://<username>:<pasword>@hostname.
Extract the credentials from factory URLs and pass them to the devfile content request.
2023-02-23 15:05:55 +02:00
Nick Boldt
fbf318c0d6
chore: Bump to 7.62.0-SNAPSHOT in main ( #447 )
...
Signed-off-by: Mykhailo Kuznietsov <mkuznets@redhat.com>
Co-authored-by: Mykhailo Kuznietsov <mkuznets@redhat.com>
2023-02-16 13:28:52 -04:00
Mykhailo Kuznietsov
9a003e2351
chore: Bump to 7.61.0-SNAPSHOT in main
...
Signed-off-by: Mykhailo Kuznietsov <mkuznets@redhat.com>
2023-01-26 11:30:33 +01:00
Igor Vinokur
63517be522
Add "read:user" to the list of github token scopes ( #422 )
...
In order to be able to use the generated github token from the workspace pod in the github CLI tool, add the necessary token scope to the list of default scopes.
2023-01-21 13:01:27 +02:00
Mykhailo Kuznietsov
13a84d2943
chore: Bump to 7.60.0-SNAPSHOT in main
...
Signed-off-by: Mykhailo Kuznietsov <mkuznets@redhat.com>
2023-01-09 14:10:06 +01:00
Nick Boldt
a97e6eec90
chore: update license headers to 2023 because we still use that annoying license header checker for some reason ( #412 )
...
To update next year:
find . -name "*" -exec sed -i -r -e "s@-2023 Red Hat@-2024 Red Hat@g" {} \;
Change-Id: I2167da69ac584e743e61f4bbe699f06296911857
Signed-off-by: Nick Boldt <nboldt@redhat.com>
Signed-off-by: Nick Boldt <nboldt@redhat.com>
2023-01-04 10:33:06 -04:00
Igor Vinokur
ab966cf9fe
Retry factory authentication when user rejects git service oauth ( #405 )
...
Currently when user rejects the oauth page for GitHub factory, Che tries to continue the factory flow without authentication (possible only for public repo). Apply the logic for the other git authentication providers.
2022-12-21 10:43:36 +02:00
Mykhailo Kuznietsov
23e5b5f891
chore: Bump to 7.59.0-SNAPSHOT in main
...
Signed-off-by: Mykhailo Kuznietsov <mkuznets@redhat.com>
2022-12-15 15:50:16 +01:00
Mykhailo Kuznietsov
5e90d07987
chore: Bump to 7.58.0-SNAPSHOT in main
...
Signed-off-by: Mykhailo Kuznietsov <mkuznets@redhat.com>
2022-11-24 15:30:55 +01:00
Vitaliy Gulyy
cf508f009c
fix: Use SHA of the latest commit instead of the branch name when fetching raw file content ( #376 )
...
Signed-off-by: Vitaliy Gulyy <vgulyy@redhat.com>
2022-11-14 09:20:44 +02:00
Igor Vinokur
d11aeaf26b
chore: Add more Git unit tests ( #375 )
2022-11-08 09:38:27 +02:00
Mykhailo Kuznietsov
fb0bdd249f
chore: Bump to 7.57.0-SNAPSHOT in main
...
Signed-off-by: Mykhailo Kuznietsov <mkuznets@redhat.com>
2022-11-04 15:32:21 +01:00
Mykhailo Kuznietsov
bc4ec10c23
chore: Bump to 7.56.0-SNAPSHOT in main
...
Signed-off-by: Mykhailo Kuznietsov <mkuznets@redhat.com>
2022-10-12 16:11:49 +02:00
che-bot
6350fa9ab4
chore: Bump to 7.55.0-SNAPSHOT in main ( #358 )
...
Signed-off-by: Mykhailo Kuznietsov <mkuznets@redhat.com>
Signed-off-by: Mykhailo Kuznietsov <mkuznets@redhat.com>
Co-authored-by: Mykhailo Kuznietsov <mkuznets@redhat.com>
2022-09-29 17:06:33 +03:00
Igor Vinokur
40598a0e8b
fix: Allign the GitHub raw file location Url with subdomain isolation option ( #361 )
...
Inject the che.integration.github.disable_subdomain_isolation env variable property to handle the subdomain isolation GitHub option while returning the GitHub raw file location.
2022-09-28 09:59:19 +03:00
Igor Vinokur
a8623992b6
chore: Allign the /token/refresh/ factory API method ( #359 )
...
Fix the /token/refresh/ factory API method by picking out the hostname from the url parameter and passing it to personalAccessTokenManager.getAndStore(hostname) instead of the entire factory url
2022-09-26 09:05:04 +03:00
Igor Vinokur
64fd318bb5
chore: Refactore the factory flow to pick out the authentication logic to a separate API method ( #356 )
...
Refactor the factory flow and isolate the place where the OAuth token is fetched and stored to the git secret.
Create a new API method with the isolated flow.
The API method is going to be used for the token verification step when a factory is restarted from dashboard.
2022-09-20 15:04:24 +03:00
Igor Vinokur
c2a2d09194
chore: Support configuring the GitHub OAuth endpoint ( #350 )
...
Currently the GitHub OAuth provider is hardcoded to https://github.com endpoint. In order to support Github Enterprise Server, the endpoint of the GitHub OAuth provider is configurable by the oauth secret.
2022-09-08 14:51:12 +03:00
Mykhailo Kuznietsov
9f72001242
chore: Bump to 7.54.0-SNAPSHOT in main
...
Signed-off-by: Mykhailo Kuznietsov <mkuznets@redhat.com>
2022-08-31 15:11:43 +02:00
Igor Vinokur
97b7431bda
chore: Add GitHub get pull request API method ( #341 )
...
Add GitHub getPullRequest API method
Use the API method insted of reading html content of a pull-request page when creating a factory from GitHub url.
2022-08-15 15:17:38 +03:00
Igor Vinokur
bd9cd9db44
chore: Apply authentication status in the callback url ( #338 )
...
When processing an authentication callback request set additional error query patameter to the callback url.
How it works:
1. User creates a factory form dashboard.
2. Dasboard requests che-server factory API with no error param in the request url. See https://github.com/eclipse-che/che-dashboard/pull/599
3. Che-server create factory API parses the url for the error param. No error query param means `skipAuthentication=false`. Authentication in progress.
74eb0a333d/wsmaster/che-core-api-factory-github/src/main/java/org/eclipse/che/api/factory/server/github/GithubFactoryParametersResolver.java (L104-L106)
4. GitHub shows the authentication page. If User rejects the authentication, authentication status is set to `access_denied`.
5. The error status is added to the redirect url as a query param.
74eb0a333d/wsmaster/che-core-api-auth/src/main/java/org/eclipse/che/security/oauth/EmbeddedOAuthAPI.java (L85-L93)
6. Dasboard is loaded from the redirect url. Dashboard requests the che-server to create factory by an api request with the error status query param from the redirect url.
e2849d9d21/packages/dashboard-frontend/src/containers/Loader/Factory/Steps/FetchDevfile/index.tsx (L208-L213)
7. Che-server create factory API parses the url for the status param. If `skipAuthentication=true` the authentication flow is skiped and factory creation progress goes further. If `skipAuthentication=false` factory is created in a regular way.
74eb0a333d/wsmaster/che-core-api-factory/src/main/java/org/eclipse/che/api/factory/server/scm/AuthorizingFileContentProvider.java (L70-L81)
2022-08-11 17:14:30 +03:00
Mykhailo Kuznietsov
c57d3b04a9
chore: Bump to 7.53.0-SNAPSHOT in main
...
Signed-off-by: Mykhailo Kuznietsov <mkuznets@redhat.com>
2022-08-11 15:58:39 +02:00
che-bot
922b48eaad
chore: Bump to 7.52.0-SNAPSHOT in main ( #331 )
...
Signed-off-by: Mykhailo Kuznietsov <mkuznets@redhat.com>
Co-authored-by: Mykhailo Kuznietsov <mkuznets@redhat.com>
2022-07-27 15:06:12 +03:00
Igor Vinokur
d6778f636a
chore: Add new scopes to the generate GitHub token request ( #335 )
...
In order to meet the token requierments of the vscode-github-pull-request extension, add new token scopes when requesting a GitHub token.
2022-07-27 13:11:42 +03:00
Igor Vinokur
e59d23b3b2
chore: Apply Bitbucket SAAS Oauth flow ( #329 )
...
Since we support only Bitbucket Server Oauth flow, added a support for the SAAS version
2022-07-27 12:24:55 +03:00
Mykhailo Kuznietsov
ec9a2e09b5
chore: Bump to 7.51.0-SNAPSHOT in main
...
Signed-off-by: Mykhailo Kuznietsov <mkuznets@redhat.com>
2022-07-25 17:02:16 +02:00