You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@karaf.apache.org by "Ankit Dangi (JIRA)" <ji...@apache.org> on 2017/08/08 21:25:00 UTC

[jira] [Created] (KARAF-5297) Cave proxy repository that requires authentication

Ankit Dangi created KARAF-5297:
----------------------------------

             Summary: Cave proxy repository that requires authentication
                 Key: KARAF-5297
                 URL: https://issues.apache.org/jira/browse/KARAF-5297
             Project: Karaf
          Issue Type: Improvement
          Components: cave-repository
    Affects Versions: 4.1.1
         Environment: macOS Sierra 10.12.6, Karaf 4.1.1
            Reporter: Ankit Dangi


Let's say, we're proxying an external repository in Karaf Cave to use as an OBR: 
{{karaf@root()> cave:repository-proxy my-repository http://[maven_repository_url] }}

If this external [maven_repository_url] requires authentication in the HTTP mode (and not HTTPS), then the error is: {{"Error executing command: Server returned HTTP response code: 401 for URL: [maven_repository_url]"}}. 

Improvement: Requesting an appropriate option (like "{{--filter}}") for {{cave:repository-proxy}} support for proxying a repository that requires authentication. 

Changes would mostly be at these locations: 
1. {{karaf-cave/server/command/src/.../RepositoryProxyCommand.java}} [Link: [http://bit.ly/2fqUbgD]]
2. {{karaf-cave/server/storage/src/.../CaveRepositoryImpl.java}}, Update method: {{proxyHttp(...)}} [Link: [http://bit.ly/2wrwQiS]]

Also, in 2 above, replace the deprecated {{DefaultHttpClient}} with {{HttpClientBuilder}}. 

However, if the {{proxy(...)}} parameters are changed, then, it may require changes at other places, such as:
i. {{karaf-cave/server/api/src/.../CaveRepository.java}}, Overload method: {{proxy(...)}} [Link: [http://bit.ly/2vh6bXa]]
ii. {{karaf-cave/server/storage/src/.../CaveRepositoryImpl.java}}, Overload method: {{proxy(...)}} [Link: [http://bit.ly/2uDu2Nt]]
iii. {{karaf-cave/server/management/src/.../CaveRepositoryMBean.java}} [Link: [http://bit.ly/2uDxUy2]]
iv. {{karaf-cave/server/management/src/.../CaveRepositoryMBeanImpl.java}} [Link: [http://bit.ly/2wFG2zj]]
v. {{karaf-cave/manual/src/.../administrate-cave.conf}} [Link: [http://bit.ly/2wr4SDX]]

Any other places? Search: [http://bit.ly/2fr4qkQ].



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)