Crivaledaz / Mattermost-LDAP

This module provides an external LDAP authentication in Mattermost for the Team Edition (free).
MIT License
365 stars 72 forks source link

Mattermost 6 support? #84

Closed Sofeltis closed 2 years ago

Sofeltis commented 3 years ago

Can you please confirm this works for Mattermost 6? Each time when I edit Configurations table for URL values, in System console id appends on my GitLab URL oauth/resource.php and it looks like https://mysite.com/oauth/resource.php. Also, User API Endpoint: , Auth Endpoint: and Token Endpoint: gets weird appending.

User API Endpoint: https://mysite.com/oauth/resource.php/api/v4/user Auth Endpoint: https://mysite.com/oauth/resource.php/oauth/authorize Token Endpoint: https://mysite.com/oauth/resource.php/oauth/token

Crivaledaz commented 3 years ago

Hi,

I confirm Mattermost-LDAP is working with Mattermost version 6.X.Y. You can try it with the Demo. For that, follow the documentation in the Readme.

Do not pay attention to the values show in System Console, these are not valid. The real values, effectively used by Mattermost are in the config.json file or in the configuration database. Only these values must be valid.

Thus, do not use System Console to edit the GitLab settings. You must change these values directly in the config.json file or in the configuration table in database. To do it, follow instructions in the installation documentation : https://github.com/Crivaledaz/Mattermost-LDAP/blob/master/BareMetal.md#configure-mattermost

Please let me know if this solved your issue,

Regards

mixMugz commented 2 years ago

I dont understand.

Since Mattermost 6.x the configuration needs to be changed in the `Configurations` SQL table. After setting the `Gitlab Site URL`, `Application ID` & `Application Secret Key` via the System Console, the following SQL commands can fix the URLs:

I have Postgress for MatterMost and dont fina any Configurations table. What actualy you mean?

Crivaledaz commented 2 years ago

Mattermost offers two configuration mode. Either a classic JSON file config.json stored in the config/ directory, or it stores all configuration parameters in the database, in a table named Configurations.

The default behaviour depends on your deployment type. It seems to be the JSON file on a bare metal install, but it is the database if you deploy Mattermost in Kubernetes using the official Helm chart, for example.

Thus, if you don't find the configuration in the Mattermost database, Mattemrost is certainly using the JSON file and you should adapt Gitlab parameters directly in the config.json file.

For more information on Mattermost configuration modes, please refer to the documentation : https://docs.mattermost.com/configure/configuration-settings.html