mirror of
https://github.com/google/nomulus.git
synced 2025-06-29 15:53:35 +02:00
Add ability to configure proxy quotas
The quotas can be configured in the yaml configuration file. Default quota will be applied to any userId that is not matched in the custom quota list. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=178804649
This commit is contained in:
parent
c941190e71
commit
c5515ab4e6
8 changed files with 258 additions and 1 deletions
|
@ -82,6 +82,41 @@ epp:
|
|||
# TODO(b/64510444) Remove this after nomulus no longer check sni header.
|
||||
serverHostname: epp.yourdomain.tld
|
||||
|
||||
# Quota configuration for EPP
|
||||
quota:
|
||||
|
||||
# Token database refresh period. Set to 0 to disable refresh.
|
||||
#
|
||||
# After the set time period, inactive userIds will be deleted.
|
||||
refreshSeconds: 0
|
||||
|
||||
# Default quota for any userId not matched in customQuota.
|
||||
defaultQuota:
|
||||
|
||||
# List of identifiers, e. g. IP address, certificate hash.
|
||||
#
|
||||
# userId for defaultQuota should always be an empty list. Any value
|
||||
# in the list will be discarded.
|
||||
#
|
||||
# There should be no duplicate userIds, either within this list, or
|
||||
# across quota groups within customQuota. Any duplication will result
|
||||
# in an error when constructing QuotaConfig.
|
||||
userId: []
|
||||
|
||||
# Number of tokens allotted to the matched user. Set to -1 to allow
|
||||
# infinite quota.
|
||||
tokenAmount: 100
|
||||
|
||||
# Token refill period. Set to 0 to disable refill.
|
||||
#
|
||||
# After the set time period, the token for the user will be
|
||||
# reset to tokenAmount.
|
||||
refillSeconds: 0
|
||||
|
||||
# List of custom quotas for specific userId. Use the same schema as
|
||||
# defaultQuota for list entries.
|
||||
customQuota: []
|
||||
|
||||
whois:
|
||||
port: 43
|
||||
relayHost: registry-project-id.appspot.com
|
||||
|
@ -100,6 +135,36 @@ whois:
|
|||
# idle connection.
|
||||
readTimeoutSeconds: 60
|
||||
|
||||
# Quota configuration for WHOIS
|
||||
quota:
|
||||
|
||||
# Token database refresh period. Set to 0 to disable refresh.
|
||||
#
|
||||
# After the set time period, inactive token buckets will be deleted.
|
||||
refreshSeconds: 3600
|
||||
|
||||
# Default quota for any userId not matched in customQuota.
|
||||
defaultQuota:
|
||||
|
||||
# List of identifiers, e. g. IP address, certificate hash.
|
||||
#
|
||||
# userId for defaultQuota should always be an empty list.
|
||||
userId: []
|
||||
|
||||
# Number of tokens allotted to the matched user. Set to -1 to allow
|
||||
# infinite quota.
|
||||
tokenAmount: 100
|
||||
|
||||
# Token refill period. Set to 0 to disable refill.
|
||||
#
|
||||
# After the set time period, the token for the given user will be
|
||||
# reset to tokenAmount.
|
||||
refillSeconds: 600
|
||||
|
||||
# List of custom quotas for specific userId. Use the same schema as
|
||||
# defaultQuota for list entries.
|
||||
customQuota: []
|
||||
|
||||
healthCheck:
|
||||
port: 11111
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue