Skip to content
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

Add mattermost-ldap configuration for OAuth server #63

Closed
wants to merge 76 commits into from

Conversation

stephdl
Copy link
Contributor

@stephdl stephdl commented Jan 29, 2024

This pull request adds the necessary Docker configuration files for setting up the OAuth server. It includes the Dockerfile for the mattermost-ldap container. Additionally, it adds the oauth files for build images and the necessary network and host configuration to the mattermost.service file.
NethServer/dev#6850
image

image

image

you need to read the readme on how to enable it, by default it is disable

after that you have to manually modify the file environment to adjust some variables

- LDAP_DOMAIN: the userdomain you want to use
- LDAP_SEARCH: the LDAP attribute ID for login ( openldap: `uid`, AD: `sAMAccountName`)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

kindly modify this to be this way.

  • LDAP_SEARCH: the LDAP attribute ID of the login; for ( openldap: uid, AD: sAMAccountName)

@compgeniuses
Copy link

This PR sheds alot of light into implementation of Authentication into alot of solutions that would/do support LDap authentication. i think it can serve as a good reference point on implementing NS8 Ldap to the authentication scheme of the various applications. ofcourse its diferent for each app, but after going through this, alot of questions would be answered and would as well reduce alot of questions your way as core devs.

thank @stephdl for the nice comments on the commits, they surely also help.

stdout_logfile_maxbytes=0
stderr_logfile=/dev/stderr
stderr_logfile_maxbytes=0
autorestart=false
Copy link
Member

@DavidePrincipi DavidePrincipi Feb 21, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What happens if a supervised service terminates? I'd expect the container terminates with an exit code, so the systemd unit can restart it.

This behavior is already implement without supervisord and with a simple shell script. For example see Mail. It is documented by https://docs.docker.com/config/containers/multi-service_container/

What are the advantages of using supervisord in this case?

Copy link
Contributor Author

@stephdl stephdl Feb 21, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

modern way , it is widely used in the container's world, I will test what happen, if one service stops, for what I know the container stops

Copy link
Member

@DavidePrincipi DavidePrincipi Feb 21, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok to keep it if terminates as expected. In the future evaluate also the alternative shell implementation: in the same document, supervisord is considered too, as a "more involved" solution https://docs.docker.com/config/containers/multi-service_container/#use-a-process-manager. I agree with that definition!

Copy link
Contributor Author

@stephdl stephdl Feb 21, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should be good, I added an event listener, I bet that nextcloud could get some benefice of it, if php-fpm is killed the container is still up @DavidePrincipi

@stephdl stephdl force-pushed the mattermostLDAP branch 2 times, most recently from b5b9bee to ff59f30 Compare February 21, 2024 17:53
- Remove the second FQDN requirement
- Configure an additional host + path HTTP route for oauth backend
command=nginx -g 'daemon off;'
stdout_logfile=/dev/stdout
stdout_logfile_maxbytes=0
stderr_logfile=/dev/stderr
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this setting work? I see no logs at all from nginx. Whilst it can be considered ok for the stable release, during the development it is something I miss very much. I'd like a DEBUG flag to increase log verbosity...

@stephdl
Copy link
Contributor Author

stephdl commented May 27, 2024

A new SSO feature should replace this feature

@stephdl stephdl closed this May 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants