With passthroughOnError set to true on Azure Content Safety Content Moderation policy request doesn't proceed
Nobody has claimed this yet.
- 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.
Steps to Reproduce
- 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.
- Configure an API proxy and point it to the backend you deployed.
- Add
Azure Content Safety Content Moderationpolicy at API level and setSeverity thresholdfor all categories to 1 and setpassthroughOnErrortotrue - Deploy the API and send a request that passes the validation
- Notice the logs in the backend (request should reach the backend)
- Send a request that fails validation
- 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
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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