wso2 / wso2/api-platform

With passthroughOnError set to true on Azure Content Safety Content Moderation policy request doesn't proceed

Open
#1,210 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Area/AIPolicies Area/Policies Aspect/API Severity/Minor Type/Bug
Dominant language
Go
Stars
71
Forks
111
Avg merge
1d 14h
Merged PRs (30d)
110

Description

Please select the area the issue is related to

Area/Policies (Policies, Policy Hub, Policy Engine etc)

Please select the aspect the issue is related to

Aspect/API (API backends, definitions, contracts, interfaces, OpenAPI)

Description

When passthroughOnError is set to true on Azure Content Safety Content Moderation policy, as per the description the request should proceed to the upstream. but it's blocked when the guardrail is triggered.

Image
Steps to Reproduce
  1. Deploy a self-hosted gateway (with Azure credentials added in config.toml) and a sample backend to log the request data on the same network.
  2. Configure an API proxy and point it to the backend you deployed.
  3. Add Azure Content Safety Content Moderation policy at API level and set Severity threshold for all categories to 1 and set passthroughOnError to true
  4. Deploy the API and send a request that passes the validation
  5. Notice the logs in the backend (request should reach the backend)
  6. Send a request that fails validation
  7. Notice that no new logs appear on the backend (when passthroughOnError is set to true requests should be sent to backend even if validation fails)
Severity Level of the Issue

Severity/Minor (Non-critical functionality. Can be fixed in future releases)

Environment Details (with versions)

No response

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the self-hosted gateway reproduction in the Steps to Reproduce, using Azure credentials and an API-level Azure Content Safety Content Moderation policy. Trace the policy handling for a failed validation when passthroughOnError is true; done means the request reaches the configured backend despite the guardrail failure, with coverage for both passing and failing requests.

Written by the indexing model from the issue text.

Assessment

Tech stack
azure, go
Domain
api, backend-api-design
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.