[JIRA] [core] (JENKINS-21336) ADMINISTER should not imply RUN_SCRIPTS

1 view
Skip to first unread message

devld@ikedam.jp (JIRA)

unread,
Feb 7, 2016, 7:08:02 PM2/7/16
to jenkinsc...@googlegroups.com
ikedam updated an issue
 
Jenkins / Bug JENKINS-21336
ADMINISTER should not imply RUN_SCRIPTS
Change By: ikedam
Anyone with {{RUN_SCRIPTS}} can go to {{/script}} and immediately grant themselves other permissions (or disable security altogether, or worse), so it is strictly more powerful than anything else, including {{ADMINISTER}}. Yet the {{impliedBy}} link normally grants {{RUN_SCRIPTS}} automatically to anyone with {{ADMINISTER}}, which is backward.

Less obviously, with {{UPLOAD_PLUGINS}} you could do much the same, if you spent a moment writing a custom plugin with a malicious initializer and building an hpi file, then installing it dynamically. This leaves a bit more of an audit trail, but only barely. (Maybe {{SecurityListener}} should be notified whenever a script is run or a custom plugin uploaded, and by whom?)

If (as is common) all these permissions are granted together to administrators and not at all to other users, there is no problem, but the illogical {{impliedBy}} relationship together with the relatively innocuous-sounding permission descriptions combine to make even many experienced Jenkins administrators unaware of the risks.
t
At a minimum, the descriptions of these three permissions must clearly state what they allow users to do and the implications.

Next, {{ADMINISTER}} should no longer be taken to imply {{RUN_SCRIPTS}} or {{UPLOAD_PLUGINS}}, since such implications give the misleading impression that these are weaker permissions. They should need to be explicitly granted.

(There is an unfortunate settings compatibility issue, that authorization strategy configurations which previously granted {{ADMINISTER}} explicitly to a user with the expectation that {{RUN_SCRIPTS}} would be granted implicitly would after such an update no longer grant {{RUN_SCRIPTS}}, since existing strategies typically serialize only granted permissions and make no mention of denied permissions. If popular strategies were fixed to distinguish implicitly from explicitly granted permissions, perhaps they could perform a one-time settings upgrade in which {{RUN_SCRIPTS}} were assumed granted to users previously having {{ADMINISTER}}.)

Possibly {{RUN_SCRIPTS}} and {{UPLOAD_PLUGINS}} should even be made to imply {{ADMINISTER}}, as in effect they do.

Note that it is possible to configure a customized system whereby some users get {{ADMINISTER}} but not either of the two other permissions mentioned here, as for example *.ci.cloudbees.com does. One of the changes needed is for the authorization strategy to ignore {{impliedBy}} for these cases. With {{CONFIGURE_UPDATECENTER}} you could perhaps trick someone with {{ADMINISTER}} into installing a "trojan horse" the next time they updated something, though you might be stymied by the signature check. There are other permissions which could be used to compromise a stock system, such as {{Computer.CONFIGURE}} (with {{CommandLauncher}}), or simply having nonzero executors on the master, so such a lockdown has to extend beyond the ACL unless various other operations in Jenkins are made to perform stricter checks.
Add Comment Add Comment
 
This message was sent by Atlassian JIRA (v6.4.2#64017-sha1:e244265)
Atlassian logo

wfollonier@cloudbees.com (JIRA)

unread,
Mar 16, 2018, 4:27:02 AM3/16/18
to jenkinsc...@googlegroups.com
Wadeck Follonier commented on Bug JENKINS-21336
 
Re: ADMINISTER should not imply RUN_SCRIPTS

Problem addressed in scriptler.

This message was sent by Atlassian JIRA (v7.3.0#73011-sha1:3c73d0e)
Atlassian logo

boards@gmail.com (JIRA)

unread,
Oct 17, 2018, 11:41:02 AM10/17/18
to jenkinsc...@googlegroups.com

I had a thought about this problem: what if we introduced a new top-level permission such as ROOT. Then RUN_SCRIPTS, CONFIGURE_UPDATECENTER, UPLOAD_PLUGINS, and ADMINISTER are implied by ROOT. Migrating permissions from the previous set to the new one might be complicated, though.

A quick local experiment changing these around only broke 4 integration tests, so either there's not much test coverage, or this idea has some potential.

This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d)

jglick@cloudbees.com (JIRA)

unread,
Oct 18, 2018, 12:08:02 AM10/18/18
to jenkinsc...@googlegroups.com

Migrating permissions from the previous set to the new one might be complicated, though.

Indeed. See discussion in JENKINS-17200.

boards@gmail.com (JIRA)

unread,
Oct 25, 2018, 10:59:02 AM10/25/18
to jenkinsc...@googlegroups.com
Matt Sicker assigned an issue to Matt Sicker
 
Change By: Matt Sicker
Assignee: Mikael Gaunin Matt Sicker

boards@gmail.com (JIRA)

unread,
Oct 26, 2018, 6:21:01 PM10/26/18
to jenkinsc...@googlegroups.com
Matt Sicker updated an issue
Change By: Matt Sicker
Labels: permissions security

boards@gmail.com (JIRA)

unread,
Oct 30, 2018, 3:00:05 PM10/30/18
to jenkinsc...@googlegroups.com
Matt Sicker started work on Bug JENKINS-21336
 
Change By: Matt Sicker
Status: Open In Progress

boards@gmail.com (JIRA)

unread,
Oct 30, 2018, 5:40:02 PM10/30/18
to jenkinsc...@googlegroups.com

boards@gmail.com (JIRA)

unread,
Oct 30, 2018, 5:41:04 PM10/30/18
to jenkinsc...@googlegroups.com

boards@gmail.com (JIRA)

unread,
May 7, 2019, 11:08:05 AM5/7/19
to jenkinsc...@googlegroups.com
Matt Sicker assigned an issue to Unassigned
Change By: Matt Sicker
Assignee: Matt Sicker
Reply all
Reply to author
Forward
0 new messages