webhook icon indicating copy to clipboard operation
webhook copied to clipboard

How to pass a mutative token for validation

Open xblockchain opened this issue 5 years ago • 4 comments

For example,the webhook implemented with a programmable app,and user has a token to pass for identifing his passport,the token will be different each request,not just pass a github/bitbucket json config,you can't write a mutative token as a immutable parameter with validation.

Any idea for this?

xblockchain avatar May 02 '20 01:05 xblockchain

You'll likely need to rely on an outside program to validate the token. Today, I'd say you would need to pass all of that off to the execute-command.

@adnanh is working on a "pre-hook" feature that could be used to do the token validation (with an outside program) and inject the JSON validation results into the rules conditions.

But out of curiosity, how is your token calculated? What would you need in order to validate the token?

moorereason avatar May 02 '20 16:05 moorereason

@moorereason A single App for trigger auto deploy the repository,not from github/bitbucket,that need identity the user's passport,he should be has a permission to execute the trigger action,so a token should be designed for this.

By the way,if a outside program designed,it seems a little complicated,if the developer will program with the new feature via adnanh,why not do the whole plan himself,adnanh will be not necessary

xblockchain avatar May 04 '20 00:05 xblockchain

Looking at this request again today, I'm not sure I understand exactly what you're wanting.

Can you mock up an example of how you would like this to work?

moorereason avatar Jun 06 '20 01:06 moorereason

@moorereason an example could be a TOTP implementation, something #356 could help with.

adnanh avatar Feb 28 '21 09:02 adnanh