google-nomulus/java/google/registry
jianglai 3cfde5d4a1 Fix EPP quota handling bug
We limit the maximum number of concurrent connections that a client can make the proxy. The quota is implemented as a (thread-safe) map of client certificate hash to available number of connections. When a new connection is made, we decrement the availability counter by one. When the counter hits zero, no more connections can be made and any new connection from the same client is terminated by the proxy.

Currently, the counter is incremented when a connection is terminated, including connections that are terminated *because* the quota is reached (i. e. the connections for which the counter is not decremented because the counter is already zero). This means that the first time the quota is reached, the next connection is dropped, the counter is incremented to 1 and new connections can be made again, bypassing the quota. This process can be repeated to achieve, theoretically, infinite quota.

This CL fixes this bug by only incrementing the counter, upon connection termination, for connections that have decremented the counter in the first place.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=217231593
2018-10-17 11:56:04 -04:00
..
backup Clean up third_party imports in BUILD files 2018-07-14 01:11:51 -04:00
batch Delete the verify entity integrity mapreduce 2018-09-20 11:19:36 -04:00
beam Do not include transactions with zero unit price in invoice 2018-10-08 16:59:29 -04:00
bigquery Use @DefaultCredential for Cloud API access in GAE 2018-09-20 11:19:36 -04:00
builddefs Remove the deprecated, now no-op, "data" transition 2018-08-10 13:44:25 -04:00
config Update Spec 11 emails body and add a bcc address. 2018-10-17 11:51:28 -04:00
cron Clean up third_party imports in BUILD files 2018-07-14 01:11:51 -04:00
dns Update dependencies to satisfy strictness and remove -jpl_strict_deps feature 2018-09-14 21:33:08 -04:00
env Stop exporting EPP flow metrics to BigQuery 2018-10-08 16:59:29 -04:00
export Use @DefaultCredential for Cloud API access in GAE 2018-09-20 11:19:36 -04:00
flows Fix bugs exposed by testing with Gradle 2018-10-17 11:44:41 -04:00
gcs Clean up annotation imports in BUILD files 2018-06-27 15:28:53 -04:00
groups Refactor DelegatedCredential provisioning for GSuite domains 2018-09-11 14:18:41 -04:00
idn Update IDN tables to comply with https://www.iana.org/help/idn-repository-procedure 2018-02-01 21:59:14 -05:00
keyring Allow choice of Keyring to be configured in YAML 2018-10-17 11:48:12 -04:00
loadtest Clean up annotation imports in BUILD files 2018-06-27 15:28:53 -04:00
mapreduce Use locking on async mapreduces 2018-08-10 13:44:25 -04:00
model Index the allocation token's redemption history entry field 2018-10-03 11:52:31 -04:00
module Allow choice of Keyring to be configured in YAML 2018-10-17 11:48:12 -04:00
monitoring/whitebox Stop exporting EPP flow metrics to BigQuery 2018-10-08 16:59:29 -04:00
pricing Clean up third_party imports in BUILD files 2018-07-14 01:11:51 -04:00
proxy Fix EPP quota handling bug 2018-10-17 11:56:04 -04:00
rdap Refactor SessionUtil, and Add dropdown menu to switch clientId 2018-10-17 11:49:50 -04:00
rde Move the RDE TAR file encoding to a dedicated file 2018-08-10 13:46:48 -04:00
reporting Update Spec 11 emails body and add a bcc address. 2018-10-17 11:51:28 -04:00
request Remove outdated credential modules 2018-10-03 12:08:55 -04:00
security Improve internal build system speed 2018-06-27 15:28:52 -04:00
storage/drive Clean up third_party imports in BUILD files 2018-07-14 01:11:51 -04:00
tldconfig/idn Clean up third_party imports in BUILD files 2018-07-14 01:11:51 -04:00
tmch Clean up annotation imports in BUILD files 2018-06-27 15:28:53 -04:00
tools Allow choice of Keyring to be configured in YAML 2018-10-17 11:48:12 -04:00
ui Refactor SessionUtil, and Add dropdown menu to switch clientId 2018-10-17 11:49:50 -04:00
util Add newline after closing boundary in multipart upload of LORDN 2018-09-14 11:49:12 -04:00
whois Clean up annotation imports in BUILD files 2018-06-27 15:28:53 -04:00
xjc Run bazel installer as a argument to bash 2018-08-10 13:44:25 -04:00
xml Pretty-print actual XML in tests 2018-07-14 01:37:03 -04:00
BUILD Remove deprecated DNS subsystem 2018-09-14 12:01:08 -04:00
repositories.bzl Update apache sshd version 2018-10-08 16:59:29 -04:00