spedou opened a new issue, #12483:
URL: https://github.com/apache/apisix/issues/12483

   ### Description
   
   Hello!
   
   Im using OpenID-connect plugin against Auth0 for an m2m authentication.
   I'm trying to use it with the rate-limit plugin, using the azp value from 
the jwt, but i'm not sure if this feature is supported.
   
   `
   apiVersion: apisix.apache.org/v2
   kind: ApisixRoute
   metadata:
     name: external-cv-route
   spec:
     http:
       - name: external-route-to-cv
         match:
           paths:
             - /api/cv/*
           - name: openid-connect
             enable: true
             config:
               bearer_only: true
               discovery: 
https://domain.auth0.com/.well-known/openid-configuration
               client_id: cv # WIll match the audience and authorize cv as aud 
value
               client_secret: dummy 
               use_jwks: true
               claim_validator:
                 audience:
                   required: true
                   match_with_client_id: true
           - name: limit-count
             enable: true
             config:
               count: 2             
               time_window: 30         
               key: $jwt_claim_azp        # Auth0 client ID
               rejected_code: 429
               policy: local
               key_type: var_combination
         backends:
           - serviceName: cv
             servicePort: 9191
   `
   
   I'm not sure if this variable "$jwt_claim_azp" exists? I could make it work 
with $http_authorization, but is not the ideal, because token could be 
regenerated, and I would be able to filter by "application/client"
   
   
   ### Environment
   
   - APISIX version (run `apisix version`): 2.11.3 (Helm)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to