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://<user name>:<token>@<host name>.
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.
Override the getCredentials() method in the BitbucketUrl class to intercept bitbucket URL with username e.g. https://user@bitbucket.org/eclipse/che. Return empty credentials for such urls.
When Che creates a workspace from a repository URL, first we iterate and find a related git provider handler, then we gat a devfile location according to the handler rules. If we pass an unsupported git repository url we will have a default handler which will try find a devfile by the same url as the repository. In that case we will have an html content as a devfile.
We need to check the content before parsing the devfile, and throw a specific error in case if the content is not yaml.
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.
Support factory from public Bitbucket-server repository without any oAuth configuration in the Che side. Add a new check that detects a Bitbucket-server url by testing it by a Bitbucket-server Api request.
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.
Support factory from public Gitlab-server repository without any oAuth configuration in the Che side. Add a new check that detects a Gitlab server url by testing it by a Gitlab Api request.
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>
Rework the invalidate token oauth API method to send revoke token request to the git provider. After this request Che authorisation is unsynchronised so user is asked to re apply the authentication on new factory create step.
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.
* update integration tests to new root pom version
Change-Id: Ic155888a0960ffcd2b26f7bf87373d260f655a2c
Signed-off-by: Nick Boldt <nboldt@redhat.com>
* fix poms that point to obsolete version 7.58.0-SNAPSHOT
Change-Id: I5854752288fec4ea774b27365770558b0d8946db
Signed-off-by: Nick Boldt <nboldt@redhat.com>
Signed-off-by: Nick Boldt <nboldt@redhat.com>
bitbucket.org doesn't allow to fetch raw file content from private repositories using oAuth token any more. Override the common fetch content flow specifically for bitbucket.