c0c0n3 / kitt4sme.live

On a mission to bring AI to the shop floor: https://kitt4sme.eu/
MIT License
1 stars 28 forks source link

HTTPs redirection woes #208

Closed c0c0n3 closed 1 year ago

c0c0n3 commented 1 year ago

Describe the bug

After merging #207, you can't access ArgoCD anymore. It looks like HTTP-to-HTTPs redirection kicks in even though #207 explicitly set the redirection flag to false. For some reason this breaks ArgoCD OIDC flow. Even after changing all the http urls to https in the Keycloak ArgoCD OIDC client Settings page, I still can get to the ArgoCD login page.

Other services may be broken too. We should retest every service. I've had a quick look at Keycloak, I get automatically redirected from HTTP to HTTPs but then I can log in. (Ideally no redirection from HTTP should take place.)

To Reproduce

Steps to reproduce the behavior:

  1. Browse to http://kitt4sme.collab-cloud.eu/argocd
  2. You should see an error: Failed to query provider "http://kitt4sme.collab-cloud.eu/auth/realms/master": 403 Forbidden: {"error":"invalid_request","error_description":"HTTPS required"}
  3. Notice the URL in the browser's address bar is now HTTPs, not HTTP.

Expected behavior

Both HTTP and HTTPs access to services should work.

Additional context

Dashboards seem to work fine. E.g. if I browse to

I get redirected to

The page loads, but like I said ideally there should be no HTTPs redirection as that might break open call apps.

The same happens with Orion. E.g. if I browse to

I get redirected to

and I get to see the version JSON object.

karikolehmainen commented 1 year ago

I checked with my browser (Chrome on OS X or Safari) and for me it didn't redirect... Either the problem has fixed itself or there is some browser setting doing the redirect... Can you double-check if you can still reproduce the error?

c0c0n3 commented 1 year ago

@karikolehmainen you're quite right, it's my chrome pulling the trick under the bonnet

it does an automatic redirect to https if https is available on a site!