-
Notifications
You must be signed in to change notification settings - Fork 71
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Omit scm-username annotation from the PAT secret #533
Conversation
Signed-off-by: Igor Vinokur <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm confused by the three versions of isValid
in this PR -- one returns a bool, one returns a string, and one returns pair<bool, string>
...factory/src/main/java/org/eclipse/che/api/factory/server/scm/PersonalAccessTokenFetcher.java
Show resolved
Hide resolved
...tory/src/main/java/org/eclipse/che/api/factory/server/scm/ScmPersonalAccessTokenFetcher.java
Outdated
Show resolved
Hide resolved
...tory/src/main/java/org/eclipse/che/api/factory/server/scm/ScmPersonalAccessTokenFetcher.java
Outdated
Show resolved
Hide resolved
/retest-required |
1 similar comment
/retest-required |
Tested for Azure DevOps |
/retest-required |
/retest |
@vinokurig
|
Rolled back the PAT scopes validation for GitHub and GitLab, created a separate issue for that: eclipse-che/che#22381 |
/retest-required |
// belongs to Bitbucket. | ||
bitbucketServerApiClient.getPersonalAccessToken("", 0L); | ||
bitbucketServerApiClient.getUser(null); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why do we pass null as an argument?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If null
is passed the client fetches OAuth token:
Lines 30 to 38 in 1657ebb
/** | |
* @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 | |
*/ | |
BitbucketUser getUser(@Nullable String token) | |
throws ScmItemNotFoundException, ScmUnauthorizedException, ScmCommunicationException; |
/retest-required |
@vinokurig
I tried to install Che manually, but got the error with start
|
Build 3.8 :: update-digests_3.8/132: Console, Changes, Git Data |
Build 3.8 :: operator-bundle_3.8/56: Console, Changes, Git Data |
Build 3.8 :: sync-to-downstream_3.8/67: Console, Changes, Git Data |
Build 3.8 :: push-latest-container-to-quay_3.8/62: Console, Changes, Git Data |
Build 3.8 :: sync-to-downstream_3.8/67: Build container: devspaces-operator-bundle synced; /DS_CI/get-sources-rhpkg-container-build_3.8/65 triggered; /job/DS_CI/job/dsc_3.8 triggered; |
Build 3.8 :: operator-bundle_3.8/56: Upstream sync done; /DS_CI/sync-to-downstream_3.8/67 triggered |
Build 3.8 :: copyIIBsToQuay/1552: Console, Changes, Git Data |
Build 3.8 :: dsc_3.8/15: Console, Changes, Git Data |
Build 3.8 :: update-digests_3.8/132: Detected new images: rebuild operator-bundle |
Build 3.8 :: dsc_3.8/15: 3.8.0 CI |
Build 3.9 :: server_3.x/190: Console, Changes, Git Data |
Build 3.9 :: sync-to-downstream_3.x/3821: Console, Changes, Git Data |
Build 3.9 :: push-latest-container-to-quay_3.x/2766: Console, Changes, Git Data |
Build 3.9 :: get-sources-rhpkg-container-build_3.x/3668: server : 3.x :: Build 54279780 : quay.io/devspaces/server-rhel8:3.9-4 |
Build 3.9 :: server_3.x/190: Upstream sync done; /DS_CI/sync-to-downstream_3.x/3821 triggered |
Build 3.9 :: update-digests_3.x/3785: Console, Changes, Git Data |
Build 3.9 :: operator-bundle_3.x/1630: Console, Changes, Git Data |
Build 3.9 :: sync-to-downstream_3.x/3827: Console, Changes, Git Data |
Build 3.9 :: push-latest-container-to-quay_3.x/2774: Console, Changes, Git Data |
Build 3.9 :: copyIIBsToQuay/1563: Console, Changes, Git Data |
Build 3.9 :: sync-to-downstream_3.x/3827: Build container: devspaces-operator-bundle synced; /DS_CI/get-sources-rhpkg-container-build_3.x/3678 triggered; /job/DS_CI/job/dsc_3.x triggered; |
Build 3.9 :: operator-bundle_3.x/1630: Upstream sync done; /DS_CI/sync-to-downstream_3.x/3827 triggered |
Build 3.9 :: dsc_3.x/1055: Console, Changes, Git Data |
Build 3.9 :: update-digests_3.x/3785: Detected new images: rebuild operator-bundle |
What does this PR do?
Ignore the
che.eclipse.org/scm-username
annotation when fetching token from a PAT secret. Instead fetch the username from theisValid(<token>)
request.Screenshot/screencast of this PR
What issues does this PR fix or reference?
eclipse-che/che#22344
How to test this PR?
quay.io/ivinokur/che-server:che-22344
username
input.che.eclipse.org/scm-username
annotation or use a random string valuePR Checklist
As the author of this Pull Request I made sure that:
What issues does this PR fix or reference
andHow to test this PR
completedReviewers
Reviewers, please comment how you tested the PR when approving it.