c4605
c4605

Reputation: 185

How to disable basic http auth of jenkins

My jenkins version: 1.608, it running behind nginx.

I just installed jenkins from portage, and go to Manage Jenkins > Configure Global Security > enable Enable security > choose Jenkins’ own user database > enable Allow users to sign up > click Save button

Then page refreshed, jenkins ask me to login with basic http authentication, but I haven't added any user, and I can not access the signup page.

I can disable useSecurity in /var/lib/jenkins/home/config.xml, but I want to use Jenkins’ own user database.

And I never found Manage Users in Manage Jenkins page.

Upvotes: 1

Views: 4471

Answers (2)

Garcia
Garcia

Reputation: 1

I helped in the file /var/cache/jenkins/war/WEB-INF/security/SecurityFilters.groovy comment out the block

bean(BasicHeaderProcessor) {
            // if basic authentication fails (which only happens incorrect basic auth credential is sent),
            // respond with 401 with basic auth request, instead of redirecting the user to the login page,
            // since users of basic auth tends to be a program and won't see the redirection to the form
            // page as a failure
             authenticationEntryPoint = bean(BasicProcessingFilterEntryPoint) {
                realmName = "Jenkins"
            }
        },

Upvotes: 0

Stan
Stan

Reputation: 3461

You should remove authorizationStrategy and securityRealm in config.xml. Leave "useSecurity" as "true".

Upvotes: 2

Related Questions