We have a lot of Jenkins instances spread out over the company.

So I am not particularly a Groovy expert, but from posts and examples I found 
on-line, I was able to cobble together a script to "audit" our Jenkins jobs.

Once I had this running in the Jenkins Groovy Console, I then put it into a 
file and invoked it remotely against each Jenkins this way:

java -jar jenkins-cli.jar -s http://<system>:8080 groovy 
LookForConfigConcerns.groovy --username ******** --password ********

The Stdout could then be audited for problems and issues . . . this has been 
working well for a while now.

This audit focuses on the PROJECTS and JOBS and there are lots of examples of 
how to go about looking at those.

Now my audit needs to expand . . . questions I need to be able to answer:


1.       Is Jenkins security enabled?

2.       Is it set to Project-based Matrix Authorization Strategy?

3.       List who is authorized on this system and what permission(s) they each 
have

I think you get the picture . . . we are trying to "lock down" and make sure 
the various admins don't "unlock" later when we aren't looking.

Unfortunately, examples of how to access this kind of information from Groovy 
is limited to non-existent.

I THINK that the way I would like to do this is to audit the Jenkins using 
Groovy, much like I am auditing the jobs, but I cannot figure what classes I 
should be talking with.

I have also looked for a way to remotely get at the XML file (then audit that), 
but that doesn't seem available remotely either.

For this discussion we can assume I have an admin username and password . . . I 
am just at a loss as to how to turn that into the information I want in the way 
that I did for jobs.

I am looking for READ ONLY . . . this script is just to look and report, not 
change.

Any pointers or other ideas of how to approach the issue?

Frank


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


Reply via email to