Bug 1558525 - show proper error when authorization to api fails
Summary: show proper error when authorization to api fails
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: ovirt-engine
Classification: oVirt
Component: AAA
Version: 4.2.2
Hardware: Unspecified
OS: Unspecified
low
low
Target Milestone: ovirt-4.2.3
: ---
Assignee: Ravi Nori
QA Contact: Pavol Brilla
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-03-20 12:12 UTC by Lucie Leistnerova
Modified: 2018-05-10 06:30 UTC (History)
4 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2018-05-10 06:30:08 UTC
oVirt Team: Infra
Embargoed:
rule-engine: ovirt-4.2+


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
oVirt gerrit 89322 0 master MERGED aaa: show proper error when authorization to api fails 2018-03-26 06:59:56 UTC
oVirt gerrit 89435 0 ovirt-engine-4.2 MERGED aaa: show proper error when authorization to api fails 2018-04-02 16:11:50 UTC

Description Lucie Leistnerova 2018-03-20 12:12:55 UTC
Description of problem:
When authorization to rest api failed, error in response body contains 'null'. It shouldn't be there or some meaningful string instead.

e.g.:
Cannot authenticate user 'test@internal': The username or password is incorrect..: null
Cannot authenticate user 'test_pass@internal': Unable to log in because the password has expired. <a href='/ovirt-engine/sso/credentials-change.html'>Change the password</a> to proceed..: null

Version-Release number of selected component (if applicable):
ovirt-engine-restapi-4.2.2.4-0.1.el7.noarch

How reproducible: always


Steps to Reproduce:
1. try to connect to api with wrong password
# curl -k -u 'admin@internal:wrongpassword' -H "Prefer: persistent-auth" https://engine/ovirt-engine/api


Actual results: <html><head><title>Error</title></head><body>Cannot authenticate user 'test@internal': The username or password is incorrect..: null</body></html>


Expected results: without ': null'

Comment 1 Pavol Brilla 2018-04-19 10:59:30 UTC
null removed from answer

# yum list ovirt-engine-restapi
Loaded plugins: product-id, search-disabled-repos, versionlock
Installed Packages
ovirt-engine-restapi.noarch                         4.2.3.2-0.1.el7


<html><head><title>Error</title></head><body>access_denied: Cannot authenticate user 'admin@internal': Unable to log in. Verify your login information or contact the system administrator..</body></html>

Comment 2 Sandro Bonazzola 2018-05-10 06:30:08 UTC
This bugzilla is included in oVirt 4.2.3 release, published on May 4th 2018.

Since the problem described in this bug report should be
resolved in oVirt 4.2.3 release, it has been closed with a resolution of CURRENT RELEASE.

If the solution does not work for you, please open a new bug report.


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