[JIRA] [role-strategy-plugin] (JENKINS-24767) Role-based Authorization Strategy not working with sub-folders

588 views
Skip to first unread message

orenault@gmail.com (JIRA)

unread,
Apr 22, 2016, 5:14:01 AM4/22/16
to jenkinsc...@googlegroups.com
Olivier Renault commented on Bug JENKINS-24767
 
Re: Role-based Authorization Strategy not working with sub-folders

Hi,
I've got the same need: restrict acces to the nested Folders.

But, if I apply the same, 2 roles : 1 role for the root folder (Folder1), 1 role for the nested Folder (FolderA), I have the following:

  • I can access to the Folder1/FolderA/JobA: I can build it
  • but I can also access to the Folder1/FolderB/JobB: I can't build it

=> Due to the first role "Folder1View with RegEx: "Folder1" and Job/Read ticked", all nested folders in Folder1 inherits the READ right.

=> so it is possible to read the content of all nested folders (aka FolderB) and all its content (JobB).

=> if we apply a 3rd role like "Folder1FolderB with RegEx: "Folder1/FolderB.*" and nothing ticked", then this not delete the READ rights on this FolderB.

So it appears impossible to restrein the access to nested folders as we have to put at least a READ right to the root folder, then this READ right inherits to all nested folders and jobs, even the ones we don't want to give a READ right.
So, do I have to create an issue on this point ? Or is it possible to really "give a user access to ONLY the contents of FolderA" without giving READ access to other folders ?
Regards
Olivier

Add Comment Add Comment
 
This message was sent by Atlassian JIRA (v6.4.2#64017-sha1:e244265)
Atlassian logo

o.v.nenashev@gmail.com (JIRA)

unread,
Apr 22, 2016, 5:44:01 AM4/22/16
to jenkinsc...@googlegroups.com
Oleg Nenashev reopened an issue
 
Jenkins / Bug JENKINS-24767
Change By: Oleg Nenashev
Resolution: Not A Defect
Status: Closed Reopened

o.v.nenashev@gmail.com (JIRA)

unread,
Apr 22, 2016, 5:46:02 AM4/22/16
to jenkinsc...@googlegroups.com
Oleg Nenashev commented on Bug JENKINS-24767
 
Re: Role-based Authorization Strategy not working with sub-folders

Reopened the issue in order to troubleshoot the report from Olivier Renault

a.krysko@astoundcommerce.com (JIRA)

unread,
Aug 2, 2018, 9:07:01 AM8/2/18
to jenkinsc...@googlegroups.com
Alexander Krysko reopened an issue
 

I'm using Jenkins 2.134 with Role-based Authorization Strategy ver. 2.8.1 + Folders Plugin of ver. 6.5.1.
Structure of Jenkins projects with sub-folder structure:
Platform1/Project1/Job-1 .. Job-n
Platform2/Project2/Job-1 .. Job-n
Platform3/Project3/Job-1 .. Job-n
 
I'm struggling with granting Build/Configure access to an Active Directory group only for Platform1/Project1/Job-1 .. Job-n
without exposing read access to 
Platform2/Project2/Job-1 .. Job-n and others?
 
So that when user from AD group logs into Jenkins he see only the project he was given access to.
 
When I remove Overall read access in Global Role for group 'users' which assigned to AD - users do not see what's matched by regexp under Project Roles.
 
I'm using the following regular expressions to grant read/edit permissions:
Platform1/Project1/.*
Platform2/Project2/.***
Platform3/Project3/.***
 
Platform and Project are case sensitive.

Change By: Alexander Krysko
Resolution: Not A Defect
Status: Resolved Reopened
This message was sent by Atlassian JIRA (v7.10.1#710002-sha1:6efc396)

dbeck@cloudbees.com (JIRA)

unread,
Aug 2, 2018, 9:13:03 AM8/2/18
to jenkinsc...@googlegroups.com
Daniel Beck commented on Bug JENKINS-24767
 
Re: Role-based Authorization Strategy not working with sub-folders

The second comment on this issue explains what you need to do.

a.krysko@astoundcommerce.com (JIRA)

unread,
Aug 2, 2018, 11:11:01 AM8/2/18
to jenkinsc...@googlegroups.com

Second comment is not very specific. In plugin configuration there are Global and Project roles. So

  • should there be Overall Read checkbox in a Global role
  • should there be Job Read checkbox in a Global role

May I ask someone who succeeded in described configuration to attach screenshots?

a.krysko@astoundcommerce.com (JIRA)

unread,
Aug 2, 2018, 12:59:03 PM8/2/18
to jenkinsc...@googlegroups.com
Alexander Krysko updated an issue
 
Change By: Alexander Krysko
Comment:
Second comment is not very specific. In plugin configuration there are Global and Project roles. So
* should there be Overall Read checkbox in a Global role
* should there be Job Read checkbox in a Global role


May I ask someone who succeeded in described configuration to attach screenshots?

a.krysko@astoundcommerce.com (JIRA)

unread,
Aug 2, 2018, 1:01:03 PM8/2/18
to jenkinsc...@googlegroups.com

o.v.nenashev@gmail.com (JIRA)

unread,
Jan 2, 2019, 5:39:03 AM1/2/19
to jenkinsc...@googlegroups.com
Change By: Oleg Nenashev
Status: Reopened Fixed but Unreleased
Resolution: Not A Defect
This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d)

rausalinas@gmail.com (JIRA)

unread,
Sep 25, 2019, 5:11:02 AM9/25/19
to jenkinsc...@googlegroups.com
Raúl Salinas-Monteagudo commented on Bug JENKINS-24767
 
Re: Role-based Authorization Strategy not working with sub-folders

It also cost me a while to find out how to make job folders work.  Documentation should be improved.

It works nicely with: FOLDERNAME(/.*)? 

Which means: the folder name alone, and anything starting by the folder name followed a slash.

This message was sent by Atlassian Jira (v7.13.6#713006-sha1:cc4451f)
Atlassian logo

ankurja@gmail.com (JIRA)

unread,
Jan 3, 2020, 3:36:04 PM1/3/20
to jenkinsc...@googlegroups.com
Ankur commented on Bug JENKINS-24767

Is there a way I can give access to child folder directly without specifically giving access to Parent folder ?

I have following structure:

FolderA -> FolderB -> FolderC -> jobs

It works fine if I give specific read permissions to Folder A first, then another role for giving read access to Folder B and then another role giving read access to Folder C, which means four roles to get access to jobs.

Role 1 -> ^FolderA

Role 2 -> ^FolderA/FolderB

Role 3 -> ^FolderA/FolderB/FolderC

Role 4 -> ^FolderA/FolderB/FolderC/.*

Can the number of roles be reduced somehow by defining a pattern which can give direct access to Folder C , which internally would mean access granted to Folder A and B ?

Reply all
Reply to author
Forward
0 new messages