You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2020/06/24 17:34:06 UTC

[GitHub] [pulsar] jcordeiro opened a new issue #7354: Support basic-authentication in function jar urls when registering/updating functions via REST API

jcordeiro opened a new issue #7354:
URL: https://github.com/apache/pulsar/issues/7354


   **Is your feature request related to a problem? Please describe.**
   
   When registering or updating a function via the REST API using a jar url that has the `user:pass` basic auth scheme is unsupported.
   
   Currently when a jar url with basic-auth credentials is used an error like the following is returned and the register/update call to the REST API returns a `400 - Bad Request`
   
   `Bad Request - {"reason":"Encountered error \"Server returned HTTP response code: 401 for URL: <JAR_URL_HERE>" when getting Function package from <JAR_URL_HERE>"}`
   
   **Describe the solution you'd like**
   The basic-auth credentials in the jar url should be forwarded along to the destination url and used to download the function jar
   
   **Describe alternatives you've considered**
   The only alternative is to manually hit the jar url and download the jar to the server where the application that's hitting the API is running and using the `file://` url type. Though, this approach won't work in many cases and is why the remote jar url option is provided.
   
   **Additional context**
   Hitting the same jar url with basic-auth credentials in a browser prompts a download of the jar, so the url is valid.
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org