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

Treat azure devops redirect response as unauthorized error #755

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

vinokurig
Copy link
Contributor

@vinokurig vinokurig commented Jan 22, 2025

What does this PR do?

Handle the 302 redirect response in the azure devops api client and throw unauthorized exception, so the dashboard can handle it properly. Also add 401 unauthorized and 403 forbidden to the unauthorized case.

Screenshot/screencast of this PR

What issues does this PR fix or reference?

https://issues.redhat.com/browse/CRW-7941

How to test this PR?

  1. Deploy che with the pull request image: quay.io/eclipse/che-server:pr-755.
  2. Setup Azure Devops oauth.
  3. Start a workspace from an Azure repository with a devfile, consent the authentication request.
  4. See: Azure devops token is added to the user preferences tokens page.
  5. Go to openshift console -> user namespace and edith the personal access token secret token, so it would become invalid.
  6. Go to the dashboard user preferences page and see: the Azure Devops token is removed.

PR Checklist

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

Release Notes

Reviewers

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

@vinokurig
Copy link
Contributor Author

/retest

1 similar comment
@vinokurig
Copy link
Contributor Author

/retest

Copy link

openshift-ci bot commented Jan 23, 2025

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: tolusha, 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

@openshift-ci openshift-ci bot removed the lgtm label Jan 23, 2025
Copy link

openshift-ci bot commented Jan 23, 2025

New changes are detected. LGTM label has been removed.

@vinokurig
Copy link
Contributor Author

/retest

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants