-
-
Notifications
You must be signed in to change notification settings - Fork 2k
breaking(feat): Config Templates for LDAP support #3524
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
Open
polarathene
wants to merge
15
commits into
docker-mailserver:master
Choose a base branch
from
polarathene:feat/config-templates
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
a699c03
refactor: Generate `saslauthd.conf` via Config Template feature
polarathene 54eebb9
chore: `saslauthd.conf` generation - Use a base config for defaults
polarathene 4cc300f
chore: `saslauthd.conf` generation - Use common `LDAP_` ENV in base
polarathene b5edba6
chore: Adapt Dovecot LDAP config generation to use Config Template
polarathene ea61a21
refactor: Adapt Postfix LDAP config generation to use Config Template
polarathene 067341a
chore: `ldap-*cf` to `ldap/*.cf`
polarathene 8fe744f
fix: Postfix LDAP configs `main.cf` support opt-out instead
polarathene 1ec1853
feat: Support ENV override on individual Postfix LDAP config files
polarathene 4968f4a
tests: Fix white-space difference
polarathene 6bc4a45
fix: New template files accidentally committed with `CRLF` line endings
polarathene d6ae1a8
chore: Add new file extensions to `.gitattributes`
polarathene 4b02933
tests: Adjust KV match logic
polarathene 24d3ba3
tests: Fix LDAP test for Postfix `start_tls = no`
polarathene b007533
Apply suggestions from code review
polarathene c811e6c
Apply suggestions from code review
polarathene File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 4 additions & 7 deletions
11
target/dovecot/dovecot-ldap.conf.ext → target/features/ldap/dovecot.base
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,12 +1,9 @@ | ||
| base = ou=people,dc=example,dc=com | ||
| dn = ${BIND_DN} | ||
| dnpass = ${BIND_PW} | ||
| uris = ${SERVER_HOST} | ||
| base = ${SEARCH_BASE} | ||
| default_pass_scheme = SSHA | ||
| dn = cn=admin,dc=example,dc=com | ||
| dnpass = admin | ||
| uris = ldap://mail.example.com | ||
| tls = no | ||
| ldap_version = 3 | ||
| pass_attrs = uniqueIdentifier=user,userPassword=password | ||
| pass_filter = (&(objectClass=PostfixBookMailAccount)(uniqueIdentifier=%n)) | ||
| user_attrs = mailHomeDirectory=home,mailUidNumber=uid,mailGidNumber=gid,mailStorageDirectory=mail | ||
| user_filter = (&(objectClass=PostfixBookMailAccount)(uniqueIdentifier=%n)) | ||
| auth_bind = no |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,32 @@ | ||
| # Dovecot LDAP config docs: https://github.com/dovecot/core/blob/bbb600e46ca650a3a5ef812ea3a1e8c45a6ea0ba/doc/example-config/dovecot-ldap.conf.ext | ||
| hosts = ${HOSTS} | ||
| uris = ${URIS} | ||
| dn = ${DN} | ||
| dnpass = ${DNPASS} | ||
| sasl_bind = ${SASL_BIND} | ||
| sasl_mech = ${SASL_MECH} | ||
| sasl_realm = ${SASL_REALM} | ||
| sasl_authz_id = ${SASL_AUTHZ_ID} | ||
| tls = ${TLS} | ||
| tls_ca_cert_file = ${TLS_CA_CERT_FILE} | ||
| tls_ca_cert_dir = ${TLS_CA_CERT_DIR} | ||
| tls_cipher_suite = ${TLS_CIPHER_SUITE} | ||
| tls_cert_file = ${TLS_CERT_FILE} | ||
| tls_key_file = ${TLS_KEY_FILE} | ||
| tls_require_cert = ${TLS_REQUIRE_CERT} | ||
| ldaprc_path = ${LDAPRC_PATH} | ||
| debug_level = ${DEBUG_LEVEL} | ||
| auth_bind = ${AUTH_BIND} | ||
| auth_bind_userdn = ${AUTH_BIND_USERDN} | ||
| ldap_version = ${LDAP_VERSION} | ||
| base = ${BASE} | ||
| deref = ${DEREF} | ||
| scope = ${SCOPE} | ||
| user_attrs = ${USER_ATTRS} | ||
| user_filter = ${USER_FILTER} | ||
| pass_attrs = ${PASS_ATTRS} | ||
| pass_filter = ${PASS_FILTER} | ||
| iterate_attrs = ${ITERATE_ATTRS} | ||
| iterate_filter = ${ITERATE_FILTER} | ||
| default_pass_scheme = ${DEFAULT_PASS_SCHEME} | ||
| blocking = ${BLOCKING} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| bind_dn = ${BIND_DN} | ||
| bind_pw = ${BIND_PW} | ||
| server_host = ${SERVER_HOST} | ||
| search_base = ${SEARCH_BASE} | ||
| bind = yes | ||
| result_attribute = mail | ||
| version = 3 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,35 @@ | ||
| # Postfix LDAP table docs: http://www.postfix.org/ldap_table.5.html | ||
| server_host = ${SERVER_HOST} | ||
| server_port = ${SERVER_PORT} | ||
| timeout = ${TIMEOUT} | ||
| search_base = ${SEARCH_BASE} | ||
| query_filter = ${QUERY_FILTER} | ||
| result_format = ${RESULT_FORMAT} | ||
| domain = ${DOMAIN} | ||
| result_attribute = ${RESULT_ATTRIBUTE} | ||
| special_result_attribute = ${SPECIAL_RESULT_ATTRIBUTE} | ||
| terminal_result_attribute = ${TERMINAL_RESULT_ATTRIBUTE} | ||
| leaf_result_attribute = ${LEAF_RESULT_ATTRIBUTE} | ||
| scope = ${SCOPE} | ||
| bind = ${BIND} | ||
| bind_dn = ${BIND_DN} | ||
| bind_pw = ${BIND_PW} | ||
| recursion_limit = ${RECURSION_LIMIT} | ||
| expansion_limit = ${EXPANSION_LIMIT} | ||
| size_limit = ${SIZE_LIMIT} | ||
| dereference = ${DEREFERENCE} | ||
| chase_referrals = ${CHASE_REFERRALS} | ||
| version = ${VERSION} | ||
| debuglevel = ${DEBUGLEVEL} | ||
| sasl_mechs = ${SASL_MECHS} | ||
| sasl_realm = ${SASL_REALM} | ||
| sasl_authz_id = ${SASL_AUTHZ_ID} | ||
| sasl_minssf = ${SASL_MINSSF} | ||
| start_tls = ${START_TLS} | ||
| tls_ca_cert_dir = ${TLS_CA_CERT_DIR} | ||
| tls_ca_cert_file = ${TLS_CA_CERT_FILE} | ||
| tls_cert = ${TLS_CERT} | ||
| tls_key = ${TLS_KEY} | ||
| tls_require_cert = ${TLS_REQUIRE_CERT} | ||
| tls_random_file = ${TLS_RANDOM_FILE} | ||
| tls_cipher_suite = ${TLS_CIPHER_SUITE} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| ldap_bind_dn: ${BIND_DN} | ||
| ldap_bind_pw: ${BIND_PW} | ||
| ldap_servers: ${SERVER_HOST} | ||
| ldap_search_base: ${SEARCH_BASE} | ||
| ldap_filter: (&(uniqueIdentifier=%u)(mailEnabled=TRUE)) | ||
| ldap_referrals: yes |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,36 @@ | ||
| # Parameter docs: https://github.com/cyrusimap/cyrus-sasl/blob/3959d45aa187d906d5fb3e8edf7e3661780967a5/saslauthd/LDAP_SASLAUTHD#L85-L242 | ||
| ldap_auth_method: ${LDAP_AUTH_METHOD} | ||
| ldap_bind_dn: ${LDAP_BIND_DN} | ||
| ldap_bind_pw: ${LDAP_BIND_PW} | ||
| ldap_default_domain: ${LDAP_DEFAULT_DOMAIN} | ||
| ldap_default_realm: ${LDAP_DEFAULT_REALM} | ||
| ldap_deref: ${LDAP_DEREF} | ||
| ldap_filter: ${LDAP_FILTER} | ||
| ldap_group_attr: ${LDAP_GROUP_ATTR} | ||
| ldap_group_dn: ${LDAP_GROUP_DN} | ||
| ldap_group_filter: ${LDAP_GROUP_FILTER} | ||
| ldap_group_match_method: ${LDAP_GROUP_MATCH_METHOD} | ||
| ldap_group_search_base: ${LDAP_GROUP_SEARCH_BASE} | ||
| ldap_group_scope: ${LDAP_GROUP_SCOPE} | ||
| ldap_password: ${LDAP_PASSWORD} | ||
| ldap_password_attr: ${LDAP_PASSWORD_ATTR} | ||
| ldap_referrals: ${LDAP_REFERRALS} | ||
| ldap_restart: ${LDAP_RESTART} | ||
| ldap_id: ${LDAP_ID} | ||
| ldap_authz_id: ${LDAP_AUTHZ_ID} | ||
| ldap_mech: ${LDAP_MECH} | ||
| ldap_realm: ${LDAP_REALM} | ||
| ldap_scope: ${LDAP_SCOPE} | ||
| ldap_search_base: ${LDAP_SEARCH_BASE} | ||
| ldap_servers: ${LDAP_SERVERS} | ||
| ldap_start_tls: ${LDAP_START_TLS} | ||
| ldap_time_limit: ${LDAP_TIME_LIMIT} | ||
| ldap_timeout: ${LDAP_TIMEOUT} | ||
| ldap_tls_check_peer: ${LDAP_TLS_CHECK_PEER} | ||
| ldap_tls_cacert_file: ${LDAP_TLS_CACERT_FILE} | ||
| ldap_tls_cacert_dir: ${LDAP_TLS_CACERT_DIR} | ||
| ldap_tls_ciphers: ${LDAP_TLS_CIPHERS} | ||
| ldap_tls_cert: ${LDAP_TLS_CERT} | ||
| ldap_tls_key: ${LDAP_TLS_KEY} | ||
| ldap_use_sasl: ${LDAP_USE_SASL} | ||
| ldap_version: ${LDAP_VERSION} |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.