Bug 1252085 - [RFE] Validation of username in ovirt-shell
Summary: [RFE] Validation of username in ovirt-shell
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: oVirt
Classification: Retired
Component: ovirt-engine-cli
Version: 3.6
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
: ---
Assignee: Juan Hernández
QA Contact: Pavel Stehlik
URL:
Whiteboard: infra
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-08-10 16:43 UTC by jniederm
Modified: 2015-08-17 15:20 UTC (History)
8 users (show)

Fixed In Version:
Doc Type: Enhancement
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-08-17 15:20:22 UTC
oVirt Team: ---
Embargoed:


Attachments (Terms of Use)

Description jniederm 2015-08-10 16:43:58 UTC
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 05:40:12 UTC
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 15:20:22 UTC
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.