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
Set up DS TLS on replica in CA-less topology #355
Set up DS TLS on replica in CA-less topology #355
Conversation
|
This is basically the same as 89de60c which had to be reverted because it is not the proper fix. I would rather wait for the proper fix (#41), which has not been merged yet because it is blocked by https://bugzilla.redhat.com/show_bug.cgi?id=1377413. |
|
89de60c was reveted because while it fixed this particular use case, it broke others. IIRC it broke regular replica promotion with CA. The proper fix is not yet ready, nor on the IPA side (#41 is a step in the right direction, but it also requires some more code fixes, especially properly closing some ad hoc LDAP connections), nor on the NSS side (ETA unknown). If this patch works and doesn't break other use cases, I would merge it and keep the ticket open. After the NSS bug is fixed, we can fix this properly. |
|
FWIW, this one does not break CA-ful replica promotion. |
|
I've tested the following use cases:
The same behavior is present when
The fix seems to properly start the ldapssl both with CA-less and CA-full, therefore I'd accept this as a proper fix for the issue. Please address the minor improvement I suggested inline. |
| @@ -392,6 +392,8 @@ def create_replica(self, realm_name, master_fqdn, fqdn, | |||
| if self.promote: | |||
| if self.ca_is_configured: | |||
| self.step("retrieving DS Certificate", self.__get_ds_cert) | |||
| elif self.pkcs12_info: | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There should be only two options: either pkcs12 is set (CA-less promotion) or not (->CA has to be configured). Perhaps we could modify the code to make this clearer:
if self.pkcs12_info:
self.step("configuring ssl for ds instance", self.__enable_ssl)
else:
self.step("retrieving DS Certificate", self.__get_ds_cert)
That way, if pkcs12_info is not set and CA is not configured, the installation will fail will retrieving the DS cert.
The same code that turns on ldapssl is both in __enable_ssl and __get_ds_cert. Ideally, we would want to avoid the code duplication to make it clearer what is actually going on, but that is out of scope for this PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@tomaskrizek this was implemented as requested. Bump for review.
|
@tomaskrizek FYI, the current documentation states that ipa-certupdate must be run after ipa-ca-install (see https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/7/html/Linux_Domain_Identity_Authentication_and_Policy_Guide/CA-less-to-CA.html). |
Bad UX, please open a RFE ticket for ipa-ca-install to execute certupdate automatically when needed |
34ca89d
to
9e2e1fb
Compare
|
@mbasti-rh, |
|
Running |
|
@jcholast anyway I still see ways how to improve UX
Still worth ticket IMO @pvoborni +1 |
| @@ -390,7 +390,9 @@ def create_replica(self, realm_name, master_fqdn, fqdn, | |||
|
|
|||
| self.step("creating DS keytab", self._request_service_keytab) | |||
| if self.promote: | |||
| if self.ca_is_configured: | |||
| if self.pkcs12_info: | |||
| self.step("configuring ssl for ds instance", self.__enable_ssl) | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you change case for ssl and ds ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are other occurrences of lower-case "ssl" and "ds" within strings in this file. (The string above is a copy-paste of another). I created a new ticket: https://fedorahosted.org/freeipa/ticket/6586. I will add a commit to this PR to address it.
9e2e1fb
to
4780278
Compare
4780278
to
7e347d7
Compare
|
I re-tested the most recent change in domlvl1. ldapssl is turned on both for CA-less replica install and CA-full replica install. I also created a ticket for the above mentioned behavior. https://fedorahosted.org/freeipa/ticket/6577 |
|
Please provide PR for ipa-4-4 too |
|
ipa-4-4 PR: #371 |
Fixes: https://fedorahosted.org/freeipa/ticket/6226