Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Jsonnet flag to skip triggering of web hook #4130

Open
3 of 5 tasks
renom opened this issue Sep 30, 2024 · 2 comments
Open
3 of 5 tasks

Jsonnet flag to skip triggering of web hook #4130

renom opened this issue Sep 30, 2024 · 2 comments
Labels
feat New feature or request.

Comments

@renom
Copy link

renom commented Sep 30, 2024

Preflight checklist

Ory Network Project

No response

Describe your problem

Our project needs to run a web hook for a specific identity schema only.

Describe your ideal solution

Setting a specific key in jsonnet to skip triggering of the web hook, for example:

function(ctx) {
  ory.sh/kratos/skip: ctx.identity.schema_id != "specific_schema_id",
}

Then the web hook will be skipped if schema_id isn't "specific_schema_id".

Workarounds or alternatives

Alternative solution would be adding a list of allowed schemas to web hook config:

  - hook: web_hook
    config:
      url: <web_hook_url>
      method: POST
      body: request-data.jsonnet
+     allowed_schemas: ["schema_id_1", "schema_id_2", ...]

Version

1.3.0

Additional Context

No response

@renom renom added the feat New feature or request. label Sep 30, 2024
@renom
Copy link
Author

renom commented Sep 30, 2024

Sorry, it seems "interrupting" is a wrong word to describe what I meant here.
It should be more like skipping of triggering web hook remote url, without actual interrupting of flow.
E.g. a remote url is triggered only for specific schemas, while for the others a web hook will be just skipped without an error or interrupting of the flow.
I'll update the description of the issue.

@renom renom changed the title Interrupting flow from web hook jsonnet Jsonnet flag to skip triggering of web hook Sep 30, 2024
@renom
Copy link
Author

renom commented Sep 30, 2024

Done.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feat New feature or request.
Projects
None yet
Development

No branches or pull requests

1 participant