-
Notifications
You must be signed in to change notification settings - Fork 99
Expose Scan:: registry/token: Change istio authorization policies to allow traffic to the registry endpoints #5970
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
base: main
Are you sure you want to change the base?
Changes from all commits
61fbc99
82528ab
4c4a5b1
c789168
efa5174
18a704c
dbe5837
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,43 @@ | ||
| rateLimits: | ||
| /registry/allocations/v1: | ||
| name: registry-allocations | ||
| type: limited | ||
| clientIp: true | ||
| maxTokens: 10 | ||
| tokensPerFill: 5 | ||
| fillInterval: 60s | ||
| /registry/metadata/v1/info: | ||
| name: registry-metadata-info | ||
| type: limited | ||
| clientIp: true | ||
| maxTokens: 10 | ||
| tokensPerFill: 5 | ||
| fillInterval: 60s | ||
| /registry/metadata/v1/instruments: | ||
| name: registry-metadata-instruments | ||
| type: limited | ||
| clientIp: true | ||
| maxTokens: 10 | ||
| tokensPerFill: 5 | ||
| fillInterval: 60s | ||
| /registry/allocation-instruction/v1/allocation-factory: | ||
| name: registry-allocation-factory | ||
| type: limited | ||
| clientIp: true | ||
| maxTokens: 10 | ||
| tokensPerFill: 5 | ||
| fillInterval: 60s | ||
| /registry/transfer-instruction/v1: | ||
| name: registry-transfer-instruction | ||
| type: limited | ||
| clientIp: true | ||
| maxTokens: 10 | ||
| tokensPerFill: 5 | ||
| fillInterval: 60s | ||
| /registry/transfer-instruction/v1/transfer-factory: | ||
| name: registry-transfer-factory | ||
| type: limited | ||
| clientIp: true | ||
| maxTokens: 10 | ||
| tokensPerFill: 5 | ||
| fillInterval: 60s |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -6,3 +6,4 @@ rateLimits: | |
| maxTokens: 10 | ||
| tokensPerFill: 5 | ||
| fillInterval: 60s | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -9,6 +9,11 @@ cloudArmor: | |
| throttleAcrossAllEndpointsAllIps: | ||
| maxRequestsBeforeHttp429: 0 | ||
| withinIntervalSeconds: 60 | ||
| tokenRegistry: | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. you're enabling a global cloud armor limit but cloud armor is disabled. I was expecting we try to solve this in istio for now, is that not an option?
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. try setting the limit low enough that you can easily trigger it during testing and see that you trigger it
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Sure, will check in scratchnet with low limits. I have a question about the scope:: As of now, we allow an endpoint to have either a per-IP token bucket (clientIp: true) or a global shared bucket. These two types are mutually exclusive. #5651 asks for both global limits and per-IP limits, AFAICU. Since Cloud Armor isn't available, we can't achieve both without refactoring the Pulumi rate limit logic to map two separate descriptors to a single route/path. For this PR, should I stick to clientIp: true for all token endpoints (and hence no global limits), or just have global limits? or should I first refactor rate limiting logic to support both options for given end point? (sounds like different PR)
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. can you check with Stephen when we expect cloud armor to be enabled? If the answer is soon we can maybe wait for that, if not then we do need to refactor our istio limits. |
||
| pathPrefix: '/registry' | ||
| throttleAcrossAllEndpointsAllIps: | ||
| maxRequestsBeforeHttp429: 200 | ||
| withinIntervalSeconds: 60 | ||
| cluster: | ||
| hyperdiskSupport: | ||
| enabled: true | ||
|
|
@@ -354,6 +359,48 @@ sv: | |
| /api/scan/version: | ||
| name: 'version' | ||
| type: 'unlimited' | ||
| /registry/allocation-instruction/v1/allocation-factory: | ||
| clientIp: true | ||
| fillInterval: '60s' | ||
| maxTokens: 10 | ||
| name: 'registry-allocation-factory' | ||
| tokensPerFill: 5 | ||
| type: 'limited' | ||
| /registry/allocations/v1: | ||
| clientIp: true | ||
| fillInterval: '60s' | ||
| maxTokens: 10 | ||
| name: 'registry-allocations' | ||
| tokensPerFill: 5 | ||
| type: 'limited' | ||
| /registry/metadata/v1/info: | ||
| clientIp: true | ||
| fillInterval: '60s' | ||
| maxTokens: 10 | ||
| name: 'registry-metadata-info' | ||
| tokensPerFill: 5 | ||
| type: 'limited' | ||
| /registry/metadata/v1/instruments: | ||
| clientIp: true | ||
| fillInterval: '60s' | ||
| maxTokens: 10 | ||
| name: 'registry-metadata-instruments' | ||
| tokensPerFill: 5 | ||
| type: 'limited' | ||
| /registry/transfer-instruction/v1: | ||
| clientIp: true | ||
| fillInterval: '60s' | ||
| maxTokens: 10 | ||
| name: 'registry-transfer-instruction' | ||
| tokensPerFill: 5 | ||
| type: 'limited' | ||
| /registry/transfer-instruction/v1/transfer-factory: | ||
| clientIp: true | ||
| fillInterval: '60s' | ||
| maxTokens: 10 | ||
| name: 'registry-transfer-factory' | ||
| tokensPerFill: 5 | ||
| type: 'limited' | ||
| svs: | ||
| sv: | ||
| cometbft: | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.