Bug 1402051 - Infoblox authentication errors do not propagate into WebUI/CLI/API
Summary: Infoblox authentication errors do not propagate into WebUI/CLI/API
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: DHCP & DNS
Version: 6.3.0
Hardware: Unspecified
OS: Linux
medium
low vote
Target Milestone: Unspecified
Assignee: Lukas Zapletal
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks: 1402685
TreeView+ depends on / blocked
 
Reported: 2016-12-06 16:30 UTC by Renzo Nuccitelli
Modified: 2019-08-12 16:06 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-08-02 20:57:28 UTC
Target Upstream Version:


Attachments (Terms of Use)
delete error msg (deleted)
2016-12-06 16:30 UTC, Renzo Nuccitelli
no flags Details
save error msg (34.02 KB, image/png)
2016-12-06 16:31 UTC, Renzo Nuccitelli
no flags Details
delete error msg (59.61 KB, image/jpeg)
2016-12-06 16:32 UTC, Renzo Nuccitelli
no flags Details

Description Renzo Nuccitelli 2016-12-06 16:30:55 UTC
Description of problem:

There is no message regarding Infoblox

Version-Release number of selected component (if applicable):

Upstream

How reproducible:

Always

Steps to Reproduce:
1. Create Infoblox credentials and use them to integrate through satellite installer
2. Create a new host. It's going to be available on infoblox DHCP
3. Change Infoblox account password
4. Try to delete created host. No mention to error with communication with Infoblox (check delete.jpg attached)
5. Try to create new host. No mention to error with communication with Infoblox (check save.jpg attached)


Actual results:

Generic errors presented to user

Expected results:

Should inform communications with infoblox was not possible so user has at least some clue of what is going on.

Additional info:

Test made on upstream because is not possible integrate infoblox with satellite by the time of this bug writing.

Comment 1 Renzo Nuccitelli 2016-12-06 16:31:53 UTC
Created attachment 1228624 [details]
save error msg

Comment 2 Renzo Nuccitelli 2016-12-06 16:32:37 UTC
Created attachment 1228625 [details]
delete error msg

Comment 3 Renzo Nuccitelli 2016-12-06 16:36:43 UTC
If password is changed back to original value used on installer, delete and creation work as expected.

Comment 7 Lukas Zapletal 2016-12-07 12:44:26 UTC
Thanks that's enough. It looks like the plugin uses two gems:

https://github.com/govdelivery/infoblox
https://github.com/lostisland/faraday

There is zero error handling, we need to catch the exception in the plugin

Comment 9 Dmitri Dolguikh 2016-12-21 15:09:08 UTC
Proxy's dhcp module returns all errors raised by a provider, including Infoblox' 401 errors.

Dhcp module rewrites errors, however: 401 returned by Infoblox is recast by the proxy to a generic 400 error. It would probably be easier to handle these exceptions in foreman if they were more specific (as it wouldn't require parsing of error messages). 

It looks like foreman's error message processing might have something to do with this too -- delete record error message above is a generic one, while a quick look at the source suggests that it should contain error text returned by the proxy.

Comment 10 Dmitri Dolguikh 2016-12-21 15:11:52 UTC
Here's the error I'm getting when infoblox authorization fails (it's content-type of text/html):

Error: 401 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>401 Authorization Required</title>
</head><body>
<h1>Authorization Required</h1>
<p>This server could not verify that you
are authorized to access the document
requested.  Either you supplied the wrong
credentials (e.g., bad password), or your
browser doesn't understand how to supply
the credentials required.</p>
</body></html>

D, [2016-12-21T13:36:36.469288 ] DEBUG -- : Error: 401 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>401 Authorization Required</title>
</head><body>
<h1>Authorization Required</h1>
<p>This server could not verify that you
are authorized to access the document
requested.  Either you supplied the wrong
credentials (e.g., bad password), or your
browser doesn't understand how to supply
the credentials required.</p>
</body></html>
 (Infoblox::Error)

Comment 13 Bryan Kearney 2018-08-02 20:57:28 UTC
Thank you for your interest in Satellite 6. We have evaluated this request, and we do not expect this to be implemented in the product in the forseeable future. We are therefore closing this out as WONTFIX. If you have any concerns about this, please feel free to contact Rich Jerrido or Bryan Kearney. Thank you.


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