Comments (7)
Im nor really sure what you are trying to do. You can configure a token in the plugin for a specific job. That token will need to be supplied when trying to trigger that job.
There is also HMAC verification which is something completely different. Not sure if maby that is what you want.
from generic-webhook-trigger-plugin.
@tomasbjerre What I'm saying is when I configure the token it does not work, because Github does not call the webhook with any of the accepted ways to authenticate the token.
So yeah, I'm asking for the plugin to support secret keys with Github. That happens to be HMAC verification.
from generic-webhook-trigger-plugin.
"The job also appears configured correctly barring the token, given it triggers if I call the invoke URL manually" what is the exact URL that you trigger?
"does not send a 'token' like the plugin expects" but your supplied pipeline code does not contain any token.
If you are browsing to the trigger URL, you might already be authenticated and that is why the job is found and triggered.
If you add the same URL to GitHub is will not be authenticated and not find any jobs to trigger.
If you configure a token in the plugin, the jobs with that token will be found even if you are not authenticated. So that is one thing to try, try to configure a token and add the URL with token query parameter in GitHub.
from generic-webhook-trigger-plugin.
If you configure a token in the plugin, the jobs with that token will be found even if you are not authenticated. So that is one thing to try, try to configure a token and add the URL with token query parameter in GitHub.
This actually works as a solution here, though not the most ideal as it exposes the token in the repo settings. Feel free to close it. Implementing the Github auth scheme would be nice, but it is hardly required.
"does not send a 'token' like the plugin expects" but your supplied pipeline code does not contain any token.
The token is set outside of the pipeline.
"If you are browsing to the trigger URL, you might already be authenticated and that is why the job is found and triggered."
If you add the same URL to GitHub is will not be authenticated and not find any jobs to trigger.
That is correct. I just spoke about that to clarify the setup scheme is actually working.
from generic-webhook-trigger-plugin.
What is the problem with exposing the token? It can only be used to trigger the job.
If you dont want anyone to be able to trigger the job, you should also use the whitelist feature. https://github.com/jenkinsci/generic-webhook-trigger-plugin?tab=readme-ov-file#whitelist-hosts
from generic-webhook-trigger-plugin.
An exposed token is less secure, in any case, not a big deal. Who knows what one may be triggering with that token. Jobs can do just about anything.
If you dont want anyone to be able to trigger the job, you should also use the whitelist feature.
Not an effective solution when it requires whitelisting all of Github's IPs in this situation.
from generic-webhook-trigger-plugin.
If you let each job have their own token, you will only be able to trigger one job with the token.
You may also want to use the regexp filter when resolving values from the webhook to only allow numbers or whatever you expect them to be.
Also you can whitelist all IP:s and use HMAC.
from generic-webhook-trigger-plugin.
Related Issues (20)
- Reload trigger configuration from scm HOT 5
- Buildcause no longer detected since Jenkins update? HOT 3
- Not compatible with the "Trigger builds remotely" configuration option HOT 2
- The JSON response is not shown in Jenkins log, even if it is configured to be shown HOT 4
- Link is dead HOT 1
- Expose request JSON payload as an object in a variable
- All branches are triggered instead of one specific HOT 6
- Failed to invoke the trigger and get 500 error code HOT 1
- Generic Webhook trigger plugin and webhook configuration HOT 3
- Add a way to test a webhook is triggered but doesn't actually run the job (dry run) HOT 3
- Internal error (Error 500) HOT 9
- A token was supplied.\nIf you are using a token, you need to pass it like ...trigger/invoke?token=TOKENHERE\nIf you are not using a token HOT 7
- When jenkins pipeline fails the input value of the Token field gets empty. HOT 1
- Multiplying triggers HOT 1
- Help wanted: Okta one-time verification HOT 1
- Possible to clear cache on demand? HOT 4
- Can't export branch name HOT 1
- Existing jobs configured with JobDSL are not immediately registered with generic webook HOT 6
- New jobs created with Jenkins REST API are not immediately registered with generic webook HOT 9
- 125/5000 gitlab webhook has the following error: {"jobs":null,"message":"Did not find any jobs with GenericTrigger configured! \nA token was supplied.\n"} HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from generic-webhook-trigger-plugin.