Repository navigation
ldaps: add LDAPS support - #264
shridhargadekar wants to merge 7 commits into
Conversation
shridhargadekar
commented
Jul 31, 2026
- Add export_root_ca_certificate() to ADHost, SambaHost, and IPAHost
- Add CertUtils (client.cert) utility for system-level CA cert install into /etc/openldap/ldap.conf — works with adcli, realmd, ldapsearch
- Add SSSDCommonConfiguration helpers: ad_use_ldaps(), samba_use_ldaps(), ipa_set_tls_cacert() for SSSD-specific LDAPS configuration
74dde9f to
3721fa4
Compare
a94e0cc to
41ed743
Compare
spoore1
left a comment
There was a problem hiding this comment.
Just a couple of quick notes until I can test this out.
41ed743 to
0cc8a13
Compare
|
Depends upon #255 |
e2b0d8a to
7b80a98
Compare
spoore1
left a comment
There was a problem hiding this comment.
I'm not sure the AD export method is working as expected. My testing showed the certutil fail and the old commit worked better but, I'm not sure it's pulling the expected certificate.
effb2c3 to
b9de358
Compare
c31b96c to
e2a23db
Compare
|
FYI, latest updates are passing: |
spoore1
left a comment
There was a problem hiding this comment.
Small change suggestion unless I'm misreading something.
060ea99 to
a279b3d
Compare
|
Hi, I'm still fine with this PR, but I think ti would be good to squash some of the related patches into one. bye, |
a279b3d to
990773a
Compare
990773a to
d61eee7
Compare
spoore1
left a comment
There was a problem hiding this comment.
Just two minor questions about using the cat command.
Code appears to be working and I ran it with a slight modification to the tests in SSSD/sssd#9137
spoore1
left a comment
There was a problem hiding this comment.
Changes LGTM. Testing with SSSD/sssd#9137 is passing with this:
======================================== short test summary info ========================================
PASSED tests/test_authentication.py::test_authentication__user_lookup_over_ldaps (ad)
PASSED tests/test_authentication.py::test_authentication__user_authentication_over_ldaps (ad)
PASSED tests/test_authentication.py::test_authentication__user_lookup_over_ldaps (ipa)
PASSED tests/test_authentication.py::test_authentication__user_authentication_over_ldaps (ipa)
PASSED tests/test_ldaps.py::test_ldaps__ipa_ssl_tls_sets_sssd_options (ipa)
PASSED tests/test_ldaps.py::test_ldaps__ipa_user_lookup_over_starttls (ipa)
PASSED tests/test_authentication.py::test_authentication__user_lookup_over_ldaps (samba)
PASSED tests/test_authentication.py::test_authentication__user_authentication_over_ldaps (samba)
PASSED tests/test_ldaps.py::test_ldaps__samba_user_lookup_over_ldaps (samba)
PASSED tests/test_ldaps.py::test_ldaps__samba_ca_cert_present_on_client (samba)
PASSED tests/test_ldaps.py::test_ldaps__samba_ssl_tls_sets_sssd_options (samba)
============================ 11 passed, 969 deselected in 193.78s (0:03:13) =============================
sumit-bose
left a comment
There was a problem hiding this comment.
Hi,
as said I agree with the PR and is working well in my tests, ACK.
But I still would prefer if some of releated the patches can be squashed together.
bye,
Sumit
danlavu
left a comment
There was a problem hiding this comment.
Thank you for all the changes, the PR looks good. One nitpick, please make those changes but I'm approving.
|
|
||
| client.fs.backup("/etc/resolv.conf") | ||
|
|
||
| # Install IPA CA certificate so LDAPS/STARTTLS tests can use it without per-test setup. |
There was a problem hiding this comment.
Please match the comments' style and provide a one-line summary. The extra information isn't particularly useful.
Install the provider CA certificate on the client
is sufficient.
| provider.fs.backup("/etc/resolv.conf") | ||
| provider.fs.write("/etc/resolv.conf", f"search {provider.domain}\nnameserver 127.0.0.1\n\n") | ||
|
|
||
| # Install the provider's CA certificate on the client so LDAPS tests can use it |
There was a problem hiding this comment.
Please match the comments' style and provide a one-line summary. The extra information isn't particularly useful.
Install the provider CA certificate on the client
is sufficient.
53d2f61
beefd15 to
53d2f61
Compare
Add export_root_ca_certificate() abstract method to GenericProvider and implement it in the AD, IPA, and Samba roles. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Add OpenSSLUtils to utils/tools.py with install_ca_cert(), install_ca_cert_from_server(), and _configure_openldap() helpers. Add install_ca_cert() and ssl attribute to the Client role. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
ADTopologyController (Samba) and IPATopologyController now install the provider's CA certificate on the client via OpenSSLUtils before the provisioned check, so LDAPS/STARTTLS tests have the cert available without any per-test setup. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Replace use_ldaps() with ssl_tls() in SSSDCommonConfiguration. The CA certificate is now pre-installed by the topology controller, so ssl_tls() only sets the SSSD domain options (ad_use_ldaps or ldap_id_use_start_tls) and ldap_tls_cacert path. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Remove install_ca_cert(), install_ca_cert_from_server(), use_ldaps(), and _configure_tls_cacert() from the Client role. Add self.ssl (OpenSSLUtils) for tests that still need to install a cert manually (e.g. AD with no AD CS). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Move cert export logic from ADCertificateAuthority to ADHost so topology controllers can access it directly without going through role fixtures. ADCertificateAuthority._get_ca_config() and get_ca_cert() now delegate to self.host, keeping the role-level API unchanged. ADTopologyController gains an ADHost cert install branch with two-level fallback: ADCS/PowerShell first, then openssl s_client, so cert install works regardless of whether Windows Certificate Services is present. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- utils/tools: make install_ca_cert idempotent; add fs.backup() for ldap.conf; replace conn.run cat with fs.exists/fs.read - topology_controllers: check client before fetching cert to skip redundant SSH round-trips; name certs by topology (ipa-ca.crt, samba-ca.crt, ad-ca.crt); replace conn.run cat with fs.exists/fs.read Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
53d2f61 to
3b805b2
Compare
spoore1
left a comment
There was a problem hiding this comment.
Still LGTM after the comment updates.
sumit-bose
left a comment
There was a problem hiding this comment.
Hi,
still ACK, although I still think that related parts of the patches can be squashed together.
bye,
Sumit