Alex Michel
Alex Michel

Reputation: 436

Azure ApiM unable to create jwt token validation policy with RSA certificate

According to documentation in Azure API Management it is possible to create JWT token validation policy using certificate id of RSA certificate previously uploaded to APIM.

I am trying to build such policy as described in the docs, and it is saved without errors, but when I open the policy definition again, key element is always empty, without the certificate-id attribute I set earlier.

https://learn.microsoft.com/en-us/azure/api-management/api-management-access-restriction-policies#token-validation-with-rsa-certificate

enter image description here

Upvotes: 0

Views: 542

Answers (1)

Joy Wang
Joy Wang

Reputation: 42063

I can also reproduce your issue on my side, after configuration and come back, the policy will be like below.

enter image description here

It looks should be a bug in UI, because if you get the policy with PowerShell Get-AzApiManagementPolicy or REST API - Api Policy - Get directly, we can get the value. So I think the policy should be applied, just ignore it and go on.

Powershell:

$ApiMgmtContext = New-AzApiManagementContext -ResourceGroupName "groupname" -ServiceName "joyapim"
Get-AzApiManagementPolicy -Context $ApiMgmtContext -ApiId 'echo-api'

enter image description here

REST API:

enter image description here

Upvotes: 0

Related Questions