| Summary: | running of build fails with Unexpected error: Forbidden when Cross Site Request Forgery prevention is enabled | ||
|---|---|---|---|
| Product: | z_Archived | Reporter: | Terence Miller <cforce> |
| Component: | Mylyn | Assignee: | Steffen Pingel <steffen.pingel> |
| Status: | RESOLVED FIXED | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | CC: | cforce, klemens.muthmann, philipp.kapfer, taciano.tres |
| Version: | unspecified | Keywords: | helpwanted |
| Target Milestone: | 0.9 | ||
| Hardware: | PC | ||
| OS: | Windows XP | ||
| Whiteboard: | |||
| Bug Depends on: | 356788, 367573 | ||
| Bug Blocks: | |||
|
Description
Terence Miller
Can you check if an entry for the Jenkins username and password was created in the preferences under General > Secure Storage > Contents: org.eclipse.mylyn.commons.repository? Yes, there are two entries: org.eclipse.mylyn.tasklist.repositories.password org.eclipse.mylyn.tasklist.repositories.user I deleted secure storage, then saved user/pwd after "Validate" in Server properties in Build View via Secure Storage agaian - refreshed job List and selected gob to run. Same Error! Thanks for the information. The connector currently only support authenticating through HTTP. I suspect that authentication is failing since your server expects a different type of login. Is your server publicly accessible? If not, can you check if it uses the standard form-based login mechanism (e.g. http://mylyn.org/jenkins-latest/login?from=%2Fjenkins-latest%2F)? (In reply to comment #3) > Thanks for the information. The connector currently only support authenticating > through HTTP. I suspect that authentication is failing since your server > expects a different type of login. We use the build in ldap support to authtenticate , but standard http form based > Is your server publicly accessible? If not, can you check if it uses the > standard form-based login mechanism (e.g. > http://mylyn.org/jenkins-latest/login?from=%2Fjenkins-latest%2F)? Our login form looks similar in jekins lookup is done via ldap I managed to locate the origin of that bug. When i disable the checkbox "Prevent from Cross Site Request Forgery" attacks in Jenkins global settings the bug disappears. Mylyn can't handle the crumb security feature to prevent csrf attacks . That is a major secuity flaw in my opinion. Can you fix thta bug please! Tx for support. *** Bug 341414 has been marked as a duplicate of this bug. *** Thanks for investigating that. I don't agree that this a security flaw since it doesn't work. Obviously support for this security feature should be implemented to enable running of builds when the "Prevent from Cross Site Request Forgery" setting is active. I have updated the summary accordingly.
Request wise it looks like there is a script tag that initializes JavaScript magic:
<script>crumb.init(".crumb", "540de756e8c00c046a3a739a85cfe701");</script>
This causes an additional header to be included in the request:
.crumb: 540de756e8c00c046a3a739a85cfe701
I have committed a first pass at this. The fix is in master and will be available in the next weekly build (first week of 2012). A new weekly build now is available from http://eclipse.org/mylyn/downloads/#weekly . Please retry with the latest and reopen this bug if the problem persists. Starting a build job from inside Eclipse is failing again in newer versions of Jenkins (I'm currently using 2.121.1).
The crumb name has changed from ".crumb" to "Jenkins-Crumb":
<script>crumb.init("Jenkins-Crumb", "c4daeb35223b76650d04d5dda1d96cab");</script>
|