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

[helper] App users ldap #977

Closed
wants to merge 7 commits into from
Closed

[helper] App users ldap #977

wants to merge 7 commits into from

Conversation

Josue-T
Copy link
Contributor

@Josue-T Josue-T commented May 5, 2020

The problem

  • App can't authenticate in LDAP for extended search request. Some app need this. By example mastodon and synapse
  • App can't cleanly send and receive email.

Solution

  • Create a user and group in LDAP in a specific place. Note that we will put the app user in ou=users,ou=apps,dc=yunohost,dc=org and the app group in ou=groups,ou=apps,dc=yunohost,dc=org

PR Status

Linked to YunoHost/test_apps#9
Tested locally and it work. The unit test fail because YunoHost/test_apps#9 need to be merged.

How to test

Run:

yunohost tools migrations migrate
yunohost tools regen-conf dovecot
yunohost tools regen-conf postfix

Install the ldap user app

After you can test the LDAP authentication with a simple LDAP research:

ldapsearch -b dc=yunohost,dc=org -x -D uid=ldap_user_app,ou=users,ou=apps,dc=yunohost,dc=org -w RAND0MP4sSw0RO

You can also try the authentication in Postfix:

# Calculate the base64 for authentication
$ echo -ne '\[email protected]\0RAND0MP4sSw0RO' | base64
AGxkYXBfdXNlcl9hcHBAeW5oLWRldjEubGFuAFJBTkQwTVA0c1N3MFJP
$ openssl s_client -connect localhost:25 -starttls smtp
> helo localhost
> auth plain AGxkYXBfdXNlcl9hcHBAeW5oLWRldjEubGFuAFJBTkQwTVA0c1N3MFJP

You can also try the authentication in Dovecot:

openssl s_client -connect localhost:993 -crlf
> a login  ldap_user_app RAND0MP4sSw0RO

Validation

  • Principle agreement 0/2 :
  • Quick review 0/1 :
  • Simple test 0/1 :
  • Deep review 0/1 :

@Josue-T Josue-T marked this pull request as ready for review May 6, 2020 11:47
@Josue-T Josue-T requested review from alexAubin, kay0u, zamentur and a team May 6, 2020 11:47
@zamentur
Copy link
Member

zamentur commented May 6, 2020

Aleks says me yesterday that it may be possible to change dovecot config to allow system user to send mail and may be to have some inbox.

Are we sure we want to create ldap users for this ?

@alexAubin
Copy link
Member

alexAubin commented May 6, 2020

(c.f. #815 )

Josue explains in this comment why LDAP user might be better

@Gredin67
Copy link

@Gredin67
Copy link

@tituspijean maybe?

@alexAubin
Copy link
Member

Superseded by #815 :|

@alexAubin alexAubin closed this Jul 10, 2023
@alexAubin alexAubin deleted the app_users_ldap branch July 10, 2023 17:15
@Josue-T
Copy link
Contributor Author

Josue-T commented Sep 1, 2023

Superseded by #815 :|

Well not completly because, by example synapse need a LDAP user to authenticate to ldap to use ldap filters. So no it will not completly fix the issue.

@Josue-T Josue-T mentioned this pull request Sep 1, 2023
2 tasks
@alexAubin
Copy link
Member

I don't understand why synapse needs a LDAP user to bind with, basically any anonymous users has read access, and there are dozens of other apps that do implement LDAP searches without being authenticated ... has it been doubled checked that synapse does really need a LDAP user+password for this, and why ? x_x

@Josue-T
Copy link
Contributor Author

Josue-T commented Oct 9, 2023

It look like a know issue here: matrix-org/matrix-synapse-ldap3#169 (comment)

But I would say I didn't tested on the last release if the issue still be here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants