RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 910901 - [RFE] Allow client to be reenrolled using an existing keytab
Summary: [RFE] Allow client to be reenrolled using an existing keytab
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: ipa
Version: 7.0
Hardware: Unspecified
OS: Unspecified
medium
unspecified
Target Milestone: rc
: ---
Assignee: Rob Crittenden
QA Contact: IDM QE LIST
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-02-13 20:07 UTC by Namita Soman
Modified: 2014-06-18 00:06 UTC (History)
3 users (show)

Fixed In Version: ipa-3.2.1-1.el7
Doc Type: Enhancement
Doc Text:
Feature: Allow client re-enrollment using existing keytab Reason: People rebuild IPA client systems all the time and need to easily re-enroll clients after they rebuilt them especially if they are virtual machines. This calls for a new provisioning method using a keytab, since existing methods either do not work, or require admin password. Result (if any): A host that has been recreated and does not have its host entry disabled or removed, can be re-enrolled using a previously backed up keytab file.
Clone Of:
Environment:
Last Closed: 2014-06-13 11:39:17 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Namita Soman 2013-02-13 20:07:11 UTC
This bug is created as a clone of upstream ticket:
https://fedorahosted.org/freeipa/ticket/3374

People rebuild IPA client systems all the time and need to easily re-enroll clients after they rebuilt them especially if they are virtual machines. This calls for a new provisioning method using a keytab.

Scenario:

 1. Machine has been initially provisioned using an OTP method
 2. Machine is de-provisioned 
 3. Machine needs to be rebuilt with the same name

Currently OTP method does not work for re-enrolment because it requires two asynchronous operations: one to get a new OTP from IPA and another to call the install with the new OTP.
Using other provisioning schemes we support (admin based ones) means sticking admin password into the kickstart files - not a good security practice.

The proposal is to allow backing up a keytab and then using keytab to acquire the ticket and then installing the client.

Prerequisites:
 1. System has already been enrolled
 2. Host entry exists
 3. Keytab was backed up
 4. New authentication method/parameter is added to ipa-client-install 

Proposed sequence:  
 1. Keytab is restored in a predefined place
 2. ipa-client-install is called with new argumet --keytab=<path to keytab>
 3. Client install does kinit using keytab and then continues the enrolment re-provisioning new keytab, certs and ssh keys. Restored keytab is destroyed or overwritten.

Note: The system can be de-provisioned with or without calling ipa-client-install --uninstall so the contents of the host entry might be different. The logic should work regardless of how the client was de-provisioned. Effectively running the ipa-client-install with --keytab option should reinit/repair the client configuration if the keytab is correct regardless of the current state of the client.

Comment 1 Martin Kosek 2013-03-12 14:14:15 UTC
Fixed upstream:
master: https://fedorahosted.org/freeipa/changeset/a38d93f65f87db1a0b9c34eb0ba1b6d9dca9e060

Comment 4 Kaleem 2013-12-27 08:03:31 UTC
Verified.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 

-[RPMs & OS: [RHEL-7.0-20131222.0 - x86_64]-
|       ipa-admintools-3.3.3-6.el7.x86_64
|       ipa-client-3.3.3-6.el7.x86_64
|       ipa-server-3.3.3-6.el7.x86_64
|       sssd-ipa-1.11.2-15.el7.x86_64
|       svn-devel-redhat-com-repos-ipa-tests-trunk-ipa-tests-beaker-ipa-server-acceptance-ipa-integration-testing-3.0-7056.noarch
|       svn-devel-redhat-com-repos-ipa-tests-trunk-ipa-tests-beaker-ipa-server-shared-3.5-7189.noarch

-------------------------------------------------------------------------
:: [   PASS   ]   ipa-integration-testing-startup: installing ipa-tests and other required packages
:: [   PASS   ]   ipa-integration-testing-master: test_client_reenrollment_py
:: [   PASS   ]   ipatests-test_integration-test_forced_client_reenrollment-TestForcedClientReenrollment: Forced client re-enrollment
:: [   PASS   ]   ipatests-test_integration-test_forced_client_reenrollment-TestForcedClientReenrollment-test_reenroll_with_force_join: Client re-enrollment using admin credentials (--force-join)
:: [   PASS   ]   ipatests-test_integration-test_forced_client_reenrollment-TestForcedClientReenrollment-test_reenroll_with_keytab: Client re-enrollment using keytab
:: [   PASS   ]   ipatests-test_integration-test_forced_client_reenrollment-TestForcedClientReenrollment-test_reenroll_with_both_force_join_and_keytab: Client re-enrollment using both --force-join and --keytab options
:: [   PASS   ]   ipatests-test_integration-test_forced_client_reenrollment-TestForcedClientReenrollment-test_reenroll_to_replica: Client re-enrollment using keytab, to a replica
:: [   PASS   ]   ipatests-test_integration-test_forced_client_reenrollment-TestForcedClientReenrollment-test_try_to_reenroll_with_disabled_host: Client re-enrollment using keytab, with disabled host
:: [   PASS   ]   ipatests-test_integration-test_forced_client_reenrollment-TestForcedClientReenrollment-test_try_to_reenroll_with_uninstalled_host: Client re-enrollment using keytab, with uninstalled host
:: [   PASS   ]   ipatests-test_integration-test_forced_client_reenrollment-TestForcedClientReenrollment-test_try_to_reenroll_with_deleted_host: Client re-enrollment using keytab, with deleted host
:: [   PASS   ]   ipatests-test_integration-test_forced_client_reenrollment-TestForcedClientReenrollment-test_try_to_reenroll_with_incorrect_keytab: Client re-enrollment using keytab, with incorrect keytab file
:: [   PASS   ]   ipa-integration-testing-cleanup: Destroying admin credentials.
:: [   PASS   ]   /CoreOS/ipa-server/rhel70-ipa/acceptance/ipa-integration-testing

 +----------------------------------------------------------------------+
                    Fail / unfinished / ABORT [ Fail(0/13): 0% ]
 +----------------------------------------------------------------------+

Comment 5 Ludek Smid 2014-06-13 11:39:17 UTC
This request was resolved in Red Hat Enterprise Linux 7.0.

Contact your manager or support representative in case you have further questions about the request.


Note You need to log in before you can comment on or make changes to this bug.