Azure / Azure/azure-api-management-policy-toolkit

Supported policies in emulator

Open
#58 0 comments 1 reaction 0 assignees View on GitHub
enhancement
Dominant language
C#
Stars
94
Forks
36
Avg merge
2d 6m
Merged PRs (30d)
6

Description

Currently, the Policy Toolkit supports a limited set of policies in the emulator. We aim to extend this support to include all policies available in Azure API Management, as detailed in the [documentation](https://learn.microsoft.com/en-us/azure/api-management/api-management-policies). The goal of this issue is to track the implementation of the remaining policies. The implementation of policies in the compiler will be tracked by other issues.

External contributors are warmly invited to participate in this issue. Your feedback is invaluable to us, and we encourage you to engage in the following ways:

- Cast your vote in the comments on which policies should be prioritized next.
- Share in the comments which policy are you interested in implementing to enhance our toolkit.

List of policies

```[tasklist]
- [x] [authentication-basic](https://learn.microsoft.com/en-us/azure/api-management/authentication-basic-policy)
- [x] [authentication-certificate](https://learn.microsoft.com/en-us/azure/api-management/authentication-certificate-policy)
- [x] [authentication-managed-identity](https://learn.microsoft.com/en-us/azure/api-management/authentication-managed-identity-policy)
- [ ] [azure-openai-emit-token-metric](https://learn.microsoft.com/en-us/azure/api-management/azure-openai-emit-token-metric-policy)
- [ ] [azure-openai-semantic-cache-lookup](https://learn.microsoft.com/en-us/azure/api-management/azure-openai-semantic-cache-lookup-policy)
- [ ] [azure-openai-semantic-cache-store](https://learn.microsoft.com/en-us/azure/api-management/azure-openai-semantic-cache-store-policy)
- [ ] [azure-openai-token-limit](https://learn.microsoft.com/en-us/azure/api-management/azure-openai-token-limit-policy)
- [ ] [cache-lookup](https://learn.microsoft.com/en-us/azure/api-management/cache-lookup-policy)
- [x] [cache-lookup-value](https://learn.microsoft.com/en-us/azure/api-management/cache-lookup-value-policy)
- [ ] [cache-store](https://learn.microsoft.com/en-us/azure/api-management/cache-store-policy)
- [x] [cache-store-value](https://learn.microsoft.com/en-us/azure/api-management/cache-store-value-policy)
- [x] [cache-remove-value](https://learn.microsoft.com/en-us/azure/api-management/cache-remove-value-policy)
- [ ] [check-header](https://learn.microsoft.com/en-us/azure/api-management/check-header-policy)
- [x] [choose](https://learn.microsoft.com/en-us/azure/api-management/choose-policy)
- [ ] [cors](https://learn.microsoft.com/en-us/azure/api-management/cors-policy)
- [ ] [cross-domain](https://learn.microsoft.com/en-us/azure/api-management/cross-domain-policy)
- [ ] [emit-metric](https://learn.microsoft.com/en-us/azure/api-management/emit-metric-policy)
- [ ] [find-and-replace](https://learn.microsoft.com/en-us/azure/api-management/find-and-replace-policy)
- [ ] [forward-request](https://learn.microsoft.com/en-us/azure/api-management/forward-request-policy)
- [ ] [get-authorization-context](https://learn.microsoft.com/en-us/azure/api-management/get-authorization-context-policy)
- [ ] [include-fragment](https://learn.microsoft.com/en-us/azure/api-management/include-fragment-policy)
- [ ] [invoke-dapr-binding](https://learn.microsoft.com/en-us/azure/api-management/invoke-dapr-binding-policy)
- [ ] [ip-filter](https://learn.microsoft.com/en-us/azure/api-management/ip-filter-policy)
- [ ] [jsonp](https://learn.microsoft.com/en-us/azure/api-management/jsonp-policy)
- [ ] [json-to-xml](https://learn.microsoft.com/en-us/azure/api-management/json-to-xml-policy)
- [ ] [limit-concurrency](https://learn.microsoft.com/en-us/azure/api-management/limit-concurrency-policy)
- [ ] [llm-emit-token-metric](https://learn.microsoft.com/en-us/azure/api-management/llm-emit-token-metric-policy)
- [ ] [llm-semantic-cache-lookup](https://learn.microsoft.com/en-us/azure/api-management/llm-semantic-cache-lookup-policy)
- [ ] [llm-semantic-cache-store](https://learn.microsoft.com/en-us/azure/api-management/llm-semantic-cache-store-policy)
- [ ] [llm-token-limit](https://learn.microsoft.com/en-us/azure/api-management/llm-token-limit-policy)
- [ ] [log-to-eventhub](https://learn.microsoft.com/en-us/azure/api-management/log-to-eventhub-policy)
- [ ] [mock-response](https://learn.microsoft.com/en-us/azure/api-management/mock-response-policy)
- [ ] [proxy](https://learn.microsoft.com/en-us/azure/api-management/proxy-policy)
- [ ] [publish-to-dapr](https://learn.microsoft.com/en-us/azure/api-management/publish-to-dapr-policy)
- [ ] [quota](https://learn.microsoft.com/en-us/azure/api-management/quota-policy)
- [ ] [quota-by-key](https://learn.microsoft.com/en-us/azure/api-management/quota-by-key-policy)
- [ ] [rate-limit](https://learn.microsoft.com/en-us/azure/api-management/rate-limit-policy)
- [ ] [rate-limit-by-key](https://learn.microsoft.com/en-us/azure/api-management/rate-limit-by-key-policy)
- [ ] [redirect-content-urls](https://learn.microsoft.com/en-us/azure/api-management/redirect-content-urls-policy)
- [ ] [retry](https://learn.microsoft.com/en-us/azure/api-management/retry-policy)
- [x] [return-response](https://learn.microsoft.com/en-us/azure/api-management/return-response-policy)
- [ ] [rewrite-uri](https://learn.microsoft.com/en-us/azure/api-management/rewrite-uri-policy)
- [ ] [send-one-way-request](https://learn.microsoft.com/en-us/azure/api-management/send-one-way-request-policy)
- [ ] [send-request](https://learn.microsoft.com/en-us/azure/api-management/send-request-policy)
- [ ] [set-backend-service](https://learn.microsoft.com/en-us/azure/api-management/set-backend-service-policy)
- [ ] [set-backend-service (Dapr)](https://learn.microsoft.com/en-us/azure/api-management/set-backend-service-dapr-policy)
- [x] [set-body](https://learn.microsoft.com/en-us/azure/api-management/set-body-policy)
- [x] [set-header](https://learn.microsoft.com/en-us/azure/api-management/set-header-policy)
- [x] [set-method](https://learn.microsoft.com/en-us/azure/api-management/set-method-policy)
- [x] [set-query-parameter](https://learn.microsoft.com/en-us/azure/api-management/set-query-parameter-policy)
- [ ] [set-status](https://learn.microsoft.com/en-us/azure/api-management/set-status-policy)
- [x] [set-variable](https://learn.microsoft.com/en-us/azure/api-management/set-variable-policy)
- [ ] [trace](https://learn.microsoft.com/en-us/azure/api-management/trace-policy)
- [ ] [validate-azure-ad-token](https://learn.microsoft.com/en-us/azure/api-management/validate-azure-ad-token-policy)
- [ ] [validate-client-certificate](https://learn.microsoft.com/en-us/azure/api-management/validate-client-certificate-policy)
- [ ] [validate-content](https://learn.microsoft.com/en-us/azure/api-management/validate-content-policy)
- [ ] [validate-headers](https://learn.microsoft.com/en-us/azure/api-management/validate-headers-policy)
- [ ] [validate-jwt](https://learn.microsoft.com/en-us/azure/api-management/validate-jwt-policy)
- [ ] [validate-odata-request](https://learn.microsoft.com/en-us/azure/api-management/validate-odata-request-policy)
- [ ] [validate-parameters](https://learn.microsoft.com/en-us/azure/api-management/validate-parameters-policy)
- [ ] [validate-status-code](https://learn.microsoft.com/en-us/azure/api-management/validate-status-code-policy)
- [ ] [wait](https://learn.microsoft.com/en-us/azure/api-management/wait-policy)
- [ ] [xml-to-json](https://learn.microsoft.com/en-us/azure/api-management/xml-to-json-policy)
- [ ] [xsl-transform](https://learn.microsoft.com/en-us/azure/api-management/xsl-transform-policy)
```


Excluded policies

Please note that this initiative does not include the implementation of GraphQL resolver policies, as the creation of GraphQL policy documents is not yet supported. The development of these policies will be done once we introduce GraphQL policy document capabilities to the toolkit.

- [cosmosdb-data-source](https://learn.microsoft.com/en-us/azure/api-management/cosmosdb-data-source-policy)
- [http-data-source](https://learn.microsoft.com/en-us/azure/api-management/http-data-source-policy)
- [publish-event](https://learn.microsoft.com/en-us/azure/api-management/publish-event-policy)
- [sql-data-source](https://learn.microsoft.com/en-us/azure/api-management/sql-data-source-policy)
- [validate-graphql-request](https://learn.microsoft.com/en-us/azure/api-management/validate-graphql-request-policy)


Contributor guide

Open the contributing guide

Research direction

Start with docs/AvailablePolicies.md and the linked Azure API Management policy documentation to choose one unchecked policy. Confirm the policy belongs in the emulator rather than the separately tracked compiler work; done means that selected remaining policy is supported in the emulator and its checklist entry reflects the implementation.

Written by the indexing model from the issue text.

Assessment

Tech stack
azure, csharp
Domain
api, backend-api-design
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.