Closed lephisto closed 6 years ago
Same problem here.
For reference, we have Mattermost behind a reverse proxy (nginx) and on the same server we have this script running (https://blabla:8080/oauth).
If the Mattermost Server does not accept the SSL certificate, it returns a regular error, if data is transmitted properly, it just returns a 500 with abovementioned details.
PHP 5.4, CentOS 7 Mattermost 4.9
Hi,
I have installed mattermost 4.9 on a new server and I have the same error.
I have not yet found the reason of this problem, but I'm pretty sure Mattermost has made some slight change on interactions with Gitlab. When I have some time, I will install Gitlab in order to study what information are exchanged.
I will let you know if I found a patch or anything about this issue. I am sorry for the inconvenience.
This would be awesome. would love to have LDAP working right in the CE..
Hi,
I have a great news ! After a day of work, I finally found the problem and partially fix it. In fact, my first tests, with static data, are working, so the patch is on track.
As I said yesterday, the problem was Gitlab has added a lot of data to the json answer after authorization process. So Mattermost-LDAP was not consistent with Mattermost anymore.
Now, for my patch I just need to find a way to add lacking data, but there are many dates (creation, sign-in, last sign-in ...) and currently Mattermost-LDAP doesn't store them. I think I will propose a first patch before the next week. Hold on ! Mattermost-LDAP will come back soon ;)
Regards
Hello,
I have committed a new version of Mattermost-LDAP which solves the problem. Now, the output of the Oauth server is consistent with Mattermost 4.9 and should work with Mattermost 4.4.
Let me know if you still have difficulties to install Mattermost-LDAP, I will be happy to help you.
Thanks you for your feedbacks.
Hello,
I'm trying to get this working with Mattermost 4.4.2, but I fail.
OpenLDAP Server running fine, serving all kinds of Services. Applied patch to support LDAP V3. No PHP Errors are thrown, so I assume that oauth<->ldap connection is fine.
MM and Fake Oauth run on a Ubuntu 16.04 Workstation (for testing), Apache and PHP7.
When trying to Authenticate against the Fake Gitlab, MM throws the following:
`[2017/12/06 11:05:18 CET] [EROR] Please check the std error output for the stack trace [2017/12/06 11:05:18 CET] [EROR] [runtime error: invalid memory address or nil pointer dereference] goroutine 2236 [running]: runtime/debug.Stack(0x0, 0x0, 0x1caaf60) /usr/local/go/src/runtime/debug/stack.go:24 +0xa7 runtime/debug.PrintStack() /usr/local/go/src/runtime/debug/stack.go:16 +0x22 github.com/mattermost/mattermost-server/vendor/github.com/gorilla/handlers.recoveryHandler.log(0x1cab060, 0xc421fbba30, 0x1cab0a0, 0x1d34a08, 0x1, 0xc422879f50, 0x1, 0x1) /var/lib/jenkins/jobs/msr/jobs/d/jobs/enterprise-release/workspace/src/github.com/mattermost/mattermost-server/vendor/github.com/gorilla/handlers/recovery.go:89 +0x70 github.com/mattermost/mattermost-server/vendor/github.com/gorilla/handlers.recoveryHandler.ServeHTTP.func1(0x1cb5aa0, 0xc4213e2700, 0x1cab060, 0xc421fbba30, 0x1cab0a0, 0x1d34a08, 0x1) /var/lib/jenkins/jobs/msr/jobs/d/jobs/enterprise-release/workspace/src/github.com/mattermost/mattermost-server/vendor/github.com/gorilla/handlers/recovery.go:74 +0xea panic(0x12b8fc0, 0x1cf7fc0) /usr/local/go/src/runtime/panic.go:491 +0x283 github.com/mattermost/mattermost-server/model/gitlab.(GitLabUser).IsValid(...) /var/lib/jenkins/jobs/msr/jobs/d/jobs/enterprise-release/workspace/src/github.com/mattermost/mattermost-server/model/gitlab/gitlab.go:78 github.com/mattermost/mattermost-server/model/gitlab.(GitLabProvider).GetAuthDataFromJson(0x1d34a08, 0x1caa8e0, 0xc4228abb30, 0x6, 0xc420093b88) /var/lib/jenkins/jobs/msr/jobs/d/jobs/enterprise-release/workspace/src/github.com/mattermost/mattermost-server/model/gitlab/gitlab.go:109 +0x3a github.com/mattermost/mattermost-server/app.(App).LoginByOAuth(0xc422030ea0, 0xc42134350c, 0x6, 0x7f9d29fc42d0, 0xc42288d040, 0x0, 0x0, 0x0, 0x0) /var/lib/jenkins/jobs/msr/jobs/d/jobs/enterprise-release/workspace/src/github.com/mattermost/mattermost-server/app/oauth.go:458 +0x1e3 github.com/mattermost/mattermost-server/app.(App).CompleteOAuth(0xc422030ea0, 0xc42134350c, 0x6, 0x1cb1ee0, 0xc42288d040, 0x0, 0x0, 0xc422731140, 0x0, 0x0) /var/lib/jenkins/jobs/msr/jobs/d/jobs/enterprise-release/workspace/src/github.com/mattermost/mattermost-server/app/oauth.go:438 +0x27d github.com/mattermost/mattermost-server/api4.completeOAuth(0xc4217c40f0, 0x1cb5aa0, 0xc4213e2700, 0xc422014d00) /var/lib/jenkins/jobs/msr/jobs/d/jobs/enterprise-release/workspace/src/github.com/mattermost/mattermost-server/api4/oauth.go:472 +0x524 github.com/mattermost/mattermost-server/api4.handler.ServeHTTP(0xc422030ea0, 0x149e1b8, 0x0, 0x1cb5aa0, 0xc4213e2700, 0xc422014d00) /var/lib/jenkins/jobs/msr/jobs/d/jobs/enterprise-release/workspace/src/github.com/mattermost/mattermost-server/api4/context.go:174 +0x9b2 github.com/mattermost/mattermost-server/api4.(*handler).ServeHTTP(0xc4212cf360, 0x1cb5aa0, 0xc4213e2700, 0xc422014d00)