Sean Roberts created AMBARI-24152:
-------------------------------------

             Summary: Ambari Workflow Manager (wfmanager) sends plaintext 
content when it should send json
                 Key: AMBARI-24152
                 URL: https://issues.apache.org/jira/browse/AMBARI-24152
             Project: Ambari
          Issue Type: Bug
          Components: ambari-views, contrib
    Affects Versions: 2.6.2, 2.7.0
            Reporter: Sean Roberts


The Ambari API is expected to respond with JSON content.

However the wfmanager's /resources/proxy/getCurrentUserName returns plaintext 
content.

This is breaking Knox proxying of the UI and is likely to break other 
proxies/clients who expect the API to respond with JSON.

https://github.com/apache/ambari/blob/trunk/contrib/views/wfmanager/src/main/java/org/apache/oozie/ambari/view/OozieProxyImpersonator.java#L154-L158

Full API url would be:
/api/v1/views/WORKFLOW_MANAGER/versions/1.0.0/instances/instance_name/resources/proxy/getCurrentUserName

How to reproduce:
# GET 
http://hostname:8080/api/v1/views/WORKFLOW_MANAGER/versions/1.0.0/instances/instance_name/resources/proxy/getCurrentUserName
# Notice that it responds with a username only which is plaintext not JSON.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to