argoproj / argo-workflows

Workflow Engine for Kubernetes
https://argo-workflows.readthedocs.io/
Apache License 2.0
15.13k stars 3.21k forks source link

Incorrect redirect after Login when terminating TLS with reverse proxy #13031

Open ryancurrah opened 6 months ago

ryancurrah commented 6 months ago

Pre-requisites

What happened/what did you expect to happen?

Description:

When clicking an Argo Workflows link, if I'm not logged in, I'm redirected to the login page. After logging in, I'm redirected to the workflows page instead of the original page I was trying to access.

Steps to reproduce:

  1. Click an Argo Workflows link to a specific page
  2. If not logged in, click the "Login" button
  3. After logging in, observe that you are redirected to the workflows page (not the page you intended to visit)

Debugging information:

Expected behavior:

After logging in, the user should be redirected to the original project they were trying to access, not the last viewed project.

Version: Argo Workflows v3.5.5

Version

v3.5.5

Paste a small workflow that reproduces the issue. We must be able to run the workflow; don't enter a workflows that uses private images.

n/a

Logs from the workflow controller

kubectl logs -n argo deploy/workflow-controller | grep ${workflow}

Logs from in your workflow's wait container

kubectl logs -n argo -c wait -l workflows.argoproj.io/workflow=${workflow},workflow.argoproj.io/phase!=Succeeded
agilgur5 commented 6 months ago

Follow-up to this Slack thread

We could potentially use the request's protocol to determine this.

But secure: false has other implications, like the Cookie setting and potentially others that we should be careful around and ensure properly handle ingress TLS termination.

EDIT: Here's another redirect line that depends on it that should be changed too.

ejsuncy commented 5 months ago

Thanks for opening this ticket from my slack help request! subscribing for updates...

agilgur5 commented 5 months ago

Workaround is to use a self-signed cert on the Server with secure: true, per the Slack thread

bmooso commented 4 months ago

+1