Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 1168916 - Extend host-show to add the view attribute in set of default attributes
Extend host-show to add the view attribute in set of default attributes
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: ipa (Show other bugs)
7.1
Unspecified Unspecified
medium Severity unspecified
: rc
: ---
Assigned To: IPA Maintainers
Namita Soman
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2014-11-28 07:11 EST by Steeve Goveas
Modified: 2015-03-05 05:18 EST (History)
3 users (show)

See Also:
Fixed In Version: ipa-4.1.0-11.el7
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2015-03-05 05:18:36 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2015:0442 normal SHIPPED_LIVE Moderate: ipa security, bug fix, and enhancement update 2015-03-05 09:50:39 EST

  None (edit)
Description Steeve Goveas 2014-11-28 07:11:24 EST
Description of problem:
No command shows if a view is applied to a host. host-show can be extended to add the view attribute in set of default attributes to make it visible.

Version-Release number of selected component (if applicable):
ipa-server-4.1.0-10.el7.x86_64

Steps to Reproduce:
1. Add trust
2. create and view and apply it to a host

Actual results:

None of the below commands show if a view is applied
[root@ibm-x3620m3-01 ~]# ipa idview-apply hostview --hosts gizmo.steeve2011.test
--------------------------
Applied ID View "hostview"
--------------------------
  hosts: gizmo.steeve2011.test
---------------------------------------------
Number of hosts the ID View was applied to: 1
---------------------------------------------

[root@ibm-x3620m3-01 ~]# ipa idview-show hostview
  ID View Name: hostview
  User object overrides: aduser2@adtest.qe

[root@ibm-x3620m3-01 ~]# ipa idview-find
------------------
2 ID Views matched
------------------
  ID View Name: Default Trust View
  Description: Default Trust View for AD users. Should not be deleted.

  ID View Name: hostview
----------------------------
Number of entries returned 2
----------------------------

[root@ibm-x3620m3-01 ~]# ipa host-show gizmo.steeve2011.test
  Host name: gizmo.steeve2011.test
  Principal name: host/gizmo.steeve2011.test@STEEVE2011.TEST
  Password: False
  Keytab: True
  Managed by: gizmo.steeve2011.test
  SSH public key fingerprint: A2:7B:EA:56:2E:B7:0D:26:5E:12:66:51:37:5C:1E:49 (ssh-rsa), 2A:49:8A:4C:82:2D:98:7A:EA:6D:13:99:B2:EB:97:71 (ssh-ed25519), 79:C2:74:85:CE:1C:EE:34:22:C9:57:AE:C6:2A:36:3B (ecdsa-
                              sha2-nistp256)

[root@ibm-x3620m3-01 ~]# ipa idoverrideuser-show hostview aduser2@adtest.qe
  Anchor to override: aduser2@adtest.qe
  User login: user1
  UID: 7777


Expected results:


Additional info:
Comment 2 Petr Vobornik 2014-11-28 07:29:40 EST
Actually there are two commands.

first:
   ipa idview-show viewname --show-hosts

or 
   ipa host-show host.name --all

The latter has in output:
   <ipaassignedidview>: cn=viewname,cn=views,cn=accounts,dc=example,dc=com
Which is suboptimal.

That said, this bug is still valid. The latter output should be normalized(show view name instead of dn), given a label and added to default attributes.
Comment 3 Petr Vobornik 2014-11-28 07:35:28 EST
Upstream ticket:
https://fedorahosted.org/freeipa/ticket/4774
Comment 4 Steeve Goveas 2014-11-28 07:47:13 EST
(In reply to Petr Vobornik from comment #2)
> Actually there are two commands.
> 
> first:
>    ipa idview-show viewname --show-hosts
> 
> or 
>    ipa host-show host.name --all
> 
> The latter has in output:
>    <ipaassignedidview>: cn=viewname,cn=views,cn=accounts,dc=example,dc=com
> Which is suboptimal.
> 
> That said, this bug is still valid. The latter output should be
> normalized(show view name instead of dn), given a label and added to default
> attributes.

Yes, both commands work. Thanks
Comment 7 Steeve Goveas 2015-01-27 08:01:45 EST
Verified in version
[root@vm-idm-019 ~]# rpm -q ipa-server 
ipa-server-4.1.0-16.el7.x86_64

[root@vm-idm-019 ~]# ipa idview-apply hostview --hosts bumblebee.ipaviews.test
--------------------------
Applied ID View "hostview"
--------------------------
  hosts: bumblebee.ipaviews.test
---------------------------------------------
Number of hosts the ID View was applied to: 1
---------------------------------------------


[root@vm-idm-019 ~]# ipa host-show bumblebee.ipaviews.test
  Host name: bumblebee.ipaviews.test
  Principal name: host/bumblebee.ipaviews.test@IPAVIEWS.TEST
  Assigned ID View: hostview
  Password: False
  Keytab: True
  Managed by: bumblebee.ipaviews.test
  SSH public key fingerprint: 64:A3:BB:B4:B8:C6:F3:37:A2:28:61:77:9A:80:2D:05 (ssh-ed25519), 56:E2:01:AC:C4:CC:3B:66:98:AA:DD:9F:EB:C4:81:C7 (ssh-
                              rsa), 9E:CF:7E:F6:46:F9:71:08:05:22:BE:13:E4:58:F1:8F (ecdsa-sha2-nistp256)
Comment 9 errata-xmlrpc 2015-03-05 05:18:36 EST
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://rhn.redhat.com/errata/RHSA-2015-0442.html

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