Bug 1252085 - [RFE] Validation of username in ovirt-shell
[RFE] Validation of username in ovirt-shell
Status: CLOSED NOTABUG
Product: oVirt
Classification: Community
Component: ovirt-engine-cli (Show other bugs)
3.6
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Juan Hernández
Pavel Stehlik
infra
: Improvement
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2015-08-10 12:43 EDT by jniederm
Modified: 2015-08-17 11:20 EDT (History)
8 users (show)

See Also:
Fixed In Version:
Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2015-08-17 11:20:22 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description jniederm 2015-08-10 12:43:58 EDT
Description of problem:
Usually users first meet webadmin/userportal and then ovirt shell. Thus they can be used to think of username as of string like 'admin' (this form is show in upper right corner of webadmin and used to logging in to webadmin) rather than 'admin@internal'
I would be nice if ovirt shell can validate user name 'admin' and suggest that maybe '@domain' suffix was not entered.

Alternatively all references to "username" can be replaced by "username@domain".

Current state 'username' in context of web UIs is 'admin' and 'username' in context of ovirt-shell is 'admin@internal' may seem a bit misleading.
Comment 1 Oved Ourfali 2015-08-12 01:40:12 EDT
There might be multiple domains, and the ovirt-shell isn't aware of that.
The only thing I'd consider doing is that in case the login fails, and the username indeed doesn't have "@" in it, to add to the failed login message also the note that you might have forgotten that (added by the ovirt-shell)

However, not sure localization is supported in the ovirt-shell.
I'll give the stage to Juan to share his thoughts.
Comment 2 Juan Hernández 2015-08-17 11:20:22 EDT
The structure of the user names is completely outside the control of the CLI, thus the CLI can't make any assumption or validation of them.

The CLI doesn't support localization, and it doesn't support explicit messages when authentication fails either, it just displays the error message returned by the server, for example:

  # ovirt-shell -I -l https://.../ovirt-engine/api -u wronguser
  Password: ******
  ======= ERROR ======
  [401] - Unauthorized
  ====================

The only thing that the CLI can do is include some documentation, and we already do so:

  [oVirt shell (disconnected)]# help connect
  ...
  ARGUMENTS
     * url    - ...
     * [user] - The user to connect as. (user@domain).

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