Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1468461

Summary: SDK-Ruby: Support 'error' field in JSON SSO response
Product: [oVirt] ovirt-engine-sdk-ruby Reporter: Ondra Machacek <omachace>
Component: CoreAssignee: Juan Hernández <juan.hernandez>
Status: CLOSED CURRENTRELEASE QA Contact: Radim Hrazdil <rhrazdil>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 4.1.6CC: bugs, juan.hernandez, lsvaty, oourfali
Target Milestone: ovirt-4.2.0Flags: rule-engine: ovirt-4.2+
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-12-20 10:50:12 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: Infra RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

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.