Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
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 1168916

Summary: Extend host-show to add the view attribute in set of default attributes
Product: Red Hat Enterprise Linux 7 Reporter: Steeve Goveas <sgoveas>
Component: ipaAssignee: IPA Maintainers <ipa-maint>
Status: CLOSED ERRATA QA Contact: Namita Soman <nsoman>
Severity: unspecified Docs Contact:
Priority: medium    
Version: 7.1CC: mkosek, pvoborni, rcritten
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
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 10:18:36 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Steeve Goveas 2014-11-28 12:11:24 UTC
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

[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
  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
  Anchor to override: aduser2
  User login: user1
  UID: 7777


Expected results:


Additional info:

Comment 2 Petr Vobornik 2014-11-28 12:29:40 UTC
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 12:35:28 UTC
Upstream ticket:
https://fedorahosted.org/freeipa/ticket/4774

Comment 4 Steeve Goveas 2014-11-28 12:47:13 UTC
(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 13:01:45 UTC
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
  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 10:18:36 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://rhn.redhat.com/errata/RHSA-2015-0442.html