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

feat: option to skip LDAP TLS verification #1918

Open
wants to merge 1 commit into
base: devel
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions config/crd/bases/awx.ansible.com_awxs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1862,6 +1862,10 @@ spec:
ldap_password_secret:
description: Secret where can be found the LDAP bind password
type: string
ldap_skip_tls_verify:
description: Skip TLS verification for LDAP
default: false
type: boolean
bundle_cacert_secret:
description: Secret where can be found the trusted Certificate Authority Bundle
type: string
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -727,6 +727,11 @@ spec:
x-descriptors:
- urn:alm:descriptor:com.tectonic.ui:advanced
- urn:alm:descriptor:io.kubernetes:Secret
- displayName: Skip TLS verification for LDAP?
path: ldap_skip_tls_verify
x-descriptors:
- urn:alm:descriptor:com.tectonic.ui:advanced
- urn:alm:descriptor:com.tectonic.ui:booleanSwitch
- displayName: Task Args
path: task_args
x-descriptors:
Expand Down
3 changes: 3 additions & 0 deletions roles/installer/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -440,6 +440,9 @@ ldap_cacert_secret: ''
# Secret to lookup that provides the LDAP bind password
ldap_password_secret: ''

# Whether or not to skip TLS verification for LDAP
ldap_skip_tls_verify: false

# Secret to lookup that provides the custom CA trusted bundle
bundle_cacert_secret: ''

Expand Down
4 changes: 4 additions & 0 deletions roles/installer/templates/settings/ldap.py.j2
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
AUTH_LDAP_GLOBAL_OPTIONS = {
{% if ldap_cacert_ca_crt %}
{% if ldap_skip_tls_verify %}
ldap.OPT_X_TLS_REQUIRE_CERT: ldap.OPT_X_TLS_NEVER,
{% else %}
ldap.OPT_X_TLS_REQUIRE_CERT: True,
{% endif %}
ldap.OPT_X_TLS_CACERTFILE: "/etc/openldap/certs/ldap-ca.crt"
{% endif %}
}
Expand Down
Loading