I want to know the security configuration of Jenkins; How do I query? Is there a document that allows me to see all configuration items?

I want to know the security configuration of Jenkins; How do I query? Is there a document that allows me to see all configuration items?

To query the security configuration of Jenkins, you can use the Jenkins Script Console. This console allows you to run Groovy scripts to inspect and modify the Jenkins configuration.

Steps to Access Jenkins Script Console:

  1. Open Jenkins in your web browser.
  2. Navigate to Manage Jenkins.
  3. Scroll down and click on Script Console.

The following script should print out the current security configuration settings:

import jenkins.model.Jenkins

def jenkins = Jenkins.instance

println "Security Realm: ${jenkins.getSecurityRealm()}"
println "Authorization Strategy: ${jenkins.getAuthorizationStrategy()}"
println "CSRF Protection: ${jenkins.isUseCrumbs()}"
println "CLI Enabled: ${jenkins.isDisableRememberMe()}"

It gave on my local instance:

Security Realm: org.jenkinsci.plugins.GithubSecurityRealm@e01f78ab
Authorization Strategy: hudson.security.FullControlOnceLoggedInAuthorizationStrategy@59003619
CSRF Protection: true
CLI Enabled: false