You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Sending a content-type with a charset specified in requests to docker prevent correct interactions with authorization plugins present on the daemon.
#945
Open
nathanburrell opened this issue
Feb 15, 2018
· 2 comments
Due to a bug 36317 with docker in how it chooses whether or not to forward bodies of requests to authorization plugins, the maven plugin cannot make any successful requests if the docker daemon uses the body in any authorization plugins present.
Docker will most likely fix this in a newer version, however as this plugin seems to be compatible with older docker daemons, line 120 of ApacheHttpClientDelegate could be updated to just pass the content type " application/json" with no charset to allow the plugin to interact with older daemons and authorization plugins correctly.
Steps to reproduce:
Install the debug auth plugin I created to demonstrate this (it simply logs the content length, content type and the length of the body).
Use the attached pom file (changing the extension to xml due to github not allowing uploads of xml files) and run mvn clean to docker (note the content-type is simply "application/json") and note the length of the body being 0, even though the content length is correct:
Due to a bug 36317 with docker in how it chooses whether or not to forward bodies of requests to authorization plugins, the maven plugin cannot make any successful requests if the docker daemon uses the body in any authorization plugins present.
Docker will most likely fix this in a newer version, however as this plugin seems to be compatible with older docker daemons, line 120 of ApacheHttpClientDelegate could be updated to just pass the content type " application/json" with no charset to allow the plugin to interact with older daemons and authorization plugins correctly.
Steps to reproduce:
https://bitbucket.org/nburrell/authz/src/master/
pom.txt
The text was updated successfully, but these errors were encountered: