[JIRA] (JENKINS-39874) Abilty to disable pipeline-replay in Job Configuration.

39 views
Skip to first unread message

sebastien.vas@gmail.com (JIRA)

unread,
Nov 18, 2016, 6:55:04 PM11/18/16
to jenkinsc...@googlegroups.com
Sebastien Vas created an issue
 
Jenkins / Improvement JENKINS-39874
Abilty to disable pipeline-replay in Job Configuration.
Issue Type: Improvement Improvement
Assignee: Unassigned
Components: pipeline
Created: 2016/Nov/18 11:54 PM
Labels: pipeline
Priority: Minor Minor
Reporter: Sebastien Vas

While the replay is good for debugging, it is also a huge security hole.

Please allow users to disable this feature.

Add Comment Add Comment
 
This message was sent by Atlassian JIRA (v7.1.7#71011-sha1:2526d7c)
Atlassian logo

vossad01@gmail.com (JIRA)

unread,
Jun 25, 2018, 9:33:05 PM6/25/18
to jenkinsc...@googlegroups.com
Adam Voss commented on Improvement JENKINS-39874
 
Re: Abilty to disable pipeline-replay in Job Configuration.

I understand that from the security model's perspective you provide an option here. While that is correct, I think there two valid considerations to mention explicitly with regards to the original request both revolving around the changing role of Jenkins in CI as integration with external systems becomes stronger and more automated checks happen.

The first is that with Jenkinsfiles and builds as code, we, as users, are largely shifting the security control over the build process away from Jenkins to our SCM solutions (ex. GitHub).  When we build out processes and protections in that system to protect the Jenkinsfile and allow automated reporting of the build status control other workflows (since we trust the Jenkinsfile).  It can be alarming to discover that the SCM controls can completely be bypassed with the "Replay" feature on Jenkins which trivially let peoples people bypass all those checks since it allows edits.  Needing block all access to job configuration options to disable this "problematic" feature really sounds like a lot of administrative hassle making exceptions for when people really do need to just configure a job, I think this could be a good reason to make it a separate security option.

The next is really an appeal to consider the many users that are likely operating in a more security context. I am sure I'm not alone in using Jenkins in a relatively controlled corporate environment, everyone who has access to it is a "trusted" member of the team.  Many in such an environment would generally not consider it worth the cost to fully harden the CI system.  If we can make it easy to do the "right" we are not likely to have any issues; so long as it is working most users don't care enough to put in the effort to realize where the risks are.  The users that do realize the risk are not likely to be motivated to put in the effort to exploit them, and those that would want to exploit something (we really shouldn't have any of these) are likely the ones that would be really hard to stop.  Where this re-play with edits feature comes it is that it makes a "dangerous" option so easy that the first class of users that just want to use the system are likely to use it without realizing it is problematic, thus like the original request, it would be nice if we could just blanket disable this on a box.

From pure information security standpoint, if that is the only model you are considering, I understand that is horrible and there are all sorts of flaws.  When you consider the social environment and things like the cost of security vs convenience, being able to disable this particular enhancement would be valuable.

This message was sent by Atlassian JIRA (v7.10.1#710002-sha1:6efc396)

jglick@cloudbees.com (JIRA)

unread,
Jun 26, 2018, 8:13:07 PM6/26/18
to jenkinsc...@googlegroups.com

You can always use Extension Filter or simple Groovy hooks to remove features you do not want from your installation for whatever reason. I see nothing structurally inappropriate about Replay that would merit a UI option. It is just a tool to help you experiment with script changes before committing them to SCM—something you would otherwise do (with less auditability and more risk) by temporarily changing the job configuration to an inline script, copying and pasting text from SCM, running the build, then reverting the configuration immediately afterwards.

atias.adir@gmail.com (JIRA)

unread,
Feb 21, 2019, 10:09:02 AM2/21/19
to jenkinsc...@googlegroups.com
Adir Atias updated an issue
 
Change By: Adir Atias
Attachment: image-2019-02-21-17-08-41-268.png
This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d)

atias.adir@gmail.com (JIRA)

unread,
Feb 21, 2019, 10:11:02 AM2/21/19
to jenkinsc...@googlegroups.com
Adir Atias commented on Improvement JENKINS-39874
 
Re: Abilty to disable pipeline-replay in Job Configuration.

Hi Jesse Glick,

your suggestion to use Extension Filter sounds great, unfortunately I didn't manage what exactly the  class and the context for Replay Extension.

I tried several things, and also this: 

but it didn't work for me. Do you know what should I fill ? it will be really appreciated.

 

also if you can explain this sentence "Simple Groovy hooks to remove features" ? I'm using Jenkins and I never heard about it.

 

BR,

Adir Atias.

ondrej.burkert@gmail.com (JIRA)

unread,
Apr 26, 2019, 2:14:04 AM4/26/19
to jenkinsc...@googlegroups.com
Ondrej Burkert edited a comment on Improvement JENKINS-39874
Hello,

we are also interested in this. We have very similar issues as described. We use Jenkins for CI/CD and pipeline provides guarantees like "only deploy the master branch" and one can only merge approved pull requests to the master branch. Now "replay" breaks the guarantees of four-eye principle.

We would love to keep the option to configure a job while disabling the replay.


It would be helpful to know how more about the options mentioned - the extension filter or the groovy hooks.

ondrej.burkert@gmail.com (JIRA)

unread,
Apr 26, 2019, 2:14:04 AM4/26/19
to jenkinsc...@googlegroups.com
 
Re: Abilty to disable pipeline-replay in Job Configuration.

Hello,

we are also interested in this. We have very similar issues as described. We use Jenkins for CI/CD and pipeline provides guarantees like "only deploy the master branch" and one can only merge approved pull requests to the master branch. Now "replay" breaks the guarantees of four-eye principle.

We would love to keep the option to configure a job while disabling the replay.

jglick@cloudbees.com (JIRA)

unread,
Apr 26, 2019, 7:48:03 AM4/26/19
to jenkinsc...@googlegroups.com

Ondrej Burkert so, deny Job/Configure permission to non-admins.

I am not going to waste time developing/documenting customizations. Someone who is interested could write a plugin offering a /configureSecurity/ checkbox with a clear warning about why it is not offering actual defenses but merely making a (less auditable!) method of abuse very slightly less convenient.

ondrej.burkert@gmail.com (JIRA)

unread,
May 3, 2019, 6:13:03 PM5/3/19
to jenkinsc...@googlegroups.com

Jesse Glick true, the fact that the person can configure the job allows them to do whatever already... Thanks for clarifying.

ben@langfeld.me (JIRA)

unread,
Aug 7, 2019, 11:12:02 AM8/7/19
to jenkinsc...@googlegroups.com

I have users who do not have Job/Configure, cannot access the job configuration, but can use Replay. Is there some other permission which grants this? Should this ticket be re-opened?

jglick@cloudbees.com (JIRA)

unread,
Aug 7, 2019, 2:48:02 PM8/7/19
to jenkinsc...@googlegroups.com

Ben Langfeld there is a Run/Replay permission that is normally implied by Job/Configure but can be independently granted; perhaps whoever set up authorization did so.

ben@langfeld.me (JIRA)

unread,
Aug 7, 2019, 3:49:03 PM8/7/19
to jenkinsc...@googlegroups.com
Ben Langfeld updated an issue
 
Change By: Ben Langfeld
Attachment: Screenshot 2019-08-07 at 16.48.12.png

ben@langfeld.me (JIRA)

unread,
Aug 7, 2019, 3:50:02 PM8/7/19
to jenkinsc...@googlegroups.com
Ben Langfeld commented on Improvement JENKINS-39874
 
Re: Abilty to disable pipeline-replay in Job Configuration.

Jesse Glick I havn't granted that permission either. There must be some other in this set that permits replays.

jglick@cloudbees.com (JIRA)

unread,
Aug 7, 2019, 3:55:05 PM8/7/19
to jenkinsc...@googlegroups.com

Ben Langfeld it is either a bug or a misconfiguration. Better to file as a separate (but Link’d) issue with complete, self-contained steps to reproduce from scratch.

sylvain.targonski@gmail.com (JIRA)

unread,
Oct 3, 2019, 5:39:04 AM10/3/19
to jenkinsc...@googlegroups.com
Larkoie updated an issue
 
Change By: Larkoie
Attachment: image-2019-10-03-11-38-21-093.png
This message was sent by Atlassian Jira (v7.13.6#713006-sha1:cc4451f)
Atlassian logo

sylvain.targonski@gmail.com (JIRA)

unread,
Oct 3, 2019, 5:40:03 AM10/3/19
to jenkinsc...@googlegroups.com
Larkoie commented on Improvement JENKINS-39874
 
Re: Abilty to disable pipeline-replay in Job Configuration.

Jesse Glick I'm having the same issue. I'd like to prevent "replay" option on my pipelines but any user with "Job - Build" right also have the replay right. (bellow is a screenshot of their rights. In the global config the only permission they have is the global Read permission which is mandatory to access Jenkins UI) :

 

ruslan.emelianov@yahoo.com (JIRA)

unread,
Jan 9, 2020, 8:54:04 AM1/9/20
to jenkinsc...@googlegroups.com

I'm having the same issue as Larkoie user with `replay` option. It turns off only if disable `Build` permission 

ruslan.emelianov@yahoo.com (JIRA)

unread,
Jan 9, 2020, 9:32:03 AM1/9/20
to jenkinsc...@googlegroups.com
Ruslan Yemelianov edited a comment on Improvement JENKINS-39874
I'm having the same issue as [~larkoie] user with `replay` option. It turns off only if disable `Build` permission  
Jenkins: 2.204.1
Matrix Authorization Strategy Plugin: 2.5

ruslan.emelianov@yahoo.com (JIRA)

unread,
Jan 9, 2020, 10:32:04 AM1/9/20
to jenkinsc...@googlegroups.com
Ruslan Yemelianov edited a comment on Improvement JENKINS-39874
I'm having the same issue as [~larkoie] user with `replay` option. It turns off only if disable `Build` permission
Jenkins: 2.204.1
Matrix Authorization Strategy Plugin: 2.5


Recreate:
jenkins 2.204.1 
and also tested on 2.190.1
1) install jenkins with plugins: 
workflow-aggregator:2.6
matrix-auth:2.5
2) create new user
3) change authorization type to `Project-based Matrix Authorization Strategy`
4) Enable overall/Read
for Authenticated Users

5) Create job 'pipeline' type and enable `Enable project-based security`
set Do not inherit and grant permissions 
Job/Build, Job/Read 
6) Run job 
7) login from created user from step 2 and run replay

ruslan.emelianov@yahoo.com (JIRA)

unread,
Jan 9, 2020, 10:33:03 AM1/9/20
to jenkinsc...@googlegroups.com
Ruslan Yemelianov reopened an issue
 

I'm having the same issue as Larkoie user with `replay` option. It turns off only if disable `Build` permission


Jenkins: 2.204.1
Matrix Authorization Strategy Plugin: 2.5

Recreate:
jenkins 2.204.1 
and also tested on 2.190.1
1) install jenkins with plugins: 
workflow-aggregator:2.6
matrix-auth:2.5
2) create new user
3) change authorization type to `Project-based Matrix Authorization Strategy`
4) Enable overall/Read
for Authenticated Users

5) Create job 'pipeline' type and enable `Enable project-based security`
set Do not inherit and grant permissions 
Job/Build, Job/Read 
6) Run job 
7) login from created user from step 2 and run replay

Change By: Ruslan Yemelianov
Resolution: Not A Defect
Status: Resolved Reopened

ruslan.emelianov@yahoo.com (JIRA)

unread,
Jan 9, 2020, 10:34:03 AM1/9/20
to jenkinsc...@googlegroups.com
Ruslan Yemelianov updated an issue
Change By: Ruslan Yemelianov
Comment: I'm having the same issue as [~larkoie] user with `replay` option. It turns off only if disable `Build` permission

Jenkins: 2.204.1
Matrix Authorization Strategy Plugin: 2.5

Recreate:
jenkins 2.204.1 
and also tested on 2.190.1
1) install jenkins with plugins: 
workflow-aggregator:2.6
matrix-auth:2.5
2) create new user
3) change authorization type to `Project-based Matrix Authorization Strategy`
4) Enable overall/Read
for Authenticated Users

5) Create job 'pipeline' type and enable `Enable project-based security`
set Do not inherit and grant permissions 
Job/Build, Job/Read 
6) Run job 
7) login from created user from step 2 and run replay

ruslan.emelianov@yahoo.com (JIRA)

unread,
Jan 10, 2020, 5:40:04 AM1/10/20
to jenkinsc...@googlegroups.com
Ruslan Yemelianov updated an issue
Change By: Ruslan Yemelianov
Attachment: Screen Shot 2020-01-10 at 12.37.53.png

ruslan.emelianov@yahoo.com (JIRA)

unread,
Jan 10, 2020, 5:41:04 AM1/10/20
to jenkinsc...@googlegroups.com
Ruslan Yemelianov commented on Improvement JENKINS-39874
 
Re: Abilty to disable pipeline-replay in Job Configuration.

Seems like it working but not hiding button on left panel and part of menu 

With enable Replay (button replay active)

With disable Replay same job (button replay active)

ruslan.emelianov@yahoo.com (JIRA)

unread,
Jan 10, 2020, 5:41:04 AM1/10/20
to jenkinsc...@googlegroups.com
Ruslan Yemelianov updated an issue
Change By: Ruslan Yemelianov
Attachment: Screen Shot 2020-01-10 at 12.37.33.png
Reply all
Reply to author
Forward
0 new messages