coolify icon indicating copy to clipboard operation
coolify copied to clipboard

[Bug]: Basic auth with traefik labels stopped working (`404 page not found`)

Open RayBB opened this issue 9 months ago • 11 comments

Description

Today I tried to go to an application running on coolify and got the message 404 page not found I tried a few more and noticed all the ones behind basic auth are doing that and the rest are fine. If I remove the label from one of them the app is accessible. If I put it back on it 404s right away.

Example label:

    labels:
      - 'traefik.http.middlewares.custom-auth.basicauth.users=test:$$2y$$12$$ci.4U63YX83CwkyUrjqxAucnmi2xXOIlEF6T/KdP9824f1Rf1iyNG'

Is anyone else experiencing this? I haven't touched anything in coolify between using the app yesterday and everything working fine and today getting the 404?

Minimal Reproduction (if possible, example repository)

I don't know how to reproduce this.

Exception or Error

No response

Version

v4.0.0-beta.277

RayBB avatar May 14 '24 09:05 RayBB

I think I have a linked issue, traefik dashboard works only if I disable the basic auth (removing : ``` middlewares: auth: basicAuth: users: - "<GENERATED_USERNAME>:<GENERATED_PASSWORD>"

charlesilieff avatar May 14 '24 11:05 charlesilieff

@charlesilieff what is the url to the traefik dashboard?

RayBB avatar May 14 '24 11:05 RayBB

http://traefik.my-domain.com/dashboard/

charlesilieff avatar May 14 '24 11:05 charlesilieff

Did you try with simple $ as described in the docs?

https://coolify.io/docs/knowledge-base/traefik/basic-auth

andrasbacsai avatar May 14 '24 11:05 andrasbacsai

@andrasbacsai here is a recording of the issue. I copied the strings straight from the docs. So weird because it has been working for weeks and changed all of a sudden.

here is a video:

https://github.com/coollabsio/coolify/assets/921217/3683bd3c-06da-4659-a804-bf970259719f

RayBB avatar May 14 '24 12:05 RayBB

Found the issue. Fixing in the next version.

andrasbacsai avatar May 15 '24 13:05 andrasbacsai

@andrasbacsai thanks! btw, this is probably such a commonly needed feature it might make sense to make a little GUI for it.

RayBB avatar May 15 '24 14:05 RayBB

@RayBB @andrasbacsai i just had the same issue, what is the workaround?

fernandops26 avatar May 15 '24 16:05 fernandops26

@fernandops26 no workaround afaik. but beta.278 should probably be out tomorrow or so with a fix.

RayBB avatar May 15 '24 16:05 RayBB

@andrasbacsai I am on v4.0.0-beta.279 and still experiencing this issue.

I have tried:

  • With the checkbox checked and not.
  • And with quotes and not.
  • Redeploying each time between.

It 404s in all cases except when I remove the label.

Is there something else I am missing?

@fernandops26 did the new version fix it for you?

RayBB avatar May 16 '24 15:05 RayBB

Hello,

I am also experiencing the same issue on version v4.0.0-beta.280. I followed the same steps as RayBB, but I still encountered a 404 error.

Thank you.

frans2526 avatar May 17 '24 09:05 frans2526

I have no idea what changed but on beta 286 it is working just like this: image

RayBB avatar May 27 '24 11:05 RayBB

Created a PR to improve the documentation https://github.com/coollabsio/documentation-coolify/pull/15

RayBB avatar May 27 '24 11:05 RayBB