Closed not0kin closed 8 months ago
In general your configuration looks good.
Could you provide logs from your Nextcloud instance to see what's going on there? How did you configure the callback url in Nextcloud for this client?
Here are the Nextcloud logs :
2023-09-20T15:38:39.674744435Z docker_proxy_container_IP - - [20/Sep/2023:15:38:39 +0000] "GET /apps/oidc/authorize?client_id=N8xg8NIlfBxj2d4HJThAp0aQosts9fZpj8Ru7myLHWSXHkbAiIUzmd0YTxkqXuKs&redirect_uri=https%3A%2F%2Fmobilizon-instance.tld%2Fauth%2Fkeycloak%2Fcallback&response_type=code&scope=openid+profile+email&state=lMw8eMu7AJVEjJd-y6jTbtal HTTP/1.1" 303 0 "https://mobilizon-instance.tld/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/117.0" "my_IP"
2023-09-20T15:38:40.922228595Z docker_proxy_container_IP - N8xg8NIlfBxj2d4HJThAp0aQosts9fZpj8Ru7myLHWSXHkbAiIUzmd0YTxkqXuKs [20/Sep/2023:15:38:40 +0000] "POST /apps/oidc/token HTTP/1.1" 401 24 "-" "-" "docker_gateway_IP"
For the callback URL, I followed the instructions in the link above and used : "https://mobilizon-instance.tld/auth/keycloak/callback".
Those are not the logs of the Nextcloud server. But anyway. For further analysis it would be good to have the logs from Nextcloud itself.
Based on your infromation it seems you run into one of the limitations as stated here: https://github.com/H2CK/oidc#limitations
Client authentication to fetch token currently only supports the sending of the client credentials in the body. Basic Auth is currently not supported.
I assume that your configuration option token_method: :post
should configure the client to send the credentials in the body instead of using Basic Auth. That should be fine for the oidc app. But it seems that this configuration option does not work and the OpenID Connect client in Mobilizon still uses Basic Auth.
Is this configuration really correct? Shouldn't it be token_method: post
? Is there a colon to much?
I messed up and set the wrong logs, here are those I got from "nextcloud.log" :
{"reqId":"m7FyL6V12LM4SzQnj9V6","level":1,"time":"2023-09-24T12:17:26+00:00","remoteAddr":"docker_network_gateway_IP","user":"--","app":"no app in context","method":"POST","url":"/apps/oidc/token","message":"IP address throttled because it reached the attempts limit in the last 30 minutes [action: login, delay: 800, ip: docker_network_gateway_IP]","userAgent":"--","version":"27.0.0.8","data":[]}
{"reqId":"m7FyL6V12LM4SzQnj9V6","level":2,"time":"2023-09-24T12:17:27+00:00","remoteAddr":"docker_network_gateway_IP","user":"--","app":"core","method":"POST","url":"/apps/oidc/token","message":"Login failed: 'N8xg8NIlfBxj2d4HJThAp0aQosts9fZpj8Ru7myLHWSXHkbAiIUzmd0YTxkqXuKs' (Remote IP: 'docker_network_gateway_IP')","userAgent":"--","version":"27.0.0.8","data":{"app":"core"}}
{"reqId":"m7FyL6V12LM4SzQnj9V6","level":1,"time":"2023-09-24T12:17:27+00:00","remoteAddr":"docker_network_gateway_IP","user":"--","app":"core","method":"POST","url":"/apps/oidc/token","message":"Bruteforce attempt from \"docker_network_gateway_IP\" detected for action \"login\".","userAgent":"--","version":"27.0.0.8","data":{"app":"core"}}
Is this configuration really correct? Shouldn't it be token_method: post? Is there a colon to much?
If I try and remove a colon, the service no longer starts.
The logs show only a brute force throttling based on the IP address when trying to fetch the token. It does not even reach the oidc app. Everything in the logs is handled by Nextcloud core.
I'm trying to get the application working with this: Mobilizon. But I get the title error.
Here are the details of the error:
And the config that I used:
Is there something that I missed or misconfigured ? Or is Mobilizon incompatible with this application ? I'm not well versed in web-services. I hope I didn't bite more than I can chew.