When using Opencloud with Authelia as OIDC provider, Opencloud has sometimes problems with refreshing the token from Authelia.
Please describe how you started the server and provide a list of relevant environment variables or configuration files.
traefik-1 | {"ClientAddr":"172.18.0.1:34672","ClientHost":"172.18.0.1","ClientPort":"34672","ClientUsername":"-","DownstreamContentSize":0,"DownstreamStatus":401,"Duration":12609498,"OriginContentSize":0,"OriginDuration":12490991,"OriginStatus":401,"Overhead":118507,"RequestAddr":"opencloud.example.com","RequestContentSize":1042534,"RequestCount":4344,"RequestHost":"opencloud.example.com","RequestMethod":"POST","RequestPath":"/remote.php/dav/spaces/e42e9465-7a4d-41ac-888b-0f0f8236c0f4$76103868/SomeFolder","RequestPort":"-","RequestProtocol":"HTTP/2.0","RequestScheme":"https","RetryAttempts":0,"RouterName":"opencloud@docker","ServiceAddr":"172.18.0.7:9200","ServiceName":"opencloud@docker","ServiceURL":"http://172.18.0.7:9200","StartLocal":"2025-05-22T05:56:59.06516696Z","StartUTC":"2025-05-22T05:56:59.06516696Z","TLSCipher":"TLS_AES_128_GCM_SHA256","TLSVersion":"1.3","downstream_X-Request-Id":"bb987e93-a00a-4fd1-a79e-44e02861b7bb","entryPointName":"https","level":"info","msg":"","origin_X-Request-Id":"bb987e93-a00a-4fd1-a79e-44e02861b7bb","request_X-Request-Id":"bb987e93-a00a-4fd1-a79e-44e02861b7bb","time":"2025-05-22T05:56:59Z"}
traefik-1 | {"ClientAddr":"172.18.0.1:34672","ClientHost":"172.18.0.1","ClientPort":"34672","ClientUsername":"-","DownstreamContentSize":0,"DownstreamStatus":401,"Duration":299503133,"OriginContentSize":0,"OriginDuration":299352540,"OriginStatus":401,"Overhead":150593,"RequestAddr":"opencloud.example.com","RequestContentSize":1743035,"RequestCount":4374,"RequestHost":"opencloud.example.com","RequestMethod":"POST","RequestPath":"/remote.php/dav/spaces/e42e9465-7a4d-41ac-888b-0f0f8236c0f4$76103868/SomeFolder","RequestPort":"-","RequestProtocol":"HTTP/2.0","RequestScheme":"https","RetryAttempts":0,"RouterName":"opencloud@docker","ServiceAddr":"172.18.0.7:9200","ServiceName":"opencloud@docker","ServiceURL":"http://172.18.0.7:9200","StartLocal":"2025-05-22T05:57:10.025218145Z","StartUTC":"2025-05-22T05:57:10.025218145Z","TLSCipher":"TLS_AES_128_GCM_SHA256","TLSVersion":"1.3","downstream_X-Request-Id":"ab25d5d9-62ae-4430-ab9c-d7458409dc90","entryPointName":"https","level":"info","msg":"","origin_X-Request-Id":"ab25d5d9-62ae-4430-ab9c-d7458409dc90","request_X-Request-Id":"ab25d5d9-62ae-4430-ab9c-d7458409dc90","time":"2025-05-22T05:57:10Z"}
opencloud-1 | {"level":"error","service":"proxy","error":"token is expired","authenticator":"oidc","path":"/remote.php/dav/spaces/e42e9465-7a4d-41ac-888b-0f0f8236c0f4$76103868/SomeFolder","user_agent":"Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/136.0.0.0 Safari/537.36","client.address":"172.18.0.1","network.peer.address":"","network.peer.port":"","time":"2025-05-22T05:56:59Z","line":"github.com/opencloud-eu/opencloud/services/proxy/pkg/middleware/oidc_auth.go:198","message":"failed to authenticate the request"}
opencloud-1 | {"level":"error","service":"proxy","error":"token is expired","authenticator":"oidc","path":"/remote.php/dav/spaces/e42e9465-7a4d-41ac-888b-0f0f8236c0f4$76103868/SomeFolder","user_agent":"Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/136.0.0.0 Safari/537.36","client.address":"172.18.0.1","network.peer.address":"","network.peer.port":"","time":"2025-05-22T05:57:10Z","line":"github.com/opencloud-eu/opencloud/services/proxy/pkg/middleware/oidc_auth.go:198","message":"failed to authenticate the request"}
Describe the bug
When using Opencloud with Authelia as OIDC provider, Opencloud has sometimes problems with refreshing the token from Authelia.
I have already performed initial troubleshooting, which resulted in #587 (reply in thread) but still I am getting occasional log outs from Opencloud WebUI, or during file uploads I am getting HTTP 401 from OpenCloud WebUI see #786 (reply in thread)
Today I came cross issue fosrl/pangolin#762 which lead me to mealie-recipes/mealie#5228 thinking if Opencloud is not having same issue.
Expected behavior
Opencloud should renew OIDC token without breaking workflow of user
Actual behavior
Setup
Please describe how you started the server and provide a list of relevant environment variables or configuration files.
Details
Authelia configuration
Opencloud env variables
My
csp.ymlAdditional context
Traefik logs:
Opencloud logs
No logs in Authelia