Bug 1594994 - Text boxes to enter the Web admin UI credentials are much longer than necessary. [NEEDINFO]
Summary: Text boxes to enter the Web admin UI credentials are much longer than necessary.
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Gluster Storage
Classification: Red Hat Storage
Component: web-admin-tendrl-ui
Version: rhgs-3.4
Hardware: All
OS: All
medium
medium
Target Milestone: ---
: RHGS 3.4.0
Assignee: Neha Gupta
QA Contact: Elena Bondarenko
URL:
Whiteboard:
Depends On:
Blocks: 1503137
TreeView+ depends on / blocked
 
Reported: 2018-06-26 00:12 UTC by Anand Paladugu
Modified: 2021-11-05 16:58 UTC (History)
8 users (show)

Fixed In Version: tendrl-ui-1.6.3-10.el7rhgs.noarch
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-09-04 07:07:57 UTC
Embargoed:
mbukatov: needinfo?


Attachments (Terms of Use)
Login screen (95.44 KB, image/png)
2018-06-26 00:12 UTC, Anand Paladugu
no flags Details
modified login view (96.79 KB, image/png)
2018-07-04 11:07 UTC, Neha Gupta
no flags Details
Add User: user ID too short error (10.82 KB, image/png)
2018-07-20 12:34 UTC, Daniel Horák
no flags Details
Add User: user ID too long error (8.92 KB, image/png)
2018-07-20 12:34 UTC, Daniel Horák
no flags Details
Login page screen - the error message is wrapped even when the page is wide (202.51 KB, image/png)
2018-07-31 07:57 UTC, Daniel Horák
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Github Tendrl ui issues 1013 0 None None None 2018-07-12 07:25:39 UTC
Github Tendrl ui pull 1036 0 None None None 2018-08-13 03:40:31 UTC
Red Hat Bugzilla 1607868 0 unspecified CLOSED Text boxes on "Add User" or "Edit User" pages are are much longer than necessary. 2021-02-22 00:41:40 UTC
Red Hat Bugzilla 1610266 0 unspecified CLOSED Inconsistent password length requirements 2021-02-22 00:41:40 UTC
Red Hat Bugzilla 1610913 1 None None None 2021-01-20 06:05:38 UTC
Red Hat Bugzilla 1610947 1 None None None 2021-01-20 06:05:38 UTC
Red Hat Product Errata RHSA-2018:2616 0 None None None 2018-09-04 07:08:46 UTC

Internal Links: 1607868 1610266 1610913 1610947

Description Anand Paladugu 2018-06-26 00:12:03 UTC
Created attachment 1454518 [details]
Login screen

Description of problem: Text boxes to enter the Web admin UI credentials are much longer than necessary. Screen shot it attached. While it's not causing any functional issue, it does reflect negatively on the design.


Version-Release number of selected component (if applicable): 3.4 (Sandbox environment)


How reproducible: Always 


Steps to Reproduce:
1. Open the web admin UI and check the login screen credentials text boxes.
2.
3.

Actual results:


Expected results:


Additional info:

Comment 2 Nishanth Thomas 2018-06-27 11:07:33 UTC
Neha, as discussed, please verify the text box sizes with the standard patternfly design and update

Comment 3 Neha Gupta 2018-06-28 04:17:10 UTC
@julim I am not able to find any recommendation for text box sizes on the patternfly library documentation (http://www.patternfly.org/pattern-library/forms-and-controls/data-input/#text-entry). Can you please suggest what should be the text box size here on login page.

Comment 4 Ju Lim 2018-06-28 17:27:55 UTC
@negupta

Ack that PF does not provide recommendation for text box sizes and would not need to.  This should be dictated by the underlying application itself.

Per @shtripat, the tendrl-api modules supports minimum: 4 and maximum: 100 characters for the username in Tendrl.

This does seem unusually high.  Linux username limit is 32 characters   while Active Directory.  LDAP by itself doesn't place any restriction on the username, especially as LDAP doesn't really specify which attribute qualifies as the username. The DN is similarly unencumbered. However, on Active Directory, the sAMAccountName attribute only supports 20 characters.

The general best practice is that usernames should be short, and if I had to recommend anything, I'd be inclined to follow the Linux 32 characters limit (vs. 100 that is et currently in Tendrl).

What level of UI validations do we do around the user, e.g. user creation or modification?

Having stated this, the text box size should be aligned with whatever our max is.  If it's 100, then indeed our text box looks to be as wide as what Tendrl is supporting.  I would not want the UI to size the text box smaller to what is currently supported in Tendrl without changing the backend to ensure full support all the way through.  IMHO, it should be a 32 char limit.

apaladug & @smukherj - Thoughts?

Comment 5 Nishanth Thomas 2018-07-03 10:11:48 UTC
Based on further discussions, decided to restrict the max username limit to 20 characters(we might support AD at some point in future)
@neha, @shirshendu please make the appropriate changes

Comment 6 Neha Gupta 2018-07-04 10:50:24 UTC
@julim Do we need to restrict max limit for login password too?

Comment 7 Neha Gupta 2018-07-04 11:07:47 UTC
Created attachment 1456486 [details]
modified login view

Comment 8 Neha Gupta 2018-07-04 11:09:37 UTC
@julim Does the above attached screenshot for modified login view looks good w.r.t to length of the text boxes and error message?

Comment 9 Martin Bukatovic 2018-07-04 14:02:33 UTC
(In reply to Nishanth Thomas from comment #5)
> Based on further discussions, decided to restrict the max username limit to
> 20 characters(we might support AD at some point in future)

Based on this, QE will verify that:

 * the text fields are smaller compared to the previous version
 * the max len of username is 20 characters
 * the max size of password is not limited to 20 characters

Comment 12 Ju Lim 2018-07-05 13:22:47 UTC
@negupta

The screenshot mentioned in Comment 7 (https://bugzilla.redhat.com/show_bug.cgi?id=1594994#c7) - showing the modified login view looks good, though I have some concerns with the error message.

Specifically, for error messages you're suggesting might be appropriate when you're creating / modifying a username.

However, since this is a login screen and there are security implications, we don't want tell users that the username is less then 20 characters long (to make it easier for someone to hack).

Instead, we would say "The username or password you entered is incorrect."

As to the max password length:
For AD, it's 255 chars.
On linux, it depends on the crypt() algorithm used:
* modified DES: 8 ASCII characters
* MD5: Unlimited length
* Blowfish: 56 bytes
* NT Hash: Please don't use this one
* SHA256/512: Unlimited length

I believe the general best practice is length should be greater than 8 and less than 128 chars.

Comment 13 Neha Gupta 2018-07-12 07:40:10 UTC
As per this comment https://bugzilla.redhat.com/show_bug.cgi?id=1594994#c12, the minimum password length should be minimum 9. Hence, modifying the minimum password length check from 8 to 9 on users add and edit views.

Comment 14 Neha Gupta 2018-07-16 12:07:39 UTC
Changes done -

- User name minimum length should be 4 and maximum 20 characters. Implemented on both login and users views.

- Password minimum length should be 9 and maximum 128 characters. Implemented on both login and users views.

- Reduced the text box size for username and password on login screen.

Comment 16 Daniel Horák 2018-07-20 12:34:25 UTC
Created attachment 1464932 [details]
Add User: user ID too short error

Comment 17 Daniel Horák 2018-07-20 12:34:50 UTC
Created attachment 1464933 [details]
Add User: user ID too long error

Comment 18 Daniel Horák 2018-07-20 12:38:50 UTC
@Neha, why is the error for too short and too long User ID on Add User form
so different? It looks quite inconsistently.
See attachment 1464932 [details] and  attachment 1464933 [details]

Also when we reduced the text box size for username and password on login
screen, wouldn't be better to reduce also the size of those fields on the
Add User page?

Comment 19 Daniel Horák 2018-07-20 12:45:58 UTC
Also on the Login page, the size of the Username and Password fields were limited, but the length of the inserted text not - wouldn't be worth to set also the "maxlength" attribute of the input element? (or something similar)

Comment 20 Neha Gupta 2018-07-24 08:42:26 UTC
@dahorak The reason for not using "maxlength" is that it restricts the user from entering any more characters beyond the max limit without showing any error message which I feel is not a good user experience. Hence, I have used "ng-maxlength" attribute which will give error message,once user clicks the login button in case it exceeds the max length mentioned.

I agree with your point of difference in behaviors for max and min user/password error message. I will do the required changes as per the patternfly recommendation(https://www.patternfly.org/pattern-library/application-framework/login-page/#client-side-errors) for error messages on login view. 

@dahorak For reducing the text box size for username and password on user's page, please create a separate issue for it.

Comment 21 Daniel Horák 2018-07-25 07:01:04 UTC
(In reply to Neha Gupta from comment #20)
> I agree with your point of difference in behaviors for max and min
> user/password error message. I will do the required changes as per the
> patternfly
> recommendation(https://www.patternfly.org/pattern-library/application-
> framework/login-page/#client-side-errors) for error messages on login view. 

Based on that moving back to ASSIGNED.

Comment 22 Daniel Horák 2018-07-31 07:57:20 UTC
Created attachment 1471714 [details]
Login page screen - the error message is wrapped  even when the page is wide

Comment 23 Daniel Horák 2018-07-31 08:00:41 UTC
I have two additional points here:

* checking for the username/password length on the login page even before the
  credentials are submitted is slightly strange behaviour (from my point of
  view, but I'm ok with that if that is the decision) - but the returned error
  should be the same as for incorrect credentials which fits into the
  length requirements:
  - if the username or password is short, the error is this:

    The username or password you entered is incorrect.

  - but if the username and password is long enough, the error looks like this:

    The username or password you entered does not match our records.
    Please try again.
 
* secondly, the error message is sometime strangely wrapped, even if the page
  is quite wide (see attachment 1471714 [details])
  - simply try to change the browser width when some of the error messages is
    displayed

Comment 24 Daniel Horák 2018-07-31 12:19:32 UTC
There is another issue closely related to this bug: Bug 1610266

Comment 25 Neha Gupta 2018-08-01 05:50:44 UTC
@dahorak The UI is not checking the username and password before clicking the "Submit" button, its just validating(checking max and min length) it. As per the Ju's comment at https://bugzilla.redhat.com/show_bug.cgi?id=1594994#c12, because of the security implications the validation error message looks like this. 

@julim what is your suggestion on this? Should we make both error messages same?

Comment 26 Daniel Horák 2018-08-01 06:12:30 UTC
Neha and Ju, what is the reason for checking min and max length of the username an password on the login page?

From my point of view, it doesn't add any additional security and moreover it make bugs like bug 1610266 much more severe, because it might lead to situation when user is not able to log in.

Comment 27 Martin Bukatovic 2018-08-01 10:55:48 UTC
(In reply to Daniel Horák from comment #26)
> Neha and Ju, what is the reason for checking min and max length of the
> username an password on the login page?

QE team is not going to validate this bug with such unsolicited, not approved
change. We clearly indicated what needs to change here in comment 9 and there
is no note about checking minimal length of anything.

Moreover as Daniel noted, this combined with other factors creates new regressions such as BZ 1610266.

Comment 28 Martin Bukatovic 2018-08-01 15:33:37 UTC
I have created separate bug to track changes done here, which are not part of
this bug: BZ 1610913

Comment 29 Neha Gupta 2018-08-02 08:19:01 UTC
As per the discussion with Nishanth, Martin and Daniel, there is no need to validate the username and password length on login view. Hence, I am reverting these validations from login view.

Comment 33 Martin Bukatovic 2018-08-13 14:25:46 UTC
Adding the ack again, QE team will verity this as described in the comment 9,
stressing out that *nothing else* has been changed here (especially there should
be no minimal password lenght check).

Comment 35 Elena Bondarenko 2018-08-15 12:36:03 UTC
Text boxes for Web admin UI credentials are of normal size now. There is no password length check during login.

Comment 37 errata-xmlrpc 2018-09-04 07:07:57 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://access.redhat.com/errata/RHSA-2018:2616


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