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

NPM proxy repo does not honor remote url configuration change

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Critical
    • Resolution: Won't Fix
    • Affects Version/s: 3.22.0, 3.24.0, 3.25.0
    • Fix Version/s: None
    • Component/s: NPM
    • Notability:
      3

      Description

      1. Create an npm proxy pointing to remote url https://registry.npmjs.org/
      2. Retrieve lodash. Verify it was downloaded to the proxy. Then delete the asset from the proxy.
      3. Change the proxy configuration to an invalid remote URL
      4. Re-retrieve the same package and notice NXRM make request to the original remote URL rather than to the new URL.

      2020-06-23 09:49:09,067+0100 DEBUG [npm-audit-tasks-11-thread-4] anonymous org.sonatype.nexus.httpclient.outbound - https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz > GET /is-number/-/is-number-7.0.0.tgz HTTP/1.1
      2020-06-23 09:49:10,640+0100 DEBUG [npm-audit-tasks-11-thread-4] anonymous org.sonatype.nexus.httpclient.outbound - https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz < HTTP/1.1 200 OK @ 1.574 s
      
      2020-06-23 09:50:21,891+0100 INFO  [qtp1769984124-186] admin org.sonatype.nexus.repository.manager.internal.RepositoryManagerImpl - Updating repository: npm-proxy -> OrientConfiguration{repositoryName='npm-proxy', recipeName='npm-proxy', attributes={proxy={remoteUrl=http://example.com, contentMaxAge=1440.0, metadataMaxAge=1440.0}, httpclient={blocked=false, autoBlock=true}, storage={blobStoreName=default, strictContentTypeValidation=true}, negativeCache={enabled=true, timeToLive=1440.0}}}
      2020-06-23 09:50:21,904+0100 INFO  [qtp1769984124-186] admin org.sonatype.nexus.repository.httpclient.internal.HttpClientCustomConfigFacetImpl - Remote connection status of repository npm-proxy set to Ready to Connect.
      2020-06-23 09:50:21,911+0100 INFO  [qtp1769984124-186] admin org.sonatype.nexus.repository.npm.internal.orient.OrientNpmProxyFacet - Invalidating proxy caches of npm-proxy
      
      2020-06-23 09:51:46,373+0100 DEBUG [npm-audit-tasks-14-thread-1] anonymous org.sonatype.nexus.httpclient.outbound - https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz > GET /is-number/-/is-number-7.0.0.tgz HTTP/1.1
      2020-06-23 09:51:46,806+0100 DEBUG [npm-audit-tasks-14-thread-1] anonymous org.sonatype.nexus.httpclient.outbound - https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz < HTTP/1.1 304 Not Modified @ 432.7 ms
      

      Expected:
      No requests issued to the old remote URL.

      Actual:
      Proxy used the old remote url

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              mprescott Michael Prescott
              Reporter:
              cseney Cassandra Seney
              CC:
              Andrew Clark
              Last Updated By:
              Michael Prescott Michael Prescott
              Votes:
              3 Vote for this issue
              Watchers:
              10 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Date of First Response:

                  tigCommentSecurity.panel-title