jenkins-control-plugin icon indicating copy to clipboard operation
jenkins-control-plugin copied to clipboard

Does not work with form-based authentication

Open jirutka opened this issue 12 years ago • 4 comments

Does this plugin support form-based authentication? It does not work for me, when I enter URL, username and whatever password in the settings dialog, then “Test Connection returns [Fail] Server Internal Error: Server Unavailable”. I’m using HTTPS with trusted certificate.

jirutka avatar Apr 13 '13 17:04 jirutka

Hi,

I use HttpClient to handle connection with the server and the redirection too (e.g: Apache/Ngnix in front and Tomcat in back). Could you please give me detail about it?

Thanks,

David

dboissier avatar Apr 15 '13 22:04 dboissier

I’m running Jenkins on Tomcat 7 with nginx as a reverse proxy in front. Jenkins is configured with a servlet container authentication (i.e. Tomcat; I need mixed auth LDAP + local users) and Project-based Matrix Authorization Strategy.

When I click to Test Connection, then this appears in my nginx log: x.x.x.x - jirutjak [16/Apr/2013:00:22:18 +0200] "POST /api/json?tree=nodeName HTTP/1.1" 500 2433 "-" "Jakarta Commons-HttpClient/3.1" "-"

It seems that it’s not about privileges, I’ve tested it as an ordinary user and admin as well.

EDIT: I’ve just tried to catch some packets and the problem is really with form authentication, the plugin uses just HTTP Basic header. However, form authentication is the default one in the current Jenkins versions.

HTTP Status 500 - anonymous is missing the Read permission
hudson.security.AccessDeniedException2: anonymous is missing the Read permission

This page advices to use API token for authentication.

jirutka avatar Apr 15 '13 22:04 jirutka

Hi,

Dealing with Jenkins security is tricky. I will look at it and provide an option to handle authentication token-based.

FYI, IntelliJ embeds HttpClient 3.1, not the latest 4.0. I hope I will be able to make it works with that legacy lib.

dboissier avatar Apr 16 '13 09:04 dboissier

Hi,

It is quite complicated to deal with the legacy http-commons 3.0. When IntelliJ embed HttpClient 4.0, I will migrate the code.

Sorry,

David

dboissier avatar Jun 18 '13 22:06 dboissier

I think it is closed because we use newer http client library within Idea. If not please reopen or file a new issue.

MCMicS avatar Aug 11 '23 16:08 MCMicS