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

Basic Auth not challenged when using Search Assets API

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: New
    • Priority: Medium
    • Resolution: Unresolved
    • Affects Version/s: 3.18.1
    • Fix Version/s: None
    • Component/s: REST, Search

      Description

      On Nexus 3, it's impossible to use Ansible or Windows PowerShell Invoke-WebRequest against the Search Assets API, f.e. https://nexus.example.com/service/rest/v1/search/assets/download?maven.extension=jar&group=com.example.app&name=core-app&maven.baseVersion=0.1.0-SNAPSHOT&repository=example-snapshots&sort=version

       

      Basic Auth is not challenged when using this and creating custom headers with the auth included doesn't remedy this. It just returns 404 and a message: "Asset search returned no results" instead of offering to log in.

      When using the HTML view link, f.e. https://nexus.example.com/repository/example-snapshots/com/example/core-app/0.1.0-SNAPSHOT/core-app-0.1.0-20190925.100439-10.jar

      everything works as intended and it challenges Basic Auth and also accepts web requests (curl or Powershell Invoke-WebRequest) with credentials in the header.

      In Nexus 2 the Search API also challenged Basic auth instead of throwing 404 and it was very useful for automation.

        Attachments

          Activity

            People

            Assignee:
            Unassigned
            Reporter:
            tschlafer Tom Schlafer
            Last Updated By:
            Joe Tom
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Date of First Response:

                tigCommentSecurity.panel-title