Skip to content

jhinrichsen/jenkins-role-support

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Commandline support for Jenkins Role Stragy Plugin via REST

Functionality is based on Jenkins Role Strategy Plugin 2.6.1

Jenkins Role Strategy Plugin REST API

List

curl -X GET localhost:8080/role-strategy/strategy/getAllRoles

Add

curl -X POST localhost:8080/role-strategy/strategy/addRole --data "type=globalRoles&roleName=ADMIN&permissionIds=hudson.model.Item.Discover,hudson.model.Item.ExtendedRead&overwrite=true"

Remove

curl -X POST localhost:8080/role-strategy/strategy/removeRoles --data "type=globalRoles&roleNames=ADMIN,DEV"

Assign user

curl -X POST localhost:8080/role-strategy/strategy/assignRole --data "type=globalRoles&roleName=ADMIN&sid=username"

Unassign

curl -X POST localhost:8080/role-strategy/strategy/unassignRole --data "type=globalRoles&roleName=ADMIN&sid=username"

Remove user from all roles

curl -X POST localhost:8080/role-strategy/strategy/deleteSid --data "type=globalRoles&sid=username"

TODO

  • Support destructive role mgmt (delete role, unassign user)

  • Support Jenkins CSRF protection (crumbs)

About

Commandline support for Jenkins Role Strategy Plugin

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages