Skip to content
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

Throttling feature #1716

Merged
merged 27 commits into from
Mar 12, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
20c053c
Throttle publisher
AmaliMatharaarachchi Jan 22, 2021
1cfb565
Update code
AmaliMatharaarachchi Feb 8, 2021
b3ca640
Merge pull request #1539 from AmaliMatharaarachchi/throttle-publisher
praminda Feb 18, 2021
d6dea82
Merge remote-tracking branch 'upstream/envoy-gw' into feature/throttling
praminda Feb 18, 2021
84fd76b
enforcer: Fix PR comments for #1539
praminda Feb 25, 2021
a604de2
xds: throttle: Push publisher config
praminda Feb 25, 2021
bf29106
throttle: Add urlgrp type config
praminda Mar 1, 2021
372f2e2
throttle: enforcer: Receive throttle pub config
praminda Mar 1, 2021
2a1d86e
Merge branch 'envoy-gw' of github.com:wso2/product-microgateway into …
praminda Mar 1, 2021
cd3abef
throttle: enforcer: Activate publisher
praminda Mar 1, 2021
61b051a
enf: thrt: Rename globalthrottle pkg
praminda Mar 2, 2021
cec8e6f
thrtl: enf: Add dummy throttle listener
praminda Mar 4, 2021
c747727
thrtl: Listen and store throttle data
praminda Mar 5, 2021
4fbdad8
Merge pull request #1672 from praminda/feature/throttling
praminda Mar 9, 2021
1af1b66
throttle: enf: Add basic sub/app throttling
praminda Mar 10, 2021
d4b0593
throttle: enf: Move config dtos to correct pkg
praminda Mar 10, 2021
c8c6cd7
throttle: enf: Add configs to protos
praminda Mar 10, 2021
2c47c24
throttle: enf: Use config values
praminda Mar 10, 2021
a1beae1
throttle: enf: Add common method to set errors
praminda Mar 10, 2021
30f8aef
throttle: Update config format
praminda Mar 11, 2021
b7f827e
throttle: enf: Remove urlGrp type config
praminda Mar 11, 2021
3ea0e13
throttle: Remove unrecommended TLS versions
praminda Mar 11, 2021
3455cd5
throttle: enf: Move constants to one class
praminda Mar 12, 2021
1aada8f
throttle: enf: Set default throttle values
praminda Mar 12, 2021
a3a4047
throttle: enf: Add basic API throttling
praminda Mar 12, 2021
3e35c43
Merge pull request #1705 from praminda/feature/throttling
Rajith90 Mar 12, 2021
e7cc181
Merge branch 'envoy-gw' of github.com:wso2/product-microgateway into …
praminda Mar 12, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
173 changes: 0 additions & 173 deletions adapter/api/wso2/discovery/config/enforcer/claim_mapping.pb.go

This file was deleted.

59 changes: 56 additions & 3 deletions adapter/config/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ type Config struct {
KeyStore keystore
ListenerTLSEnabled bool

// Envoy Upstream Related Connfigurations
// Envoy Upstream Related Configurations
Upstream struct {
//UpstreamTLS related Configuration
TLS struct {
Expand All @@ -130,6 +130,7 @@ type Config struct {
AuthService authService
JwtGenerator jwtGenerator
Cache cache
Throttling throttlingConfig
JwtIssuer jwtIssuer
}

Expand Down Expand Up @@ -184,6 +185,58 @@ type eventHub struct {
} `toml:"jmsConnectionParameters"`
}

type throttlingConfig struct {
EnableGlobalEventPublishing bool `toml:"enableGlobalEventPublishing"`
EnableHeaderConditions bool `toml:"enableHeaderConditions"`
EnableQueryParamConditions bool `toml:"enableQueryParamConditions"`
EnableJwtClaimConditions bool `toml:"enableJwtClaimConditions"`
JmsConnectionInitialContextFactory string `toml:"jmsConnectioninitialContextFactory"`
JmsConnectionProviderURL string `toml:"jmsConnectionProviderUrl"`
Publisher binaryPublisher
}

type binaryPublisher struct {
Username string
Password string
URLGroup []urlGroup `toml:"urlGroup"`
Pool publisherPool
Agent binaryAgent
}

type urlGroup struct {
ReceiverURLs []string `toml:"receiverURLs"`
AuthURLs []string `toml:"authURLs"`
Type string `toml:"type"`
}

type publisherPool struct {
MaxIdleDataPublishingAgents int32
InitIdleObjectDataPublishingAgents int32
PublisherThreadPoolCoreSize int32
PublisherThreadPoolMaximumSize int32
PublisherThreadPoolKeepAliveTime int32
}

type binaryAgent struct {
SslEnabledProtocols string
Ciphers string
QueueSize int32
BatchSize int32
CorePoolSize int32
SocketTimeoutMS int32
MaxPoolSize int32
KeepAliveTimeInPool int32
ReconnectionInterval int32
MaxTransportPoolSize int32
MaxIdleConnections int32
EvictionTimePeriod int32
MinIdleTimeInPool int32
SecureMaxTransportPoolSize int32
SecureMaxIdleConnections int32
SecureEvictionTimePeriod int32
SecureMinIdleTimeInPool int32
}

type jwtGenerator struct {
Enable bool `toml:"enable"`
Encoding string `toml:"encoding"`
Expand Down Expand Up @@ -223,8 +276,8 @@ type jwtIssuer struct {

// JwtUser represents allowed users to generate JWT tokens
type JwtUser struct {
Username string `toml:"username"`
Password string `toml:"password"`
Username string `toml:"username"`
Password string `toml:"password"`
}

// APICtlUser represents registered APICtl Users
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading