Description of problem: My understanding of the token (bearer) based auth is that the token is complete information of the users identity, therefore specifying the user_id is not required for authenticating. The user thus should not be required to fill the userid field when bearer auth is used. However if the userid is not present in the POST request, the token seems not to get filled and the container provider is therefore not able to connect the target. curl -k -XPOST -d@- https://localhost/api/providers/ -u admin:smartvm <<EOF { "name":"openshift-ansible-deployment_two-stack", "port":"8443", "hostname":"10.X.Y.Z", "zone_id":1, "type":"ManageIQ::Providers::Openshift::ContainerManager", "tenant_id":1, "credentials": [{ "auth_type": "bearer", "userid": "not important", "auth_key": "...important.." }] } EOF Version-Release number of selected component (if applicable): API: "name":"API","description":"REST API","version":"2.1.0" EVM: capablanca-1-rc2.20151120090704_2d0a131 How reproducible: always Steps to Reproduce: 1. Do the curling Actual results: userid requried in order for the token (auth_key) to be accepted (filled) No error about redundant field specified. Expected results: userid not required. maybe an error about a redundant field Additional info:
Clarified doc text; changed made in 4.0 release notes.
Reopening issue,...not sure why it was closed.
PR: https://github.com/ManageIQ/manageiq/pull/5578
Tim, shouldn't this be at least in POST? Or even better MODIFIED? The PR is merged.
curl -k -XPOST -d@- https://localhost/api/providers/ -u admin:smartvm <<EOF { "name":"openshift-ansible-deployment_two-stack", "port":"8443", "hostname":"10.X.Y.Z", "zone_id":1, "type":"ManageIQ::Providers::Openshift::ContainerManager", "tenant_id":1, "credentials": [{ "auth_type": "bearer", "userid": "not important", "auth_key": "the key" }] } > > EOF {"results":[{"id":1,"name":"openshift-ansible-deployment_two-stack","created_on":"2016-04-26T08:57:34Z","updated_on":"2016-04-26T08:57:34Z","guid":"eae89684-0b8c-11e6-8446-fa163efedd11","zone_id":1,"type":"ManageIQ::Providers::Openshift::ContainerManager","tenant_id":1}]}
It appears that this bug should no longer be documented as a known issue. Removing doc text and resetting requires_doc_text flag.
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/RHBA-2016:1348