Discussion:
[Freeipa-devel] [freeipa PR#698][opened] install: request service certs after host keytab is set up
HonzaCholasta
2017-04-07 07:39:06 UTC
Permalink
URL: https://github.com/freeipa/freeipa/pull/698
Author: HonzaCholasta
Title: #698: install: request service certs after host keytab is set up
Action: opened

PR body:
"""
**dsinstance: reconnect ldap2 after DS is restarted by certmonger**

DS is restarted by certmonger in the restart_dirsrv script after the DS
certificate is saved. This breaks the ldap2 backend and makes any operation
fail with NetworkError until it is reconnected.

Reconnect ldap2 after the DS certificate request is finished to fix the
issue. Make sure restart_dirsrv waits for the ldapi socket so that the
reconnect does not fail.

**httpinstance: avoid httpd restart during certificate request**

httpd is restarted by certmonger in the restart_httpd script after the
httpd certificate is saved if it was previously running. The restart will
fail because httpd is not properly configured at this point.

Stop httpd at the beginning of httpd install to avoid the restart.

**dsinstance, httpinstance: consolidate certificate request code**

A different code path is used for DS and httpd certificate requests in
replica promotion. This is rather unnecessary and makes the certificate
request code not easy to follow.

Consolidate the non-promotion and promotion code paths into one.

**install: request service certs after host keytab is set up**

The certmonger renew agent and restart scripts use host keytab for
authentication. When they are executed during a certmonger request before
the host keytab is set up, the authentication will fail.

Make sure all certmonger requests in the installer are done after the host
keytab is set up.

**renew agent: revert to host keytab authentication**

Fixes an issue where the renew agent uses GSSAPI for LDAP connection but
fails because it is not authenticated.

This reverts commit 7462adec13c5b25b6868d2863dc38062c97d0ff7.

**renew agent, restart scripts: connect to LDAP after kinit**

Connect to LDAP after kinit is done, otherwise GSSAPI authentication will
fail.

https://pagure.io/freeipa/issue/6757

"""

To pull the PR as Git branch:
git remote add ghfreeipa https://github.com/freeipa/freeipa
git fetch ghfreeipa pull/698/head:pr698
git checkout pr698
martbab
2017-04-07 16:52:45 UTC
Permalink
URL: https://github.com/freeipa/freeipa/pull/698
Title: #698: install: request service certs after host keytab is set up

Label: +ack
martbab
2017-04-07 16:53:56 UTC
Permalink
URL: https://github.com/freeipa/freeipa/pull/698
Title: #698: install: request service certs after host keytab is set up

Label: +pushed
martbab
2017-04-07 16:54:00 UTC
Permalink
URL: https://github.com/freeipa/freeipa/pull/698
Title: #698: install: request service certs after host keytab is set up

martbab commented:
"""
master:

* b189be12ecd1ba9efa35daf41e7e04a9362c6a5e dsinstance: reconnect ldap2 after DS is restarted by certmonger
* 8a8558637946d7dac1d85642baaf9ba7c1be98f8 httpinstance: avoid httpd restart during certificate request
* ec52332229672f35af8db5aaf1ed2827a8dd5467 dsinstance, httpinstance: consolidate certificate request code
* 181cb94e744c380a823b94d0d5ca088ab3dcca1c install: request service certs after host keytab is set up
* 3884a671cb59c360fae67884755fa5779053107a renew agent: revert to host keytab authentication
* a6a89e24147d8542fd09cf64e04982599b79e3cc renew agent, restart scripts: connect to LDAP after kinit
ipa-4-5:

* 3a3cd01161b618dd6836fda7df935dd39adc117b dsinstance: reconnect ldap2 after DS is restarted by certmonger
* 029da956be22c9e05a53c7c30e3afcb2c851ad86 httpinstance: avoid httpd restart during certificate request
* 3317e172227fd72ad9049f7893d3018043201b3c dsinstance, httpinstance: consolidate certificate request code
* cb141b0eb3950bcae1950e6190ba3573f348b1f2 install: request service certs after host keytab is set up
* 1a7db624857c46a2c1c091ed4b8d7902a4486596 renew agent: revert to host keytab authentication
* e9168e80ddb6066114f9438fa6a7a11b0eaa02cf renew agent, restart scripts: connect to LDAP after kinit
"""

See the full comment at https://github.com/freeipa/freeipa/pull/698#issuecomment-292591048
martbab
2017-04-07 16:54:04 UTC
Permalink
URL: https://github.com/freeipa/freeipa/pull/698
Author: HonzaCholasta
Title: #698: install: request service certs after host keytab is set up
Action: closed

To pull the PR as Git branch:
git remote add ghfreeipa https://github.com/freeipa/freeipa
git fetch ghfreeipa pull/698/head:pr698
git checkout pr698

Loading...