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

[Feature] Mutator Hooks #872

Closed
VisargD opened this issue Jan 18, 2025 · 0 comments · Fixed by #870
Closed

[Feature] Mutator Hooks #872

VisargD opened this issue Jan 18, 2025 · 0 comments · Fixed by #870
Assignees
Labels

Comments

@VisargD
Copy link
Collaborator

VisargD commented Jan 18, 2025

Gateway currently allow hooks of type guardrail. These hooks perform various checks and validations and then return a boolean verdict. But there are various use cases where the context of request needs to be transformed based on hook results. In order to achieve this, we will be introducing a new type of hook called mutator.

Mutator hooks will have the capability of transforming the request and response instead of just passing a verdict. These hooks can then be used for various use cases like PII redaction, PHI redaction, Regex based redaction, etc. And these hooks can also be further extended to implement custom logic like abstracting out the configs and provider configs.

For the first release, we will be implementing it for the redaction use case for existing plugins like portkey.pii, pangea.pii, etc. But the hooks middleware itself will be capable of mutating any other parts of the body and headers.

@VisargD VisargD self-assigned this Jan 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant