Bug 1449523 - Provide an API command to retrieve PKINIT status in the FreeIPA topology
Summary: Provide an API command to retrieve PKINIT status in the FreeIPA topology
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: ipa
Version: 7.4
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: IPA Maintainers
QA Contact: Scott Poore
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-05-10 08:31 UTC by Petr Vobornik
Modified: 2017-08-01 09:50 UTC (History)
5 users (show)

Fixed In Version: ipa-4.5.0-14.el7
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-08-01 09:50:15 UTC
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2017:2304 normal SHIPPED_LIVE ipa bug fix and enhancement update 2017-08-01 12:41:35 UTC

Description Petr Vobornik 2017-05-10 08:31:25 UTC
Cloned from upstream: https://pagure.io/freeipa/issue/6937

In mixed FreeIPA topologies (pre 4.5 and 4.5 masters) it may be useful to have a tool reporting masters which have PKINIT enabled. This could greatly simplify troubleshooting in cases when some of the clients attempt to request TGT via PKINIT and fail (maybe due to resolving a old KDC that does not understand PKINIT yet).

Since PKINIT is an attribute of KDC shared by multiple masters, we may reuse the Server-Roles API (after slight modifications) to report PKINIT status based on pkinitEnabled value set on KDC entry's ipaConfigString. This can be reported in ipaconfig and we can also provide a dedicated `ipa pkinit-status` command to retrieve this info.

Comment 2 Petr Vobornik 2017-05-10 08:31:40 UTC
Upstream ticket:
https://pagure.io/freeipa/issue/6937

Comment 5 Scott Poore 2017-06-06 18:31:53 UTC
Verified.

Version ::

ipa-server-4.5.0-14.el7.x86_64

Results ::

[root@vm1 ~]# ipa help pkinit
Kerberos PKINIT feature status reporting tools.

Report IPA masters on which Kerberos PKINIT is enabled or disabled

EXAMPLES:
 List PKINIT status on all masters:
   ipa pkinit-status

 Check PKINIT status on `ipa.example.com`:
   ipa pkinit-status --server ipa.example.com

 List all IPA masters with disabled PKINIT:
   ipa pkinit-status --status='disabled'

For more info about PKINIT support see:

https://www.freeipa.org/page/V4/Kerberos_PKINIT

Topic commands:
  pkinit-status  Report PKINIT status on the IPA masters

To get command help, use:
  ipa <command> --help



### ON IPA Master with no replicas:

[root@vm1 ~]# ipa pkinit-status
----------------
1 server matched
----------------
  Server name: vm1.example.test
  PKINIT status: enabled
----------------------------
Number of entries returned 1
----------------------------

### ON IPA Master with replica installed with --no-pkinit

[root@vm1 ~]# ipa pkinit-status
-----------------
2 servers matched
-----------------
  Server name: vm1.example.test
  PKINIT status: enabled

  Server name: vm2.example.test
  PKINIT status: disabled
----------------------------
Number of entries returned 2
----------------------------

### Various other filter/search options:

[root@vm1 ~]# ipa pkinit-status --server vm1.example.test
----------------
1 server matched
----------------
  Server name: vm1.example.test
  PKINIT status: enabled
----------------------------
Number of entries returned 1
----------------------------

[root@vm1 ~]# ipa pkinit-status --server vm2.example.test
----------------
1 server matched
----------------
  Server name: vm2.example.test
  PKINIT status: disabled
----------------------------
Number of entries returned 1
----------------------------

[root@vm1 ~]# ipa pkinit-status --status='disabled'
----------------
1 server matched
----------------
  Server name: vm2.example.test
  PKINIT status: disabled
----------------------------
Number of entries returned 1
----------------------------

[root@vm1 ~]# ipa pkinit-status --status='enabled'
----------------
1 server matched
----------------
  Server name: vm1.example.test
  PKINIT status: enabled
----------------------------
Number of entries returned 1
----------------------------

[root@vm1 ~]# ipa pkinit-status --status='enabled' --raw
----------------
1 server matched
----------------
  server_server: vm1.example.test
  status: enabled
----------------------------
Number of entries returned 1
----------------------------

### ipa config-show:

[root@vm1 ~]# ipa config-show|grep -i pkinit
  IPA master capable of PKINIT: vm1.example.test

Comment 6 errata-xmlrpc 2017-08-01 09:50:15 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2017:2304


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