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

fix(oauth): enable signout redirect #366

Merged
merged 1 commit into from
Apr 12, 2024

Conversation

andrewazores
Copy link
Member

@andrewazores andrewazores commented Apr 12, 2024

Welcome to Cryostat3! 👋

Before contributing, make sure you have:

  • Read the contributing guidelines
  • Linked a relevant issue which this PR resolves
  • Linked any other relevant issues, PR's, or documentation, if any
  • Resolved all conflicts, if any
  • Rebased your branch PR on top of the latest upstream main branch
  • Attached at least one of the following labels to the PR: [chore, ci, docs, feat, fix, test]
  • Signed all commits using a GPG signature

To recreate commits with GPG signature git fetch upstream && git rebase --force --gpg-sign upstream/main


Related to #365
Depends on cryostatio/cryostat-web#1236

Description of the change:

When clicking the "logout" button in the application masthead, the web-client sends a request to the Cryostat server at /api/v2.1/logout. The current implementation just treats this as a no-op and returns HTTP 204. This new implementation responds with a redirect instructing the client to go to /oauth2/sign_out, which triggers the logout flow of the auth proxy.

Motivation for the change:

Re-enables the ability for the user to log out.

How to manually test:

  1. Check out this PR
  2. ./mvnw clean package ; podman image prune -f ; ./smoketest.bash -O
  3. Open UI, log in with user:pass, go to UI. Then click user icon and "logout" on the masthead. You should be returned back to the authproxy login screen. If you refresh here you should still be on the login screen (not re-entered into the Cryostat UI).

Copy link

This PR/issue depends on:

@andrewazores
Copy link
Member Author

/build_test

Copy link

Workflow started at 4/12/2024, 3:44:06 PM. View Actions Run.

Copy link

No OpenAPI schema changes detected.

Copy link

CI build and push: All tests pass ✅ (JDK17)
https://github.com/cryostatio/cryostat3/actions/runs/8667173259

@andrewazores andrewazores merged commit d090ed0 into cryostatio:main Apr 12, 2024
8 checks passed
@andrewazores andrewazores deleted the oauth-signout branch April 12, 2024 19:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants