Uploaded image for project: 'Dev - Nexus Repo'
  1. Dev - Nexus Repo
  2. NEXUS-23418

rest api proxy repository httpClient authentication does not take effect

    XMLWordPrintable

    Details

      Description

      nexus version: OSS 3.22.0-02

      When I use rest api to create maven proxy repository, I found `httpClient.Authentication` cannot take effect.

      I tried both on embedded swagger UI and invoke by Golang sdk (writer by myself).

       

      POST /service/rest/beta/repositories/maven/proxy

      Request body:

      // json
      {
        "name": "sdk-maven-proxy-6",
        "online": true,
        "storage": {
          "blobStoreName": "default",
          "strictContentTypeValidation": false,
          "writePolicy": "DENY"
        },
        "cleanup": null,
        "maven": {
          "versionPolicy": "MIXED",
          "layoutPolicy": "PERMISSIVE"
        },
        "proxy": {
          "remoteUrl": "http://maven.aliyun.com/nexus/content/groups/public/",
          "contentMaxAge": -1,
          "metadataMaxAge": 1440
        },
        "negativeCache": {
          "enabled": true,
          "timeToLive": 60
        },
        "httpClient": {
          "blocked": false,
          "autoBlock": false,
          "connection": {
            "retries": 9,
            "userAgentSuffix": "123",
            "timeout": 100,
            "enableCircularRedirects": true,
            "enableCookies": false
          },
          "authentication": {
            "type": "username",
            "username": "admin",
            "password": "admin123"
          }
        },
        "routingRule": ""
      }

      response is success, and I can found in my local nexus run on docker.

      But the created proxy repository `sdk-maven-proxy-6` doesn't have `Authentication` config. Please see the attachment picture.

      In the meanwhile, `httpClient.Connection` config is created.

       

      I also tried update this proxy repository after created with `Authentication` config, but also have no effect.

       

      Please correct me, thank you!

       

        Attachments

          Activity

            People

            Assignee:
            Unassigned Unassigned
            Reporter:
            sfwn sfwn
            Last Updated By:
            Michael Prescott Michael Prescott
            Votes:
            3 Vote for this issue
            Watchers:
            8 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Date of First Response:

                tigCommentSecurity.panel-title