Welcome to the Microsoft Q&A!
Thanks for the patience! Following up on your question regarding JWT token validation with Azure Event Grid Namespace, I've received confirmation from our Event Grid SME team.
Azure Event Grid Namespace offers the ability to validate JWT tokens using custom settings. Specifically, you can provide your public key for validation using the CustomJwtAuthenticationSettings
. This is available via the Azure CLI and the 2024-12-15-preview API version.
There are two options for providing the certificate information:
Using Azure Key Vault (AKV): You can reference certificates stored in AKV by providing the certificate URL and a managed identity.
Providing the Public Key Directly (Non-AKV): You can directly provide the public key in PEM format. This is the option you were inquiring about.
Here's a snippet illustrating both options:
"customJwtAuthentication": {
"tokenIssuer": "issuer-name",
// AKV option
"issuerCertificates": [
{
"certificateUrl": "<AKV cert url>",
"identity": {
"type": "SystemAssigned"
}
}
],
// Non-AKV option for specifying certificates with public key
"encodedIssuerCertificates": [
{
"kid": "key1",
"encodedCertificate": "<certificate in PEM format>"
}
]
}
As you can see, the encodedIssuerCertificates
array allows you to specify the public key directly using the encodedCertificate
field (PEM format) and associate it with a key ID (kid
).
For more details, you can refer to the official documentation: Namespaces - Create Or Update - REST API (Azure Event Grid) | Microsoft Learn
Please let me know if you have any further questions.