Commit Graph
1981 Commits
Author SHA1 Message Date
Kohsuke Kawaguchi 0db32ecaa1 Clarifying assertions that they are trying to test. 2014-03-14 14:42:51 -07:00
Kohsuke Kawaguchi bd8234cceb Fixing a test failure.
The intent of this test is to make sure that a floating User object without any storage returns false from canDelete() method.
The earlier change made User.impersonate() to actually check if the user is a valid, so to make this test case work where it does
"user.impersonate" and "user2.impersonate2", I'm creating valid accounts for these two users.

Now what that means is that user2 is no longer a floating flyweight storage-less User, so it breaks the assumption of the
"User should not be able to delete because he is not saved." assertion.

To make this test case work, I'm introducing the 3rd user that is storage-less, and using it for the test.
2014-03-14 14:39:27 -07:00
Jesse Glick 2b6726290d Merge branch 'deconstructing-AbstractProject' 2014-03-14 13:29:11 -04:00
Kohsuke Kawaguchi f04b0e011a User.impersonate now requires that the user be a valid user.
These tests weren't using a SecurityRealm that recognizes these user names
2014-03-14 10:17:36 -07:00
Kohsuke Kawaguchi 2a78c10b94 Updating tests to fix more regressions 2014-03-14 10:17:36 -07:00
Kohsuke Kawaguchi 38ae112093 LastGrantedAuthoritiesProperty was missing a descriptor 2014-03-13 15:42:25 -07:00
Kohsuke Kawaguchi 16d0bc3fa9 More test fixes 2014-03-13 15:19:44 -07:00
Kohsuke Kawaguchi 664f7e3400 More test fixes 2014-03-13 13:31:04 -07:00
Kohsuke Kawaguchi e400bc7d94 Working toward fixing regressions.
So far none of them are real regressions but just that I needed to update tets
2014-03-13 12:48:27 -07:00
Kohsuke Kawaguchi ddf391cfec Updating test to fix failures.
Now that User.impersonate() actually checks if the user is valid, User.get("user").impersonate() is expected to fail.
Use a DummySecurityRealm to make this user a valid user.
2014-03-13 12:48:27 -07:00
Jesse Glick 5a01c0b7c5 Merge branch 'master' into deconstructing-AbstractProject 2014-03-13 10:37:21 -04:00
Kohsuke Kawaguchi 80b1cf9f8b Remember Me option doesn't always show. 2014-03-12 20:56:27 -07:00
Kohsuke Kawaguchi ce7e6390ee Adding the reload job functionality 2014-03-12 18:18:17 -07:00
Kohsuke Kawaguchi b478ca8904 Merge branch 'master' of github.com:jenkinsci/jenkins 2014-03-11 16:32:16 -07:00
Kohsuke Kawaguchi b078ac62f5 added another test for the basic remember-me flow 2014-03-11 16:22:40 -07:00
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
CloudBees DEV@Cloud f488ba8cbb Merge REMERGE_HEAD into HEAD 2014-03-11 19:39:52 +00: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
Jesse Glick fb0ad71b71 Ensure that resolveDependencyJar works for NetBeans compile-on-save (and possibly other IDE’s similar features) even when plugin dependencies are snapshots (possibly in the reactor). 2014-03-11 14:15:26 -04:00
Jesse Glick 71a29a7bac Merge branch 'master' into deconstructing-AbstractProject 2014-03-11 09:36:42 -04:00
Kohsuke Kawaguchi b0f00aa7da the trunk is toward 1.556-SNAPSHOT 2014-03-10 07:46:48 -07:00
Jesse Glick d1b713a4d8 Renaming the newly introduced method avoids the need for an ambiguous overload. 2014-03-07 19:35:25 -08:00
Jesse Glick 9f19ae91f7 Introduced ParameterizedJobMixIn so that non-AbstractProject’s can use ParametersDefinitionProperty. 2014-03-07 11:44:28 -08: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