-
Notifications
You must be signed in to change notification settings - Fork 71
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Mattermost auth failure - Invalid state #79
Comments
Hi, Thank you for using Mattermost-LDAP and for the detailed you provide on your issue. I can't find what goes wrong in your setup by reading the logs. There are no error logs. Only the last Apache log is intriguing. I don't know what is going on, if I understand you get a 408 error (HTTP_REQUEST_TIME_OUT), but I don't know what was the request. In your Apache logs, there is no logs about I remark you are using HTTPS for the Oauth server. Maybe you also run Mattermost server with HTTPS. In this case, the Your error is very strange because Mattermost classifies the "Invalid state" as a debug level. I am afraid you will need to inspect the network exchanges between Oauth and Mattermost, to understand what is going on. For this, you could use Wireshark or Tshark. For your information, I have successfully run Mattermost 5.36.1 with Mattermost-LDAP using the demo docker-compose. Keep me informed, Regards |
Thanks for the answer! mattermost and oauth on one server, and I don’t understand what can disturb network exchange I set up SSL on mattermost. (There shouldn't be any problems with certificates. This is my domain's honest wildcard certificate) And apache log
until I understand where I could go wrong...... |
This time the Mattermost error is clearer :
In the Apache logs, you can see the To summarize, the UPDATE oauth_clients SET redirect_uri = 'https://mm.example.com/signup/gitlab/complete' WHERE client_id='116311075dc0e9848caf9c881d9fa2598b0fe7030d068f9eff22af7368094b81'; I hope this will solve your problem, Regards |
after setting the ssl in Mattermost i changed the values in the oauth database
I also want to try up a nginx as proxy in front of Mattermost and see what requests go to Mattermost from oauth |
I set up a proxy for nginx as I wrote earlier. Surprisingly, I have not found any requests from oauth(ip: 172.18.101.55) to Mattermost(nginx). True, perhaps this is normal, I do not fully understand this mechanism.
|
Same to me, |
Similar story, but few differences. Don't understand the reason. And indeed, it is getting things correctly: 03e54d89fc383bb0cf | 30e9ce48a63cca38340ce58a42a1 | https://mattermost.mysite.com/signup/gitlab/complete | authorization_code | api | Site configuration in Mattermost' config.json: Access log from nginx on oauth: And same error - What could be wrong? Replacement of slashes to %2F should not be culprit, as we see from the above comments. Interesting note: if I copy this request and do curl from Oauth server - I am getting error: And indeed, this URL does not include client ID which was configured on Matrermost and Oauth end! But most strange responce is from any third server:
|
My problem solved. Seems that some hidden character was included into Mattermost ID, or some other error occuring when copying it from docker config to Mattermost. |
Describe the bug
Authorization does not work in a fresh installation. "Invalid state"
To Reproduce
Steps to reproduce the behavior:
Provide commands, Mattermost and PHP logs or configuration file if possible.
172.20.1.6 - client ip, mm.example.com:8065 - mattermost server, mm.example.com:8443 -
Mattermost-LDAP web page
Mattermost logs in debug mode
Apache logs
Mttermost config
In oauth_db (postgres)
The text was updated successfully, but these errors were encountered: