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 1364310 - ipa otptoken-add bytes object has no attribute confirm
Summary: ipa otptoken-add bytes object has no attribute confirm
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: ipa
Version: 7.3
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: IPA Maintainers
QA Contact: Kaleem
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-08-05 03:06 UTC by Scott Poore
Modified: 2016-11-04 06:00 UTC (History)
4 users (show)

Fixed In Version: ipa-4.4.0-6.el7
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-11-04 06:00:23 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2016:2404 0 normal SHIPPED_LIVE ipa bug fix and enhancement update 2016-11-03 13:56:18 UTC

Description Scott Poore 2016-08-05 03:06:42 UTC
Description of problem:

[root@rhel7-1 ~]# ipa otptoken-add --type=hotp --key --no-qrcode
ipa: ERROR: AttributeError: 'Bytes' object has no attribute 'confirm'
Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/ipalib/cli.py", line 1350, in run
    sys.exit(api.Backend.cli.run(argv))
  File "/usr/lib/python2.7/site-packages/ipalib/cli.py", line 1108, in run
    kw = self.process_keyword_arguments(cmd, kw)
  File "/usr/lib/python2.7/site-packages/ipalib/cli.py", line 1088, in process_keyword_arguments
    self.prompt_interactively(cmd, kw)
  File "/usr/lib/python2.7/site-packages/ipalib/cli.py", line 1269, in prompt_interactively
    param.label, param.confirm
AttributeError: 'Bytes' object has no attribute 'confirm'
ipa: ERROR: an internal error has occurred

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

How reproducible:
always


Steps to Reproduce:
1.  ipa-server-install
2.  ipa user-add testuser --password
3.  kinit testuser
4.  ipa otptoken-add --type=hotp --key --no-qrcode


Actual results:

failure above

Expected results:

no failure

Additional info:

Comment 3 Jan Cholasta 2016-08-05 07:27:10 UTC
Upstream ticket:
https://fedorahosted.org/freeipa/ticket/6174

Comment 4 David Kupka 2016-08-10 06:56:35 UTC
Fixed upstream
master:
https://fedorahosted.org/freeipa/changeset/e9c1d21b9fec17ab13894885eb1238631ecc43e5

Comment 6 Scott Poore 2016-08-10 14:38:17 UTC
Verified.

Version ::

ipa-server-4.4.0-7.el7.x86_64


Results ::

First confirmed failure on runnning IPA server running ipa-server-4.4.0-5.el7.x86_64.

[root@rhel7-1 ~]# ipa otptoken-add --type=hotp --key --no-qrcode
ipa: ERROR: AttributeError: 'Bytes' object has no attribute 'confirm'
Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/ipalib/cli.py", line 1350, in run
    sys.exit(api.Backend.cli.run(argv))
  File "/usr/lib/python2.7/site-packages/ipalib/cli.py", line 1108, in run
    kw = self.process_keyword_arguments(cmd, kw)
  File "/usr/lib/python2.7/site-packages/ipalib/cli.py", line 1088, in process_keyword_arguments
    self.prompt_interactively(cmd, kw)
  File "/usr/lib/python2.7/site-packages/ipalib/cli.py", line 1269, in prompt_interactively
    param.label, param.confirm
AttributeError: 'Bytes' object has no attribute 'confirm'
ipa: ERROR: an internal error has occurred


Then updated IPA.

[root@rhel7-1 ~]# yum update ipa-server-dns
Loaded plugins: product-id, search-disabled-repos, subscription-manager
This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
Resolving Dependencies
...
Updated:
  ipa-server-dns.noarch 0:4.4.0-7.el7                                                                  

Dependency Updated:
  ipa-admintools.noarch 0:4.4.0-7.el7                ipa-client.x86_64 0:4.4.0-7.el7                   
  ipa-client-common.noarch 0:4.4.0-7.el7             ipa-common.noarch 0:4.4.0-7.el7                   
  ipa-server.x86_64 0:4.4.0-7.el7                    ipa-server-common.noarch 0:4.4.0-7.el7            
  python2-ipaclient.noarch 0:4.4.0-7.el7             python2-ipalib.noarch 0:4.4.0-7.el7               
  python2-ipaserver.noarch 0:4.4.0-7.el7            

Complete!



Then check:


[root@rhel7-1 ~]# ipa otptoken-add --type=hotp --key --no-qrcode
Key: 
ipa: ERROR: Could not get Key interactively

[root@rhel7-1 ~]# yes GEZDGNBVGY3TQOJQGEZDGNBVGY3TQOJQ | ipa otptoken-add --type=hotp --key --no-qrcode
------------------
Added OTP token ""
------------------
  Unique ID: bdb10e66-3a31-4a60-a9ae-1e50542ab88a
  Type: HOTP
  Owner: ipauser
  Manager: ipauser
  Algorithm: sha1
  Digits: 6
  URI: otpauth://hotp/ipauser:bdb10e66-3a31-4a60-a9ae-1e50542ab88a?digits=6&secret=DBDEGGGQKUMY3U2A4JIBQRSDDDIFKGMN2NAOEUA%3D&counter=0&algorithm=SHA1&issuer=ipauser%40EXAMPLE.COM

Comment 8 errata-xmlrpc 2016-11-04 06:00:23 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/RHBA-2016-2404.html


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