This question concerns a local NuGet repository in Artifactory Pro 4.14.2.
We use a service account named DevNetRunnerSvc
to publish NuGet artifacts to Artifactory. This account is configured with Deploy/Cache
permissions and is not configured with Delete/Overwrite
permissions.
However, DevNetRunnerSvc
is still able to overwrite artifacts in this repository:
I'd like some assistance in protecting artifacts from any and all overwrites (as is appropriate for a published NuGet package), or a determination that this is a bug that should be forwarded to JFrog.
Additional information:
- The (lightly sanitized) command used to publish artifacts is
jfrog rt upload $(Join-Path $env:CI_PROJECT_DIR "$($env:PACKAGE).$($env:VERSION).nupkg") nuget-org-dev/org/$($env:PACKAGE)/$($env:PACKAGE).$($env:VERSION)-$($env:CI_BUILD_REF_SLUG).nupkg
- While debugging this issue, I've removed
DevNetRunnerSvc
from all Groups. - Removing the
Deploy/Cache
permission fromDevNetRunnerSvc
successfully prevents it from publishing artifacts to this repository. 'Promoting' a published artifact from this repository to another one is prevented appropriately:
[Info] Moving artifact: nuget-org-dev/org/org.Infra.Pipeline/org.Infra.Pipeline.0.2.2-master.nupkg to: nuget-org/org/org.Infra.Pipeline/org.Infra.Pipeline.0.2.2.nupkg [Error] Artifactory response: 409 Conflict { "messages": [ { "level": "ERROR", "message": "User doesn't have permissions to move 'nuget-org-dev:org/org.Infra.Pipeline/org.Infra.Pipeline.0.2.2-master.nupkg'. Needs delete permissions." } ] }
The command used to execute the above is
jfrog rt move "nuget-org-dev/(org)/($($env:PACKAGE))/($($env:PACKAGE).$($env:VERSION))-$($env:CI_BUILD_REF_SLUG)(.nupkg)" "nuget-org/{1}/{2}/{3}{4}"
- I've added myself as a watcher to this repository. When
DevNetRunnerSvc
overwrites an artifact, I receive the following event notification:Thu Apr 13 12:25:34 EDT 2017 [devnetrunnersvc/10.228.128.23] [CREATED] nuget-org-dev/org/org.Infra.Pipeline/org.Infra.Pipeline.0.2.2-master.nupkg