Bug 1468461 - SDK-Ruby: Support 'error' field in JSON SSO response
Summary: SDK-Ruby: Support 'error' field in JSON SSO response
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: ovirt-engine-sdk-ruby
Classification: oVirt
Component: Core
Version: 4.1.6
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: ovirt-4.2.0
: ---
Assignee: Juan Hernández
QA Contact: Radim Hrazdil
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-07-07 07:37 UTC by Ondra Machacek
Modified: 2017-12-20 10:50 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-12-20 10:50:12 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 82057 0 master MERGED Support OAuth and OpenID 2017-09-20 18:09:39 UTC

Description Ondra Machacek 2017-07-07 07:37:33 UTC
OpenId Connect defines the return variable names in case of error. It requires error and error_description.

We used to use error_code instead, before, so we now need to support both 'error' and 'error_code'.

Comment 1 Oved Ourfali 2017-07-07 18:18:25 UTC
Targeting to 4.2. 
Do we need it also on 4.1.z?

Comment 2 Juan Hernández 2017-09-20 14:37:39 UTC
(In reply to Oved Ourfali from comment #1)
> Targeting to 4.2. 
> Do we need it also on 4.1.z?

The change that introduced the new behaviour in the server was not back ported to 4.1, so it only affects 4.2:

  aaa: Add OpenId support
  https://gerrit.ovirt.org/76053

In addition another patch has been merged to fix that behaviour specifically for API clients:

  aaa: SDK requires error and error_code
  https://gerrit.ovirt.org/79079

That means that this change in the SDK doesn't need to be backported.

Comment 3 Radim Hrazdil 2017-12-19 15:13:57 UTC
Verified with ruby sdk, that json response for login with invalid credentials contains both 'error' and 'error_code':
{"error_code":"access_denied","error":"Cannot authenticate user 'admin@internal': The username or password is incorrect.."}

Version 4.2.0.2-0.1.el7

Comment 4 Radim Hrazdil 2017-12-19 15:22:02 UTC
Clearing needinfo flag, as it was added by mistake.

Comment 5 Sandro Bonazzola 2017-12-20 10:50:12 UTC
This bugzilla is included in oVirt 4.2.0 release, published on Dec 20th 2017.

Since the problem described in this bug report should be
resolved in oVirt 4.2.0 release, published on Dec 20th 2017, 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.