Uploaded image for project: 'Archiva'
  1. Archiva
  2. MRM-967

Security Issue: If repository observer role is enabled for the 'guest' user, an invalid user is able to deploy to that repository

    XMLWordPrintableJSON

Details

    Description

      Steps to reproduce (using repository 'snapshots'):
      1. Configure the <distributionManagement> of your project's pom to deploy your project to 'snapshots' repository, as follows:

      <distributionManagement>
      <repository>
      <id>releases</id>
      <name>Releases Repository</name>
      <layout>default</layout>
      <url>dav:http://localhost:8080/archiva/repository/releases/</url>
      </repository>
      <snapshotRepository>
      <id>snapshots</id>
      <uniqueVersion>true</uniqueVersion>
      <name>Snapshots Repository</name>
      <layout>default</layout>
      <url>dav:http://localhost:8080/archiva/repository/snapshots/</url>
      </snapshotRepository>
      </distributionManagement>

      2. Enable the 'snapshots' repository observer role for 'guest' user
      3. Add an invalid user credentials in your settings.xml for 'snapshots' repository, as shown below:

      <server>
      <id>snapshots</id>
      <username>invalidusername</username>
      <password>password</password>
      </server>

      4. Execute 'mvn clean deploy' in your project.

      Alternatively, you can also use the deploy-file goal to replicate the issue so you won't need to configure your pom (ex. 'mvn deploy:deploy-file -Dfile=nunit.framework.dll -DgroupId=NUnit -Dversion=2.4.8.0 -Dpackaging=dll -DartifactId=NUnit.Framework.dll -DrepositoryId=snapshots -Durl=http://localhost:8080/archiva/repository/snapshots -DgeneratePom=true')

      Attachments

        Activity

          People

            oching Maria Odea B. Ching
            oching Maria Odea B. Ching
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: