admin管理员组文章数量:1318573
I have configured my openapi.yaml to restrict access to one of the API endpoints with the following quota settings:
x-google-management:
metrics:
- name: "read-requests"
displayName: "Read requests"
valueType: INT64
metricKind: DELTA
quota:
limits:
- name: "read-limit"
metric: "read-requests"
unit: "1/min/{project}"
values:
STANDARD: 3
Here is the relevant path configuration:
paths:
/v1/foo:
get:
summary: foo Data
operationId: fooData
x-google-backend:
path_translation: APPEND_PATH_TO_ADDRESS
address: ${PUB_API_FNC_URL}
x-google-quota:
metricCosts:
"read-requests": 1
*the backend of the api gateway path is a cloud function
Issue: When I add the x-api-key header to the request, the quota limits are not being enforced, regardless of the value provided in the header. However, when the x-api-key header is not included, the quota works as expected.
Details:
There are no security definitions configured in the OpenAPI spec. The x-api-key is not explicitly associated with any project in the configuration.
Any idea why this header "breaks" the api quota enforcement?
版权声明:本文标题:google cloud platform - Quota Limits Not Respected When Using x-api-key Header in API Gateway - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1742048607a2417940.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论