Copy Artifact plugin authorization with/out RBAC plugin

Hi All,

I am trying to use the Copy Artifact plugin on my multibranch pipeline but encountered the famous permissions error:

“ERROR: Unable to find project for artifact copy: {ProjectFullName}
This may be due to incorrect project name or permission settings; see help for project name in job configuration.
Finished: FAILURE” ​

While allowing “Migration-Mode” solves the issues, of course the goal is to use “Prod Mode”.

I tried adding the "properties([[$class: ‘CopyArtifactPermissionProperty’, projectNames: ‘{ProjectFullName}’, [$class: ‘RebuildSettings’, autoRebuild: false, rebuildDisabled: false], pipelineTriggers()])

Without any sucess, On the official plugin site it says it can work with “Authorize Project” plugin but we are using another permission plugin (RBAC).

Appereciate any help,
Thanks,

:wave: @lord_vader welcome welcome

As I don’t really know the answer to the question, I’m just going to ask some follow up questions in hopes it sparks someone who knows.

are you talking about Role-based Authorization Strategy? That solves a different problem than Authorize Project

Role-based Authorization Strategy is about who and how people can use jenkins.
Authorize Project is about the “user” that is doing operations while the pipeline is being run. By default thats the system user (not administrator, just like the system itself), but with this plugin you can run everything as a different user, and then use role-strategy plugin to controll what access that user has. (At least thats how I understand it).

So I’m thinking the error message is leading you down the wrong path. My guess is actually how your calling copy artifact and specifying the job name, not the permission itself.

While I’ve never used the copy artifact plugin myself, as I understand it, since it works the same for triggering builds, for triggering a job, you’ll need to provide an absolute or relative path to the job itself.
“JobName/controller” not “JobName”. Possibly “…/controller” would work.

Can you shed any light into how your calling copy artifact?

1 Like