[JIRA] (JENKINS-23709) Make the internal Plugin API accessible for System Groovy Scripts

2018-12-25 Thread o.v.nenas...@gmail.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Oleg Nenashev assigned an issue to Unassigned  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
 Unassigning the issue for now. We have added two Role Strategy plugin project ideas to GSoC 2019: https://jenkins.io/projects/gsoc/2019/project-ideas/. If somebody is interested in co-mentoring the ideas (including these tickets), please let us know  
 

  
 
 
 
 

 
 Jenkins /  JENKINS-23709  
 
 
  Make the internal Plugin API accessible for System Groovy Scripts   
 

  
 
 
 
 

 
Change By: 
 Oleg Nenashev  
 
 
Assignee: 
 Oleg Nenashev  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

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

  
 

   





-- 
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[JIRA] (JENKINS-23709) Make the internal Plugin API accessible for System Groovy Scripts

2018-03-13 Thread rmpest...@gmail.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Rafael Pestano edited a comment on  JENKINS-23709  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: Make the internal Plugin API accessible for System Groovy Scripts   
 

  
 
 
 
 

 
 Hi [~oleg_nenashev],We already have a working script and we call it via http like:{code:java}curl --user 'user:pass' --data-urlencode "script=$(< ./grantUser.groovy)" https://JENKINS_URL/jenkins/scriptText {code}   The problem is that we don't know how to pass parameters (e.g user role and project to grant) to grantUser.groovy  (the permissions are hardcoded in the script)  , the workaround is to generate a script every time we need to grant access to an user.  Thank you for the pointer, the Ownership helper will simplify our script even more.   
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

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

 
   
 

  
 

  
 

   





-- 
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[JIRA] (JENKINS-23709) Make the internal Plugin API accessible for System Groovy Scripts

2018-03-13 Thread rmpest...@gmail.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Rafael Pestano commented on  JENKINS-23709  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: Make the internal Plugin API accessible for System Groovy Scripts   
 

  
 
 
 
 

 
 Hi Oleg Nenashev, We already have a working script and we call it via http like: 

 

curl --user 'user:pass' --data-urlencode "script=$(< ./grantUser.groovy)" https://JENKINS_URL/jenkins/scriptText  

   The problem is that we don't know how to pass parameters (e.g user role and project to grant) to grantUser.groovy, the workaround is to generate a script every time we need to grant access to an user.   Thank you for the pointer, the Ownership helper will simplify our script even more.   
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

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

 
   
 

  
 

  
 

   





-- 
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[JIRA] (JENKINS-23709) Make the internal Plugin API accessible for System Groovy Scripts

2018-03-13 Thread o.v.nenas...@gmail.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Oleg Nenashev commented on  JENKINS-23709  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: Make the internal Plugin API accessible for System Groovy Scripts   
 

  
 
 
 
 

 
 Rafael Pestano Maybe you want to consider https://github.com/jenkinsci/ownership-plugin/blob/master/doc/OwnershipBasedSecurity.md You can find some samples about permission management with scripts here:  
 
https://github.com/oleg-nenashev/demo-jenkins-config-as-code/blob/master/init_scripts/src/main/groovy/io/jenkins/systemgroovy/plugins/OwnershipBasedSecurityHelper.groovy 
https://github.com/oleg-nenashev/demo-jenkins-config-as-code/blob/master/init_scripts/src/main/groovy/scripts/Auth.groovy#L25-L33 
 Also there is support in the CasC plugin now: 
 
https://github.com/jenkinsci/configuration-as-code-plugin/blob/master/src/test/resources/org/jenkinsci/plugins/casc/integrations/rolebasedauth/RoleStrategy1.yml 
  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

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

 
   
 

  
 

  
 

   





-- 
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[JIRA] (JENKINS-23709) Make the internal Plugin API accessible for System Groovy Scripts

2018-03-13 Thread rmpest...@gmail.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Rafael Pestano commented on  JENKINS-23709  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: Make the internal Plugin API accessible for System Groovy Scripts   
 

  
 
 
 
 

 
 Hi guys, There is a way to pass parameters to the groovy script? We need to automate the Jenkins grant access in our company because the project-role matrix is unmanageable (100 users per 300 projects).  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

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

 
   
 

  
 

  
 

   





-- 
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[JIRA] (JENKINS-23709) Make the internal Plugin API accessible for System Groovy Scripts

2016-06-16 Thread o.v.nenas...@gmail.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Oleg Nenashev commented on  JENKINS-23709  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: Make the internal Plugin API accessible for System Groovy Scripts   
 

  
 
 
 
 

 
 Nordine Nordine It's not a bug report, so its pretty far in my backlog.  There is a proposed PR https://github.com/jenkinsci/role-strategy-plugin/pull/12 , so you could continue it for example.  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

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

 
   
 

  
 

  
 

   





-- 
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[JIRA] (JENKINS-23709) Make the internal Plugin API accessible for System Groovy Scripts

2016-06-16 Thread libre.de.sur...@gmail.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Nordine Nordine commented on  JENKINS-23709  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: Make the internal Plugin API accessible for System Groovy Scripts   
 

  
 
 
 
 

 
 Hi Is this issue's going to be resolved ? Thanks.  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

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

 
   
 

  
 

  
 

   





-- 
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.