This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 223765

Summary: Support for running hudson job from IDE when CSRF is on.
Product: connecteddeveloper Reporter: Tomas Danek <musilt2>
Component: HudsonAssignee: Jaroslav Havlin <jhavlin>
Status: NEW ---    
Severity: normal    
Priority: P3    
Version: 7.3   
Hardware: PC   
OS: Windows 7   
Issue Type: ENHANCEMENT Exception Reporter:

Description Tomas Danek 2012-12-13 12:20:57 UTC
Product Version: NetBeans IDE Dev (Build 201212100001)
Updates: Updates available
Java: 1.7.0_09; Java HotSpot(TM) Client VM 23.5-b02
Runtime: Java(TM) SE Runtime Environment 1.7.0_09-b05
System: Windows 7 version 6.1 running on x86; Cp1252; en_US (nb)
User directory: C:\Users\tester\AppData\Roaming\NetBeans\dev
Cache directory: C:\Users\tester\AppData\Local\NetBeans\Cache\dev
--------------------
- have a local hudson running with job created by IDE (e.g. create anagram game sample, version it in Git and create a build job)
- enable security on hudson (hudson own user DB, allow sign up, logged in users can do anything)
- sign up, create some user
- logout from web
- from netbeans, register this hudson
- try to run a build on your sample project -> login dialog appears
- fill in username/password

---> another login dialog appears requesting API token, with button "Find". Pushing find navigates to URL like http://localhost:8080/user/tomas/configure ...where I see no way of getting any token to specify -> Problem #1

Assuming it's about remote token which is part of job configuration. Go to a web browser, specify remote token of concerned job, and type this token to IDE dialog, push OK. Now I'm back again to login to hudson dialog, and cycling between login and token dialog forever which no way to run job -> Problem #2 

Am I doing anything wrong?
Comment 1 Tomas Danek 2012-12-13 13:45:17 UTC
ok, just figurred why this does not work in my case: There's CSRF prevention in hudson config turned on. After turning it off, it works. Makinf RFE to be able to deal with this.
See also http://wiki.netbeans.org/FaqHudsonStartJob