Commit Graph
1961 Commits
Author SHA1 Message Date
Kohsuke Kawaguchi 0e339d7a45 [JENKINS-20064]
Jenkins now remembers the authorities (read group memberships) that the user had carried when he/she last time interactively logged in.
This information is exposed via User.impersonate(), which is used when using Jenkins SSH, Jenkins CLI, or access via API tokens.

Previously this was impossible for a subset of SecurityRealms that does not allow us to read group membership information without
successful login (such as Active Directory, OpenID, etc.)

For security reasons, if the backend determines that the user does not exist (as opposed to the backend who cannot tell if the user
exists or not), then the impersonation will fail.

I need to check AD plugin is reporting a failure correctly in this case, before marking as JENKINS-20064 fixed.
2014-03-11 14:55:25 -07:00
Kohsuke Kawaguchi 86fcc4733d added a convenience method. 2014-03-11 14:21:46 -07:00
Kohsuke Kawaguchi 983ee33df1 added a convenience method 2014-03-11 14:12:27 -07:00
Kohsuke Kawaguchi 2dbd6eca7f [JENKINS-11643]
An unexpected failure in processing remember me cookie should be handled
gracefully. In particular, possibly problematic cookie should be
removed, or else the browser will keep bombarding the server with the
same cookie, and will never be able to get through.

It's much better to just drop the cookie.
2014-03-11 12:17:11 -07:00
Kohsuke Kawaguchi b0f00aa7da the trunk is toward 1.556-SNAPSHOT 2014-03-10 07:46:48 -07:00
Kohsuke Kawaguchi 54fc890f05 the trunk is toward 1.555-SNAPSHOT 2014-03-03 07:01:05 -08:00
Kohsuke Kawaguchi bd4f6bcf4c merged back the RC branch 2014-03-03 06:58:15 -08:00
Kohsuke Kawaguchi ddf1a5267c [maven-release-plugin] prepare for next development iteration 2014-03-02 23:04:12 -08:00
Kohsuke Kawaguchi 1f28286ee6 [maven-release-plugin] prepare release jenkins-1.553 2014-03-02 23:04:12 -08:00
Kohsuke Kawaguchi 7b0daade1f Timestamp has expired 2014-03-02 22:25:53 -08:00
Jesse Glick 00d27176f3 [FIXED JENKINS-22001] Simpler fix of JENKINS-19446 that does not introduce asynchronous behavior. 2014-02-28 14:34:29 -05:00
Jesse Glick 334ce1be69 [JENKINS-21984] Disabling cert check on updateDirectlyWithJson since the certificate is now expired, and it is no good to have a test which is known to start failing at a particular time in the future! 2014-02-28 10:45:38 -05:00
Jesse Glick c87b7daf79 [JENKINS-21984] Checking stable UC as well. Cannot reproduce certificate problem in test. 2014-02-28 10:44:55 -05:00
Jesse Glick ef474202e5 @RandomlyFails 2014-02-26 18:42:54 -05:00
Jesse Glick 7c568178f3 [FIXED JENKINS-21958] FilePath.copyRecursiveTo given a scanner including a symlink but not any regular file in the same directory would neglect to create the parent directory on the destination and thus not copy the link.
(Util.createSymlink is partly to blame for not throwing a descriptive IOException when it fails to create a link,
but this is its historical behavior needed for compatibility.
copyRecursiveTo also continues to suppress error text from this method because there is nowhere for it to go.
Perhaps need a new variant of createSymlink that is guaranteed to either have created the link or throw an exception.)
2014-02-26 10:13:39 -05:00
Kohsuke Kawaguchi 011f4ceca8 the trunk is toward 1.554-SNAPSHOT 2014-02-25 07:18:40 -08:00
Jesse Glick fdda9ca656 [FIXED JENKINS-16332] Ensure that User records are saved when the fullName is not recoverable from the id.
Otherwise User.get(id).getFullName() after restarting Jenkins will produce the wrong result.
2014-02-23 17:48:44 -05:00
Jesse Glick 3ec7e562fe Trying to diagnose recent CI failures of HtmlUnit calls.
For example https://jenkins.ci.cloudbees.com/job/core/job/jenkins-core-validated-merge/38/testReport/lib.layout/LayoutTest/rejectedLinks/ failed with:
java.io.IOException: GET http://localhost:52099/jenkins/login failed
	at java.net.SocketInputStream.socketRead0(Native Method)
	at java.net.SocketInputStream.read(SocketInputStream.java:152)
	at java.net.SocketInputStream.read(SocketInputStream.java:122)
	at java.io.BufferedInputStream.fill(BufferedInputStream.java:235)
	at java.io.BufferedInputStream.read(BufferedInputStream.java:254)
	at org.apache.commons.httpclient.HttpParser.readRawLine(HttpParser.java:78)
	at org.apache.commons.httpclient.HttpParser.readLine(HttpParser.java:106)
	at org.apache.commons.httpclient.HttpConnection.readLine(HttpConnection.java:1116)
	at org.apache.commons.httpclient.MultiThreadedHttpConnectionManager$HttpConnectionAdapter.readLine(MultiThreadedHttpConnectionManager.java:1413)
	at org.apache.commons.httpclient.HttpMethodBase.readStatusLine(HttpMethodBase.java:1973)
	at org.apache.commons.httpclient.HttpMethodBase.readResponse(HttpMethodBase.java:1735)
	at org.apache.commons.httpclient.HttpMethodBase.execute(HttpMethodBase.java:1098)
	at org.apache.commons.httpclient.HttpMethodDirector.executeWithRetry(HttpMethodDirector.java:398)
	at org.apache.commons.httpclient.HttpMethodDirector.executeMethod(HttpMethodDirector.java:171)
	at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:397)
	at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:346)
	at com.gargoylesoftware.htmlunit.HttpWebConnection.getResponse(HttpWebConnection.java:101)
	at com.gargoylesoftware.htmlunit.WebClient.loadWebResponseFromWebConnection(WebClient.java:1456)
	at com.gargoylesoftware.htmlunit.WebClient.loadWebResponse(WebClient.java:1387)
	at com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:328)
	at com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:389)
	at com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:374)
	at org.jvnet.hudson.test.JenkinsRule$WebClient.goTo(JenkinsRule.java:1944)
	at org.jvnet.hudson.test.JenkinsRule$WebClient.goTo(JenkinsRule.java:1926)
	at lib.layout.LayoutTest.rejectedLinks(LayoutTest.java:44)
which makes little sense since the named IOException is actually thrown from HttpWebConnection.java:130.
Perhaps Surefire is not reporting the original cause correctly, conflating the wrapper’s message with the original stack trace.
As a temporary measure, printing the original stack trace to stderr if there is any.
2014-02-23 16:57:05 -05:00
Jesse Glick f360ce3ee0 Javadoc for Queue.Task claimed they were compared using .equals(), but in critical cases this was not actually true.
Does not matter for the common case of Job, but when implementing custom tasks this could cause duplicate queue items (and executables).
2014-02-20 11:05:32 -05:00
Jesse Glick b2c69b4a35 Split RawHtmlMarkupFormatter into a bundled plugin (antisamy-markup-formatter).
https://trello.com/c/NvZt4WXu/15-rawhtmlmarkupformatter
2014-02-17 12:22:53 -05:00
Kohsuke Kawaguchi 536f6a10c5 Merge branch 'master' of github.com:jenkinsci/jenkins 2014-02-14 19:29:53 -08:00
Kohsuke Kawaguchi 2e1d9f28fe the trunk is toward 1.553-SNAPSHOT 2014-02-14 18:31:51 -08:00
Kohsuke Kawaguchi c88698c0af [JENKINS-21261] while I originally misdiagnosed the problem, the test is still marginally useful. 2014-02-14 18:29:21 -08:00
Kohsuke Kawaguchi bdd8ca3fe4 merged back the RC branch 2014-02-14 16:34:44 -08:00
Kohsuke Kawaguchi 659aa543b0 [maven-release-plugin] prepare for next development iteration 2014-02-14 15:42:27 -08:00
Kohsuke Kawaguchi 2ba3eb60d6 [maven-release-plugin] prepare release jenkins-1.551 2014-02-14 15:42:26 -08:00
Jesse Glick 724f9e0dfc Strengthening the reverse proxy admin monitor to detect nontransparent slash encoding (/ vs. %2F).
Apache in its default configuration botches this: http://stackoverflow.com/a/9933890/12916
2014-02-13 15:04:32 -05:00
Jesse Glick abc77438d2 Merge branch 'security' into security-rc
Conflicts:
	core/src/main/java/hudson/Functions.java
	core/src/main/java/hudson/markup/MyspacePolicy.java
	core/src/main/java/hudson/util/RobustReflectionConverter.java
	core/src/main/resources/lib/layout/layout.jelly
	war/pom.xml
2014-02-11 21:00:54 -05:00
Jesse Glick b6b2a367a7 [FIXED SECURITY-109] SECURITY-55 fix to BuildTrigger configuration failed if downstream project was not visible. 2014-02-11 14:22:46 -05:00
Jesse Glick bf53919856 [FIXED SECURITY-93] PasswordParameterDefinition should serve existing default value in encrypted form.
And strengthen functional tests (using configRoundTrip) to ensure that the same mistake is not made elsewhere.
2014-02-11 14:19:39 -05:00
Kohsuke Kawaguchi da8eba20ba the trunk is toward 1.552-SNAPSHOT 2014-02-09 10:03:30 -08:00
Stefan Wolf be7a97ee32 [FIXED JENKINS-17606] Reuse existing fingerprint action if present.
Prevents multiple FingerprintActions.
2014-02-04 22:34:13 +01:00
CloudBees DEV@Cloud ef63ccac0a Merge commit 'cd526e99e63ae362f2d1ce1a04c3c68a38032a5c' 2014-02-04 16:35:04 +00:00
Jesse Glick cd526e99e6 [FIXED JENKINS-21023] Rewrote WorkspaceCleanupThread to determine where workspaces for known items should be, rather than looking for directories that look like they might be workspaces.
One key advantage is that this correctly handles the new default workspace location on the master.
Another is that this allows folders to be correctly skipped, and jobs in folders to be correctly deleted.
A subtler advantage would be handling of configured nondefault workspace locations, and compatibility with WorkspaceLocator.
(Orphaned workspaces from deleted jobs are not removed, but these were not removed before either.)
2014-02-04 11:34:14 -05:00
Ulli Hafner 48cb1304c5 Removed "Jenkins" prefix from plugin display names.
Since sorting of plugins in the update manager is based on displayName
this name should not have a common prefix otherwise it's hard to find
a given plugin name.
2014-02-04 15:25:31 +01:00
Oliver Gondža 380dad924e Merge pull request #1109 from olivergondza/JENKINS-21474
[JENKINS-21474] Fix NPE in View.getComputers()
2014-02-01 00:55:52 -08:00
Oliver Gondža e31f8dc2d3 [JENKINS-21474] Fix NPE in View.getComputers() 2014-01-31 23:59:25 +01:00
Kevin P. Fleming d33a73591d Remove unnecessary executable bits on source files 2014-01-31 08:38:07 -05:00
Oliver Gondža 3aa812fe1f Refactor CLI tests 2014-01-29 23:31:49 +01:00
Oliver Gondža 150b8de997 Merge pull request #1103 from olivergondza/refactor-offline-cause
Introduce `OfflineCause.UserCause`
2014-01-29 22:49:32 +01:00
Jesse Glick 08ab1b788f Let -Dignore.random.failures work on UpdateCenterTest, which is currently failing and so blocking validated merge. 2014-01-27 12:43:31 -08:00
Oliver Gondža 244e4dcd59 Introduce OfflineCause.UserCause 2014-01-27 18:34:52 +01:00
Kohsuke Kawaguchi 4f57fbea02 the trunk is toward 1.551-SNAPSHOT 2014-01-26 07:22:20 -08:00
Kohsuke Kawaguchi bea020fd6d the trunk is toward 1.550-SNAPSHOT 2014-01-20 18:14:25 -08:00
Kohsuke Kawaguchi 862bb2017d the trunk is toward 1.549-SNAPSHOT 2014-01-13 08:09:50 -08:00
Oliver Gondža c8930ed1b8 Refactor #992 2014-01-12 18:04:05 +01:00
Oliver Gondža 2767724185 Fix #992 2014-01-10 14:47:21 +01:00
Oliver Gondža 25d8b96c61 Merge pull request #992 from lvotypko/ViewTest
Add tests
2014-01-10 12:06:26 +01:00
Jesse Glick cb623640cc [FIXED JENKINS-18694] Generalizing fix of JENKINS-18678 to include also rename of parent folders, taking advantage of JENKINS-18028 API. 2014-01-09 12:40:48 -05:00
Jesse Glick 6815152cd4 Merge branch 'master' into TransientActionFactory-JENKINS-18224 2014-01-08 19:05:57 -05:00