Bug 1468461 - SDK-Ruby: Support 'error' field in JSON SSO response
SDK-Ruby: Support 'error' field in JSON SSO response
Product: ovirt-engine-sdk-ruby
Classification: oVirt
Component: Core (Show other bugs)
Unspecified Unspecified
unspecified Severity medium (vote)
: ovirt-4.2.0
: ---
Assigned To: Juan Hernández
Radim Hrazdil
Depends On:
  Show dependency treegraph
Reported: 2017-07-07 03:37 EDT by Ondra Machacek
Modified: 2017-12-20 05:50 EST (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2017-12-20 05:50:12 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: Infra
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---
rule-engine: ovirt‑4.2+

Attachments (Terms of Use)

External Trackers
Tracker ID Priority Status Summary Last Updated
oVirt gerrit 82057 master MERGED Support OAuth and OpenID 2017-09-20 14:09 EDT

  None (edit)
Description Ondra Machacek 2017-07-07 03:37:33 EDT
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 14:18:25 EDT
Targeting to 4.2. 
Do we need it also on 4.1.z?
Comment 2 Juan Hernández 2017-09-20 10:37:39 EDT
(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

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

  aaa: SDK requires error and error_code

That means that this change in the SDK doesn't need to be backported.
Comment 3 Radim Hrazdil 2017-12-19 10:13:57 EST
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.."}

Comment 4 Radim Hrazdil 2017-12-19 10:22:02 EST
Clearing needinfo flag, as it was added by mistake.
Comment 5 Sandro Bonazzola 2017-12-20 05:50:12 EST
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.