stable

Clone or download

Read-only

Add a token to Jenkins Tuleap plugin hook trigger payload to be able to authenticate the trigger

A token is added to the payload sent on trigger. Jenkins plugin can call `POST /jenkins_tuleap_hook_trigger_check` to make sure the token is valid and that the request has been sent by Tuleap. Part of request #28257: Missing authentication of webhook requests made to the Jenkins Branch Source plugin Change-Id: I288f0da7cffa7e769c208df84ea1301d8cc1d645

Modified Files

Name
M plugins/hudson_git/include/HudsonGit/Hook/JenkinsTuleapBranchSourcePluginHook/JenkinsTuleapPluginHookPayload.php +12 −4 Go to diff View file
A plugins/hudson_git/include/HudsonGit/Hook/JenkinsTuleapBranchSourcePluginHook/JenkinsTuleapPluginHookTokenGenerator.php +30 −0 Go to diff View file
A plugins/hudson_git/include/HudsonGit/Hook/JenkinsTuleapBranchSourcePluginHook/JenkinsTuleapPluginHookTokenGeneratorCryptoBased.php +41 −0 Go to diff View file
A plugins/hudson_git/include/HudsonGit/Hook/JenkinsTuleapBranchSourcePluginHook/JenkinsTuleapPluginHookTokenVerifier.php +31 −0 Go to diff View file
A plugins/hudson_git/include/HudsonGit/Hook/JenkinsTuleapBranchSourcePluginHook/JenkinsTuleapPluginHookTokenVerifierController.php +53 −0 Go to diff View file
A plugins/hudson_git/include/HudsonGit/Hook/JenkinsTuleapBranchSourcePluginHook/JenkinsTuleapPluginHookTokenVerifierCryptoBased.php +65 −0 Go to diff View file
M plugins/hudson_git/include/hudson_gitPlugin.php +24 −3 Go to diff View file
M plugins/hudson_git/tests/unit/HudsonGit/Hook/JenkinsTuleapBranchSourcePluginHook/JenkinsTuleapPluginHookPayloadTest.php +18 −9 Go to diff View file
A plugins/hudson_git/tests/unit/HudsonGit/Hook/JenkinsTuleapBranchSourcePluginHook/JenkinsTuleapPluginHookTokenGeneratorCryptoBasedTest.php +40 −0 Go to diff View file
A plugins/hudson_git/tests/unit/HudsonGit/Hook/JenkinsTuleapBranchSourcePluginHook/JenkinsTuleapPluginHookTokenVerifierControllerTest.php +70 −0 Go to diff View file
A plugins/hudson_git/tests/unit/HudsonGit/Hook/JenkinsTuleapBranchSourcePluginHook/JenkinsTuleapPluginHookTokenVerifierCryptoBasedTest.php +100 −0 Go to diff View file