Bug 1364310 - ipa otptoken-add bytes object has no attribute confirm
Summary: ipa otptoken-add bytes object has no attribute confirm
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:
Keywords: Regression
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)

(edit)
Clone Of:
(edit)
Last Closed: 2016-11-04 06:00:23 UTC


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2016:2404 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@EXAMPLE.COM: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.