Skip to content
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

Remove redundan PATs on refresh mode #703

Merged
merged 1 commit into from
Jul 23, 2024
Merged

Remove redundan PATs on refresh mode #703

merged 1 commit into from
Jul 23, 2024

Conversation

vinokurig
Copy link
Contributor

@vinokurig vinokurig commented Jul 18, 2024

What does this PR do?

Iterate over personal access token secrets on refresh function. Remove outdated token secrets except the latest refreshed token secret.

Screenshot/screencast of this PR

What issues does this PR fix or reference?

fixes eclipse-che/che#23027

How to test this PR?

  • Deploy che with the pr image: quay.io/eclipse/che-server:pr-
  • Configure gitlab oauth
  • Apply refresh mode
  • Start a workspace from gitlab repository with a devfile.
  • Go to Dashboard user preferences -> personal access tokens
  • See: only one personal access token item is present in the list

PR Checklist

As the author of this Pull Request I made sure that:

Reviewers

Reviewers, please comment how you tested the PR when approving it.

@artaleks9
Copy link
Contributor

/retest

@artaleks9
Copy link
Contributor

artaleks9 commented Jul 19, 2024

The tests on ci-openshift are fail with an error like this:

INFO[2024-07-19T08:48:41Z] Running step bitbucket-no-pat-oauth-flow-ipi-conf. 
INFO[2024-07-19T08:48:41Z] Step phase pre failed after 0s. 

There is some an infrastructure problem.

@vinokurig
Copy link
Contributor Author

/retest

@artaleks9
Copy link
Contributor

artaleks9 commented Jul 19, 2024

The gitlab-with-oauth-setup-flow test is fail by another infrastructure problem:

level=info msg=Creating infrastructure resources...
level=error
level=error msg=Error: creating EC2 VPC Endpoint (com.amazonaws.us-west-1.s3): VpcEndpointLimitExceeded: The maximum number of VPC endpoints has been reached.
level=error msg=	status code: 400, request id: 4994f22a-87bd-43d9-b0f8-189b45686ca5

Need to rerun it.
The rest of ci-openshift tests are success.

@artaleks9
Copy link
Contributor

/retest

@artaleks9
Copy link
Contributor

Verified on Eclipse Che with quay.io/eclipse/che-server:pr-703 - the functionality works properly.
Waiting for restart gitlab-with-oauth-setup-flow test till approving.

Copy link

openshift-ci bot commented Jul 22, 2024

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: artaleks9, ibuziuk, vinokurig

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@vinokurig vinokurig merged commit 0227c54 into main Jul 23, 2024
28 checks passed
@vinokurig vinokurig deleted the che-23027 branch July 23, 2024 08:44
@devstudio-release
Copy link

Build 3.16 :: server_3.x/347: Console, Changes, Git Data

@devstudio-release
Copy link

@devstudio-release
Copy link

@devstudio-release
Copy link

@devstudio-release
Copy link

@devstudio-release
Copy link

@devstudio-release
Copy link

Build 3.16 :: server_3.x/347: SUCCESS

Upstream sync done; /DS_CI/sync-to-downstream_3.x/7294 triggered

@devstudio-release
Copy link

@devstudio-release
Copy link

@devstudio-release
Copy link

@devstudio-release
Copy link

@devstudio-release
Copy link

Build 3.16 :: copyIIBsToQuay/2708: Console, Changes, Git Data

@devstudio-release
Copy link

Build 3.16 :: sync-to-downstream_3.x/7295: SUCCESS

Build container: devspaces-operator-bundle synced; /DS_CI/get-sources-rhpkg-container-build_3.x/7274 triggered; /job/DS_CI/job/dsc_3.x triggered;

@devstudio-release
Copy link

Build 3.16 :: operator-bundle_3.x/3350: SUCCESS

Upstream sync done; /DS_CI/sync-to-downstream_3.x/7295 triggered

@devstudio-release
Copy link

Build 3.16 :: update-digests_3.x/7117: SUCCESS

Detected new images: rebuild operator-bundle
* server; /DS_CI/operator-bundle_3.x/3350 triggered

@devstudio-release
Copy link

Build 3.16 :: dsc_3.x/1947: Console, Changes, Git Data

@devstudio-release
Copy link

Build 3.16 :: dsc_3.x/1947: SUCCESS

3.16.0-CI

@vinokurig vinokurig mentioned this pull request Sep 9, 2024
9 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Invalidate previous tokens if refresh token mode is enabled
4 participants