Azure / Azure/api-management-policy-snippets

Invalid Policy Expression Sample

Open
#117 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
No language data
Stars
399
Forks
170
PR merge metrics
No merged PRs in 30d

Description

Policy example [Get OAuth2 access token from AAD using client id and certificate using key vault manage identity](https://github.com/Azure/api-management-policy-snippets/blob/f647c32a7eaf392a9935e2fef9bb1d13a399207d/examples/Get%20OAuth2%20access%20token%20from%20AAD%20using%20client%20id%20and%20certificate%20using%20key%20vault%20manage%20identity.xml#L65) uses RSACng for its signing operations. However, per the [APIM Policy Allowed Types list](https://learn.microsoft.com/en-us/azure/api-management/api-management-policy-expressions#CLRTypes) this is not an allowed type and attempting to use this type in an APIM policy results in the error message `Usage of type 'System.Security.Cryptography.RSACng' is not supported within expressions`

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with the linked XML example at line 65 and compare its signing type with the APIM Policy Allowed Types list. Check how the sample behaves when evaluated as an APIM policy; done means the example no longer relies on the unsupported type and the reported error is resolved.

Written by the indexing model from the issue text.

Assessment

Tech stack
azure
Domain
api
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.