Bug 1363756

Summary: Increase length of passwords generated by installer
Product: Red Hat Enterprise Linux 7 Reporter: Martin Bašti <mbasti>
Component: ipaAssignee: IPA Maintainers <ipa-maint>
Status: CLOSED ERRATA QA Contact: Kaleem <ksiddiqu>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 7.3CC: mbasti, pvoborni, rcritten
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: ipa-4.4.0-5.el7 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-11-04 06:00:06 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Description Martin Bašti 2016-08-03 13:35:17 UTC
This bug is created as a clone of upstream ticket:
https://fedorahosted.org/freeipa/ticket/6116

Currently with default settings, generated password is 12 characters long, in current character set it gives entropy between 64bits and 80bits.

This entropy should be at least 128bits to feel safe nowadays, so default settings of password length should be 22. (https://en.wikipedia.org/wiki/Password_strength)

Applicable to:
* kerberos master password
* KRA
* NSSDB passwords
* temporary passwords during installation


Also we should keep 12 characters long password for temporary user and host passwords, to not force users rewrite super long passwords.

Comment 1 Martin Bašti 2016-08-03 13:35:46 UTC
Fixed upstream
master:
https://fedorahosted.org/freeipa/changeset/51ccde25f7ec0d5309c52b5349992652c7e17a01

Comment 3 Kaleem 2016-08-29 09:41:15 UTC
Please provide steps to verify this.

Comment 4 Martin Bašti 2016-08-29 10:40:11 UTC
Random generated passwords host-add, user-add, stageuser-add with --random must provide password with length 12

Other passwords are temporal or SHA hashed, so I don't think that there is easy way to detect how long password were generated without extra debug logging.

Comment 5 Kaleem 2016-09-09 13:59:54 UTC
(In reply to Martin Bašti from comment #4)
> Random generated passwords host-add, user-add, stageuser-add with --random
> must provide password with length 12
^ This will be sufficient to verify the bug?
> 
> Other passwords are temporal or SHA hashed, so I don't think that there is
> easy way to detect how long password were generated without extra debug
> logging.

Comment 6 Martin Bašti 2016-09-13 08:49:07 UTC
IMO yes, unless you want to run python debugger and see how temporal password looks like

Comment 7 Kaleem 2016-09-15 09:51:50 UTC
Verified.

IPA Version:
============
[root@dhcp207-129 ~]# rpm -q ipa-server
ipa-server-4.4.0-11.el7.x86_64
[root@dhcp207-129 ~]# 

[root@dhcp207-129 ~]# ipa host-add dhcp207-130.testrelm.test --random --force
--------------------------------------
Added host "dhcp207-130.testrelm.test"
--------------------------------------
  Host name: dhcp207-130.testrelm.test
  Random password: eoiwEII6,8k.
  Password: True
[root@dhcp207-129 ~]# 
[root@dhcp207-129 ~]# ipa user-add --first=test --last=user1 testuser1 --random
----------------------
Added user "testuser1"
----------------------
...
  Email address: testuser1@testrelm.test
  Random password: k86_2VlumeWQ
  UID: 1897400001
...
[root@dhcp207-129 ~]# ipa stageuser-add --first=stage --last=user1 stageuser1 --random
-----------------------------
Added stage user "stageuser1"
-----------------------------
...
  Password: e1NTSEF9VXZTM3pINnY1TUZwWFJiNnZiU21NNDhuVVY5Zm1rVmdkUWtUUnc9PQ==
  Random password: ex2-WcGM5B@d
  UID: -1
...
[root@dhcp207-129 ~]#

Comment 9 errata-xmlrpc 2016-11-04 06:00:06 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