AdaptiveConsulting / nexus-casc-plugin

Configuration as code plugin for Sonatype Nexus Repository Manager
MIT License
48 stars 21 forks source link

Question: Proxy Authentication Configuration #16

Closed kikyomits closed 3 years ago

kikyomits commented 3 years ago

Hi, can I ask you the way to set Authentication in Proxy configuration? I did take a look in the CasC plugin source code and Nexus source code as well and tried configurations below. But didn't work. Would you please tell me if authentication configuration is supported and the example configuration if it's supported?

Thanks.

my configuration

repository:
  repositories:
  - name: mule-enterprise-release
    online: true
    recipeName: maven2-proxy
    attributes:
      proxy:
        contentMaxAge: -1
        remoteUrl: https://xxx.com
        metadataMaxAge: 1440
      negativeCache:
        timeToLive: 1440
        enabled: true
      storage:
        strictContentTypeValidation: true
        blobStoreName: S3
      httpClient:
        authentication:
          type: username
          username: 'aaa'
          password: 'bbb'
bdellegrazie commented 3 years ago

Hi @mk811 I've recently merged a change from another contributor that revises the prior proxy support and should help. Can you please update to the latest version (v3.30.0-01.0) and checkout the new documentation?

Let me know if there's still an issue.

kikyomits commented 3 years ago

Hi @bdellegrazie thanks for the updates. But I guess the proxy you mentioned is httpProxy and httpsProxy. What I'm looking for is authentication config for maven-proxy. I couldn't find any updates around maven-proxy authentication in the README nor default-nexus.yml. Would you please clarify if the maven-proxy authentication is supported in Nexus CasC?

bdellegrazie commented 3 years ago

Hi @mk811 the httpClient needs to be httpclient. Otherwise I believe your configuration should work.

kikyomits commented 3 years ago

@bdellegrazie

Hi thanks for the updates. I confirmed that changing from httpClient to httpclient resolved my issue.