Bug 1402051

Summary: Infoblox authentication errors do not propagate into WebUI/CLI/API
Product: Red Hat Satellite Reporter: Renzo Nuccitelli <rnuccite>
Component: DHCP & DNSAssignee: Lukas Zapletal <lzap>
Status: CLOSED WONTFIX QA Contact:
Severity: low Docs Contact:
Priority: medium    
Version: 6.3.0CC: bkearney, dmitri, jcallaha
Target Milestone: UnspecifiedKeywords: Triaged
Target Release: Unused   
Hardware: Unspecified   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-08-02 20:57:28 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Bug Depends On:    
Bug Blocks: 1402685    
Attachments:
Description Flags
delete error msg
none
save error msg
none
delete error msg none

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.