Bug 1621888

Summary: Cannot add Ansible Tower through API if using self signed cert
Product: Red Hat CloudForms Management Engine Reporter: David Luong <dluong>
Component: APIAssignee: Joe Vlcek <jvlcek>
Status: CLOSED ERRATA QA Contact: Parthvi Vala <pvala>
Severity: medium Docs Contact:
Priority: medium    
Version: 5.9.3CC: dluong, dmetzger, jvlcek, obarenbo, pvala, simaishi, smallamp
Target Milestone: GA   
Target Release: 5.10.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: 5.10.0.7 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-02-07 23:03:43 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: Bug
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: CFME Core Target Upstream Version:
Embargoed:

Description David Luong 2018-08-23 19:27:52 UTC
Description of problem:
Cannot add Ansible Tower through API if using self signed cert

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

How reproducible:
Always

Steps to Reproduce:
1.  Attempt to add ansible tower provider to cloudforms through API
2.
3.

Actual results:
Fails, or if added, is invald

Expected results:
Add successfully

Additional info:
Robb Manes found this PR upstream that fixes this problem:
https://github.com/ManageIQ/manageiq-api/pull/431

Comment 5 Joe Vlcek 2018-09-19 14:59:55 UTC
The target release is 5.10. 

PR https://github.com/ManageIQ/manageiq-api/pull/431 is in the 5.10 build
so this BZ is fixed in 5.10. Marking POST.

JoeV

Comment 6 Parthvi Vala 2018-11-13 07:46:23 UTC
FIXED. Verified on 5.10.0.23.20181106165157_92dd189.

Request: POST https://<ip_address>/api/providers?provider_class=provider
Query: {
  "type": "ManageIQ::Providers::AnsibleTower::Provider",
  "url": "<url>",
  "name": "API test",
  "verify_ssl": "false",
  "credentials": {
    "userid": "<userid>",
    "password": "<password>"
  }
}
Response: {
	"results": [
		{
			"href": "https://<ip_address>/api/providers/5?provider_class=provider",
			"id": "5",
			"type": "ManageIQ::Providers::AnsibleTower::Provider",
			"name": "API test",
			"guid": null,
			"zone_id": "1",
			"created_at": "2018-11-13T07:41:25Z",
			"updated_at": "2018-11-13T07:41:25Z",
			"tenant_id": "1"
		}
	]
}

And I checked on the UI, the provider status is Valid and `Verify Peer Certificate` is marked unchecked on the `Edit Provider` page.

Comment 7 errata-xmlrpc 2019-02-07 23:03:43 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2019:0212