Backport of fix: allow snake case keys for ip based rate limit config entry into release/1.16.x (#19292)

* backport of commit 5c2deeb4c6b4b3bb1a1e5eadef52fd9ee7dda99a

* backport of commit e91fd9c7d7916db49c4976d29b42b29ba3ab2311

---------

Co-authored-by: Poonam Jadhav <poonam.jadhav@hashicorp.com>
This commit is contained in:
hc-github-team-consul-core 2023-10-19 12:28:53 -04:00 committed by GitHub
parent e61a635c67
commit abb6ce3bc9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 4 deletions

3
.changelog/_7406.txt Normal file
View file

@ -0,0 +1,3 @@
```release-note:bug
server: **(Enterprise Only)** Fixed an issue where snake case keys were rejected when configuring the control-plane-request-limit config entry
```

View file

@ -4,8 +4,8 @@
package api
type ReadWriteRatesConfig struct {
ReadRate float64
WriteRate float64
ReadRate float64 `alias:"read_rate"`
WriteRate float64 `alias:"write_rate"`
}
type RateLimitIPConfigEntry struct {
@ -16,8 +16,8 @@ type RateLimitIPConfigEntry struct {
Meta map[string]string `json:",omitempty"`
// overall limits
ReadRate float64
WriteRate float64
ReadRate float64 `alias:"read_rate"`
WriteRate float64 `alias:"write_rate"`
//limits specific to a type of call
ACL *ReadWriteRatesConfig `json:",omitempty"` // OperationCategoryACL OperationCategory = "ACL"