-
Notifications
You must be signed in to change notification settings - Fork 34
bug: fixes incorrect parsing of quota and rate limit #246 #247
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
kurtkanaskie
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Policy names are being split by '-' character.
x-google-quota:
# using "post-pet" as the name, results in a policy named "Quota-post", post_pet works
- name: post_pet
This affects x-google-quota when using quota config in product
x-google-quota:
- name: preflow_product
useQuotaConfigInAPIProduct: Verify-API-Key-api_key
Proxy bundle contains a quota policy with an incorrect stepName reference:
<Quota async="false" continueOnError="false" enabled="true" type="calendar" name="Quota-preflow_product">
<DisplayName>Quota-preflow_product</DisplayName>
<UseQuotaConfigInAPIProduct stepName="Verify"/>
<Distributed>true</Distributed>
<StartTime>2019-01-01 00:00:00</StartTime>
</Quota>
Use of multiple occurrences is processed without error, but only policies for the second occurrence is created.
x-google-ratelimit:
- name: preflow_10ps
rate-literal: 10ps
identifier-ref: request.header.url #optional
- name: preflow_20ps
rate-literal: 20ps
identifier-ref: request.header.url #optional
DEBUG: Spike map: [map[identifier-ref:request.header.url name:preflow_10ps rate-literal:10ps] map[identifier-ref:request.header.url name:preflow_20ps rate-literal:20ps]]
kurtkanaskie
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Now underscores in name don't work, but I can work around that by using names with hyphen instead. Can't use an underscore in secutity scheme name.
kurtkanaskie
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! thanks for the quick turn around!
No description provided.