Starting Artifactory 6.6.0, following REST APIs require build delete permission:
- Build Upload (only for overriding existing build info)
- Build Promotion (till this Jira is fixed RTFACT-18781 - ETA: Q2)
- Delete Builds
- Build Rename
- Control Build Retention
Without proper permission to delete, the REST APIs may result in HTTP 500 error (RTFACT-19039) in the logs. For example,
$ grep "api/build" request* | grep "|500|"
20190408131015|2785|REQUEST|11.11.11.11|myuser|POST|/api/build/retention/mybuild|HTTP/1.0|500|129
20190408042449|163|REQUEST|11.11.11.11|myuser2|PUT|/api/build|HTTP/1.0|500|5259
artifactory.log or catalina.out may print exceptions similar to below:
2019-04-07 03:28:28,763 [http-nio-12000-exec-130] [INFO ] (o.a.r.r.c.BuildResource:318) - Retention policy for build 'mybuild' scheduled to run 2019-04-07 03:28:28,763 [art-exec-31960] [INFO ] (o.a.b.BuildServiceImpl:668) - Async delete of build mybuild number: 2193_win_Release 2019-04-07 03:28:28,765 [art-exec-31960] [ERROR] (o.a.w.q.WorkQueueImpl:130) - Failed to call work queue 'Build Retention Job' callback due to :User 'myuser' is not authorized to delete build info. Delete permission is needed. ... Caused by: org.artifactory.rest.exception.ForbiddenException: User 'myuser' is not authorized to delete build info. Delete permission is needed. at org.artifactory.build.BuildServiceImpl.assertDeletePermissions(BuildServiceImpl.java:1300) at org.artifactory.build.BuildServiceImpl.deleteBuild(BuildServiceImpl.java:597)